From owner-svn-src-head@freebsd.org Sun Oct 25 00:43:49 2020 Return-Path: Delivered-To: svn-src-head@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 E51B543A3A8; Sun, 25 Oct 2020 00:43:49 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJfNP5nCfz4L0B; Sun, 25 Oct 2020 00:43:49 +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 AA5A621603; Sun, 25 Oct 2020 00:43:49 +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 09P0hnOM009872; Sun, 25 Oct 2020 00:43:49 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09P0hm2h009868; Sun, 25 Oct 2020 00:43:48 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202010250043.09P0hm2h009868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 25 Oct 2020 00:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367034 - in head: sbin/fsck_ffs sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head: sbin/fsck_ffs sys/ufs/ffs X-SVN-Commit-Revision: 367034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 00:43:50 -0000 Author: mckusick Date: Sun Oct 25 00:43:48 2020 New Revision: 367034 URL: https://svnweb.freebsd.org/changeset/base/367034 Log: Various new check-hash checks have been added to the UFS filesystem over various major releases. Superblock check hashes were added for the 12 release and cylinder-group and inode check hashes will appear in the 13 release. When a disk with a UFS filesystem is writably mounted, the kernel clears the feature flags for anything that it does not support. For example, if a UFS disk from a 12-stable kernel is mounted on an 11-stable system, the 11-stable kernel will clear the flag in the filesystem superblock that indicates that superblock check-hashs are being maintained. Thus if the disk is later moved back to a 12-stable system, the 12-stable system will know to ignore its incorrect check-hash. If the only filesystem modification done on the earlier kernel is to run a utility such as growfs(8) that modifies the superblock but neither updates the check-hash nor clears the feature flag indicating that it does not support the check-hash, the disk will fail to mount if it is moved back to its original newer kernel. This patch moves the code that clears the filesystem feature flags from the mount code (ffs_mountfs()) to the code that reads the superblock (ffs_sbget()). As ffs_sbget() is used by the kernel mount code and is imported into libufs(3), all the filesystem utilities will now also clear these flags when they make modifications to the filesystem. As suggested by John Baldwin, fsck_ffs(8) has been changed to accept and repair bad superblock check-hashes rather than refusing to run. This change allows fsck to recover filesystems that have been impacted by utilities older than those created after this change and is a sensible thing to do in any event. Reported by: John Baldwin (jhb@) MFC after: 2 weeks Sponsored by: Netflix Modified: head/sbin/fsck_ffs/setup.c head/sys/ufs/ffs/ffs_subr.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ffs/fs.h Modified: head/sbin/fsck_ffs/setup.c ============================================================================== --- head/sbin/fsck_ffs/setup.c Sat Oct 24 23:21:51 2020 (r367033) +++ head/sbin/fsck_ffs/setup.c Sun Oct 25 00:43:48 2020 (r367034) @@ -330,7 +330,7 @@ readsb(int listerr) int bad, ret; struct fs *fs; - super = bflag ? bflag * dev_bsize : STDSB; + super = bflag ? bflag * dev_bsize : STDSB_NOHASHFAIL; readcnt[sblk.b_type]++; if ((ret = sbget(fsreadfd, &fs, super)) != 0) { switch (ret) { Modified: head/sys/ufs/ffs/ffs_subr.c ============================================================================== --- head/sys/ufs/ffs/ffs_subr.c Sat Oct 24 23:21:51 2020 (r367033) +++ head/sys/ufs/ffs/ffs_subr.c Sun Oct 25 00:43:48 2020 (r367034) @@ -165,15 +165,15 @@ ffs_sbget(void *devfd, struct fs **fsp, off_t altsbloc fs = NULL; *fsp = NULL; - chkhash = 1; if (altsblock >= 0) { - if ((error = readsuper(devfd, &fs, altsblock, 1, chkhash, + if ((error = readsuper(devfd, &fs, altsblock, 1, 0, readfunc)) != 0) { if (fs != NULL) UFS_FREE(fs, filltype); return (error); } } else { + chkhash = 1; if (altsblock == STDSB_NOHASHFAIL) chkhash = 0; for (i = 0; sblock_try[i] != -1; i++) { @@ -277,6 +277,12 @@ readsuper(void *devfd, struct fs **fsp, off_t sblocklo */ if ((fs->fs_flags & FS_METACKHASH) == 0) fs->fs_metackhash = 0; + /* + * Clear any check-hashes that are not maintained + * by this kernel. Also clear any unsupported flags. + */ + fs->fs_metackhash &= CK_SUPPORTED; + fs->fs_flags &= FS_SUPPORTED; if (fs->fs_ckhash != (ckhash = ffs_calc_sbhash(fs))) { #ifdef _KERNEL res = uprintf("Superblock check-hash failed: recorded " Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sat Oct 24 23:21:51 2020 (r367033) +++ head/sys/ufs/ffs/ffs_vfsops.c Sun Oct 25 00:43:48 2020 (r367034) @@ -1070,10 +1070,6 @@ ffs_mountfs(odevvp, mp, td) loc = STDSB_NOHASHFAIL; if ((error = ffs_sbget(devvp, &fs, loc, M_UFSMNT, ffs_use_bread)) != 0) goto out; - /* none of these types of check-hashes are maintained by this kernel */ - fs->fs_metackhash &= ~(CK_INDIR | CK_DIR); - /* no support for any undefined flags */ - fs->fs_flags &= FS_SUPPORTED; fs->fs_flags &= ~FS_UNCLEAN; if (fs->fs_clean == 0) { fs->fs_flags |= FS_UNCLEAN; Modified: head/sys/ufs/ffs/fs.h ============================================================================== --- head/sys/ufs/ffs/fs.h Sat Oct 24 23:21:51 2020 (r367033) +++ head/sys/ufs/ffs/fs.h Sun Oct 25 00:43:48 2020 (r367034) @@ -501,6 +501,7 @@ CTASSERT(sizeof(struct fs) == 1376); #define CK_INODE 0x0004 /* inodes */ #define CK_INDIR 0x0008 /* indirect blocks */ #define CK_DIR 0x0010 /* directory contents */ +#define CK_SUPPORTED 0x0007 /* supported flags, others cleared at mount */ /* * The BX_FSPRIV buffer b_xflags are used to track types of data in buffers. */ From owner-svn-src-head@freebsd.org Sun Oct 25 01:20:06 2020 Return-Path: Delivered-To: svn-src-head@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 E235D43B354; Sun, 25 Oct 2020 01:20:06 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJgBF71SFz4MJS; Sun, 25 Oct 2020 01:20:05 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f41.google.com with SMTP id h21so6305293iob.10; Sat, 24 Oct 2020 18:20:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2eAj9Xsn07VQSu4r6pMk+lqHI3ZiySdgQEepSiFXd8Y=; b=dG18DaTDOmFp9sCnJ4bAuEk4EVtYkLs1tURfZVBHUZ2rZAyMo3NhfvHQ9yIBiHxA3Z v/GSVD4TfbVkWesd3Ba+ETjw2xt3/SkNP9F+2xcLtjhdV4inXaUuJ3x+LcEfYtQLwdjM xURgpBNx7kNjeBGqf5V1RAhCE52JtswzXOcGT3/U44vW2/FRoDeJ/eQ4nM1aO0lO5Fvh sRXhzYknIpKy8mlPXIEIzqMpnuceRxkRbIb4rUbpm4AgwlXEN+pkKokDDdSrjXRhxU3U 0kCx0wPloYEQ2GWtcRfe1xwy9/vEzGh2V9LbnW/wc4lfREFL2J6AA8IQk1LkxpuBmjCU y+FA== X-Gm-Message-State: AOAM531kgZSvocUQ5Q4BS7DZ6GWqQvLP91Ho3iPyfNxp5hisj4DJDzif 0ewsPqc+n3xkoN5cBjwwkmKwaL4lSjLvy8JKaOE= X-Google-Smtp-Source: ABdhPJwS19s9Qjs+KkRxlov4wDKUNcYK+P+6G6fYGpzB+NkWqyetq4EuQkK6sPq/JvAQ0c2dtMhcchyjaWtVD/bcfoI= X-Received: by 2002:a5e:dc0b:: with SMTP id b11mr6721068iok.179.1603588804968; Sat, 24 Oct 2020 18:20:04 -0700 (PDT) MIME-Version: 1.0 References: <202010241023.09OANMcL075640@repo.freebsd.org> <20201024125206.GB38000@FreeBSD.org> <999a005e-1ef8-3c45-fb07-94a3b6ebce1b@selasky.org> <317231603546378@mail.yandex.ru> In-Reply-To: From: Ed Maste Date: Sat, 24 Oct 2020 21:19:52 -0400 Message-ID: Subject: Re: svn commit: r366993 - head/sys/net To: Warner Losh Cc: "Alexander V. Chernikov" , Hans Petter Selasky , Alexey Dokuchaev , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CJgBF71SFz4MJS X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.41 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-3.03 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.96)[-0.960]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.995]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.41:from]; NEURAL_HAM_MEDIUM(-1.08)[-1.075]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.41:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 01:20:06 -0000 On Sat, 24 Oct 2020 at 11:27, Warner Losh wrote: > >> Given we already have nice .clang-format, that does most of the job, maybe it's worth considering looking into tweaking it further to fix this part? >> It would be nice if we could finally offload all formatting issues to the tool and focus on the actual code :-) > > It would be nice if it produced one of the style(9) acceptable formats without disrupting things already acceptable. That's been the big problem with the tweaks to date... some things are fixed, others break. It's getting a lot closer, though Upstream clang-format comes with a script that can integrate with git, adding a `git clang-format` command. It will apply formatting to modified lines, leaving unchanged ones alone. From owner-svn-src-head@freebsd.org Sun Oct 25 01:36:34 2020 Return-Path: Delivered-To: svn-src-head@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 B172843C50D; Sun, 25 Oct 2020 01:36:34 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJgYG4GB5z4NQl; Sun, 25 Oct 2020 01:36:34 +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 5B6C221CA7; Sun, 25 Oct 2020 01:36:34 +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 09P1aYWi041065; Sun, 25 Oct 2020 01:36:34 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09P1aXR9041063; Sun, 25 Oct 2020 01:36:33 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202010250136.09P1aXR9041063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 25 Oct 2020 01:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367035 - in head/sbin: fsirand growfs tunefs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head/sbin: fsirand growfs tunefs X-SVN-Commit-Revision: 367035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 01:36:34 -0000 Author: mckusick Date: Sun Oct 25 01:36:33 2020 New Revision: 367035 URL: https://svnweb.freebsd.org/changeset/base/367035 Log: Filesystem utilities that modify the filesystem (growfs(8), tunefs(8), and fsirand(8)) should check the filesystem status and require that fsck(8) be run if it is unclean. This requirement is not imposed on fsdb(8) or clri(8) since they may be used to clean up a filesystem. MFC after: 2 weeks Sponsored by: Netflix Modified: head/sbin/fsirand/fsirand.c head/sbin/growfs/growfs.c head/sbin/tunefs/tunefs.c Modified: head/sbin/fsirand/fsirand.c ============================================================================== --- head/sbin/fsirand/fsirand.c Sun Oct 25 00:43:48 2020 (r367034) +++ head/sbin/fsirand/fsirand.c Sun Oct 25 01:36:33 2020 (r367035) @@ -134,6 +134,12 @@ fsirand(char *device) return (1); } } + /* + * Check for unclean filesystem. + */ + if (sblock->fs_clean == 0 || + (sblock->fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) != 0) + errx(1, "%s is not clean - run fsck.\n", device); if (sblock->fs_magic == FS_UFS1_MAGIC && sblock->fs_old_inodefmt < FS_44INODEFMT) { Modified: head/sbin/growfs/growfs.c ============================================================================== --- head/sbin/growfs/growfs.c Sun Oct 25 00:43:48 2020 (r367034) +++ head/sbin/growfs/growfs.c Sun Oct 25 01:36:33 2020 (r367035) @@ -1460,6 +1460,12 @@ main(int argc, char **argv) errc(1, ret, "unable to read superblock"); } } + /* + * Check for unclean filesystem. + */ + if (fs->fs_clean == 0 || + (fs->fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) != 0) + errx(1, "%s is not clean - run fsck.\n", *argv); memcpy(&osblock, fs, fs->fs_sbsize); free(fs); memcpy((void *)&fsun1, (void *)&fsun2, osblock.fs_sbsize); Modified: head/sbin/tunefs/tunefs.c ============================================================================== --- head/sbin/tunefs/tunefs.c Sun Oct 25 00:43:48 2020 (r367034) +++ head/sbin/tunefs/tunefs.c Sun Oct 25 01:36:33 2020 (r367035) @@ -115,12 +115,12 @@ main(int argc, char *argv[]) switch (ch) { case 'A': - found_arg = 1; + found_arg++; Aflag++; break; case 'a': - found_arg = 1; + found_arg++; name = "POSIX.1e ACLs"; avalue = optarg; if (strcmp(avalue, "enable") && @@ -132,7 +132,7 @@ main(int argc, char *argv[]) break; case 'e': - found_arg = 1; + found_arg++; name = "maximum blocks per file in a cylinder group"; evalue = atoi(optarg); if (evalue < 1) @@ -142,7 +142,7 @@ main(int argc, char *argv[]) break; case 'f': - found_arg = 1; + found_arg++; name = "average file size"; fvalue = atoi(optarg); if (fvalue < 1) @@ -152,7 +152,7 @@ main(int argc, char *argv[]) break; case 'j': - found_arg = 1; + found_arg++; name = "softdep journaled file system"; jvalue = optarg; if (strcmp(jvalue, "enable") && @@ -164,7 +164,7 @@ main(int argc, char *argv[]) break; case 'J': - found_arg = 1; + found_arg++; name = "gjournaled file system"; Jvalue = optarg; if (strcmp(Jvalue, "enable") && @@ -176,7 +176,7 @@ main(int argc, char *argv[]) break; case 'k': - found_arg = 1; + found_arg++; name = "space to hold for metadata blocks"; kvalue = atoi(optarg); if (kvalue < 0) @@ -185,7 +185,7 @@ main(int argc, char *argv[]) break; case 'L': - found_arg = 1; + found_arg++; name = "volume label"; Lvalue = optarg; i = -1; @@ -205,7 +205,7 @@ main(int argc, char *argv[]) break; case 'l': - found_arg = 1; + found_arg++; name = "multilabel MAC file system"; lvalue = optarg; if (strcmp(lvalue, "enable") && @@ -217,7 +217,7 @@ main(int argc, char *argv[]) break; case 'm': - found_arg = 1; + found_arg++; name = "minimum percentage of free space"; mvalue = atoi(optarg); if (mvalue < 0 || mvalue > 99) @@ -226,7 +226,7 @@ main(int argc, char *argv[]) break; case 'N': - found_arg = 1; + found_arg++; name = "NFSv4 ACLs"; Nvalue = optarg; if (strcmp(Nvalue, "enable") && @@ -238,7 +238,7 @@ main(int argc, char *argv[]) break; case 'n': - found_arg = 1; + found_arg++; name = "soft updates"; nvalue = optarg; if (strcmp(nvalue, "enable") != 0 && @@ -250,7 +250,7 @@ main(int argc, char *argv[]) break; case 'o': - found_arg = 1; + found_arg++; name = "optimization preference"; if (strcmp(optarg, "space") == 0) ovalue = FS_OPTSPACE; @@ -264,12 +264,12 @@ main(int argc, char *argv[]) break; case 'p': - found_arg = 1; + found_arg++; pflag = 1; break; case 's': - found_arg = 1; + found_arg++; name = "expected number of files per directory"; svalue = atoi(optarg); if (svalue < 1) @@ -279,7 +279,7 @@ main(int argc, char *argv[]) break; case 'S': - found_arg = 1; + found_arg++; name = "Softdep Journal Size"; Svalue = atoi(optarg); if (Svalue < SUJ_MIN) @@ -288,7 +288,7 @@ main(int argc, char *argv[]) break; case 't': - found_arg = 1; + found_arg++; name = "trim"; tvalue = optarg; if (strcmp(tvalue, "enable") != 0 && @@ -310,6 +310,13 @@ main(int argc, char *argv[]) on = special = argv[0]; if (ufs_disk_fillout(&disk, special) == -1) goto err; + /* + * Check for unclean filesystem. + */ + if ((sblock.fs_clean == 0 || + (sblock.fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) != 0) && + (found_arg > 1 || !pflag)) + errx(1, "%s is not clean - run fsck.\n", special); if (disk.d_name != special) { if (statfs(special, &stfs) != 0) warn("Can't stat %s", special); From owner-svn-src-head@freebsd.org Sun Oct 25 01:38:19 2020 Return-Path: Delivered-To: svn-src-head@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 B85A643C78C for ; Sun, 25 Oct 2020 01:38:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJgbG4hj1z4Ncs for ; Sun, 25 Oct 2020 01:38:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2d.google.com with SMTP id w5so2741859qvn.12 for ; Sat, 24 Oct 2020 18:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iRTbwqpnNLB7ZuzhLQqw7pDuYEeKjw6EKxFIQz2b3SU=; b=g3zSvCYi6+WnhxyaKimiTPcubC7qhyVuufU+/MVdH17mepLcJ80iOiYXiYsTzj5RzO YppKawmAD022TGo8j+hJC30fvk7B8m1A7Umd4Ouj33FO1ZhsOpCdC6upR/PFA52eHlsT f5SgAn25rhrtEibRX42rYFRzSftj0yS1VT2LJME1rzJ3KNoUwdgnyLmB9aEZmNTCH4ht irLiyzulwjI2fwY+ci9rgpoM5FuFOTVB14nI0w9v7n2VHUCDQlvDQKeVShQ7GI6hddL1 lcxvJu4CZBEkeVJFnRkLOHmO/MLRrODHj6gfs7PrJ4NSVd/E/eM+HEjsQ9UxKrcsgWl2 i93A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iRTbwqpnNLB7ZuzhLQqw7pDuYEeKjw6EKxFIQz2b3SU=; b=j9bdfxjkSBaaOxUNHBHu3RqzBdl5rGnbb45Dqy3fFqQ97tgrA1WFJw8fog7hSwIOd+ uTQoGWsmWAjxdXr4XsofPAorY+UFqJlaWKmXkd60W/FAtowJ1gN+QiohEJBbFBD2zRo6 ttEwz9aquAHBN6Crp/zIL5tq5VVYavwmKOCW6P2UzsxreME+RjVNTyNNVCQfMLiQH8a0 pauFFNwE2Jcb2woJC/cdSmA+2v4jeymYfhNoV4aaNpK6CsftcZZTuliBnDprzkXMmjW+ jp87kYx2YdNbGuodE99jGi/dVwDg+n2Zf6ncGQCoEsSQc/zqyZsnZBj5R2Tk8El6d9I8 9f2w== X-Gm-Message-State: AOAM531o8XqLtQVc8WqD0l0ApvS8Nd07FcIMXjRzW3Wr0BS02HTX5QlM DvIJqMAVSd2RU94qtIcOmffjYh2oVH1MgaV2mdXGmA== X-Google-Smtp-Source: ABdhPJz4YL7tRYFbCmjta1D1KOBP7EHsi2P0EQWQvreBVOAXXH99HEznZsibTRzdhVImkPrV1D2qp93kxDdMjtRBiZ0= X-Received: by 2002:a0c:aa1e:: with SMTP id d30mr6372132qvb.24.1603589897502; Sat, 24 Oct 2020 18:38:17 -0700 (PDT) MIME-Version: 1.0 References: <202010241023.09OANMcL075640@repo.freebsd.org> <20201024125206.GB38000@FreeBSD.org> <999a005e-1ef8-3c45-fb07-94a3b6ebce1b@selasky.org> <317231603546378@mail.yandex.ru> In-Reply-To: From: Warner Losh Date: Sat, 24 Oct 2020 19:38:06 -0600 Message-ID: Subject: Re: svn commit: r366993 - head/sys/net To: Ed Maste Cc: "Alexander V. Chernikov" , Hans Petter Selasky , Alexey Dokuchaev , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 4CJgbG4hj1z4Ncs X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=g3zSvCYi; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2d) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.08 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.06)[-1.065]; NEURAL_HAM_LONG(-0.97)[-0.966]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.05)[-1.046]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2d:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 01:38:19 -0000 On Sat, Oct 24, 2020 at 7:20 PM Ed Maste wrote: > On Sat, 24 Oct 2020 at 11:27, Warner Losh wrote: > > > >> Given we already have nice .clang-format, that does most of the job, > maybe it's worth considering looking into tweaking it further to fix this > part? > >> It would be nice if we could finally offload all formatting issues to > the tool and focus on the actual code :-) > > > > It would be nice if it produced one of the style(9) acceptable formats > without disrupting things already acceptable. That's been the big problem > with the tweaks to date... some things are fixed, others break. It's > getting a lot closer, though > > Upstream clang-format comes with a script that can integrate with git, > adding a `git clang-format` command. It will apply formatting to > modified lines, leaving unchanged ones alone. > As long as it's optional... Warner From owner-svn-src-head@freebsd.org Sun Oct 25 02:51:03 2020 Return-Path: Delivered-To: svn-src-head@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 33C0B43F922; Sun, 25 Oct 2020 02:51:03 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJjCB0XsBz4SYh; Sun, 25 Oct 2020 02:51:01 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 09P2oxkZ076550; Sat, 24 Oct 2020 19:50:59 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 09P2oxbs076549; Sat, 24 Oct 2020 19:50:59 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202010250250.09P2oxbs076549@gndrsh.dnsmgr.net> Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar In-Reply-To: <202010230922.09N9MNZu040921@repo.freebsd.org> To: =?UTF-8?Q?Stefan_E=C3=9Fer?= Date: Sat, 24 Oct 2020 19:50:59 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4CJjCB0XsBz4SYh X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.22 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.01)[0.010]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_SHORT(0.16)[0.164]; NEURAL_SPAM_LONG(0.14)[0.145]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 02:51:03 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: se > Date: Fri Oct 23 09:22:23 2020 > New Revision: 366962 > URL: https://svnweb.freebsd.org/changeset/base/366962 > > Log: > Add search of LOCALBASE/share/calendar for calendars supplied by a port. > > Calendar files in LOCALBASE override similarily named ones in the base > system. This could easily be changed if the base system calendars should > have precedence, but it could lead to a violation of POLA since then the > port's files were ignored unless those in base have been deleted. > > There was no definition of _PATH_LOCALBASE in paths.h, but verbatim uses > of /usr/local existed for _PATH_DEFPATH. Use _PATH_LOCALBASE here to ease > a consistent modification of this prefix. > > Reviewed by: imp, pfg > Differential Revision: https://reviews.freebsd.org/D26882 > > Modified: > head/include/paths.h > head/usr.bin/calendar/io.c > head/usr.bin/calendar/pathnames.h > > Modified: head/include/paths.h > ============================================================================== > --- head/include/paths.h Fri Oct 23 08:44:53 2020 (r366961) > +++ head/include/paths.h Fri Oct 23 09:22:23 2020 (r366962) > @@ -37,8 +37,11 @@ > > #include > > +#define _PATH_LOCALBASE "/usr/local" > + Something feels very wrong about this becoming a defined path in base, it is further dependence on /usr/local which in the early days we spent a great deal of time removing. I believe the whole ports system allows this to be something other than /usr/local. Package should also allow it to be some other place. > /* Default search path. */ > -#define _PATH_DEFPATH "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" > +#define _PATH_DEFPATH "/sbin:/bin:/usr/sbin:/usr/bin:" \ > + _PATH_LOCALBASE "/sbin:" _PATH_LOCALBASE "/bin" > /* All standard utilities path. */ > #define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" > /* Locate system binaries. */ > > Modified: head/usr.bin/calendar/io.c > ============================================================================== > --- head/usr.bin/calendar/io.c Fri Oct 23 08:44:53 2020 (r366961) > +++ head/usr.bin/calendar/io.c Fri Oct 23 09:22:23 2020 (r366962) > @@ -71,7 +71,7 @@ enum { > }; > > const char *calendarFile = "calendar"; /* default calendar file */ > -static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE}; /* HOME */ > +static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE_LOCAL, _PATH_INCLUDE}; /* HOME */ > static const char *calendarNoMail = "nomail";/* don't sent mail if file exist */ > > static char path[MAXPATHLEN]; > > Modified: head/usr.bin/calendar/pathnames.h > ============================================================================== > --- head/usr.bin/calendar/pathnames.h Fri Oct 23 08:44:53 2020 (r366961) > +++ head/usr.bin/calendar/pathnames.h Fri Oct 23 09:22:23 2020 (r366962) > @@ -35,3 +35,4 @@ > #include > > #define _PATH_INCLUDE "/usr/share/calendar" > +#define _PATH_INCLUDE_LOCAL _PATH_LOCALBASE "/share/calendar" > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Oct 25 03:08:26 2020 Return-Path: Delivered-To: svn-src-head@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 EDCF044068A for ; Sun, 25 Oct 2020 03:08:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJjbG0h3nz4V17 for ; Sun, 25 Oct 2020 03:08:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72e.google.com with SMTP id b18so1665852qkc.9 for ; Sat, 24 Oct 2020 20:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N9wQbBxQOA4txTRFnRs3kRB5FitJEPdOdzUEE64X7WE=; b=xXwX66q7zPzdYxJWdNE5iJeaZv75KhzBo5oo2MOxwHPfXc4+/fpOwumA1r14liQ1RG 0D9tL7B2x/A1xW7Xkov8ek3adN3L40ykXe2qvvu6JiOaaB46fTtcJjmZuvf9/BaWNI7W KaG5awCbROJL6ZlFusbxMF/n8+gLungdKpd3DWVEtHmSS+Loa0+5nQxQP7uUfBLMdVmg cd6PlSjTiwrC1xuCkv84JD1WhiQSfiSItdDYnnXfzW17LudxcpaA3CuT0khG4PHg3cfy bBVL2NB/h7QgMGH6zl8DwLGoB2kJJ/ezupgqv91CUdA9m0UkBi6WljvTBGYNZ0FYIxlr Ai8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N9wQbBxQOA4txTRFnRs3kRB5FitJEPdOdzUEE64X7WE=; b=cyUksodPWWmeyVToz/ULERlDpXkOL61BEBu9if9DHqY8kOYUqsSE0XYElm1gHZSN27 soxQmd0TuD6/UAYQyxe9NzAdozugUVBUHuWH50ApBTmlgOqdF05hb0AoMfRJIKkY86SM Dtc5zQHv/ep8mg3MKt+xx5wJHTtH6NCshQ512XL558kwl6xOKb1WI7U/2VKpRC24nChT oN3YhdCVw0emfUAAYeLYy4RDJaqU6zwVw2NZ4gXCzejHGGa/KbjiBWRqssg/6W2K2vF3 46+meVFgiJMqV0mWj8O0xpESlHgi9lAfKaV6yQemKGo4nVwdG4rTlMRPt86IwgrIyeSX nEJA== X-Gm-Message-State: AOAM531JYrOHrUrjcEhGez17wIFuCJJK7v+vJZISN8sF6FAcWXxDXutq e4CQtDi10QwEp5y0pBFkv5WIOdZ6oOVsLLahB+Ul7A== X-Google-Smtp-Source: ABdhPJxDILvyp8Jy1D3DTX934B5JCvOa/0DMY3EOnah/vlqtGnDm89jC8EYcJSG/JYkAdby4Wr2BlG3EiFyGoS3POlw= X-Received: by 2002:a37:478c:: with SMTP id u134mr10875126qka.206.1603595304961; Sat, 24 Oct 2020 20:08:24 -0700 (PDT) MIME-Version: 1.0 References: <202010230922.09N9MNZu040921@repo.freebsd.org> <202010250250.09P2oxbs076549@gndrsh.dnsmgr.net> In-Reply-To: <202010250250.09P2oxbs076549@gndrsh.dnsmgr.net> From: Warner Losh Date: Sat, 24 Oct 2020 21:08:14 -0600 Message-ID: Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar To: "Rodney W. Grimes" Cc: =?UTF-8?B?U3RlZmFuIEXDn2Vy?= , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4CJjbG0h3nz4V17 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=xXwX66q7; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72e) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.79 / 15.00]; ARC_NA(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.04)[-1.038]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.96)[-0.960]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.79)[-0.793]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72e:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 03:08:27 -0000 On Sat, Oct 24, 2020 at 8:51 PM Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: se > > Date: Fri Oct 23 09:22:23 2020 > > New Revision: 366962 > > URL: https://svnweb.freebsd.org/changeset/base/366962 > > > > Log: > > Add search of LOCALBASE/share/calendar for calendars supplied by a > port. > > > > Calendar files in LOCALBASE override similarily named ones in the base > > system. This could easily be changed if the base system calendars > should > > have precedence, but it could lead to a violation of POLA since then > the > > port's files were ignored unless those in base have been deleted. > > > > There was no definition of _PATH_LOCALBASE in paths.h, but verbatim > uses > > of /usr/local existed for _PATH_DEFPATH. Use _PATH_LOCALBASE here to > ease > > a consistent modification of this prefix. > > > > Reviewed by: imp, pfg > > Differential Revision: https://reviews.freebsd.org/D26882 > > > > Modified: > > head/include/paths.h > > head/usr.bin/calendar/io.c > > head/usr.bin/calendar/pathnames.h > > > > Modified: head/include/paths.h > > > ============================================================================== > > --- head/include/paths.h Fri Oct 23 08:44:53 2020 (r366961) > > +++ head/include/paths.h Fri Oct 23 09:22:23 2020 (r366962) > > @@ -37,8 +37,11 @@ > > > > #include > > > > +#define _PATH_LOCALBASE "/usr/local" > > + > > Something feels very wrong about this becoming a defined path in base, > it is further dependence on /usr/local which in the early days we spent > a great deal of time removing. > > I believe the whole ports system allows this to be something other > than /usr/local. Package should also allow it to be some other place. > This removes a couple of instances of /usr/local being hardcoded and replaces with a define, so net it's better. It could be even better, but this is slightly better than it was before. Warner > > /* Default search path. */ > > -#define _PATH_DEFPATH > "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" > > +#define _PATH_DEFPATH "/sbin:/bin:/usr/sbin:/usr/bin:" \ > > + _PATH_LOCALBASE "/sbin:" _PATH_LOCALBASE "/bin" > > /* All standard utilities path. */ > > #define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" > > /* Locate system binaries. */ > > > > Modified: head/usr.bin/calendar/io.c > > > ============================================================================== > > --- head/usr.bin/calendar/io.c Fri Oct 23 08:44:53 2020 > (r366961) > > +++ head/usr.bin/calendar/io.c Fri Oct 23 09:22:23 2020 > (r366962) > > @@ -71,7 +71,7 @@ enum { > > }; > > > > const char *calendarFile = "calendar"; /* default calendar file */ > > -static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE}; /* > HOME */ > > +static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE_LOCAL, > _PATH_INCLUDE}; /* HOME */ > > static const char *calendarNoMail = "nomail";/* don't sent mail if file > exist */ > > > > static char path[MAXPATHLEN]; > > > > Modified: head/usr.bin/calendar/pathnames.h > > > ============================================================================== > > --- head/usr.bin/calendar/pathnames.h Fri Oct 23 08:44:53 2020 > (r366961) > > +++ head/usr.bin/calendar/pathnames.h Fri Oct 23 09:22:23 2020 > (r366962) > > @@ -35,3 +35,4 @@ > > #include > > > > #define _PATH_INCLUDE "/usr/share/calendar" > > +#define _PATH_INCLUDE_LOCAL _PATH_LOCALBASE "/share/calendar" > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-head@freebsd.org Sun Oct 25 03:46:34 2020 Return-Path: Delivered-To: svn-src-head@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 20625441496; Sun, 25 Oct 2020 03:46:34 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJkRF2Lyjz4WH2; Sun, 25 Oct 2020 03:46:32 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 09P3kTDF076746; Sat, 24 Oct 2020 20:46:29 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 09P3kTVH076745; Sat, 24 Oct 2020 20:46:29 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202010250346.09P3kTVH076745@gndrsh.dnsmgr.net> Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar In-Reply-To: To: Warner Losh Date: Sat, 24 Oct 2020 20:46:29 -0700 (PDT) CC: "Rodney W. Grimes" , =?UTF-8?Q?Stefan_E=C3=9Fer?= , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4CJkRF2Lyjz4WH2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [-0.14 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.86)[-0.865]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.18)[-0.183]; NEURAL_SPAM_LONG(0.01)[0.010]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 03:46:34 -0000 > On Sat, Oct 24, 2020 at 8:51 PM Rodney W. Grimes > wrote: > > > [ Charset UTF-8 unsupported, converting... ] > > > Author: se > > > Date: Fri Oct 23 09:22:23 2020 > > > New Revision: 366962 > > > URL: https://svnweb.freebsd.org/changeset/base/366962 > > > > > > Log: > > > Add search of LOCALBASE/share/calendar for calendars supplied by a > > port. > > > > > > Calendar files in LOCALBASE override similarily named ones in the base > > > system. This could easily be changed if the base system calendars > > should > > > have precedence, but it could lead to a violation of POLA since then > > the > > > port's files were ignored unless those in base have been deleted. > > > > > > There was no definition of _PATH_LOCALBASE in paths.h, but verbatim > > uses > > > of /usr/local existed for _PATH_DEFPATH. Use _PATH_LOCALBASE here to > > ease > > > a consistent modification of this prefix. > > > > > > Reviewed by: imp, pfg > > > Differential Revision: https://reviews.freebsd.org/D26882 > > > > > > Modified: > > > head/include/paths.h > > > head/usr.bin/calendar/io.c > > > head/usr.bin/calendar/pathnames.h > > > > > > Modified: head/include/paths.h > > > > > ============================================================================== > > > --- head/include/paths.h Fri Oct 23 08:44:53 2020 (r366961) > > > +++ head/include/paths.h Fri Oct 23 09:22:23 2020 (r366962) > > > @@ -37,8 +37,11 @@ > > > > > > #include > > > > > > +#define _PATH_LOCALBASE "/usr/local" > > > + > > > > Something feels very wrong about this becoming a defined path in base, > > it is further dependence on /usr/local which in the early days we spent > > a great deal of time removing. > > > > I believe the whole ports system allows this to be something other > > than /usr/local. Package should also allow it to be some other place. > > > > This removes a couple of instances of /usr/local being hardcoded and > replaces with a define, so net it's better. No, its net worse as it now creates a define that is highly likely to propogate adding additional dependencies on this value. > > It could be even better, but this is slightly better than it was before. I disagree, as it is now easier for additional contamination of the base system. > Warner > > > > > /* Default search path. */ > > > -#define _PATH_DEFPATH > > "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" > > > +#define _PATH_DEFPATH "/sbin:/bin:/usr/sbin:/usr/bin:" \ > > > + _PATH_LOCALBASE "/sbin:" _PATH_LOCALBASE "/bin" > > > /* All standard utilities path. */ > > > #define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" > > > /* Locate system binaries. */ > > > > > > Modified: head/usr.bin/calendar/io.c > > > > > ============================================================================== > > > --- head/usr.bin/calendar/io.c Fri Oct 23 08:44:53 2020 > > (r366961) > > > +++ head/usr.bin/calendar/io.c Fri Oct 23 09:22:23 2020 > > (r366962) > > > @@ -71,7 +71,7 @@ enum { > > > }; > > > > > > const char *calendarFile = "calendar"; /* default calendar file */ > > > -static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE}; /* > > HOME */ > > > +static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE_LOCAL, > > _PATH_INCLUDE}; /* HOME */ > > > static const char *calendarNoMail = "nomail";/* don't sent mail if file > > exist */ > > > > > > static char path[MAXPATHLEN]; > > > > > > Modified: head/usr.bin/calendar/pathnames.h > > > > > ============================================================================== > > > --- head/usr.bin/calendar/pathnames.h Fri Oct 23 08:44:53 2020 > > (r366961) > > > +++ head/usr.bin/calendar/pathnames.h Fri Oct 23 09:22:23 2020 > > (r366962) > > > @@ -35,3 +35,4 @@ > > > #include > > > > > > #define _PATH_INCLUDE "/usr/share/calendar" > > > +#define _PATH_INCLUDE_LOCAL _PATH_LOCALBASE "/share/calendar" > > > > > > > -- > > Rod Grimes > > rgrimes@freebsd.org > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Oct 25 05:34:56 2020 Return-Path: Delivered-To: svn-src-head@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 1CEAC443519; Sun, 25 Oct 2020 05:34:56 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJmrH73PTz4b8F; Sun, 25 Oct 2020 05:34:55 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 309B25C0071; Sun, 25 Oct 2020 01:34:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 25 Oct 2020 01:34:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=U HjKTb/KzguX8UuHtC3JyS1EFq+RsJf3KHTxx3SzoHo=; b=j9YSTnHEhdBck6XAp peD1cgSrixTOoEYXpr+vIjHj632qxD7UmPUgt9jHCiL3sWlOx5sAG1YYJjxqj0xy bL3gTBD9oKDC3fc3xXAa3ypxIyHz6xtIV+B6rVEvYfVK4ZTdG7PErm8MfhVMUpBZ KOCosuYkOOx7w5VxURaOBsBpKkty5TG8bRzmX+Ob4zJBSO2yHyEpF0+JtMIrSoOW 4zwgIpB7bErJYqrK26BRQJRvVkx5WSCTTDR2vsvgKaZ5zFxYh+IQb8cIP5aMDG+f q8+FpDnM9Z3F/rGREATCM0+YYYsHx0FmZ3TYDJmhCfQiz7y+maxJXxQTyckHYFKk Ap5Pg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=UHjKTb/KzguX8UuHtC3JyS1EFq+RsJf3KHTxx3Szo Ho=; b=kndRbxy1eF76pUYvxiCqmUkeMuMNcmkFh78pOUUvH33D/ez4x7HYKFL1r DrWHjw1PtOcnsAKrE8RHrqhww6ao5qrdPXYASquFJCd2I4BdKBeuiIFwAph7+RG0 KDegVdRp5aWlbclqTwHDcwd7zQuNNfmqrtUp2o1Lf3u1dafrmTVJO272IlEzife1 azGq3udU5DpThE9ndMIhvPwOpjdgYsRF3QmHpXnDMgKC+KKxGv5y4iEVD/on3jH2 IAbLj+yhNjwqrvXSBl57kIrs7W5/Zi6LeZn2IpCDeW+jZFKvpSJqIusjRI5RlPW/ FGw0pemgb4TDn5eYyV94w575lFCIQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkeefgdeljecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefutghothht ucfnohhnghcuoehstghothhtlhesshgrmhhstghordhorhhgqeenucggtffrrghtthgvrh hnpeefjeeggfejhffgtdejveejkeegveeileeuheejgfduteevgfdttefggfeggfdvgeen ucfkphepkedrgeeirdekledrvddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehstghothhtlhesshgrmhhstghordhorhhg X-ME-Proxy: Received: from [192.168.0.114] (unknown [8.46.89.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 77B373064610; Sun, 25 Oct 2020 01:34:54 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar From: Scott Long In-Reply-To: <202010250346.09P3kTVH076745@gndrsh.dnsmgr.net> Date: Sat, 24 Oct 2020 23:34:53 -0600 Cc: Warner Losh , =?utf-8?Q?Stefan_E=C3=9Fer?= , src-committers , svn-src-all , svn-src-head Content-Transfer-Encoding: quoted-printable Message-Id: <2A59D27B-2CED-4FDF-8BE6-A21FD498F87A@samsco.org> References: <202010250346.09P3kTVH076745@gndrsh.dnsmgr.net> To: "Rodney W. Grimes" X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4CJmrH73PTz4b8F X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 05:34:56 -0000 > On Oct 24, 2020, at 9:46 PM, Rodney W. Grimes = wrote: >=20 >>>=20 >>> Something feels very wrong about this becoming a defined path in = base, >>> it is further dependence on /usr/local which in the early days we = spent >>> a great deal of time removing. >>>=20 >>> I believe the whole ports system allows this to be something other >>> than /usr/local. Package should also allow it to be some other = place. >>>=20 >>=20 >> This removes a couple of instances of /usr/local being hardcoded and >> replaces with a define, so net it's better. >=20 > No, its net worse as it now creates a define that is highly likely > to propogate adding additional dependencies on this value. >=20 You said a bunch of words, but I have no idea what you are trying to accomplish or what action can be taken. >>=20 >> It could be even better, but this is slightly better than it was = before. >=20 > I disagree, as it is now easier for additional contamination of > the base system. >=20 Disagreement without action is a waste of time. Stefan proposed this change several days ago to the arch mailing list, = and I view it as a good first step to the end goal of making the cal system = more flexible and less dependent on a data source that=E2=80=99s fixed in = place. It=E2=80=99ll likely evolve more over time, as software projects do. Simply arguing that you disagree with it or with the people involved doesn=E2=80=99t help this = process. Please consider ways to be more productive in your communication. As with = others recently, you are coming across as being obstructing as disagreeable. Scott From owner-svn-src-head@freebsd.org Sun Oct 25 05:56:36 2020 Return-Path: Delivered-To: svn-src-head@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 87DC6443ED1; Sun, 25 Oct 2020 05:56:36 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from ravenloft.kiev.ua (ravenloft.kiev.ua [94.244.131.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJnKH6FPxz4cfL; Sun, 25 Oct 2020 05:56:35 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Date: Sun, 25 Oct 2020 06:56:33 +0100 From: Alex Kozlov To: Stefan Esser Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar Message-ID: <20201025055633.GA52119@ravenloft.kiev.ua> References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> X-Rspamd-Queue-Id: 4CJnKH6FPxz4cfL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:34743, ipnet:94.244.128.0/18, country:UA] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 05:56:36 -0000 On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: > Am 24.10.20 um 09:48 schrieb Alex Kozlov: > > On Fri, Oct 23, 2020 at 09:22:23AM +0000, Stefan Eßer wrote: > > > Author: se > > > Date: Fri Oct 23 09:22:23 2020 > > > New Revision: 366962 > > > URL: https://svnweb.freebsd.org/changeset/base/366962 > > > > > > Log: > > > Add search of LOCALBASE/share/calendar for calendars supplied by a port. > > > Calendar files in LOCALBASE override similarily named ones in the base > > > system. This could easily be changed if the base system calendars should > > > have precedence, but it could lead to a violation of POLA since then the > > > port's files were ignored unless those in base have been deleted. > > > There was no definition of _PATH_LOCALBASE in paths.h, but verbatim uses > > > of /usr/local existed for _PATH_DEFPATH. Use _PATH_LOCALBASE here to ease > > > a consistent modification of this prefix. > > You are hardcoding assumption that LOCALBASE = /usr/local. Please make it > > overridable with LOCALBASE environment variable. > This was a trivial change to get us going with calendars provided by > a port (which has not been committed, yet - therefore there are no > port-provided calendars, neither under /usr/local nor under any other > PREFIX, as of now). > I understand what you are asking for, but in such a case I'd rather > think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in > paths.h. The PREFIX != LOCALBASE and both != /usr/local configurations are supported in the ports tree and the base for a long time, please see https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html If after this commit you need to rebuild base to use non-default LOCALBASE/PREFIX it is pretty big regression and POLA. > And I have made this a single instance that needs to be changed. > Before my change there were 2 instances of /usr/local hard-coded > in _PATH_DEFPATH - now you have to only change the definition of > _PATH_LOCALBASE to adjust all 3 locations that use it. I think you made situation worse, there were two stray hardcoded string and now there is official LOCALBASE define which likely will be used by other people in the future. > If you can show me precedence of a LOCALBASE environment variable > being used in the way you suggest, I'd be willing to make calendar > use it. Just an analogy from LOCALBASE make variable, perhaps CALENDAR_HOME is a better name. > But then I think a CALENDAR_HOME variable would be even more useful, > since it would allow to search an additional user selected directory > (and not just share/calendar within what you provide as LOCALBASE). > > Regards, STefan > > PS: If you are a source committer, you might even commit such a > change yourself. But I'd think it should be reviewed, and it > might be a good idea to wait until other changes (e.g. the > switch-over to port-supplied calendar files) have been worked > out. -- Alex From owner-svn-src-head@freebsd.org Sun Oct 25 10:08:46 2020 Return-Path: Delivered-To: svn-src-head@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 E8F24449A38; Sun, 25 Oct 2020 10:08:46 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJtwG5t71z3ZpM; Sun, 25 Oct 2020 10:08:46 +0000 (UTC) (envelope-from br@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 AD790278DE; Sun, 25 Oct 2020 10:08:46 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09PA8k82053490; Sun, 25 Oct 2020 10:08:46 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09PA8kpM053489; Sun, 25 Oct 2020 10:08:46 GMT (envelope-from br@FreeBSD.org) Message-Id: <202010251008.09PA8kpM053489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sun, 25 Oct 2020 10:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367037 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 367037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 10:08:47 -0000 Author: br Date: Sun Oct 25 10:08:46 2020 New Revision: 367037 URL: https://svnweb.freebsd.org/changeset/base/367037 Log: Add IOMMU support to GICv3 Interrupt Translation Service (ITS) driver. Submitted by: andrew Sponsored by: Innovate DSbD Differential Revision: https://reviews.freebsd.org/D26878 Modified: head/sys/arm64/arm64/gicv3_its.c Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Sun Oct 25 07:48:07 2020 (r367036) +++ head/sys/arm64/arm64/gicv3_its.c Sun Oct 25 10:08:46 2020 (r367037) @@ -32,6 +32,7 @@ #include "opt_acpi.h" #include "opt_platform.h" +#include "opt_iommu.h" #include __FBSDID("$FreeBSD$"); @@ -47,6 +48,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -56,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -72,6 +76,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef IOMMU +#include +#include +#endif + #include "pcib_if.h" #include "pic_if.h" #include "msi_if.h" @@ -269,6 +278,7 @@ struct gicv3_its_softc { #define ITS_FLAGS_ERRATA_CAVIUM_22375 0x00000004 u_int sc_its_flags; bool trace_enable; + vm_page_t ma; /* fake msi page */ }; static void *conf_base; @@ -321,6 +331,10 @@ static msi_release_msi_t gicv3_its_release_msi; static msi_alloc_msix_t gicv3_its_alloc_msix; static msi_release_msix_t gicv3_its_release_msix; static msi_map_msi_t gicv3_its_map_msi; +#ifdef IOMMU +static msi_iommu_init_t gicv3_iommu_init; +static msi_iommu_deinit_t gicv3_iommu_deinit; +#endif static void its_cmd_movi(device_t, struct gicv3_its_irqsrc *); static void its_cmd_mapc(device_t, struct its_col *, uint8_t); @@ -352,6 +366,10 @@ static device_method_t gicv3_its_methods[] = { DEVMETHOD(msi_alloc_msix, gicv3_its_alloc_msix), DEVMETHOD(msi_release_msix, gicv3_its_release_msix), DEVMETHOD(msi_map_msi, gicv3_its_map_msi), +#ifdef IOMMU + DEVMETHOD(msi_iommu_init, gicv3_iommu_init), + DEVMETHOD(msi_iommu_deinit, gicv3_iommu_deinit), +#endif /* End */ DEVMETHOD_END @@ -803,8 +821,9 @@ static int gicv3_its_attach(device_t dev) { struct gicv3_its_softc *sc; - uint32_t iidr; int domain, err, i, rid; + uint64_t phys; + uint32_t iidr; sc = device_get_softc(dev); @@ -820,6 +839,11 @@ gicv3_its_attach(device_t dev) return (ENXIO); } + phys = rounddown2(vtophys(rman_get_virtual(sc->sc_its_res)) + + GITS_TRANSLATER, PAGE_SIZE); + sc->ma = malloc(sizeof(struct vm_page), M_DEVBUF, M_WAITOK | M_ZERO); + vm_page_initfake(sc->ma, phys, VM_MEMATTR_DEFAULT); + iidr = gic_its_read_4(sc, GITS_IIDR); for (i = 0; i < nitems(its_quirks); i++) { if ((iidr & its_quirks[i].iidr_mask) == its_quirks[i].iidr) { @@ -1418,6 +1442,33 @@ gicv3_its_map_msi(device_t dev, device_t child, struct return (0); } + +#ifdef IOMMU +static int +gicv3_iommu_init(device_t dev, device_t child, struct iommu_domain **domain) +{ + struct gicv3_its_softc *sc; + struct iommu_ctx *ctx; + int error; + + sc = device_get_softc(dev); + ctx = iommu_get_dev_ctx(child); + error = iommu_map_msi(ctx, PAGE_SIZE, GITS_TRANSLATER, + IOMMU_MAP_ENTRY_WRITE, IOMMU_MF_CANWAIT, &sc->ma); + *domain = iommu_get_ctx_domain(ctx); + + return (error); +} + +static void +gicv3_iommu_deinit(device_t dev, device_t child) +{ + struct iommu_ctx *ctx; + + ctx = iommu_get_dev_ctx(child); + iommu_unmap_msi(ctx); +} +#endif /* * Commands handling. From owner-svn-src-head@freebsd.org Sun Oct 25 10:21:12 2020 Return-Path: Delivered-To: svn-src-head@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 BE770449CC9; Sun, 25 Oct 2020 10:21:12 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJvBc4Lrkz3bTx; Sun, 25 Oct 2020 10:21:12 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bbc0059aab49e04a56e55.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:bc00:59aa:b49e:4a5:6e55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id D507716DA6; Sun, 25 Oct 2020 10:21:11 +0000 (UTC) (envelope-from se@freebsd.org) To: rgrimes@freebsd.org, Warner Losh Cc: src-committers , svn-src-all , svn-src-head References: <202010250346.09P3kTVH076745@gndrsh.dnsmgr.net> From: Stefan Esser Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar Message-ID: Date: Sun, 25 Oct 2020 11:21:09 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <202010250346.09P3kTVH076745@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 10:21:12 -0000 Am 25.10.20 um 04:46 schrieb Rodney W. Grimes: >> On Sat, Oct 24, 2020 at 8:51 PM Rodney W. Grimes >> wrote: >>>> +#define _PATH_LOCALBASE "/usr/local" >>>> + >>> >>> Something feels very wrong about this becoming a defined path in base, >>> it is further dependence on /usr/local which in the early days we spent >>> a great deal of time removing. >>> >>> I believe the whole ports system allows this to be something other >>> than /usr/local. Package should also allow it to be some other place. >>> >> >> This removes a couple of instances of /usr/local being hardcoded and >> replaces with a define, so net it's better. > > No, its net worse as it now creates a define that is highly likely > to propogate adding additional dependencies on this value. > >> >> It could be even better, but this is slightly better than it was before. > > I disagree, as it is now easier for additional contamination of > the base system. There already are places that hard-code /usr/local, and I do agree that this is architecturally bad, if you want to keep the base system and ports as independent from each other as possible. But I do disagree that this was worse than before, and I'd even consider replacing other verbatim occurrences of /usr/local with _PATH_LOCALBASE in our sources (but not introduce new references to LOCALBASE in base). This would simplify a grep for such source files, for example, and also to build base for systems with modified LOCALBASE. The following C header files in base (ignoring contrib) contain the string /usr/local: crypto/openssh/pathnames.h sys/sys/imgact_binmisc.h sys/contrib/openzfs/include/sys/lua/luaconf.h (FreeBSD specific?) usr.bin/fortune/fortune/pathnames.h usr.bin/mail/pathnames.h usr.sbin/cron/cron/pathnames.h usr.sbin/pkg/config.h usr.sbin/pciconf/pathnames.h usr.sbin/pciconf-xo/pathnames.h These are C source files that include that string: crypto/openssh/ssh-agent.c crypto/openssh/regress/unittests/sshkey/test_sshkey.c lib/libfetch/common.c lib/libc/rpc/getnetconfig.c lib/libc/nls/msgcat.c sbin/nvmecontrol/nvmecontrol.c sys/contrib/openzfs/cmd/zpool/zpool_main.c (FreeBSD specific?) tools/tools/ath/athprom/athprom.c tools/tools/net80211/wesside/wesside/wesside.c usr.bin/env/envopts.c usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c usr.sbin/mailwrapper/mailwrapper.c usr.sbin/cpucontrol/cpucontrol.c I intend to prepare a review top make them use _PATH_LOCALBASE instead. (There might be sources under contrib that have no external up-stream anymore, but I have not made an attempt to identify them, yet.) There are 67 man-pages (excluding contrib) that mention /usr/local and they will not be covered by this C macro definition. There are further references to /usr/local, e.g. in 32 shell scripts (outside contrib). The next step could be to use the LOCALBASE variable that is defined in Makefile.inc1 to provide the value used to define _PATH_LOCALBASE in paths.h. This make variable is currently not used in bsd.prog.mk, but it easily could, allowing to override the value used to build the world in make.conf. But I'd suggest to go step by step, and the first step that I suggest (and am willing to work on) is to remove as many literal uses of /usr/local in C sources in base (excluding contrib) as reasonable. Maybe we should have some documentation about building the world for systems with non-default LOCALBASE ... Regards, STefan From owner-svn-src-head@freebsd.org Sun Oct 25 10:37:36 2020 Return-Path: Delivered-To: svn-src-head@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 D471C44A23D; Sun, 25 Oct 2020 10:37:36 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJvYX5GsVz3cLC; Sun, 25 Oct 2020 10:37:36 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bbc0059aab49e04a56e55.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:bc00:59aa:b49e:4a5:6e55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id F2E0316DC1; Sun, 25 Oct 2020 10:37:35 +0000 (UTC) (envelope-from se@freebsd.org) To: Alex Kozlov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> From: Stefan Esser Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar Message-ID: <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> Date: Sun, 25 Oct 2020 11:37:34 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201025055633.GA52119@ravenloft.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AVq6Y3FhRFfERgTIIvgPiLvlYtQ9Ux2s5" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 10:37:36 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --AVq6Y3FhRFfERgTIIvgPiLvlYtQ9Ux2s5 Content-Type: multipart/mixed; boundary="UfrnLSODcnXHuygiZHS6VURrsK1cX05b1"; protected-headers="v1" From: Stefan Esser To: Alex Kozlov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> In-Reply-To: <20201025055633.GA52119@ravenloft.kiev.ua> --UfrnLSODcnXHuygiZHS6VURrsK1cX05b1 Content-Type: multipart/mixed; boundary="------------E18240DD971BDE2CE4657450" Content-Language: en-US This is a multi-part message in MIME format. --------------E18240DD971BDE2CE4657450 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Am 25.10.20 um 06:56 schrieb Alex Kozlov: > On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: >> Am 24.10.20 um 09:48 schrieb Alex Kozlov: [...] >>> You are hardcoding assumption that LOCALBASE =3D /usr/local. Please m= ake it >>> overridable with LOCALBASE environment variable. >> This was a trivial change to get us going with calendars provided by >> a port (which has not been committed, yet - therefore there are no >> port-provided calendars, neither under /usr/local nor under any other >> PREFIX, as of now). >=20 >> I understand what you are asking for, but in such a case I'd rather >> think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in >> paths.h. > The PREFIX !=3D LOCALBASE and both !=3D /usr/local configurations > are supported in the ports tree and the base for a long time, please se= e > https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/port= ing-prefix.html Yes, and I do not need to look that up in the handbook, having been a ports committer for 2 decades by now. > If after this commit you need to rebuild base to use non-default LOCALB= ASE/PREFIX > it is pretty big regression and POLA. How is that any different than before? What I did is make the PATH easier to change when you rebuild base. There are numerous programs in base that contain the literal string /usr/local - and what I did was implement a mechanism that allows to replace this literal reference with a simple change in paths.h. If you do not modify paths.h for a different LOCALBASE, then you'll get a wrong _PATH_DEFPATH compiled into your binaries, for example. >> And I have made this a single instance that needs to be changed. >> Before my change there were 2 instances of /usr/local hard-coded >> in _PATH_DEFPATH - now you have to only change the definition of >> _PATH_LOCALBASE to adjust all 3 locations that use it. > I think you made situation worse, there were two stray hardcoded > string and now there is official LOCALBASE define which likely will be > used by other people in the future. I'd hope so to get rid of many of the 1713 literal uses of /usr/local in our source tree. >> If you can show me precedence of a LOCALBASE environment variable >> being used in the way you suggest, I'd be willing to make calendar >> use it. > Just an analogy from LOCALBASE make variable, perhaps CALENDAR_HOME > is a better name. Yes, I already suggested CALENDAR_HOME, but as an environment variable to check, if you want to be able to path an additional directory (or search path) to the calendar program at run-time. But why introduce a CALENDAR_HOME macro in the sources, if the port supplied calendar files are known to be found at LOCALBASE/share/calendar (for some value of LOCALBASE). I want to make more programs that currently hard-code /usr/local use _PATH_LOCALBASE instead. This C macro can then be default to /usr/local but can be overridden by passing LOCALBASE to the compiler (from the build infrastructure) when paths.h is included. Instead of referring to _PATH_LOCALBASE these files could directly use LOCALBASE, but since other paths are defined as _PATH_xxx in paths.h I think it is best to follow this precedent. >> But then I think a CALENDAR_HOME variable would be even more useful, >> since it would allow to search an additional user selected directory >> (and not just share/calendar within what you provide as LOCALBASE). My change did not add any dependency on LOCALBASE to any previously existing functionality. It added support for calendar files provided by a port (a feature that did not exist before) at a location that is correct for the big majority of users (who do not modify LOCALBASE). As I said: I'm going to make it easier to build the base system with a different LOCALBASE, but not by run-time checking an environment variable that specifies LOCALBASE in each affected program. Regards, STefan --------------E18240DD971BDE2CE4657450-- --UfrnLSODcnXHuygiZHS6VURrsK1cX05b1-- --AVq6Y3FhRFfERgTIIvgPiLvlYtQ9Ux2s5 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAl+VVW4FAwAAAAAACgkQR+u171r99UTR 5Qf/Us11bvBxit6FIRJQp4qXGwCWp2YvHNO1KS17kq8+VAc3dmTmj+YCsWzJhpOOo2kAnu3PMrC2 HaegiSN29sMFU3cHbOMJzN1CtwpA5880H6TZLJgHV5um2Qiajw6xxhJO0v02Rfnb/MJ3Au0PW7Ul cHywJWSppV/hr8MS7nq5qdirmnPIQclbu8jAZHx5hJlBURCPEGymti1unlSUqzN7Bnv+Vu/ZIKEb sMis8vQVH5JDJVQAoB5UhQDkEUmMh9egscK6fHzjbmKxBAEHMQLI7tabCxLHLuXKHTrizGLiBsNp taNuzrjiQtqEsCJmHGGN1zKGxt4pdxFOxVSatzcH/Q== =wD60 -----END PGP SIGNATURE----- --AVq6Y3FhRFfERgTIIvgPiLvlYtQ9Ux2s5-- From owner-svn-src-head@freebsd.org Sun Oct 25 14:09:01 2020 Return-Path: Delivered-To: svn-src-head@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 7E0B344FE16; Sun, 25 Oct 2020 14:09:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK0FT2lMlz45Hs; Sun, 25 Oct 2020 14:09:01 +0000 (UTC) (envelope-from trasz@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 41A77ADE1; Sun, 25 Oct 2020 14:09:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09PE91X5001782; Sun, 25 Oct 2020 14:09:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09PE91aS001781; Sun, 25 Oct 2020 14:09:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010251409.09PE91aS001781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 25 Oct 2020 14:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367038 - head/sbin/mount_nullfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sbin/mount_nullfs X-SVN-Commit-Revision: 367038 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 14:09:01 -0000 Author: trasz Date: Sun Oct 25 14:09:00 2020 New Revision: 367038 URL: https://svnweb.freebsd.org/changeset/base/367038 Log: Remove the check that prevents creating "loops" from mount_nullfs(8). Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26921 Modified: head/sbin/mount_nullfs/mount_nullfs.c Modified: head/sbin/mount_nullfs/mount_nullfs.c ============================================================================== --- head/sbin/mount_nullfs/mount_nullfs.c Sun Oct 25 10:08:46 2020 (r367037) +++ head/sbin/mount_nullfs/mount_nullfs.c Sun Oct 25 14:09:00 2020 (r367038) @@ -59,7 +59,6 @@ static const char rcsid[] = #include "mntopts.h" -int subdir(const char *, const char *); static void usage(void) __dead2; int @@ -104,10 +103,6 @@ main(int argc, char *argv[]) if (checkpath(argv[1], source) != 0) err(EX_USAGE, "%s", source); - if (subdir(target, source) || subdir(source, target)) - errx(EX_USAGE, "%s (%s) and %s are not distinct paths", - argv[0], target, argv[1]); - build_iovec(&iov, &iovlen, "fstype", nullfs, (size_t)-1); build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1); build_iovec(&iov, &iovlen, "target", target, (size_t)-1); @@ -119,21 +114,6 @@ main(int argc, char *argv[]) err(1, "%s", source); } exit(0); -} - -int -subdir(const char *p, const char *dir) -{ - int l; - - l = strlen(dir); - if (l <= 1) - return (1); - - if ((strncmp(p, dir, l) == 0) && (p[l] == '/' || p[l] == '\0')) - return (1); - - return (0); } static void From owner-svn-src-head@freebsd.org Sun Oct 25 14:11:33 2020 Return-Path: Delivered-To: svn-src-head@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 B583744FEB0; Sun, 25 Oct 2020 14:11:33 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK0JP2pn4z45Zg; Sun, 25 Oct 2020 14:11:33 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by mail-yb1-xb2e.google.com with SMTP id n142so5454382ybf.7; Sun, 25 Oct 2020 07:11:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=f9LoMoW0jWgfOzUlGTZoJTVjPI2b5QOWd2iYbLDxhjE=; b=q9ExK2vOYQ11unHYvmLiYy81YV0EFLG/89L/tGLUJFJDsSuqtNnPW55mm3MdURH8zV iT2vANiWpmDVu1PGnipwlA3z/pBW4FzFrlgrvIlSxLwih4ccZ7ynNjgFX4hE80Cg/UMl 89HHWVnzt0u9/jtZZVWCro9NFwUaA1GoZv442RmKkQc1LPe0Weha+hZRt6B7ninyBVHO zUuLbQqnYSAvdKAQcGscD5Cw12b4kyoecCAKCsPKVtya+iC5UIjLvC9DG7L9ThXHn35j k4BStEyqLYvwdLVlzo5a1ytdJ2/F6VhoHkVFBJaPBhGPRCAzWD8D/jDmMCWOnsVGnuEm fWZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=f9LoMoW0jWgfOzUlGTZoJTVjPI2b5QOWd2iYbLDxhjE=; b=iVAjj9s4kdRxI2w2p8mM1TjlvwwvYw+LtHh3jbaSHdN8kYNy7R26peSfzkpW1UWqG+ ZB4njsJDi6SXzqCAkCgNgkDSwgbfz6ES+NgCePb5el9NVtft1X/cR1uhaQyRj6rARdRp G19JrmYb6IuOIMD/WwcNkt9qji2QmYmIMSYcAkOwEp+EWrPd+mAbdE6XHn0R/yLJnlsr DPYenEMk9kdWky3wNAexoRApPXXM0IT+feqMveHayIE2gvM6BmktKOx+0Lt7Ku2/bXpn dlytUiSuVAg6oInfn73OcpKtQvaWS4FvUgW6GH/4Wes0MMa46PWN3D4YIN+3N+d8J8jx ryIQ== X-Gm-Message-State: AOAM530isIb5He/CPIDIaN8Wm02tBgUf0JEGX0wXZah7R976cjizFlt7 YmvJHiUBgxJJiYop8W7U0+PvE/OtH6bJbyO9ElNqoHiC X-Google-Smtp-Source: ABdhPJyB4aMV0Ux6MvmtSzB8VQw2BvAkDpwyLBQc3pJKQ3UBxn4oPHMDOASLu4c2rujnd/oLptk6YiK0ZGSFgJUFDjk= X-Received: by 2002:a25:d481:: with SMTP id m123mr14121764ybf.142.1603635091904; Sun, 25 Oct 2020 07:11:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:d8d2:0:0:0:0:0 with HTTP; Sun, 25 Oct 2020 07:11:31 -0700 (PDT) In-Reply-To: <202010251409.09PE91aS001781@repo.freebsd.org> References: <202010251409.09PE91aS001781@repo.freebsd.org> From: Oliver Pinter Date: Sun, 25 Oct 2020 15:11:31 +0100 Message-ID: Subject: Re: svn commit: r367038 - head/sbin/mount_nullfs To: Edward Tomasz Napierala Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 4CK0JP2pn4z45Zg X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 14:11:33 -0000 On Sunday, October 25, 2020, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sun Oct 25 14:09:00 2020 > New Revision: 367038 > URL: https://svnweb.freebsd.org/changeset/base/367038 > > Log: > Remove the check that prevents creating "loops" from mount_nullfs(8). > > The simple question is: why? > Reviewed by: kib > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D26921 > > Modified: > head/sbin/mount_nullfs/mount_nullfs.c > > Modified: head/sbin/mount_nullfs/mount_nullfs.c > ============================================================ > ================== > --- head/sbin/mount_nullfs/mount_nullfs.c Sun Oct 25 10:08:46 2020 > (r367037) > +++ head/sbin/mount_nullfs/mount_nullfs.c Sun Oct 25 14:09:00 2020 > (r367038) > @@ -59,7 +59,6 @@ static const char rcsid[] = > > #include "mntopts.h" > > -int subdir(const char *, const char *); > static void usage(void) __dead2; > > int > @@ -104,10 +103,6 @@ main(int argc, char *argv[]) > if (checkpath(argv[1], source) != 0) > err(EX_USAGE, "%s", source); > > - if (subdir(target, source) || subdir(source, target)) > - errx(EX_USAGE, "%s (%s) and %s are not distinct paths", > - argv[0], target, argv[1]); > - > build_iovec(&iov, &iovlen, "fstype", nullfs, (size_t)-1); > build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1); > build_iovec(&iov, &iovlen, "target", target, (size_t)-1); > @@ -119,21 +114,6 @@ main(int argc, char *argv[]) > err(1, "%s", source); > } > exit(0); > -} > - > -int > -subdir(const char *p, const char *dir) > -{ > - int l; > - > - l = strlen(dir); > - if (l <= 1) > - return (1); > - > - if ((strncmp(p, dir, l) == 0) && (p[l] == '/' || p[l] == '\0')) > - return (1); > - > - return (0); > } > > static void > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Sun Oct 25 14:17:11 2020 Return-Path: Delivered-To: svn-src-head@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 89DA644FE65; Sun, 25 Oct 2020 14:17:11 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK0Qt1JZbz45vv; Sun, 25 Oct 2020 14:17:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id WgpWklX7atdldWgpXkUX9L; Sun, 25 Oct 2020 08:17:08 -0600 X-Authority-Analysis: v=2.4 cv=INe8tijG c=1 sm=1 tr=0 ts=5f9588e4 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=afefHYAZSVUA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=KDw0VAEF7AsptIK-wfIA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 668A8162; Sun, 25 Oct 2020 07:17:06 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 09PEH6tE003403; Sun, 25 Oct 2020 07:17:06 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202010251417.09PEH6tE003403@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Oliver Pinter cc: Edward Tomasz Napierala , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r367038 - head/sbin/mount_nullfs In-reply-to: References: <202010251409.09PE91aS001781@repo.freebsd.org> Comments: In-reply-to Oliver Pinter message dated "Sun, 25 Oct 2020 15:11:31 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 25 Oct 2020 07:17:06 -0700 X-CMAE-Envelope: MS4xfA3iAK0BpFoCjY6JwuU/M1/hVsFzKtCKSJig9HC1IzTR/e8EMhLmtVAzxgiVPESVl4R/LzVrGO94XP7HPCQC/7hJJkomhjxu0ouRgFsX83n8mJ4vEFJY VNn5wAuru5xdQwRs1brFpbgpKlr2ET0Zo8LO4r39NxAnnTxUMkbpIgpAFT7PwbZSVXUST4yHpXvH3vBo4vUJOl26VCoblhhf7yCmxWpjfuaz4Mof05/ZPpZF PAH2mtnGH5zpjOWniIQ9uuw9/na9JkAhdM3i1jN+AYz9JyOeJXxeD2AtOBWyVyI2WgKtsxPksGGL48JoybseRbzH0Juztg32VFKAb8j8kaM5SAeTR/unBd4k P1J8sRV0 X-Rspamd-Queue-Id: 4CK0Qt1JZbz45vv X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.9) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-0.84 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RWL_MAILSPIKE_GOOD(0.00)[64.59.134.9:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-0.71)[-0.712]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.229.168:received]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.134.9:from]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.955]; NEURAL_HAM_LONG(-0.47)[-0.474]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 14:17:11 -0000 In message , Oliver Pinter writes: > On Sunday, October 25, 2020, Edward Tomasz Napierala > wrote: > > > Author: trasz > > Date: Sun Oct 25 14:09:00 2020 > > New Revision: 367038 > > URL: https://svnweb.freebsd.org/changeset/base/367038 > > > > Log: > > Remove the check that prevents creating "loops" from mount_nullfs(8). > > > > > The simple question is: why? I was about to ask that myself. The why is usually more important than the how. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sun Oct 25 15:01:02 2020 Return-Path: Delivered-To: svn-src-head@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 89CA2450C68; Sun, 25 Oct 2020 15:01:02 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK1PV383Gz47jT; Sun, 25 Oct 2020 15:01:02 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FA79B2F3; Sun, 25 Oct 2020 15:01:02 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09PF12QQ032765; Sun, 25 Oct 2020 15:01:02 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09PF12Je032764; Sun, 25 Oct 2020 15:01:02 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202010251501.09PF12Je032764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sun, 25 Oct 2020 15:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367039 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 367039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 15:01:02 -0000 Author: 0mp (doc,ports committer) Date: Sun Oct 25 15:01:01 2020 New Revision: 367039 URL: https://svnweb.freebsd.org/changeset/base/367039 Log: ifconfig.8: Remove spurious commas Correct misuse of commas/parentheses in an enumeration that makes the number of actual parameters more important than expected. PR: 250526 Submitted by: Samy Mahmoudi MFC after: 1 week Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Sun Oct 25 14:09:00 2020 (r367038) +++ head/sbin/ifconfig/ifconfig.8 Sun Oct 25 15:01:01 2020 (r367039) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd October 21, 2020 +.Dd October 25, 2020 .Dt IFCONFIG 8 .Os .Sh NAME @@ -884,10 +884,10 @@ is one of .Cm ahdemo (or .Cm adhoc-demo ) , -.Cm ibss , +.Cm ibss (or .Cm adhoc ) , -.Cm ap , +.Cm ap (or .Cm hostap ) , .Cm wds , From owner-svn-src-head@freebsd.org Sun Oct 25 15:04:07 2020 Return-Path: Delivered-To: svn-src-head@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 1FFAE451221; Sun, 25 Oct 2020 15:04:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK1T307Tcz48vX; Sun, 25 Oct 2020 15:04:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id D73EE195EA; Sun, 25 Oct 2020 15:04:06 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f180.google.com with SMTP id z6so6101505qkz.4; Sun, 25 Oct 2020 08:04:06 -0700 (PDT) X-Gm-Message-State: AOAM5310XHqItSeyd8v/aID4pyhfOU+CHe6V2XW9yw99V18g6EzY4LOL C5gWLc6UYkQCm17RvHEQbclmw3u4zqohwhXZnLc= X-Google-Smtp-Source: ABdhPJxlizOhqcYl9Fc7I/uvurhmhuqaZIjcsQ0yaTQlCTeU/tB6G18x/MT7cT5gGMi13HPOegCCER79rda3AzMZ7GM= X-Received: by 2002:a05:620a:ced:: with SMTP id c13mr13057165qkj.120.1603638246470; Sun, 25 Oct 2020 08:04:06 -0700 (PDT) MIME-Version: 1.0 References: <202010250346.09P3kTVH076745@gndrsh.dnsmgr.net> In-Reply-To: From: Kyle Evans Date: Sun, 25 Oct 2020 10:03:55 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar To: Stefan Esser Cc: "Rodney W. Grimes" , Warner Losh , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 15:04:07 -0000 On Sun, Oct 25, 2020 at 5:21 AM Stefan Esser wrote: > > Am 25.10.20 um 04:46 schrieb Rodney W. Grimes: > >> On Sat, Oct 24, 2020 at 8:51 PM Rodney W. Grimes > >> wrote: > >>>> +#define _PATH_LOCALBASE "/usr/local" > >>>> + > >>> > >>> Something feels very wrong about this becoming a defined path in base, > >>> it is further dependence on /usr/local which in the early days we spent > >>> a great deal of time removing. > >>> > >>> I believe the whole ports system allows this to be something other > >>> than /usr/local. Package should also allow it to be some other place. > >>> > >> > >> This removes a couple of instances of /usr/local being hardcoded and > >> replaces with a define, so net it's better. > > > > No, its net worse as it now creates a define that is highly likely > > to propogate adding additional dependencies on this value. > > > >> > >> It could be even better, but this is slightly better than it was before. > > > > I disagree, as it is now easier for additional contamination of > > the base system. > > There already are places that hard-code /usr/local, and I do agree > that this is architecturally bad, if you want to keep the base system > and ports as independent from each other as possible. > > But I do disagree that this was worse than before, and I'd even consider > replacing other verbatim occurrences of /usr/local with _PATH_LOCALBASE > in our sources (but not introduce new references to LOCALBASE in base). > > This would simplify a grep for such source files, for example, and also > to build base for systems with modified LOCALBASE. > > The following C header files in base (ignoring contrib) contain the > string /usr/local: > > ... > sys/contrib/openzfs/include/sys/lua/luaconf.h (FreeBSD specific?) > ... I see that you've excluded sys/contrib from the initial review, but I would not bother with luaconf.h in particular. These definitions just come from a stock Lua 5.2 and are not used in a ZFS context, they've ripped out loadlib and anything else that could try. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Sun Oct 25 16:01:04 2020 Return-Path: Delivered-To: svn-src-head@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 57EA2452398; Sun, 25 Oct 2020 16:01:04 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK2km1fRFz4FPR; Sun, 25 Oct 2020 16:01:04 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C0C4C07C; Sun, 25 Oct 2020 16:01:04 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09PG13RC071160; Sun, 25 Oct 2020 16:01:03 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09PG13PN071159; Sun, 25 Oct 2020 16:01:03 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202010251601.09PG13PN071159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sun, 25 Oct 2020 16:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367040 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 16:01:04 -0000 Author: 0mp (doc,ports committer) Date: Sun Oct 25 16:01:03 2020 New Revision: 367040 URL: https://svnweb.freebsd.org/changeset/base/367040 Log: calendar.1: Fix locale of the month in Dd ;) Modified: head/usr.bin/calendar/calendar.1 Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Sun Oct 25 15:01:01 2020 (r367039) +++ head/usr.bin/calendar/calendar.1 Sun Oct 25 16:01:03 2020 (r367040) @@ -28,7 +28,7 @@ .\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 .\" $FreeBSD$ .\" -.Dd Oktober 23, 2020 +.Dd October 23, 2020 .Dt CALENDAR 1 .Os .Sh NAME From owner-svn-src-head@freebsd.org Sun Oct 25 16:55:22 2020 Return-Path: Delivered-To: svn-src-head@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 F2B22452DEB for ; Sun, 25 Oct 2020 16:55:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK3xQ1Tjvz4HWh for ; Sun, 25 Oct 2020 16:55:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72a.google.com with SMTP id z6so6253732qkz.4 for ; Sun, 25 Oct 2020 09:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mTCfmNXXkaH4nufEdBISvI8aVyplNVjyzinFIMi6Mdg=; b=EhYX2GkLR9aVRMQ8qLYkQAvtDBpuGINeGMcT7z5ipDzkAa6h90pNNyZFpjFy2P78fi zbUVHNkRnyxwHERUVoddeeGC9tYNxpBc3SRFJVZ6SCrUp+CSHqnBPy60r5bxh6Z+oiQQ bC/OK7tkYiE1IMBN2GyUxVdSrs0C5ro5tynyh9lGv2IGuOlvfx0tekABp98R9PFrn+dM zu9wEwjvsuanTefxxXxyG3jL5xPxcI8OOgzHBQBYH7/C3gt8cLqWNRS6LGkYE5MP6Su6 1oTyeJdmRKxNXXEj52nOwMpSU/K+rA+P+4gr78H3Me8D1ocu2wvDmutwIoBDnOInJIgd 7brQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mTCfmNXXkaH4nufEdBISvI8aVyplNVjyzinFIMi6Mdg=; b=pqOK4d84VY7PEu3muSlVfmrylyZrNsaMVpFsAxRmT3Gwb7pfqm9juzzou9kFioqf+d G3hZoD6G9nRJ0WuafJN/Y9f8QdoZpFvYddDyjEI105YAgiX8baDqBj2zC34sz3Oe5z9M wiqu/rLMQQ9t070JgTiauI2v45oBCYaztHeK7F46mdtvbDWPWzwZn6amb3IaA1J0SXqh OuCg/FCbAC7+b11vus5dBTtg1Q1MALsVLdhcONJwMSiw5HAe2kzr6/bLMT9oAY9yPOaL CvVYezrEGqj8cyEuPeN4ywEX2xDRSsI/lf7y+0oMMOpN9Y/9aw1NGxkL1WWdCqdKkR7r 3lBA== X-Gm-Message-State: AOAM530MJ/glKFvgUdPn5ytOLSOp0UrERF1XSN7ZL2qNr/f7YSUGIpw7 BN0jK8MZxch++kaE51ZoqeP3OTUp48fZrVYombbBRw== X-Google-Smtp-Source: ABdhPJwvd8Ek5CrXkBcC2S07G0PaMWpqUBkoyWY2ZSi18GZoA69f6m/8ah3qbqBQDKK/2vN3SUDVCcZTmc3XHA4CoFk= X-Received: by 2002:a37:5ca:: with SMTP id 193mr12584417qkf.44.1603644920870; Sun, 25 Oct 2020 09:55:20 -0700 (PDT) MIME-Version: 1.0 References: <202010250346.09P3kTVH076745@gndrsh.dnsmgr.net> In-Reply-To: From: Warner Losh Date: Sun, 25 Oct 2020 10:55:08 -0600 Message-ID: Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar To: Kyle Evans Cc: Stefan Esser , "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4CK3xQ1Tjvz4HWh X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=EhYX2GkL; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72a) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.56 / 15.00]; ARC_NA(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.92)[-0.919]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.64)[-0.640]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72a:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 16:55:23 -0000 On Sun, Oct 25, 2020, 9:04 AM Kyle Evans wrote: > On Sun, Oct 25, 2020 at 5:21 AM Stefan Esser wrote: > > > > Am 25.10.20 um 04:46 schrieb Rodney W. Grimes: > > >> On Sat, Oct 24, 2020 at 8:51 PM Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > >> wrote: > > >>>> +#define _PATH_LOCALBASE "/usr/local" > > >>>> + > > >>> > > >>> Something feels very wrong about this becoming a defined path in > base, > > >>> it is further dependence on /usr/local which in the early days we > spent > > >>> a great deal of time removing. > > >>> > > >>> I believe the whole ports system allows this to be something other > > >>> than /usr/local. Package should also allow it to be some other > place. > > >>> > > >> > > >> This removes a couple of instances of /usr/local being hardcoded and > > >> replaces with a define, so net it's better. > > > > > > No, its net worse as it now creates a define that is highly likely > > > to propogate adding additional dependencies on this value. > > > > > >> > > >> It could be even better, but this is slightly better than it was > before. > > > > > > I disagree, as it is now easier for additional contamination of > > > the base system. > > > > There already are places that hard-code /usr/local, and I do agree > > that this is architecturally bad, if you want to keep the base system > > and ports as independent from each other as possible. > > > > But I do disagree that this was worse than before, and I'd even consider > > replacing other verbatim occurrences of /usr/local with _PATH_LOCALBASE > > in our sources (but not introduce new references to LOCALBASE in base). > > > > This would simplify a grep for such source files, for example, and also > > to build base for systems with modified LOCALBASE. > > > > The following C header files in base (ignoring contrib) contain the > > string /usr/local: > > > > ... > > sys/contrib/openzfs/include/sys/lua/luaconf.h (FreeBSD specific?) > > ... > > I see that you've excluded sys/contrib from the initial review, but I > would not bother with luaconf.h in particular. These definitions just > come from a stock Lua 5.2 and are not used in a ZFS context, they've > ripped out loadlib and anything else that could try. > As an aside: I looked at using this Lua for the boot loader, but quickly found that it was no good for that purpose due to changes like that. And it was too far hacked from 5.2 to try to update easily... Warner Thanks, > > Kyle Evans > From owner-svn-src-head@freebsd.org Sun Oct 25 16:58:48 2020 Return-Path: Delivered-To: svn-src-head@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 E5CD0453348; Sun, 25 Oct 2020 16:58:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK41N57J9z4HgS; Sun, 25 Oct 2020 16:58:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93435CF02; Sun, 25 Oct 2020 16:58:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09PGwm8j006579; Sun, 25 Oct 2020 16:58:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09PGwmNb006578; Sun, 25 Oct 2020 16:58:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202010251658.09PGwmNb006578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 25 Oct 2020 16:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367041 - head/sys/dev/ocs_fc X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ocs_fc X-SVN-Commit-Revision: 367041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 16:58:49 -0000 Author: mav Date: Sun Oct 25 16:58:48 2020 New Revision: 367041 URL: https://svnweb.freebsd.org/changeset/base/367041 Log: Fix incorrect constants of target tag action. ocs_scsi_recv_cmd() receives the flags after ocs_get_flags_fcp_cmd(), which translates them from FCP_TASK_ATTR_* to OCS_SCSI_CMD_*. As result non-SIMPLE requests turned into HEAD or ORDERED depending on direction. MFC after: 2 weeks Modified: head/sys/dev/ocs_fc/ocs_cam.c Modified: head/sys/dev/ocs_fc/ocs_cam.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_cam.c Sun Oct 25 16:01:03 2020 (r367040) +++ head/sys/dev/ocs_fc/ocs_cam.c Sun Oct 25 16:58:48 2020 (r367041) @@ -576,9 +576,9 @@ int32_t ocs_scsi_recv_cmd(ocs_io_t *io, uint64_t lun, if (flags & OCS_SCSI_CMD_SIMPLE) atio->tag_action = MSG_SIMPLE_Q_TAG; - else if (flags & FCP_TASK_ATTR_HEAD_OF_QUEUE) + else if (flags & OCS_SCSI_CMD_HEAD_OF_QUEUE) atio->tag_action = MSG_HEAD_OF_Q_TAG; - else if (flags & FCP_TASK_ATTR_ORDERED) + else if (flags & OCS_SCSI_CMD_ORDERED) atio->tag_action = MSG_ORDERED_Q_TAG; else atio->tag_action = 0; From owner-svn-src-head@freebsd.org Sun Oct 25 18:06:45 2020 Return-Path: Delivered-To: svn-src-head@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 F23D4454E4A; Sun, 25 Oct 2020 18:06:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK5Wn5q3yz4MJr; Sun, 25 Oct 2020 18:06:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABFB7D9AB; Sun, 25 Oct 2020 18:06:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09PI6jOH049727; Sun, 25 Oct 2020 18:06:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09PI6jUE049726; Sun, 25 Oct 2020 18:06:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202010251806.09PI6jUE049726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 25 Oct 2020 18:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367042 - head/usr.sbin/mergemaster X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/mergemaster X-SVN-Commit-Revision: 367042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 18:06:46 -0000 Author: emaste Date: Sun Oct 25 18:06:45 2020 New Revision: 367042 URL: https://svnweb.freebsd.org/changeset/base/367042 Log: mergemaster: Clarify installed and updated versions Describe "diff installed new" as "Displaying differences between installed and new." Previously mergemaster described them in the opposite order. PR: 249214 Reported by: Yuri Victorovich MFC after: 2 weeks Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Sun Oct 25 16:58:48 2020 (r367041) +++ head/usr.sbin/mergemaster/mergemaster.sh Sun Oct 25 18:06:45 2020 (r367042) @@ -143,7 +143,7 @@ diff_loop () { echo ' ====================================================================== ' echo '' ( - echo " *** Displaying differences between ${COMPFILE} and installed version:" + echo " *** Displaying differences between installed version and ${COMPFILE}:" echo '' diff ${DIFF_FLAG} ${DIFF_OPTIONS} "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" ) | ${PAGER} From owner-svn-src-head@freebsd.org Sun Oct 25 18:14:24 2020 Return-Path: Delivered-To: svn-src-head@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 D40E6454F76; Sun, 25 Oct 2020 18:14:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK5hc5Hh8z4Md7; Sun, 25 Oct 2020 18:14:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.2] (unknown [181.52.72.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id 163631AA68; Sun, 25 Oct 2020 18:14:23 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r366993 - head/sys/net To: Ed Maste , Warner Losh Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <202010241023.09OANMcL075640@repo.freebsd.org> <20201024125206.GB38000@FreeBSD.org> <999a005e-1ef8-3c45-fb07-94a3b6ebce1b@selasky.org> <317231603546378@mail.yandex.ru> From: Pedro Giffuni Organization: FreeBSD Message-ID: <7d769528-9c00-7096-11f3-4bcd751dcb05@FreeBSD.org> Date: Sun, 25 Oct 2020 13:14:22 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 18:14:24 -0000 On 10/24/20 8:19 PM, Ed Maste wrote: > On Sat, 24 Oct 2020 at 11:27, Warner Losh wrote: >>> Given we already have nice .clang-format, that does most of the job, maybe it's worth considering looking into tweaking it further to fix this part? >>> It would be nice if we could finally offload all formatting issues to the tool and focus on the actual code :-) >> It would be nice if it produced one of the style(9) acceptable formats without disrupting things already acceptable. That's been the big problem with the tweaks to date... some things are fixed, others break. It's getting a lot closer, though > Upstream clang-format comes with a script that can integrate with git, > adding a `git clang-format` command. It will apply formatting to > modified lines, leaving unchanged ones alone. I doubt any script can match style(9) perfectly. indent(1) with bde's flags came near in some edge cases but generally did a horrible job. Also, out style(9) is not mandatory for userland. Pedro. From owner-svn-src-head@freebsd.org Sun Oct 25 18:27:21 2020 Return-Path: Delivered-To: svn-src-head@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 EA33A455478; Sun, 25 Oct 2020 18:27:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK5zY5v5bz4NM9; Sun, 25 Oct 2020 18:27:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD8EDDB6D; Sun, 25 Oct 2020 18:27:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09PIRL0C062186; Sun, 25 Oct 2020 18:27:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09PIRL2T062185; Sun, 25 Oct 2020 18:27:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202010251827.09PIRL2T062185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 25 Oct 2020 18:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367043 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 367043 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 18:27:22 -0000 Author: emaste Date: Sun Oct 25 18:27:21 2020 New Revision: 367043 URL: https://svnweb.freebsd.org/changeset/base/367043 Log: rc.d/syscons: remove spaces before tab Modified: head/libexec/rc/rc.d/syscons Modified: head/libexec/rc/rc.d/syscons ============================================================================== --- head/libexec/rc/rc.d/syscons Sun Oct 25 18:06:45 2020 (r367042) +++ head/libexec/rc/rc.d/syscons Sun Oct 25 18:27:21 2020 (r367043) @@ -151,7 +151,7 @@ kbdcontrol_load_keymap() if [ -n "${keymap_vt}" ]; then errmsg=`kbdcontrol < ${kbddev} -l ${keymap_vt} 2>&1` if [ -z "${errmsg}" ]; then - _sc_keymap_msg="New keymap: In /etc/rc.conf replace 'keymap=${keymap}' by 'keymap=${keymap_vt}'" + _sc_keymap_msg="New keymap: In /etc/rc.conf replace 'keymap=${keymap}' by 'keymap=${keymap_vt}'" fi else _sc_keymap_msg="No replacement found for keymap '${keymap}'. From owner-svn-src-head@freebsd.org Sun Oct 25 19:34:07 2020 Return-Path: Delivered-To: svn-src-head@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 20C37456B97; Sun, 25 Oct 2020 19:34:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK7Sb0P4Wz4RZS; Sun, 25 Oct 2020 19:34:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4AE5E83A; Sun, 25 Oct 2020 19:34:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09PJY6xf006343; Sun, 25 Oct 2020 19:34:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09PJY31a006323; Sun, 25 Oct 2020 19:34:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202010251934.09PJY31a006323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 25 Oct 2020 19:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367044 - in head/sys: cam cam/ctl dev/iscsi dev/isp dev/mpr dev/mps dev/ocs_fc X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys: cam cam/ctl dev/iscsi dev/isp dev/mpr dev/mps dev/ocs_fc X-SVN-Commit-Revision: 367044 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 19:34:07 -0000 Author: mav Date: Sun Oct 25 19:34:02 2020 New Revision: 367044 URL: https://svnweb.freebsd.org/changeset/base/367044 Log: Introduce support of SCSI Command Priority. SAM-3 specification introduced concept of Task Priority, that was renamed to Command Priority in SAM-4, and supported by all modern SCSI transports. It provides 15 levels of relative priorities: 1 - highest, 15 - lowest and 0 - default. SAT specification for SATA devices translates priorities 1-3 into NCQ high priority. This change adds new "priority" field into empty spots of struct ccb_scsiio and struct ccb_accept_tio of CAM and struct ctl_scsiio of CTL. Respective support is added into iscsi(4), isp(4), mpr(4), mps(4) and ocs_fc(4) drivers for both initiator and where applicable target roles. Minimal support was added to CTL to receive the priority value from different frontends, pass it between HA controllers and report in few places. This patch does not add consumers of this functionality, so nothing should really change yet, since the field is still set to 0 (default) on initiator and not actively used on target. Those are to be implemented separately. I've confirmed priority working on WD Red SATA disks connected via mpr(4) and properly transferred to CTL target via iscsi(4), isp(4) and ocs_fc(4). While there, added missing tag_action support to ocs_fc(4) initiator role. MFC after: 1 month Relnotes: yes Sponsored by: iXsystems, Inc. Modified: head/sys/cam/cam_ccb.h head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_util.c head/sys/cam/ctl/scsi_ctl.c head/sys/dev/iscsi/iscsi.c head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_stds.h head/sys/dev/isp/ispvar.h head/sys/dev/mpr/mpr_sas.c head/sys/dev/mps/mps_sas.c head/sys/dev/ocs_fc/ocs_cam.c head/sys/dev/ocs_fc/ocs_scsi.c head/sys/dev/ocs_fc/ocs_scsi.h head/sys/dev/ocs_fc/ocs_unsol.c Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/cam/cam_ccb.h Sun Oct 25 19:34:02 2020 (r367044) @@ -758,6 +758,7 @@ struct ccb_scsiio { * from scsi_message.h. */ #define CAM_TAG_ACTION_NONE 0x00 + uint8_t priority; /* Command priority for SIMPLE tag */ u_int tag_id; /* tag id from initator (target mode) */ u_int init_id; /* initiator id of who selected */ #if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) @@ -805,6 +806,7 @@ struct ccb_accept_tio { u_int8_t cdb_len; /* Number of bytes for the CDB */ u_int8_t tag_action; /* What to do for tag queueing */ u_int8_t sense_len; /* Number of bytes of Sense Data */ + uint8_t priority; /* Command priority for SIMPLE tag */ u_int tag_id; /* tag id from initator (target mode) */ u_int init_id; /* initiator id of who selected */ struct scsi_sense_data sense_data; @@ -1392,6 +1394,7 @@ cam_fill_csio(struct ccb_scsiio *csio, u_int32_t retri csio->sense_len = sense_len; csio->cdb_len = cdb_len; csio->tag_action = tag_action; + csio->priority = 0; #if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) csio->bio = NULL; #endif @@ -1414,6 +1417,7 @@ cam_fill_ctio(struct ccb_scsiio *csio, u_int32_t retri csio->dxfer_len = dxfer_len; csio->scsi_status = scsi_status; csio->tag_action = tag_action; + csio->priority = 0; csio->tag_id = tag_id; csio->init_id = init_id; } Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/cam/ctl/ctl.c Sun Oct 25 19:34:02 2020 (r367044) @@ -1457,6 +1457,7 @@ ctl_isc_event_handler(ctl_ha_channel channel, ctl_ha_e if (softc->ha_mode != CTL_HA_MODE_XFER) io->io_hdr.flags |= CTL_FLAG_INT_COPY; io->io_hdr.nexus = msg->hdr.nexus; + io->scsiio.priority = msg->scsi.priority; io->scsiio.tag_num = msg->scsi.tag_num; io->scsiio.tag_type = msg->scsi.tag_type; #ifdef CTL_TIME_IO @@ -11603,8 +11604,9 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ct msg_info.hdr.nexus = ctsio->io_hdr.nexus; msg_info.scsi.tag_num = ctsio->tag_num; msg_info.scsi.tag_type = ctsio->tag_type; - msg_info.scsi.cdb_len = ctsio->cdb_len; memcpy(msg_info.scsi.cdb, ctsio->cdb, CTL_MAX_CDBLEN); + msg_info.scsi.cdb_len = ctsio->cdb_len; + msg_info.scsi.priority = ctsio->priority; if ((isc_retval = ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, sizeof(msg_info.scsi) - sizeof(msg_info.scsi.sense_data), @@ -12480,12 +12482,13 @@ ctl_datamove(union ctl_io *io) ctl_scsi_command_string(&io->scsiio, NULL, &sb); sbuf_printf(&sb, "\n"); sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "Tag: 0x%04x, type %d\n", - io->scsiio.tag_num, io->scsiio.tag_type); + sbuf_printf(&sb, "Tag: 0x%04x/%d, Prio: %d\n", + io->scsiio.tag_num, io->scsiio.tag_type, + io->scsiio.priority); break; case CTL_IO_TASK: - sbuf_printf(&sb, "Task I/O type: %d, Tag: 0x%04x, " - "Tag Type: %d\n", io->taskio.task_action, + sbuf_printf(&sb, "Task Action: %d Tag: 0x%04x/%d\n", + io->taskio.task_action, io->taskio.tag_num, io->taskio.tag_type); break; default: @@ -12978,12 +12981,13 @@ ctl_process_done(union ctl_io *io) ctl_scsi_command_string(&io->scsiio, NULL, &sb); sbuf_printf(&sb, "\n"); sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "Tag: 0x%04x, type %d\n", - io->scsiio.tag_num, io->scsiio.tag_type); + sbuf_printf(&sb, "Tag: 0x%04x/%d, Prio: %d\n", + io->scsiio.tag_num, io->scsiio.tag_type, + io->scsiio.priority); break; case CTL_IO_TASK: - sbuf_printf(&sb, "Task I/O type: %d, Tag: 0x%04x, " - "Tag Type: %d\n", io->taskio.task_action, + sbuf_printf(&sb, "Task Action: %d Tag: 0x%04x/%d\n", + io->taskio.task_action, io->taskio.tag_num, io->taskio.tag_type); break; default: Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Sun Oct 25 19:34:02 2020 (r367044) @@ -539,6 +539,7 @@ cfcs_action(struct cam_sim *sim, union ccb *ccb) io->io_hdr.nexus.targ_port = softc->port.targ_port; io->io_hdr.nexus.targ_lun = ctl_decode_lun( CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); + io->scsiio.priority = csio->priority; /* * This tag scheme isn't the best, since we could in theory * have a very long-lived I/O and tag collision, especially Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Oct 25 19:34:02 2020 (r367044) @@ -530,6 +530,8 @@ cfiscsi_pdu_handle_scsi_command(struct icl_pdu *reques io->io_hdr.nexus.initid = cs->cs_ctl_initid; io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; io->io_hdr.nexus.targ_lun = ctl_decode_lun(be64toh(bhssc->bhssc_lun)); + io->scsiio.priority = (bhssc->bhssc_pri & BHSSC_PRI_MASK) >> + BHSSC_PRI_SHIFT; io->scsiio.tag_num = bhssc->bhssc_initiator_task_tag; switch ((bhssc->bhssc_flags & BHSSC_FLAGS_ATTR)) { case BHSSC_FLAGS_ATTR_UNTAGGED: Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/cam/ctl/ctl_io.h Sun Oct 25 19:34:02 2020 (r367044) @@ -323,6 +323,7 @@ struct ctl_scsiio { uint8_t sense_len; /* Returned sense length */ uint8_t scsi_status; /* SCSI status byte */ uint8_t sense_residual; /* Unused. */ + uint8_t priority; /* Command priority */ uint32_t residual; /* Unused */ uint32_t tag_num; /* tag number */ ctl_tag_type tag_type; /* simple, ordered, head of queue,etc.*/ @@ -484,6 +485,7 @@ struct ctl_ha_msg_scsi { uint8_t cdb_len; /* CDB length */ uint8_t scsi_status; /* SCSI status byte */ uint8_t sense_len; /* Returned sense length */ + uint8_t priority; /* Command priority */ uint32_t port_status; /* trans status, set by FETD, 0 = good*/ uint32_t kern_data_resid; /* for DATAMOVE_DONE */ Modified: head/sys/cam/ctl/ctl_util.c ============================================================================== --- head/sys/cam/ctl/ctl_util.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/cam/ctl/ctl_util.c Sun Oct 25 19:34:02 2020 (r367044) @@ -740,8 +740,9 @@ ctl_io_sbuf(union ctl_io *io, struct sbuf *sb) case CTL_IO_SCSI: sbuf_cat(sb, path_str); ctl_scsi_command_string(&io->scsiio, NULL, sb); - sbuf_printf(sb, " Tag: %#x/%d\n", - io->scsiio.tag_num, io->scsiio.tag_type); + sbuf_printf(sb, " Tag: %#x/%d, Prio: %d\n", + io->scsiio.tag_num, io->scsiio.tag_type, + io->scsiio.priority); break; case CTL_IO_TASK: sbuf_cat(sb, path_str); Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/cam/ctl/scsi_ctl.c Sun Oct 25 19:34:02 2020 (r367044) @@ -1151,6 +1151,7 @@ ctlfedone(struct cam_periph *periph, union ccb *done_c } else { io->io_hdr.nexus.targ_lun = atio->ccb_h.target_lun; } + io->scsiio.priority = atio->priority; io->scsiio.tag_num = atio->tag_id; switch (atio->tag_action) { case CAM_TAG_ACTION_NONE: Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/iscsi/iscsi.c Sun Oct 25 19:34:02 2020 (r367044) @@ -2299,6 +2299,11 @@ iscsi_action_scsiio(struct iscsi_session *is, union cc } else bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_UNTAGGED; + if (is->is_protocol_level >= 2) { + bhssc->bhssc_pri = (csio->priority << BHSSC_PRI_SHIFT) & + BHSSC_PRI_MASK; + } + bhssc->bhssc_lun = htobe64(CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); bhssc->bhssc_initiator_task_tag = initiator_task_tag; bhssc->bhssc_expected_data_transfer_length = htonl(csio->dxfer_len); Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/isp/isp.c Sun Oct 25 19:34:02 2020 (r367044) @@ -4554,7 +4554,9 @@ isp_start(XS_T *xs) } else { ttype = FCP_CMND_TASK_ATTR_SIMPLE; } - ((ispreqt7_t *)reqp)->req_task_attribute = ttype; + ((ispreqt7_t *)reqp)->req_task_attribute = ttype | + ((XS_PRIORITY(xs) << FCP_CMND_PRIO_SHIFT) & + FCP_CMND_PRIO_MASK); } else if (IS_FC(isp)) { /* * See comment in isp_intr_respq Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/isp/isp_freebsd.c Sun Oct 25 19:34:02 2020 (r367044) @@ -1917,6 +1917,8 @@ isp_handle_platform_atio7(ispsoftc_t *isp, at7_entry_t atiop->tag_action = 0; break; } + atiop->priority = (aep->at_cmnd.fcp_cmnd_task_attribute & + FCP_CMND_PRIO_MASK) >> FCP_CMND_PRIO_SHIFT; atp->orig_datalen = aep->at_cmnd.cdb_dl.sf.fcp_cmnd_dl; atp->bytes_xfered = 0; atp->lun = lun; Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/isp/isp_freebsd.h Sun Oct 25 19:34:02 2020 (r367044) @@ -546,7 +546,8 @@ default: \ #define XS_TAG_TYPE(ccb) \ ((ccb->tag_action == MSG_SIMPLE_Q_TAG)? REQFLAG_STAG : \ ((ccb->tag_action == MSG_HEAD_OF_Q_TAG)? REQFLAG_HTAG : REQFLAG_OTAG)) - + +#define XS_PRIORITY(ccb) (ccb)->priority #define XS_SETERR(ccb, v) (ccb)->ccb_h.status &= ~CAM_STATUS_MASK, \ (ccb)->ccb_h.status |= v Modified: head/sys/dev/isp/isp_stds.h ============================================================================== --- head/sys/dev/isp/isp_stds.h Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/isp/isp_stds.h Sun Oct 25 19:34:02 2020 (r367044) @@ -89,6 +89,9 @@ typedef struct { #define FCP_CMND_TASK_ATTR_UNTAGGED 0x05 #define FCP_CMND_TASK_ATTR_MASK 0x07 +#define FCP_CMND_PRIO_MASK 0x78 +#define FCP_CMND_PRIO_SHIFT 3 + #define FCP_CMND_ADDTL_CDBLEN_SHIFT 2 #define FCP_CMND_DATA_WRITE 0x01 Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/isp/ispvar.h Sun Oct 25 19:34:02 2020 (r367044) @@ -1036,6 +1036,7 @@ void isp_async(ispsoftc_t *, ispasync_t, ...); * XS_SNSASCQ(xs) dereferences XS_SNSP to get the current stored Additional Sense Code Qualifier * XS_TAG_P(xs) predicate of whether this command should be tagged * XS_TAG_TYPE(xs) which type of tag to use + * XS_PRIORITY(xs) command priority for SIMPLE tag * XS_SETERR(xs) set error state * * HBA_NOERROR command has no erros Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/mpr/mpr_sas.c Sun Oct 25 19:34:02 2020 (r367044) @@ -1997,6 +1997,8 @@ mprsas_action_scsiio(struct mprsas_softc *sassc, union mpi_control |= MPI2_SCSIIO_CONTROL_SIMPLEQ; break; } + mpi_control |= (csio->priority << MPI2_SCSIIO_CONTROL_CMDPRI_SHIFT) & + MPI2_SCSIIO_CONTROL_CMDPRI_MASK; mpi_control |= sc->mapping_table[csio->ccb_h.target_id].TLR_bits; req->Control = htole32(mpi_control); Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/mps/mps_sas.c Sun Oct 25 19:34:02 2020 (r367044) @@ -1786,6 +1786,8 @@ mpssas_action_scsiio(struct mpssas_softc *sassc, union mpi_control |= MPI2_SCSIIO_CONTROL_SIMPLEQ; break; } + mpi_control |= (csio->priority << MPI2_SCSIIO_CONTROL_TASKPRI_SHIFT) & + MPI2_SCSIIO_CONTROL_TASKPRI_MASK; mpi_control |= sc->mapping_table[csio->ccb_h.target_id].TLR_bits; req->Control = htole32(mpi_control); if (MPS_SET_LUN(req->LUN, csio->ccb_h.target_lun) != 0) { Modified: head/sys/dev/ocs_fc/ocs_cam.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_cam.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/ocs_fc/ocs_cam.c Sun Oct 25 19:34:02 2020 (r367044) @@ -580,8 +580,12 @@ int32_t ocs_scsi_recv_cmd(ocs_io_t *io, uint64_t lun, atio->tag_action = MSG_HEAD_OF_Q_TAG; else if (flags & OCS_SCSI_CMD_ORDERED) atio->tag_action = MSG_ORDERED_Q_TAG; + else if (flags & OCS_SCSI_CMD_ACA) + atio->tag_action = MSG_ACA_TASK; else - atio->tag_action = 0; + atio->tag_action = CAM_TAG_ACTION_NONE; + atio->priority = (flags & OCS_SCSI_PRIORITY_MASK) >> + OCS_SCSI_PRIORITY_SHIFT; atio->cdb_len = cdb_len; ocs_memcpy(atio->cdb_io.cdb_bytes, cdb, cdb_len); @@ -1782,7 +1786,7 @@ ocs_initiator_io(struct ocs_softc *ocs, union ccb *ccb ocs_node_t *node = NULL; ocs_io_t *io = NULL; ocs_scsi_sgl_t sgl[OCS_FC_MAX_SGL]; - int32_t sgl_count; + int32_t flags, sgl_count; ocs_fcport *fcp; fcp = FCPORT(ocs, cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path))); @@ -1840,13 +1844,32 @@ ocs_initiator_io(struct ocs_softc *ocs, union ccb *ccb io->timeout = ccb->ccb_h.timeout; } + switch (csio->tag_action) { + case MSG_HEAD_OF_Q_TAG: + flags = OCS_SCSI_CMD_HEAD_OF_QUEUE; + break; + case MSG_ORDERED_Q_TAG: + flags = OCS_SCSI_CMD_ORDERED; + break; + case MSG_ACA_TASK: + flags = OCS_SCSI_CMD_ACA; + break; + case CAM_TAG_ACTION_NONE: + case MSG_SIMPLE_Q_TAG: + default: + flags = OCS_SCSI_CMD_SIMPLE; + break; + } + flags |= (csio->priority << OCS_SCSI_PRIORITY_SHIFT) & + OCS_SCSI_PRIORITY_MASK; + switch (ccb->ccb_h.flags & CAM_DIR_MASK) { case CAM_DIR_NONE: rc = ocs_scsi_send_nodata_io(node, io, ccb_h->target_lun, ccb->ccb_h.flags & CAM_CDB_POINTER ? csio->cdb_io.cdb_ptr: csio->cdb_io.cdb_bytes, csio->cdb_len, - ocs_scsi_initiator_io_cb, ccb); + ocs_scsi_initiator_io_cb, ccb, flags); break; case CAM_DIR_IN: rc = ocs_scsi_send_rd_io(node, io, ccb_h->target_lun, @@ -1855,7 +1878,7 @@ ocs_initiator_io(struct ocs_softc *ocs, union ccb *ccb csio->cdb_len, NULL, sgl, sgl_count, csio->dxfer_len, - ocs_scsi_initiator_io_cb, ccb); + ocs_scsi_initiator_io_cb, ccb, flags); break; case CAM_DIR_OUT: rc = ocs_scsi_send_wr_io(node, io, ccb_h->target_lun, @@ -1864,7 +1887,7 @@ ocs_initiator_io(struct ocs_softc *ocs, union ccb *ccb csio->cdb_len, NULL, sgl, sgl_count, csio->dxfer_len, - ocs_scsi_initiator_io_cb, ccb); + ocs_scsi_initiator_io_cb, ccb, flags); break; default: panic("%s invalid data direction %08x\n", __func__, Modified: head/sys/dev/ocs_fc/ocs_scsi.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_scsi.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/ocs_fc/ocs_scsi.c Sun Oct 25 19:34:02 2020 (r367044) @@ -297,7 +297,7 @@ ocs_scsi_send_io(ocs_hw_io_type_e type, ocs_node_t *no ocs_scsi_tmf_cmd_e tmf, uint8_t *cdb, uint32_t cdb_len, ocs_scsi_dif_info_t *dif_info, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t wire_len, uint32_t first_burst, - ocs_scsi_rsp_io_cb_t cb, void *arg); + ocs_scsi_rsp_io_cb_t cb, void *arg, uint32_t flags); /** * @brief Target response completion callback. @@ -2263,12 +2263,12 @@ int32_t ocs_scsi_send_rd_io(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_t cdb_len, ocs_scsi_dif_info_t *dif_info, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t wire_len, - ocs_scsi_rsp_io_cb_t cb, void *arg) + ocs_scsi_rsp_io_cb_t cb, void *arg, uint32_t flags) { int32_t rc; rc = ocs_scsi_send_io(OCS_HW_IO_INITIATOR_READ, node, io, lun, 0, cdb, cdb_len, dif_info, sgl, sgl_count, - wire_len, 0, cb, arg); + wire_len, 0, cb, arg, flags); return rc; } @@ -2302,12 +2302,12 @@ ocs_scsi_send_rd_io(ocs_node_t *node, ocs_io_t *io, ui int32_t ocs_scsi_send_wr_io(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_t cdb_len, ocs_scsi_dif_info_t *dif_info, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t wire_len, - ocs_scsi_rsp_io_cb_t cb, void *arg) + ocs_scsi_rsp_io_cb_t cb, void *arg, uint32_t flags) { int32_t rc; rc = ocs_scsi_send_io(OCS_HW_IO_INITIATOR_WRITE, node, io, lun, 0, cdb, cdb_len, dif_info, sgl, sgl_count, - wire_len, 0, cb, arg); + wire_len, 0, cb, arg, flags); return rc; } @@ -2343,12 +2343,12 @@ int32_t ocs_scsi_send_wr_io_first_burst(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_t cdb_len, ocs_scsi_dif_info_t *dif_info, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t wire_len, uint32_t first_burst, - ocs_scsi_rsp_io_cb_t cb, void *arg) + ocs_scsi_rsp_io_cb_t cb, void *arg, uint32_t flags) { int32_t rc; rc = ocs_scsi_send_io(OCS_HW_IO_INITIATOR_WRITE, node, io, lun, 0, cdb, cdb_len, dif_info, sgl, sgl_count, - wire_len, 0, cb, arg); + wire_len, 0, cb, arg, flags); return rc; } @@ -2374,11 +2374,11 @@ ocs_scsi_send_wr_io_first_burst(ocs_node_t *node, ocs_ * @return Returns 0 on success, or a negative error code value on failure. */ int32_t ocs_scsi_send_nodata_io(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_t cdb_len, - ocs_scsi_rsp_io_cb_t cb, void *arg) + ocs_scsi_rsp_io_cb_t cb, void *arg, uint32_t flags) { int32_t rc; - rc = ocs_scsi_send_io(OCS_HW_IO_INITIATOR_NODATA, node, io, lun, 0, cdb, cdb_len, NULL, NULL, 0, 0, 0, cb, arg); + rc = ocs_scsi_send_io(OCS_HW_IO_INITIATOR_NODATA, node, io, lun, 0, cdb, cdb_len, NULL, NULL, 0, 0, 0, cb, arg, flags); return rc; } @@ -2444,7 +2444,7 @@ ocs_scsi_send_tmf(ocs_node_t *node, ocs_io_t *io, ocs_ } else { io->display_name = "tmf"; rc = ocs_scsi_send_io(OCS_HW_IO_INITIATOR_READ, node, io, lun, tmf, NULL, 0, NULL, - sgl, sgl_count, len, 0, cb, arg); + sgl, sgl_count, len, 0, cb, arg, 0); } return rc; @@ -2481,7 +2481,7 @@ static int32_t ocs_scsi_send_io(ocs_hw_io_type_e type, ocs_scsi_tmf_cmd_e tmf, uint8_t *cdb, uint32_t cdb_len, ocs_scsi_dif_info_t *dif_info, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t wire_len, uint32_t first_burst, - ocs_scsi_rsp_io_cb_t cb, void *arg) + ocs_scsi_rsp_io_cb_t cb, void *arg, uint32_t flags) { int32_t rc; ocs_t *ocs; @@ -2565,6 +2565,18 @@ static int32_t ocs_scsi_send_io(ocs_hw_io_type_e type, return -1; } } + if (flags & OCS_SCSI_CMD_HEAD_OF_QUEUE) + cmnd->task_attribute = FCP_TASK_ATTR_HEAD_OF_QUEUE; + else if (flags & OCS_SCSI_CMD_ORDERED) + cmnd->task_attribute = FCP_TASK_ATTR_ORDERED; + else if (flags & OCS_SCSI_CMD_UNTAGGED) + cmnd->task_attribute = FCP_TASK_ATTR_UNTAGGED; + else if (flags & OCS_SCSI_CMD_ACA) + cmnd->task_attribute = FCP_TASK_ATTR_ACA; + else + cmnd->task_attribute = FCP_TASK_ATTR_SIMPLE; + cmnd->command_priority = (flags & OCS_SCSI_PRIORITY_MASK) >> + OCS_SCSI_PRIORITY_SHIFT; switch (tmf) { case OCS_SCSI_TMF_QUERY_TASK_SET: Modified: head/sys/dev/ocs_fc/ocs_scsi.h ============================================================================== --- head/sys/dev/ocs_fc/ocs_scsi.h Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/ocs_fc/ocs_scsi.h Sun Oct 25 19:34:02 2020 (r367044) @@ -54,6 +54,8 @@ #define OCS_SCSI_CMD_ACA (1U << 6) #define OCS_SCSI_FIRST_BURST_ERR (1U << 7) #define OCS_SCSI_FIRST_BURST_ABORTED (1U << 8) +#define OCS_SCSI_PRIORITY_MASK 0xf0000 +#define OCS_SCSI_PRIORITY_SHIFT 16 /* ocs_scsi_send_rd_data/recv_wr_data/send_resp flags */ #define OCS_SCSI_LAST_DATAPHASE (1U << 0) @@ -347,17 +349,18 @@ extern int32_t ocs_scsi_del_target(ocs_node_t *node, o extern int32_t ocs_scsi_send_rd_io(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_t cdb_len, ocs_scsi_dif_info_t *dif_info, - ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t wire_len, ocs_scsi_rsp_io_cb_t cb, void *arg); + ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t wire_len, ocs_scsi_rsp_io_cb_t cb, void *arg, uint32_t flags); extern int32_t ocs_scsi_send_wr_io(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_t cdb_len, ocs_scsi_dif_info_t *dif_info, - ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t wire_len, ocs_scsi_rsp_io_cb_t cb, void *arg); + ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t wire_len, ocs_scsi_rsp_io_cb_t cb, void *arg, uint32_t flags); extern int32_t ocs_scsi_send_wr_io_first_burst(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_t cdb_len, ocs_scsi_dif_info_t *dif_info, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t wire_len, uint32_t first_burst, - ocs_scsi_rsp_io_cb_t cb, void *arg); + ocs_scsi_rsp_io_cb_t cb, void *arg, uint32_t flags); extern int32_t ocs_scsi_send_tmf(ocs_node_t *node, ocs_io_t *io, ocs_io_t *io_to_abort, uint64_t lun, ocs_scsi_tmf_cmd_e tmf, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t len, ocs_scsi_rsp_io_cb_t cb, void *arg); -extern int32_t ocs_scsi_send_nodata_io(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_t cdb_len, ocs_scsi_rsp_io_cb_t cb, void *arg); +extern int32_t ocs_scsi_send_nodata_io(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_t cdb_len, + ocs_scsi_rsp_io_cb_t cb, void *arg, uint32_t flags); extern void ocs_scsi_del_target_complete(ocs_node_t *node); typedef enum { Modified: head/sys/dev/ocs_fc/ocs_unsol.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_unsol.c Sun Oct 25 18:27:21 2020 (r367043) +++ head/sys/dev/ocs_fc/ocs_unsol.c Sun Oct 25 19:34:02 2020 (r367044) @@ -854,6 +854,7 @@ ocs_get_flags_fcp_cmd(fcp_cmnd_iu_t *cmnd) flags |= OCS_SCSI_CMD_UNTAGGED; break; } + flags |= (uint32_t)cmnd->command_priority << OCS_SCSI_PRIORITY_SHIFT; if (cmnd->wrdata) flags |= OCS_SCSI_CMD_DIR_IN; if (cmnd->rddata) From owner-svn-src-head@freebsd.org Sun Oct 25 21:04:07 2020 Return-Path: Delivered-To: svn-src-head@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 C7BCE458D6C; Sun, 25 Oct 2020 21:04:07 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CK9SR4zT6z4XYX; Sun, 25 Oct 2020 21:04:07 +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 8EFCDFC51; Sun, 25 Oct 2020 21:04:07 +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 09PL47hT061417; Sun, 25 Oct 2020 21:04:07 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09PL47fV061416; Sun, 25 Oct 2020 21:04:07 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202010252104.09PL47fV061416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 25 Oct 2020 21:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367045 - head/sbin/fsck_ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sbin/fsck_ffs X-SVN-Commit-Revision: 367045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 21:04:07 -0000 Author: mckusick Date: Sun Oct 25 21:04:07 2020 New Revision: 367045 URL: https://svnweb.freebsd.org/changeset/base/367045 Log: Use proper type (ino_t) for inode numbers to avoid improper sign extention in the Pass 5 checks. The manifestation was fsck_ffs exiting with this error: ** Phase 5 - Check Cyl groups fsck_ffs: inoinfo: inumber 18446744071562087424 out of range The error only manifests itself for filesystems bigger than about 100Tb. Reported by: Nikita Grechikhin MFC after: 2 weeks Sponsored by: Netflix Modified: head/sbin/fsck_ffs/pass5.c Modified: head/sbin/fsck_ffs/pass5.c ============================================================================== --- head/sbin/fsck_ffs/pass5.c Sun Oct 25 19:34:02 2020 (r367044) +++ head/sbin/fsck_ffs/pass5.c Sun Oct 25 21:04:07 2020 (r367045) @@ -63,6 +63,7 @@ pass5(void) struct fs *fs = &sblock; ufs2_daddr_t d, dbase, dmax, start; int rewritecg = 0; + ino_t inum; struct csum *cs; struct csum_total cstotal; struct inodesc idesc[3]; @@ -238,9 +239,9 @@ pass5(void) } memset(&newcg->cg_frsum[0], 0, sizeof newcg->cg_frsum); memset(cg_inosused(newcg), 0, (size_t)(mapsize)); - j = fs->fs_ipg * c; - for (i = 0; i < inostathead[c].il_numalloced; j++, i++) { - switch (inoinfo(j)->ino_state) { + inum = fs->fs_ipg * c; + for (i = 0; i < inostathead[c].il_numalloced; inum++, i++) { + switch (inoinfo(inum)->ino_state) { case USTATE: break; @@ -260,10 +261,10 @@ pass5(void) break; default: - if (j < (int)UFS_ROOTINO) + if (inum < UFS_ROOTINO) break; - errx(EEXIT, "BAD STATE %d FOR INODE I=%d", - inoinfo(j)->ino_state, j); + errx(EEXIT, "BAD STATE %d FOR INODE I=%ju", + inoinfo(inum)->ino_state, (uintmax_t)inum); } } if (c == 0) From owner-svn-src-head@freebsd.org Sun Oct 25 21:35:16 2020 Return-Path: Delivered-To: svn-src-head@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 09E0F4595CE; Sun, 25 Oct 2020 21:35:16 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKB8M1lVCz4Yr3; Sun, 25 Oct 2020 21:35:14 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-ej1-x636.google.com with SMTP id z5so10632151ejw.7; Sun, 25 Oct 2020 14:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=XtaFqa2mmYjjkurWP6nbD5S1+pZiZbABuMHN9Q1acNU=; b=DVK11h9ogdWs6My/8iL3WNvJQ+dUHmlqVSa9myOcLzzJuk4kIGnpFDoYNioCp6NsFg UXjMNvhnSAkL1FPGt8wmhx2qrl9Lfurw1N6lSW3NwP3NPxb88o0Mg4vzyiGniPSn1NCt O3eogX9Y3xbu+LrmLz6uiBQHuX7TsEwT7/tJbiNIGHM4BniPfyodZqAz4H+K/nQF6wkD xGzSURZDyqJ03ZM1bBXUbmYROCTW7hmHargKrG5iXb0MR4quXbUzQn/ubQ39KwTKEguo vWYgWqcGRzk0IU23/Z0HlKoKMoIu/UGPOTbqIYkedmdxJQzc4B+YqlgBA5wn/1KnVYTH L4oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=XtaFqa2mmYjjkurWP6nbD5S1+pZiZbABuMHN9Q1acNU=; b=MQdlNKNepycwogLktn3zwAN07Q4Pl0rKbB0bQTEzFOLZjMiIio1Y3XTtdJZMBGSOP9 wqwQRcRRYJYwRTaXBc67pZ+Ynzc9GkeguorIz4YFaFbsO9hsw88/YdodPzQPo9sVjddy fVPRAB08f35jArtT6R8/rGlRuaKnUamahU9kLfRsF9AsEeqCfNVbxU5WgHKSdZtlNxYZ ReHAldzumzwqvBTYiTwRs8/8brS7pUkfyLWned6FthLLEpxmv3b4lDur9hrqsrg/tKH0 qADD6UiguJqej28Hm/cpPFwecYokIS5GKlUbssa2iOCrppm/3+FHUr2rOt86aIh/2DCS GuAw== X-Gm-Message-State: AOAM533+EOjbOM8xnP4yNLa41mUmG1BheiKP89hjJ55xEMr9KTMRezQO QKbWQ7q9yp/OdfTSI5w0RdJ7PmXHnhk/ag== X-Google-Smtp-Source: ABdhPJxKnRnzmW2s8mWVUH4UzZYrYY0JHQ8bgbsJKWwthg0TmJs8yTooTYi++Q99XFSoBhUCAj4YqA== X-Received: by 2002:a17:906:edb0:: with SMTP id sa16mr12818871ejb.327.1603661712286; Sun, 25 Oct 2020 14:35:12 -0700 (PDT) Received: from brick (cpc149474-cmbg20-2-0-cust954.5-4.cable.virginm.net. [82.4.199.187]) by smtp.gmail.com with ESMTPSA id w25sm4577450ejy.123.2020.10.25.14.35.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 14:35:11 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sun, 25 Oct 2020 21:35:09 +0000 From: Edward Tomasz Napierala To: Cy Schubert Cc: Oliver Pinter , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r367038 - head/sbin/mount_nullfs Message-ID: <20201025213509.GA1671@brick> Mail-Followup-To: Cy Schubert , Oliver Pinter , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <202010251409.09PE91aS001781@repo.freebsd.org> <202010251417.09PEH6tE003403@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202010251417.09PEH6tE003403@slippy.cwsent.com> X-Rspamd-Queue-Id: 4CKB8M1lVCz4Yr3 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=DVK11h9o; dmarc=none; spf=pass (mx1.freebsd.org: domain of etnapierala@gmail.com designates 2a00:1450:4864:20::636 as permitted sender) smtp.mailfrom=etnapierala@gmail.com X-Spamd-Result: default: False [-1.94 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.25)[-0.248]; FORGED_SENDER(0.30)[trasz@freebsd.org,etnapierala@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[82.4.199.187:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[trasz@freebsd.org,etnapierala@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.990]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.01)[-1.006]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::636:from]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 21:35:16 -0000 On 1025T0717, Cy Schubert wrote: > In message om> > , Oliver Pinter writes: > > On Sunday, October 25, 2020, Edward Tomasz Napierala > > wrote: > > > > > Author: trasz > > > Date: Sun Oct 25 14:09:00 2020 > > > New Revision: 367038 > > > URL: https://svnweb.freebsd.org/changeset/base/367038 > > > > > > Log: > > > Remove the check that prevents creating "loops" from mount_nullfs(8). > > > > > > > > The simple question is: why? > > I was about to ask that myself. > > The why is usually more important than the how. Two reasons. First, from what I can tell this is an artificial limitation which serves no purpose. I thought it was to prevent some kind of deadlock between vnodes, so I asked kib@, and he mentioned removing that very limitation from the kernel code; thus, it looks to me like a historical leftover. Second, I've stumbled upon this when trying to nullfs-mount '/' on '/compat/ubuntu/bsd/', which would be useful for autochroot functionality, when (or if) it becomes a thing. From owner-svn-src-head@freebsd.org Sun Oct 25 21:46:00 2020 Return-Path: Delivered-To: svn-src-head@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 DE1DB459C28; Sun, 25 Oct 2020 21:46:00 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKBNm0xzCz4ZFR; Sun, 25 Oct 2020 21:45:59 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by mail-yb1-xb31.google.com with SMTP id h196so6051778ybg.4; Sun, 25 Oct 2020 14:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=mVJmm48xP8/VEf8dwPIwoMgiR6H706XMvjFw8RJvuzk=; b=b2tnNqcfKcZlwEMGBonMlP7MCv2N2XSXaulGUzAaSQiwvGNueMgbuA/MiS39cNAO1r DKnAJD3mysFqfVfsRj4uThUUtdkUc53uHd8lA4pFdX/QVEQnznc173CUewo34V8E9JY4 QWTSrjgkcgXO1mXfKwgCNlkrTJ8NJKYmaywN/GCR4lkYYhCXCejGy/i+WQwjjm5MfEgf Zrpfqlrd0FgGpOkoCVmEENxIPahKnwQ+WEWjiaq+/9SVE8RySNGbIWl0oCn2ttciECvr 5cx1xHvMkmxE7ouVGIujAoRUEUmbuu330+Eym1yPpjLqD7b2ywyPIMz/DtVlPIzPt3/a fn9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=mVJmm48xP8/VEf8dwPIwoMgiR6H706XMvjFw8RJvuzk=; b=sptx+z7YFFtKB6RIYJzu1BzeuTO8VS1b+pUDnOp/vCBJMTw6270ZnYmC/hsA1hCre8 2NXPkombgwBTjMkT3XS0Zq9ByDxPGfWjdUPEdhcKR0iA0MDB05exAXjpN1w0L9WuQf9G usfGqnOj8S6dSkR5Oc5JST0zPjX2EIZWPkL8XxIgoUc99MmAgn8yK75+cV1aIhyqtibV 0SKZmSLl0Kuh2PjfqHlQ70+IkX8FyI2Y0IJXa8OT4QSeWThwdwQkMnC8afITxWnVkuEL h798WQLfb1DX/cvDdO15yZqDcxTa+IWtBGVa9+r1j3XqW2GZlycHiQA8ujDtWV5ShC/X 0I2w== X-Gm-Message-State: AOAM532eveQS+vrU3YIaJ+FLbWctDyEv5fCMLz6zdxFSgV7VAbZN4UXb A7qPuugzDMoZK3NdRvVeSO6vJbjFLnonnt3bC/u1q8Em X-Google-Smtp-Source: ABdhPJxwADvbtzll3kp9MQ5BVCCkZgwcKl62uVa13hSrtaaar30ZhKT6K1PU0qLj1sZ7vBIWLj+JI/btPGwRAKcn1yY= X-Received: by 2002:a25:d248:: with SMTP id j69mr16148929ybg.278.1603662359050; Sun, 25 Oct 2020 14:45:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:d8d2:0:0:0:0:0 with HTTP; Sun, 25 Oct 2020 14:45:58 -0700 (PDT) In-Reply-To: <20201025213509.GA1671@brick> References: <202010251409.09PE91aS001781@repo.freebsd.org> <202010251417.09PEH6tE003403@slippy.cwsent.com> <20201025213509.GA1671@brick> From: Oliver Pinter Date: Sun, 25 Oct 2020 22:45:58 +0100 Message-ID: Subject: Re: svn commit: r367038 - head/sbin/mount_nullfs To: Cy Schubert , Oliver Pinter , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 4CKBNm0xzCz4ZFR X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=b2tnNqcf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of oliverpntr@gmail.com designates 2607:f8b0:4864:20::b31 as permitted sender) smtp.mailfrom=oliverpntr@gmail.com X-Spamd-Result: default: False [-2.97 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[cschubert.com,gmail.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.022]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.05)[0.048]; NEURAL_HAM_LONG(-1.00)[-0.999]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b31:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 21:46:00 -0000 On Sunday, October 25, 2020, Edward Tomasz Napierala wrote: > On 1025T0717, Cy Schubert wrote: > > In message gmail.c > > om> > > , Oliver Pinter writes: > > > On Sunday, October 25, 2020, Edward Tomasz Napierala < > trasz@freebsd.org> > > > wrote: > > > > > > > Author: trasz > > > > Date: Sun Oct 25 14:09:00 2020 > > > > New Revision: 367038 > > > > URL: https://svnweb.freebsd.org/changeset/base/367038 > > > > > > > > Log: > > > > Remove the check that prevents creating "loops" from > mount_nullfs(8). > > > > > > > > > > > The simple question is: why? > > > > I was about to ask that myself. > > > > The why is usually more important than the how. > > Two reasons. > > First, from what I can tell this is an artificial limitation which serves > no purpose. I thought it was to prevent some kind of deadlock between > vnodes, so I asked kib@, and he mentioned removing that very limitation > from the kernel code; thus, it looks to me like a historical leftover. > > Second, I've stumbled upon this when trying to nullfs-mount '/' on > '/compat/ubuntu/bsd/', which would be useful for autochroot functionality, > when (or if) it becomes a thing. Thank you! From owner-svn-src-head@freebsd.org Sun Oct 25 22:58:14 2020 Return-Path: Delivered-To: svn-src-head@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 AC94A45B606; Sun, 25 Oct 2020 22:58:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKD051V8Kz4dbL; Sun, 25 Oct 2020 22:58:12 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id WoxlkNclFktFkWoxmktyNa; Sun, 25 Oct 2020 16:58:11 -0600 X-Authority-Analysis: v=2.4 cv=NYRYa0P4 c=1 sm=1 tr=0 ts=5f960303 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=afefHYAZSVUA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=xZtxMNEC6JyLLf0W19AA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id B0E3693E; Sun, 25 Oct 2020 15:58:07 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 09PMw7wK009643; Sun, 25 Oct 2020 15:58:07 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202010252258.09PMw7wK009643@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert , Oliver Pinter , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r367038 - head/sbin/mount_nullfs In-reply-to: <20201025213509.GA1671@brick> References: <202010251409.09PE91aS001781@repo.freebsd.org> <202010251417.09PEH6tE003403@slippy.cwsent.com> <20201025213509.GA1671@brick> Comments: In-reply-to Edward Tomasz Napierala message dated "Sun, 25 Oct 2020 21:35:09 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 25 Oct 2020 15:58:07 -0700 X-CMAE-Envelope: MS4xfB/EU3NlswQp11K5faTDjga4SgmYOe4TnBRu9P9kQjvIuzQIr5taft+UF0sOC65MN3xU6CRLX+9mVCg+KvL0id27uA870V4yx9fysNR+TK3hzybRBsk0 bWyfu7R9zjpQUHnUM1kWakdRfAyZGcG4tn8Zw8maZW/q7wlEJe+ABNd2E00F4/A1+vy9xHepfs04hNfUTpesgFxke+gQavBBwTaxHjXGFaH2hYMnwCgfiNb+ sxi+DWAuN4KkVqWzwIJdorrobBkXHtEn6tTFb0gBi2XolxveLDzSXfbNJPs2+a3vp5vGCEc861PC/mF+q/wcUA== X-Rspamd-Queue-Id: 4CKD051V8Kz4dbL X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.139) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-1.25 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-0.59)[-0.586]; FREEMAIL_TO(0.00)[cschubert.com,gmail.com,freebsd.org]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.229.168:received]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.139:from]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.960]; NEURAL_HAM_LONG(-1.00)[-1.005]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_VERYGOOD(0.00)[64.59.136.139:from]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 22:58:14 -0000 In message <20201025213509.GA1671@brick>, Edward Tomasz Napierala writes: > On 1025T0717, Cy Schubert wrote: > > In message c > > om> > > , Oliver Pinter writes: > > > On Sunday, October 25, 2020, Edward Tomasz Napierala > > > wrote: > > > > > > > Author: trasz > > > > Date: Sun Oct 25 14:09:00 2020 > > > > New Revision: 367038 > > > > URL: https://svnweb.freebsd.org/changeset/base/367038 > > > > > > > > Log: > > > > Remove the check that prevents creating "loops" from mount_nullfs(8). > > > > > > > > > > > The simple question is: why? > > > > I was about to ask that myself. > > > > The why is usually more important than the how. > > Two reasons. > > First, from what I can tell this is an artificial limitation which serves > no purpose. I thought it was to prevent some kind of deadlock between > vnodes, so I asked kib@, and he mentioned removing that very limitation > from the kernel code; thus, it looks to me like a historical leftover. > > Second, I've stumbled upon this when trying to nullfs-mount '/' on > '/compat/ubuntu/bsd/', which would be useful for autochroot functionality, > when (or if) it becomes a thing. Thanks. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sun Oct 25 23:55:46 2020 Return-Path: Delivered-To: svn-src-head@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 A97A845BDE4; Sun, 25 Oct 2020 23:55:46 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKFGT6tL6z4hLZ; Sun, 25 Oct 2020 23:55:45 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 09PNtheM080261; Sun, 25 Oct 2020 16:55:43 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 09PNthB5080260; Sun, 25 Oct 2020 16:55:43 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202010252355.09PNthB5080260@gndrsh.dnsmgr.net> Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar In-Reply-To: <20201025055633.GA52119@ravenloft.kiev.ua> To: Alex Kozlov Date: Sun, 25 Oct 2020 16:55:43 -0700 (PDT) CC: Stefan Esser , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4CKFGT6tL6z4hLZ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 23:55:46 -0000 [ Charset ISO-8859-1 unsupported, converting... ] > On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: > > Am 24.10.20 um 09:48 schrieb Alex Kozlov: > > > On Fri, Oct 23, 2020 at 09:22:23AM +0000, Stefan E?er wrote: > > > > Author: se > > > > Date: Fri Oct 23 09:22:23 2020 > > > > New Revision: 366962 > > > > URL: https://svnweb.freebsd.org/changeset/base/366962 > > > > > > > > Log: > > > > Add search of LOCALBASE/share/calendar for calendars supplied by a port. > > > > Calendar files in LOCALBASE override similarily named ones in the base > > > > system. This could easily be changed if the base system calendars should > > > > have precedence, but it could lead to a violation of POLA since then the > > > > port's files were ignored unless those in base have been deleted. > > > > There was no definition of _PATH_LOCALBASE in paths.h, but verbatim uses > > > > of /usr/local existed for _PATH_DEFPATH. Use _PATH_LOCALBASE here to ease > > > > a consistent modification of this prefix. > > > You are hardcoding assumption that LOCALBASE = /usr/local. Please make it > > > overridable with LOCALBASE environment variable. > > This was a trivial change to get us going with calendars provided by > > a port (which has not been committed, yet - therefore there are no > > port-provided calendars, neither under /usr/local nor under any other > > PREFIX, as of now). > > > I understand what you are asking for, but in such a case I'd rather > > think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in > > paths.h. > The PREFIX != LOCALBASE and both != /usr/local configurations > are supported in the ports tree and the base for a long time, please see > https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html Seems all that work for all them years is about to be tossed out the window as "an out dated concept". > > If after this commit you need to rebuild base to use non-default LOCALBASE/PREFIX > it is pretty big regression and POLA. I guess no one is paying attention to any of this... > > And I have made this a single instance that needs to be changed. > > Before my change there were 2 instances of /usr/local hard-coded > > in _PATH_DEFPATH - now you have to only change the definition of > > _PATH_LOCALBASE to adjust all 3 locations that use it. > I think you made situation worse, there were two stray hardcoded > string and now there is official LOCALBASE define which likely will be > used by other people in the future. Yep, and now that propogation is about to occur. > > > If you can show me precedence of a LOCALBASE environment variable > > being used in the way you suggest, I'd be willing to make calendar > > use it. > Just an analogy from LOCALBASE make variable, perhaps CALENDAR_HOME > is a better name. > > > But then I think a CALENDAR_HOME variable would be even more useful, > > since it would allow to search an additional user selected directory > > (and not just share/calendar within what you provide as LOCALBASE). > > > > Regards, STefan > > > > PS: If you are a source committer, you might even commit such a > > change yourself. But I'd think it should be reviewed, and it > > might be a good idea to wait until other changes (e.g. the > > switch-over to port-supplied calendar files) have been worked > > out. > > > -- > Alex > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon Oct 26 00:37:32 2020 Return-Path: Delivered-To: svn-src-head@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 424AE45D03A; Mon, 26 Oct 2020 00:37:32 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKGBh0jrKz4kPK; Mon, 26 Oct 2020 00:37:32 +0000 (UTC) (envelope-from jmg@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 F0E7A12447; Mon, 26 Oct 2020 00:37:31 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09Q0bVDC090954; Mon, 26 Oct 2020 00:37:31 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09Q0bVpN090953; Mon, 26 Oct 2020 00:37:31 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <202010260037.09Q0bVpN090953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Mon, 26 Oct 2020 00:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367048 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: jmg X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 367048 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 00:37:32 -0000 Author: jmg Date: Mon Oct 26 00:37:31 2020 New Revision: 367048 URL: https://svnweb.freebsd.org/changeset/base/367048 Log: update write(2)'s iovec limit w/ info about the iosize_max_clamp sysctl... Modified: head/lib/libc/sys/write.2 Modified: head/lib/libc/sys/write.2 ============================================================================== --- head/lib/libc/sys/write.2 Sun Oct 25 23:26:07 2020 (r367047) +++ head/lib/libc/sys/write.2 Mon Oct 26 00:37:31 2020 (r367048) @@ -28,7 +28,7 @@ .\" @(#)write.2 8.5 (Berkeley) 4/2/94 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd October 25, 2020 .Dt WRITE 2 .Os .Sh NAME @@ -240,9 +240,13 @@ array was negative. .It Bq Er EINVAL The sum of the .Fa iov_len -values in the -.Fa iov -array overflowed a 32-bit integer. +values is greater than +.Dv SSIZE_MAX +(or greater than +.Dv INT_MAX , +if the sysctl +.Va debug.iosize_max_clamp +is non-zero). .It Bq Er ENOBUFS The mbuf pool has been completely exhausted when writing to a socket. .El From owner-svn-src-head@freebsd.org Mon Oct 26 00:59:42 2020 Return-Path: Delivered-To: svn-src-head@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 C6B0B45D70A; Mon, 26 Oct 2020 00:59:42 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKGhG1LY5z4lX5; Mon, 26 Oct 2020 00:59:41 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id WqrKk8B0b34axWqrLkaDb9; Sun, 25 Oct 2020 18:59:39 -0600 X-Authority-Analysis: v=2.4 cv=LvQsdlRc c=1 sm=1 tr=0 ts=5f961f7b a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=afefHYAZSVUA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=JqgKnPb5T1sKmVHZoRgA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 7A79E294; Sun, 25 Oct 2020 17:59:37 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 09Q0xbxt003944; Sun, 25 Oct 2020 17:59:37 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202010260059.09Q0xbxt003944@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: John-Mark Gurney cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367048 - head/lib/libc/sys In-reply-to: <202010260037.09Q0bVpN090953@repo.freebsd.org> References: <202010260037.09Q0bVpN090953@repo.freebsd.org> Comments: In-reply-to John-Mark Gurney message dated "Mon, 26 Oct 2020 00:37:31 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 25 Oct 2020 17:59:37 -0700 X-CMAE-Envelope: MS4xfAAKDz6ljAmeNOTYR4UXPN2Vt2+aAweSUarDJiCAx60wWBYx1Rh7ruRASBGNiJHfe04eo+7yuoibKoBujYOyzr88GlU3giHrgFdAdSva00i/k1R1Tppd MEfVpuF2rQIxT6QGRqIxriT14tXkFKr9tD4oIGLUj2Yf+sU/LPjQjLP6VR7pY/XtN3CW7cDlj+cd0OxhrXeKiaBbMl60dfM3YlGKcYuQbr/A37qxkdn1IsHL CjuxFg0rJgunIxH98JyQLnBz13SdpymzHqDl+nlS+qdZlSH7YZSGWzj79AzSBaelDyQdFG+IoTODklcGhhvfVw== X-Rspamd-Queue-Id: 4CKGhG1LY5z4lX5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 00:59:42 -0000 In message <202010260037.09Q0bVpN090953@repo.freebsd.org>, John-Mark Gurney wri tes: > Author: jmg > Date: Mon Oct 26 00:37:31 2020 > New Revision: 367048 > URL: https://svnweb.freebsd.org/changeset/base/367048 > > Log: > update write(2)'s iovec limit w/ info about the iosize_max_clamp sysctl... > > Modified: > head/lib/libc/sys/write.2 > > Modified: head/lib/libc/sys/write.2 > ============================================================================= > = > --- head/lib/libc/sys/write.2 Sun Oct 25 23:26:07 2020 (r367047) > +++ head/lib/libc/sys/write.2 Mon Oct 26 00:37:31 2020 (r367048) > @@ -28,7 +28,7 @@ > .\" @(#)write.2 8.5 (Berkeley) 4/2/94 > .\" $FreeBSD$ > .\" > -.Dd March 30, 2020 > +.Dd October 25, 2020 > .Dt WRITE 2 > .Os > .Sh NAME > @@ -240,9 +240,13 @@ array was negative. > .It Bq Er EINVAL > The sum of the > .Fa iov_len > -values in the > -.Fa iov > -array overflowed a 32-bit integer. > +values is greater than > +.Dv SSIZE_MAX > +(or greater than > +.Dv INT_MAX , > +if the sysctl > +.Va debug.iosize_max_clamp Should we also include SEE ALSO reference to sysctl(8) or sysctl(3)? Personally I think a reference to sysctl(8) would be more apropos. > +is non-zero). > .It Bq Er ENOBUFS > The mbuf pool has been completely exhausted when writing to a socket. > .El > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Mon Oct 26 01:04:25 2020 Return-Path: Delivered-To: svn-src-head@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 5BBD645D982; Mon, 26 Oct 2020 01:04:25 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKGnh0QNFz4lyb; Mon, 26 Oct 2020 01:04:23 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id Wqvtk8Co634axWqvukaEI8; Sun, 25 Oct 2020 19:04:22 -0600 X-Authority-Analysis: v=2.4 cv=LvQsdlRc c=1 sm=1 tr=0 ts=5f962096 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=afefHYAZSVUA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=YuNUQZ7bbXp38ZoGtSwA:9 a=CjuIK1q_8ugA:10 a=kOiDQLq7mmcA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id B3340298; Sun, 25 Oct 2020 18:04:20 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 09Q14Kmq004045; Sun, 25 Oct 2020 18:04:20 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202010260104.09Q14Kmq004045@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: John-Mark Gurney , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367048 - head/lib/libc/sys In-reply-to: <202010260059.09Q0xbxt003944@slippy.cwsent.com> References: <202010260037.09Q0bVpN090953@repo.freebsd.org> <202010260059.09Q0xbxt003944@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Sun, 25 Oct 2020 17:59:37 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 25 Oct 2020 18:04:20 -0700 X-CMAE-Envelope: MS4xfEzBB8jbDIRjE7Bs22UmY9vmNOTOUjfEc6ZQu56ycjldYzgMsPe0or1O0vt3coORHZZc1x+iN9ohLL7/GLU5LW+7GQ4vQv3atezZdAmJt9soGFtIjSAw ovEp8LdysPcbg36MSxzbf4bopBUdjF1RJFdq6qZ9/axW01Eyunfj6omdq640rvgTLl8CJLGKp/FM0tAmLr1uOtGXquYM6xp8awEBb5wxX2iqgN8o9Mr57lnG YLgR1AKfXKJ4Tny+eZu2Cc2lA6Ggs05Yns1klHHnWZQ2Hg7qgCztB1rnFhRFVdcsiKKuRZeCqXykcD/Wwtsc9w== X-Rspamd-Queue-Id: 4CKGnh0QNFz4lyb X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.9) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [0.16 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RWL_MAILSPIKE_GOOD(0.00)[64.59.134.9:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.229.168:received]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.134.9:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.85)[-0.854]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.62)[0.620]; NEURAL_HAM_LONG(-0.91)[-0.909]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 01:04:25 -0000 In message <202010260059.09Q0xbxt003944@slippy.cwsent.com>, Cy Schubert writes: > In message <202010260037.09Q0bVpN090953@repo.freebsd.org>, John-Mark Gurney > wri > tes: > > Author: jmg > > Date: Mon Oct 26 00:37:31 2020 > > New Revision: 367048 > > URL: https://svnweb.freebsd.org/changeset/base/367048 > > > > Log: > > update write(2)'s iovec limit w/ info about the iosize_max_clamp sysctl.. > . > > > > Modified: > > head/lib/libc/sys/write.2 > > > > Modified: head/lib/libc/sys/write.2 > > =========================================================================== > == > > = > > --- head/lib/libc/sys/write.2 Sun Oct 25 23:26:07 2020 (r36704 > 7) > > +++ head/lib/libc/sys/write.2 Mon Oct 26 00:37:31 2020 (r36704 > 8) > > @@ -28,7 +28,7 @@ > > .\" @(#)write.2 8.5 (Berkeley) 4/2/94 > > .\" $FreeBSD$ > > .\" > > -.Dd March 30, 2020 > > +.Dd October 25, 2020 > > .Dt WRITE 2 > > .Os > > .Sh NAME > > @@ -240,9 +240,13 @@ array was negative. > > .It Bq Er EINVAL > > The sum of the > > .Fa iov_len > > -values in the > > -.Fa iov > > -array overflowed a 32-bit integer. > > +values is greater than > > +.Dv SSIZE_MAX > > +(or greater than > > +.Dv INT_MAX , > > +if the sysctl > > +.Va debug.iosize_max_clamp > > Should we also include SEE ALSO reference to sysctl(8) or sysctl(3)? > Personally I think a reference to sysctl(8) would be more apropos. Or maybe both. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Mon Oct 26 03:26:20 2020 Return-Path: Delivered-To: svn-src-head@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 08F0A45FED5; Mon, 26 Oct 2020 03:26:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKKxR6MlNz4snp; Mon, 26 Oct 2020 03:26:19 +0000 (UTC) (envelope-from imp@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 BD92B14588; Mon, 26 Oct 2020 03:26:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09Q3QJgR096545; Mon, 26 Oct 2020 03:26:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09Q3QIIn096540; Mon, 26 Oct 2020 03:26:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202010260326.09Q3QIIn096540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 26 Oct 2020 03:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367051 - in head: . usr.bin/calendar usr.bin/calendar/calendars usr.bin/calendar/calendars/de_AT.ISO_8859-15 usr.bin/calendar/calendars/de_DE.ISO8859-1 usr.bin/calendar/calendars/fr_FR... X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . usr.bin/calendar usr.bin/calendar/calendars usr.bin/calendar/calendars/de_AT.ISO_8859-15 usr.bin/calendar/calendars/de_DE.ISO8859-1 usr.bin/calendar/calendars/fr_FR.ISO8859-1 usr.bin/calend... X-SVN-Commit-Revision: 367051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 03:26:20 -0000 Author: imp Date: Mon Oct 26 03:26:18 2020 New Revision: 367051 URL: https://svnweb.freebsd.org/changeset/base/367051 Log: calendar: remove all datafiles except freebsd one Move all the data files for the calendar(1) program, except calendar.freebsd to the calendar-data package. When a file can't be found, and /usr/local/share/calendar doesn't exist provide a helpful hint to install this package. Reviewed by: se@ Differential Revision: https://reviews.freebsd.org/D26926 Deleted: head/usr.bin/calendar/calendars/calendar.all head/usr.bin/calendar/calendars/calendar.australia head/usr.bin/calendar/calendars/calendar.birthday head/usr.bin/calendar/calendars/calendar.brazilian head/usr.bin/calendar/calendars/calendar.christian head/usr.bin/calendar/calendars/calendar.computer head/usr.bin/calendar/calendars/calendar.croatian head/usr.bin/calendar/calendars/calendar.dutch head/usr.bin/calendar/calendars/calendar.french head/usr.bin/calendar/calendars/calendar.german head/usr.bin/calendar/calendars/calendar.history head/usr.bin/calendar/calendars/calendar.holiday head/usr.bin/calendar/calendars/calendar.hungarian head/usr.bin/calendar/calendars/calendar.judaic head/usr.bin/calendar/calendars/calendar.lotr head/usr.bin/calendar/calendars/calendar.music head/usr.bin/calendar/calendars/calendar.newzealand head/usr.bin/calendar/calendars/calendar.russian head/usr.bin/calendar/calendars/calendar.southafrica head/usr.bin/calendar/calendars/calendar.ukrainian head/usr.bin/calendar/calendars/calendar.usholiday head/usr.bin/calendar/calendars/calendar.world head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ head/usr.bin/calendar/calendars/pt_BR.UTF-8/ head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ head/usr.bin/calendar/calendars/ru_RU.UTF-8/ head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ Modified: head/ObsoleteFiles.inc head/UPDATING head/usr.bin/calendar/Makefile head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/io.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Oct 26 01:23:14 2020 (r367050) +++ head/ObsoleteFiles.inc Mon Oct 26 03:26:18 2020 (r367051) @@ -36,6 +36,72 @@ # xargs -n1 | sort | uniq -d; # done +# 20201025: Remove cal data files +OLD_FILES+=usr/share/calendar/calendar.all +OLD_FILES+=usr/share/calendar/calendar.australia +OLD_FILES+=usr/share/calendar/calendar.birthday +OLD_FILES+=usr/share/calendar/calendar.brazilian +OLD_FILES+=usr/share/calendar/calendar.christian +OLD_FILES+=usr/share/calendar/calendar.computer +OLD_FILES+=usr/share/calendar/calendar.croatian +OLD_FILES+=usr/share/calendar/calendar.dutch +OLD_FILES+=usr/share/calendar/calendar.french +OLD_FILES+=usr/share/calendar/calendar.german +OLD_FILES+=usr/share/calendar/calendar.history +OLD_FILES+=usr/share/calendar/calendar.holiday +OLD_FILES+=usr/share/calendar/calendar.hungarian +OLD_FILES+=usr/share/calendar/calendar.judaic +OLD_FILES+=usr/share/calendar/calendar.lotr +OLD_FILES+=usr/share/calendar/calendar.music +OLD_FILES+=usr/share/calendar/calendar.newzealand +OLD_FILES+=usr/share/calendar/calendar.russian +OLD_FILES+=usr/share/calendar/calendar.southafrica +OLD_FILES+=usr/share/calendar/calendar.ukrainian +OLD_FILES+=usr/share/calendar/calendar.usholiday +OLD_FILES+=usr/share/calendar/calendar.world +OLD_FILES+=usr/share/calendar/de_AT.ISO_8859-15/calendar.feiertag +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.all +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.feiertag +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.geschichte +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.kirche +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.literatur +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.musik +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.wissenschaft +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.all +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.fetes +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.french +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.jferies +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.proverbes +OLD_FILES+=usr/share/calendar/hr_HR.ISO8859-2/calendar.all +OLD_FILES+=usr/share/calendar/hr_HR.ISO8859-2/calendar.praznici +OLD_FILES+=usr/share/calendar/hu_HU.ISO8859-2/calendar.all +OLD_FILES+=usr/share/calendar/hu_HU.ISO8859-2/calendar.nevnapok +OLD_FILES+=usr/share/calendar/hu_HU.ISO8859-2/calendar.unnepek +OLD_FILES+=usr/share/calendar/pt_BR.ISO8859-1/calendar.all +OLD_FILES+=usr/share/calendar/pt_BR.ISO8859-1/calendar.commemorative +OLD_FILES+=usr/share/calendar/pt_BR.ISO8859-1/calendar.holidays +OLD_FILES+=usr/share/calendar/pt_BR.ISO8859-1/calendar.mcommemorative +OLD_FILES+=usr/share/calendar/pt_BR.UTF-8/calendar.all +OLD_FILES+=usr/share/calendar/pt_BR.UTF-8/calendar.commemorative +OLD_FILES+=usr/share/calendar/pt_BR.UTF-8/calendar.holidays +OLD_FILES+=usr/share/calendar/pt_BR.UTF-8/calendar.mcommemorative +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.all +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.common +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.holiday +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.military +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.orthodox +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.pagan +OLD_FILES+=usr/share/calendar/ru_RU.UTF-8/calendar.all +OLD_FILES+=usr/share/calendar/ru_RU.UTF-8/calendar.common +OLD_FILES+=usr/share/calendar/ru_RU.UTF-8/calendar.holiday +OLD_FILES+=usr/share/calendar/ru_RU.UTF-8/calendar.military +OLD_FILES+=usr/share/calendar/ru_RU.UTF-8/calendar.orthodox +OLD_FILES+=usr/share/calendar/ru_RU.UTF-8/calendar.pagan +OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.all +OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.holiday +OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.misc +OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.orthodox + # 20201004: logo files renamed to type-agnostic gfx-*.lua OLD_FILES+=boot/lua/logo-beastie.lua OLD_FILES+=boot/lua/logo-beastiebw.lua Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Oct 26 01:23:14 2020 (r367050) +++ head/UPDATING Mon Oct 26 03:26:18 2020 (r367051) @@ -26,6 +26,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20101026: + All the data files for the calendar(1) program, except calendar.freebsd, + have been moved to the deskutils/calendar-data port, much like the + jewish calendar entries were moved to deskutils/hebcal years ago. After + make delete-old-files, you need to install it to retain full + functionality. calendar(1) will issue a reminder for files it can't + find. + 20200923: LINT files are no longer generated. We now include the relevant NOTES files. Note: This may cause conflicts with updating in some cases. Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Mon Oct 26 01:23:14 2020 (r367050) +++ head/usr.bin/calendar/Makefile Mon Oct 26 03:26:18 2020 (r367051) @@ -7,109 +7,14 @@ PROG= calendar SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ ostern.c paskha.c pom.c sunpos.c LIBADD= m util -INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ - hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \ - pt_BR.UTF-8 ru_RU.KOI8-R ru_RU.UTF-8 uk_UA.KOI8-U -DE_LINKS= de_DE.ISO8859-15 -FR_LINKS= fr_FR.ISO8859-15 .if ${MK_ICONV} == "yes" CFLAGS+= -DWITH_ICONV .endif FILESGROUPS+= CALS -CALS= calendars/calendar.all \ - calendars/calendar.australia \ - calendars/calendar.birthday \ - calendars/calendar.brazilian \ - calendars/calendar.christian \ - calendars/calendar.computer \ - calendars/calendar.croatian \ - calendars/calendar.dutch \ - calendars/calendar.freebsd \ - calendars/calendar.french \ - calendars/calendar.german \ - calendars/calendar.history \ - calendars/calendar.holiday \ - calendars/calendar.hungarian \ - calendars/calendar.judaic \ - calendars/calendar.lotr \ - calendars/calendar.music \ - calendars/calendar.newzealand \ - calendars/calendar.russian \ - calendars/calendar.southafrica \ - calendars/calendar.ukrainian \ - calendars/calendar.usholiday \ - calendars/calendar.world +CALS= calendars/calendar.freebsd CALSDIR= ${SHAREDIR}/calendar - -CAL_de_AT.ISO_8859-15= calendar.feiertag - -CAL_de_DE.ISO8859-1= calendar.all \ - calendar.feiertag \ - calendar.geschichte \ - calendar.kirche \ - calendar.literatur \ - calendar.musik \ - calendar.wissenschaft - -CAL_fr_FR.ISO8859-1= calendar.all \ - calendar.fetes \ - calendar.french \ - calendar.jferies \ - calendar.proverbes - -CAL_hr_HR.ISO8859-2= calendar.all \ - calendar.praznici - -CAL_hu_HU.ISO8859-2= calendar.all \ - calendar.nevnapok \ - calendar.unnepek - -CAL_pt_BR.ISO8859-1= calendar.all \ - calendar.commemorative \ - calendar.holidays \ - calendar.mcommemorative - -CAL_pt_BR.UTF-8= calendar.all \ - calendar.commemorative \ - calendar.holidays \ - calendar.mcommemorative - -CAL_ru_RU.KOI8-R= calendar.all \ - calendar.common \ - calendar.holiday \ - calendar.military \ - calendar.orthodox \ - calendar.pagan - -CAL_ru_RU.UTF-8= calendar.all \ - calendar.common \ - calendar.holiday \ - calendar.military \ - calendar.orthodox \ - calendar.pagan - -CAL_uk_UA.KOI8-U= calendar.all \ - calendar.holiday \ - calendar.misc \ - calendar.orthodox - -.for lang in ${INTER} -FILESGROUPS+= CALS_${lang} -CALS_${lang}DIR= ${SHAREDIR}/calendar/${lang} -.for file in ${CAL_${lang}} -CALS_${lang}+= ${file:S@^@calendars/${lang}/@} -.endfor -.endfor - - -.for link in ${DE_LINKS} -SYMLINKS+= de_DE.ISO8859-1 ${SHAREDIR}/calendar/${link} -.endfor -.for link in ${FR_LINKS} -SYMLINKS+= fr_FR.ISO8859-1 ${SHAREDIR}/calendar/${link} -.endfor HAS_TESTS= SUBDIR.${MK_TESTS}+= tests Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Mon Oct 26 01:23:14 2020 (r367050) +++ head/usr.bin/calendar/calendar.1 Mon Oct 26 03:26:18 2020 (r367051) @@ -28,7 +28,7 @@ .\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 .\" $FreeBSD$ .\" -.Dd October 23, 2020 +.Dd October 25, 2020 .Dt CALENDAR 1 .Os .Sh NAME @@ -255,8 +255,8 @@ The order of precedence in searches for a calendar fil current directory, ~/.calendar, /usr/local/share/calendar, /usr/share/calendar. Files of similar names are ignored in lower precedence locations. .Pp -The following default calendar files are provided in -.Pa /usr/share/calendar : +The following default calendar files are provided by the +deskutils/calendar-data port. .Pp .Bl -tag -width calendar.southafrica -compact .It Pa calendar.all @@ -291,8 +291,8 @@ Other holidays, including the not-well-known, obscure, obscure. .It Pa calendar.judaic Jewish holidays. -The entries for this calendar have been obtained from the port -deskutils/hebcal. +The entries for this calendar have been obtained from the +deskutils/hebcal port. .It Pa calendar.music Musical events, births, and deaths. Strongly oriented toward rock 'n' roll. Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Mon Oct 26 01:23:14 2020 (r367050) +++ head/usr.bin/calendar/io.c Mon Oct 26 03:26:18 2020 (r367051) @@ -109,6 +109,8 @@ cal_fopen(const char *file) FILE *fp; char *home = getenv("HOME"); unsigned int i; + struct stat sb; + static bool warned = false; if (home == NULL || *home == '\0') { warnx("Cannot get home directory"); @@ -129,6 +131,10 @@ cal_fopen(const char *file) } warnx("can't open calendar file \"%s\"", file); + if (!warned && stat(_PATH_INCLUDE_LOCAL, &sb) != 0) { + warnx("calendar data files now provided by calendar-data pkg."); + warned = true; + } return (NULL); } From owner-svn-src-head@freebsd.org Mon Oct 26 04:04:07 2020 Return-Path: Delivered-To: svn-src-head@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 618AB438FC5; Mon, 26 Oct 2020 04:04:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKLn31gzLz4vSd; Mon, 26 Oct 2020 04:04:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D10614D36; Mon, 26 Oct 2020 04:04:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09Q4460e021251; Mon, 26 Oct 2020 04:04:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09Q446wQ021250; Mon, 26 Oct 2020 04:04:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202010260404.09Q446wQ021250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 26 Oct 2020 04:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367052 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 367052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 04:04:07 -0000 Author: mav Date: Mon Oct 26 04:04:06 2020 New Revision: 367052 URL: https://svnweb.freebsd.org/changeset/base/367052 Log: Enable bioq 'car limit' added at r335066 at 128 bios. Without the 'car limit' enabled (before this), running sequential ZFS scrub on HDD without command queuing support, I've measured latency on concurrent random reads reaching 4 seconds (surprised that not more). Enabling this reduced the latency to 65 milliseconds, while scrub still doing ~180MB/s. For disks with command queuing this does not make much difference (if any), since most time all the requests are queued down to the disk or HBA, leaving nothing in the queue to sort. And even if something does not fit, staying on the queue, it is likely not for long. To not limit sorting in such bursty scenarios I've added batched counter zeroing when the queue is getting empty. The internal scheduler of the SAS HDD I was testing seems to be even more loyal to random I/O, reducing the scrub speed to ~120MB/s. So in case somebody worried this is limit is too strict -- it actually looks relaxed. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/kern/subr_disk.c Modified: head/sys/kern/subr_disk.c ============================================================================== --- head/sys/kern/subr_disk.c Mon Oct 26 03:26:18 2020 (r367051) +++ head/sys/kern/subr_disk.c Mon Oct 26 04:04:06 2020 (r367052) @@ -26,7 +26,7 @@ __FBSDID("$FreeBSD$"); #include #include -static int bioq_batchsize = 0; +static int bioq_batchsize = 128; SYSCTL_INT(_debug, OID_AUTO, bioq_batchsize, CTLFLAG_RW, &bioq_batchsize, 0, "BIOQ batch size"); @@ -172,6 +172,8 @@ bioq_remove(struct bio_queue_head *head, struct bio *b head->insert_point = NULL; TAILQ_REMOVE(&head->queue, bp, bio_queue); + if (TAILQ_EMPTY(&head->queue)) + head->batched = 0; head->total--; } From owner-svn-src-head@freebsd.org Mon Oct 26 05:22:53 2020 Return-Path: Delivered-To: svn-src-head@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 1561443A8EF; Mon, 26 Oct 2020 05:22:53 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKNWw6kHdz3TxR; Mon, 26 Oct 2020 05:22:52 +0000 (UTC) (envelope-from scottl@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 C9FF0158B1; Mon, 26 Oct 2020 05:22:52 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09Q5Mq7d070544; Mon, 26 Oct 2020 05:22:52 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09Q5Mq6M070543; Mon, 26 Oct 2020 05:22:52 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202010260522.09Q5Mq6M070543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 26 Oct 2020 05:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367053 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 367053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 05:22:53 -0000 Author: scottl Date: Mon Oct 26 05:22:52 2020 New Revision: 367053 URL: https://svnweb.freebsd.org/changeset/base/367053 Log: Correct calendar entry for myself Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Oct 26 04:04:06 2020 (r367052) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Oct 26 05:22:52 2020 (r367053) @@ -331,7 +331,7 @@ 08/24 Alexander Botero-Lowry died in San Francisco, California, United States, 2012 08/25 Beech Rintoul born in Oakland, California, United States, 1952 08/25 Jean Milanez Melo born in Divinopolis, Minas Gerais, Brazil, 1982 -08/26 Scott Long born in Chicago, Illinois, United States, 1974 +08/25 Scott Long born in Chicago, Illinois, United States, 1974 08/26 Dima Ruban born in Nalchik, USSR, 1970 08/26 Marc Fonvieille born in Avignon, France, 1972 08/26 Herve Quiroz born in Aix-en-Provence, France, 1977 From owner-svn-src-head@freebsd.org Mon Oct 26 06:00:47 2020 Return-Path: Delivered-To: svn-src-head@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 B861E43B398; Mon, 26 Oct 2020 06:00:47 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from ravenloft.kiev.ua (ravenloft.kiev.ua [94.244.131.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKPMg31wQz3WY4; Mon, 26 Oct 2020 06:00:47 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Date: Mon, 26 Oct 2020 07:00:38 +0100 From: Alex Kozlov To: Stefan Esser Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar Message-ID: <20201026060038.GA78455@ravenloft.kiev.ua> References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> X-Rspamd-Queue-Id: 4CKPMg31wQz3WY4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:34743, ipnet:94.244.128.0/18, country:UA]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 06:00:47 -0000 On Sun, Oct 25, 2020 at 11:37:34AM +0100, Stefan Esser wrote: > Am 25.10.20 um 06:56 schrieb Alex Kozlov: > > On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: > > > Am 24.10.20 um 09:48 schrieb Alex Kozlov: > [...] > > > > You are hardcoding assumption that LOCALBASE = /usr/local. Please make it > > > > overridable with LOCALBASE environment variable. > > > This was a trivial change to get us going with calendars provided by > > > a port (which has not been committed, yet - therefore there are no > > > port-provided calendars, neither under /usr/local nor under any other > > > PREFIX, as of now). > > > > > I understand what you are asking for, but in such a case I'd rather > > > think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in > > > paths.h. > > The PREFIX != LOCALBASE and both != /usr/local configurations > > are supported in the ports tree and the base for a long time, please see > > https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html > > Yes, and I do not need to look that up in the handbook, having been > a ports committer for 2 decades by now. > > > If after this commit you need to rebuild base to use non-default LOCALBASE/PREFIX > > it is pretty big regression and POLA. > > How is that any different than before? > > What I did is make the PATH easier to change when you rebuild base. > > There are numerous programs in base that contain the literal string > /usr/local - and what I did was implement a mechanism that allows > to replace this literal reference with a simple change in paths.h. > > If you do not modify paths.h for a different LOCALBASE, then you'll > get a wrong _PATH_DEFPATH compiled into your binaries, for example. > > > > And I have made this a single instance that needs to be changed. > > > Before my change there were 2 instances of /usr/local hard-coded > > > in _PATH_DEFPATH - now you have to only change the definition of > > > _PATH_LOCALBASE to adjust all 3 locations that use it. > > I think you made situation worse, there were two stray hardcoded > > string and now there is official LOCALBASE define which likely will be > > used by other people in the future. > > I'd hope so to get rid of many of the 1713 literal uses of /usr/local > in our source tree. > > > > If you can show me precedence of a LOCALBASE environment variable > > > being used in the way you suggest, I'd be willing to make calendar > > > use it. > > Just an analogy from LOCALBASE make variable, perhaps CALENDAR_HOME > > is a better name. > > Yes, I already suggested CALENDAR_HOME, but as an environment variable > to check, if you want to be able to path an additional directory (or > search path) to the calendar program at run-time. But why introduce > a CALENDAR_HOME macro in the sources, if the port supplied calendar > files are known to be found at LOCALBASE/share/calendar (for some value > of LOCALBASE). > > I want to make more programs that currently hard-code /usr/local use > _PATH_LOCALBASE instead. This C macro can then be default to /usr/local > but can be overridden by passing LOCALBASE to the compiler (from the > build infrastructure) when paths.h is included. > > Instead of referring to _PATH_LOCALBASE these files could directly use > LOCALBASE, but since other paths are defined as _PATH_xxx in paths.h I > think it is best to follow this precedent. > > > > But then I think a CALENDAR_HOME variable would be even more useful, > > > since it would allow to search an additional user selected directory > > > (and not just share/calendar within what you provide as LOCALBASE). > > My change did not add any dependency on LOCALBASE to any previously > existing functionality. It added support for calendar files provided > by a port (a feature that did not exist before) at a location that is > correct for the big majority of users (who do not modify LOCALBASE). > > As I said: I'm going to make it easier to build the base system with > a different LOCALBASE, but not by run-time checking an environment > variable that specifies LOCALBASE in each affected program. It seems that you intend to follow through no matter what. So, just for the record, I think that hardcoding LOCALBASE and requiring base rebuild to change it is a very wrong approach. -- Alex From owner-svn-src-head@freebsd.org Mon Oct 26 06:12:10 2020 Return-Path: Delivered-To: svn-src-head@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 1CD8E43B369 for ; Mon, 26 Oct 2020 06:12:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKPcn0MlDz3WyV for ; Mon, 26 Oct 2020 06:12:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72b.google.com with SMTP id s14so7399019qkg.11 for ; Sun, 25 Oct 2020 23:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6ho2WvA8ra3ZkXL05mfwNKb+Xvlu5qTCWf07nTr1Csc=; b=M2aePl4XYfzbwXmVr6+gEQDaRVlRoniWTMvF5fO2Uu5C4pslTmP2cGqIv8DMUIr11X el7MNeGqSQ1PBV0pNN1iiQOHfpZz5CrWSchoiFcb+Une6XHiF6tO3RgHf2kJX9jETpYh 8chHtxXbyDPGErIh2/aO7jkirE6nsDFWhGKpA+X61ZibEKrLXWZaZwzCGWDLME4V8+eR osz+YyezVhA2k4W/rB8amztUp0n2UrFJ6ADhUeDMb71eVf840596X6/TMOn5o8E6WKlJ afhuE05JX46jYsLqeStIGn5pzv5tPAJVofJKVx4LL3tuMRUWMn6YEzMf4fiHO9Ij4XAr k19g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6ho2WvA8ra3ZkXL05mfwNKb+Xvlu5qTCWf07nTr1Csc=; b=mbSFDkxZl1kUBUbFN1hXE3kKsTgNO3Y07SyJJp8yOHOKkxSW011AcXTBNkBY2Lo4ks xeAwL2rLYffmXMuvdr8kHmbNet+iqHgRIjQx7+Hc76jw8hbuIGY6ZEUAt+aE5FUZwRCB cdukXKRqVCs5NNqZ3KCTSScr6OcUbFM1bxeERfZEIHqqXirBI8FuhAohPq53lyJLF9I7 8BVevw9Wrph0c8TLTJmfp3pEskk/RTrVULKWUsNuLYOdegZqXnL+WAYQ0Bar60ZlvbfB RqegIj6rm460fFctZaBLUTdsQ7xIYICWnZyqnP8IRBXMfRZy7U88ImLjg4iP493O5EjW mrwA== X-Gm-Message-State: AOAM532n7hAOKFFdehKAStKJhIoatLQ33QATbyt1Fz4I6Rem190cShIy SrrRpKEEVIcYop6+MOkVj0jS4T6PrhYtQy1JS/+tpg== X-Google-Smtp-Source: ABdhPJyNQP2kkSQd0S+gVZkSkWLQu/EVFk6MsgIqXVHGIBhZCfLp5K41ewVEMsP73YvmyRi410gcTgAYhI/375QF++U= X-Received: by 2002:a37:63c1:: with SMTP id x184mr13396539qkb.195.1603692727551; Sun, 25 Oct 2020 23:12:07 -0700 (PDT) MIME-Version: 1.0 References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> <20201026060038.GA78455@ravenloft.kiev.ua> In-Reply-To: <20201026060038.GA78455@ravenloft.kiev.ua> From: Warner Losh Date: Mon, 26 Oct 2020 00:11:56 -0600 Message-ID: Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar To: Alex Kozlov Cc: Stefan Esser , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4CKPcn0MlDz3WyV X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=M2aePl4X; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.38 / 15.00]; ARC_NA(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.92)[-0.919]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.46)[-1.461]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72b:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 06:12:10 -0000 On Mon, Oct 26, 2020 at 12:01 AM Alex Kozlov wrote: > On Sun, Oct 25, 2020 at 11:37:34AM +0100, Stefan Esser wrote: > > Am 25.10.20 um 06:56 schrieb Alex Kozlov: > > > On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: > > > > Am 24.10.20 um 09:48 schrieb Alex Kozlov: > > [...] > > > > > You are hardcoding assumption that LOCALBASE = /usr/local. Please > make it > > > > > overridable with LOCALBASE environment variable. > > > > This was a trivial change to get us going with calendars provided by > > > > a port (which has not been committed, yet - therefore there are no > > > > port-provided calendars, neither under /usr/local nor under any other > > > > PREFIX, as of now). > > > > > > > I understand what you are asking for, but in such a case I'd rather > > > > think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in > > > > paths.h. > > > The PREFIX != LOCALBASE and both != /usr/local configurations > > > are supported in the ports tree and the base for a long time, please > see > > > > https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html > > > > Yes, and I do not need to look that up in the handbook, having been > > a ports committer for 2 decades by now. > > > > > If after this commit you need to rebuild base to use non-default > LOCALBASE/PREFIX > > > it is pretty big regression and POLA. > > > > How is that any different than before? > > > > What I did is make the PATH easier to change when you rebuild base. > > > > There are numerous programs in base that contain the literal string > > /usr/local - and what I did was implement a mechanism that allows > > to replace this literal reference with a simple change in paths.h. > > > > If you do not modify paths.h for a different LOCALBASE, then you'll > > get a wrong _PATH_DEFPATH compiled into your binaries, for example. > > > > > > And I have made this a single instance that needs to be changed. > > > > Before my change there were 2 instances of /usr/local hard-coded > > > > in _PATH_DEFPATH - now you have to only change the definition of > > > > _PATH_LOCALBASE to adjust all 3 locations that use it. > > > I think you made situation worse, there were two stray hardcoded > > > string and now there is official LOCALBASE define which likely will be > > > used by other people in the future. > > > > I'd hope so to get rid of many of the 1713 literal uses of /usr/local > > in our source tree. > > > > > > If you can show me precedence of a LOCALBASE environment variable > > > > being used in the way you suggest, I'd be willing to make calendar > > > > use it. > > > Just an analogy from LOCALBASE make variable, perhaps CALENDAR_HOME > > > is a better name. > > > > Yes, I already suggested CALENDAR_HOME, but as an environment variable > > to check, if you want to be able to path an additional directory (or > > search path) to the calendar program at run-time. But why introduce > > a CALENDAR_HOME macro in the sources, if the port supplied calendar > > files are known to be found at LOCALBASE/share/calendar (for some value > > of LOCALBASE). > > > > I want to make more programs that currently hard-code /usr/local use > > _PATH_LOCALBASE instead. This C macro can then be default to /usr/local > > but can be overridden by passing LOCALBASE to the compiler (from the > > build infrastructure) when paths.h is included. > > > > Instead of referring to _PATH_LOCALBASE these files could directly use > > LOCALBASE, but since other paths are defined as _PATH_xxx in paths.h I > > think it is best to follow this precedent. > > > > > > But then I think a CALENDAR_HOME variable would be even more useful, > > > > since it would allow to search an additional user selected directory > > > > (and not just share/calendar within what you provide as LOCALBASE). > > > > My change did not add any dependency on LOCALBASE to any previously > > existing functionality. It added support for calendar files provided > > by a port (a feature that did not exist before) at a location that is > > correct for the big majority of users (who do not modify LOCALBASE). > > > > As I said: I'm going to make it easier to build the base system with > > a different LOCALBASE, but not by run-time checking an environment > > variable that specifies LOCALBASE in each affected program. > It seems that you intend to follow through no matter what. So, just for > the record, I think that hardcoding LOCALBASE and requiring base rebuild > to change it is a very wrong approach. > So, first off, it's already hard coded. Stefan's changes change the hard coding from 'impossible to change' to 'changeable with a recompile' which is an improvement. It might even wind up as a build variable (or not, doing that has some really ugly, nasty dependencies). But even in ports-land, it's a compile time constant. Quite a large number of ports will allow you to change it at compile / build time, but not after. You have to rebuild if you want to change PREFIX... So I'm a bit puzzled what makes this the wrong approach? Warner From owner-svn-src-head@freebsd.org Mon Oct 26 07:51:31 2020 Return-Path: Delivered-To: svn-src-head@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 0783C43D5B7; Mon, 26 Oct 2020 07:51:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKRqQ6CQLz3bwb; Mon, 26 Oct 2020 07:51:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 8CA2C20530; Mon, 26 Oct 2020 07:51:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id B6C6933BA0; Mon, 26 Oct 2020 08:50:57 +0100 (CET) Date: Mon, 26 Oct 2020 08:50:57 +0100 From: Baptiste Daroussin To: Warner Losh Cc: Alex Kozlov , Stefan Esser , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar Message-ID: <20201026075057.rbiwxbinzpkhh2tp@ivaldir.net> References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> <20201026060038.GA78455@ravenloft.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="te5rghvxt5kons5s" Content-Disposition: inline In-Reply-To: X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 07:51:31 -0000 --te5rghvxt5kons5s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 26, 2020 at 12:11:56AM -0600, Warner Losh wrote: > On Mon, Oct 26, 2020 at 12:01 AM Alex Kozlov wrote: >=20 > > On Sun, Oct 25, 2020 at 11:37:34AM +0100, Stefan Esser wrote: > > > Am 25.10.20 um 06:56 schrieb Alex Kozlov: > > > > On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: > > > > > Am 24.10.20 um 09:48 schrieb Alex Kozlov: > > > [...] > > > > > > You are hardcoding assumption that LOCALBASE =3D /usr/local. Pl= ease > > make it > > > > > > overridable with LOCALBASE environment variable. > > > > > This was a trivial change to get us going with calendars provided= by > > > > > a port (which has not been committed, yet - therefore there are no > > > > > port-provided calendars, neither under /usr/local nor under any o= ther > > > > > PREFIX, as of now). > > > > > > > > > I understand what you are asking for, but in such a case I'd rath= er > > > > > think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in > > > > > paths.h. > > > > The PREFIX !=3D LOCALBASE and both !=3D /usr/local configurations > > > > are supported in the ports tree and the base for a long time, please > > see > > > > > > https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/port= ing-prefix.html > > > > > > Yes, and I do not need to look that up in the handbook, having been > > > a ports committer for 2 decades by now. > > > > > > > If after this commit you need to rebuild base to use non-default > > LOCALBASE/PREFIX > > > > it is pretty big regression and POLA. > > > > > > How is that any different than before? > > > > > > What I did is make the PATH easier to change when you rebuild base. > > > > > > There are numerous programs in base that contain the literal string > > > /usr/local - and what I did was implement a mechanism that allows > > > to replace this literal reference with a simple change in paths.h. > > > > > > If you do not modify paths.h for a different LOCALBASE, then you'll > > > get a wrong _PATH_DEFPATH compiled into your binaries, for example. > > > > > > > > And I have made this a single instance that needs to be changed. > > > > > Before my change there were 2 instances of /usr/local hard-coded > > > > > in _PATH_DEFPATH - now you have to only change the definition of > > > > > _PATH_LOCALBASE to adjust all 3 locations that use it. > > > > I think you made situation worse, there were two stray hardcoded > > > > string and now there is official LOCALBASE define which likely will= be > > > > used by other people in the future. > > > > > > I'd hope so to get rid of many of the 1713 literal uses of /usr/local > > > in our source tree. > > > > > > > > If you can show me precedence of a LOCALBASE environment variable > > > > > being used in the way you suggest, I'd be willing to make calendar > > > > > use it. > > > > Just an analogy from LOCALBASE make variable, perhaps CALENDAR_HOME > > > > is a better name. > > > > > > Yes, I already suggested CALENDAR_HOME, but as an environment variable > > > to check, if you want to be able to path an additional directory (or > > > search path) to the calendar program at run-time. But why introduce > > > a CALENDAR_HOME macro in the sources, if the port supplied calendar > > > files are known to be found at LOCALBASE/share/calendar (for some val= ue > > > of LOCALBASE). > > > > > > I want to make more programs that currently hard-code /usr/local use > > > _PATH_LOCALBASE instead. This C macro can then be default to /usr/loc= al > > > but can be overridden by passing LOCALBASE to the compiler (from the > > > build infrastructure) when paths.h is included. > > > > > > Instead of referring to _PATH_LOCALBASE these files could directly use > > > LOCALBASE, but since other paths are defined as _PATH_xxx in paths.h I > > > think it is best to follow this precedent. > > > > > > > > But then I think a CALENDAR_HOME variable would be even more usef= ul, > > > > > since it would allow to search an additional user selected direct= ory > > > > > (and not just share/calendar within what you provide as LOCALBASE= ). > > > > > > My change did not add any dependency on LOCALBASE to any previously > > > existing functionality. It added support for calendar files provided > > > by a port (a feature that did not exist before) at a location that is > > > correct for the big majority of users (who do not modify LOCALBASE). > > > > > > As I said: I'm going to make it easier to build the base system with > > > a different LOCALBASE, but not by run-time checking an environment > > > variable that specifies LOCALBASE in each affected program. > > It seems that you intend to follow through no matter what. So, just for > > the record, I think that hardcoding LOCALBASE and requiring base rebuild > > to change it is a very wrong approach. > > >=20 > So, first off, it's already hard coded. Stefan's changes change the hard > coding from 'impossible to change' to 'changeable with a recompile' which > is an improvement. It might even wind up as a build variable (or not, doi= ng > that has some really ugly, nasty dependencies). >=20 > But even in ports-land, it's a compile time constant. Quite a large number > of ports will allow you to change it at compile / build time, but not > after. You have to rebuild if you want to change PREFIX... >=20 > So I'm a bit puzzled what makes this the wrong approach? >=20 I think what Alex revents to is the following: Some utilities in base base either have a configurable way to look for thin= gs in localbase (via configuration entries for instances): - syslog - periodic - rc - man Some have hardcoded LOCALBASE but only after looking first at the LOCALBASE= env var: - usr.sbin/pkg - mailwrapper which means with a prebuilt base I can still rebuild all my packages with a different localbase and it will work with only a few configurations changes. which imho is a good target. The list of tools which hardcodes /usr/local - calendar - fortune - cron - bsnmp - nvmecontrol - cpucontrol (at least can be workaround via -d option) Bapt --te5rghvxt5kons5s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAl+Wf9oACgkQY4mL3PG3 PlpTORAArCx5TliZ1kjVu9A90Dsb2nj/MncYEgeFlji/dcBycAHy4lBFBnoFWGno Mn4TA4ZQTNTvyEyko0slrsE12T7h/pp+9026Grf9A3yLy39TixKPhBU3FEQbcVkx 8zDpo+iC0LxMnQqHNDOu8oLrFhCRzttr5kHV51wK/n/RCVY/jtLynfoVNMXrOeFe rZmKS/sg1wT+rVtgTU3jEz+N2xCepma0ffKLv8j7iCMJh+fpMqgBdpBSIgQB9MpO Z5qWkCsIAS4BGyZCg7O20WJW/bea9M8bB2uBweo4n8sH1RmQdv/YKttImfAVdnsX k7UwsNkaP0dY62vYUTmOulCr2/Ij+TI7Hy2NmgRYi8MsSemPytCcqlzQGz1e6rCz bJ+LetObwvFuC0nRlNg2Xy1luZIiGGhF7h9GjoU25PRHurS5zyS98CLjk+NLI0gV txvT5zeP97CnP3m7ViPkggUknedzP9ErdywADVuMBz4YjvM+Ck3g8KPpI4YqaGnr tXZW35iu+w9KMgOqQgASTXMOS1SM7OkTL7n+5QrZHR89kF8O9+DzjqY6FV1lAluV g5L4VgD8OoBmJEFlE/VPYniefqBz63rsF47MXXO+oDgLuuNPGTe5ipciYP96NtHd miVhrcteWi/oI3sOqCUXUJVGgIcuOB4pGq5Tk8vtqxbM8KdCN5g= =taSX -----END PGP SIGNATURE----- --te5rghvxt5kons5s-- From owner-svn-src-head@freebsd.org Mon Oct 26 08:05:33 2020 Return-Path: Delivered-To: svn-src-head@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 4ADC243E317; Mon, 26 Oct 2020 08:05:33 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKS7c2N6Vz3d47; Mon, 26 Oct 2020 08:05:32 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.west.internal (Postfix) with ESMTP id 38496938; Mon, 26 Oct 2020 04:05:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 26 Oct 2020 04:05:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=g X3agLtDrfWUlTTMO1VVT3D9T9XElRQiABkjy/AFSa0=; b=c2th8N8WGr+pLETzo juE5HNg3YYJcB3rvhgzhdcGoaOUEnFBuKb2FVlLOFK6nlnAUVcYOZyPiWqCwj7r8 cUns3u5PHBjOg9sSikevM8KMecgpTitvRKlAUNs2SlUpnISDnthl1/CKAl/ePCnF oMpf1Yq1ihs2SOkBiky9wVxJe38nK9xNQIrsKfWhGjZv1Pp9Q5iEhfCtpNLSeKOg yUEUZ6Cil6Gi3ENOHaFVXSNymtd8vL8djR9A5rrGtmdo6Ni4Iqww3rlm1AFFNFI3 0gF99NQQK6SYffv6EeEvvv4kc4B1V5/Cw7ZRdbYxIQriObMFLKBTkomSDs3gHtos nt4Eg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=gX3agLtDrfWUlTTMO1VVT3D9T9XElRQiABkjy/AFS a0=; b=UxtbJXGjM1XhDfpYTFkpwo5R71W4ai1fRQibKsvzjGSeuOUJBIda0IjK0 7drR7LVOaZHfGYfmADSdAdJ6K6bMWnV6hYmxDMY8bIL0vMVlnLfajc8yW+4EJ0Q0 o/JsZbOaqxD2GTiSVXFzVqDHFG8Nm9oFoDA/w7zgJPtdo9WZJWTrx87LUeCfitVP hbObtd/jRKoC7ZW/YW7C7QJ05Q+xYM9woNDx9RWqzuNQ1zLaw5nrrmqf4x3TvJAw FTsoOSTjE/yHiPgsNBpAwVs1o7Swm7u4tmU9AI4nXs8IRkpJeFov21o9HBwlKHjc eCbiaJuk2Qorl7X9EA4hMGmPPVWnQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkeehgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne goofgvughsqdftgedtgedqtdeiucdlfedttddmnecujfgurheptggguffhjgffgffkfhfv ofesthhqmhdthhdtjeenucfhrhhomhepufgtohhtthcunfhonhhguceoshgtohhtthhlse hsrghmshgtohdrohhrgheqnecuggftrfgrthhtvghrnhepudduveekheehiedukeekleel vedufeevfeetudfgtdffteffleehheffueffgfehnecuffhomhgrihhnpehfrhgvvggssh gurdhorhhgnecukfhppeekrdegiedrkeelrddvudefnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepshgtohhtthhlsehsrghmshgtohdrohhrgh X-ME-Proxy: Received: from [192.168.0.114] (unknown [8.46.89.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 090693280063; Mon, 26 Oct 2020 04:05:28 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar From: Scott Long In-Reply-To: <20201026075057.rbiwxbinzpkhh2tp@ivaldir.net> Date: Mon, 26 Oct 2020 02:05:28 -0600 Cc: Warner Losh , Alex Kozlov , Stefan Esser , src-committers , svn-src-all , svn-src-head Content-Transfer-Encoding: quoted-printable Message-Id: <8242C5E5-0F9E-4C17-BDBF-1926AF580325@samsco.org> References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> <20201026060038.GA78455@ravenloft.kiev.ua> <20201026075057.rbiwxbinzpkhh2tp@ivaldir.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4CKS7c2N6Vz3d47 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=samsco.org header.s=fm1 header.b=c2th8N8W; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=UxtbJXGj; dmarc=none; spf=pass (mx1.freebsd.org: domain of scottl@samsco.org designates 64.147.123.17 as permitted sender) smtp.mailfrom=scottl@samsco.org X-Spamd-Result: default: False [-3.03 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[samsco.org:s=fm1,messagingengine.com:s=fm1]; FREEFALL_USER(0.00)[scottl]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.17]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[samsco.org]; NEURAL_HAM_LONG(-1.01)[-1.007]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[samsco.org:+,messagingengine.com:+]; NEURAL_HAM_SHORT(-0.93)[-0.927]; RCPT_COUNT_SEVEN(0.00)[7]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.17:from] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 08:05:33 -0000 > On Oct 26, 2020, at 1:50 AM, Baptiste Daroussin = wrote: >=20 > On Mon, Oct 26, 2020 at 12:11:56AM -0600, Warner Losh wrote: >> On Mon, Oct 26, 2020 at 12:01 AM Alex Kozlov wrote: >>=20 >>> On Sun, Oct 25, 2020 at 11:37:34AM +0100, Stefan Esser wrote: >>>> Am 25.10.20 um 06:56 schrieb Alex Kozlov: >>>>> On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: >>>>>> Am 24.10.20 um 09:48 schrieb Alex Kozlov: >>>> [...] >>>>>>> You are hardcoding assumption that LOCALBASE =3D /usr/local. = Please >>> make it >>>>>>> overridable with LOCALBASE environment variable. >>>>>> This was a trivial change to get us going with calendars provided = by >>>>>> a port (which has not been committed, yet - therefore there are = no >>>>>> port-provided calendars, neither under /usr/local nor under any = other >>>>>> PREFIX, as of now). >>>>>=20 >>>>>> I understand what you are asking for, but in such a case I'd = rather >>>>>> think you want to rebuild FreeBSD with _PATH_LOCALBASE modified = in >>>>>> paths.h. >>>>> The PREFIX !=3D LOCALBASE and both !=3D /usr/local configurations >>>>> are supported in the ports tree and the base for a long time, = please >>> see >>>>>=20 >>> = https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting= -prefix.html >>>>=20 >>>> Yes, and I do not need to look that up in the handbook, having been >>>> a ports committer for 2 decades by now. >>>>=20 >>>>> If after this commit you need to rebuild base to use non-default >>> LOCALBASE/PREFIX >>>>> it is pretty big regression and POLA. >>>>=20 >>>> How is that any different than before? >>>>=20 >>>> What I did is make the PATH easier to change when you rebuild base. >>>>=20 >>>> There are numerous programs in base that contain the literal string >>>> /usr/local - and what I did was implement a mechanism that allows >>>> to replace this literal reference with a simple change in paths.h. >>>>=20 >>>> If you do not modify paths.h for a different LOCALBASE, then you'll >>>> get a wrong _PATH_DEFPATH compiled into your binaries, for example. >>>>=20 >>>>>> And I have made this a single instance that needs to be changed. >>>>>> Before my change there were 2 instances of /usr/local hard-coded >>>>>> in _PATH_DEFPATH - now you have to only change the definition of >>>>>> _PATH_LOCALBASE to adjust all 3 locations that use it. >>>>> I think you made situation worse, there were two stray hardcoded >>>>> string and now there is official LOCALBASE define which likely = will be >>>>> used by other people in the future. >>>>=20 >>>> I'd hope so to get rid of many of the 1713 literal uses of = /usr/local >>>> in our source tree. >>>>=20 >>>>>> If you can show me precedence of a LOCALBASE environment variable >>>>>> being used in the way you suggest, I'd be willing to make = calendar >>>>>> use it. >>>>> Just an analogy from LOCALBASE make variable, perhaps = CALENDAR_HOME >>>>> is a better name. >>>>=20 >>>> Yes, I already suggested CALENDAR_HOME, but as an environment = variable >>>> to check, if you want to be able to path an additional directory = (or >>>> search path) to the calendar program at run-time. But why introduce >>>> a CALENDAR_HOME macro in the sources, if the port supplied calendar >>>> files are known to be found at LOCALBASE/share/calendar (for some = value >>>> of LOCALBASE). >>>>=20 >>>> I want to make more programs that currently hard-code /usr/local = use >>>> _PATH_LOCALBASE instead. This C macro can then be default to = /usr/local >>>> but can be overridden by passing LOCALBASE to the compiler (from = the >>>> build infrastructure) when paths.h is included. >>>>=20 >>>> Instead of referring to _PATH_LOCALBASE these files could directly = use >>>> LOCALBASE, but since other paths are defined as _PATH_xxx in = paths.h I >>>> think it is best to follow this precedent. >>>>=20 >>>>>> But then I think a CALENDAR_HOME variable would be even more = useful, >>>>>> since it would allow to search an additional user selected = directory >>>>>> (and not just share/calendar within what you provide as = LOCALBASE). >>>>=20 >>>> My change did not add any dependency on LOCALBASE to any previously >>>> existing functionality. It added support for calendar files = provided >>>> by a port (a feature that did not exist before) at a location that = is >>>> correct for the big majority of users (who do not modify = LOCALBASE). >>>>=20 >>>> As I said: I'm going to make it easier to build the base system = with >>>> a different LOCALBASE, but not by run-time checking an environment >>>> variable that specifies LOCALBASE in each affected program. >>> It seems that you intend to follow through no matter what. So, just = for >>> the record, I think that hardcoding LOCALBASE and requiring base = rebuild >>> to change it is a very wrong approach. >>>=20 >>=20 >> So, first off, it's already hard coded. Stefan's changes change the = hard >> coding from 'impossible to change' to 'changeable with a recompile' = which >> is an improvement. It might even wind up as a build variable (or not, = doing >> that has some really ugly, nasty dependencies). >>=20 >> But even in ports-land, it's a compile time constant. Quite a large = number >> of ports will allow you to change it at compile / build time, but not >> after. You have to rebuild if you want to change PREFIX... >>=20 >> So I'm a bit puzzled what makes this the wrong approach? >>=20 >=20 > I think what Alex revents to is the following: >=20 > Some utilities in base base either have a configurable way to look for = things in > localbase (via configuration entries for instances): > - syslog > - periodic > - rc > - man > Some have hardcoded LOCALBASE but only after looking first at the = LOCALBASE env > var: > - usr.sbin/pkg > - mailwrapper >=20 > which means with a prebuilt base I can still rebuild all my packages = with a > different localbase and it will work with only a few configurations = changes. > which imho is a good target. >=20 > The list of tools which hardcodes /usr/local > - calendar > - fortune > - cron > - bsnmp > - nvmecontrol > - cpucontrol (at least can be workaround via -d option) >=20 >=20 It would be pretty trivial to add a new libc function, something like = getlocaldir.2, that took care of searching the environment and the invoking a fallback = to the compile-time default from path.h. I=E2=80=99ll see if I can come up = with something for review before I fall asleep. Scott From owner-svn-src-head@freebsd.org Mon Oct 26 08:08:35 2020 Return-Path: Delivered-To: svn-src-head@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 77D0543DBFF; Mon, 26 Oct 2020 08:08:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKSC72XlWz3d7T; Mon, 26 Oct 2020 08:08:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 0FEE221094; Mon, 26 Oct 2020 08:08:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id A212533BC7; Mon, 26 Oct 2020 09:08:03 +0100 (CET) Date: Mon, 26 Oct 2020 09:08:03 +0100 From: Baptiste Daroussin To: Scott Long Cc: Warner Losh , Alex Kozlov , Stefan Esser , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar Message-ID: <20201026080803.7h76fkrfwv4dhp4w@ivaldir.net> References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> <20201026060038.GA78455@ravenloft.kiev.ua> <20201026075057.rbiwxbinzpkhh2tp@ivaldir.net> <8242C5E5-0F9E-4C17-BDBF-1926AF580325@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fkne256ocxnezvrm" Content-Disposition: inline In-Reply-To: <8242C5E5-0F9E-4C17-BDBF-1926AF580325@samsco.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 08:08:35 -0000 --fkne256ocxnezvrm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 26, 2020 at 02:05:28AM -0600, Scott Long wrote: >=20 > > On Oct 26, 2020, at 1:50 AM, Baptiste Daroussin wrot= e: > >=20 > > On Mon, Oct 26, 2020 at 12:11:56AM -0600, Warner Losh wrote: > >> On Mon, Oct 26, 2020 at 12:01 AM Alex Kozlov wrote: > >>=20 > >>> On Sun, Oct 25, 2020 at 11:37:34AM +0100, Stefan Esser wrote: > >>>> Am 25.10.20 um 06:56 schrieb Alex Kozlov: > >>>>> On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: > >>>>>> Am 24.10.20 um 09:48 schrieb Alex Kozlov: > >>>> [...] > >>>>>>> You are hardcoding assumption that LOCALBASE =3D /usr/local. Plea= se > >>> make it > >>>>>>> overridable with LOCALBASE environment variable. > >>>>>> This was a trivial change to get us going with calendars provided = by > >>>>>> a port (which has not been committed, yet - therefore there are no > >>>>>> port-provided calendars, neither under /usr/local nor under any ot= her > >>>>>> PREFIX, as of now). > >>>>>=20 > >>>>>> I understand what you are asking for, but in such a case I'd rather > >>>>>> think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in > >>>>>> paths.h. > >>>>> The PREFIX !=3D LOCALBASE and both !=3D /usr/local configurations > >>>>> are supported in the ports tree and the base for a long time, please > >>> see > >>>>>=20 > >>> https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/po= rting-prefix.html > >>>>=20 > >>>> Yes, and I do not need to look that up in the handbook, having been > >>>> a ports committer for 2 decades by now. > >>>>=20 > >>>>> If after this commit you need to rebuild base to use non-default > >>> LOCALBASE/PREFIX > >>>>> it is pretty big regression and POLA. > >>>>=20 > >>>> How is that any different than before? > >>>>=20 > >>>> What I did is make the PATH easier to change when you rebuild base. > >>>>=20 > >>>> There are numerous programs in base that contain the literal string > >>>> /usr/local - and what I did was implement a mechanism that allows > >>>> to replace this literal reference with a simple change in paths.h. > >>>>=20 > >>>> If you do not modify paths.h for a different LOCALBASE, then you'll > >>>> get a wrong _PATH_DEFPATH compiled into your binaries, for example. > >>>>=20 > >>>>>> And I have made this a single instance that needs to be changed. > >>>>>> Before my change there were 2 instances of /usr/local hard-coded > >>>>>> in _PATH_DEFPATH - now you have to only change the definition of > >>>>>> _PATH_LOCALBASE to adjust all 3 locations that use it. > >>>>> I think you made situation worse, there were two stray hardcoded > >>>>> string and now there is official LOCALBASE define which likely will= be > >>>>> used by other people in the future. > >>>>=20 > >>>> I'd hope so to get rid of many of the 1713 literal uses of /usr/local > >>>> in our source tree. > >>>>=20 > >>>>>> If you can show me precedence of a LOCALBASE environment variable > >>>>>> being used in the way you suggest, I'd be willing to make calendar > >>>>>> use it. > >>>>> Just an analogy from LOCALBASE make variable, perhaps CALENDAR_HOME > >>>>> is a better name. > >>>>=20 > >>>> Yes, I already suggested CALENDAR_HOME, but as an environment variab= le > >>>> to check, if you want to be able to path an additional directory (or > >>>> search path) to the calendar program at run-time. But why introduce > >>>> a CALENDAR_HOME macro in the sources, if the port supplied calendar > >>>> files are known to be found at LOCALBASE/share/calendar (for some va= lue > >>>> of LOCALBASE). > >>>>=20 > >>>> I want to make more programs that currently hard-code /usr/local use > >>>> _PATH_LOCALBASE instead. This C macro can then be default to /usr/lo= cal > >>>> but can be overridden by passing LOCALBASE to the compiler (from the > >>>> build infrastructure) when paths.h is included. > >>>>=20 > >>>> Instead of referring to _PATH_LOCALBASE these files could directly u= se > >>>> LOCALBASE, but since other paths are defined as _PATH_xxx in paths.h= I > >>>> think it is best to follow this precedent. > >>>>=20 > >>>>>> But then I think a CALENDAR_HOME variable would be even more usefu= l, > >>>>>> since it would allow to search an additional user selected directo= ry > >>>>>> (and not just share/calendar within what you provide as LOCALBASE). > >>>>=20 > >>>> My change did not add any dependency on LOCALBASE to any previously > >>>> existing functionality. It added support for calendar files provided > >>>> by a port (a feature that did not exist before) at a location that is > >>>> correct for the big majority of users (who do not modify LOCALBASE). > >>>>=20 > >>>> As I said: I'm going to make it easier to build the base system with > >>>> a different LOCALBASE, but not by run-time checking an environment > >>>> variable that specifies LOCALBASE in each affected program. > >>> It seems that you intend to follow through no matter what. So, just f= or > >>> the record, I think that hardcoding LOCALBASE and requiring base rebu= ild > >>> to change it is a very wrong approach. > >>>=20 > >>=20 > >> So, first off, it's already hard coded. Stefan's changes change the ha= rd > >> coding from 'impossible to change' to 'changeable with a recompile' wh= ich > >> is an improvement. It might even wind up as a build variable (or not, = doing > >> that has some really ugly, nasty dependencies). > >>=20 > >> But even in ports-land, it's a compile time constant. Quite a large nu= mber > >> of ports will allow you to change it at compile / build time, but not > >> after. You have to rebuild if you want to change PREFIX... > >>=20 > >> So I'm a bit puzzled what makes this the wrong approach? > >>=20 > >=20 > > I think what Alex revents to is the following: > >=20 > > Some utilities in base base either have a configurable way to look for = things in > > localbase (via configuration entries for instances): > > - syslog > > - periodic > > - rc > > - man > > Some have hardcoded LOCALBASE but only after looking first at the LOCAL= BASE env > > var: > > - usr.sbin/pkg > > - mailwrapper > >=20 > > which means with a prebuilt base I can still rebuild all my packages wi= th a > > different localbase and it will work with only a few configurations cha= nges. > > which imho is a good target. > >=20 > > The list of tools which hardcodes /usr/local > > - calendar > > - fortune > > - cron > > - bsnmp > > - nvmecontrol > > - cpucontrol (at least can be workaround via -d option) > >=20 > >=20 >=20 > It would be pretty trivial to add a new libc function, something like get= localdir.2, > that took care of searching the environment and the invoking a fallback t= o the > compile-time default from path.h. I=E2=80=99ll see if I can come up with= something for > review before I fall asleep. Exactly what I was thinking about ;) could also be a simple static inline function somewhere (path.h?) if we don= 't want to "pollute" libc. I am fine with both. Best regards, Bapt --fkne256ocxnezvrm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAl+Wg+AACgkQY4mL3PG3 PlooDA//Vdu7AzQPjBSs9qvYtTUY4j7DwSCEHHg13v5CUMCB6RgDfoE/55Vx3PJN Phrn0vV+8PHHDVkk+dxWX2++zlMXoKpaZqL2JnaIkV6UxuEToD4AzIjqJe5V3E4t 8EFC/AW077Ny4CNqzD6mbRwwOwxrDXhYxMM0HzK7c1VClMIfKkr3lENtC58tr4Ba 25W0zyYEUGC65J+3POTdYqZt/7LAF3MqHeqRUGeKOXuMSVGGBAIRjR+znYuWGTT6 WEPyOvCp7/PWYXqQbqld2zNtrnn6Ch55r0I4T+DydGc2gwymcpF2jBo2bUNSvI3c OCGk4VPuh1WnTbI//BOjrn26sREn2RejhfljXfkWtcIjwvKYnNr5K7a5or3pBwyZ X9kL0BGquqSOaqtUjM5tFhy67U6r5bQgMSLHfEnnHPqLHIYEgN5S30CclMZQFMOi o/8wew0XhGoKU0b/lFXZf4r4QgfCiCKkRWTAW8OU46iGjTvQHPcovB1bz+qW+nEA 1wq+ncjeuTIwU6v6108r9V/OVWTtmUXTwbq8Hy7g8zD0HSCIz69KvOvX+g9UeM9y trqgqWI5U71zy8wuHTdKCVngN0tjMUhIxTM+vtrUmfvkuMFT8HSWKVyL9PWEygJ5 1JX5Q1TlrRomCTY0zwZYXENTKvUZkDWFqAorBCm+S/QLfRVGavw= =88yo -----END PGP SIGNATURE----- --fkne256ocxnezvrm-- From owner-svn-src-head@freebsd.org Mon Oct 26 08:17:42 2020 Return-Path: Delivered-To: svn-src-head@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 C7FD143E547; Mon, 26 Oct 2020 08:17:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKSPf4tSdz3dQR; Mon, 26 Oct 2020 08:17:42 +0000 (UTC) (envelope-from mjg@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 8C26417B81; Mon, 26 Oct 2020 08:17:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09Q8HgAA074670; Mon, 26 Oct 2020 08:17:42 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09Q8Hgel074668; Mon, 26 Oct 2020 08:17:42 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010260817.09Q8Hgel074668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 26 Oct 2020 08:17:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367054 - head/sys/contrib/openzfs/module/os/freebsd/zfs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/contrib/openzfs/module/os/freebsd/zfs X-SVN-Commit-Revision: 367054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 08:17:42 -0000 Author: mjg Date: Mon Oct 26 08:17:41 2020 New Revision: 367054 URL: https://svnweb.freebsd.org/changeset/base/367054 Log: zfs: remove unused support for zfs_znode_move Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c ============================================================================== --- head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c Mon Oct 26 05:22:52 2020 (r367053) +++ head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c Mon Oct 26 08:17:41 2020 (r367054) @@ -1118,21 +1118,10 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t mounting) return (0); } -extern krwlock_t zfsvfs_lock; /* in zfs_znode.c */ - void zfsvfs_free(zfsvfs_t *zfsvfs) { int i; - - /* - * This is a barrier to prevent the filesystem from going away in - * zfs_znode_move() until we can safely ensure that the filesystem is - * not unmounted. We consider the filesystem valid before the barrier - * and invalid after the barrier. - */ - rw_enter(&zfsvfs_lock, RW_READER); - rw_exit(&zfsvfs_lock); zfs_fuid_destroy(zfsvfs); Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c ============================================================================== --- head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c Mon Oct 26 05:22:52 2020 (r367053) +++ head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c Mon Oct 26 08:17:41 2020 (r367054) @@ -91,14 +91,7 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, znode, CTLFLAG_RD, * (such as VFS logic) that will not compile easily in userland. */ #ifdef _KERNEL -/* - * Needed to close a small window in zfs_znode_move() that allows the zfsvfs to - * be freed before it can be safely accessed. - */ -krwlock_t zfsvfs_lock; - -#if defined(_KERNEL) && !defined(KMEM_DEBUG) && \ - __FreeBSD_version >= 1300102 +#if !defined(KMEM_DEBUG) && __FreeBSD_version >= 1300102 #define _ZFS_USE_SMR static uma_zone_t znode_uma_zone; #else @@ -200,7 +193,6 @@ zfs_znode_init(void) /* * Initialize zcache */ - rw_init(&zfsvfs_lock, NULL, RW_DEFAULT, NULL); ASSERT(znode_uma_zone == NULL); znode_uma_zone = uma_zcreate("zfs_znode_cache", sizeof (znode_t), zfs_znode_cache_constructor_smr, @@ -228,7 +220,6 @@ zfs_znode_init(void) /* * Initialize zcache */ - rw_init(&zfsvfs_lock, NULL, RW_DEFAULT, NULL); ASSERT(znode_cache == NULL); znode_cache = kmem_cache_create("zfs_znode_cache", sizeof (znode_t), 0, zfs_znode_cache_constructor, @@ -267,7 +258,6 @@ zfs_znode_fini(void) znode_cache = NULL; } #endif - rw_destroy(&zfsvfs_lock); } @@ -449,10 +439,6 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int b ASSERT(!POINTER_IS_VALID(zp->z_zfsvfs)); zp->z_moved = 0; - /* - * Defer setting z_zfsvfs until the znode is ready to be a candidate for - * the zfs_znode_move() callback. - */ zp->z_sa_hdl = NULL; zp->z_unlinked = 0; zp->z_atime_dirty = 0; @@ -529,11 +515,6 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int b mutex_enter(&zfsvfs->z_znodes_lock); list_insert_tail(&zfsvfs->z_all_znodes, zp); zfsvfs->z_nr_znodes++; - membar_producer(); - /* - * Everything else must be valid before assigning z_zfsvfs makes the - * znode eligible for zfs_znode_move(). - */ zp->z_zfsvfs = zfsvfs; mutex_exit(&zfsvfs->z_znodes_lock); From owner-svn-src-head@freebsd.org Mon Oct 26 12:26:52 2020 Return-Path: Delivered-To: svn-src-head@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 E9FA0443DF8; Mon, 26 Oct 2020 12:26:52 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKYx85zF1z4BrH; Mon, 26 Oct 2020 12:26:52 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bbc00cca8037de6f87d0d.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:bc00:cca8:37d:e6f8:7d0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1CC7B2313B; Mon, 26 Oct 2020 12:26:52 +0000 (UTC) (envelope-from se@freebsd.org) To: rgrimes@freebsd.org, Alex Kozlov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010252355.09PNthB5080260@gndrsh.dnsmgr.net> From: Stefan Esser Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar Message-ID: <25230c39-fc65-ec95-58e6-381f8f18a226@freebsd.org> Date: Mon, 26 Oct 2020 13:26:50 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <202010252355.09PNthB5080260@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 12:26:53 -0000 Am 26.10.20 um 00:55 schrieb Rodney W. Grimes: > [ Charset ISO-8859-1 unsupported, converting... ] >> On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: >>> Am 24.10.20 um 09:48 schrieb Alex Kozlov: >>>> On Fri, Oct 23, 2020 at 09:22:23AM +0000, Stefan E?er wrote: >>>>> Author: se >>>>> Date: Fri Oct 23 09:22:23 2020 >>>>> New Revision: 366962 >>>>> URL: https://svnweb.freebsd.org/changeset/base/366962 >>>>> >>>>> Log: >>>>> Add search of LOCALBASE/share/calendar for calendars supplied by a port. >>>>> Calendar files in LOCALBASE override similarily named ones in the base >>>>> system. This could easily be changed if the base system calendars should >>>>> have precedence, but it could lead to a violation of POLA since then the >>>>> port's files were ignored unless those in base have been deleted. >>>>> There was no definition of _PATH_LOCALBASE in paths.h, but verbatim uses >>>>> of /usr/local existed for _PATH_DEFPATH. Use _PATH_LOCALBASE here to ease >>>>> a consistent modification of this prefix. >>>> You are hardcoding assumption that LOCALBASE = /usr/local. Please make it >>>> overridable with LOCALBASE environment variable. >>> This was a trivial change to get us going with calendars provided by >>> a port (which has not been committed, yet - therefore there are no >>> port-provided calendars, neither under /usr/local nor under any other >>> PREFIX, as of now). >> >>> I understand what you are asking for, but in such a case I'd rather >>> think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in >>> paths.h. >> The PREFIX != LOCALBASE and both != /usr/local configurations >> are supported in the ports tree and the base for a long time, please see >> https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html > > Seems all that work for all them years is about to be tossed out > the window as "an out dated concept". The world outside this project has grown at a much faster rate than what the project provides. The FreeBSD base system is very usable as a development system with its integration of editor, compiler, debugger and the like, but the huge magnitude of software actually used for development today is not included. We need to treat ports/packages as necessary extensions of the system, and thus we need to have hooks in the base system, that allow to easily integrate such add-on packages. And more and more extensions that have to be integrated into base system functionality have been developed outside our project. We can ignore them or use them, but in the latter case need hooks in the base system (including references to paths below LOCALBASE). >> If after this commit you need to rebuild base to use non-default LOCALBASE/PREFIX >> it is pretty big regression and POLA. > > I guess no one is paying attention to any of this... What has that got to do with the change I propose? Recompiling for a different LOCALBASE requires identifying and patching tens of files distributed over our source tree. I'm trying to identify those locations and use a parameter that can be changed at a well known location (the paths.h file) to at least make a changed LOCALBASE practical with a re-compilation. >>> And I have made this a single instance that needs to be changed. >>> Before my change there were 2 instances of /usr/local hard-coded >>> in _PATH_DEFPATH - now you have to only change the definition of >>> _PATH_LOCALBASE to adjust all 3 locations that use it. >> I think you made situation worse, there were two stray hardcoded >> string and now there is official LOCALBASE define which likely will be >> used by other people in the future. > > Yep, and now that propogation is about to occur. Sorry, but whether there are more references to LOCALBASE in our base system will depend on whether it is useful for some purpose. Having a path defined in paths.h does not lead to it being used in more places. And if it was, there was no qualitative change, only a quantitative one. From tens of places where /usr/local is currently literally used in our source tree to tens plus 1 where a macro is used for this purpose. You have to rebuild after patching tens of locations for a modified LOCALBASE right now. I'm making it easier, not harder, to overcome the issues caused by the intrusion of references to /usr/local into our base system. And as I have explained in another port to this thread, that while it is possible to introduce dynamically changed (by environment variable or sysctl variable) LOCALBASE values into the base system, the security implications could be severe. Regards, STefan From owner-svn-src-head@freebsd.org Mon Oct 26 12:40:46 2020 Return-Path: Delivered-To: svn-src-head@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 810404443F3; Mon, 26 Oct 2020 12:40:46 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKZFB2xDHz4CwK; Mon, 26 Oct 2020 12:40:46 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bbc00cca8037de6f87d0d.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:bc00:cca8:37d:e6f8:7d0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4319123249; Mon, 26 Oct 2020 12:40:45 +0000 (UTC) (envelope-from se@freebsd.org) To: Baptiste Daroussin , Scott Long Cc: Warner Losh , Alex Kozlov , src-committers , svn-src-all , svn-src-head References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> <20201026060038.GA78455@ravenloft.kiev.ua> <20201026075057.rbiwxbinzpkhh2tp@ivaldir.net> <8242C5E5-0F9E-4C17-BDBF-1926AF580325@samsco.org> <20201026080803.7h76fkrfwv4dhp4w@ivaldir.net> From: Stefan Esser Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar Message-ID: <51603415-2e4a-9525-72cf-7997880283f6@freebsd.org> Date: Mon, 26 Oct 2020 13:40:43 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201026080803.7h76fkrfwv4dhp4w@ivaldir.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 12:40:46 -0000 Am 26.10.20 um 09:08 schrieb Baptiste Daroussin: > On Mon, Oct 26, 2020 at 02:05:28AM -0600, Scott Long wrote: >> >>> On Oct 26, 2020, at 1:50 AM, Baptiste Daroussin wrote: >>> >>> On Mon, Oct 26, 2020 at 12:11:56AM -0600, Warner Losh wrote: [...] >>>> So, first off, it's already hard coded. Stefan's changes change the hard >>>> coding from 'impossible to change' to 'changeable with a recompile' which >>>> is an improvement. It might even wind up as a build variable (or not, doing >>>> that has some really ugly, nasty dependencies). >>>> >>>> But even in ports-land, it's a compile time constant. Quite a large number >>>> of ports will allow you to change it at compile / build time, but not >>>> after. You have to rebuild if you want to change PREFIX... >>>> >>>> So I'm a bit puzzled what makes this the wrong approach? >>>> >>> >>> I think what Alex revents to is the following: >>> >>> Some utilities in base base either have a configurable way to look for things in >>> localbase (via configuration entries for instances): >>> - syslog >>> - periodic >>> - rc >>> - man >>> Some have hardcoded LOCALBASE but only after looking first at the LOCALBASE env >>> var: >>> - usr.sbin/pkg >>> - mailwrapper >>> >>> which means with a prebuilt base I can still rebuild all my packages with a >>> different localbase and it will work with only a few configurations changes. >>> which imho is a good target. >>> >>> The list of tools which hardcodes /usr/local >>> - calendar >>> - fortune >>> - cron >>> - bsnmp >>> - nvmecontrol >>> - cpucontrol (at least can be workaround via -d option) >>> >>> >> >> It would be pretty trivial to add a new libc function, something like getlocaldir.2, >> that took care of searching the environment and the invoking a fallback to the >> compile-time default from path.h. I’ll see if I can come up with something for >> review before I fall asleep. > > Exactly what I was thinking about ;) > > could also be a simple static inline function somewhere (path.h?) if we don't > want to "pollute" libc. > > I am fine with both. I'm not opposed to having such a function, but please make sure we do not open a security loop-hole. If there was a mechanism that allows the effective LOCALBASE to be set in a systctl variable, we could expect the valzue to be trustworthy. If the LOCALBASE setting was provided in an environment variable, I'd expect at the least, that the full path up to the root directory was sanity checked (not writable by a non-priviledged account, for example). Else I might be able to mislead a program that accesses a configuration file in LOCALBASE that is under control of a privileged account to use my version of the file. A library function that provides the value of LOCALBASE should probably recognize being invoked in a SUID program, but I guess we need quite a number of extra safe-guards to avoid opening up gaping security holes. Regards, STefan PS: I consider work on a dynamic LOCALBASE orthogonal to the proposed replacement of verbatim uses of /usr/local by _PATH_LOCALBASE. Please let me know if you disagree and think that the proposed change should not be applied for this reason. From owner-svn-src-head@freebsd.org Mon Oct 26 16:42:54 2020 Return-Path: Delivered-To: svn-src-head@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 5F08244968C; Mon, 26 Oct 2020 16:42:54 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKgcZ1rJRz4SgQ; Mon, 26 Oct 2020 16:42:54 +0000 (UTC) (envelope-from vangyzen@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 22C6F1D351; Mon, 26 Oct 2020 16:42:54 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09QGgraj087490; Mon, 26 Oct 2020 16:42:53 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09QGgr2R087489; Mon, 26 Oct 2020 16:42:53 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <202010261642.09QGgr2R087489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 26 Oct 2020 16:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367059 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 367059 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 16:42:54 -0000 Author: vangyzen Date: Mon Oct 26 16:42:53 2020 New Revision: 367059 URL: https://svnweb.freebsd.org/changeset/base/367059 Log: db_search_symbol: prevent pollution from bogus symbols The kernel will never map the first page, so any symbols in that range cannot refer to addresses. Some third-party assembly files define internal constants which appear in their symbol table. Avoiding the lookup for those symbols avoids replacing small offsets with those symbols during disassembly. Reported by: Anton Rang Reviewed by: Anton Rang , markj MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26895 Modified: head/sys/ddb/db_sym.c Modified: head/sys/ddb/db_sym.c ============================================================================== --- head/sys/ddb/db_sym.c Mon Oct 26 13:24:20 2020 (r367058) +++ head/sys/ddb/db_sym.c Mon Oct 26 16:42:53 2020 (r367059) @@ -371,8 +371,21 @@ db_search_symbol(db_addr_t val, db_strategy_t strategy unsigned int diff; size_t newdiff; int i; - c_db_sym_t ret = C_DB_SYM_NULL, sym; + c_db_sym_t ret, sym; + /* + * The kernel will never map the first page, so any symbols in that + * range cannot refer to addresses. Some third-party assembly files + * define internal constants which appear in their symbol table. + * Avoiding the lookup for those symbols avoids replacing small offsets + * with those symbols during disassembly. + */ + if (val < PAGE_SIZE) { + *offp = 0; + return (C_DB_SYM_NULL); + } + + ret = C_DB_SYM_NULL; newdiff = diff = val; for (i = 0; i < db_nsymtab; i++) { sym = X_db_search_symbol(&db_symtabs[i], val, strategy, &newdiff); From owner-svn-src-head@freebsd.org Mon Oct 26 16:56:18 2020 Return-Path: Delivered-To: svn-src-head@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 36417449752; Mon, 26 Oct 2020 16:56:18 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKgw10nZnz4TND; Mon, 26 Oct 2020 16:56:16 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ed1-f41.google.com with SMTP id dn5so10132914edb.10; Mon, 26 Oct 2020 09:56:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=1Xf0tG5YX342nSyazSmeQNWtj66nxURhugJ6Cf4vTBM=; b=EmcYdlZ+7Whtz3aIt5Ct3cuVa2wRZ8OekAgrnIuPVcEx9sOjv7HRj9SuMFuUlFYCXn 9j41c6ifWYTK7GV2plsUNSWlPRe/N2nK8KRqz2E6QS6OtF+CHWBRDREsCwOK1IPJVcEC +mdznihMZd64pHsSJlCy7ifyU+c81XyGildaYzK1HuLnDZCsm+4YZvOz3VY1K6FXkXR2 hXOP2QYTOCm+QVPxLI6m4wIX7bp50z4Ilo+W6rbYTqG02rmQcQHu/BTsSyZ4kYUea3JU a34dNqiVzTHmUsNJG7qOcT2W0lLHS+36TcK5+Pgwlj1SDbU9obSeFq82yt3TzU/Kq4qx oH+w== X-Gm-Message-State: AOAM533KMUJt19vxcB/IbMetZrDUrWKhUbEwh/d+kRFfQv3DT+pFdZg8 ijlh/uCsGgIxXTIJNysYwuIMF7opr9KaaQ== X-Google-Smtp-Source: ABdhPJz65g1AJ8MLvLiMt1WIeRU64LOYHfXUrRqMufk538mN6gXuJA+AhRocnD1Cn7W4OL1k9FEnaA== X-Received: by 2002:a05:6402:74f:: with SMTP id p15mr16981731edy.69.1603731375141; Mon, 26 Oct 2020 09:56:15 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id q19sm3040702ejx.118.2020.10.26.09.56.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Oct 2020 09:56:14 -0700 (PDT) Subject: Re: svn commit: r366725 - head/lib/geom/eli To: Gordon Bergling Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010151417.09FEHjjq080474@repo.freebsd.org> <20201015144735.GA33346@lion.0xfce3.net> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: <8297cdb3-dcb6-2907-e1c7-b3d629e7001e@FreeBSD.org> Date: Mon, 26 Oct 2020 17:56:17 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.3.3 MIME-Version: 1.0 In-Reply-To: <20201015144735.GA33346@lion.0xfce3.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4CKgw10nZnz4TND X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.208.41 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-2.27 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; ARC_NA(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.95)[-0.950]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; NEURAL_HAM_SHORT(-0.32)[-0.322]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.41:from]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.41:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 16:56:18 -0000 Hi Gordon! On 10/15/20 4:47 PM, Gordon Bergling wrote: > Hi Mateusz, > > On Thu, Oct 15, 2020 at 02:17:45PM +0000, Mateusz Piotrowski wrote: >> Author: 0mp (doc,ports committer) >> Date: Thu Oct 15 14:17:45 2020 >> New Revision: 366725 >> URL: https://svnweb.freebsd.org/changeset/base/366725 >> >> Log: >> Fix formatting of SYNOPSIS >> >> There was an unnecessary newline being added before Nm. >> >> MFC after: 3 days >> >> Modified: >> head/lib/geom/eli/geli.8 >> >> Modified: head/lib/geom/eli/geli.8 >> ============================================================================== >> --- head/lib/geom/eli/geli.8 Thu Oct 15 13:47:52 2020 (r366724) >> +++ head/lib/geom/eli/geli.8 Thu Oct 15 14:17:45 2020 (r366725) >> @@ -24,7 +24,7 @@ >> .\" >> .\" $FreeBSD$ >> .\" >> -.Dd July 22, 2020 >> +.Dd October 15, 2020 >> .Dt GELI 8 >> .Os >> .Sh NAME >> @@ -45,8 +45,7 @@ to your >> geom_eli_load="YES" >> .Ed >> .Pp >> -Usage of the >> -.Nm >> +.No Usage of the Nm >> utility: >> .Pp >> .Nm > The formatting of the SYNOPSIS was correct before this change. It's a common practice > in man pages to use > > The > .Nm > utility > ... Hmm, I think that you are missing one detail here: in SYNOPSIS, the Nm macro is automatically printed on a newline, so the fold manual page rendered like this: ``` Usage of the geli utility: ``` while after the update it's like so: ``` Usage of the geli utility: ``` I think it looks better even though ".No Usage of the Nm" looks quite ugly. > Your change is looking somewhat strange, since ".No Usage of the Nm" reads like the > man page would renders "Nm", since it is not used as macro. After a dot at the beginning of the line, everything that looks like a macro is rendered as a macro, so Nm is rendered correctly here. It could be that I've totally missed the point of your concerns, in which case I'd grateful if you could explain the issue once more. Thanks! > > A .Dd bump is also not necessary since no user visible changes were made to the man page. I wasn't sure about bumping but then I thought that an improvement to readability justifies a Dd bump. Cheers, Mateusz From owner-svn-src-head@freebsd.org Mon Oct 26 17:30:18 2020 Return-Path: Delivered-To: svn-src-head@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 D0C7144A60A; Mon, 26 Oct 2020 17:30:18 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKhgG5DRtz4W0S; Mon, 26 Oct 2020 17:30:18 +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 96F061DDAB; Mon, 26 Oct 2020 17:30:18 +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 09QHUIsN013084; Mon, 26 Oct 2020 17:30:18 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09QHUHIG013081; Mon, 26 Oct 2020 17:30:17 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202010261730.09QHUHIG013081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 26 Oct 2020 17:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367060 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 367060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 17:30:18 -0000 Author: kevans Date: Mon Oct 26 17:30:17 2020 New Revision: 367060 URL: https://svnweb.freebsd.org/changeset/base/367060 Log: audit: also correctly audit linux_execve() Linux execve() gets audited as AUE_EXECVE as well, we should also interpret the return from this correctly for the same reasoning as in r367002. MFC with: r367002 Modified: head/sys/amd64/linux/linux_machdep.c head/sys/amd64/linux32/linux32_machdep.c head/sys/arm64/linux/linux_machdep.c head/sys/i386/linux/linux_machdep.c Modified: head/sys/amd64/linux/linux_machdep.c ============================================================================== --- head/sys/amd64/linux/linux_machdep.c Mon Oct 26 16:42:53 2020 (r367059) +++ head/sys/amd64/linux/linux_machdep.c Mon Oct 26 17:30:17 2020 (r367060) @@ -81,6 +81,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -111,6 +113,7 @@ linux_execve(struct thread *td, struct linux_execve_ar } if (error == 0) error = linux_common_execve(td, &eargs); + AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td); return (error); } Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Mon Oct 26 16:42:53 2020 (r367059) +++ head/sys/amd64/linux32/linux32_machdep.c Mon Oct 26 17:30:17 2020 (r367060) @@ -69,6 +69,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -137,6 +139,7 @@ linux_execve(struct thread *td, struct linux_execve_ar free(path, M_TEMP); if (error == 0) error = linux_common_execve(td, &eargs); + AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td); return (error); } Modified: head/sys/arm64/linux/linux_machdep.c ============================================================================== --- head/sys/arm64/linux/linux_machdep.c Mon Oct 26 16:42:53 2020 (r367059) +++ head/sys/arm64/linux/linux_machdep.c Mon Oct 26 17:30:17 2020 (r367060) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -78,6 +80,7 @@ linux_execve(struct thread *td, struct linux_execve_ar } if (error == 0) error = linux_common_execve(td, &eargs); + AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td); return (error); } Modified: head/sys/i386/linux/linux_machdep.c ============================================================================== --- head/sys/i386/linux/linux_machdep.c Mon Oct 26 16:42:53 2020 (r367059) +++ head/sys/i386/linux/linux_machdep.c Mon Oct 26 17:30:17 2020 (r367060) @@ -61,6 +61,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -114,6 +116,7 @@ linux_execve(struct thread *td, struct linux_execve_ar } if (error == 0) error = linux_common_execve(td, &eargs); + AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td); return (error); } From owner-svn-src-head@freebsd.org Mon Oct 26 17:52:28 2020 Return-Path: Delivered-To: svn-src-head@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 C573244AB2E; Mon, 26 Oct 2020 17:52:28 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKj8r4vhsz4XBj; Mon, 26 Oct 2020 17:52:28 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BCB81DFB9; Mon, 26 Oct 2020 17:52:28 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09QHqSSd030954; Mon, 26 Oct 2020 17:52:28 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09QHqSu1030931; Mon, 26 Oct 2020 17:52:28 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202010261752.09QHqSu1030931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 26 Oct 2020 17:52:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367063 - head/contrib/sendmail/include/sm/os X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/contrib/sendmail/include/sm/os X-SVN-Commit-Revision: 367063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 17:52:28 -0000 Author: brooks Date: Mon Oct 26 17:52:28 2020 New Revision: 367063 URL: https://svnweb.freebsd.org/changeset/base/367063 Log: Key decleration of union semun on src version __FreeBSD__ is defined by the compiler derived from the triple. When building FreeBSD 11 on a FreeBSD 12 with a CROSS_TOOLCHAIN=llvm10, __FreeBSD__ was set to 12 when building lib32 (for some reason no triple is being passed which seems to mean that we're taking default values from the build system). This in turn meant we end up with a double decleration of union semun which is a build error. Reviewed by: gshapiro, dim Differential Revision: https://reviews.freebsd.org/D26902 Modified: head/contrib/sendmail/include/sm/os/sm_os_freebsd.h Modified: head/contrib/sendmail/include/sm/os/sm_os_freebsd.h ============================================================================== --- head/contrib/sendmail/include/sm/os/sm_os_freebsd.h Mon Oct 26 17:50:34 2020 (r367062) +++ head/contrib/sendmail/include/sm/os/sm_os_freebsd.h Mon Oct 26 17:52:28 2020 (r367063) @@ -32,8 +32,8 @@ # define SM_CONF_SHM 1 #endif #ifndef SM_CONF_SEM -# if __FreeBSD__ > 11 -# define SM_CONF_SEM 2 /* union semun is now longer available by default */ +# if __FreeBSD_version >= 1200059 +# define SM_CONF_SEM 2 /* union semun is no longer declared by default */ # else # define SM_CONF_SEM 1 # endif From owner-svn-src-head@freebsd.org Mon Oct 26 18:01:19 2020 Return-Path: Delivered-To: svn-src-head@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 7F88744AD54; Mon, 26 Oct 2020 18:01:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKjM32qFkz4Xbb; Mon, 26 Oct 2020 18:01:19 +0000 (UTC) (envelope-from mjg@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 454D91E33C; Mon, 26 Oct 2020 18:01:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09QI1JLW035211; Mon, 26 Oct 2020 18:01:19 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09QI1IMb035210; Mon, 26 Oct 2020 18:01:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010261801.09QI1IMb035210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 26 Oct 2020 18:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367064 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 367064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 18:01:19 -0000 Author: mjg Date: Mon Oct 26 18:01:18 2020 New Revision: 367064 URL: https://svnweb.freebsd.org/changeset/base/367064 Log: cache: add missing NIRES_ABS handling Modified: head/sys/kern/vfs_cache.c head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Mon Oct 26 17:52:28 2020 (r367063) +++ head/sys/kern/vfs_cache.c Mon Oct 26 18:01:18 2020 (r367064) @@ -3607,7 +3607,7 @@ cache_fpl_checkpoint(struct cache_fpl *fpl, struct nam } static void -cache_fpl_restore(struct cache_fpl *fpl, struct nameidata_saved *snd) +cache_fpl_restore_partial(struct cache_fpl *fpl, struct nameidata_saved *snd) { fpl->ndp->ni_cnd.cn_flags = snd->cn_flags; @@ -3616,6 +3616,17 @@ cache_fpl_restore(struct cache_fpl *fpl, struct nameid fpl->ndp->ni_pathlen = snd->ni_pathlen; } +static void +cache_fpl_restore_abort(struct cache_fpl *fpl, struct nameidata_saved *snd) +{ + + cache_fpl_restore_partial(fpl, snd); + /* + * It is 0 on entry by API contract. + */ + fpl->ndp->ni_resflags = 0; +} + #ifdef INVARIANTS #define cache_fpl_smr_assert_entered(fpl) ({ \ struct cache_fpl *_fpl = (fpl); \ @@ -3846,7 +3857,7 @@ cache_fplookup_partial_setup(struct cache_fpl *fpl) return (cache_fpl_aborted(fpl)); } - cache_fpl_restore(fpl, &fpl->snd); + cache_fpl_restore_partial(fpl, &fpl->snd); ndp->ni_startdir = dvp; cnp->cn_flags |= MAKEENTRY; @@ -4696,6 +4707,7 @@ cache_fplookup(struct nameidata *ndp, enum cache_fpl_s cnp->cn_nameptr = cnp->cn_pnbuf; if (cnp->cn_pnbuf[0] == '/') { cache_fpl_handle_root(ndp, &dvp); + ndp->ni_resflags |= NIRES_ABS; } else { if (ndp->ni_dirfd == AT_FDCWD) { dvp = pwd->pwd_cdir; @@ -4730,7 +4742,7 @@ out: */ break; case CACHE_FPL_STATUS_ABORTED: - cache_fpl_restore(&fpl, &orig); + cache_fpl_restore_abort(&fpl, &orig); break; } return (error); Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Mon Oct 26 17:52:28 2020 (r367063) +++ head/sys/kern/vfs_lookup.c Mon Oct 26 18:01:18 2020 (r367064) @@ -511,6 +511,8 @@ namei(struct nameidata *ndp) cnp->cn_origflags = cnp->cn_flags; #endif ndp->ni_cnd.cn_cred = ndp->ni_cnd.cn_thread->td_ucred; + KASSERT(ndp->ni_resflags == 0, ("%s: garbage in ni_resflags: %x\n", + __func__, ndp->ni_resflags)); KASSERT(cnp->cn_cred && td->td_proc, ("namei: bad cred/proc")); KASSERT((cnp->cn_flags & NAMEI_INTERNAL_FLAGS) == 0, ("namei: unexpected flags: %" PRIx64 "\n", From owner-svn-src-head@freebsd.org Mon Oct 26 18:02:53 2020 Return-Path: Delivered-To: svn-src-head@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 2272144AEBA; Mon, 26 Oct 2020 18:02:53 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKjNs04VLz4YCg; Mon, 26 Oct 2020 18:02:53 +0000 (UTC) (envelope-from mjg@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 C062C1E17C; Mon, 26 Oct 2020 18:02:52 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09QI2qAZ037657; Mon, 26 Oct 2020 18:02:52 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09QI2qdq037656; Mon, 26 Oct 2020 18:02:52 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010261802.09QI2qdq037656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 26 Oct 2020 18:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367065 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 367065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 18:02:53 -0000 Author: mjg Date: Mon Oct 26 18:02:52 2020 New Revision: 367065 URL: https://svnweb.freebsd.org/changeset/base/367065 Log: linux: add missing conversions for compat.linux.use_emul_path handling Modified: head/sys/compat/linux/linux_file.c head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Mon Oct 26 18:01:18 2020 (r367064) +++ head/sys/compat/linux/linux_file.c Mon Oct 26 18:02:52 2020 (r367065) @@ -109,14 +109,13 @@ linux_creat(struct thread *td, struct linux_creat_args int error; if (!LUSECONVPATH(td)) { - error = kern_openat(td, AT_FDCWD, args->path, UIO_USERSPACE, - O_WRONLY | O_CREAT | O_TRUNC, args->mode); - } else { - LCONVPATHEXIST(td, args->path, &path); - error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, - O_WRONLY | O_CREAT | O_TRUNC, args->mode); - LFREEPATH(path); + return (kern_openat(td, AT_FDCWD, args->path, UIO_USERSPACE, + O_WRONLY | O_CREAT | O_TRUNC, args->mode)); } + LCONVPATHEXIST(td, args->path, &path); + error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, + O_WRONLY | O_CREAT | O_TRUNC, args->mode); + LFREEPATH(path); return (error); } #endif @@ -627,30 +626,41 @@ linux_unlink(struct thread *td, struct linux_unlink_ar } #endif -int -linux_unlinkat(struct thread *td, struct linux_unlinkat_args *args) +static int +linux_unlinkat_impl(struct thread *td, enum uio_seg pathseg, const char *path, + int dfd, struct linux_unlinkat_args *args) { - char *path; - int error, dfd; struct stat st; + int error; - if (args->flag & ~LINUX_AT_REMOVEDIR) - return (EINVAL); - - dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; - LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); - if (args->flag & LINUX_AT_REMOVEDIR) - error = kern_frmdirat(td, dfd, path, FD_NONE, UIO_SYSSPACE, 0); + error = kern_frmdirat(td, dfd, path, FD_NONE, pathseg, 0); else - error = kern_funlinkat(td, dfd, path, FD_NONE, UIO_SYSSPACE, 0, - 0); + error = kern_funlinkat(td, dfd, path, FD_NONE, pathseg, 0, 0); if (error == EPERM && !(args->flag & LINUX_AT_REMOVEDIR)) { /* Introduce POSIX noncompliant behaviour of Linux */ if (kern_statat(td, AT_SYMLINK_NOFOLLOW, dfd, path, UIO_SYSSPACE, &st, NULL) == 0 && S_ISDIR(st.st_mode)) error = EISDIR; } + return (error); +} + +int +linux_unlinkat(struct thread *td, struct linux_unlinkat_args *args) +{ + char *path; + int error, dfd; + + if (args->flag & ~LINUX_AT_REMOVEDIR) + return (EINVAL); + dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; + if (!LUSECONVPATH(td)) { + return (linux_unlinkat_impl(td, UIO_USERSPACE, args->pathname, + dfd, args)); + } + LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); + error = linux_unlinkat_impl(td, UIO_SYSSPACE, path, dfd, args); LFREEPATH(path); return (error); } @@ -660,8 +670,10 @@ linux_chdir(struct thread *td, struct linux_chdir_args char *path; int error; + if (!LUSECONVPATH(td)) { + return (kern_chdir(td, args->path, UIO_USERSPACE)); + } LCONVPATHEXIST(td, args->path, &path); - error = kern_chdir(td, path, UIO_SYSSPACE); LFREEPATH(path); return (error); @@ -674,10 +686,12 @@ linux_chmod(struct thread *td, struct linux_chmod_args char *path; int error; + if (!LUSECONVPATH(td)) { + return (kern_fchmodat(td, AT_FDCWD, args->path, UIO_USERSPACE, + args->mode, 0)); + } LCONVPATHEXIST(td, args->path, &path); - - error = kern_fchmodat(td, AT_FDCWD, path, UIO_SYSSPACE, - args->mode, 0); + error = kern_fchmodat(td, AT_FDCWD, path, UIO_SYSSPACE, args->mode, 0); LFREEPATH(path); return (error); } @@ -690,8 +704,11 @@ linux_fchmodat(struct thread *td, struct linux_fchmoda int error, dfd; dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; + if (!LUSECONVPATH(td)) { + return (kern_fchmodat(td, dfd, args->filename, UIO_USERSPACE, + args->mode, 0)); + } LCONVPATHEXIST_AT(td, args->filename, &path, dfd); - error = kern_fchmodat(td, dfd, path, UIO_SYSSPACE, args->mode, 0); LFREEPATH(path); return (error); @@ -704,8 +721,10 @@ linux_mkdir(struct thread *td, struct linux_mkdir_args char *path; int error; + if (!LUSECONVPATH(td)) { + return (kern_mkdirat(td, AT_FDCWD, args->path, UIO_USERSPACE, args->mode)); + } LCONVPATHCREAT(td, args->path, &path); - error = kern_mkdirat(td, AT_FDCWD, path, UIO_SYSSPACE, args->mode); LFREEPATH(path); return (error); @@ -719,8 +738,10 @@ linux_mkdirat(struct thread *td, struct linux_mkdirat_ int error, dfd; dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; + if (!LUSECONVPATH(td)) { + return (kern_mkdirat(td, dfd, args->pathname, UIO_USERSPACE, args->mode)); + } LCONVPATHCREAT_AT(td, args->pathname, &path, dfd); - error = kern_mkdirat(td, dfd, path, UIO_SYSSPACE, args->mode); LFREEPATH(path); return (error); @@ -733,8 +754,11 @@ linux_rmdir(struct thread *td, struct linux_rmdir_args char *path; int error; + if (!LUSECONVPATH(td)) { + return (kern_frmdirat(td, AT_FDCWD, args->path, FD_NONE, + UIO_USERSPACE, 0)); + } LCONVPATHEXIST(td, args->path, &path); - error = kern_frmdirat(td, AT_FDCWD, path, FD_NONE, UIO_SYSSPACE, 0); LFREEPATH(path); return (error); @@ -746,6 +770,10 @@ linux_rename(struct thread *td, struct linux_rename_ar char *from, *to; int error; + if (!LUSECONVPATH(td)) { + return (kern_renameat(td, AT_FDCWD, args->from, AT_FDCWD, + args->to, UIO_USERSPACE)); + } LCONVPATHEXIST(td, args->from, &from); /* Expand LCONVPATHCREATE so that `from' can be freed on errors */ error = linux_emul_convpath(td, args->to, UIO_USERSPACE, &to, 1, AT_FDCWD); @@ -753,7 +781,6 @@ linux_rename(struct thread *td, struct linux_rename_ar LFREEPATH(from); return (error); } - error = kern_renameat(td, AT_FDCWD, from, AT_FDCWD, to, UIO_SYSSPACE); LFREEPATH(from); LFREEPATH(to); @@ -796,6 +823,10 @@ linux_renameat2(struct thread *td, struct linux_rename olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd; newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd; + if (!LUSECONVPATH(td)) { + return (kern_renameat(td, olddfd, args->oldname, newdfd, + args->newname, UIO_USERSPACE)); + } LCONVPATHEXIST_AT(td, args->oldname, &from, olddfd); /* Expand LCONVPATHCREATE so that `from' can be freed on errors */ error = linux_emul_convpath(td, args->newname, UIO_USERSPACE, &to, 1, newdfd); @@ -803,7 +834,6 @@ linux_renameat2(struct thread *td, struct linux_rename LFREEPATH(from); return (error); } - error = kern_renameat(td, olddfd, from, newdfd, to, UIO_SYSSPACE); LFREEPATH(from); LFREEPATH(to); @@ -817,6 +847,10 @@ linux_symlink(struct thread *td, struct linux_symlink_ char *path, *to; int error; + if (!LUSECONVPATH(td)) { + return (kern_symlinkat(td, args->path, AT_FDCWD, args->to, + UIO_USERSPACE)); + } LCONVPATHEXIST(td, args->path, &path); /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ error = linux_emul_convpath(td, args->to, UIO_USERSPACE, &to, 1, AT_FDCWD); @@ -824,7 +858,6 @@ linux_symlink(struct thread *td, struct linux_symlink_ LFREEPATH(path); return (error); } - error = kern_symlinkat(td, path, AT_FDCWD, to, UIO_SYSSPACE); LFREEPATH(path); LFREEPATH(to); @@ -839,6 +872,10 @@ linux_symlinkat(struct thread *td, struct linux_symlin int error, dfd; dfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd; + if (!LUSECONVPATH(td)) { + return (kern_symlinkat(td, args->oldname, dfd, args->newname, + UIO_USERSPACE)); + } LCONVPATHEXIST(td, args->oldname, &path); /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ error = linux_emul_convpath(td, args->newname, UIO_USERSPACE, &to, 1, dfd); @@ -846,7 +883,6 @@ linux_symlinkat(struct thread *td, struct linux_symlin LFREEPATH(path); return (error); } - error = kern_symlinkat(td, path, dfd, to, UIO_SYSSPACE); LFREEPATH(path); LFREEPATH(to); @@ -860,8 +896,11 @@ linux_readlink(struct thread *td, struct linux_readlin char *name; int error; + if (!LUSECONVPATH(td)) { + return (kern_readlinkat(td, AT_FDCWD, args->name, UIO_USERSPACE, + args->buf, UIO_USERSPACE, args->count)); + } LCONVPATHEXIST(td, args->name, &name); - error = kern_readlinkat(td, AT_FDCWD, name, UIO_SYSSPACE, args->buf, UIO_USERSPACE, args->count); LFREEPATH(name); @@ -876,8 +915,11 @@ linux_readlinkat(struct thread *td, struct linux_readl int error, dfd; dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; + if (!LUSECONVPATH(td)) { + return (kern_readlinkat(td, dfd, args->path, UIO_USERSPACE, + args->buf, UIO_USERSPACE, args->bufsiz)); + } LCONVPATHEXIST_AT(td, args->path, &name, dfd); - error = kern_readlinkat(td, dfd, name, UIO_SYSSPACE, args->buf, UIO_USERSPACE, args->bufsiz); LFREEPATH(name); @@ -890,6 +932,9 @@ linux_truncate(struct thread *td, struct linux_truncat char *path; int error; + if (!LUSECONVPATH(td)) { + return (kern_truncate(td, args->path, UIO_USERSPACE, args->length)); + } LCONVPATHEXIST(td, args->path, &path); error = kern_truncate(td, path, UIO_SYSSPACE, args->length); LFREEPATH(path); @@ -910,6 +955,9 @@ linux_truncate64(struct thread *td, struct linux_trunc length = args->length; #endif + if (!LUSECONVPATH(td)) { + return (kern_truncate(td, args->path, UIO_USERSPACE, length)); + } LCONVPATHEXIST(td, args->path, &path); error = kern_truncate(td, path, UIO_SYSSPACE, length); LFREEPATH(path); @@ -947,6 +995,10 @@ linux_link(struct thread *td, struct linux_link_args * char *path, *to; int error; + if (!LUSECONVPATH(td)) { + return (kern_linkat(td, AT_FDCWD, AT_FDCWD, args->path, args->to, + UIO_USERSPACE, FOLLOW)); + } LCONVPATHEXIST(td, args->path, &path); /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ error = linux_emul_convpath(td, args->to, UIO_USERSPACE, &to, 1, AT_FDCWD); @@ -954,7 +1006,6 @@ linux_link(struct thread *td, struct linux_link_args * LFREEPATH(path); return (error); } - error = kern_linkat(td, AT_FDCWD, AT_FDCWD, path, to, UIO_SYSSPACE, FOLLOW); LFREEPATH(path); @@ -974,6 +1025,12 @@ linux_linkat(struct thread *td, struct linux_linkat_ar olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd; newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd; + follow = (args->flag & LINUX_AT_SYMLINK_FOLLOW) == 0 ? NOFOLLOW : + FOLLOW; + if (!LUSECONVPATH(td)) { + return (kern_linkat(td, olddfd, newdfd, args->oldname, + args->newname, UIO_USERSPACE, follow)); + } LCONVPATHEXIST_AT(td, args->oldname, &path, olddfd); /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ error = linux_emul_convpath(td, args->newname, UIO_USERSPACE, &to, 1, newdfd); @@ -981,9 +1038,6 @@ linux_linkat(struct thread *td, struct linux_linkat_ar LFREEPATH(path); return (error); } - - follow = (args->flag & LINUX_AT_SYMLINK_FOLLOW) == 0 ? NOFOLLOW : - FOLLOW; error = kern_linkat(td, olddfd, newdfd, path, to, UIO_SYSSPACE, follow); LFREEPATH(path); LFREEPATH(to); @@ -1526,8 +1580,11 @@ linux_chown(struct thread *td, struct linux_chown_args char *path; int error; + if (!LUSECONVPATH(td)) { + return (kern_fchownat(td, AT_FDCWD, args->path, UIO_USERSPACE, + args->uid, args->gid, 0)); + } LCONVPATHEXIST(td, args->path, &path); - error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, args->gid, 0); LFREEPATH(path); @@ -1545,10 +1602,13 @@ linux_fchownat(struct thread *td, struct linux_fchowna return (EINVAL); dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; - LCONVPATHEXIST_AT(td, args->filename, &path, dfd); - flag = (args->flag & LINUX_AT_SYMLINK_NOFOLLOW) == 0 ? 0 : AT_SYMLINK_NOFOLLOW; + if (!LUSECONVPATH(td)) { + return (kern_fchownat(td, dfd, args->filename, UIO_USERSPACE, + args->uid, args->gid, flag)); + } + LCONVPATHEXIST_AT(td, args->filename, &path, dfd); error = kern_fchownat(td, dfd, path, UIO_SYSSPACE, args->uid, args->gid, flag); LFREEPATH(path); @@ -1562,10 +1622,13 @@ linux_lchown(struct thread *td, struct linux_lchown_ar char *path; int error; + if (!LUSECONVPATH(td)) { + return (kern_fchownat(td, AT_FDCWD, args->path, UIO_USERSPACE, args->uid, + args->gid, AT_SYMLINK_NOFOLLOW)); + } LCONVPATHEXIST(td, args->path, &path); - - error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, - args->gid, AT_SYMLINK_NOFOLLOW); + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, args->gid, + AT_SYMLINK_NOFOLLOW); LFREEPATH(path); return (error); } Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Mon Oct 26 18:01:18 2020 (r367064) +++ head/sys/compat/linux/linux_misc.c Mon Oct 26 18:02:52 2020 (r367065) @@ -874,6 +874,13 @@ linux_utimensat(struct thread *td, struct linux_utimen return (0); } + if (!LUSECONVPATH(td)) { + if (args->pathname != NULL) { + return (kern_utimensat(td, dfd, args->pathname, + UIO_USERSPACE, timesp, UIO_SYSSPACE, flags)); + } + } + if (args->pathname != NULL) LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); else if (args->flags != 0) From owner-svn-src-head@freebsd.org Mon Oct 26 18:03:51 2020 Return-Path: Delivered-To: svn-src-head@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 9ED7944B197; Mon, 26 Oct 2020 18:03:51 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKjPz3kBVz4YDP; Mon, 26 Oct 2020 18:03:51 +0000 (UTC) (envelope-from mjg@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 62EF51E59F; Mon, 26 Oct 2020 18:03:51 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09QI3pii037741; Mon, 26 Oct 2020 18:03:51 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09QI3psK037740; Mon, 26 Oct 2020 18:03:51 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010261803.09QI3psK037740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 26 Oct 2020 18:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367066 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 367066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 18:03:51 -0000 Author: mjg Date: Mon Oct 26 18:03:50 2020 New Revision: 367066 URL: https://svnweb.freebsd.org/changeset/base/367066 Log: linux: silence renameat2 flags warning Hogs the console while building the Linux kernel in a Ubuntu Focal jail. Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Mon Oct 26 18:02:52 2020 (r367065) +++ head/sys/compat/linux/linux_file.c Mon Oct 26 18:03:50 2020 (r367066) @@ -816,8 +816,16 @@ linux_renameat2(struct thread *td, struct linux_rename args->flags & (LINUX_RENAME_NOREPLACE | LINUX_RENAME_WHITEOUT)) return (EINVAL); +#if 0 + /* + * This spams the console on Ubuntu Focal. + * + * What's needed here is a general mechanism to let users know + * about missing features without hogging the system. + */ linux_msg(td, "renameat2 unsupported flags 0x%x", args->flags); +#endif return (EINVAL); } From owner-svn-src-head@freebsd.org Mon Oct 26 19:06:31 2020 Return-Path: Delivered-To: svn-src-head@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 4AA6B44C619; Mon, 26 Oct 2020 19:06:31 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKkpH16nCz4cM1; Mon, 26 Oct 2020 19:06:31 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 053391F283; Mon, 26 Oct 2020 19:06:31 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09QJ6UYA074560; Mon, 26 Oct 2020 19:06:30 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09QJ6UR3074557; Mon, 26 Oct 2020 19:06:30 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202010261906.09QJ6UR3074557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Mon, 26 Oct 2020 19:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367067 - in head/sys/riscv: include riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys/riscv: include riscv X-SVN-Commit-Revision: 367067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 19:06:31 -0000 Author: mhorne Date: Mon Oct 26 19:06:30 2020 New Revision: 367067 URL: https://svnweb.freebsd.org/changeset/base/367067 Log: riscv: remove sbi_clear_ipi() S-mode software has write access to the SIP.SSIP bit, so instead of making a second round-trip through the SBI we can clear it ourselves. The SBI spec has deprecated this function for this exactly this reason. Submitted by: Danjel Q. Delivered-To: svn-src-head@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 45F4B44C6B5; Mon, 26 Oct 2020 19:13:23 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKkyC14ffz4cmP; Mon, 26 Oct 2020 19:13:23 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 082C91F265; Mon, 26 Oct 2020 19:13:23 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09QJDMEP080786; Mon, 26 Oct 2020 19:13:22 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09QJDMmB080784; Mon, 26 Oct 2020 19:13:22 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202010261913.09QJDMmB080784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Mon, 26 Oct 2020 19:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367068 - in head/sys/riscv: include riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys/riscv: include riscv X-SVN-Commit-Revision: 367068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 19:13:23 -0000 Author: mhorne Date: Mon Oct 26 19:13:22 2020 New Revision: 367068 URL: https://svnweb.freebsd.org/changeset/base/367068 Log: riscv: make use of SBI legacy replacement extensions Version 0.2 of the SBI specification [1] marked the existing SBI functions as "legacy" in order to move to a newer calling convention. It also introduced a set of replacement extensions for some of the legacy functionality. In particular, the TIME, IPI, and RFENCE extensions implement and extend the semantics of their legacy counterparts, while conforming to the newer version of the spec. Update our SBI code to use the new replacement extensions when available, and fall back to the legacy ones. These will eventually be dropped, when support for version 0.2 is ubiquitous. [1] https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc Submitted by: Danjel Q. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D26953 Modified: head/sys/riscv/include/sbi.h head/sys/riscv/riscv/sbi.c Modified: head/sys/riscv/include/sbi.h ============================================================================== --- head/sys/riscv/include/sbi.h Mon Oct 26 19:06:30 2020 (r367067) +++ head/sys/riscv/include/sbi.h Mon Oct 26 19:13:22 2020 (r367068) @@ -67,6 +67,24 @@ #define SBI_BASE_GET_MARCHID 5 #define SBI_BASE_GET_MIMPID 6 +/* Timer (TIME) Extension */ +#define SBI_EXT_ID_TIME 0x54494D45 +#define SBI_TIME_SET_TIMER 0 + +/* IPI (IPI) Extension */ +#define SBI_EXT_ID_IPI 0x735049 +#define SBI_IPI_SEND_IPI 0 + +/* RFENCE (RFNC) Extension */ +#define SBI_EXT_ID_RFNC 0x52464E43 +#define SBI_RFNC_REMOTE_FENCE_I 0 +#define SBI_RFNC_REMOTE_SFENCE_VMA 1 +#define SBI_RFNC_REMOTE_SFENCE_VMA_ASID 2 +#define SBI_RFNC_REMOTE_HFENCE_GVMA_VMID 3 +#define SBI_RFNC_REMOTE_HFENCE_GVMA 4 +#define SBI_RFNC_REMOTE_HFENCE_VVMA_ASID 5 +#define SBI_RFNC_REMOTE_HFENCE_VVMA 6 + /* Hart State Management (HSM) Extension */ #define SBI_EXT_ID_HSM 0x48534D #define SBI_HSM_HART_START 0 @@ -88,11 +106,12 @@ #define SBI_REMOTE_SFENCE_VMA_ASID 7 #define SBI_SHUTDOWN 8 -#define SBI_CALL0(e, f) SBI_CALL4(e, f, 0, 0, 0, 0) -#define SBI_CALL1(e, f, p1) SBI_CALL4(e, f, p1, 0, 0, 0) -#define SBI_CALL2(e, f, p1, p2) SBI_CALL4(e, f, p1, p2, 0, 0) -#define SBI_CALL3(e, f, p1, p2, p3) SBI_CALL4(e, f, p1, p2, p3, 0) -#define SBI_CALL4(e, f, p1, p2, p3, p4) sbi_call(e, f, p1, p2, p3, p4) +#define SBI_CALL0(e, f) SBI_CALL5(e, f, 0, 0, 0, 0, 0) +#define SBI_CALL1(e, f, p1) SBI_CALL5(e, f, p1, 0, 0, 0, 0) +#define SBI_CALL2(e, f, p1, p2) SBI_CALL5(e, f, p1, p2, 0, 0, 0) +#define SBI_CALL3(e, f, p1, p2, p3) SBI_CALL5(e, f, p1, p2, p3, 0, 0) +#define SBI_CALL4(e, f, p1, p2, p3, p4) SBI_CALL5(e, f, p1, p2, p3, p4, 0) +#define SBI_CALL5(e, f, p1, p2, p3, p4, p5) sbi_call(e, f, p1, p2, p3, p4, p5) /* * Documentation available at @@ -106,7 +125,7 @@ struct sbi_ret { static __inline struct sbi_ret sbi_call(uint64_t arg7, uint64_t arg6, uint64_t arg0, uint64_t arg1, - uint64_t arg2, uint64_t arg3) + uint64_t arg2, uint64_t arg3, uint64_t arg4) { struct sbi_ret ret; @@ -114,13 +133,14 @@ sbi_call(uint64_t arg7, uint64_t arg6, uint64_t arg0, register uintptr_t a1 __asm ("a1") = (uintptr_t)(arg1); register uintptr_t a2 __asm ("a2") = (uintptr_t)(arg2); register uintptr_t a3 __asm ("a3") = (uintptr_t)(arg3); + register uintptr_t a4 __asm ("a4") = (uintptr_t)(arg4); register uintptr_t a6 __asm ("a6") = (uintptr_t)(arg6); register uintptr_t a7 __asm ("a7") = (uintptr_t)(arg7); __asm __volatile( \ "ecall" \ :"+r"(a0), "+r"(a1) \ - :"r"(a2), "r"(a3), "r"(a6), "r"(a7) \ + :"r"(a2), "r"(a3), "r"(a4), "r"(a6), "r"(a7) \ :"memory"); ret.error = a0; @@ -139,6 +159,18 @@ sbi_probe_extension(long id) return (SBI_CALL1(SBI_EXT_ID_BASE, SBI_BASE_PROBE_EXTENSION, id).value); } +/* TIME extension functions. */ +void sbi_set_timer(uint64_t val); + +/* IPI extension functions. */ +void sbi_send_ipi(const u_long *hart_mask); + +/* RFENCE extension functions. */ +void sbi_remote_fence_i(const u_long *hart_mask); +void sbi_remote_sfence_vma(const u_long *hart_mask, u_long start, u_long size); +void sbi_remote_sfence_vma_asid(const u_long *hart_mask, u_long start, + u_long size, u_long asid); + /* Hart State Management extension functions. */ /* @@ -183,50 +215,10 @@ sbi_console_getchar(void) } static __inline void -sbi_set_timer(uint64_t val) -{ - - (void)SBI_CALL1(SBI_SET_TIMER, 0, val); -} - -static __inline void sbi_shutdown(void) { (void)SBI_CALL0(SBI_SHUTDOWN, 0); -} - -static __inline void -sbi_send_ipi(const unsigned long *hart_mask) -{ - - (void)SBI_CALL1(SBI_SEND_IPI, 0, (uint64_t)hart_mask); -} - -static __inline void -sbi_remote_fence_i(const unsigned long *hart_mask) -{ - - (void)SBI_CALL1(SBI_REMOTE_FENCE_I, 0, (uint64_t)hart_mask); -} - -static __inline void -sbi_remote_sfence_vma(const unsigned long *hart_mask, - unsigned long start, unsigned long size) -{ - - (void)SBI_CALL3(SBI_REMOTE_SFENCE_VMA, 0, (uint64_t)hart_mask, start, - size); -} - -static __inline void -sbi_remote_sfence_vma_asid(const unsigned long *hart_mask, - unsigned long start, unsigned long size, - unsigned long asid) -{ - - (void)SBI_CALL4(SBI_REMOTE_SFENCE_VMA_ASID, 0, (uint64_t)hart_mask, - start, size, asid); } void sbi_print_version(void); Modified: head/sys/riscv/riscv/sbi.c ============================================================================== --- head/sys/riscv/riscv/sbi.c Mon Oct 26 19:06:30 2020 (r367067) +++ head/sys/riscv/riscv/sbi.c Mon Oct 26 19:13:22 2020 (r367068) @@ -46,6 +46,10 @@ u_long sbi_spec_version; u_long sbi_impl_id; u_long sbi_impl_version; +static bool has_time_extension = false; +static bool has_ipi_extension = false; +static bool has_rfnc_extension = false; + static struct sbi_ret sbi_get_spec_version(void) { @@ -122,6 +126,83 @@ sbi_print_version(void) printf("SBI Specification Version: %u.%u\n", major, minor); } +void +sbi_set_timer(uint64_t val) +{ + struct sbi_ret ret; + + /* Use the TIME legacy replacement extension, if available. */ + if (has_time_extension) { + ret = SBI_CALL1(SBI_EXT_ID_TIME, SBI_TIME_SET_TIMER, val); + MPASS(ret.error == SBI_SUCCESS); + } else { + (void)SBI_CALL1(SBI_SET_TIMER, 0, val); + } +} + +void +sbi_send_ipi(const u_long *hart_mask) +{ + struct sbi_ret ret; + + /* Use the IPI legacy replacement extension, if available. */ + if (has_ipi_extension) { + ret = SBI_CALL2(SBI_EXT_ID_IPI, SBI_IPI_SEND_IPI, + *hart_mask, 0); + MPASS(ret.error == SBI_SUCCESS); + } else { + (void)SBI_CALL1(SBI_SEND_IPI, 0, (uint64_t)hart_mask); + } +} + +void +sbi_remote_fence_i(const u_long *hart_mask) +{ + struct sbi_ret ret; + + /* Use the RFENCE legacy replacement extension, if available. */ + if (has_rfnc_extension) { + ret = SBI_CALL2(SBI_EXT_ID_RFNC, SBI_RFNC_REMOTE_FENCE_I, + *hart_mask, 0); + MPASS(ret.error == SBI_SUCCESS); + } else { + (void)SBI_CALL1(SBI_REMOTE_FENCE_I, 0, (uint64_t)hart_mask); + } +} + +void +sbi_remote_sfence_vma(const u_long *hart_mask, u_long start, u_long size) +{ + struct sbi_ret ret; + + /* Use the RFENCE legacy replacement extension, if available. */ + if (has_rfnc_extension) { + ret = SBI_CALL4(SBI_EXT_ID_RFNC, SBI_RFNC_REMOTE_SFENCE_VMA, + *hart_mask, 0, start, size); + MPASS(ret.error == SBI_SUCCESS); + } else { + (void)SBI_CALL3(SBI_REMOTE_SFENCE_VMA, 0, (uint64_t)hart_mask, + start, size); + } +} + +void +sbi_remote_sfence_vma_asid(const u_long *hart_mask, u_long start, u_long size, + u_long asid) +{ + struct sbi_ret ret; + + /* Use the RFENCE legacy replacement extension, if available. */ + if (has_rfnc_extension) { + ret = SBI_CALL5(SBI_EXT_ID_RFNC, SBI_RFNC_REMOTE_SFENCE_VMA_ASID, + *hart_mask, 0, start, size, asid); + MPASS(ret.error == SBI_SUCCESS); + } else { + (void)SBI_CALL4(SBI_REMOTE_SFENCE_VMA_ASID, 0, + (uint64_t)hart_mask, start, size, asid); + } +} + int sbi_hsm_hart_start(u_long hart, u_long start_addr, u_long priv) { @@ -173,23 +254,34 @@ sbi_init(void) marchid = sbi_get_marchid().value; mimpid = sbi_get_mimpid().value; + /* Probe for legacy replacement extensions. */ + if (sbi_probe_extension(SBI_EXT_ID_TIME) != 0) + has_time_extension = true; + if (sbi_probe_extension(SBI_EXT_ID_IPI) != 0) + has_ipi_extension = true; + if (sbi_probe_extension(SBI_EXT_ID_RFNC) != 0) + has_rfnc_extension = true; + /* - * Probe for legacy extensions. Currently we rely on all of them - * to be implemented, but this is not guaranteed by the spec. + * Probe for legacy extensions. We still rely on many of them to be + * implemented, but this is not guaranteed by the spec. */ - KASSERT(sbi_probe_extension(SBI_SET_TIMER) != 0, + KASSERT(has_time_extension || sbi_probe_extension(SBI_SET_TIMER) != 0, ("SBI doesn't implement sbi_set_timer()")); KASSERT(sbi_probe_extension(SBI_CONSOLE_PUTCHAR) != 0, ("SBI doesn't implement sbi_console_putchar()")); KASSERT(sbi_probe_extension(SBI_CONSOLE_GETCHAR) != 0, ("SBI doesn't implement sbi_console_getchar()")); - KASSERT(sbi_probe_extension(SBI_SEND_IPI) != 0, + KASSERT(has_ipi_extension || sbi_probe_extension(SBI_SEND_IPI) != 0, ("SBI doesn't implement sbi_send_ipi()")); - KASSERT(sbi_probe_extension(SBI_REMOTE_FENCE_I) != 0, + KASSERT(has_rfnc_extension || + sbi_probe_extension(SBI_REMOTE_FENCE_I) != 0, ("SBI doesn't implement sbi_remote_fence_i()")); - KASSERT(sbi_probe_extension(SBI_REMOTE_SFENCE_VMA) != 0, + KASSERT(has_rfnc_extension || + sbi_probe_extension(SBI_REMOTE_SFENCE_VMA) != 0, ("SBI doesn't implement sbi_remote_sfence_vma()")); - KASSERT(sbi_probe_extension(SBI_REMOTE_SFENCE_VMA_ASID) != 0, + KASSERT(has_rfnc_extension || + sbi_probe_extension(SBI_REMOTE_SFENCE_VMA_ASID) != 0, ("SBI doesn't implement sbi_remote_sfence_vma_asid()")); KASSERT(sbi_probe_extension(SBI_SHUTDOWN) != 0, ("SBI doesn't implement sbi_shutdown()")); From owner-svn-src-head@freebsd.org Mon Oct 26 19:52:30 2020 Return-Path: Delivered-To: svn-src-head@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 EA28044D58A; Mon, 26 Oct 2020 19:52:29 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKlqH3bZVz4g3f; Mon, 26 Oct 2020 19:52:26 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 09QJqFUa031816 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 26 Oct 2020 12:52:16 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 09QJqFZR031814; Mon, 26 Oct 2020 12:52:15 -0700 (PDT) (envelope-from jmg) Date: Mon, 26 Oct 2020 12:52:15 -0700 From: John-Mark Gurney To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367048 - head/lib/libc/sys Message-ID: <20201026195215.GA31099@funkthat.com> Mail-Followup-To: John-Mark Gurney , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010260037.09Q0bVpN090953@repo.freebsd.org> <202010260059.09Q0xbxt003944@slippy.cwsent.com> <202010260104.09Q14Kmq004045@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202010260104.09Q14Kmq004045@slippy.cwsent.com> X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Mon, 26 Oct 2020 12:52:16 -0700 (PDT) X-Rspamd-Queue-Id: 4CKlqH3bZVz4g3f X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of jmg@gold.funkthat.com has no SPF policy when checking 208.87.223.18) smtp.mailfrom=jmg@gold.funkthat.com X-Spamd-Result: default: False [-0.48 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[jmg]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[funkthat.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_SHORT(0.14)[0.138]; NEURAL_HAM_LONG(-0.87)[-0.869]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.954]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[jmg@funkthat.com,jmg@gold.funkthat.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:32354, ipnet:208.87.216.0/21, country:US]; FROM_NEQ_ENVFROM(0.00)[jmg@funkthat.com,jmg@gold.funkthat.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 19:52:30 -0000 Cy Schubert wrote this message on Sun, Oct 25, 2020 at 18:04 -0700: > In message <202010260059.09Q0xbxt003944@slippy.cwsent.com>, Cy Schubert > writes: > > In message <202010260037.09Q0bVpN090953@repo.freebsd.org>, John-Mark Gurney > > wri > > tes: > > > Author: jmg > > > Date: Mon Oct 26 00:37:31 2020 > > > New Revision: 367048 > > > URL: https://svnweb.freebsd.org/changeset/base/367048 > > > > > > Log: > > > update write(2)'s iovec limit w/ info about the iosize_max_clamp sysctl.. > > . > > > > > > Modified: > > > head/lib/libc/sys/write.2 > > > > > > Modified: head/lib/libc/sys/write.2 > > > =========================================================================== > > == > > > = > > > --- head/lib/libc/sys/write.2 Sun Oct 25 23:26:07 2020 (r36704 > > 7) > > > +++ head/lib/libc/sys/write.2 Mon Oct 26 00:37:31 2020 (r36704 > > 8) > > > @@ -28,7 +28,7 @@ > > > .\" @(#)write.2 8.5 (Berkeley) 4/2/94 > > > .\" $FreeBSD$ > > > .\" > > > -.Dd March 30, 2020 > > > +.Dd October 25, 2020 > > > .Dt WRITE 2 > > > .Os > > > .Sh NAME > > > @@ -240,9 +240,13 @@ array was negative. > > > .It Bq Er EINVAL > > > The sum of the > > > .Fa iov_len > > > -values in the > > > -.Fa iov > > > -array overflowed a 32-bit integer. > > > +values is greater than > > > +.Dv SSIZE_MAX > > > +(or greater than > > > +.Dv INT_MAX , > > > +if the sysctl > > > +.Va debug.iosize_max_clamp > > > > Should we also include SEE ALSO reference to sysctl(8) or sysctl(3)? > > Personally I think a reference to sysctl(8) would be more apropos. > > Or maybe both. Yeah, I was thinking the same thing myself, but decided to go with a minimal change. I was thinking of making the mention of sysctl in the body an Xr in addition to a SEE ALSO, but I couldn't decide which of 3 or 8. I guess the Xr in the body would be 3. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@freebsd.org Mon Oct 26 21:17:12 2020 Return-Path: Delivered-To: svn-src-head@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 7BC3244EC65; Mon, 26 Oct 2020 21:17:12 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKnj31k5dz3W7S; Mon, 26 Oct 2020 21:17:10 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1kX9rY-0004e7-5W; Mon, 26 Oct 2020 22:17:08 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=klop.ws; s=mail; h=In-Reply-To:Message-ID:From:Content-Transfer-Encoding:MIME-Version: Date:References:Subject:To:Content-Type:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=B/Dlk/xrWuxZhnpsZt4COesOKPFEC1S3B+o6lpZVRCo=; b=uhHW86/a3nWKvn/o6cOuU3xWK1 UzSu6w5dvThYCDzKmCARljKwgT8PQD136tuP0HQPwEn+pvRpcIkcqm294AI2UPJe3c1NkvYaFSewA 9fnKpB9qLFytYyZcdXiw5Na80EyMyYCykUm35ug2TxRhH7BgbqwiC/By2+bCSChGJNjE=; Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Mateusz Guzik" Subject: Re: svn commit: r367066 - head/sys/compat/linux References: <202010261803.09QI3psK037740@repo.freebsd.org> Date: Mon, 26 Oct 2020 22:17:07 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <202010261803.09QI3psK037740@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.4 X-Spam-Status: No, score=-0.4 required=5.0 tests=ALL_TRUSTED, BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF autolearn=disabled version=3.4.2 X-Scan-Signature: f0eed3f1d89bc5fb772880ef8d54351a X-Rspamd-Queue-Id: 4CKnj31k5dz3W7S X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=mail header.b=uhHW86/a; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 195.190.28.88 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.48 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[klop.ws:s=mail]; NEURAL_HAM_MEDIUM(-1.01)[-1.006]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:195.190.28.64/27]; DMARC_NA(0.00)[klop.ws]; RWL_MAILSPIKE_GOOD(0.00)[195.190.28.88:from]; NEURAL_HAM_LONG(-0.99)[-0.993]; DKIM_TRACE(0.00)[klop.ws:+]; NEURAL_HAM_SHORT(-0.48)[-0.476]; RCVD_IN_DNSWL_NONE(0.00)[195.190.28.88:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 21:17:12 -0000 On Mon, 26 Oct 2020 19:03:51 +0100, Mateusz Guzik wrote: > Author: mjg > Date: Mon Oct 26 18:03:50 2020 > New Revision: 367066 > URL: https://svnweb.freebsd.org/changeset/base/367066 > > Log: > linux: silence renameat2 flags warning > Hogs the console while building the Linux kernel in a Ubuntu Focal jail. Is ratelimiting possible here? Ronald. > Modified: > head/sys/compat/linux/linux_file.c > > Modified: head/sys/compat/linux/linux_file.c > ============================================================================== > --- head/sys/compat/linux/linux_file.c Mon Oct 26 18:02:52 2020 (r367065) > +++ head/sys/compat/linux/linux_file.c Mon Oct 26 18:03:50 2020 (r367066) > @@ -816,8 +816,16 @@ linux_renameat2(struct thread *td, struct > linux_rename > args->flags & (LINUX_RENAME_NOREPLACE | > LINUX_RENAME_WHITEOUT)) > return (EINVAL); > +#if 0 > + /* > + * This spams the console on Ubuntu Focal. > + * > + * What's needed here is a general mechanism to let users know > + * about missing features without hogging the system. > + */ > linux_msg(td, "renameat2 unsupported flags 0x%x", > args->flags); > +#endif > return (EINVAL); > } > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Mon Oct 26 21:34:39 2020 Return-Path: Delivered-To: svn-src-head@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 0E55444F6FA; Mon, 26 Oct 2020 21:34:39 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKp5B59Tvz3XgY; Mon, 26 Oct 2020 21:34:38 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-ed1-x52e.google.com with SMTP id bc23so11173675edb.5; Mon, 26 Oct 2020 14:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=Ppue9vXSzmS28dqx9UsMTNQiA/VVCRZE+qvrwNxLqZA=; b=W86t98poKS9UrJ3cWwAIrUi+nEH1l1uGOS/D1GpyeXmGgYOAutxBkLlDvVsPp3NpL1 EiqgfpfYwksGHkQp1azTFqDnBZSY9bvs3DACscMdBELkrei6kJU5oejqob/D2d5A4qlm oYlgdy+G7pCRx2Eqerw/6BsW6HnS9uzNbMWg2oc26JS1erkFH5ZqFCW97wVGGIbXjIwe MT9XhOu9guShM9o7hngO3p5wd/H2LjVzuBRt4/aPN68q1vLmqLnofVR6MYB4FQ+X8HzK Ko8VH3wiLChqZhyyVw09zwyyv1+yrHqWL8JTssjJar2orJpkT3UB/CcoXTP3ZrZDjg2s 20+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=Ppue9vXSzmS28dqx9UsMTNQiA/VVCRZE+qvrwNxLqZA=; b=ZdcffiGkyCMpBh3FUn+St8AW2DEPrpKV+Y/SqXU1xqTr0fJUG6FQV7rZ7TpUtx33zI XR8nqh+Q9/0Fr1jghrq2yj2vJxpP3QUP+4qOh6UnHGBHmhyfKBMff90pTOQyq+dPNdh5 K4OQ0a+5yCsRD1YkbzMNgtnFJa8QI7xA+0Ww97gqxLPUfAlLvXFeNUEI9NuiRMnpS0cv fQkxeKj5KkD0XT8RJdQqCTZhrJfHZta7vqyBnBnjiwKsxvp6exskqI37IcJHeezJSY3H Hit/eci35WRD/FadZEgB5VNb19aI346P82/gJ7sy21uTxG32XFIzNs0/t4y/h7NYdjYe gIQw== X-Gm-Message-State: AOAM531xd/SMyXtpUHIQl0q6zuc+NXm2dcupnDVBSOErlPNwLjOTVD7N DFNUPtJmuYTXynAINyhkPfUv8C+d3vo+Tw== X-Google-Smtp-Source: ABdhPJx1OraXRZC0wb66+fLB4k/2RLBBoAYhat2rLJ93CiHK3/M9fwqTPZim7lobTAtRUO0A+2wZDg== X-Received: by 2002:a50:f389:: with SMTP id g9mr18582893edm.367.1603748076596; Mon, 26 Oct 2020 14:34:36 -0700 (PDT) Received: from brick (cpc149474-cmbg20-2-0-cust954.5-4.cable.virginm.net. [82.4.199.187]) by smtp.gmail.com with ESMTPSA id ba6sm5802266edb.61.2020.10.26.14.34.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 14:34:35 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 26 Oct 2020 21:34:34 +0000 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367066 - head/sys/compat/linux Message-ID: <20201026213434.GA2227@brick> Mail-Followup-To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010261803.09QI3psK037740@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202010261803.09QI3psK037740@repo.freebsd.org> X-Rspamd-Queue-Id: 4CKp5B59Tvz3XgY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 21:34:39 -0000 On 1026T1803, Mateusz Guzik wrote: > Author: mjg > Date: Mon Oct 26 18:03:50 2020 > New Revision: 367066 > URL: https://svnweb.freebsd.org/changeset/base/367066 > > Log: > linux: silence renameat2 flags warning > > Hogs the console while building the Linux kernel in a Ubuntu Focal jail. That's what 'compat.linux.debug' sysctl is for. From owner-svn-src-head@freebsd.org Tue Oct 27 04:35:37 2020 Return-Path: Delivered-To: svn-src-head@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 96A5E43D02B; Tue, 27 Oct 2020 04:35:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKzQx3TrKz4HVh; Tue, 27 Oct 2020 04:35:37 +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 5B1C225D2D; Tue, 27 Oct 2020 04:35:37 +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 09R4ZbJL028819; Tue, 27 Oct 2020 04:35:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09R4ZbPE028818; Tue, 27 Oct 2020 04:35:37 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202010270435.09R4ZbPE028818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 27 Oct 2020 04:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367069 - head/contrib/ipfilter/lib X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/lib X-SVN-Commit-Revision: 367069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 04:35:37 -0000 Author: cy Date: Tue Oct 27 04:35:36 2020 New Revision: 367069 URL: https://svnweb.freebsd.org/changeset/base/367069 Log: Continued ipfilter #ifdef cleanup. The r343701 log entry contains a complete description. MFC after: 3 days Modified: head/contrib/ipfilter/lib/kmem.h Modified: head/contrib/ipfilter/lib/kmem.h ============================================================================== --- head/contrib/ipfilter/lib/kmem.h Mon Oct 26 19:13:22 2020 (r367068) +++ head/contrib/ipfilter/lib/kmem.h Tue Oct 27 04:35:36 2020 (r367069) @@ -21,7 +21,7 @@ extern int openkmem __P((char *, char *)); extern int kmemcpy __P((char *, long, int)); extern int kstrncpy __P((char *, long, int)); -#if defined(__NetBSD__) || defined(__OpenBSD) +#if defined(__NetBSD__) # include #endif From owner-svn-src-head@freebsd.org Tue Oct 27 04:35:48 2020 Return-Path: Delivered-To: svn-src-head@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 62C8443CF2C; Tue, 27 Oct 2020 04:35:48 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKzR81pNYz4HkG; Tue, 27 Oct 2020 04:35:48 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F88925AD8; Tue, 27 Oct 2020 04:35:48 +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 09R4ZmOC028870; Tue, 27 Oct 2020 04:35:48 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09R4ZlIA028869; Tue, 27 Oct 2020 04:35:47 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202010270435.09R4ZlIA028869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 27 Oct 2020 04:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367070 - head/contrib/ipfilter/man X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/man X-SVN-Commit-Revision: 367070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 04:35:48 -0000 Author: cy Date: Tue Oct 27 04:35:47 2020 New Revision: 367070 URL: https://svnweb.freebsd.org/changeset/base/367070 Log: Remove a random equal sign from the example. It should not be there. It's a syntax error. PR: 210303 Reported by: leventelist at gmail.com MFC after: 3 days Modified: head/contrib/ipfilter/man/ipf.5 Modified: head/contrib/ipfilter/man/ipf.5 ============================================================================== --- head/contrib/ipfilter/man/ipf.5 Tue Oct 27 04:35:36 2020 (r367069) +++ head/contrib/ipfilter/man/ipf.5 Tue Oct 27 04:35:47 2020 (r367070) @@ -355,7 +355,7 @@ block in proto tcp from any port >= 1024 to any port < pass in proto tcp from 10.1.0.0/24 to any port = 22 block out proto udp from any to 10.1.1.1 port = 135 pass in proto udp from 1.1.1.1 port = 123 to 10.1.1.1 port = 123 -pass in proto tcp from 127.0.0.0/8 to any port = 6000:6009 +pass in proto tcp from 127.0.0.0/8 to any port 6000:6009 .fi .PP If there is no desire to mention any specific source or destintion From owner-svn-src-head@freebsd.org Tue Oct 27 06:43:25 2020 Return-Path: Delivered-To: svn-src-head@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 7F717440501; Tue, 27 Oct 2020 06:43:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CL2GP2rRYz4PRC; Tue, 27 Oct 2020 06:43:25 +0000 (UTC) (envelope-from imp@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 44F5F27463; Tue, 27 Oct 2020 06:43:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09R6hPEI008908; Tue, 27 Oct 2020 06:43:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09R6hOLH008905; Tue, 27 Oct 2020 06:43:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202010270643.09R6hOLH008905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 27 Oct 2020 06:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367071 - in head/sys: geom sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: geom sys X-SVN-Commit-Revision: 367071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 06:43:25 -0000 Author: imp Date: Tue Oct 27 06:43:24 2020 New Revision: 367071 URL: https://svnweb.freebsd.org/changeset/base/367071 Log: Remove frontstuff Nothing implements this in the tree. Remove the ioctl and the conversion to the geom atttribute stuff. This was introduced in r94287 in 2002 and was retired in r113390 2003. It appeared in FreeBSD 5.0, but no other releases. This is a vestige that was missed at the time and overlooked until now. No compat is provided for this reason. And there's no implementation of it today. And it was never part of a release from a stable branch. Reviewed by: phk@ Differential Revision: https://reviews.freebsd.org/D26967 Modified: head/sys/geom/geom_dev.c head/sys/geom/geom_disk.c head/sys/sys/disk.h Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Tue Oct 27 04:35:47 2020 (r367070) +++ head/sys/geom/geom_dev.c Tue Oct 27 06:43:24 2020 (r367071) @@ -550,9 +550,6 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data if (error == 0 && *(u_int *)data == 0) error = ENOENT; break; - case DIOCGFRONTSTUFF: - error = g_io_getattr("GEOM::frontstuff", cp, &i, data); - break; #ifdef COMPAT_FREEBSD11 case DIOCSKERNELDUMP_FREEBSD11: { Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Tue Oct 27 04:35:47 2020 (r367070) +++ head/sys/geom/geom_disk.c Tue Oct 27 06:43:24 2020 (r367071) @@ -498,8 +498,6 @@ g_disk_start(struct bio *bp) break; else if (g_handleattr_int(bp, "GEOM::fwheads", dp->d_fwheads)) break; - else if (g_handleattr_off_t(bp, "GEOM::frontstuff", 0)) - break; else if (g_handleattr_str(bp, "GEOM::ident", dp->d_ident)) break; else if (g_handleattr_str(bp, "GEOM::descr", dp->d_descr)) Modified: head/sys/sys/disk.h ============================================================================== --- head/sys/sys/disk.h Tue Oct 27 04:35:47 2020 (r367070) +++ head/sys/sys/disk.h Tue Oct 27 06:43:24 2020 (r367071) @@ -64,14 +64,6 @@ void disk_err(struct bio *bp, const char *what, int bl * core dumps. */ -#define DIOCGFRONTSTUFF _IOR('d', 134, off_t) - /* - * Many disk formats have some amount of space reserved at the - * start of the disk to hold bootblocks, various disklabels and - * similar stuff. This ioctl returns the number of such bytes - * which may apply to the device. - */ - #define DIOCGFLUSH _IO('d', 135) /* Flush write cache */ /* * Flush write cache of the device. From owner-svn-src-head@freebsd.org Tue Oct 27 07:37:54 2020 Return-Path: Delivered-To: svn-src-head@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 B5B9D4411EF; Tue, 27 Oct 2020 07:37:54 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from ravenloft.kiev.ua (ravenloft.kiev.ua [94.244.131.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CL3TF4jCVz4RbT; Tue, 27 Oct 2020 07:37:53 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Date: Tue, 27 Oct 2020 08:37:44 +0100 From: Alex Kozlov To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar Message-ID: <20201027073744.GA27357@ravenloft.kiev.ua> References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> <20201026060038.GA78455@ravenloft.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4CL3TF4jCVz4RbT X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of kozlov@ravenloft.kiev.ua has no SPF policy when checking 94.244.131.95) smtp.mailfrom=kozlov@ravenloft.kiev.ua X-Spamd-Result: default: False [-0.02 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.67)[-0.673]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.03)[-0.026]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.52)[-0.518]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[ak@FreeBSD.org,kozlov@ravenloft.kiev.ua]; RCVD_COUNT_ZERO(0.00)[0]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:34743, ipnet:94.244.128.0/18, country:UA]; FROM_NEQ_ENVFROM(0.00)[ak@FreeBSD.org,kozlov@ravenloft.kiev.ua]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 07:37:54 -0000 On Mon, Oct 26, 2020 at 12:11:56AM -0600, Warner Losh wrote: > On Mon, Oct 26, 2020 at 12:01 AM Alex Kozlov wrote: > > > On Sun, Oct 25, 2020 at 11:37:34AM +0100, Stefan Esser wrote: > > > Am 25.10.20 um 06:56 schrieb Alex Kozlov: > > > > On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: > > > > > Am 24.10.20 um 09:48 schrieb Alex Kozlov: > > > [...] > > > > > > You are hardcoding assumption that LOCALBASE = /usr/local. Please > > make it > > > > > > overridable with LOCALBASE environment variable. > > > > > This was a trivial change to get us going with calendars provided by > > > > > a port (which has not been committed, yet - therefore there are no > > > > > port-provided calendars, neither under /usr/local nor under any other > > > > > PREFIX, as of now). > > > > > > > > > I understand what you are asking for, but in such a case I'd rather > > > > > think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in > > > > > paths.h. > > > > The PREFIX != LOCALBASE and both != /usr/local configurations > > > > are supported in the ports tree and the base for a long time, please > > see > > > > > > https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html > > > > > > Yes, and I do not need to look that up in the handbook, having been > > > a ports committer for 2 decades by now. > > > > > > > If after this commit you need to rebuild base to use non-default > > LOCALBASE/PREFIX > > > > it is pretty big regression and POLA. > > > > > > How is that any different than before? > > > > > > What I did is make the PATH easier to change when you rebuild base. > > > > > > There are numerous programs in base that contain the literal string > > > /usr/local - and what I did was implement a mechanism that allows > > > to replace this literal reference with a simple change in paths.h. > > > > > > If you do not modify paths.h for a different LOCALBASE, then you'll > > > get a wrong _PATH_DEFPATH compiled into your binaries, for example. > > > > > > > > And I have made this a single instance that needs to be changed. > > > > > Before my change there were 2 instances of /usr/local hard-coded > > > > > in _PATH_DEFPATH - now you have to only change the definition of > > > > > _PATH_LOCALBASE to adjust all 3 locations that use it. > > > > I think you made situation worse, there were two stray hardcoded > > > > string and now there is official LOCALBASE define which likely will be > > > > used by other people in the future. > > > > > > I'd hope so to get rid of many of the 1713 literal uses of /usr/local > > > in our source tree. > > > > > > > > If you can show me precedence of a LOCALBASE environment variable > > > > > being used in the way you suggest, I'd be willing to make calendar > > > > > use it. > > > > Just an analogy from LOCALBASE make variable, perhaps CALENDAR_HOME > > > > is a better name. > > > > > > Yes, I already suggested CALENDAR_HOME, but as an environment variable > > > to check, if you want to be able to path an additional directory (or > > > search path) to the calendar program at run-time. But why introduce > > > a CALENDAR_HOME macro in the sources, if the port supplied calendar > > > files are known to be found at LOCALBASE/share/calendar (for some value > > > of LOCALBASE). > > > > > > I want to make more programs that currently hard-code /usr/local use > > > _PATH_LOCALBASE instead. This C macro can then be default to /usr/local > > > but can be overridden by passing LOCALBASE to the compiler (from the > > > build infrastructure) when paths.h is included. > > > > > > Instead of referring to _PATH_LOCALBASE these files could directly use > > > LOCALBASE, but since other paths are defined as _PATH_xxx in paths.h I > > > think it is best to follow this precedent. > > > > > > > > But then I think a CALENDAR_HOME variable would be even more useful, > > > > > since it would allow to search an additional user selected directory > > > > > (and not just share/calendar within what you provide as LOCALBASE). > > > > > > My change did not add any dependency on LOCALBASE to any previously > > > existing functionality. It added support for calendar files provided > > > by a port (a feature that did not exist before) at a location that is > > > correct for the big majority of users (who do not modify LOCALBASE). > > > > > > As I said: I'm going to make it easier to build the base system with > > > a different LOCALBASE, but not by run-time checking an environment > > > variable that specifies LOCALBASE in each affected program. > > It seems that you intend to follow through no matter what. So, just for > > the record, I think that hardcoding LOCALBASE and requiring base rebuild > > to change it is a very wrong approach. > > > > So, first off, it's already hard coded. Stefan's changes change the hard > coding from 'impossible to change' to 'changeable with a recompile' which > is an improvement. It might even wind up as a build variable (or not, doing > that has some really ugly, nasty dependencies). > > But even in ports-land, it's a compile time constant. Quite a large number > of ports will allow you to change it at compile / build time, but not > after. You have to rebuild if you want to change PREFIX... > > So I'm a bit puzzled what makes this the wrong approach? 1) Making it buildtime instead of fixing a few regression cases which as simple as reading environment variable before fallback to hardcoded /usr/local, or make it kernel variable/sysctl if security is a concern. 2) Codifying LOCALBASE = /usr/local, so from now more people will use it because it's in defines. -- Alex From owner-svn-src-head@freebsd.org Tue Oct 27 08:53:32 2020 Return-Path: Delivered-To: svn-src-head@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 48AE6444564; Tue, 27 Oct 2020 08:53:32 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CL58X19N6z4Wm1; Tue, 27 Oct 2020 08:53:32 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bbc0065341bf6eefbff0e.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:bc00:6534:1bf6:eefb:ff0e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 6BE8F2BA46; Tue, 27 Oct 2020 08:53:31 +0000 (UTC) (envelope-from se@freebsd.org) To: Alex Kozlov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> <20201026060038.GA78455@ravenloft.kiev.ua> <20201027073744.GA27357@ravenloft.kiev.ua> From: Stefan Esser Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar Message-ID: Date: Tue, 27 Oct 2020 09:53:27 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201027073744.GA27357@ravenloft.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kilvKSLv0TmgaSox3eZQsGj8shoKosD6N" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 08:53:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kilvKSLv0TmgaSox3eZQsGj8shoKosD6N Content-Type: multipart/mixed; boundary="FLmgHCC80PatMF74oOzaJ9G8g8NMEU4h1"; protected-headers="v1" From: Stefan Esser To: Alex Kozlov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar References: <202010230922.09N9MNZu040921@repo.freebsd.org> <20201024074840.GA26119@ravenloft.kiev.ua> <38d15142-1cb1-eb1f-215e-cee165743d99@freebsd.org> <20201025055633.GA52119@ravenloft.kiev.ua> <0140ae63-3044-9946-4047-c64331be0b50@freebsd.org> <20201026060038.GA78455@ravenloft.kiev.ua> <20201027073744.GA27357@ravenloft.kiev.ua> In-Reply-To: <20201027073744.GA27357@ravenloft.kiev.ua> --FLmgHCC80PatMF74oOzaJ9G8g8NMEU4h1 Content-Type: multipart/mixed; boundary="------------59B077A31C346F4B1268A04E" Content-Language: en-US This is a multi-part message in MIME format. --------------59B077A31C346F4B1268A04E Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Am 27.10.20 um 08:37 schrieb Alex Kozlov: > On Mon, Oct 26, 2020 at 12:11:56AM -0600, Warner Losh wrote: >> So, first off, it's already hard coded. Stefan's changes change the ha= rd >> coding from 'impossible to change' to 'changeable with a recompile' wh= ich >> is an improvement. It might even wind up as a build variable (or not, = doing >> that has some really ugly, nasty dependencies). >> >> But even in ports-land, it's a compile time constant. Quite a large nu= mber >> of ports will allow you to change it at compile / build time, but not >> after. You have to rebuild if you want to change PREFIX... >> >> So I'm a bit puzzled what makes this the wrong approach? > 1) Making it buildtime instead of fixing a few regression cases which a= s > simple as reading environment variable before fallback to hardcoded /us= r/local, > or make it kernel variable/sysctl if security is a concern. Please provide patches that make the affected programs use a run-time value for LOCALBASE (start with the base system, but do apply this to ports that are extensions of the base system functionality to be able to use packages on such a system with non-default LOCALBASE). And please show that there are no security issues, that there is no negative impact on the run-time for the huge majority of installations that use the default value of LOCALBASE, and that there is no added complexity to maintain such a system (starting from documentation that needs to be adapted to a dynamically changeable LOCALBASE). A compiled-in path is protected against manipulation by an attacker, and, while a sysctl value could be as well, you ought to be able to use different LOCALBASE values in jails, to make this really universal. Please provide an architectural draft that accounts for all these points and an estimate of the effort required to implement it and be assured we'll openly discuss it. > 2) Codifying LOCALBASE =3D /usr/local, so from now more people will use= > it because it's in defines. No, the _PATH_LOCALBASE makes it easier to refer to port provided files *without* hard-coding /usr/local! But LOCALBASE =3D=3D /usr/local has been the default for so many decades that I cannot remember when it started. Probably before BSD-4.2 already, but we have committers that don't have to guess but have been there ;-) (I've been a BSD user starting with BSD-4.2, and we have already used /usr/local for the programs distributed over USENET at that time ...) A verbatim /usr/local occurs in more than 1700 individual files in base, and I'm going to remove some 20 of them that get compiled into binaries. You are welcome to bring this number further down and we are awaiting your patches. We do not move base components to ports for fun, but to be able to disconnect them from the release cycle, to ease outside contributions, and to reduce the maintenance effort for release-agnostic components (no need to MFC updates to the calendar files, for example). And we have to compare the effort caused for the project with the effort it takes to make FreeBSD use a non-default LOCALBASE for users that really need it. Those will probably have forked off their own repository to be able to make much bigger changes to the code base - adjusting the _PATH_LOCALBASE before building the world is really a minor effort for them. And we want to make such a change of LOCALBASE easier than it used to be for a long time. If you are affected and the above does not apply to you, then please provide the patches you probably already have ready since you relied on them before the introduction of _PATH_LOCALBASE. Regards, STefan --------------59B077A31C346F4B1268A04E-- --FLmgHCC80PatMF74oOzaJ9G8g8NMEU4h1-- --kilvKSLv0TmgaSox3eZQsGj8shoKosD6N Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAl+X4AcFAwAAAAAACgkQR+u171r99UQ1 MggAriFLydIb/lJRitU7BHWgZ8ZGG5u2GjTPPbU2G1CC1A5DAkrSt20oVzwXQV1WqWwh/VseJCD4 4UMw2uvT0RnV/T7HTEFSYCl9JakRBxGDK5T5IE6GUmq5KEheYRfzyOi5q4GsnRH/d4dKyG5Jo4cx rvCR158xCnEP7YLfubbXMKjvyF14Rf2q21pyD9wOkblbrHHRfJN3MIvWX5tEb5I/ZMrXMX6/d+7U seOSVQG/jgGx7sKwfEy6yL1AWUWfPQzCpuP8jAjhk5EewIuhxhT5My92qqmAGQPBTkzjpfE/wlmn mm/UfqREAiu9JvXwLyMsGWeqdBtDmRIWIdpFvFs8Bg== =SIDW -----END PGP SIGNATURE----- --kilvKSLv0TmgaSox3eZQsGj8shoKosD6N-- From owner-svn-src-head@freebsd.org Tue Oct 27 09:32:07 2020 Return-Path: Delivered-To: svn-src-head@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 00ECD445853; Tue, 27 Oct 2020 09:32:07 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CL6125wy6z4Yj2; Tue, 27 Oct 2020 09:32:06 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEFE997FD; Tue, 27 Oct 2020 09:32:06 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09R9W6YJ012598; Tue, 27 Oct 2020 09:32:06 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09R9W6Vu012597; Tue, 27 Oct 2020 09:32:06 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202010270932.09R9W6Vu012597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 27 Oct 2020 09:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367072 - head/tools/build X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/tools/build X-SVN-Commit-Revision: 367072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 09:32:07 -0000 Author: 0mp (doc,ports committer) Date: Tue Oct 27 09:32:06 2020 New Revision: 367072 URL: https://svnweb.freebsd.org/changeset/base/367072 Log: Mount devfs inside a beinstall(8) chroot It turns out that without /dev/null beinstall is not able to complete and instead exits with messages similar to these: -------------------------------------------------------------- >>> Installing kernel GENERIC completed on Sun Oct 25 17:47:37 CET 2020 -------------------------------------------------------------- /tmp/beinstall.JleGoP/mnt: Inspecting dirs /usr/src /usr/obj/usr/src/amd64.amd64 --- installworld --- make[1]: "/usr/obj/usr/src/amd64.amd64/toolchain-metadata.mk" line 1: Using cached toolchain metadata from build at t480 on Sun Oct 25 15:53:28 CET 2020 make[2]: "/dev/null" line 2: Need an operator make[2]: Fatal errors encountered -- cannot continuemake[1]: "/usr/src/Makefile.inc1" line 593: CPUTYPE global should be set with ?=. Cleaning up ... umount -f /tmp/beinstall.JleGoP/mnt/usr/src /tmp/beinstall.JleGoP/mnt/usr/obj/usr/src/amd64.amd64 /tmp/beinstall.JleGoP/mnt Destroyed successfully error: Installworld failed! Upon a bit of debugging, it turns out that /dev/null inside the chroot environment is full random bytes, which cause "make -f /dev/null" to misbehave. Mounting a proper devfs inside the chroot seems to be the most appropriate way to fix it. will@ also noted that this change requires that whatever is needed in devfs must exist in the old kernel. Approved by: will MFC after: 2 week Differential Revision: https://reviews.freebsd.org/D26944 Modified: head/tools/build/beinstall.sh Modified: head/tools/build/beinstall.sh ============================================================================== --- head/tools/build/beinstall.sh Tue Oct 27 06:43:24 2020 (r367071) +++ head/tools/build/beinstall.sh Tue Oct 27 09:32:06 2020 (r367072) @@ -223,6 +223,7 @@ fi create_be_dirs "${srcdir}" "${objdir}" || errx "Unable to create BE dirs" mount -t nullfs "${srcdir}" "${BE_MNTPT}${srcdir}" || errx "Unable to mount src" mount -t nullfs "${objdir}" "${BE_MNTPT}${objdir}" || errx "Unable to mount obj" +mount -t devfs devfs "${BE_MNTPT}/dev" || errx "Unable to mount devfs" chroot ${BE_MNTPT} make "$@" -C ${srcdir} installworld || \ errx "Installworld failed!" From owner-svn-src-head@freebsd.org Tue Oct 27 09:41:02 2020 Return-Path: Delivered-To: svn-src-head@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 9037F445AE0; Tue, 27 Oct 2020 09:41:02 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CL6CL3JDTz4ZGB; Tue, 27 Oct 2020 09:41:02 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5383096A7; Tue, 27 Oct 2020 09:41:02 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09R9f2xt013941; Tue, 27 Oct 2020 09:41:02 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09R9f2xd013940; Tue, 27 Oct 2020 09:41:02 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202010270941.09R9f2xd013940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 27 Oct 2020 09:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367073 - head/usr.bin/backlight X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/backlight X-SVN-Commit-Revision: 367073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 09:41:02 -0000 Author: 0mp (doc,ports committer) Date: Tue Oct 27 09:41:01 2020 New Revision: 367073 URL: https://svnweb.freebsd.org/changeset/base/367073 Log: Clean up backlight.8 - Sort flags - Stylize incr|+ and decr|- properly - Add a missing period at the end of the description - Use the standard layout for the EXAMPLES section (remove the list macro and add indentation to the code block) Modified: head/usr.bin/backlight/backlight.8 Modified: head/usr.bin/backlight/backlight.8 ============================================================================== --- head/usr.bin/backlight/backlight.8 Tue Oct 27 09:32:06 2020 (r367072) +++ head/usr.bin/backlight/backlight.8 Tue Oct 27 09:41:01 2020 (r367073) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 06, 2020 +.Dd October 27, 2020 .Dt BACKLIGHT 8 .Os .Sh NAME @@ -31,21 +31,21 @@ .Sh SYNOPSIS .Nm .Op Fl f Ar device -.Op Fl q .Op Fl i +.Op Fl q .Op Ar value .Nm .Op Fl f Ar device -incr | + +.Cm incr Ns | Ns Cm + .Op Ar value .Nm .Op Fl f Ar device -decr | - +.Cm decr Ns | Ns Cm - .Op Ar value .Sh DESCRIPTION The .Nm -utility can be used to configure brightness levels for registered backlights +utility can be used to configure brightness levels for registered backlights. .Pp The options are as follows: .Bl -tag -width "-f device" @@ -57,30 +57,27 @@ is used. If an unqualified name is provided, .Pa /dev/backlight is automatically prepended. -.It Fl q -When querying the brightness level only print the value. .It Fl i Query information about the backlight (name, type). +.It Fl q +When querying the brightness level only print the value. .It Ar value Set the brightness level to this value, must be between 0 and 100. -A trailing '%' is valid. -.It Ar incr | + -.Op Ar value +A trailing +.Dq % +is valid. +.It Cm incr Ns | Ns Cm + Op Ar value Decrement the backlight level. If no value is specified a default of 10 percent is used. -.It Ar decr | - -.Op Ar value +.It Cm decr Ns | Ns Cm - Op Ar value Increment the backlight level. If no value is specified a default of 10 percent is used. .El .Sh EXAMPLES -.Bl -bullet -.It Show the current brightness level -.Bd -literal +.Bd -literal -offset indent backlight -f /dev/backlight/backlight0 .Ed -.El .Sh SEE ALSO .Xr backlight 9 .Sh HISTORY From owner-svn-src-head@freebsd.org Tue Oct 27 09:53:49 2020 Return-Path: Delivered-To: svn-src-head@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 B1F3144625E; Tue, 27 Oct 2020 09:53:49 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CL6V54Gblz4b0j; Tue, 27 Oct 2020 09:53:49 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75D849A9B; Tue, 27 Oct 2020 09:53:49 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09R9rns0026034; Tue, 27 Oct 2020 09:53:49 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09R9rnfu026033; Tue, 27 Oct 2020 09:53:49 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202010270953.09R9rnfu026033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 27 Oct 2020 09:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367074 - head/tests X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/tests X-SVN-Commit-Revision: 367074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 09:53:49 -0000 Author: 0mp (doc,ports committer) Date: Tue Oct 27 09:53:49 2020 New Revision: 367074 URL: https://svnweb.freebsd.org/changeset/base/367074 Log: Do not recommend to install kyua with pkg in the tests README Kyua is now available in the base system. While here, reword the usage section a bit. Modified: head/tests/README Modified: head/tests/README ============================================================================== --- head/tests/README Tue Oct 27 09:41:01 2020 (r367073) +++ head/tests/README Tue Oct 27 09:53:49 2020 (r367074) @@ -1,13 +1,11 @@ src/tests: The FreeBSD test suite ================================= -To run the FreeBSD test suite: -(1) Make sure that kyua is installed: - pkg install kyua -(2) To run the tests: +Usage of the FreeBSD test suite: +(1) Run the tests: kyua test -k /usr/tests/Kyuafile -(3) To see the test results: - kyua report +(2) See the test results: + kyua report For further information on using the test suite, read tests(7): man tests From owner-svn-src-head@freebsd.org Tue Oct 27 11:29:15 2020 Return-Path: Delivered-To: svn-src-head@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 BBD17448A20; Tue, 27 Oct 2020 11:29:15 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CL8cC4XSYz4gWX; Tue, 27 Oct 2020 11:29:15 +0000 (UTC) (envelope-from se@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 6631EAD05; Tue, 27 Oct 2020 11:29:15 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RBTF5V081675; Tue, 27 Oct 2020 11:29:15 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RBTBlW081653; Tue, 27 Oct 2020 11:29:11 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010271129.09RBTBlW081653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Tue, 27 Oct 2020 11:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367075 - in head: crypto/openssh/regress/unittests/sshkey lib/libc/nls lib/libfetch sbin/nvmecontrol secure/lib/libssh secure/usr.bin/ssh-agent tools/tools/ath/athprom tools/tools/net8... X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head: crypto/openssh/regress/unittests/sshkey lib/libc/nls lib/libfetch sbin/nvmecontrol secure/lib/libssh secure/usr.bin/ssh-agent tools/tools/ath/athprom tools/tools/net80211/wesside/wesside usr.... X-SVN-Commit-Revision: 367075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 11:29:15 -0000 Author: se Date: Tue Oct 27 11:29:11 2020 New Revision: 367075 URL: https://svnweb.freebsd.org/changeset/base/367075 Log: Replace literal uses of /usr/local in C sources with _PATH_LOCALBASE Literal references to /usr/local exist in a large number of files in the FreeBSD base system. Many are in contributed software, in configuration files, or in the documentation, but 19 uses have been identified in C source files or headers outside the contrib and sys/contrib directories. This commit makes it possible to set _PATH_LOCALBASE in paths.h to use a different prefix for locally installed software. In order to avoid changes to openssh source files, LOCALBASE is passed to the build via Makefiles under src/secure. While _PATH_LOCALBASE could have been used here, there is precedent in the construction of the path used to a xauth program which depends on the LOCALBASE value passed on the compiler command line to select a non-default directory. This could be changed in a later commit to make the openssh build consistently use _PATH_LOCALBASE. It is considered out-of-scope for this commit. Reviewed by: imp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D26942 Modified: head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c head/lib/libc/nls/msgcat.c head/lib/libfetch/common.c head/sbin/nvmecontrol/nvmecontrol.c head/secure/lib/libssh/Makefile head/secure/usr.bin/ssh-agent/Makefile head/tools/tools/ath/athprom/athprom.c head/tools/tools/net80211/wesside/wesside/wesside.c head/usr.bin/fortune/fortune/pathnames.h head/usr.bin/mail/pathnames.h head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c head/usr.sbin/cpucontrol/cpucontrol.c head/usr.sbin/cron/cron/pathnames.h head/usr.sbin/mailwrapper/mailwrapper.c head/usr.sbin/pciconf/pathnames.h head/usr.sbin/pkg/config.c head/usr.sbin/pkg/config.h head/usr.sbin/pkg/pkg.c Modified: head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c ============================================================================== --- head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c Tue Oct 27 11:29:11 2020 (r367075) @@ -9,6 +9,7 @@ #include #include +#include #include #ifdef HAVE_STDINT_H #include @@ -79,7 +80,7 @@ build_cert(struct sshbuf *b, const struct sshkey *k, c critopts = sshbuf_new(); ASSERT_PTR_NE(critopts, NULL); - put_opt(critopts, "force-command", "/usr/local/bin/nethack"); + put_opt(critopts, "force-command", _PATH_LOCALBASE "/bin/nethack"); put_opt(critopts, "source-address", "192.168.0.0/24,127.0.0.1,::1"); exts = sshbuf_new(); Modified: head/lib/libc/nls/msgcat.c ============================================================================== --- head/lib/libc/nls/msgcat.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/lib/libc/nls/msgcat.c Tue Oct 27 11:29:11 2020 (r367075) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -58,7 +59,9 @@ __FBSDID("$FreeBSD$"); #include "../locale/xlocale_private.h" -#define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L" +#define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:" \ + _PATH_LOCALBASE "/share/nls/%L/%N.cat:" \ + _PATH_LOCALBASE "/share/nls/%N/%L" #define RLOCK(fail) { int ret; \ if (__isthreaded && \ Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/lib/libfetch/common.c Tue Oct 27 11:29:11 2020 (r367075) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1071,7 +1072,7 @@ fetch_ssl_setup_transport_layer(SSL_CTX *ctx, int verb /* * Configure peer verification based on environment. */ -#define LOCAL_CERT_FILE "/usr/local/etc/ssl/cert.pem" +#define LOCAL_CERT_FILE _PATH_LOCALBASE "/etc/ssl/cert.pem" #define BASE_CERT_FILE "/etc/ssl/cert.pem" static int fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) Modified: head/sbin/nvmecontrol/nvmecontrol.c ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/sbin/nvmecontrol/nvmecontrol.c Tue Oct 27 11:29:11 2020 (r367075) @@ -179,7 +179,7 @@ main(int argc, char *argv[]) cmd_init(); cmd_load_dir("/lib/nvmecontrol", NULL, NULL); - cmd_load_dir("/usr/local/lib/nvmecontrol", NULL, NULL); + cmd_load_dir(_PATH_LOCALBASE "/lib/nvmecontrol", NULL, NULL); cmd_dispatch(argc, argv, NULL); Modified: head/secure/lib/libssh/Makefile ============================================================================== --- head/secure/lib/libssh/Makefile Tue Oct 27 09:53:49 2020 (r367074) +++ head/secure/lib/libssh/Makefile Tue Oct 27 11:29:11 2020 (r367075) @@ -53,6 +53,10 @@ CFLAGS+= -include krb5_config.h SRCS+= krb5_config.h .endif +.if defined(LOCALBASE) +CFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"' +.endif + NO_LINT= LIBADD+= crypto crypt z Modified: head/secure/usr.bin/ssh-agent/Makefile ============================================================================== --- head/secure/usr.bin/ssh-agent/Makefile Tue Oct 27 09:53:49 2020 (r367074) +++ head/secure/usr.bin/ssh-agent/Makefile Tue Oct 27 11:29:11 2020 (r367075) @@ -16,6 +16,10 @@ CFLAGS+= -DHAVE_LDNS=1 #LDADD+= -lldns .endif +.if defined(LOCALBASE) +CFLAGS+= -DDEFAULT_PKCS11_WHITELIST='"/usr/lib*/*,${LOCALBASE}/lib*/*"' +.endif + LIBADD+= crypto .include Modified: head/tools/tools/ath/athprom/athprom.c ============================================================================== --- head/tools/tools/ath/athprom/athprom.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/tools/tools/ath/athprom/athprom.c Tue Oct 27 11:29:11 2020 (r367075) @@ -41,12 +41,13 @@ #include #include #include +#include #include #include #include #ifndef DIR_TEMPLATE -#define DIR_TEMPLATE "/usr/local/libdata/athprom" +#define DIR_TEMPLATE _PATH_LOCALBASE "/libdata/athprom" #endif struct ath_diag atd; Modified: head/tools/tools/net80211/wesside/wesside/wesside.c ============================================================================== --- head/tools/tools/net80211/wesside/wesside/wesside.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/tools/tools/net80211/wesside/wesside/wesside.c Tue Oct 27 11:29:11 2020 (r367075) @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -154,7 +155,7 @@ unsigned int min_prga = 128; * XXX builtin pathnames */ #define CRACK_LOCAL_CMD "../aircrack/aircrack" -#define CRACK_INSTALL_CMD "/usr/local/bin/aircrack" +#define CRACK_INSTALL_CMD _PATH_LOCALBASE "/bin/aircrack" #define INCR 10000 int thresh_incr = INCR; Modified: head/usr.bin/fortune/fortune/pathnames.h ============================================================================== --- head/usr.bin/fortune/fortune/pathnames.h Tue Oct 27 09:53:49 2020 (r367074) +++ head/usr.bin/fortune/fortune/pathnames.h Tue Oct 27 11:29:11 2020 (r367075) @@ -30,5 +30,7 @@ * $FreeBSD$ */ +#include + #define FORTDIR "/usr/share/games/fortune:" \ - "/usr/local/share/games/fortune" + _PATH_LOCALBASE "/share/games/fortune" Modified: head/usr.bin/mail/pathnames.h ============================================================================== --- head/usr.bin/mail/pathnames.h Tue Oct 27 09:53:49 2020 (r367074) +++ head/usr.bin/mail/pathnames.h Tue Oct 27 11:29:11 2020 (r367075) @@ -33,8 +33,10 @@ * $FreeBSD$ */ +#include + #define _PATH_EX "/usr/bin/ex" #define _PATH_HELP "/usr/share/misc/mail.help" #define _PATH_TILDE "/usr/share/misc/mail.tildehelp" -#define _PATH_MASTER_RC "/usr/share/misc/mail.rc:/usr/local/etc/mail.rc:/etc/mail.rc" +#define _PATH_MASTER_RC "/usr/share/misc/mail.rc:" _PATH_LOCALBASE "/etc/mail.rc:/etc/mail.rc" #define _PATH_LESS "/usr/bin/less" Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c ============================================================================== --- head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c Tue Oct 27 11:29:11 2020 (r367075) @@ -81,6 +81,7 @@ #include #include #include +#include #include #include #include @@ -148,7 +149,7 @@ static int32_t pbchar = -1; static const char *paths[MAX_PATHS + 1] = { "/usr/share/snmp/defs", - "/usr/local/share/snmp/defs", + _PATH_LOCALBASE "/share/snmp/defs", NULL }; Modified: head/usr.sbin/cpucontrol/cpucontrol.c ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/usr.sbin/cpucontrol/cpucontrol.c Tue Oct 27 11:29:11 2020 (r367075) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -59,7 +60,7 @@ __FBSDID("$FreeBSD$"); int verbosity_level = 0; -#define DEFAULT_DATADIR "/usr/local/share/cpucontrol" +#define DEFAULT_DATADIR _PATH_LOCALBASE "/share/cpucontrol" #define FLAG_I 0x01 #define FLAG_M 0x02 Modified: head/usr.sbin/cron/cron/pathnames.h ============================================================================== --- head/usr.sbin/cron/cron/pathnames.h Tue Oct 27 09:53:49 2020 (r367074) +++ head/usr.sbin/cron/cron/pathnames.h Tue Oct 27 11:29:11 2020 (r367075) @@ -59,7 +59,7 @@ /* 4.3BSD-style crontab */ #define SYSCRONTAB "/etc/crontab" #define SYSCRONTABS "/etc/cron.d" -#define LOCALSYSCRONTABS "/usr/local/etc/cron.d" +#define LOCALSYSCRONTABS _PATH_LOCALBASE "/etc/cron.d" /* what editor to use if no EDITOR or VISUAL * environment variable specified. Modified: head/usr.sbin/mailwrapper/mailwrapper.c ============================================================================== --- head/usr.sbin/mailwrapper/mailwrapper.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/usr.sbin/mailwrapper/mailwrapper.c Tue Oct 27 11:29:11 2020 (r367075) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -105,7 +106,7 @@ main(int argc, char *argv[], char *envp[]) addarg(&al, argv[0]); snprintf(localmailerconf, MAXPATHLEN, "%s/etc/mail/mailer.conf", - getenv("LOCALBASE") ? getenv("LOCALBASE") : "/usr/local"); + getenv("LOCALBASE") ? getenv("LOCALBASE") : _PATH_LOCALBASE); mailerconf = localmailerconf; if ((config = fopen(localmailerconf, "r")) == NULL) Modified: head/usr.sbin/pciconf/pathnames.h ============================================================================== --- head/usr.sbin/pciconf/pathnames.h Tue Oct 27 09:53:49 2020 (r367074) +++ head/usr.sbin/pciconf/pathnames.h Tue Oct 27 11:29:11 2020 (r367075) @@ -1,4 +1,6 @@ /* $FreeBSD$ */ +#include + #define _PATH_DEVPCI "/dev/pci" #define _PATH_PCIVDB "/usr/share/misc/pci_vendors" -#define _PATH_LPCIVDB "/usr/local/share/pciids/pci.ids" +#define _PATH_LPCIVDB _PATH_LOCALBASE "/share/pciids/pci.ids" Modified: head/usr.sbin/pkg/config.c ============================================================================== --- head/usr.sbin/pkg/config.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/usr.sbin/pkg/config.c Tue Oct 27 11:29:11 2020 (r367075) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -454,7 +455,7 @@ config_init(void) } /* Read LOCALBASE/etc/pkg.conf first. */ - localbase = getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE; + localbase = getenv("LOCALBASE") ? getenv("LOCALBASE") : _PATH_LOCALBASE; snprintf(confpath, sizeof(confpath), "%s/etc/pkg.conf", localbase); Modified: head/usr.sbin/pkg/config.h ============================================================================== --- head/usr.sbin/pkg/config.h Tue Oct 27 09:53:49 2020 (r367074) +++ head/usr.sbin/pkg/config.h Tue Oct 27 11:29:11 2020 (r367075) @@ -31,7 +31,8 @@ #ifndef _PKG_CONFIG_H #define _PKG_CONFIG_H -#define _LOCALBASE "/usr/local" +#include + #define URL_SCHEME_PREFIX "pkg+" typedef enum { Modified: head/usr.sbin/pkg/pkg.c ============================================================================== --- head/usr.sbin/pkg/pkg.c Tue Oct 27 09:53:49 2020 (r367074) +++ head/usr.sbin/pkg/pkg.c Tue Oct 27 11:29:11 2020 (r367075) @@ -1046,7 +1046,7 @@ main(int argc, char *argv[]) yes = false; snprintf(pkgpath, MAXPATHLEN, "%s/sbin/pkg", - getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE); + getenv("LOCALBASE") ? getenv("LOCALBASE") : _PATH_LOCALBASE); if (argc > 1 && strcmp(argv[1], "bootstrap") == 0) { bootstrap_only = true; From owner-svn-src-head@freebsd.org Tue Oct 27 12:27:27 2020 Return-Path: Delivered-To: svn-src-head@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 37DB044B3AA; Tue, 27 Oct 2020 12:27: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CL9vM03Cxz4kv0; Tue, 27 Oct 2020 12:27: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 DAA12B79E; Tue, 27 Oct 2020 12:27:26 +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 09RCRQmo018076; Tue, 27 Oct 2020 12:27:26 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RCRQEN018075; Tue, 27 Oct 2020 12:27:26 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202010271227.09RCRQEN018075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 27 Oct 2020 12:27:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367076 - head/usr.bin/diff X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/diff X-SVN-Commit-Revision: 367076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 12:27:27 -0000 Author: kevans Date: Tue Oct 27 12:27:26 2020 New Revision: 367076 URL: https://svnweb.freebsd.org/changeset/base/367076 Log: diff: don't force the format to 'context' with -p immediately Instead, leave the fomat as unspecified (if it hasn't been) and use the -p flag as a hint to 'context' if no other formatting option is specified. This fixes `diff -purw`, used frequently by emaste, and matches the behavior of its GNU counterpart. PR: 250015 Reviewed by: emaste MFC after: 1 week Modified: head/usr.bin/diff/diff.c Modified: head/usr.bin/diff/diff.c ============================================================================== --- head/usr.bin/diff/diff.c Tue Oct 27 11:29:11 2020 (r367075) +++ head/usr.bin/diff/diff.c Tue Oct 27 12:27:26 2020 (r367076) @@ -210,17 +210,6 @@ main(int argc, char **argv) diff_format = D_NREVERSE; break; case 'p': - /* - * If it's not unset and it's not set to context or - * unified, we'll error out here as a conflicting - * format. If it's unset, we'll go ahead and set it to - * context. - */ - if (FORMAT_MISMATCHED(D_CONTEXT) && - FORMAT_MISMATCHED(D_UNIFIED)) - conflicting_format(); - if (diff_format == D_UNSET) - diff_format = D_CONTEXT; dflags |= D_PROTOTYPE; break; case 'P': @@ -320,6 +309,8 @@ main(int argc, char **argv) newarg = optind != prevoptind; prevoptind = optind; } + if (diff_format == D_UNSET && (dflags & D_PROTOTYPE) != 0) + diff_format = D_CONTEXT; if (diff_format == D_UNSET) diff_format = D_NORMAL; argc -= optind; From owner-svn-src-head@freebsd.org Tue Oct 27 12:32:18 2020 Return-Path: Delivered-To: svn-src-head@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 8E4C344BA6E; Tue, 27 Oct 2020 12:32:18 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLB0y3ClKz4lB2; Tue, 27 Oct 2020 12:32:18 +0000 (UTC) (envelope-from fernape@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 38F15BA2F; Tue, 27 Oct 2020 12:32:18 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RCWIMw023841; Tue, 27 Oct 2020 12:32:18 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RCWI05023840; Tue, 27 Oct 2020 12:32:18 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202010271232.09RCWI05023840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Tue, 27 Oct 2020 12:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367077 - head/usr.bin/renice X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/renice X-SVN-Commit-Revision: 367077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 12:32:18 -0000 Author: fernape (ports committer) Date: Tue Oct 27 12:32:17 2020 New Revision: 367077 URL: https://svnweb.freebsd.org/changeset/base/367077 Log: renice(8): Clarify "who" parameters. There was a question raised in freebsd-questions@ mail list[1] about the "who" parameters in this man page. It seems OpenBSD[2] amd NetBSD[3] both have more legible descriptions so I borrowed some of their ideas to try and make this page clearer. [1] https://lists.freebsd.org/pipermail/freebsd-questions/2020-October/291914.html [2] https://man.bsd.lv/renice [3] https://man.netbsd.org/renice.8 Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26950 Modified: head/usr.bin/renice/renice.8 Modified: head/usr.bin/renice/renice.8 ============================================================================== --- head/usr.bin/renice/renice.8 Tue Oct 27 12:27:26 2020 (r367076) +++ head/usr.bin/renice/renice.8 Tue Oct 27 12:32:17 2020 (r367077) @@ -28,7 +28,7 @@ .\" @(#)renice.8 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd October 27, 2020 .Dt RENICE 8 .Os .Sh NAME @@ -37,22 +37,18 @@ .Sh SYNOPSIS .Nm .Ar priority -.Op Oo Fl p Oc Ar pid ... -.Op Oo Fl g Oc Ar pgrp ... -.Op Oo Fl u Oc Ar user ... +.Op Oo Fl gpu Oc Ar target .Nm .Fl n Ar increment -.Op Oo Fl p Oc Ar pid ... -.Op Oo Fl g Oc Ar pgrp ... -.Op Oo Fl u Oc Ar user ... +.Op Oo Fl gpu Oc Ar target .Sh DESCRIPTION The .Nm utility alters the scheduling priority of one or more running processes. The following -.Ar who -parameters are interpreted as process ID's, process group +.Ar target +parameters are interpreted as process ID's (the default), process group ID's, user ID's or user names. The .Nm Ns 'ing @@ -62,27 +58,25 @@ The .Nm Ns 'ing of a user causes all processes owned by the user to have their scheduling priority altered. -By default, the processes to be affected are specified by -their process ID's. .Pp The following options are available: .Bl -tag -width indent -.It Fl g -Force -.Ar who -parameters to be interpreted as process group ID's. .It Fl n Instead of changing the specified processes to the given priority, interpret the following argument as an increment to be applied to the current priority of each process. -.It Fl u -Force the -.Ar who -parameters to be interpreted as user names or user ID's. +.It Fl g +Interpret +.Ar target +parameters as process group ID's. .It Fl p -Reset the -.Ar who -interpretation to be (the default) process ID's. +Interpret +.Ar target +parameters as process ID's (the default). +.It Fl u +Interpret +.Ar target +parameters as user names or user ID's. .El .Pp Users other than the super-user may only alter the priority of From owner-svn-src-head@freebsd.org Tue Oct 27 12:44:49 2020 Return-Path: Delivered-To: svn-src-head@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 C282D44BE52; Tue, 27 Oct 2020 12:44:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLBHP4pFhz4mDs; Tue, 27 Oct 2020 12:44:49 +0000 (UTC) (envelope-from kp@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 87FD8B47F; Tue, 27 Oct 2020 12:44:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RCinNj030068; Tue, 27 Oct 2020 12:44:49 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RCindK030067; Tue, 27 Oct 2020 12:44:49 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202010271244.09RCindK030067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Tue, 27 Oct 2020 12:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367078 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 367078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 12:44:49 -0000 Author: kp Date: Tue Oct 27 12:44:49 2020 New Revision: 367078 URL: https://svnweb.freebsd.org/changeset/base/367078 Log: riscv: Minor cleanup in startup code - remove setting of register value which is not used until the next value is set - Use the L2_SHIFT constant when setting up L2 superpages Submitted by: Antonin Houska Modified: head/sys/riscv/riscv/locore.S Modified: head/sys/riscv/riscv/locore.S ============================================================================== --- head/sys/riscv/riscv/locore.S Tue Oct 27 12:32:17 2020 (r367077) +++ head/sys/riscv/riscv/locore.S Tue Oct 27 12:44:49 2020 (r367078) @@ -135,10 +135,9 @@ pagetables: /* Level 2 superpages (512 x 2MiB) */ lla s1, pagetable_l2 - srli t4, s9, 21 /* Div physmem base by 2 MiB */ + srli t4, s9, L2_SHIFT /* Div physmem base by 2 MiB */ li t2, 512 /* Build 512 entries */ add t3, t4, t2 - li t5, 0 li t0, (PTE_KERN | PTE_X) 1: slli t2, t4, PTE_PPN1_S /* << PTE_PPN1_S */ From owner-svn-src-head@freebsd.org Tue Oct 27 12:49:42 2020 Return-Path: Delivered-To: svn-src-head@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 1D98A44BCE7; Tue, 27 Oct 2020 12:49:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLBP1738Wz4mJk; Tue, 27 Oct 2020 12:49:41 +0000 (UTC) (envelope-from trasz@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 D54F1B94A; Tue, 27 Oct 2020 12:49:41 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RCnfgo030328; Tue, 27 Oct 2020 12:49:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RCnea9030321; Tue, 27 Oct 2020 12:49:40 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010271249.09RCnea9030321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 27 Oct 2020 12:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367079 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Commit-Revision: 367079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 12:49:42 -0000 Author: trasz Date: Tue Oct 27 12:49:40 2020 New Revision: 367079 URL: https://svnweb.freebsd.org/changeset/base/367079 Log: Fix misnomer - linux_to_bsd_errno() does the exact opposite. Reported by: arichardson MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26965 Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/arm64/linux/linux_sysvec.c head/sys/compat/linux/linux.h head/sys/compat/linux/linux_errno.c head/sys/compat/linux/linux_socket.c head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Tue Oct 27 12:44:49 2020 (r367078) +++ head/sys/amd64/linux/linux_sysvec.c Tue Oct 27 12:49:40 2020 (r367079) @@ -231,7 +231,7 @@ linux_set_syscall_retval(struct thread *td, int error) break; default: - frame->tf_rax = linux_to_bsd_errno(error); + frame->tf_rax = bsd_to_linux_errno(error); frame->tf_r10 = frame->tf_rcx; break; } Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Tue Oct 27 12:44:49 2020 (r367078) +++ head/sys/amd64/linux32/linux32_sysvec.c Tue Oct 27 12:49:40 2020 (r367079) @@ -678,7 +678,7 @@ linux32_set_syscall_retval(struct thread *td, int erro if (__predict_false(error != 0)) { if (error != ERESTART && error != EJUSTRETURN) - frame->tf_rax = linux_to_bsd_errno(error); + frame->tf_rax = bsd_to_linux_errno(error); } } Modified: head/sys/arm64/linux/linux_sysvec.c ============================================================================== --- head/sys/arm64/linux/linux_sysvec.c Tue Oct 27 12:44:49 2020 (r367078) +++ head/sys/arm64/linux/linux_sysvec.c Tue Oct 27 12:49:40 2020 (r367079) @@ -142,10 +142,8 @@ linux_set_syscall_retval(struct thread *td, int error) cpu_set_syscall_retval(td, error); if (__predict_false(error != 0)) { - if (error != ERESTART && error != EJUSTRETURN) { - td->td_frame->tf_x[0] = - linux_to_bsd_errno(error); - } + if (error != ERESTART && error != EJUSTRETURN) + td->td_frame->tf_x[0] = bsd_to_linux_errno(error); } } Modified: head/sys/compat/linux/linux.h ============================================================================== --- head/sys/compat/linux/linux.h Tue Oct 27 12:44:49 2020 (r367078) +++ head/sys/compat/linux/linux.h Tue Oct 27 12:49:40 2020 (r367079) @@ -196,6 +196,6 @@ int linux_to_bsd_bits_(int value, struct bsd_to_linux_ } #define BITMAP_1t1_LINUX(_name) BITMAP_EASY_LINUX(_name, LINUX_##_name) -int linux_to_bsd_errno(int error); +int bsd_to_linux_errno(int error); #endif /* _LINUX_MI_H_ */ Modified: head/sys/compat/linux/linux_errno.c ============================================================================== --- head/sys/compat/linux/linux_errno.c Tue Oct 27 12:44:49 2020 (r367078) +++ head/sys/compat/linux/linux_errno.c Tue Oct 27 12:49:40 2020 (r367079) @@ -11,7 +11,7 @@ __FBSDID("$FreeBSD$"); #include int -linux_to_bsd_errno(int error) +bsd_to_linux_errno(int error) { KASSERT(error >= 0 && error <= ELAST, Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Tue Oct 27 12:44:49 2020 (r367078) +++ head/sys/compat/linux/linux_socket.c Tue Oct 27 12:49:40 2020 (r367079) @@ -1559,7 +1559,7 @@ linux_getsockopt(struct thread *td, struct linux_getso name, &newval, UIO_SYSSPACE, &len); if (error != 0) return (error); - newval = -linux_to_bsd_errno(newval); + newval = -bsd_to_linux_errno(newval); return (copyout(&newval, PTRIN(args->optval), len)); /* NOTREACHED */ default: Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Tue Oct 27 12:44:49 2020 (r367078) +++ head/sys/i386/linux/linux_sysvec.c Tue Oct 27 12:49:40 2020 (r367079) @@ -800,7 +800,7 @@ linux_set_syscall_retval(struct thread *td, int error) if (__predict_false(error != 0)) { if (error != ERESTART && error != EJUSTRETURN) - frame->tf_eax = linux_to_bsd_errno(error); + frame->tf_eax = bsd_to_linux_errno(error); } } From owner-svn-src-head@freebsd.org Tue Oct 27 12:57:26 2020 Return-Path: Delivered-To: svn-src-head@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 2F4F544C808; Tue, 27 Oct 2020 12:57:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLBYy0TKRz4nGD; Tue, 27 Oct 2020 12:57:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id CFA0D2DE82; Tue, 27 Oct 2020 12:57:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 2A0F84913A; Tue, 27 Oct 2020 13:57:24 +0100 (CET) Date: Tue, 27 Oct 2020 13:57:24 +0100 From: Baptiste Daroussin To: Kyle Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367076 - head/usr.bin/diff Message-ID: <20201027125724.onnk46ruaqyqyizk@ivaldir.net> References: <202010271227.09RCRQEN018075@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qk7s5qzpftmxct3m" Content-Disposition: inline In-Reply-To: <202010271227.09RCRQEN018075@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 12:57:26 -0000 --qk7s5qzpftmxct3m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 27, 2020 at 12:27:26PM +0000, Kyle Evans wrote: > Author: kevans > Date: Tue Oct 27 12:27:26 2020 > New Revision: 367076 > URL: https://svnweb.freebsd.org/changeset/base/367076 >=20 > Log: > diff: don't force the format to 'context' with -p immediately > =20 > Instead, leave the fomat as unspecified (if it hasn't been) and use the > -p flag as a hint to 'context' if no other formatting option is specifi= ed. > =20 > This fixes `diff -purw`, used frequently by emaste, and matches the beh= avior > of its GNU counterpart. > =20 > PR: 250015 > Reviewed by: emaste > MFC after: 1 week >=20 > Modified: > head/usr.bin/diff/diff.c >=20 > Modified: head/usr.bin/diff/diff.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/diff/diff.c Tue Oct 27 11:29:11 2020 (r367075) > +++ head/usr.bin/diff/diff.c Tue Oct 27 12:27:26 2020 (r367076) > @@ -210,17 +210,6 @@ main(int argc, char **argv) > diff_format =3D D_NREVERSE; > break; > case 'p': > - /* > - * If it's not unset and it's not set to context or > - * unified, we'll error out here as a conflicting > - * format. If it's unset, we'll go ahead and set it to > - * context. > - */ > - if (FORMAT_MISMATCHED(D_CONTEXT) && > - FORMAT_MISMATCHED(D_UNIFIED)) > - conflicting_format(); > - if (diff_format =3D=3D D_UNSET) > - diff_format =3D D_CONTEXT; > dflags |=3D D_PROTOTYPE; > break; > case 'P': > @@ -320,6 +309,8 @@ main(int argc, char **argv) > newarg =3D optind !=3D prevoptind; > prevoptind =3D optind; > } > + if (diff_format =3D=3D D_UNSET && (dflags & D_PROTOTYPE) !=3D 0) > + diff_format =3D D_CONTEXT; > if (diff_format =3D=3D D_UNSET) > diff_format =3D D_NORMAL; > argc -=3D optind; I think it would be great to have a test to ensure we don't break it in the futur. Bapt --qk7s5qzpftmxct3m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAl+YGTEACgkQY4mL3PG3 PlpnOxAA48yGK1BrhOTGjcVhAAFdV2Cf05/nYHN1FlnRpzMVKlaem+ulNsu4uRd9 1Zz3tZaYgVBTPBEuH+QVzToOUimLkTxXv3OVCAIaKx/XT2bz1d2n5UH8+kD3Jr22 0lWW19QeOdoJw2m4vJow1Tre//8fDFpmh4NVIG5jKPcDyqygZ8zy5BNfRFuqh6PT Wmi72um5/enFcg9Uknx4UEFW6/KsYbIZi+qHoziDpgMIUIvCuhVd5z8sH2FT7XFC P3Zxht1DbE2iV3MrikQh4PM7dl7ntwIklhcz15qUlWawscRTDZKxk/7mkQV+s5Fn gbu91iSVD8/iZzGAHkylhCetUl1jZHjbjfDRYIqZAOzmTopv9SMH9j6n5dI/gnpR ao4yon1LYhuhXxLe9GS7AkmPRoZnsWYfMBswDoJgWmbYHzyfa734Pa1DbDqIy/R4 jNhAbr/3qyhINDeZ4Cvjh17+ZqTkfnHQGLkSaZNzk6Gnqor7LULOa+qWdrDq/ITt e/OL8qM5ieHbBBmlgvErWH1c+dkGDIlLUp31Zmw1JRhITjprg+2zlUycfAF+wzUI yRlKpj2aOQ8ICbwB2mVmNSg8E+XjLqcMDNg0YMr8aMNgmvKWKVXQtf7ugU3MZAWI Kkx5YrVUisuqs8k50tThRe083VEfadOURS0ULF/OzOP4Fd1u1Qg= =HoRE -----END PGP SIGNATURE----- --qk7s5qzpftmxct3m-- From owner-svn-src-head@freebsd.org Tue Oct 27 12:59:52 2020 Return-Path: Delivered-To: svn-src-head@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 F020C44CA1E; Tue, 27 Oct 2020 12:59:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLBcm64x8z4nL4; Tue, 27 Oct 2020 12:59:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id AEF122DBF3; Tue, 27 Oct 2020 12:59:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f51.google.com with SMTP id s17so557848qvr.11; Tue, 27 Oct 2020 05:59:52 -0700 (PDT) X-Gm-Message-State: AOAM530cCW0rTmnuzDaOtTseuAO308jwuHfG1Lshv8rrmUqNt2KEZss6 qRsghvpVRENdVXjUC6zRT7pV2COS1v0yDduT3qI= X-Google-Smtp-Source: ABdhPJxEzPkNQHIafYeSVYSGYpg+SLMjjGoRGxvtg4KP9ByrESvZZ6Oan+9CA4p23E/iv1xV3GcnUksbRJypeApBLx4= X-Received: by 2002:ad4:4e47:: with SMTP id eb7mr2382099qvb.34.1603803592232; Tue, 27 Oct 2020 05:59:52 -0700 (PDT) MIME-Version: 1.0 References: <202010271227.09RCRQEN018075@repo.freebsd.org> <20201027125724.onnk46ruaqyqyizk@ivaldir.net> In-Reply-To: <20201027125724.onnk46ruaqyqyizk@ivaldir.net> From: Kyle Evans Date: Tue, 27 Oct 2020 07:59:40 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r367076 - head/usr.bin/diff To: Baptiste Daroussin Cc: Kyle Evans , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 12:59:53 -0000 On Tue, Oct 27, 2020 at 7:57 AM Baptiste Daroussin wrote: > > On Tue, Oct 27, 2020 at 12:27:26PM +0000, Kyle Evans wrote: > > Author: kevans > > Date: Tue Oct 27 12:27:26 2020 > > New Revision: 367076 > > URL: https://svnweb.freebsd.org/changeset/base/367076 > > > > Log: > > diff: don't force the format to 'context' with -p immediately > > > > Instead, leave the fomat as unspecified (if it hasn't been) and use the > > -p flag as a hint to 'context' if no other formatting option is specified. > > > > This fixes `diff -purw`, used frequently by emaste, and matches the behavior > > of its GNU counterpart. > > > > PR: 250015 > > Reviewed by: emaste > > MFC after: 1 week > > > > Modified: > > head/usr.bin/diff/diff.c > > > > Modified: head/usr.bin/diff/diff.c > > ============================================================================== > > --- head/usr.bin/diff/diff.c Tue Oct 27 11:29:11 2020 (r367075) > > +++ head/usr.bin/diff/diff.c Tue Oct 27 12:27:26 2020 (r367076) > > @@ -210,17 +210,6 @@ main(int argc, char **argv) > > diff_format = D_NREVERSE; > > break; > > case 'p': > > - /* > > - * If it's not unset and it's not set to context or > > - * unified, we'll error out here as a conflicting > > - * format. If it's unset, we'll go ahead and set it to > > - * context. > > - */ > > - if (FORMAT_MISMATCHED(D_CONTEXT) && > > - FORMAT_MISMATCHED(D_UNIFIED)) > > - conflicting_format(); > > - if (diff_format == D_UNSET) > > - diff_format = D_CONTEXT; > > dflags |= D_PROTOTYPE; > > break; > > case 'P': > > @@ -320,6 +309,8 @@ main(int argc, char **argv) > > newarg = optind != prevoptind; > > prevoptind = optind; > > } > > + if (diff_format == D_UNSET && (dflags & D_PROTOTYPE) != 0) > > + diff_format = D_CONTEXT; > > if (diff_format == D_UNSET) > > diff_format = D_NORMAL; > > argc -= optind; > > I think it would be great to have a test to ensure we don't break it in the > futur. > Yeah, I had the same thought right after :wq :-) I'll whip up a test this afternoon. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Tue Oct 27 13:27:48 2020 Return-Path: Delivered-To: svn-src-head@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 60E6B44DB1B; Tue, 27 Oct 2020 13:27:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLCF013xpz4qFq; Tue, 27 Oct 2020 13:27:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 093A9C2A5; Tue, 27 Oct 2020 13:27:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RDRlkh055075; Tue, 27 Oct 2020 13:27:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RDRlrG055074; Tue, 27 Oct 2020 13:27:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202010271327.09RDRlrG055074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 27 Oct 2020 13:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367081 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 367081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 13:27:48 -0000 Author: markj Date: Tue Oct 27 13:27:47 2020 New Revision: 367081 URL: https://svnweb.freebsd.org/changeset/base/367081 Log: arm64: Remove a racy KASSERT from pmap_remove_pages() PCPU_GET(curpmap) expands to multiple instructions on arm64, and if the current thread is migrated in between execution of those instructions, a stale value may be used in the assertion condition. Diagnosed by: mmel Reported by: mmel, Bob Prohaska Submitted by: alc MFC after: 1 week Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Tue Oct 27 13:13:04 2020 (r367080) +++ head/sys/arm64/arm64/pmap.c Tue Oct 27 13:27:47 2020 (r367081) @@ -4838,8 +4838,6 @@ pmap_remove_pages(pmap_t pmap) int allfree, field, freed, idx, lvl; vm_paddr_t pa; - KASSERT(pmap == PCPU_GET(curpmap), ("non-current pmap %p", pmap)); - lock = NULL; SLIST_INIT(&free); From owner-svn-src-head@freebsd.org Tue Oct 27 15:18:10 2020 Return-Path: Delivered-To: svn-src-head@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 F063445178B; Tue, 27 Oct 2020 15:18:10 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLFhL64vWz3VD0; Tue, 27 Oct 2020 15:18:10 +0000 (UTC) (envelope-from br@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 B4B26D270; Tue, 27 Oct 2020 15:18:10 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RFIAZD024156; Tue, 27 Oct 2020 15:18:10 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RFIAaO024155; Tue, 27 Oct 2020 15:18:10 GMT (envelope-from br@FreeBSD.org) Message-Id: <202010271518.09RFIAaO024155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 27 Oct 2020 15:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367084 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 367084 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 15:18:11 -0000 Author: br Date: Tue Oct 27 15:18:10 2020 New Revision: 367084 URL: https://svnweb.freebsd.org/changeset/base/367084 Log: Take the ITS device lock around gicv3_its_release_irqsrc() since that function checks that the mutex lock is owned. This fixes 'devctl disable re0' operation. Sponsored by: Innovate DSbD Differential Revision: https://reviews.freebsd.org/D26904 Modified: head/sys/arm64/arm64/gicv3_its.c Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Tue Oct 27 15:10:50 2020 (r367083) +++ head/sys/arm64/arm64/gicv3_its.c Tue Oct 27 15:18:10 2020 (r367084) @@ -1418,7 +1418,9 @@ gicv3_its_release_msix(device_t dev, device_t child, s sc = device_get_softc(dev); girq = (struct gicv3_its_irqsrc *)isrc; + mtx_lock_spin(&sc->sc_its_dev_lock); gicv3_its_release_irqsrc(sc, girq); + mtx_unlock_spin(&sc->sc_its_dev_lock); its_dev->lpis.lpi_busy--; if (its_dev->lpis.lpi_busy == 0) From owner-svn-src-head@freebsd.org Tue Oct 27 15:29:53 2020 Return-Path: Delivered-To: svn-src-head@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 DA7CB451A9B; Tue, 27 Oct 2020 15:29:53 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLFxs5RP8z3Vgq; Tue, 27 Oct 2020 15:29:53 +0000 (UTC) (envelope-from br@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 9F5E3D6F2; Tue, 27 Oct 2020 15:29:53 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RFTr2N030469; Tue, 27 Oct 2020 15:29:53 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RFTr14030468; Tue, 27 Oct 2020 15:29:53 GMT (envelope-from br@FreeBSD.org) Message-Id: <202010271529.09RFTr14030468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 27 Oct 2020 15:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367085 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 367085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 15:29:53 -0000 Author: br Date: Tue Oct 27 15:29:53 2020 New Revision: 367085 URL: https://svnweb.freebsd.org/changeset/base/367085 Log: o Add the domain member to the struct bus_dma_tag_common as required by busdma_iommu.c. o Add tag_set_domain() pointer to the struct bus_dma_impl as well. Sponsored by: Innovate DSbD Modified: head/sys/arm64/include/bus_dma_impl.h Modified: head/sys/arm64/include/bus_dma_impl.h ============================================================================== --- head/sys/arm64/include/bus_dma_impl.h Tue Oct 27 15:18:10 2020 (r367084) +++ head/sys/arm64/include/bus_dma_impl.h Tue Oct 27 15:29:53 2020 (r367085) @@ -48,6 +48,7 @@ struct bus_dma_tag_common { bus_dma_lock_t *lockfunc; void *lockfuncarg; int ref_count; + int domain; }; struct bus_dma_impl { @@ -58,6 +59,7 @@ struct bus_dma_impl { bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, void *lockfuncarg, bus_dma_tag_t *dmat); int (*tag_destroy)(bus_dma_tag_t dmat); + int (*tag_set_domain)(bus_dma_tag_t); bool (*id_mapped)(bus_dma_tag_t, vm_paddr_t, bus_size_t); int (*map_create)(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp); int (*map_destroy)(bus_dma_tag_t dmat, bus_dmamap_t map); From owner-svn-src-head@freebsd.org Tue Oct 27 16:43:03 2020 Return-Path: Delivered-To: svn-src-head@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 984ED454040; Tue, 27 Oct 2020 16:43:03 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLHZG64PZz3bGs; Tue, 27 Oct 2020 16:43:02 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ej1-f66.google.com with SMTP id p5so3206560ejj.2; Tue, 27 Oct 2020 09:43:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sPt1qA3BqfNjVXLCFMzkg+LcIb8sLXrSTErzb+JWvyQ=; b=JD+p7S7En9z+yxYLxz076rZcARiwka6L9nZDUHZspiNvqfV0bfFOsVXP27S9RwdsC9 94tT3HXuJuQKj2MEONaifBtwb/C++lVEima47ANV15mBHNYs6b+1W7sgNTYVT1zL3UCq h0fLIbP13GdEl3+HOrkFrX2iTELWtwDQWGz2VbPSnXJJCkffC1NPPGficPWEFuKJyLCa iWw7snZokH1iwtj9s/Gfm6o02iFC4wP2lbNUom4AqUXW5WAf0aZ30BXEkugeE2v3ZXii wY1yUkTapuel2v4jtM4BwMBnxYzYIYZyksDS6x0qGl223zdVD8+DvYAW5ZdTSGlJK7eG APwQ== X-Gm-Message-State: AOAM53068exTDEK3MecjA0HVwzN9PbPF3ksxayB5bimtJikoEqzbhCOC 9XLD15H747W1yxREgmmfiZCgYNS6znVlbw== X-Google-Smtp-Source: ABdhPJwa8wsexn8PA3i+A81OUXT8ruAdVD6tM1nsJ3/hu09rZdIsA9keDacESORblfrGmAhp/nTT0A== X-Received: by 2002:a17:906:9588:: with SMTP id r8mr3345500ejx.389.1603816981268; Tue, 27 Oct 2020 09:43:01 -0700 (PDT) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com. [209.85.221.52]) by smtp.gmail.com with ESMTPSA id e19sm1394473ejz.35.2020.10.27.09.43.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Oct 2020 09:43:00 -0700 (PDT) Received: by mail-wr1-f52.google.com with SMTP id n15so2695365wrq.2; Tue, 27 Oct 2020 09:43:00 -0700 (PDT) X-Received: by 2002:adf:a51d:: with SMTP id i29mr3959038wrb.409.1603816980640; Tue, 27 Oct 2020 09:43:00 -0700 (PDT) MIME-Version: 1.0 References: <202010241023.09OANMcL075640@repo.freebsd.org> <20201024125206.GB38000@FreeBSD.org> In-Reply-To: <20201024125206.GB38000@FreeBSD.org> From: Alexander Richardson Date: Tue, 27 Oct 2020 16:42:49 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r366993 - head/sys/net To: Alexey Dokuchaev Cc: Hans Petter Selasky , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CLHZG64PZz3bGs X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of arichardsonkde@gmail.com designates 209.85.218.66 as permitted sender) smtp.mailfrom=arichardsonkde@gmail.com X-Spamd-Result: default: False [-2.07 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[209.85.218.66:from]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-0.94)[-0.940]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-0.95)[-0.947]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.19)[-0.188]; RCVD_IN_DNSWL_NONE(0.00)[209.85.218.66:from]; FORGED_SENDER(0.30)[arichardson@freebsd.org,arichardsonkde@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[arichardson@freebsd.org,arichardsonkde@gmail.com]; TAGGED_FROM(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 16:43:03 -0000 On Sat, 24 Oct 2020 at 13:52, Alexey Dokuchaev wrote: > > On Sat, Oct 24, 2020 at 10:23:22AM +0000, Hans Petter Selasky wrote: > > New Revision: 366993 > > URL: https://svnweb.freebsd.org/changeset/base/366993 > > > > Log: > > Run code through "clang-format -style=file" with some additional fixes. > > No functional change. > > > > ... > > @@ -99,8 +97,8 @@ infiniband_ipv4_multicast_map(uint32_t addr, > > > > #ifdef INET6 > > static inline void > > -infiniband_ipv6_multicast_map(const struct in6_addr *addr, > > - const uint8_t *broadcast, uint8_t *buf) > > +infiniband_ipv6_multicast_map( > > + const struct in6_addr *addr, const uint8_t *broadcast, uint8_t *buf) > > { > > This is not how we format these in FreeBSD, please revert. It was correct > before and no "fix" is need here. > > ./danfe Unfortunately this is a limitation of the current clang-format version. I've submitted a patch upstream as https://reviews.llvm.org/D90246 and the config file change is https://reviews.freebsd.org/D26978. Alex From owner-svn-src-head@freebsd.org Tue Oct 27 18:08:34 2020 Return-Path: Delivered-To: svn-src-head@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 6C7F645682B; Tue, 27 Oct 2020 18:08:34 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLKSy2F54z3yD9; Tue, 27 Oct 2020 18:08:34 +0000 (UTC) (envelope-from alc@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 3017FFA16; Tue, 27 Oct 2020 18:08:34 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RI8YAr035902; Tue, 27 Oct 2020 18:08:34 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RI8Ypb035901; Tue, 27 Oct 2020 18:08:34 GMT (envelope-from alc@FreeBSD.org) Message-Id: <202010271808.09RI8Ypb035901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 27 Oct 2020 18:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367087 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 367087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 18:08:34 -0000 Author: alc Date: Tue Oct 27 18:08:33 2020 New Revision: 367087 URL: https://svnweb.freebsd.org/changeset/base/367087 Log: Revise the description of MAP_STACK. In particular, describe the guard in more detail. Reviewed by: bcr, kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26908 Modified: head/lib/libc/sys/mmap.2 Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Tue Oct 27 17:25:40 2020 (r367086) +++ head/lib/libc/sys/mmap.2 Tue Oct 27 18:08:33 2020 (r367087) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd October 21, 2020 +.Dd October 27, 2020 .Dt MMAP 2 .Os .Sh NAME @@ -319,9 +319,30 @@ Modifications are private. .It Dv MAP_SHARED Modifications are shared. .It Dv MAP_STACK +Creates both a mapped region that grows downward on demand and an +adjoining guard that both reserves address space for the mapped region +to grow into and limits the mapped region's growth. +Together, the mapped region and the guard occupy +.Fa len +bytes of the address space. +The guard starts at the returned address, and the mapped region ends at +the returned address plus +.Fa len +bytes. +Upon access to the guard, the mapped region automatically grows in size, +and the guard shrinks by an equal amount. +Essentially, the boundary between the guard and the mapped region moves +downward so that the access falls within the enlarged mapped region. +However, the guard will never shrink to less than the number of pages +specified by the sysctl +.Dv security.bsd.stack_guard_page , +thereby ensuring that a gap for detecting stack overflow always exists +between the downward growing mapped region and the closest mapped region +beneath it. +.Pp .Dv MAP_STACK implies -.Dv MAP_ANON , +.Dv MAP_ANON and .Fa offset of 0. @@ -334,23 +355,6 @@ must include at least .Dv PROT_READ and .Dv PROT_WRITE . -.Pp -This option creates -a memory region that grows to at most -.Fa len -bytes in size, starting from the stack top and growing down. -The -stack top is the starting address returned by the call, plus -.Fa len -bytes. -The bottom of the stack at maximum growth is the starting -address returned by the call. -.Pp -Stacks created with -.Dv MAP_STACK -automatically grow. -Guards prevent inadvertent use of the regions into which those -stacks can grow without requiring mapping the whole stack in advance. The size of the guard, in pages, is specified by sysctl .Dv security.bsd.stack_guard_page . .El From owner-svn-src-head@freebsd.org Tue Oct 27 18:11:11 2020 Return-Path: Delivered-To: svn-src-head@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 F230D456928; Tue, 27 Oct 2020 18:11:11 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLKWz60gSz3yMb; Tue, 27 Oct 2020 18:11:11 +0000 (UTC) (envelope-from mjg@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 B135CF92E; Tue, 27 Oct 2020 18:11:11 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RIBBCm039126; Tue, 27 Oct 2020 18:11:11 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RIBBqZ039125; Tue, 27 Oct 2020 18:11:11 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010271811.09RIBBqZ039125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 27 Oct 2020 18:11:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367088 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 367088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 18:11:12 -0000 Author: mjg Date: Tue Oct 27 18:11:11 2020 New Revision: 367088 URL: https://svnweb.freebsd.org/changeset/base/367088 Log: refcount: make it atomic-clean While here consistently use 'old' in all places. Tested by: pho Modified: head/sys/sys/refcount.h Modified: head/sys/sys/refcount.h ============================================================================== --- head/sys/sys/refcount.h Tue Oct 27 18:08:33 2020 (r367087) +++ head/sys/sys/refcount.h Tue Oct 27 18:11:11 2020 (r367088) @@ -63,7 +63,7 @@ refcount_init(volatile u_int *count, u_int value) { KASSERT(!REFCOUNT_SATURATED(value), ("invalid initial refcount value %u", value)); - *count = value; + atomic_store_int(count, value); } static __inline u_int @@ -95,13 +95,14 @@ refcount_acquiren(volatile u_int *count, u_int n) static __inline __result_use_check bool refcount_acquire_checked(volatile u_int *count) { - u_int lcount; + u_int old; - for (lcount = *count;;) { - if (__predict_false(REFCOUNT_SATURATED(lcount + 1))) + old = atomic_load_int(count); + for (;;) { + if (__predict_false(REFCOUNT_SATURATED(old + 1))) return (false); - if (__predict_true(atomic_fcmpset_int(count, &lcount, - lcount + 1) == 1)) + if (__predict_true(atomic_fcmpset_int(count, &old, + old + 1) == 1)) return (true); } } @@ -115,7 +116,7 @@ refcount_acquire_if_gt(volatile u_int *count, u_int n) { u_int old; - old = *count; + old = atomic_load_int(count); for (;;) { if (old <= n) return (false); @@ -174,7 +175,7 @@ refcount_release_if_gt(volatile u_int *count, u_int n) KASSERT(n > 0, ("refcount_release_if_gt: Use refcount_release for final ref")); - old = *count; + old = atomic_load_int(count); for (;;) { if (old <= n) return (false); From owner-svn-src-head@freebsd.org Tue Oct 27 18:12:07 2020 Return-Path: Delivered-To: svn-src-head@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 E1D49456D88; Tue, 27 Oct 2020 18:12:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLKY35m6dz3ymj; Tue, 27 Oct 2020 18:12:07 +0000 (UTC) (envelope-from mjg@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 A99C9FC90; Tue, 27 Oct 2020 18:12:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RIC7dq040815; Tue, 27 Oct 2020 18:12:07 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RIC7pn040814; Tue, 27 Oct 2020 18:12:07 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010271812.09RIC7pn040814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 27 Oct 2020 18:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367089 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 367089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 18:12:07 -0000 Author: mjg Date: Tue Oct 27 18:12:07 2020 New Revision: 367089 URL: https://svnweb.freebsd.org/changeset/base/367089 Log: vfs: fix vnode reclaim races against getnwevnode All vnodes allocated by UMA are present on the global list used by vnlru. getnewvnode modifies the state of the vnode (most notably altering v_holdcnt) but never locks it. Moreover filesystems also modify it in arbitrary manners sometimes before taking the vnode lock or adding any other indicator that the vnode can be used. Picking up such a vnode by vnlru would be problematic. To that end there are 2 fixes: - vlrureclaim, not recycling v_holdcnt == 0 vnodes, takes the interlock and verifies that v_mount has been set. It is an invariant that the vnode lock is held by that point, providing the necessary serialisation against locking after vhold. - vnlru_free_locked, only wanting to free v_holdcnt == 0 vnodes, now makes sure to only transition the count 0->1 and newly allocated vnodes start with v_holdcnt == VHOLD_NO_SMR. getnewvnode will only transition VHOLD_NO_SMR->1 once more making the hold fail Tested by: pho Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Oct 27 18:11:11 2020 (r367088) +++ head/sys/kern/vfs_subr.c Tue Oct 27 18:12:07 2020 (r367089) @@ -109,7 +109,7 @@ static void syncer_shutdown(void *arg, int howto); static int vtryrecycle(struct vnode *vp); static void v_init_counters(struct vnode *); static void vgonel(struct vnode *); -static bool vhold_recycle(struct vnode *); +static bool vhold_recycle_free(struct vnode *); static void vfs_knllock(void *arg); static void vfs_knlunlock(void *arg); static void vfs_knl_assert_locked(void *arg); @@ -561,6 +561,11 @@ vnode_init(void *mem, int size, int flags) vp->v_dbatchcpu = NOCPU; + /* + * Check vhold_recycle_free for an explanation. + */ + vp->v_holdcnt = VHOLD_NO_SMR; + vp->v_type = VNON; mtx_lock(&vnode_list_mtx); TAILQ_INSERT_BEFORE(vnode_list_free_marker, vp, v_vnodelist); mtx_unlock(&vnode_list_mtx); @@ -1127,8 +1132,25 @@ restart: goto next_iter; } - if (!vhold_recycle(vp)) + /* + * Handle races against vnode allocation. Filesystems lock the + * vnode some time after it gets returned from getnewvnode, + * despite type and hold count being manipulated earlier. + * Resorting to checking v_mount restores guarantees present + * before the global list was reworked to contain all vnodes. + */ + if (!VI_TRYLOCK(vp)) goto next_iter; + if (__predict_false(vp->v_type == VBAD || vp->v_type == VNON)) { + VI_UNLOCK(vp); + goto next_iter; + } + if (vp->v_mount == NULL) { + VI_UNLOCK(vp); + goto next_iter; + } + vholdl(vp); + VI_UNLOCK(vp); TAILQ_REMOVE(&vnode_list, mvp, v_vnodelist); TAILQ_INSERT_AFTER(&vnode_list, vp, mvp, v_vnodelist); mtx_unlock(&vnode_list_mtx); @@ -1228,13 +1250,13 @@ restart: mp->mnt_op != mnt_op)) { continue; } - TAILQ_REMOVE(&vnode_list, mvp, v_vnodelist); - TAILQ_INSERT_AFTER(&vnode_list, vp, mvp, v_vnodelist); if (__predict_false(vp->v_type == VBAD || vp->v_type == VNON)) { continue; } - if (!vhold_recycle(vp)) + if (!vhold_recycle_free(vp)) continue; + TAILQ_REMOVE(&vnode_list, mvp, v_vnodelist); + TAILQ_INSERT_AFTER(&vnode_list, vp, mvp, v_vnodelist); count--; mtx_unlock(&vnode_list_mtx); vtryrecycle(vp); @@ -3251,11 +3273,13 @@ vholdnz(struct vnode *vp) * However, while this is more performant, it hinders debugging by eliminating * the previously mentioned invariant. */ -static bool __always_inline -_vhold_cond(struct vnode *vp) +bool +vhold_smr(struct vnode *vp) { int count; + VFS_SMR_ASSERT_ENTERED(); + count = atomic_load_int(&vp->v_holdcnt); for (;;) { if (count & VHOLD_NO_SMR) { @@ -3263,7 +3287,6 @@ _vhold_cond(struct vnode *vp) ("non-zero hold count with flags %d\n", count)); return (false); } - VNASSERT(count >= 0, vp, ("invalid hold count %d\n", count)); if (atomic_fcmpset_int(&vp->v_holdcnt, &count, count + 1)) { if (count == 0) @@ -3273,26 +3296,45 @@ _vhold_cond(struct vnode *vp) } } -bool -vhold_smr(struct vnode *vp) -{ - - VFS_SMR_ASSERT_ENTERED(); - return (_vhold_cond(vp)); -} - /* - * Special case for vnode recycling. + * Hold a free vnode for recycling. * - * Vnodes are present on the global list until UMA takes them out. - * Attempts to recycle only need the relevant lock and have no use for SMR. + * Note: vnode_init references this comment. + * + * Attempts to recycle only need the global vnode list lock and have no use for + * SMR. + * + * However, vnodes get inserted into the global list before they get fully + * initialized and stay there until UMA decides to free the memory. This in + * particular means the target can be found before it becomes usable and after + * it becomes recycled. Picking up such vnodes is guarded with v_holdcnt set to + * VHOLD_NO_SMR. + * + * Note: the vnode may gain more references after we transition the count 0->1. */ static bool -vhold_recycle(struct vnode *vp) +vhold_recycle_free(struct vnode *vp) { + int count; mtx_assert(&vnode_list_mtx, MA_OWNED); - return (_vhold_cond(vp)); + + count = atomic_load_int(&vp->v_holdcnt); + for (;;) { + if (count & VHOLD_NO_SMR) { + VNASSERT((count & ~VHOLD_NO_SMR) == 0, vp, + ("non-zero hold count with flags %d\n", count)); + return (false); + } + VNASSERT(count >= 0, vp, ("invalid hold count %d\n", count)); + if (count > 0) { + return (false); + } + if (atomic_fcmpset_int(&vp->v_holdcnt, &count, count + 1)) { + vn_freevnodes_dec(); + return (true); + } + } } static void __noinline From owner-svn-src-head@freebsd.org Tue Oct 27 18:13:10 2020 Return-Path: Delivered-To: svn-src-head@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 5E61E456C3F; Tue, 27 Oct 2020 18:13:10 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLKZG1nylz40C1; Tue, 27 Oct 2020 18:13:10 +0000 (UTC) (envelope-from mjg@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 2173AF93E; Tue, 27 Oct 2020 18:13:10 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RID9Bc041757; Tue, 27 Oct 2020 18:13:09 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RID9g2041756; Tue, 27 Oct 2020 18:13:09 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010271813.09RID9g2041756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 27 Oct 2020 18:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367090 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 367090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 18:13:10 -0000 Author: mjg Date: Tue Oct 27 18:13:09 2020 New Revision: 367090 URL: https://svnweb.freebsd.org/changeset/base/367090 Log: vfs: tidy up vnlru_free Apart from cosmeatic changes make sure to only decrease the recycled counter if vtryrecycle succeeded. Tested by: pho Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Oct 27 18:12:07 2020 (r367089) +++ head/sys/kern/vfs_subr.c Tue Oct 27 18:13:09 2020 (r367090) @@ -1226,9 +1226,11 @@ vnlru_free_locked(int count, struct vfsops *mnt_op) count = max_vnlru_free; ocount = count; mvp = vnode_list_free_marker; -restart: vp = mvp; - while (count > 0) { + for (;;) { + if (count == 0) { + break; + } vp = TAILQ_NEXT(vp, v_vnodelist); if (__predict_false(vp == NULL)) { TAILQ_REMOVE(&vnode_list, mvp, v_vnodelist); @@ -1237,17 +1239,16 @@ restart: } if (__predict_false(vp->v_type == VMARKER)) continue; - + if (vp->v_holdcnt > 0) + continue; /* * Don't recycle if our vnode is from different type * of mount point. Note that mp is type-safe, the * check does not reach unmapped address even if * vnode is reclaimed. - * Don't recycle if we can't get the interlock without - * blocking. */ - if (vp->v_holdcnt > 0 || (mnt_op != NULL && (mp = vp->v_mount) != NULL && - mp->mnt_op != mnt_op)) { + if (mnt_op != NULL && (mp = vp->v_mount) != NULL && + mp->mnt_op != mnt_op) { continue; } if (__predict_false(vp->v_type == VBAD || vp->v_type == VNON)) { @@ -1257,11 +1258,11 @@ restart: continue; TAILQ_REMOVE(&vnode_list, mvp, v_vnodelist); TAILQ_INSERT_AFTER(&vnode_list, vp, mvp, v_vnodelist); - count--; mtx_unlock(&vnode_list_mtx); - vtryrecycle(vp); + if (vtryrecycle(vp) == 0) + count--; mtx_lock(&vnode_list_mtx); - goto restart; + vp = mvp; } return (ocount - count); } From owner-svn-src-head@freebsd.org Tue Oct 27 18:30:44 2020 Return-Path: Delivered-To: svn-src-head@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 1520A457627; Tue, 27 Oct 2020 18:30:44 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLKyW6sKJz41M8; Tue, 27 Oct 2020 18:30:43 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CEF1FF968; Tue, 27 Oct 2020 18:30:43 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RIUhYK049390; Tue, 27 Oct 2020 18:30:43 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RIUh4U049386; Tue, 27 Oct 2020 18:30:43 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202010271830.09RIUh4U049386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Tue, 27 Oct 2020 18:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367091 - in head/share/man: man4 man5 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in head/share/man: man4 man5 X-SVN-Commit-Revision: 367091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 18:30:44 -0000 Author: gbe (doc committer) Date: Tue Oct 27 18:30:43 2020 New Revision: 367091 URL: https://svnweb.freebsd.org/changeset/base/367091 Log: Use my FreeBSD.org mail address in man pages I have written MFC after: 3 days Modified: head/share/man/man4/smbios.4 head/share/man/man5/smbfs.5 head/share/man/man5/unionfs.5 Modified: head/share/man/man4/smbios.4 ============================================================================== --- head/share/man/man4/smbios.4 Tue Oct 27 18:13:09 2020 (r367090) +++ head/share/man/man4/smbios.4 Tue Oct 27 18:30:43 2020 (r367091) @@ -62,4 +62,4 @@ The device driver was written by .An Matthew N. Dodd Aq Mt winter@jurai.net . This manual page was written by -.An Gordon Bergling Aq Mt gbergling@gmail.com . +.An Gordon Bergling Aq Mt gbe@FreeBSD.org . Modified: head/share/man/man5/smbfs.5 ============================================================================== --- head/share/man/man5/smbfs.5 Tue Oct 27 18:13:09 2020 (r367090) +++ head/share/man/man5/smbfs.5 Tue Oct 27 18:30:43 2020 (r367091) @@ -76,4 +76,4 @@ The device driver was written by .An Boris Popov Aq Mt bp@FreeBSD.org . The manual page was contributed by -.An Gordon Bergling Aq Mt gbergling@gmail.com . +.An Gordon Bergling Aq Mt gbe@FreeBSD.org . Modified: head/share/man/man5/unionfs.5 ============================================================================== --- head/share/man/man5/unionfs.5 Tue Oct 27 18:13:09 2020 (r367090) +++ head/share/man/man5/unionfs.5 Tue Oct 27 18:30:43 2020 (r367091) @@ -78,7 +78,7 @@ and reimplemented the handling of the locking for .Fx 7.0 . The manual page was written by -.An Gordon Bergling Aq Mt gbergling@gmail.com . +.An Gordon Bergling Aq Mt gbe@FreeBSD.org . .Sh BUGS Please see the .Xr mount_unionfs 8 From owner-svn-src-head@freebsd.org Tue Oct 27 18:52:53 2020 Return-Path: Delivered-To: svn-src-head@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 5D303458001; Tue, 27 Oct 2020 18:52:53 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLLS42Pk7z42dh; Tue, 27 Oct 2020 18:52:52 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f65.google.com with SMTP id b15so2674365iod.13; Tue, 27 Oct 2020 11:52:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YdAjmuZOnvPUiDWAOOG0WyYDBf8CSyJdbIEb4Ye9j1Q=; b=IqnnvRQN7srGPhM7EnAx20diZ1/tQ8g6SHTorm8Qp79RJQqJ2HSi3Hulc7PQMpaPt5 aJ1/Ox8ffe3KWzfDP9NQMStaZ8vqKobu5X+lHxFfVF/7qrigKlhkkWWFroHvSJhepjb5 s0oQ5hqdCGCJBkjmsPAJRfegUR1igLqu2lThBlD4Q5cOi7XH4/zgBN1aFUWkjb2UJdoM BNqrN+Fg3tuDfHV0NuH1V2L6lnQy2zydPLc1n9Z+Imtnq2PnUOSChZCf+NH0QguS1ASu nNvJ1O60eQLaFxQVU4Gf4MeQ61m0MQaxF7ygIuk/ac7Av1qVNbd1v6pdMyBam1vwqH4T FgNQ== X-Gm-Message-State: AOAM532Pnj+bMnei3asgOuwiBA09ypJ4v6zl4xlcia00wTbA1lOtjgnd kbOC5slAHCMRp7nsqisQTJVGN6SF0XAfCwvgQ8U= X-Google-Smtp-Source: ABdhPJx7qJjezUo9077ZJeOajSrGOGgm+/aMOfkvLlMWEoIEydfsaxaR0wdm55UrTc6lU0r62xBgv6Zyu3HtL0QUqOM= X-Received: by 2002:a5e:dc0b:: with SMTP id b11mr3463999iok.179.1603824770866; Tue, 27 Oct 2020 11:52:50 -0700 (PDT) MIME-Version: 1.0 References: <202010241023.09OANMcL075640@repo.freebsd.org> <20201024104628.GB2643@kib.kiev.ua> In-Reply-To: <20201024104628.GB2643@kib.kiev.ua> From: Ed Maste Date: Tue, 27 Oct 2020 14:52:38 -0400 Message-ID: Subject: Re: svn commit: r366993 - head/sys/net To: Konstantin Belousov Cc: Hans Petter Selasky , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CLLS42Pk7z42dh X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.65 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-1.62 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-0.91)[-0.906]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.97)[-0.973]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.65:from]; NEURAL_SPAM_SHORT(0.26)[0.258]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.65:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 18:52:53 -0000 On Sat, 24 Oct 2020 at 06:46, Konstantin Belousov wrote: > > > -#include > sys/systm.h should come right after sys/param.h. These two headers are > exceptions to the normal alphabetical rule. style(9) claims that sys/types.h and sys/param.h are the special headers: Kernel include files (sys/*.h) come first. If is needed for __FBSDID(), include it first. If either or is needed, include it before other include files. ( includes ; do not include both.) The remaining kernel headers should be sorted alphabetically. We should add sys/systm.h to style(9) as another special case if necessary. > > -infiniband_ipv4_multicast_map(uint32_t addr, > > - const uint8_t *broadcast, uint8_t *buf) > > +infiniband_ipv4_multicast_map( > > + uint32_t addr, const uint8_t *broadcast, uint8_t *buf) > And this is arguably regression, we fill line up to columns 72-80 before > splitting to the continuation line. I agree with kib and arichardson has a clang-format fix for this in D26978. That said I can see an argument for it being easier to read with all function args on the same line. > > - m = NULL; /* mbuf is consumed by resolver */ > > + m = NULL; /* mbuf is consumed by resolver */ > This is a regression as well, in-line comment is typically preceeded by tab. I suspect this is hard to do in an automated fashion in a way that's sensible overall (i.e., lining up inline comments on different lines). This could be a case where we decide to just accept it when someone uses clang-format on new code, and just discourage sweeping clang-format changes on existing code. From owner-svn-src-head@freebsd.org Tue Oct 27 19:55:13 2020 Return-Path: Delivered-To: svn-src-head@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 7B2EA458DA5; Tue, 27 Oct 2020 19:55:13 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLMr056Jyz461q; Tue, 27 Oct 2020 19:55:12 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f43.google.com with SMTP id h21so2888159iob.10; Tue, 27 Oct 2020 12:55:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+rXtaSQxm0AY+7oMEEyK1VRlWzPqYi3yjay3pHlIBTM=; b=PcayYQVj17fAeM3YMtSSAKCRg8SKlmJqskmv8PQD21hp4S8QxnZmwCdw4jB3qDA0Ln /Pse5AW9cCgeLYi5ilU8TovaQbgzKtgQWHi+Dqw7+6NB+Jt+R6M5kITIf2PDhUyiO+R4 p5JSZGv7Mm6+aVaWwGnwj+sk4eeDe42Eod4f04uOjuVCLQjKGB/2MZIYXCgckx1n5kzt Ty3dwWdemIS4KEVdfkxOuEeZJ5wYbiVIaFjQYIwn6ztLIkzj5+tcHHumP9h6awkpEoLR IoJACXPZHYGEOd8OKS2ffyMKD9jNiz4x4djEx6b17ANCSoFup7UKY3mu4JT2uzoaqoGB tcDw== X-Gm-Message-State: AOAM530ZIeFmCrurfAv71CpZeknlw6eflgx7Oju/UyWk2wsz5CsEyrk+ VEBK+JwSwy8APfsl9gGh+WSYh9/XI0NJzRgXo/Phimo/ X-Google-Smtp-Source: ABdhPJwY7cTmdMwfrWPWI+Ln/qMUT831Vj4GfTWS4CsCf1cP54bcg0cl0fK9pUcx2nsoKeh4Qm3La9c5Emk94Ewf9C4= X-Received: by 2002:a02:3716:: with SMTP id r22mr3871924jar.12.1603828510782; Tue, 27 Oct 2020 12:55:10 -0700 (PDT) MIME-Version: 1.0 References: <202010261803.09QI3psK037740@repo.freebsd.org> In-Reply-To: <202010261803.09QI3psK037740@repo.freebsd.org> From: Ed Maste Date: Tue, 27 Oct 2020 15:54:57 -0400 Message-ID: Subject: Re: svn commit: r367066 - head/sys/compat/linux To: Mateusz Guzik Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CLMr056Jyz461q X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.43 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-1.58 / 15.00]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(0.28)[0.279]; NEURAL_HAM_LONG(-0.90)[-0.899]; NEURAL_HAM_MEDIUM(-0.95)[-0.955]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.43:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.43:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 19:55:13 -0000 On Mon, 26 Oct 2020 at 14:03, Mateusz Guzik wrote: > > Author: mjg > Date: Mon Oct 26 18:03:50 2020 > New Revision: 367066 > URL: https://svnweb.freebsd.org/changeset/base/367066 > > Log: > linux: silence renameat2 flags warning What flag(s) are missing? From owner-svn-src-head@freebsd.org Tue Oct 27 20:23:20 2020 Return-Path: Delivered-To: svn-src-head@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 99A114594E3; Tue, 27 Oct 2020 20:23:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLNSS15cxz47yN; Tue, 27 Oct 2020 20:23:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 09RKN6Li013129 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 27 Oct 2020 22:23:10 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 09RKN6Li013129 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 09RKN68p013128; Tue, 27 Oct 2020 22:23:06 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 Oct 2020 22:23:06 +0200 From: Konstantin Belousov To: Ed Maste Cc: Hans Petter Selasky , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r366993 - head/sys/net Message-ID: <20201027202306.GQ2643@kib.kiev.ua> References: <202010241023.09OANMcL075640@repo.freebsd.org> <20201024104628.GB2643@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4CLNSS15cxz47yN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 20:23:20 -0000 On Tue, Oct 27, 2020 at 02:52:38PM -0400, Ed Maste wrote: > On Sat, 24 Oct 2020 at 06:46, Konstantin Belousov wrote: > > > > > -#include > > sys/systm.h should come right after sys/param.h. These two headers are > > exceptions to the normal alphabetical rule. > > style(9) claims that sys/types.h and sys/param.h are the special headers: > > Kernel include files (sys/*.h) come first. If is needed > for __FBSDID(), include it first. If either or > is needed, include it before other include files. > ( includes ; do not include both.) The > remaining kernel headers should be sorted alphabetically. > > We should add sys/systm.h to style(9) as another special case if necessary. Yes sys/systm.h is very special because it defines a lot of basic things, like asserts, printf(9), and so on, and because it includes enough other popular headers. Its intent is to gather all common stuff, which makes it both convenient and necessary to go before other (but sys/param.h is more prioritized). > > > > -infiniband_ipv4_multicast_map(uint32_t addr, > > > - const uint8_t *broadcast, uint8_t *buf) > > > +infiniband_ipv4_multicast_map( > > > + uint32_t addr, const uint8_t *broadcast, uint8_t *buf) > > And this is arguably regression, we fill line up to columns 72-80 before > > splitting to the continuation line. > > I agree with kib and arichardson has a clang-format fix for this in > D26978. That said I can see an argument for it being easier to read > with all function args on the same line. > > > > - m = NULL; /* mbuf is consumed by resolver */ > > > + m = NULL; /* mbuf is consumed by resolver */ > > This is a regression as well, in-line comment is typically preceeded by tab. > > I suspect this is hard to do in an automated fashion in a way that's > sensible overall (i.e., lining up inline comments on different lines). > > This could be a case where we decide to just accept it when someone > uses clang-format on new code, and just discourage sweeping > clang-format changes on existing code. From owner-svn-src-head@freebsd.org Tue Oct 27 21:25:55 2020 Return-Path: Delivered-To: svn-src-head@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 BA9F845ABBD for ; Tue, 27 Oct 2020 21:25:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLPrf5dGNz4F8s for ; Tue, 27 Oct 2020 21:25:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2b.google.com with SMTP id ev17so1431765qvb.3 for ; Tue, 27 Oct 2020 14:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fd3E1MPL9ySXxACGCmvMFwvo9zkss4vhXHFDc57547E=; b=MtzYV1+kNndKj5JXHakGZ0SHFpwZPdHq6fCH/yHfIa7tC742gAhkZ3TZ3kdWGEW160 FFbixw2QfUl0jVdOFekINavMfKUE3iU+fYwX4hMFTqRTtdXYFnlsVdp8kneeCaJ3F4os QoaFvDkZ4fREWHbEQ/zAuPcI8Oi3NRf3Pqxxjrzl1tE/gX5toAi4fV3yFPXu0wAo0UQp PDLO7QI1wSDQtTU/OuSGXsxO11NiQ3bZKGfSsnNPM2+LQVoN4s4Llo3pAfPGO6BAcZw6 vb/duQ/i0ms6I1iNNg+KRyPYB5FFIWGhDdZnNIdk73LnvpcUfx0gb5Q4j011pLSNCKYI FSnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fd3E1MPL9ySXxACGCmvMFwvo9zkss4vhXHFDc57547E=; b=h1ZcobrEgaXlc8a2TqXDz25nutkUjOY2r9nfJcjxDaV9tZNWApY5qtqVs8uSKLmJyf U2m0frIQps3jcY8YEEJG+s/oT59tjf4DYaYqf2IS92ZUDpdihnUvW7abzi67XoExL+19 YGwqVw/YV+sePkAfRvXp9VNAC8Mii02IL1P2upfmVPSO0/zNkFfwPuI2jqLeV3M296nq KFK+VoUmMe8o8dbnttI71U/n4P9ZQDDYeh+OHFOM1lDqGgrhXWV65gYC70JmwlrpcAxd EUITBjnF2sIlBgSgCA3BynWga3rfnakRD0T8WowQ7IymTMMIrprp4eCHGkz3XDQfpuY2 LQlg== X-Gm-Message-State: AOAM5325Bi3kfhxVIt+uJgMVJz1rlaQ2cuCeToRM9xF6ysRUk6CihQma B/NxdtjFa9Lionl5TElVYsYGacXtGTB5vSqt3eLTRQ== X-Google-Smtp-Source: ABdhPJxPIgIui23CvxYppOO1AkVR/bLwTQrMY9GaMdTuy05i+tCd2zQN530EvS9Wqy7XltK+Vxiop9UzWfWTpH0qp5s= X-Received: by 2002:a05:6214:10c4:: with SMTP id r4mr4416960qvs.62.1603833953715; Tue, 27 Oct 2020 14:25:53 -0700 (PDT) MIME-Version: 1.0 References: <202010241023.09OANMcL075640@repo.freebsd.org> <20201024104628.GB2643@kib.kiev.ua> <20201027202306.GQ2643@kib.kiev.ua> In-Reply-To: <20201027202306.GQ2643@kib.kiev.ua> From: Warner Losh Date: Tue, 27 Oct 2020 15:25:42 -0600 Message-ID: Subject: Re: svn commit: r366993 - head/sys/net To: Konstantin Belousov Cc: Ed Maste , Hans Petter Selasky , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4CLPrf5dGNz4F8s X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=MtzYV1+k; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.48 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.98)[-0.983]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.96)[-0.959]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.54)[-0.541]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2b:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 21:25:55 -0000 On Tue, Oct 27, 2020 at 2:23 PM Konstantin Belousov wrote: > On Tue, Oct 27, 2020 at 02:52:38PM -0400, Ed Maste wrote: > > On Sat, 24 Oct 2020 at 06:46, Konstantin Belousov > wrote: > > > > > > > -#include > > > sys/systm.h should come right after sys/param.h. These two headers are > > > exceptions to the normal alphabetical rule. > > > > style(9) claims that sys/types.h and sys/param.h are the special headers: > > > > Kernel include files (sys/*.h) come first. If is > needed > > for __FBSDID(), include it first. If either or > > is needed, include it before other include files. > > ( includes ; do not include both.) The > > remaining kernel headers should be sorted alphabetically. > > > > We should add sys/systm.h to style(9) as another special case if > necessary. > Yes sys/systm.h is very special because it defines a lot of basic things, > like asserts, printf(9), and so on, and because it includes enough other > popular headers. Its intent is to gather all common stuff, which makes > it both convenient and necessary to go before other (but sys/param.h is > more > prioritized). > So sorted after sys/types.h or sys/param.h should be documented in style(9). https://reviews.freebsd.org/D26981 has a proposed change. Warner > > > > > > -infiniband_ipv4_multicast_map(uint32_t addr, > > > > - const uint8_t *broadcast, uint8_t *buf) > > > > +infiniband_ipv4_multicast_map( > > > > + uint32_t addr, const uint8_t *broadcast, uint8_t *buf) > > > And this is arguably regression, we fill line up to columns 72-80 > before > > > splitting to the continuation line. > > > > I agree with kib and arichardson has a clang-format fix for this in > > D26978. That said I can see an argument for it being easier to read > > with all function args on the same line. > > > > > > - m = NULL; /* mbuf is consumed by > resolver */ > > > > + m = NULL; /* mbuf is consumed by > resolver */ > > > This is a regression as well, in-line comment is typically preceeded > by tab. > > > > I suspect this is hard to do in an automated fashion in a way that's > > sensible overall (i.e., lining up inline comments on different lines). > > > > This could be a case where we decide to just accept it when someone > > uses clang-format on new code, and just discourage sweeping > > clang-format changes on existing code. > From owner-svn-src-head@freebsd.org Tue Oct 27 21:53:33 2020 Return-Path: Delivered-To: svn-src-head@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 C2FB945B633; Tue, 27 Oct 2020 21:53:33 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLQSY4ZtXz4GYg; Tue, 27 Oct 2020 21:53:33 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 817D312604; Tue, 27 Oct 2020 21:53:33 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09RLrXp8080555; Tue, 27 Oct 2020 21:53:33 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RLrXpr080554; Tue, 27 Oct 2020 21:53:33 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202010272153.09RLrXpr080554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 27 Oct 2020 21:53:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367093 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 367093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 21:53:33 -0000 Author: vmaffione Date: Tue Oct 27 21:53:33 2020 New Revision: 367093 URL: https://svnweb.freebsd.org/changeset/base/367093 Log: iflib: add per-tx-queue netmap timer The way netmap TX is handled in iflib when TX interrupts are not used (IFC_NETMAP_TX_IRQ not set) has some issues: - The netmap_tx_irq() function gets called by iflib_timer(), which gets scheduled with tick granularity (hz). This is not frequent enough for 10Gbps NICs and beyond (e.g., ixgbe or ixl). The end result is that the transmitting netmap application is not woken up fast enough to saturate the link with small packets. - The iflib_timer() functions also calls isc_txd_credits_update() to ask for more TX completion updates. However, this violates the netmap requirement that only txsync can access the TX queue for datapath operations. Only netmap_tx_irq() may be called out of the txsync context. This change introduces per-tx-queue netmap timers, using microsecond granularity to ensure that netmap_tx_irq() can be called often enough to allow for maximum packet rate. The timer routine simply calls netmap_tx_irq() to wake up the netmap application. The latter will wake up and call txsync to collect TX completion updates. This change brings back line rate speed with small packets for ixgbe. For the time being, timer expiration is hardcoded to 90 microseconds, in order to avoid introducing a new sysctl. We may eventually implement an adaptive expiration period or use another deferred work mechanism in place of timers. Also, fix the timers usage to make sure that each queue is serviced by a different CPU. PR: 248652 Reported by: sg@efficientip.com MFC after: 2 weeks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Oct 27 20:13:33 2020 (r367092) +++ head/sys/net/iflib.c Tue Oct 27 21:53:33 2020 (r367093) @@ -346,6 +346,9 @@ struct iflib_txq { qidx_t ift_size; uint16_t ift_id; struct callout ift_timer; +#ifdef DEV_NETMAP + struct callout ift_netmap_timer; +#endif /* DEV_NETMAP */ if_txsd_vec_t ift_sds; uint8_t ift_qstatus; @@ -753,6 +756,7 @@ iflib_num_tx_descs(if_ctx_t ctx) MODULE_DEPEND(iflib, netmap, 1, 1, 1); static int netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool init); +static void iflib_netmap_timer(void *arg); /* * device-specific sysctl variables: @@ -918,6 +922,8 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring return (0); } +#define NETMAP_TX_TIMER_US 90 + /* * Reconcile kernel and user view of the transmit ring. * @@ -1047,9 +1053,8 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl * Second part: reclaim buffers for completed transmissions. * * If there are unclaimed buffers, attempt to reclaim them. - * If none are reclaimed, and TX IRQs are not in use, do an initial - * minimal delay, then trigger the tx handler which will spin in the - * group task queue. + * If we don't manage to reclaim them all, and TX IRQs are not in use, + * trigger a per-tx-queue timer to try again later. */ if (kring->nr_hwtail != nm_prev(kring->nr_hwcur, lim)) { if (iflib_tx_credits_update(ctx, txq)) { @@ -1058,11 +1063,13 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl kring->nr_hwtail = nm_prev(netmap_idx_n2k(kring, nic_i), lim); } } + if (!(ctx->ifc_flags & IFC_NETMAP_TX_IRQ)) if (kring->nr_hwtail != nm_prev(kring->nr_hwcur, lim)) { - callout_reset_on(&txq->ift_timer, hz < 2000 ? 1 : hz / 1000, - iflib_timer, txq, txq->ift_timer.c_cpu); - } + callout_reset_sbt(&txq->ift_netmap_timer, + NETMAP_TX_TIMER_US * SBT_1US, SBT_1US, + iflib_netmap_timer, txq, txq->ift_netmap_timer.c_cpu); + } return (0); } @@ -1263,28 +1270,16 @@ iflib_netmap_rxq_init(if_ctx_t ctx, iflib_rxq_t rxq) } static void -iflib_netmap_timer_adjust(if_ctx_t ctx, iflib_txq_t txq, uint32_t *reset_on) +iflib_netmap_timer(void *arg) { - struct netmap_kring *kring; - uint16_t txqid; + iflib_txq_t txq = arg; + if_ctx_t ctx = txq->ift_ctx; - txqid = txq->ift_id; - kring = netmap_kring_on(NA(ctx->ifc_ifp), txqid, NR_TX); - if (kring == NULL) - return; - - if (kring->nr_hwcur != nm_next(kring->nr_hwtail, kring->nkr_num_slots - 1)) { - bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, - BUS_DMASYNC_POSTREAD); - if (ctx->isc_txd_credits_update(ctx->ifc_softc, txqid, false)) - netmap_tx_irq(ctx->ifc_ifp, txqid); - if (!(ctx->ifc_flags & IFC_NETMAP_TX_IRQ)) { - if (hz < 2000) - *reset_on = 1; - else - *reset_on = hz / 1000; - } - } + /* + * Wake up the netmap application, to give it a chance to + * call txsync and reclaim more completed TX buffers. + */ + netmap_tx_irq(ctx->ifc_ifp, txq->ift_id); } #define iflib_netmap_detach(ifp) netmap_detach(ifp) @@ -1296,8 +1291,6 @@ iflib_netmap_timer_adjust(if_ctx_t ctx, iflib_txq_t tx #define iflib_netmap_attach(ctx) (0) #define netmap_rx_irq(ifp, qid, budget) (0) -#define netmap_tx_irq(ifp, qid) do {} while (0) -#define iflib_netmap_timer_adjust(ctx, txq, reset_on) #endif #if defined(__i386__) || defined(__amd64__) @@ -2287,7 +2280,6 @@ iflib_timer(void *arg) if_ctx_t ctx = txq->ift_ctx; if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; uint64_t this_tick = ticks; - uint32_t reset_on = hz / 2; if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)) return; @@ -2312,17 +2304,13 @@ iflib_timer(void *arg) } txq->ift_cleaned_prev = txq->ift_cleaned; } -#ifdef DEV_NETMAP - if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP) - iflib_netmap_timer_adjust(ctx, txq, &reset_on); -#endif /* handle any laggards */ if (txq->ift_db_pending) GROUPTASK_ENQUEUE(&txq->ift_task); sctx->isc_pause_frames = 0; if (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING) - callout_reset_on(&txq->ift_timer, reset_on, iflib_timer, txq, txq->ift_timer.c_cpu); + callout_reset_on(&txq->ift_timer, hz / 2, iflib_timer, txq, txq->ift_timer.c_cpu); return; hung: @@ -2396,6 +2384,9 @@ iflib_init_locked(if_ctx_t ctx) for (i = 0, txq = ctx->ifc_txqs; i < sctx->isc_ntxqsets; i++, txq++) { CALLOUT_LOCK(txq); callout_stop(&txq->ift_timer); +#ifdef DEV_NETMAP + callout_stop(&txq->ift_netmap_timer); +#endif /* DEV_NETMAP */ CALLOUT_UNLOCK(txq); iflib_netmap_txq_init(ctx, txq); } @@ -2485,6 +2476,9 @@ iflib_stop(if_ctx_t ctx) CALLOUT_LOCK(txq); callout_stop(&txq->ift_timer); +#ifdef DEV_NETMAP + callout_stop(&txq->ift_netmap_timer); +#endif /* DEV_NETMAP */ CALLOUT_UNLOCK(txq); /* clean any enqueued buffers */ @@ -3882,7 +3876,6 @@ _task_fn_admin(void *context) iflib_txq_t txq; int i; bool oactive, running, do_reset, do_watchdog, in_detach; - uint32_t reset_on = hz / 2; STATE_LOCK(ctx); running = (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING); @@ -3910,12 +3903,8 @@ _task_fn_admin(void *context) } IFDI_UPDATE_ADMIN_STATUS(ctx); for (txq = ctx->ifc_txqs, i = 0; i < sctx->isc_ntxqsets; i++, txq++) { -#ifdef DEV_NETMAP - reset_on = hz / 2; - if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP) - iflib_netmap_timer_adjust(ctx, txq, &reset_on); -#endif - callout_reset_on(&txq->ift_timer, reset_on, iflib_timer, txq, txq->ift_timer.c_cpu); + callout_reset_on(&txq->ift_timer, hz / 2, iflib_timer, txq, + txq->ift_timer.c_cpu); } IFDI_LINK_INTR_ENABLE(ctx); if (do_reset) @@ -5088,6 +5077,9 @@ iflib_pseudo_deregister(if_ctx_t ctx) tqg = qgroup_if_io_tqg; for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) { callout_drain(&txq->ift_timer); +#ifdef DEV_NETMAP + callout_drain(&txq->ift_netmap_timer); +#endif /* DEV_NETMAP */ if (txq->ift_task.gt_uniq != NULL) taskqgroup_detach(tqg, &txq->ift_task); } @@ -5174,6 +5166,9 @@ iflib_device_deregister(if_ctx_t ctx) tqg = qgroup_if_io_tqg; for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) { callout_drain(&txq->ift_timer); +#ifdef DEV_NETMAP + callout_drain(&txq->ift_netmap_timer); +#endif /* DEV_NETMAP */ if (txq->ift_task.gt_uniq != NULL) taskqgroup_detach(tqg, &txq->ift_task); } @@ -5583,8 +5578,6 @@ iflib_queues_alloc(if_ctx_t ctx) } else { txq->ift_br_offset = 0; } - /* XXX fix this */ - txq->ift_timer.c_cpu = cpu; if (iflib_txsd_alloc(txq)) { device_printf(dev, "Critical Failure setting up TX buffers\n"); @@ -5597,6 +5590,11 @@ iflib_queues_alloc(if_ctx_t ctx) device_get_nameunit(dev), txq->ift_id); mtx_init(&txq->ift_mtx, txq->ift_mtx_name, NULL, MTX_DEF); callout_init_mtx(&txq->ift_timer, &txq->ift_mtx, 0); + txq->ift_timer.c_cpu = cpu; +#ifdef DEV_NETMAP + callout_init_mtx(&txq->ift_netmap_timer, &txq->ift_mtx, 0); + txq->ift_netmap_timer.c_cpu = cpu; +#endif /* DEV_NETMAP */ err = ifmp_ring_alloc(&txq->ift_br, 2048, txq, iflib_txq_drain, iflib_txq_can_drain, M_IFLIB, M_WAITOK); From owner-svn-src-head@freebsd.org Tue Oct 27 23:03:18 2020 Return-Path: Delivered-To: svn-src-head@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 4ED0645C83A; Tue, 27 Oct 2020 23:03:18 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLS121TyVz4Kfg; Tue, 27 Oct 2020 23:03:18 +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 167BC1319F; Tue, 27 Oct 2020 23:03:18 +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 09RN3Hvn023759; Tue, 27 Oct 2020 23:03:17 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09RN3FN3023748; Tue, 27 Oct 2020 23:03:15 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202010272303.09RN3FN3023748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 27 Oct 2020 23:03:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367094 - in head: contrib/unbound contrib/unbound/contrib contrib/unbound/daemon contrib/unbound/dnstap contrib/unbound/doc contrib/unbound/dynlibmod contrib/unbound/iterator contrib/u... X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: contrib/unbound contrib/unbound/contrib contrib/unbound/daemon contrib/unbound/dnstap contrib/unbound/doc contrib/unbound/dynlibmod contrib/unbound/iterator contrib/unbound/libunbound contrib... X-SVN-Commit-Revision: 367094 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 23:03:18 -0000 Author: cy Date: Tue Oct 27 23:03:15 2020 New Revision: 367094 URL: https://svnweb.freebsd.org/changeset/base/367094 Log: MFV r367082: Update unbound 1.11.0 --> 1.12.0. MFC after: 1 month. Modified: head/contrib/unbound/Makefile.in head/contrib/unbound/README.md head/contrib/unbound/acx_nlnetlabs.m4 head/contrib/unbound/config.guess head/contrib/unbound/config.h.in head/contrib/unbound/config.sub head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/contrib/aaaa-filter-iterator.patch head/contrib/unbound/contrib/unbound.service.in head/contrib/unbound/contrib/unbound_munin_ head/contrib/unbound/daemon/daemon.c head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/stats.c head/contrib/unbound/daemon/unbound.c head/contrib/unbound/daemon/worker.c head/contrib/unbound/dnstap/dnstap.c head/contrib/unbound/dnstap/dnstap.h head/contrib/unbound/dnstap/dtstream.c head/contrib/unbound/dnstap/dtstream.h head/contrib/unbound/dnstap/unbound-dnstap-socket.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/README head/contrib/unbound/doc/example.conf.in head/contrib/unbound/doc/libunbound.3.in head/contrib/unbound/doc/unbound-anchor.8.in head/contrib/unbound/doc/unbound-checkconf.8.in head/contrib/unbound/doc/unbound-control.8.in head/contrib/unbound/doc/unbound-host.1.in head/contrib/unbound/doc/unbound.8.in head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/dynlibmod/dynlibmod.c head/contrib/unbound/iterator/iterator.c head/contrib/unbound/libunbound/context.c head/contrib/unbound/libunbound/libunbound.c head/contrib/unbound/libunbound/libworker.c head/contrib/unbound/libunbound/unbound.h head/contrib/unbound/services/cache/dns.c head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/listen_dnsport.h head/contrib/unbound/services/mesh.c head/contrib/unbound/services/mesh.h head/contrib/unbound/services/outside_network.c head/contrib/unbound/services/rpz.c head/contrib/unbound/sldns/parseutil.c head/contrib/unbound/sldns/parseutil.h head/contrib/unbound/sldns/rrdef.h head/contrib/unbound/smallapp/unbound-checkconf.c head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h head/contrib/unbound/util/configlexer.lex head/contrib/unbound/util/configparser.y head/contrib/unbound/util/edns.c head/contrib/unbound/util/edns.h head/contrib/unbound/util/fptr_wlist.c head/contrib/unbound/util/iana_ports.inc head/contrib/unbound/util/mini_event.h head/contrib/unbound/util/module.h head/contrib/unbound/util/net_help.c head/contrib/unbound/util/net_help.h head/contrib/unbound/util/netevent.c head/contrib/unbound/util/netevent.h head/contrib/unbound/validator/val_anchor.c head/contrib/unbound/validator/val_anchor.h head/contrib/unbound/validator/val_neg.c head/contrib/unbound/validator/val_neg.h head/contrib/unbound/validator/val_nsec.c head/contrib/unbound/validator/val_nsec.h head/contrib/unbound/validator/validator.c head/contrib/unbound/validator/validator.h head/usr.sbin/unbound/config.h Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/Makefile.in ============================================================================== --- head/contrib/unbound/Makefile.in Tue Oct 27 21:53:33 2020 (r367093) +++ head/contrib/unbound/Makefile.in Tue Oct 27 23:03:15 2020 (r367094) @@ -231,6 +231,10 @@ STREAMTCP_SRC=testcode/streamtcp.c STREAMTCP_OBJ=streamtcp.lo STREAMTCP_OBJ_LINK=$(STREAMTCP_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) \ $(SLDNS_OBJ) +DOHCLIENT_SRC=testcode/dohclient.c +DOHCLIENT_OBJ=dohclient.lo +DOHCLIENT_OBJ_LINK=$(DOHCLIENT_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) \ +$(SLDNS_OBJ) PERF_SRC=testcode/perf.c PERF_OBJ=perf.lo PERF_OBJ_LINK=$(PERF_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) $(SLDNS_OBJ) @@ -272,7 +276,8 @@ ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \ $(ASYNCLOOK_SRC) $(STREAMTCP_SRC) $(PERF_SRC) $(DELAYER_SRC) \ $(CONTROL_SRC) $(UBANCHOR_SRC) $(PETAL_SRC) $(DNSTAP_SOCKET_SRC)\ $(PYTHONMOD_SRC) $(PYUNBOUND_SRC) $(WIN_DAEMON_THE_SRC) \ - $(SVCINST_SRC) $(SVCUNINST_SRC) $(ANCHORUPD_SRC) $(SLDNS_SRC) + $(SVCINST_SRC) $(SVCUNINST_SRC) $(ANCHORUPD_SRC) $(SLDNS_SRC) \ + $(DOHCLIENT_SRC) ALL_OBJ=$(COMMON_OBJ) $(UNITTEST_OBJ) $(DAEMON_OBJ) \ $(TESTBOUND_OBJ) $(LOCKVERIFY_OBJ) $(PKTVIEW_OBJ) \ @@ -280,7 +285,8 @@ ALL_OBJ=$(COMMON_OBJ) $(UNITTEST_OBJ) $(DAEMON_OBJ) \ $(ASYNCLOOK_OBJ) $(STREAMTCP_OBJ) $(PERF_OBJ) $(DELAYER_OBJ) \ $(CONTROL_OBJ) $(UBANCHOR_OBJ) $(PETAL_OBJ) $(DNSTAP_SOCKET_OBJ)\ $(COMPAT_OBJ) $(PYUNBOUND_OBJ) \ - $(SVCINST_OBJ) $(SVCUNINST_OBJ) $(ANCHORUPD_OBJ) $(SLDNS_OBJ) + $(SVCINST_OBJ) $(SVCUNINST_OBJ) $(ANCHORUPD_OBJ) $(SLDNS_OBJ) \ + $(DOHCLIENT_OBJ) COMPILE=$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) @PTHREAD_CFLAGS_ONLY@ LINK=$(LIBTOOL) --tag=CC --mode=link $(CC) $(staticexe) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) @@ -317,7 +323,7 @@ rsrc_unbound_checkconf.o: $(srcdir)/winrc/rsrc_unbound TEST_BIN=asynclook$(EXEEXT) delayer$(EXEEXT) \ lock-verify$(EXEEXT) memstats$(EXEEXT) perf$(EXEEXT) \ petal$(EXEEXT) pktview$(EXEEXT) streamtcp$(EXEEXT) \ - unbound-dnstap-socket$(EXEEXT) \ + unbound-dnstap-socket$(EXEEXT) dohclient$(EXEEXT) \ testbound$(EXEEXT) unittest$(EXEEXT) tests: all $(TEST_BIN) @@ -387,6 +393,9 @@ asynclook$(EXEEXT): $(ASYNCLOOK_OBJ_LINK) libunbound.l streamtcp$(EXEEXT): $(STREAMTCP_OBJ_LINK) $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) +dohclient$(EXEEXT): $(DOHCLIENT_OBJ_LINK) + $(LINK) -o $@ $(DOHCLIENT_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) + perf$(EXEEXT): $(PERF_OBJ_LINK) $(LINK) -o $@ $(PERF_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) @@ -672,7 +681,7 @@ dns.lo dns.o: $(srcdir)/services/cache/dns.c config.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/validator/val_utils.h $(srcdir)/sldns/pkthdr.h $(srcdir)/services/cache/dns.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/module.h \ $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h infra.lo infra.o: $(srcdir)/services/cache/infra.c config.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/services/cache/infra.h \ @@ -713,10 +722,11 @@ msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/util/config_file.h \ $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/respip/respip.h -packed_rrset.lo packed_rrset.o: $(srcdir)/util/data/packed_rrset.c config.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \ - $(srcdir)/util/net_help.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h +packed_rrset.lo packed_rrset.o: $(srcdir)/util/data/packed_rrset.c config.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h iterator.lo iterator.o: $(srcdir)/iterator/iterator.c config.h $(srcdir)/iterator/iterator.h \ $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ @@ -785,7 +795,7 @@ listen_dnsport.lo listen_dnsport.o: $(srcdir)/services $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h \ @@ -808,10 +818,10 @@ mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(s $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h \ $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/regional.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/edns.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/data/dname.h \ - $(srcdir)/services/listen_dnsport.h + $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/alloc.h \ + $(srcdir)/util/edns.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/data/dname.h $(srcdir)/services/listen_dnsport.h modstack.lo modstack.o: $(srcdir)/services/modstack.c config.h $(srcdir)/services/modstack.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ @@ -1204,7 +1214,8 @@ testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h unitldns.lo unitldns.o: $(srcdir)/testcode/unitldns.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h \ + $(srcdir)/sldns/parseutil.h unitecs.lo unitecs.o: $(srcdir)/testcode/unitecs.c config.h unitauth.lo unitauth.o: $(srcdir)/testcode/unitauth.c config.h $(srcdir)/services/authzone.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ @@ -1310,7 +1321,8 @@ worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/data/dname.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/edns.h \ $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/validator/autotrust.h \ $(srcdir)/validator/val_anchor.h $(srcdir)/libunbound/context.h $(srcdir)/libunbound/unbound-event.h \ - $(srcdir)/libunbound/libworker.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/shm_side/shm_main.h + $(srcdir)/libunbound/libworker.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/shm_side/shm_main.h \ + $(srcdir)/dnstap/dtstream.h testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h \ @@ -1344,7 +1356,8 @@ worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/data/dname.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/edns.h \ $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/validator/autotrust.h \ $(srcdir)/validator/val_anchor.h $(srcdir)/libunbound/context.h $(srcdir)/libunbound/unbound-event.h \ - $(srcdir)/libunbound/libworker.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/shm_side/shm_main.h + $(srcdir)/libunbound/libworker.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/shm_side/shm_main.h \ + $(srcdir)/dnstap/dtstream.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ @@ -1507,6 +1520,12 @@ unbound-control.lo unbound-control.o: $(srcdir)/smalla unbound-anchor.lo unbound-anchor.o: $(srcdir)/smallapp/unbound-anchor.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h petal.lo petal.o: $(srcdir)/testcode/petal.c config.h +unbound-dnstap-socket.lo unbound-dnstap-socket.o: $(srcdir)/dnstap/unbound-dnstap-socket.c config.h \ + $(srcdir)/dnstap/dtstream.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/dnstap/dnstap_fstrm.h \ + $(srcdir)/util/ub_event.h $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h pythonmod_utils.lo pythonmod_utils.o: $(srcdir)/pythonmod/pythonmod_utils.c config.h $(srcdir)/util/module.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ @@ -1542,6 +1561,10 @@ parseutil.lo parseutil.o: $(srcdir)/sldns/parseutil.c rrdef.lo rrdef.o: $(srcdir)/sldns/rrdef.c config.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h str2wire.lo str2wire.o: $(srcdir)/sldns/str2wire.c config.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parse.h $(srcdir)/sldns/parseutil.h +dohclient.lo dohclient.o: $(srcdir)/testcode/dohclient.c config.h $(srcdir)/sldns/wire2str.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/net_help.h ctime_r.lo ctime_r.o: $(srcdir)/compat/ctime_r.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h fake-rfc2553.lo fake-rfc2553.o: $(srcdir)/compat/fake-rfc2553.c $(srcdir)/compat/fake-rfc2553.h config.h gmtime_r.lo gmtime_r.o: $(srcdir)/compat/gmtime_r.c config.h Modified: head/contrib/unbound/README.md ============================================================================== --- head/contrib/unbound/README.md Tue Oct 27 21:53:33 2020 (r367093) +++ head/contrib/unbound/README.md Tue Oct 27 23:03:15 2020 (r367094) @@ -9,7 +9,7 @@ fast and lean and incorporates modern features based o have any feedback, we would love to hear from you. Don’t hesitate to [create an issue on Github](https://github.com/NLnetLabs/unbound/issues/new) or post a message on the [Unbound mailing list](https://lists.nlnetlabs.nl/mailman/listinfo/unbound-users). -You can lean more about Unbound by reading our +You can learn more about Unbound by reading our [documentation](https://nlnetlabs.nl/documentation/unbound/). ## Compiling Modified: head/contrib/unbound/acx_nlnetlabs.m4 ============================================================================== --- head/contrib/unbound/acx_nlnetlabs.m4 Tue Oct 27 21:53:33 2020 (r367093) +++ head/contrib/unbound/acx_nlnetlabs.m4 Tue Oct 27 23:03:15 2020 (r367094) @@ -2,7 +2,8 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 34 +# Version 35 +# 2020-08-24 Use EVP_sha256 instead of HMAC_Update (for openssl-3.0.0). # 2016-03-21 Check -ldl -pthread for libcrypto for ldns and openssl 1.1.0. # 2016-03-21 Use HMAC_Update instead of HMAC_CTX_Init (for openssl-1.1.0). # 2016-01-04 -D_DEFAULT_SOURCE defined with -D_BSD_SOURCE for Linux glibc 2.20 @@ -673,16 +674,16 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ACX_RUNTIME_PATH_ADD([$ssldir/lib]) fi - AC_MSG_CHECKING([for HMAC_Update in -lcrypto]) + AC_MSG_CHECKING([for EVP_sha256 in -lcrypto]) LIBS="$LIBS -lcrypto" LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto" AC_TRY_LINK(, [ - int HMAC_Update(void); - (void)HMAC_Update(); + int EVP_sha256(void); + (void)EVP_sha256(); ], [ AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_HMAC_UPDATE], 1, - [If you have HMAC_Update]) + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) ], [ AC_MSG_RESULT(no) # check if -lwsock32 or -lgdi32 are needed. @@ -692,11 +693,11 @@ AC_DEFUN([ACX_SSL_CHECKS], [ LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32" AC_MSG_CHECKING([if -lcrypto needs -lgdi32]) AC_TRY_LINK([], [ - int HMAC_Update(void); - (void)HMAC_Update(); + int EVP_sha256(void); + (void)EVP_sha256(); ],[ - AC_DEFINE([HAVE_HMAC_UPDATE], 1, - [If you have HMAC_Update]) + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) @@ -706,11 +707,11 @@ AC_DEFUN([ACX_SSL_CHECKS], [ LIBSSL_LIBS="$LIBSSL_LIBS -ldl" AC_MSG_CHECKING([if -lcrypto needs -ldl]) AC_TRY_LINK([], [ - int HMAC_Update(void); - (void)HMAC_Update(); + int EVP_sha256(void); + (void)EVP_sha256(); ],[ - AC_DEFINE([HAVE_HMAC_UPDATE], 1, - [If you have HMAC_Update]) + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) @@ -720,11 +721,11 @@ AC_DEFUN([ACX_SSL_CHECKS], [ LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) AC_TRY_LINK([], [ - int HMAC_Update(void); - (void)HMAC_Update(); + int EVP_sha256(void); + (void)EVP_sha256(); ],[ - AC_DEFINE([HAVE_HMAC_UPDATE], 1, - [If you have HMAC_Update]) + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) Modified: head/contrib/unbound/config.guess ============================================================================== --- head/contrib/unbound/config.guess Tue Oct 27 21:53:33 2020 (r367093) +++ head/contrib/unbound/config.guess Tue Oct 27 23:03:15 2020 (r367094) @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2020 Free Software Foundation, Inc. -timestamp='2020-07-12' +timestamp='2020-09-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -150,17 +150,15 @@ Linux|GNU|GNU/*) #elif defined(__dietlibc__) LIBC=dietlibc #else + #include + #ifdef __DEFINED_va_list + LIBC=musl + #else LIBC=gnu #endif + #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl - fi ;; esac @@ -404,7 +402,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null @@ -544,10 +542,10 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then echo m88k-dg-dgux"$UNAME_RELEASE" else @@ -580,7 +578,7 @@ EOF echo i386-ibm-aix exit ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then + if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" @@ -620,7 +618,7 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then + if test -x /usr/bin/lslpp ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else @@ -655,7 +653,7 @@ EOF 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then + if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "$sc_cpu_version" in @@ -669,7 +667,7 @@ EOF esac ;; esac fi - if [ "$HP_ARCH" = "" ]; then + if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -708,7 +706,7 @@ EOF test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ "$HP_ARCH" = hppa2.0w ] + if test "$HP_ARCH" = hppa2.0w then set_cc_for_build @@ -782,7 +780,7 @@ EOF echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then + if test -x /usr/sbin/sysversion ; then echo "$UNAME_MACHINE"-unknown-osf1mk else echo "$UNAME_MACHINE"-unknown-osf1 @@ -1097,7 +1095,7 @@ EOF x86_64:Linux:*:*) set_cc_for_build LIBCABI=$LIBC - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null @@ -1294,7 +1292,7 @@ EOF echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then + if test -d /usr/nec; then echo mips-nec-sysv"$UNAME_RELEASE" else echo mips-unknown-sysv"$UNAME_RELEASE" @@ -1359,7 +1357,7 @@ EOF else set_cc_for_build fi - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null Modified: head/contrib/unbound/config.h.in ============================================================================== --- head/contrib/unbound/config.h.in Tue Oct 27 21:53:33 2020 (r367093) +++ head/contrib/unbound/config.h.in Tue Oct 27 23:03:15 2020 (r367094) @@ -113,6 +113,10 @@ don't. */ #undef HAVE_DECL_INET_PTON +/* Define to 1 if you have the declaration of `nghttp2_session_server_new', + and to 0 if you don't. */ +#undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW + /* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you don't. */ #undef HAVE_DECL_NID_ED25519 @@ -221,6 +225,9 @@ /* Define to 1 if you have the `EVP_EncryptInit_ex' function. */ #undef HAVE_EVP_ENCRYPTINIT_EX +/* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */ +#undef HAVE_EVP_MAC_CTX_SET_PARAMS + /* Define to 1 if you have the `EVP_MD_CTX_new' function. */ #undef HAVE_EVP_MD_CTX_NEW @@ -269,6 +276,9 @@ /* Define to 1 if you have the `getentropy' function. */ #undef HAVE_GETENTROPY +/* Define to 1 if you have the `getifaddrs' function. */ +#undef HAVE_GETIFADDRS + /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H @@ -296,12 +306,12 @@ /* Define to 1 if you have the `HMAC_Init_ex' function. */ #undef HAVE_HMAC_INIT_EX -/* If you have HMAC_Update */ -#undef HAVE_HMAC_UPDATE - /* If we have htobe64 */ #undef HAVE_HTOBE64 +/* Define to 1 if you have the header file. */ +#undef HAVE_IFADDRS_H + /* Define to 1 if you have the `inet_aton' function. */ #undef HAVE_INET_ATON @@ -371,6 +381,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETTLE_EDDSA_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_H + +/* Define this to use nghttp2 client. */ +#undef HAVE_NGHTTP2 + +/* Define to 1 if you have the header file. */ +#undef HAVE_NGHTTP2_NGHTTP2_H + /* Use libnss for crypto */ #undef HAVE_NSS @@ -497,6 +516,9 @@ /* Define if you have the SSL libraries installed. */ #undef HAVE_SSL +/* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */ +#undef HAVE_SSL_CTX_SET_ALPN_SELECT_CB + /* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */ #undef HAVE_SSL_CTX_SET_CIPHERSUITES @@ -573,6 +595,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SHA2_H @@ -1358,6 +1383,8 @@ void *unbound_stat_realloc_log(void *ptr, size_t size, #define UNBOUND_DNS_PORT 53 /** default port for DNS over TLS traffic. */ #define UNBOUND_DNS_OVER_TLS_PORT 853 +/** default port for DNS over HTTPS traffic. */ +#define UNBOUND_DNS_OVER_HTTPS_PORT 443 /** default port for unbound control traffic, registered port with IANA, ub-dns-control 8953/tcp unbound dns nameserver control */ #define UNBOUND_CONTROL_PORT 8953 Modified: head/contrib/unbound/config.sub ============================================================================== --- head/contrib/unbound/config.sub Tue Oct 27 21:53:33 2020 (r367093) +++ head/contrib/unbound/config.sub Tue Oct 27 23:03:15 2020 (r367094) @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2020 Free Software Foundation, Inc. -timestamp='2020-07-10' +timestamp='2020-09-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1278,7 +1278,7 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x$basic_os != x ] +if test x$basic_os != x then # First recognize some ad-hoc caes, or perhaps split kernel-os, or else just @@ -1367,13 +1367,7 @@ case $os in os=psos ;; qnx*) - case $cpu in - x86 | i*86) - ;; - *) - os=nto-$os - ;; - esac + os=qnx ;; hiux*) os=hiuxwe2 @@ -1722,7 +1716,7 @@ case $os in | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ - | nsk* | powerunix* | genode* | zvmoe* ) + | nsk* | powerunix* | genode* | zvmoe* | qnx* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) @@ -1740,6 +1734,8 @@ esac # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) + ;; + uclinux-uclibc* ) ;; -dietlibc* | -newlib* | -musl* | -uclibc* ) # These are just libc implementations, not actual OSes, and thus Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Tue Oct 27 21:53:33 2020 (r367093) +++ head/contrib/unbound/configure Tue Oct 27 23:03:15 2020 (r367094) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.11.0. +# Generated by GNU Autoconf 2.69 for unbound 1.12.0. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.11.0' -PACKAGE_STRING='unbound 1.11.0' +PACKAGE_VERSION='1.12.0' +PACKAGE_STRING='unbound 1.12.0' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' PACKAGE_URL='' @@ -882,6 +882,7 @@ enable_tfo_server with_libevent with_libexpat with_libhiredis +with_libnghttp2 enable_static_exe enable_fully_static enable_lock_checks @@ -1458,7 +1459,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.11.0 to adapt to many kinds of systems. +\`configure' configures unbound 1.12.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1523,7 +1524,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.11.0:";; + short | recursive ) echo "Configuration of unbound 1.12.0:";; esac cat <<\_ACEOF @@ -1642,6 +1643,7 @@ Optional Packages: outgoing port ranges. --with-libexpat=path specify explicit path for libexpat. --with-libhiredis=path specify explicit path for libhiredis. + --with-libnghttp2=path specify explicit path for libnghttp2. --with-dnstap-socket-path=pathname set default dnstap socket path --with-protobuf-c=path Path where protobuf-c is installed, for dnstap @@ -1750,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.11.0 +unbound configure 1.12.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2459,7 +2461,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.11.0, which was +It was created by unbound $as_me 1.12.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2809,13 +2811,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu UNBOUND_VERSION_MAJOR=1 -UNBOUND_VERSION_MINOR=11 +UNBOUND_VERSION_MINOR=12 UNBOUND_VERSION_MICRO=0 LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=9 +LIBUNBOUND_REVISION=10 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2892,6 +2894,7 @@ LIBUNBOUND_AGE=1 # 1.10.0 had 9:7:1 # 1.10.1 had 9:8:1 # 1.11.0 had 9:9:1 +# 1.12.0 had 9:10:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -14725,7 +14728,7 @@ $as_echo "no" >&6; } fi # Checks for header files. -for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h +for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h net/if.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default @@ -17942,8 +17945,8 @@ $as_echo "found in $ssldir" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5 -$as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5 +$as_echo_n "checking for EVP_sha256 in -lcrypto... " >&6; } LIBS="$LIBS -lcrypto" LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17953,8 +17956,8 @@ int main () { - int HMAC_Update(void); - (void)HMAC_Update(); + int EVP_sha256(void); + (void)EVP_sha256(); ; return 0; @@ -17965,7 +17968,7 @@ if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h +$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h else @@ -17986,8 +17989,8 @@ int main () { - int HMAC_Update(void); - (void)HMAC_Update(); + int EVP_sha256(void); + (void)EVP_sha256(); ; return 0; @@ -17996,7 +17999,7 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h +$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -18018,8 +18021,8 @@ int main () { - int HMAC_Update(void); - (void)HMAC_Update(); + int EVP_sha256(void); + (void)EVP_sha256(); ; return 0; @@ -18028,7 +18031,7 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h +$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -18050,8 +18053,8 @@ int main () { - int HMAC_Update(void); - (void)HMAC_Update(); + int EVP_sha256(void); + (void)EVP_sha256(); ; return 0; @@ -18060,7 +18063,7 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h +$as_echo "#define HAVE_EVP_SHA256 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -18245,11 +18248,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char HMAC_Update (); +char EVP_sha256 (); int main () { -return HMAC_Update (); +return EVP_sha256 (); ; return 0; } @@ -18340,7 +18343,7 @@ fi done -for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ENGINE_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback +for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ENGINE_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback EVP_MAC_CTX_set_params do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -18356,7 +18359,7 @@ done # these check_funcs need -lssl BAKLIBS="$LIBS" LIBS="-lssl $LIBS" -for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername X509_VERIFY_PARAM_set1_host SSL_CTX_set_ciphersuites SSL_CTX_set_tlsext_ticket_key_evp_cb +for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername X509_VERIFY_PARAM_set1_host SSL_CTX_set_ciphersuites SSL_CTX_set_tlsext_ticket_key_evp_cb SSL_CTX_set_alpn_select_cb do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -19668,6 +19671,70 @@ _ACEOF fi +# nghttp2 + +# Check whether --with-libnghttp2 was given. +if test "${with_libnghttp2+set}" = set; then : + withval=$with_libnghttp2; +else + withval="no" +fi + +found_libnghttp2="no" +if test x_$withval = x_yes -o x_$withval != x_no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5 +$as_echo_n "checking for libnghttp2... " >&6; } + if test x_$withval = x_ -o x_$withval = x_yes; then + withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" + fi + for dir in $withval ; do + if test -f "$dir/include/nghttp2/nghttp2.h"; then + found_libnghttp2="yes" + if test "$dir" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$dir/include" + LDFLAGS="$LDFLAGS -L$dir/lib" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5 +$as_echo "found in $dir" >&6; } + +$as_echo "#define HAVE_NGHTTP2 1" >>confdefs.h + + LIBS="$LIBS -lnghttp2" + break; + fi + done + if test x_$found_libnghttp2 != x_yes; then + as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5 + fi + for ac_header in nghttp2/nghttp2.h +do : + ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default +" +if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NGHTTP2_NGHTTP2_H 1 +_ACEOF + +fi + +done + + ac_fn_c_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default + #include + +" +if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl +_ACEOF + +fi + # set static linking for uninstalled libraries if requested staticexe="" @@ -20223,7 +20290,7 @@ if test "$ac_res" != no; then : fi -for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget accept4 +for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget accept4 getifaddrs do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -21619,7 +21686,7 @@ _ACEOF -version=1.11.0 +version=1.12.0 date=`date +'%b %e, %Y'` @@ -22138,7 +22205,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.11.0, which was +This file was extended by unbound $as_me 1.12.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22204,7 +22271,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.11.0 +unbound config.status 1.12.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/unbound/configure.ac ============================================================================== --- head/contrib/unbound/configure.ac Tue Oct 27 21:53:33 2020 (r367093) +++ head/contrib/unbound/configure.ac Tue Oct 27 23:03:15 2020 (r367094) @@ -10,7 +10,7 @@ sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) -m4_define([VERSION_MINOR],[11]) +m4_define([VERSION_MINOR],[12]) m4_define([VERSION_MICRO],[0]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) @@ -18,7 +18,7 @@ AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=9 +LIBUNBOUND_REVISION=10 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -95,6 +95,7 @@ LIBUNBOUND_AGE=1 # 1.10.0 had 9:7:1 # 1.10.1 had 9:8:1 # 1.11.0 had 9:9:1 +# 1.12.0 had 9:10:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -398,7 +399,7 @@ ACX_LIBTOOL_C_ONLY PKG_PROG_PKG_CONFIG # Checks for header files. -AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h],,, [AC_INCLUDES_DEFAULT]) +AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h net/if.h],,, [AC_INCLUDES_DEFAULT]) # Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH AC_CHECK_HEADERS([TargetConditionals.h]) @@ -831,7 +832,7 @@ AC_SUBST(PC_CRYPTO_DEPENDENCY) BAKLIBS="$LIBS" LIBS="-lssl $LIBS" AC_MSG_CHECKING([if libssl needs -lcrypt32]) -AC_TRY_LINK_FUNC([HMAC_Update], [ +AC_TRY_LINK_FUNC([EVP_sha256], [ AC_MSG_RESULT([no]) LIBS="$BAKLIBS" ], [ @@ -851,12 +852,12 @@ else AC_MSG_RESULT([no]) fi AC_CHECK_HEADERS([openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h openssl/core_names.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ENGINE_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback]) +AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ENGINE_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback EVP_MAC_CTX_set_params]) # these check_funcs need -lssl BAKLIBS="$LIBS" LIBS="-lssl $LIBS" -AC_CHECK_FUNCS([OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername X509_VERIFY_PARAM_set1_host SSL_CTX_set_ciphersuites SSL_CTX_set_tlsext_ticket_key_evp_cb]) +AC_CHECK_FUNCS([OPENSSL_init_ssl SSL_CTX_set_security_level SSL_set1_host SSL_get0_peername X509_VERIFY_PARAM_set1_host SSL_CTX_set_ciphersuites SSL_CTX_set_tlsext_ticket_key_evp_cb SSL_CTX_set_alpn_select_cb]) LIBS="$BAKLIBS" AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free,SSL_CTX_set_ecdh_auto], [], [], [ @@ -1395,6 +1396,39 @@ if test x_$withval = x_yes -o x_$withval != x_no; then ]) fi +# nghttp2 +AC_ARG_WITH(libnghttp2, AC_HELP_STRING([--with-libnghttp2=path], + [specify explicit path for libnghttp2.]), + [ ],[ withval="no" ]) +found_libnghttp2="no" +if test x_$withval = x_yes -o x_$withval != x_no; then + AC_MSG_CHECKING(for libnghttp2) + if test x_$withval = x_ -o x_$withval = x_yes; then + withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" + fi + for dir in $withval ; do + if test -f "$dir/include/nghttp2/nghttp2.h"; then + found_libnghttp2="yes" + dnl assume /usr is in default path. + if test "$dir" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$dir/include" + LDFLAGS="$LDFLAGS -L$dir/lib" + fi + AC_MSG_RESULT(found in $dir) + AC_DEFINE([HAVE_NGHTTP2], [1], [Define this to use nghttp2 client.]) + LIBS="$LIBS -lnghttp2" + break; + fi + done + if test x_$found_libnghttp2 != x_yes; then + AC_ERROR([Could not find libnghttp2, nghttp2.h]) + fi + AC_CHECK_HEADERS([nghttp2/nghttp2.h],,, [AC_INCLUDES_DEFAULT]) + AC_CHECK_DECLS([nghttp2_session_server_new], [], [], [AC_INCLUDES_DEFAULT + #include + ]) +fi + # set static linking for uninstalled libraries if requested AC_SUBST(staticexe) staticexe="" @@ -1551,7 +1585,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([ AC_MSG_RESULT(no)) AC_SEARCH_LIBS([setusercontext], [util]) -AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget accept4]) +AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync shmget accept4 getifaddrs]) AC_CHECK_FUNCS([setresuid],,[AC_CHECK_FUNCS([setreuid])]) AC_CHECK_FUNCS([setresgid],,[AC_CHECK_FUNCS([setregid])]) @@ -2131,6 +2165,8 @@ void *unbound_stat_realloc_log(void *ptr, size_t size, #define UNBOUND_DNS_PORT 53 /** default port for DNS over TLS traffic. */ #define UNBOUND_DNS_OVER_TLS_PORT 853 +/** default port for DNS over HTTPS traffic. */ +#define UNBOUND_DNS_OVER_HTTPS_PORT 443 /** default port for unbound control traffic, registered port with IANA, ub-dns-control 8953/tcp unbound dns nameserver control */ #define UNBOUND_CONTROL_PORT 8953 Modified: head/contrib/unbound/contrib/aaaa-filter-iterator.patch ============================================================================== --- head/contrib/unbound/contrib/aaaa-filter-iterator.patch Tue Oct 27 21:53:33 2020 (r367093) +++ head/contrib/unbound/contrib/aaaa-filter-iterator.patch Tue Oct 27 23:03:15 2020 (r367094) @@ -1,10 +1,10 @@ -Index: trunk/doc/unbound.conf.5.in -=================================================================== ---- trunk/doc/unbound.conf.5.in (revision 4357) -+++ trunk/doc/unbound.conf.5.in (working copy) -@@ -701,6 +701,13 @@ +diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in +index f426ac5f..147fbfa9 100644 +--- a/doc/unbound.conf.5.in ++++ b/doc/unbound.conf.5.in *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Oct 28 02:30:45 2020 Return-Path: Delivered-To: svn-src-head@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 04E54438D11; Wed, 28 Oct 2020 02:30:45 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLXcN6PpNz4VWC; Wed, 28 Oct 2020 02:30:44 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF766153DD; Wed, 28 Oct 2020 02:30:44 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09S2Ui9J048044; Wed, 28 Oct 2020 02:30:44 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09S2UilN048043; Wed, 28 Oct 2020 02:30:44 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202010280230.09S2UilN048043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 28 Oct 2020 02:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367095 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 367095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 02:30:45 -0000 Author: lwhsu Date: Wed Oct 28 02:30:44 2020 New Revision: 367095 URL: https://svnweb.freebsd.org/changeset/base/367095 Log: Add FreeBSD 12.2 Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Tue Oct 27 23:03:15 2020 (r367094) +++ head/share/misc/bsd-family-tree Wed Oct 28 02:30:44 2020 (r367095) @@ -407,11 +407,11 @@ FreeBSD 5.2 | | | | | 10.15.1 | | | DragonFly 5.6.2 | | | *--NetBSD | | | | v | | 9.0 | | | - | | | | | | - | | | | | DragonFly 5.8 - | | | | | | - | | | | | DragonFly 5.6.3 - | | | NetBSD | | + | FreeBSD | | | | | + | 12.2 | | | | DragonFly 5.8 + | | | | | | | + | | | | | | DragonFly 5.6.3 + | v | | NetBSD | | | | | 8.2 | | | | | | | FreeBSD 13 -current | NetBSD -current OpenBSD -current DragonFly -current @@ -810,6 +810,7 @@ NetBSD 9.0 2020-02-14 [NBD] DragonFly 5.8 2020-03-03 [DFB] DragonFly 5.6.3 2020-03-11 [DFB] NetBSD 8.2 2020-03-31 [NBD] +FreeBSD 12.2 2020-10-27 [FBD] Bibliography ------------------------ From owner-svn-src-head@freebsd.org Wed Oct 28 08:22:39 2020 Return-Path: Delivered-To: svn-src-head@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 BC45743FDD2; Wed, 28 Oct 2020 08:22:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLhQR4c4Rz3XqR; Wed, 28 Oct 2020 08:22:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81C1919828; Wed, 28 Oct 2020 08:22:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09S8Md2I067962; Wed, 28 Oct 2020 08:22:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09S8Mdw7067960; Wed, 28 Oct 2020 08:22:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202010280822.09S8Mdw7067960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 28 Oct 2020 08:22:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367096 - in head/sys/dev/usb: . serial X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/usb: . serial X-SVN-Commit-Revision: 367096 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 08:22:39 -0000 Author: hselasky Date: Wed Oct 28 08:22:38 2020 New Revision: 367096 URL: https://svnweb.freebsd.org/changeset/base/367096 Log: Add new USB IDs. Submitted by: aleksi.kaalinpaa@kapsi.fi PR: 250675 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Wed Oct 28 02:30:44 2020 (r367095) +++ head/sys/dev/usb/serial/uftdi.c Wed Oct 28 08:22:38 2020 (r367096) @@ -293,6 +293,8 @@ static const STRUCT_USB_HOST_ID uftdi_devs[] = { UFTDI_DEV(BBELECTRONICS, USPTL4, 0), UFTDI_DEV(BBELECTRONICS, USTL4, 0), UFTDI_DEV(BBELECTRONICS, ZZ_PROG1_USB, 0), + UFTDI_DEV(BRAINBOXES, US257, 0), + UFTDI_DEV(BRAINBOXES, US25701, 0), UFTDI_DEV(CONTEC, COM1USBH, 0), UFTDI_DEV(DRESDENELEKTRONIK, SENSORTERMINALBOARD, 0), UFTDI_DEV(DRESDENELEKTRONIK, WIRELESSHANDHELDTERMINAL, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Oct 28 02:30:44 2020 (r367095) +++ head/sys/dev/usb/usbdevs Wed Oct 28 08:22:38 2020 (r367096) @@ -1415,6 +1415,10 @@ product BILLIONTON USBEL100 0x0988 USB100EL product BILLIONTON USBE100 0x8511 USBE100 product BILLIONTON USB2AR 0x90ff USB2AR Ethernet +/* Brainboxes Limited products */ +product BRAINBOXES US257 0x5001 US-257 USB2Serial 2xRS232 +product BRAINBOXES US25701 0x5002 US-25701 USB2Serial 2xRS232 + /* Broadcom products */ product BROADCOM BCM2033 0x2033 BCM2033 Bluetooth USB dongle From owner-svn-src-head@freebsd.org Wed Oct 28 08:29:32 2020 Return-Path: Delivered-To: svn-src-head@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 6DE5143FFDE; Wed, 28 Oct 2020 08:29:32 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLhZN2Cjzz3XpJ; Wed, 28 Oct 2020 08:29:32 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B297193D7; Wed, 28 Oct 2020 08:29:32 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09S8TW8U068335; Wed, 28 Oct 2020 08:29:32 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09S8TWtb068334; Wed, 28 Oct 2020 08:29:32 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202010280829.09S8TWtb068334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 28 Oct 2020 08:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367097 - head/usr.bin/usbhidaction X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/usbhidaction X-SVN-Commit-Revision: 367097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 08:29:32 -0000 Author: 0mp (doc,ports committer) Date: Wed Oct 28 08:29:31 2020 New Revision: 367097 URL: https://svnweb.freebsd.org/changeset/base/367097 Log: Correct USB HID item in examples It turns out that examples were incorrectly referring to Volume_Up and Volume_Down, which are not defined at all. PR: 250683 Reported by: corvid%openmailbox.org MFC after: 2 weeks Modified: head/usr.bin/usbhidaction/usbhidaction.1 Modified: head/usr.bin/usbhidaction/usbhidaction.1 ============================================================================== --- head/usr.bin/usbhidaction/usbhidaction.1 Wed Oct 28 08:22:38 2020 (r367096) +++ head/usr.bin/usbhidaction/usbhidaction.1 Wed Oct 28 08:29:31 2020 (r367097) @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 9, 2003 +.Dd October 28, 2020 .Dt USBHIDACTION 1 .Os .Sh NAME @@ -139,8 +139,8 @@ The following configuration file can be used to contro of Philips USB speakers with the HID controls on the speakers. .Bd -literal -offset indent # Configuration for various Philips USB speakers -Consumer:Volume_Up 1 0 mixer -f $1 vol +1 -Consumer:Volume_Down 1 0 mixer -f $1 vol -1 +Consumer:Volume_Increment 1 0 mixer -f $1 vol +1 +Consumer:Volume_Decrement 1 0 mixer -f $1 vol -1 # mute not supported #Consumer:Mute 1 0 mixer -f $1 mute Consumer:Channel_Top.Microsoft:Base_Up 1 0 mixer -f $1 bass +1 From owner-svn-src-head@freebsd.org Wed Oct 28 08:35:31 2020 Return-Path: Delivered-To: svn-src-head@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 1B101440481 for ; Wed, 28 Oct 2020 08:35:31 +0000 (UTC) (envelope-from raquel.carvalho@persuitflow.com) Received: from server1.mail.persuitflow.com (mail.persuitflow.com [89.46.74.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLhjG4Fj8z3Y93 for ; Wed, 28 Oct 2020 08:35:30 +0000 (UTC) (envelope-from raquel.carvalho@persuitflow.com) Received: by server1.mail.persuitflow.com (Postfix, from userid 1001) id C0894A45A8; Wed, 28 Oct 2020 08:34:44 +0000 (GMT) Received: by mail.persuitflow.com for ; Wed, 28 Oct 2020 08:33:46 GMT Message-ID: <20201028073001-0.1.12.2nbi.0.3mphpyeouz@persuitflow.com> Date: Wed, 28 Oct 2020 08:33:46 GMT From: "Raquel Carvalho" To: Subject: Desinfetante X-Mailer: mail.persuitflow.com MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4CLhjG4Fj8z3Y93 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.88 / 15.00]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_ALLOW(-0.20)[persuitflow.com:s=mail]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.01)[-1.015]; HFILTER_HELO_IP_A(1.00)[server1.mail.persuitflow.com]; DKIM_TRACE(0.00)[persuitflow.com:+]; RCVD_TLS_ALL(0.00)[]; DMARC_POLICY_ALLOW(-0.50)[persuitflow.com,reject]; NEURAL_HAM_SHORT(-0.96)[-0.957]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; HFILTER_HELO_NORES_A_OR_MX(0.30)[server1.mail.persuitflow.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(0.78)[]; ASN(0.00)[asn:31034, ipnet:89.46.72.0/21, country:IT]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 08:35:31 -0000 Bom Dia, A demanda por desinfetantes eficazes que permitam a elimina=C3=A7=C3=A3o = de microrganismos prejudiciais =C3=A9 continuamente alta em todo o mundo. Expandir a oferta com uma gama profissional de produtos com atividade vir= icida e bactericida permite aumentar a posi=C3=A7=C3=A3o competitiva da e= mpresa e construir novas redes de vendas. Diversificamos a linha de atacadistas e distribuidores com sabonetes, l=C3= =ADquidos e g=C3=A9is para desinfec=C3=A7=C3=A3o das m=C3=A3os e outros p= rodutos de limpeza, entre eles: g=C3=A9is de banho, shampoos e condiciona= dores de cabelo, al=C3=A9m de detergentes concentrados. Nossos parceiros de neg=C3=B3cios est=C3=A3o aumentando sua participa=C3=A7= =C3=A3o no mercado externo devido =C3=A0 crescente satisfa=C3=A7=C3=A3o d= o cliente e oferta diversificada. O potencial de crescimento de nossas solu=C3=A7=C3=B5es resulta de pre=C3= =A7os acess=C3=ADveis, alto desempenho e versatilidade para se adaptar a = todos os tipos de pele. A extens=C3=A3o da gama de produtos proposta =C3=A9 um campo interessante= para a coopera=C3=A7=C3=A3o? Cumprimentos, Raquel Carvalho Conselheiro do Cliente From owner-svn-src-head@freebsd.org Wed Oct 28 11:53:55 2020 Return-Path: Delivered-To: svn-src-head@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 AB41F4436F9; Wed, 28 Oct 2020 11:53:55 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLn6C3yjzz412k; Wed, 28 Oct 2020 11:53:55 +0000 (UTC) (envelope-from arichardson@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 6B6C21BBD5; Wed, 28 Oct 2020 11:53:55 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SBrtdD097171; Wed, 28 Oct 2020 11:53:55 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SBrtXm097170; Wed, 28 Oct 2020 11:53:55 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202010281153.09SBrtXm097170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 28 Oct 2020 11:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367099 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 367099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 11:53:55 -0000 Author: arichardson Date: Wed Oct 28 11:53:55 2020 New Revision: 367099 URL: https://svnweb.freebsd.org/changeset/base/367099 Log: clang-format: place sys/systm.h immediately after sys/param.h Should fix one of the objections to r366993. See also https://reviews.freebsd.org/D26981. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D26979 Modified: head/.clang-format (contents, props changed) Modified: head/.clang-format ============================================================================== --- head/.clang-format Wed Oct 28 11:40:10 2020 (r367098) +++ head/.clang-format Wed Oct 28 11:53:55 2020 (r367099) @@ -102,9 +102,12 @@ IncludeCategories: - Regex: '^' Priority: 2 SortPriority: 22 - - Regex: '^' Priority: 2 SortPriority: 23 + - Regex: '^' Priority: 3 SortPriority: 30 From owner-svn-src-head@freebsd.org Wed Oct 28 11:54:02 2020 Return-Path: Delivered-To: svn-src-head@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 66E6D4436FA; Wed, 28 Oct 2020 11:54:02 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLn6K1b64z415Q; Wed, 28 Oct 2020 11:54:01 +0000 (UTC) (envelope-from arichardson@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 997B61BBD6; Wed, 28 Oct 2020 11:54:00 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SBs02s097229; Wed, 28 Oct 2020 11:54:00 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SBs07N097228; Wed, 28 Oct 2020 11:54:00 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202010281154.09SBs07N097228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 28 Oct 2020 11:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367100 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 367100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 11:54:02 -0000 Author: arichardson Date: Wed Oct 28 11:54:00 2020 New Revision: 367100 URL: https://svnweb.freebsd.org/changeset/base/367100 Log: clang-format: Avoid breaking after the opening paren of function definitions This depends on https://reviews.llvm.org/D90246 to have any effect, but once that has landed clang-format will no longer format code like this: ``` int myfunction( int param1, int param2, int param2) { ... } ``` and instead create the following: ``` int myfunction(int param1, int param2, int param2) { ... } ``` Reviewed By: emaste, cem Differential Revision: https://reviews.freebsd.org/D26978 Modified: head/.clang-format (contents, props changed) Modified: head/.clang-format ============================================================================== --- head/.clang-format Wed Oct 28 11:53:55 2020 (r367099) +++ head/.clang-format Wed Oct 28 11:54:00 2020 (r367100) @@ -8,6 +8,7 @@ AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left AlignOperands: false AlignTrailingComments: true +AllowAllArgumentsOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false @@ -24,7 +25,20 @@ BreakBeforeBraces: WebKit BreakBeforeTernaryOperators: false # TODO: BreakStringLiterals can cause very strange formatting so turn it off? BreakStringLiterals: false -PenaltyBreakBeforeFirstCallParameter: 1000 +# Prefer: +# some_var = function(arg1, +# arg2) +# over: +# some_var = +# function(arg1, arg2) +PenaltyBreakAssignment: 100 +# Prefer: +# some_long_function(arg1, arg2 +# arg3) +# over: +# some_long_function( +# arg1, arg2, arg3) +PenaltyBreakBeforeFirstCallParameter: 100 CompactNamespaces: true DerivePointerAlignment: false DisableFormat: false From owner-svn-src-head@freebsd.org Wed Oct 28 11:54:08 2020 Return-Path: Delivered-To: svn-src-head@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 0883D443C15; Wed, 28 Oct 2020 11:54:08 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLn6R10H5z417r; Wed, 28 Oct 2020 11:54:06 +0000 (UTC) (envelope-from arichardson@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 603311BF0F; Wed, 28 Oct 2020 11:54:05 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SBs5Sh097283; Wed, 28 Oct 2020 11:54:05 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SBs5WP097282; Wed, 28 Oct 2020 11:54:05 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202010281154.09SBs5WP097282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 28 Oct 2020 11:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367101 - head/lib/googletest/tests X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/lib/googletest/tests X-SVN-Commit-Revision: 367101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 11:54:08 -0000 Author: arichardson Date: Wed Oct 28 11:54:04 2020 New Revision: 367101 URL: https://svnweb.freebsd.org/changeset/base/367101 Log: Significantly reduce compile time for googletest internal tests Clang's optimizer spends a really long time on these tests at -O2, so we now use -O0 instead. This reduces the -j32 time for lib/googletest/test from 131s to 29s. Using -O0 also reduces the disk usage from 144MB (at -O2) / 92MB (at -O1) to 82MB. Reviewed By: ngie, dim Differential Revision: https://reviews.freebsd.org/D26751 Modified: head/lib/googletest/tests/Makefile.inc Modified: head/lib/googletest/tests/Makefile.inc ============================================================================== --- head/lib/googletest/tests/Makefile.inc Wed Oct 28 11:54:00 2020 (r367100) +++ head/lib/googletest/tests/Makefile.inc Wed Oct 28 11:54:04 2020 (r367101) @@ -4,3 +4,15 @@ # Keep the existing tests directory structure (with subdirs per component) # rather than installing all of them to /usr/tests/lib/googletest TESTSDIR= ${TESTSBASE}/lib/googletest/${.CURDIR:T} + +# Clang's optimizer spends a really long time on these tests at -O2. Changing +# -O2 to -O1 reduces the -j32 time for lib/googletest/test from 131s to 71s. +# Using -O0 further reduces the time to 29s, and also reduces the disk usage +# from 144MB (at -O2) / 92MB (at -O1) to 82MB, so we use -O0. +# Note: Building without debug info saves about 10-15% of the build time, so we +# only enable debug info if DEBUG_FLAGS is not empty (71s -> 64s at -O1 and -j32). +CFLAGS.clang+= -O0 +.if empty(DEBUG_FLAGS) +MK_DEBUG_FILES:=no +CFLAGS.clang+= -g0 +.endif From owner-svn-src-head@freebsd.org Wed Oct 28 11:54:16 2020 Return-Path: Delivered-To: svn-src-head@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 4882B443D1A; Wed, 28 Oct 2020 11:54:16 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLn6W4CcHz41Zy; Wed, 28 Oct 2020 11:54:11 +0000 (UTC) (envelope-from arichardson@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 D81C21BD39; Wed, 28 Oct 2020 11:54:09 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SBs97t097336; Wed, 28 Oct 2020 11:54:09 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SBs9a7097335; Wed, 28 Oct 2020 11:54:09 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202010281154.09SBs9a7097335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 28 Oct 2020 11:54:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367102 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 367102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 11:54:16 -0000 Author: arichardson Date: Wed Oct 28 11:54:09 2020 New Revision: 367102 URL: https://svnweb.freebsd.org/changeset/base/367102 Log: Speed up Cirrus CI by using CROSS_TOOLCHAIN Installing the llvm11 package instead of bootstrapping it from the source tree reduces the build time by about 20 minutes. The last freebsd/freebsd build that was tested (r366629) took 1h 21m 22s, whereas my GitHub fork with this .cirrus.yml took 58m 6s. We could probably further reduce time by using images that have LLVM pre-installed: the pkg install step took 4 minutes 30s. Since the bootstrap toolchain is still tested by Jenkins, this should not reduce test coverage of the CI testing. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D26747 Modified: head/.cirrus.yml Modified: head/.cirrus.yml ============================================================================== --- head/.cirrus.yml Wed Oct 28 11:54:04 2020 (r367101) +++ head/.cirrus.yml Wed Oct 28 11:54:09 2020 (r367102) @@ -1,7 +1,9 @@ # $FreeBSD$ freebsd_instance: - image: freebsd-12-1-release-amd64 + # image: freebsd-12-1-stable-amd64 + # We need a newer image to install llvm11 + image_family: freebsd-12-1-snap cpu: 8 memory: 24G @@ -12,14 +14,14 @@ task: only_if: $CIRRUS_BRANCH != 'svn_head' timeout_in: 120m install_script: - - pkg install -y qemu-devel uefi-edk2-qemu-x86_64 + - pkg install -y qemu-devel uefi-edk2-qemu-x86_64 llvm11 setup_user_script: - pw useradd user - mkdir -p /usr/obj/$(pwd -P) - chown user:user /usr/obj/$(pwd -P) script: - - su user -c "make -j$(sysctl -n hw.ncpu) WITHOUT_TOOLCHAIN=yes buildworld buildkernel" + - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=llvm11 WITHOUT_TOOLCHAIN=yes buildworld buildkernel" package_script: - - su user -c "make WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" + - su user -c "make CROSS_TOOLCHAIN=llvm11 WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" test_script: - sh tools/boot/ci-qemu-test.sh From owner-svn-src-head@freebsd.org Wed Oct 28 13:06:40 2020 Return-Path: Delivered-To: svn-src-head@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 47047446724; Wed, 28 Oct 2020 13:06:40 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLpk80srpz45Gb; Wed, 28 Oct 2020 13:06:40 +0000 (UTC) (envelope-from se@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 D88B71C5F9; Wed, 28 Oct 2020 13:06:39 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SD6d3q040613; Wed, 28 Oct 2020 13:06:39 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SD6dgf040611; Wed, 28 Oct 2020 13:06:39 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010281306.09SD6dgf040611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Wed, 28 Oct 2020 13:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367103 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 13:06:40 -0000 Author: se Date: Wed Oct 28 13:06:39 2020 New Revision: 367103 URL: https://svnweb.freebsd.org/changeset/base/367103 Log: Fix parsing of #ifdef in calendar files There was code to process an #ifndef tokens, but none for #ifdef. The #ifdef token was mentioned as unsupported in the BUGS section, but no reason was given and I do not see why it should stay omitted. Misleading information in The BUGS section of the man-page regarding the maximum number of #define and #include statements supported has been removed. These limits might have applied to a prior version of this program, but do not seem to apply to the current implementation. I have not tried to test for the existence of the limits, but the include file processing just recursively calls the parser (without counting the recursion depth) and the stringlist functions do not impose a limit on the number of entries. Reported by: jhs@berklix.com MFC after: 3 days Modified: head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Wed Oct 28 11:54:09 2020 (r367102) +++ head/usr.bin/calendar/calendar.1 Wed Oct 28 13:06:39 2020 (r367103) @@ -346,11 +346,9 @@ double-check the start and end time of solar and lunar .Sh BUGS The .Nm -internal cpp does not correctly do #ifndef and will discard the rest -of the file if a #ifndef is triggered. -It also has a maximum of 50 include file and/or 100 #defines -and only recognises #include, #define and -#ifndef. +internal cpp does not support nested conditions and will continue +parsing of the input file on the next #endif even in nested contexts. +It does only recognise #include, #define, #ifdef and #ifndef. .Pp There is no possibility to properly specify the local position needed for solar and lunar calculations. Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Wed Oct 28 11:54:09 2020 (r367102) +++ head/usr.bin/calendar/io.c Wed Oct 28 13:06:39 2020 (r367103) @@ -212,6 +212,21 @@ token(char *line, FILE *out, bool *skip) return (T_OK); } + if (strncmp(line, "ifdef", 5) == 0) { + walk = line + 6; + trimlr(&walk); + + if (*walk == '\0') { + warnx("Expecting arguments after #ifdef"); + return (T_ERR); + } + + if (definitions == NULL || sl_find(definitions, walk) == NULL) + *skip = true; + + return (T_OK); + } + if (strncmp(line, "ifndef", 6) == 0) { walk = line + 6; trimlr(&walk); From owner-svn-src-head@freebsd.org Wed Oct 28 13:12:26 2020 Return-Path: Delivered-To: svn-src-head@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 C135A4469C6; Wed, 28 Oct 2020 13:12:26 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLprp4kQGz460P; Wed, 28 Oct 2020 13:12:26 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 85B7B18535; Wed, 28 Oct 2020 13:12:26 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-vs1-f50.google.com with SMTP id n18so2809548vsl.2; Wed, 28 Oct 2020 06:12:26 -0700 (PDT) X-Gm-Message-State: AOAM532TDviHwsCOfVNG5WunMQQvqqoEV0LrEiGxa69y91d+KX4eh/DV DgEIm51285CZVM74Y2kSDPClQtdCSdy0OoKfekc= X-Google-Smtp-Source: ABdhPJwb8VewXPIT8q3998mK55t8eHM+tBrSU1OwfolkB1E+ee2lOQPi4ivMRlCfGCTR/W1c8kFXls3ID2lCkvFSBw0= X-Received: by 2002:a67:804a:: with SMTP id b71mr4996489vsd.60.1603890745843; Wed, 28 Oct 2020 06:12:25 -0700 (PDT) MIME-Version: 1.0 References: <202010281306.09SD6dgf040611@repo.freebsd.org> In-Reply-To: <202010281306.09SD6dgf040611@repo.freebsd.org> From: Kyle Evans Date: Wed, 28 Oct 2020 08:12:14 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r367103 - head/usr.bin/calendar To: =?UTF-8?B?U3RlZmFuIEXDn2Vy?= Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 13:12:26 -0000 On Wed, Oct 28, 2020 at 8:06 AM Stefan E=C3=9Fer wrote: > > Author: se > Date: Wed Oct 28 13:06:39 2020 > New Revision: 367103 > URL: https://svnweb.freebsd.org/changeset/base/367103 > > Log: > Fix parsing of #ifdef in calendar files > > There was code to process an #ifndef tokens, but none for #ifdef. > The #ifdef token was mentioned as unsupported in the BUGS section, > but no reason was given and I do not see why it should stay omitted. > > Misleading information in The BUGS section of the man-page regarding > the maximum number of #define and #include statements supported has > been removed. These limits might have applied to a prior version of > this program, but do not seem to apply to the current implementation. > > I have not tried to test for the existence of the limits, but the > include file processing just recursively calls the parser (without > counting the recursion depth) and the stringlist functions do not > impose a limit on the number of entries. > > Reported by: jhs@berklix.com > MFC after: 3 days > > Modified: > head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/io.c > > Modified: head/usr.bin/calendar/calendar.1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/calendar/calendar.1 Wed Oct 28 11:54:09 2020 (= r367102) > +++ head/usr.bin/calendar/calendar.1 Wed Oct 28 13:06:39 2020 (= r367103) > @@ -346,11 +346,9 @@ double-check the start and end time of solar and lun= ar > .Sh BUGS > The > .Nm > -internal cpp does not correctly do #ifndef and will discard the rest > -of the file if a #ifndef is triggered. > -It also has a maximum of 50 include file and/or 100 #defines > -and only recognises #include, #define and > -#ifndef. > +internal cpp does not support nested conditions and will continue > +parsing of the input file on the next #endif even in nested contexts. > +It does only recognise #include, #define, #ifdef and #ifndef. > .Pp > There is no possibility to properly specify the local position > needed for solar and lunar calculations. > > Modified: head/usr.bin/calendar/io.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/calendar/io.c Wed Oct 28 11:54:09 2020 (r367102) > +++ head/usr.bin/calendar/io.c Wed Oct 28 13:06:39 2020 (r367103) > @@ -212,6 +212,21 @@ token(char *line, FILE *out, bool *skip) > return (T_OK); > } > > + if (strncmp(line, "ifdef", 5) =3D=3D 0) { > + walk =3D line + 6; > + trimlr(&walk); > + I think you wanted to step walk forward 5 instead of 6 here From owner-svn-src-head@freebsd.org Wed Oct 28 13:24:41 2020 Return-Path: Delivered-To: svn-src-head@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 F18F2446EBB; Wed, 28 Oct 2020 13:24:41 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLq6x66kFz46Kw; Wed, 28 Oct 2020 13:24:41 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bbc00c5f6c550d2a7fd66.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:bc00:c5f6:c550:d2a7:fd66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1ED6218649; Wed, 28 Oct 2020 13:24:41 +0000 (UTC) (envelope-from se@freebsd.org) To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head References: <202010281306.09SD6dgf040611@repo.freebsd.org> From: Stefan Esser Subject: Re: svn commit: r367103 - head/usr.bin/calendar Message-ID: <784474fd-2f63-066c-eb86-cddfebd499cb@freebsd.org> Date: Wed, 28 Oct 2020 14:24:40 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 13:24:42 -0000 Am 28.10.20 um 14:12 schrieb Kyle Evans:>> Modified: head/usr.bin/calendar/io.c >> ============================================================================== >> --- head/usr.bin/calendar/io.c Wed Oct 28 11:54:09 2020 (r367102) >> +++ head/usr.bin/calendar/io.c Wed Oct 28 13:06:39 2020 (r367103) >> @@ -212,6 +212,21 @@ token(char *line, FILE *out, bool *skip) >> return (T_OK); >> } >> >> + if (strncmp(line, "ifdef", 5) == 0) { >> + walk = line + 6; >> + trimlr(&walk); >> + > > I think you wanted to step walk forward 5 instead of 6 here Thank you for spotting this bug ... It did not show up in my tests, since there generally is a blank after the token, but I'll fix this immediately since I want to MFC that change. Nobody should be affected since #ifdef was officially unsupported before this change ... I'm thinking about support for nested conditionals and #else in calendar files, but I'm not sure about the possibility to MFC such a change and I do not want to invite users to create calendar files that work in -CURRENT but not in -STABLE. From owner-svn-src-head@freebsd.org Wed Oct 28 13:30:24 2020 Return-Path: Delivered-To: svn-src-head@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 B36BA446F56; Wed, 28 Oct 2020 13:30:24 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLqFX4LDdz46gc; Wed, 28 Oct 2020 13:30:24 +0000 (UTC) (envelope-from se@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 73E6F1CFAD; Wed, 28 Oct 2020 13:30:24 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SDUO9w052974; Wed, 28 Oct 2020 13:30:24 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SDUOhX052973; Wed, 28 Oct 2020 13:30:24 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010281330.09SDUOhX052973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Wed, 28 Oct 2020 13:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367104 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 13:30:24 -0000 Author: se Date: Wed Oct 28 13:30:24 2020 New Revision: 367104 URL: https://svnweb.freebsd.org/changeset/base/367104 Log: Fix off-by-one error in processing of #ifdef lines The convention in this program is to parse the line immediately starting after the token (e.g. #defineA and #ifdefA define respectively look-up "A"), and this commit restores this behavior instead of skipping an assumed white-space character following #ifdef. Reported by: kevans MFC after: 3 days Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Wed Oct 28 13:06:39 2020 (r367103) +++ head/usr.bin/calendar/io.c Wed Oct 28 13:30:24 2020 (r367104) @@ -213,7 +213,7 @@ token(char *line, FILE *out, bool *skip) } if (strncmp(line, "ifdef", 5) == 0) { - walk = line + 6; + walk = line + 5; trimlr(&walk); if (*walk == '\0') { From owner-svn-src-head@freebsd.org Wed Oct 28 13:34:28 2020 Return-Path: Delivered-To: svn-src-head@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 E1923446D5C; Wed, 28 Oct 2020 13:34:28 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLqLD5bhtz47C6; Wed, 28 Oct 2020 13:34:28 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 9E4E818542; Wed, 28 Oct 2020 13:34:28 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f51.google.com with SMTP id f5so2361851qvx.6; Wed, 28 Oct 2020 06:34:28 -0700 (PDT) X-Gm-Message-State: AOAM533nWZ3p33jJsCHch2r8YMJRntxnpBAdpfIV6m5H7MxVmqIo/2ts Cb8LaThE0JHGaCL/T61DDhFpw/yXbjQATykgBus= X-Google-Smtp-Source: ABdhPJw2S3mHdo2bzSbTVQMGR6oZbHYnenAI/iJALi6TOZFJvnMZw/AOr9mhpKt0SNlkW8awcbqcaYDpWNwKZyKNhvg= X-Received: by 2002:a0c:bd85:: with SMTP id n5mr7487864qvg.22.1603892068014; Wed, 28 Oct 2020 06:34:28 -0700 (PDT) MIME-Version: 1.0 References: <202010281306.09SD6dgf040611@repo.freebsd.org> <784474fd-2f63-066c-eb86-cddfebd499cb@freebsd.org> In-Reply-To: <784474fd-2f63-066c-eb86-cddfebd499cb@freebsd.org> From: Kyle Evans Date: Wed, 28 Oct 2020 08:34:16 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r367103 - head/usr.bin/calendar To: Stefan Esser Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 13:34:28 -0000 On Wed, Oct 28, 2020 at 8:24 AM Stefan Esser wrote: > > Am 28.10.20 um 14:12 schrieb Kyle Evans:>> Modified: > head/usr.bin/calendar/io.c > >> ============================================================================== > >> --- head/usr.bin/calendar/io.c Wed Oct 28 11:54:09 2020 (r367102) > >> +++ head/usr.bin/calendar/io.c Wed Oct 28 13:06:39 2020 (r367103) > >> @@ -212,6 +212,21 @@ token(char *line, FILE *out, bool *skip) > >> return (T_OK); > >> } > >> > >> + if (strncmp(line, "ifdef", 5) == 0) { > >> + walk = line + 6; > >> + trimlr(&walk); > >> + > > > > I think you wanted to step walk forward 5 instead of 6 here > > Thank you for spotting this bug ... > > It did not show up in my tests, since there generally is a blank > after the token, but I'll fix this immediately since I want to > MFC that change. > > Nobody should be affected since #ifdef was officially unsupported > before this change ... > +1, thanks! > I'm thinking about support for nested conditionals and #else in > calendar files, but I'm not sure about the possibility to MFC > such a change and I do not want to invite users to create calendar > files that work in -CURRENT but not in -STABLE. Unsolicited $0.02: Do whatever you feel comfortable with. It's up to people trying to use the new/advanced features to make sure it's compatible with the calendar(1) that *they* are using, and I'm having a hard time imagining folks using deploying additional calendar data in ports outside of deskutils/calendar-data which you can curate for stuff like that. From owner-svn-src-head@freebsd.org Wed Oct 28 13:46:34 2020 Return-Path: Delivered-To: svn-src-head@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 230A044751F; Wed, 28 Oct 2020 13:46:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLqcB0LGmz47Wd; Wed, 28 Oct 2020 13:46:34 +0000 (UTC) (envelope-from trasz@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 DEF4B1D15D; Wed, 28 Oct 2020 13:46:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SDkXaB065251; Wed, 28 Oct 2020 13:46:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SDkBVU065141; Wed, 28 Oct 2020 13:46:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010281346.09SDkBVU065141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 28 Oct 2020 13:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367105 - in head: lib/geom/mountver lib/libc/posix1e lib/libc/sys sbin/mdconfig/tests share/man/man4 share/man/man5 share/man/man7 sys/amd64/linux sys/cam/ctl sys/cddl/compat/opensolar... X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: lib/geom/mountver lib/libc/posix1e lib/libc/sys sbin/mdconfig/tests share/man/man4 share/man/man5 share/man/man7 sys/amd64/linux sys/cam/ctl sys/cddl/compat/opensolaris/kern sys/contrib/openz... X-SVN-Commit-Revision: 367105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 13:46:34 -0000 Author: trasz Date: Wed Oct 28 13:46:11 2020 New Revision: 367105 URL: https://svnweb.freebsd.org/changeset/base/367105 Log: Drop "All rights reserved" from all my stuff. This includes Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980 Modified: head/lib/geom/mountver/geom_mountver.c head/lib/geom/mountver/gmountver.8 head/lib/libc/posix1e/acl_add_flag_np.3 head/lib/libc/posix1e/acl_branding.c head/lib/libc/posix1e/acl_clear_flags_np.3 head/lib/libc/posix1e/acl_compat.c head/lib/libc/posix1e/acl_delete_flag_np.3 head/lib/libc/posix1e/acl_flag.c head/lib/libc/posix1e/acl_from_text_nfs4.c head/lib/libc/posix1e/acl_get_brand_np.3 head/lib/libc/posix1e/acl_get_entry_type_np.3 head/lib/libc/posix1e/acl_get_flag_np.3 head/lib/libc/posix1e/acl_get_flagset_np.3 head/lib/libc/posix1e/acl_is_trivial_np.3 head/lib/libc/posix1e/acl_set_entry_type_np.3 head/lib/libc/posix1e/acl_set_flagset_np.3 head/lib/libc/posix1e/acl_strip_np.3 head/lib/libc/posix1e/acl_support_nfs4.c head/lib/libc/posix1e/acl_to_text_nfs4.c head/lib/libc/sys/getloginclass.2 head/sbin/mdconfig/tests/mdconfig_test.sh head/share/man/man4/cfumass.4 head/share/man/man4/iscsi.4 head/share/man/man4/rctl.4 head/share/man/man5/autofs.5 head/share/man/man7/development.7 head/sys/amd64/linux/linux_ptrace.c head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_frontend_iscsi.h head/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c head/sys/contrib/openzfs/module/os/freebsd/spl/spl_acl.c head/sys/dev/iscsi/icl.c head/sys/dev/iscsi/icl.h head/sys/dev/iscsi/icl_conn_if.m head/sys/dev/iscsi/icl_soft.c head/sys/dev/iscsi/icl_soft_proxy.c head/sys/dev/iscsi/icl_wrappers.h head/sys/dev/iscsi/iscsi.c head/sys/dev/iscsi/iscsi.h head/sys/dev/iscsi/iscsi_ioctl.h head/sys/dev/iscsi/iscsi_proto.h head/sys/dev/usb/storage/cfumass.c head/sys/fs/autofs/autofs.c head/sys/fs/autofs/autofs.h head/sys/fs/autofs/autofs_ioctl.h head/sys/fs/autofs/autofs_vfsops.c head/sys/fs/autofs/autofs_vnops.c head/sys/kern/kern_loginclass.c head/sys/kern/kern_racct.c head/sys/kern/kern_rctl.c head/sys/kern/subr_acl_nfs4.c head/sys/sys/loginclass.h head/sys/sys/racct.h head/sys/sys/rctl.h head/sys/ufs/ffs/ffs_suspend.c head/tests/sys/acl/00.sh head/tests/sys/acl/01.sh head/tests/sys/acl/02.sh head/tests/sys/acl/03.sh head/tests/sys/acl/04.sh head/tests/sys/acl/aclfuzzer.sh head/tests/sys/acl/mktrivial.sh head/tests/sys/acl/tools-crossfs.test head/tests/sys/acl/tools-nfs4-psarc.test head/tests/sys/acl/tools-nfs4-trivial.test head/tests/sys/acl/tools-nfs4.test head/tests/sys/acl/tools-posix.test head/tools/regression/iscsi/iscsi-test.sh head/tools/tools/fetchbench/fetchbench head/usr.bin/iscsictl/iscsictl.8 head/usr.bin/iscsictl/iscsictl.c head/usr.bin/iscsictl/iscsictl.h head/usr.bin/iscsictl/parse.y head/usr.bin/iscsictl/token.l head/usr.bin/rctl/rctl.8 head/usr.bin/rctl/rctl.c head/usr.sbin/autofs/auto_master.5 head/usr.sbin/autofs/automount.8 head/usr.sbin/autofs/automount.c head/usr.sbin/autofs/automountd.8 head/usr.sbin/autofs/automountd.c head/usr.sbin/autofs/autounmountd.8 head/usr.sbin/autofs/autounmountd.c head/usr.sbin/autofs/common.c head/usr.sbin/autofs/common.h head/usr.sbin/autofs/defined.c head/usr.sbin/autofs/log.c head/usr.sbin/autofs/token.l head/usr.sbin/ctld/chap.c head/usr.sbin/ctld/ctld.8 head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/discovery.c head/usr.sbin/ctld/keys.c head/usr.sbin/ctld/log.c head/usr.sbin/ctld/login.c head/usr.sbin/ctld/parse.y head/usr.sbin/ctld/pdu.c head/usr.sbin/ctld/token.l head/usr.sbin/fstyp/fstyp.8 head/usr.sbin/fstyp/fstyp.c head/usr.sbin/fstyp/fstyp.h head/usr.sbin/iscsid/chap.c head/usr.sbin/iscsid/discovery.c head/usr.sbin/iscsid/iscsid.8 head/usr.sbin/iscsid/iscsid.c head/usr.sbin/iscsid/iscsid.h head/usr.sbin/iscsid/keys.c head/usr.sbin/iscsid/log.c head/usr.sbin/iscsid/login.c head/usr.sbin/iscsid/pdu.c head/usr.sbin/uefisign/child.c head/usr.sbin/uefisign/magic.h head/usr.sbin/uefisign/pe.c head/usr.sbin/uefisign/uefisign.8 head/usr.sbin/uefisign/uefisign.c head/usr.sbin/uefisign/uefisign.h Modified: head/lib/geom/mountver/geom_mountver.c ============================================================================== --- head/lib/geom/mountver/geom_mountver.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/geom/mountver/geom_mountver.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Edward Tomasz Napierala - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/geom/mountver/gmountver.8 ============================================================================== --- head/lib/geom/mountver/gmountver.8 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/geom/mountver/gmountver.8 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2010 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_add_flag_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_add_flag_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_add_flag_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_branding.c ============================================================================== --- head/lib/libc/posix1e/acl_branding.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_branding.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_clear_flags_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_clear_flags_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_clear_flags_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_compat.c ============================================================================== --- head/lib/libc/posix1e/acl_compat.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_compat.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2008 Edward Tomasz NapieraÅ‚a - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_delete_flag_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_delete_flag_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_delete_flag_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_flag.c ============================================================================== --- head/lib/libc/posix1e/acl_flag.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_flag.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_from_text_nfs4.c ============================================================================== --- head/lib/libc/posix1e/acl_from_text_nfs4.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_from_text_nfs4.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_get_brand_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_get_brand_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_get_brand_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_get_entry_type_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_get_entry_type_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_get_entry_type_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_get_flag_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_get_flag_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_get_flag_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_get_flagset_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_get_flagset_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_get_flagset_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_is_trivial_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_is_trivial_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_is_trivial_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" This software was developed by Robert Watson for the TrustedBSD Project. .\" Modified: head/lib/libc/posix1e/acl_set_entry_type_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_set_entry_type_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_set_entry_type_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_set_flagset_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_set_flagset_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_set_flagset_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_strip_np.3 ============================================================================== --- head/lib/libc/posix1e/acl_strip_np.3 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_strip_np.3 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" This software was developed by Robert Watson for the TrustedBSD Project. .\" Modified: head/lib/libc/posix1e/acl_support_nfs4.c ============================================================================== --- head/lib/libc/posix1e/acl_support_nfs4.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_support_nfs4.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libc/posix1e/acl_to_text_nfs4.c ============================================================================== --- head/lib/libc/posix1e/acl_to_text_nfs4.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/posix1e/acl_to_text_nfs4.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/lib/libc/sys/getloginclass.2 ============================================================================== --- head/lib/libc/sys/getloginclass.2 Wed Oct 28 13:30:24 2020 (r367104) +++ head/lib/libc/sys/getloginclass.2 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2011 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/sbin/mdconfig/tests/mdconfig_test.sh ============================================================================== --- head/sbin/mdconfig/tests/mdconfig_test.sh Wed Oct 28 13:30:24 2020 (r367104) +++ head/sbin/mdconfig/tests/mdconfig_test.sh Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ # Copyright (c) 2012 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/share/man/man4/cfumass.4 ============================================================================== --- head/share/man/man4/cfumass.4 Wed Oct 28 13:30:24 2020 (r367104) +++ head/share/man/man4/cfumass.4 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2017 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. Modified: head/share/man/man4/iscsi.4 ============================================================================== --- head/share/man/man4/iscsi.4 Wed Oct 28 13:30:24 2020 (r367104) +++ head/share/man/man4/iscsi.4 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2014 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/share/man/man4/rctl.4 ============================================================================== --- head/share/man/man4/rctl.4 Wed Oct 28 13:30:24 2020 (r367104) +++ head/share/man/man4/rctl.4 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2017 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/share/man/man5/autofs.5 ============================================================================== --- head/share/man/man5/autofs.5 Wed Oct 28 13:30:24 2020 (r367104) +++ head/share/man/man5/autofs.5 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2014 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. Modified: head/share/man/man7/development.7 ============================================================================== --- head/share/man/man7/development.7 Wed Oct 28 13:30:24 2020 (r367104) +++ head/share/man/man7/development.7 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2018 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/sys/amd64/linux/linux_ptrace.c ============================================================================== --- head/sys/amd64/linux/linux_ptrace.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/amd64/linux/linux_ptrace.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2017 Edward Tomasz Napierala - * All rights reserved. * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/cam/ctl/ctl_frontend_iscsi.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/contrib/openzfs/module/os/freebsd/spl/spl_acl.c ============================================================================== --- head/sys/contrib/openzfs/module/os/freebsd/spl/spl_acl.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/contrib/openzfs/module/os/freebsd/spl/spl_acl.c Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ /* * Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/dev/iscsi/icl.c ============================================================================== --- head/sys/dev/iscsi/icl.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/iscsi/icl.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/dev/iscsi/icl.h ============================================================================== --- head/sys/dev/iscsi/icl.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/iscsi/icl.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/dev/iscsi/icl_conn_if.m ============================================================================== --- head/sys/dev/iscsi/icl_conn_if.m Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/iscsi/icl_conn_if.m Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ # SPDX-License-Identifier: BSD-2-Clause-FreeBSD # # Copyright (c) 2014 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Edward Tomasz Napierala under sponsorship # from the FreeBSD Foundation. Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/iscsi/icl_soft.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/dev/iscsi/icl_soft_proxy.c ============================================================================== --- head/sys/dev/iscsi/icl_soft_proxy.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/iscsi/icl_soft_proxy.c Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/dev/iscsi/icl_wrappers.h ============================================================================== --- head/sys/dev/iscsi/icl_wrappers.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/iscsi/icl_wrappers.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/iscsi/iscsi.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/dev/iscsi/iscsi.h ============================================================================== --- head/sys/dev/iscsi/iscsi.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/iscsi/iscsi.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/dev/iscsi/iscsi_ioctl.h ============================================================================== --- head/sys/dev/iscsi/iscsi_ioctl.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/iscsi/iscsi_ioctl.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/dev/iscsi/iscsi_proto.h ============================================================================== --- head/sys/dev/iscsi/iscsi_proto.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/iscsi/iscsi_proto.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/dev/usb/storage/cfumass.c ============================================================================== --- head/sys/dev/usb/storage/cfumass.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/dev/usb/storage/cfumass.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2016 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/fs/autofs/autofs.c Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/fs/autofs/autofs.h ============================================================================== --- head/sys/fs/autofs/autofs.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/fs/autofs/autofs.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/fs/autofs/autofs_ioctl.h ============================================================================== --- head/sys/fs/autofs/autofs_ioctl.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/fs/autofs/autofs_ioctl.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- head/sys/fs/autofs/autofs_vfsops.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/fs/autofs/autofs_vfsops.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/fs/autofs/autofs_vnops.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/kern/kern_loginclass.c ============================================================================== --- head/sys/kern/kern_loginclass.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/kern/kern_loginclass.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/kern/kern_racct.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/kern/kern_rctl.c ============================================================================== --- head/sys/kern/kern_rctl.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/kern/kern_rctl.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/kern/subr_acl_nfs4.c ============================================================================== --- head/sys/kern/subr_acl_nfs4.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/kern/subr_acl_nfs4.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2008-2010 Edward Tomasz NapieraÅ‚a - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/sys/sys/loginclass.h ============================================================================== --- head/sys/sys/loginclass.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/sys/loginclass.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/sys/racct.h ============================================================================== --- head/sys/sys/racct.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/sys/racct.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/sys/rctl.h ============================================================================== --- head/sys/sys/rctl.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/sys/rctl.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/sys/ufs/ffs/ffs_suspend.c ============================================================================== --- head/sys/ufs/ffs/ffs_suspend.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/sys/ufs/ffs/ffs_suspend.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/tests/sys/acl/00.sh ============================================================================== --- head/tests/sys/acl/00.sh Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/00.sh Wed Oct 28 13:46:11 2020 (r367105) @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/01.sh ============================================================================== --- head/tests/sys/acl/01.sh Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/01.sh Wed Oct 28 13:46:11 2020 (r367105) @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/02.sh ============================================================================== --- head/tests/sys/acl/02.sh Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/02.sh Wed Oct 28 13:46:11 2020 (r367105) @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/03.sh ============================================================================== --- head/tests/sys/acl/03.sh Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/03.sh Wed Oct 28 13:46:11 2020 (r367105) @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/04.sh ============================================================================== --- head/tests/sys/acl/04.sh Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/04.sh Wed Oct 28 13:46:11 2020 (r367105) @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (c) 2011 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/aclfuzzer.sh ============================================================================== --- head/tests/sys/acl/aclfuzzer.sh Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/aclfuzzer.sh Wed Oct 28 13:46:11 2020 (r367105) @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/mktrivial.sh ============================================================================== --- head/tests/sys/acl/mktrivial.sh Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/mktrivial.sh Wed Oct 28 13:46:11 2020 (r367105) @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (c) 2010 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/tools-crossfs.test ============================================================================== --- head/tests/sys/acl/tools-crossfs.test Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/tools-crossfs.test Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ # Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/tools-nfs4-psarc.test ============================================================================== --- head/tests/sys/acl/tools-nfs4-psarc.test Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/tools-nfs4-psarc.test Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ # Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/tools-nfs4-trivial.test ============================================================================== --- head/tests/sys/acl/tools-nfs4-trivial.test Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/tools-nfs4-trivial.test Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ # Copyright (c) 2011 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/tools-nfs4.test ============================================================================== --- head/tests/sys/acl/tools-nfs4.test Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/tools-nfs4.test Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ # Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tests/sys/acl/tools-posix.test ============================================================================== --- head/tests/sys/acl/tools-posix.test Wed Oct 28 13:30:24 2020 (r367104) +++ head/tests/sys/acl/tools-posix.test Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ # Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/tools/regression/iscsi/iscsi-test.sh ============================================================================== --- head/tools/regression/iscsi/iscsi-test.sh Wed Oct 28 13:30:24 2020 (r367104) +++ head/tools/regression/iscsi/iscsi-test.sh Wed Oct 28 13:46:11 2020 (r367105) @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (c) 2012 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Edward Tomasz Napierala under sponsorship # from the FreeBSD Foundation. Modified: head/tools/tools/fetchbench/fetchbench ============================================================================== --- head/tools/tools/fetchbench/fetchbench Wed Oct 28 13:30:24 2020 (r367104) +++ head/tools/tools/fetchbench/fetchbench Wed Oct 28 13:46:11 2020 (r367105) @@ -1,7 +1,6 @@ #!/bin/sh #- # Copyright (c) 2017 Edward Tomasz Napierala -# All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) Modified: head/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- head/usr.bin/iscsictl/iscsictl.8 Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.bin/iscsictl/iscsictl.8 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2012 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. Modified: head/usr.bin/iscsictl/iscsictl.c ============================================================================== --- head/usr.bin/iscsictl/iscsictl.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.bin/iscsictl/iscsictl.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.bin/iscsictl/iscsictl.h ============================================================================== --- head/usr.bin/iscsictl/iscsictl.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.bin/iscsictl/iscsictl.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.bin/iscsictl/parse.y ============================================================================== --- head/usr.bin/iscsictl/parse.y Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.bin/iscsictl/parse.y Wed Oct 28 13:46:11 2020 (r367105) @@ -3,7 +3,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.bin/iscsictl/token.l ============================================================================== --- head/usr.bin/iscsictl/token.l Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.bin/iscsictl/token.l Wed Oct 28 13:46:11 2020 (r367105) @@ -3,7 +3,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.bin/rctl/rctl.8 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2009 Edward Tomasz Napierala -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.bin/rctl/rctl.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/auto_master.5 ============================================================================== --- head/usr.sbin/autofs/auto_master.5 Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/auto_master.5 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2014 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/automount.8 ============================================================================== --- head/usr.sbin/autofs/automount.8 Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/automount.8 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2014 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/automount.c ============================================================================== --- head/usr.sbin/autofs/automount.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/automount.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/automountd.8 ============================================================================== --- head/usr.sbin/autofs/automountd.8 Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/automountd.8 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2014 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/automountd.c ============================================================================== --- head/usr.sbin/autofs/automountd.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/automountd.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/autounmountd.8 ============================================================================== --- head/usr.sbin/autofs/autounmountd.8 Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/autounmountd.8 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2014 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/autounmountd.c ============================================================================== --- head/usr.sbin/autofs/autounmountd.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/autounmountd.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/common.c ============================================================================== --- head/usr.sbin/autofs/common.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/common.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/common.h ============================================================================== --- head/usr.sbin/autofs/common.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/common.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/defined.c ============================================================================== --- head/usr.sbin/autofs/defined.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/defined.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/log.c ============================================================================== --- head/usr.sbin/autofs/log.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/log.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/autofs/token.l ============================================================================== --- head/usr.sbin/autofs/token.l Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/autofs/token.l Wed Oct 28 13:46:11 2020 (r367105) @@ -3,7 +3,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/chap.c ============================================================================== --- head/usr.sbin/ctld/chap.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/chap.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/ctld.8 ============================================================================== --- head/usr.sbin/ctld/ctld.8 Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/ctld.8 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2012 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/ctld.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/ctld.h Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/discovery.c ============================================================================== --- head/usr.sbin/ctld/discovery.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/discovery.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/keys.c ============================================================================== --- head/usr.sbin/ctld/keys.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/keys.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/log.c ============================================================================== --- head/usr.sbin/ctld/log.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/log.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/login.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/parse.y Wed Oct 28 13:46:11 2020 (r367105) @@ -3,7 +3,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/pdu.c ============================================================================== --- head/usr.sbin/ctld/pdu.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/pdu.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/ctld/token.l ============================================================================== --- head/usr.sbin/ctld/token.l Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/ctld/token.l Wed Oct 28 13:46:11 2020 (r367105) @@ -3,7 +3,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/fstyp/fstyp.8 ============================================================================== --- head/usr.sbin/fstyp/fstyp.8 Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/fstyp/fstyp.8 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2014 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. Modified: head/usr.sbin/fstyp/fstyp.c ============================================================================== --- head/usr.sbin/fstyp/fstyp.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/fstyp/fstyp.c Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/fstyp/fstyp.h ============================================================================== --- head/usr.sbin/fstyp/fstyp.h Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/fstyp/fstyp.h Wed Oct 28 13:46:11 2020 (r367105) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/iscsid/chap.c ============================================================================== --- head/usr.sbin/iscsid/chap.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/iscsid/chap.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/iscsid/discovery.c ============================================================================== --- head/usr.sbin/iscsid/discovery.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/iscsid/discovery.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. Modified: head/usr.sbin/iscsid/iscsid.8 ============================================================================== --- head/usr.sbin/iscsid/iscsid.8 Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/iscsid/iscsid.8 Wed Oct 28 13:46:11 2020 (r367105) @@ -1,5 +1,4 @@ .\" Copyright (c) 2012 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship .\" from the FreeBSD Foundation. Modified: head/usr.sbin/iscsid/iscsid.c ============================================================================== --- head/usr.sbin/iscsid/iscsid.c Wed Oct 28 13:30:24 2020 (r367104) +++ head/usr.sbin/iscsid/iscsid.c Wed Oct 28 13:46:11 2020 (r367105) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Oct 28 14:16:08 2020 Return-Path: Delivered-To: svn-src-head@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 DDD9B447FC7; Wed, 28 Oct 2020 14:16:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLrGJ5TgGz49t7; Wed, 28 Oct 2020 14:16:08 +0000 (UTC) (envelope-from trasz@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 A0B331D997; Wed, 28 Oct 2020 14:16:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SEG8ud083696; Wed, 28 Oct 2020 14:16:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SEG8o4083695; Wed, 28 Oct 2020 14:16:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010281416.09SEG8o4083695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 28 Oct 2020 14:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367106 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 367106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 14:16:08 -0000 Author: trasz Date: Wed Oct 28 14:16:08 2020 New Revision: 367106 URL: https://svnweb.freebsd.org/changeset/base/367106 Log: Make linux_errtbl a bit more readable by using named initializers. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26970 Modified: head/sys/compat/linux/linux_errno.inc Modified: head/sys/compat/linux/linux_errno.inc ============================================================================== --- head/sys/compat/linux/linux_errno.inc Wed Oct 28 13:46:11 2020 (r367105) +++ head/sys/compat/linux/linux_errno.inc Wed Oct 28 14:16:08 2020 (r367106) @@ -36,113 +36,123 @@ * include/uapi/asm-generic/errno.h */ const int linux_errtbl[ELAST + 1] = { - -0, - -1, - -2, - -3, - -4, - -5, - -6, - -7, - -8, - -9, + /* [0, 9] */ + [0] = -0, + [EPERM] = -1, + [ENOENT] = -2, + [ESRCH] = -3, + [EINTR] = -4, + [EIO] = -5, + [ENXIO] = -6, + [E2BIG] = -7, + [ENOEXEC] = -8, + [EBADF] = -9, - -10, - -35, /* EDEADLK */ - -12, - -13, - -14, - -15, - -16, - -17, - -18, - -19, + /* [10, 19] */ + [ECHILD] = -10, + [EDEADLK] = -35, + [ENOMEM] = -12, + [EACCES] = -13, + [EFAULT] = -14, + [ENOTBLK] = -15, + [EBUSY] = -16, + [EEXIST] = -17, + [EXDEV] = -18, + [ENODEV] = -19, - -20, - -21, - -22, - -23, - -24, - -25, - -26, - -27, - -28, - -29, + /* [20, 29] */ + [ENOTDIR] = -20, + [EISDIR] = -21, + [EINVAL] = -22, + [ENFILE] = -23, + [EMFILE] = -24, + [ENOTTY] = -25, + [ETXTBSY] = -26, + [EFBIG] = -27, + [ENOSPC] = -28, + [ESPIPE] = -29, - -30, - -31, - -32, - -33, - -34, - -11, /* EAGAIN */ - -115, - -114, - -88, - -89, + /* [30, 39] */ + [EROFS] = -30, + [EMLINK] = -31, + [EPIPE] = -32, + [EDOM] = -33, + [ERANGE] = -34, + [EAGAIN] = -11, + [EINPROGRESS] = -115, + [EALREADY] = -114, + [ENOTSOCK] = -88, + [EDESTADDRREQ] = -89, - -90, - -91, - -92, - -93, - -94, - -95, - -96, - -97, - -98, - -99, + /* [40, 49] */ + [EMSGSIZE] = -90, + [EPROTOTYPE] = -91, + [ENOPROTOOPT] = -92, + [EPROTONOSUPPORT] = -93, + [ESOCKTNOSUPPORT] = -94, + [EOPNOTSUPP] = -95, + [EPFNOSUPPORT] = -96, + [EAFNOSUPPORT] = -97, + [EADDRINUSE] = -98, + [EADDRNOTAVAIL] = -99, - -100, - -101, - -102, - -103, - -104, - -105, - -106, - -107, - -108, - -109, + /* [50, 59] */ + [ENETDOWN] = -100, + [ENETUNREACH] = -101, + [ENETRESET] = -102, + [ECONNABORTED] = -103, + [ECONNRESET] = -104, + [ENOBUFS] = -105, + [EISCONN] = -106, + [ENOTCONN] = -107, + [ESHUTDOWN] = -108, + [ETOOMANYREFS] = -109, - -110, - -111, - -40, - -36, - -112, - -113, - -39, - -11, - -87, - -122, + /* [60, 69] */ + [ETIMEDOUT] = -110, + [ECONNREFUSED] = -111, + [ELOOP] = -40, + [ENAMETOOLONG] = -36, + [EHOSTDOWN] = -112, + [EHOSTUNREACH] = -113, + [ENOTEMPTY] = -39, + [EPROCLIM] = -11, + [EUSERS] = -87, + [EDQUOT] = -122, - -116, - -66, - -6, /* EBADRPC -> ENXIO */ - -6, /* ERPCMISMATCH -> ENXIO */ - -6, /* EPROGUNAVAIL -> ENXIO */ - -6, /* EPROGMISMATCH -> ENXIO */ - -6, /* EPROCUNAVAIL -> ENXIO */ - -37, - -38, - -9, + /* [70, 79] */ + [ESTALE] = -116, + [EREMOTE] = -66, + [EBADRPC] = -6, /* EBADRPC -> ENXIO */ + [ERPCMISMATCH] = -6, /* ERPCMISMATCH -> ENXIO */ + [EPROGUNAVAIL] = -6, /* EPROGUNAVAIL -> ENXIO */ + [EPROGMISMATCH] = -6, /* EPROGMISMATCH -> ENXIO */ + [EPROCUNAVAIL] = -6, /* EPROCUNAVAIL -> ENXIO */ + [ENOLCK] = -37, + [ENOSYS] = -38, + [EFTYPE] = -9, - -6, /* EAUTH -> ENXIO */ - -6, /* ENEEDAUTH -> ENXIO */ - -43, - -42, - -75, - -125, - -84, - -61, - -22, /* EDOOFUS -> EINVAL */ - -74, + /* [80, 89] */ + [EAUTH] = -6, /* EAUTH -> ENXIO */ + [ENEEDAUTH] = -6, /* ENEEDAUTH -> ENXIO */ + [EIDRM] = -43, + [ENOMSG] = -42, + [EOVERFLOW] = -75, + [ECANCELED] = -125, + [EILSEQ] = -84, + [ENOATTR] = -61, + [EDOOFUS] = -22, /* EDOOFUS -> EINVAL */ + [EBADMSG] = -74, - -72, - -67, - -71, - -1, /* ENOTCAPABLE -> EPERM */ - -1, /* ECAPMODE -> EPERM */ - -131, /* ENOTRECOVERABLE */ - -130, /* EOWNERDEAD */ - -22, /* EINTEGRITY -> EINVAL */ + /* [90, 99] */ + [EMULTIHOP] = -72, + [ENOLINK] = -67, + [EPROTO] = -71, + [ENOTCAPABLE] = -1, /* ENOTCAPABLE -> EPERM */ + [ECAPMODE] = -1, /* ECAPMODE -> EPERM */ + [ENOTRECOVERABLE] = -131, /* ENOTRECOVERABLE */ + [EOWNERDEAD] = -130, /* EOWNERDEAD */ + [EINTEGRITY] = -22, /* EINTEGRITY -> EINVAL */ }; _Static_assert(ELAST == 97, From owner-svn-src-head@freebsd.org Wed Oct 28 14:43:39 2020 Return-Path: Delivered-To: svn-src-head@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 8F876448ACA; Wed, 28 Oct 2020 14:43:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLrt33HS0z4DjM; Wed, 28 Oct 2020 14:43:39 +0000 (UTC) (envelope-from trasz@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 53BF31DC41; Wed, 28 Oct 2020 14:43:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SEhder002185; Wed, 28 Oct 2020 14:43:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SEhdBt002184; Wed, 28 Oct 2020 14:43:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010281443.09SEhdBt002184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 28 Oct 2020 14:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367107 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 367107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 14:43:39 -0000 Author: trasz Date: Wed Oct 28 14:43:38 2020 New Revision: 367107 URL: https://svnweb.freebsd.org/changeset/base/367107 Log: Add local variable to store the sysent pointer. Just a cleanup, no functional changes. Reviewed by: kib (earlier version) MFC after: 2 weeks Sponsored by: EPSRC Differential Revision: https://reviews.freebsd.org/D26977 Modified: head/sys/kern/subr_syscall.c Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Wed Oct 28 14:16:08 2020 (r367106) +++ head/sys/kern/subr_syscall.c Wed Oct 28 14:43:38 2020 (r367107) @@ -59,6 +59,7 @@ syscallenter(struct thread *td) { struct proc *p; struct syscall_args *sa; + struct sysent *se; int error, traced; VM_CNT_INC(v_syscall); @@ -77,9 +78,10 @@ syscallenter(struct thread *td) PROC_UNLOCK(p); } error = (p->p_sysent->sv_fetch_syscall_args)(td); + se = sa->callp; #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(sa->code, sa->callp->sy_narg, sa->args); + ktrsyscall(sa->code, se->sy_narg, sa->args); #endif KTR_START4(KTR_SYSC, "syscall", syscallname(p, sa->code), (uintptr_t)td, "pid:%d", td->td_proc->p_pid, "arg0:%p", sa->args[0], @@ -102,9 +104,10 @@ syscallenter(struct thread *td) * modified registers or memory. */ error = (p->p_sysent->sv_fetch_syscall_args)(td); + se = sa->callp; #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(sa->code, sa->callp->sy_narg, sa->args); + ktrsyscall(sa->code, se->sy_narg, sa->args); #endif if (error != 0) { td->td_errno = error; @@ -118,13 +121,13 @@ syscallenter(struct thread *td) * flagged with SYF_CAPENABLED. */ if (__predict_false(IN_CAPABILITY_MODE(td) && - !(sa->callp->sy_flags & SYF_CAPENABLED))) { + (se->sy_flags & SYF_CAPENABLED) == 0)) { td->td_errno = error = ECAPMODE; goto retval; } #endif - error = syscall_thread_enter(td, sa->callp); + error = syscall_thread_enter(td, se); if (error != 0) { td->td_errno = error; goto retval; @@ -145,10 +148,10 @@ syscallenter(struct thread *td) AUDIT_SYSCALL_ENTER(sa->code, td))) { #ifdef KDTRACE_HOOKS /* Give the syscall:::entry DTrace probe a chance to fire. */ - if (__predict_false(sa->callp->sy_entry != 0)) + if (__predict_false(se->sy_entry != 0)) (*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0); #endif - error = (sa->callp->sy_call)(td, sa->args); + error = (se->sy_call)(td, sa->args); /* Save the latest error return value. */ if (__predict_false((td->td_pflags & TDP_NERRNO) != 0)) td->td_pflags &= ~TDP_NERRNO; @@ -168,19 +171,19 @@ syscallenter(struct thread *td) #ifdef KDTRACE_HOOKS /* Give the syscall:::return DTrace probe a chance to fire. */ - if (__predict_false(sa->callp->sy_return != 0)) + if (__predict_false(se->sy_return != 0)) (*systrace_probe_func)(sa, SYSTRACE_RETURN, error ? -1 : td->td_retval[0]); #endif } else { - error = (sa->callp->sy_call)(td, sa->args); + error = (se->sy_call)(td, sa->args); /* Save the latest error return value. */ if (__predict_false((td->td_pflags & TDP_NERRNO) != 0)) td->td_pflags &= ~TDP_NERRNO; else td->td_errno = error; } - syscall_thread_exit(td, sa->callp); + syscall_thread_exit(td, se); retval: KTR_STOP4(KTR_SYSC, "syscall", syscallname(p, sa->code), From owner-svn-src-head@freebsd.org Wed Oct 28 14:48:59 2020 Return-Path: Delivered-To: svn-src-head@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 DCF33448DA3; Wed, 28 Oct 2020 14:48:59 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLs0C5KxQz4Dkm; Wed, 28 Oct 2020 14:48:59 +0000 (UTC) (envelope-from se@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 958821DA5B; Wed, 28 Oct 2020 14:48:59 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SEmxpE002497; Wed, 28 Oct 2020 14:48:59 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SEmxG5002495; Wed, 28 Oct 2020 14:48:59 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010281448.09SEmxG5002495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Wed, 28 Oct 2020 14:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367108 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 14:48:59 -0000 Author: se Date: Wed Oct 28 14:48:58 2020 New Revision: 367108 URL: https://svnweb.freebsd.org/changeset/base/367108 Log: Add support for nested conditionals The previous behavior was to support nested #ifdef and #ifndef, but to return to unconditional parsing after the next #endif, independently of the number of previously parsed conditions. E.g. after "#ifdef A / #ifdef B / #endif" the following lines were unconditially parsed again, independently of A and/or B being defined. The new behavior is to count the level of false conditions and to only restart parsing of calendar entries when the corresponding number of #endif tokens have been seen. In addition to the above, an #else directive has been added, to toggle between parsing and ignoring of the following lines. No validation of the correct use of the condition directives is made. #endif without prior #define or #ifndef is ignored and #else toggles between parsing and skipping of entries. The MFC period has been set to 1 month to allow for a review of the changes and for a discussion, whether these modifications should not be merged at all. No correct input file is parsed differently than before, but if calendar data files are published that use these new features, those data files will not parse correctly on prior versions of this program. MFC after: 1 month Modified: head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Wed Oct 28 14:43:38 2020 (r367107) +++ head/usr.bin/calendar/calendar.1 Wed Oct 28 14:48:58 2020 (r367108) @@ -28,7 +28,7 @@ .\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 .\" $FreeBSD$ .\" -.Dd October 25, 2020 +.Dd October 28, 2020 .Dt CALENDAR 1 .Os .Sh NAME @@ -198,7 +198,13 @@ file is preprocessed by a limited subset of .Xr cpp 1 internally, allowing the inclusion of shared files such as lists of company holidays or meetings. -This limited subset consists of \fB#include #ifndef #endif\fR and \fB#define\fR. +This limited subset consists of \fB#include #ifdef #ifndef #else +#endif\fR and \fB#define\fR. Conditions can be nested, but not check +for matching begin and end directives is performed. +Included files are parsed in their own scope. +They have no read or write access to condition variables defined in +an outer scope and open conditional blocks are implicitly closed. +.Pp If the shared file is not referenced by a full pathname, .Nm searches in the current (or home) directory first, and then in the @@ -346,9 +352,12 @@ double-check the start and end time of solar and lunar .Sh BUGS The .Nm -internal cpp does not support nested conditions and will continue -parsing of the input file on the next #endif even in nested contexts. -It does only recognise #include, #define, #ifdef and #ifndef. +does only recognise the cpp directives #include, #define, #ifdef, +#ifndef and #else. +It supports nested conditions, but does not perform any validation +on the correct use and nesting of conditions. +#endif without prior #ifdef or #define is ignored and #else outside +a conditional section skips input lines up to the next #endif. .Pp There is no possibility to properly specify the local position needed for solar and lunar calculations. Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Wed Oct 28 14:43:38 2020 (r367107) +++ head/usr.bin/calendar/io.c Wed Oct 28 14:48:58 2020 (r367108) @@ -140,18 +140,66 @@ cal_fopen(const char *file) } static int -token(char *line, FILE *out, bool *skip) +token(char *line, FILE *out, int *skip) { char *walk, c, a; if (strncmp(line, "endif", 5) == 0) { - *skip = false; + if (*skip > 0) + --*skip; return (T_OK); } - if (*skip) + if (strncmp(line, "ifdef", 5) == 0) { + walk = line + 5; + trimlr(&walk); + + if (*walk == '\0') { + warnx("Expecting arguments after #ifdef"); + return (T_ERR); + } + + if (*skip != 0 || definitions == NULL || sl_find(definitions, walk) == NULL) + ++*skip; + return (T_OK); + } + if (strncmp(line, "ifndef", 6) == 0) { + walk = line + 6; + trimlr(&walk); + + if (*walk == '\0') { + warnx("Expecting arguments after #ifndef"); + return (T_ERR); + } + + if (*skip != 0 || (definitions != NULL && sl_find(definitions, walk) != NULL)) + ++*skip; + + return (T_OK); + } + + if (strncmp(line, "else", 4) == 0) { + walk = line + 4; + trimlr(&walk); + + if (*walk != '\0') { + warnx("Expecting no arguments after #else"); + return (T_ERR); + } + + if (*skip == 0) + *skip = 1; + else if (*skip == 1) + *skip = 0; + + return (T_OK); + } + + if (*skip != 0) + return (T_OK); + if (strncmp(line, "include", 7) == 0) { walk = line + 7; @@ -212,36 +260,6 @@ token(char *line, FILE *out, bool *skip) return (T_OK); } - if (strncmp(line, "ifdef", 5) == 0) { - walk = line + 5; - trimlr(&walk); - - if (*walk == '\0') { - warnx("Expecting arguments after #ifdef"); - return (T_ERR); - } - - if (definitions == NULL || sl_find(definitions, walk) == NULL) - *skip = true; - - return (T_OK); - } - - if (strncmp(line, "ifndef", 6) == 0) { - walk = line + 6; - trimlr(&walk); - - if (*walk == '\0') { - warnx("Expecting arguments after #ifndef"); - return (T_ERR); - } - - if (definitions != NULL && sl_find(definitions, walk) != NULL) - *skip = true; - - return (T_OK); - } - return (T_PROCESS); } @@ -269,7 +287,7 @@ cal_parse(FILE *in, FILE *out) int month[MAXCOUNT]; int day[MAXCOUNT]; int year[MAXCOUNT]; - bool skip = false; + int skip = 0; char dbuf[80]; char *pp, p; struct tm tm; @@ -299,7 +317,7 @@ cal_parse(FILE *in, FILE *out) } } - if (skip) + if (skip != 0) continue; buf = line; From owner-svn-src-head@freebsd.org Wed Oct 28 15:09:01 2020 Return-Path: Delivered-To: svn-src-head@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 B51B6449366; Wed, 28 Oct 2020 15:09:01 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLsRK4PGpz4FdW; Wed, 28 Oct 2020 15:09:01 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bbc00c5f6c550d2a7fd66.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:bc00:c5f6:c550:d2a7:fd66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id F07DA19B1C; Wed, 28 Oct 2020 15:09:00 +0000 (UTC) (envelope-from se@freebsd.org) To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head References: <202010281306.09SD6dgf040611@repo.freebsd.org> <784474fd-2f63-066c-eb86-cddfebd499cb@freebsd.org> From: Stefan Esser Subject: Re: svn commit: r367103 - head/usr.bin/calendar Message-ID: <46d724c0-87b8-740c-777d-f699527ccb6e@freebsd.org> Date: Wed, 28 Oct 2020 16:08:59 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SraZyjpp1MzbUeqQKnszS3zpdRXMoSNbS" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 15:09:01 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SraZyjpp1MzbUeqQKnszS3zpdRXMoSNbS Content-Type: multipart/mixed; boundary="P6HVEqyz4GHEQz3uca9XPfa6h6vjHqUJ1"; protected-headers="v1" From: Stefan Esser To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head Message-ID: <46d724c0-87b8-740c-777d-f699527ccb6e@freebsd.org> Subject: Re: svn commit: r367103 - head/usr.bin/calendar References: <202010281306.09SD6dgf040611@repo.freebsd.org> <784474fd-2f63-066c-eb86-cddfebd499cb@freebsd.org> In-Reply-To: --P6HVEqyz4GHEQz3uca9XPfa6h6vjHqUJ1 Content-Type: multipart/mixed; boundary="------------7BA8203B11C4851DE8BDD5E3" Content-Language: en-US This is a multi-part message in MIME format. --------------7BA8203B11C4851DE8BDD5E3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Am 28.10.20 um 14:34 schrieb Kyle Evans: > On Wed, Oct 28, 2020 at 8:24 AM Stefan Esser wrote: >> I'm thinking about support for nested conditionals and #else in >> calendar files, but I'm not sure about the possibility to MFC >> such a change and I do not want to invite users to create calendar >> files that work in -CURRENT but not in -STABLE. >=20 > Unsolicited $0.02: Do whatever you feel comfortable with. It's up to > people trying to use the new/advanced features to make sure it's > compatible with the calendar(1) that *they* are using, and I'm having > a hard time imagining folks using deploying additional calendar data > in ports outside of deskutils/calendar-data which you can curate for > stuff like that. I only read your reply after committing the change that allows for recursion. The issue reported by Julian H. Stacey on the freebsd-stable list made me check for the code that implements these conditions, and I noticed that there was no #ifdef (which he had tried to use), but it was trivial to implement. The man-page mentions that a restricted subset of CPP directives is supported, and ISTR that an earlier version of the calendar program actually forked CPP to pre-process the data files. This approach required a "traditional" CPP that ignored the content of the non-directives being processed, which is no longer available. In a way I'm removing some of the limitations that resulted from the switch to an internal parser for the conditions. If there is consensus not to introduce any new features into our calendar program, then I'm going to revert these changes. I had planned to give time for a discussion about a possible merge to -STABLE. I have already created a port of the calendar program as deskutils/calendar and was planning to upgrade the port to include these changes in -CURRENT. The port could be used to provide release users with these features, if they consider them useful. Since the changes are fully compatible with old data files, I do not think that a MFC was a violation of POLA. We do now have the calendar-data port for use in -CURRENT and it could be used to distribute calendar files that use the new features. Since old calendar programs will not look into the port's data file directory, they will continue to operate on files in the base system. If the calendar program from a port is used, it will support the features of this version and that all calendar files that take advantage of them. We might hide these new features by removal from the man-page or we could discourage their use by declaring them unportable extensions. Regards, STefan --------------7BA8203B11C4851DE8BDD5E3-- --P6HVEqyz4GHEQz3uca9XPfa6h6vjHqUJ1-- --SraZyjpp1MzbUeqQKnszS3zpdRXMoSNbS Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAl+ZiYsFAwAAAAAACgkQR+u171r99URN LQf+McspM8jkHIgY1mTVchJQQXfu2VL9hx9N3rQ1TAzFIskD9ZBydeUpJJ6lqdXLFel3RLvhwxGk BXilylVtFEkV+kwfaHYAlY0625AkBVNCdai96EG2s882ze1D8e85Si5BeXf6dUxBX9zy5gy972H8 VrFaYIoK5n69fwrRAGbQRwcg0fNi1iA4lftnk19fL9lVOGAUdh9fvkQi0fqBZgOvdPv3mizWUTdB c3t00ABk8QgqdY0R0h1TiiH/M5Uv1ngMYVtWoTIOyKFR/hM+cwnOAmTt5/csp0rrgHOCZPxzlHrZ VrHobkEOHKOnjZHcC9q0dlXdj23u6oUX3boTidhgGw== =96nR -----END PGP SIGNATURE----- --SraZyjpp1MzbUeqQKnszS3zpdRXMoSNbS-- From owner-svn-src-head@freebsd.org Wed Oct 28 15:33:39 2020 Return-Path: Delivered-To: svn-src-head@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 A90254498C3 for ; Wed, 28 Oct 2020 15:33:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLszl023hz4H61 for ; Wed, 28 Oct 2020 15:33:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x836.google.com with SMTP id i7so3821834qti.6 for ; Wed, 28 Oct 2020 08:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZxRtkF4flx2dY/owH+2w8R0tEfYw1Bu4yYajKn/KHc4=; b=VJD+K080jfp+8cPTV4iW2Aci4A516e8C4ian+IRARWS3hsMRCVpMFes5aC84qPgLOj qYeH+aUs/IxYilqg7cy4Ap+yizcppXrbJJ5CQKT8EWZX9wpETyAQC+IBpg1ICts0fnWI El4NrujnGy4Ri2Z84Zb7ZOtRiSVyQ5JcvabE+6N78UG4gdHwnoJ+6ABC7ArjwNKNMzKI IwInjszNJnpolj03Q5UgQqRSvol56zK3/TpF4xxKwgzlmL/jsyHg1PWrDQag/ls0xovn /kzevKRPeOW7no0uVW2r7vebh0JbONYQxs0UsrtlYMenmCUrPrP9KzHAbGXrIrFml8St ZjUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZxRtkF4flx2dY/owH+2w8R0tEfYw1Bu4yYajKn/KHc4=; b=NtbkFRbzwhrdeQ8W/iXiiXU1Pd4b+3Xq6Gm5zwlteS1ODP55fnWhz/Qade3XYEKyQd LW4guG/jIXMtLIN+oN+M/+KA6M3l+o/4HfSETQAhsU85YPR2ULu1e9CvFk0eQtlpIjO+ 7A/DTzRTx4UrcMr5CBt50+OX2EHwDHOKYDliaA52dgo4iYhkGMgHW/Zf9EBG8Scn7N7p GIxtYbVz04IM6mDmVEqFZ6oKPAaa8NIl+t1OjO+5MXjqOsvGcF+Qx2OST2v0FbccpEOB EWAwYwkxQ6nJvTwKQUlCiyIuLZC150wkDQ/mesOesB/Bex5AFWnVt7pan2J5ShCPyzVr a2tQ== X-Gm-Message-State: AOAM530AIW1pmM1LfZ8WzBwI2XQjMURBkfZvs5nJuWBIhAYnyw40MRfY SL86EBtNXrpxmGqoxqKHsjwwWdn3fUxLqyW9oStl0g== X-Google-Smtp-Source: ABdhPJxNgdePEIM6+ors0DAkFGqodLicU9DHJfNGZYjwlNHAOkm76AJXJD82hfz1WD9QiXCRWGU5RWBKAuUSqungvHM= X-Received: by 2002:aed:2f67:: with SMTP id l94mr7606503qtd.101.1603899217743; Wed, 28 Oct 2020 08:33:37 -0700 (PDT) MIME-Version: 1.0 References: <202010281306.09SD6dgf040611@repo.freebsd.org> <784474fd-2f63-066c-eb86-cddfebd499cb@freebsd.org> <46d724c0-87b8-740c-777d-f699527ccb6e@freebsd.org> In-Reply-To: <46d724c0-87b8-740c-777d-f699527ccb6e@freebsd.org> From: Warner Losh Date: Wed, 28 Oct 2020 09:33:26 -0600 Message-ID: Subject: Re: svn commit: r367103 - head/usr.bin/calendar To: Stefan Esser Cc: Kyle Evans , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4CLszl023hz4H61 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=VJD+K080; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::836) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.92 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.002]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.06)[0.060]; NEURAL_HAM_LONG(-0.98)[-0.975]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::836:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 15:33:39 -0000 On Wed, Oct 28, 2020 at 9:09 AM Stefan Esser wrote: > Am 28.10.20 um 14:34 schrieb Kyle Evans: > > On Wed, Oct 28, 2020 at 8:24 AM Stefan Esser wrote: > >> I'm thinking about support for nested conditionals and #else in > >> calendar files, but I'm not sure about the possibility to MFC > >> such a change and I do not want to invite users to create calendar > >> files that work in -CURRENT but not in -STABLE. > > > > Unsolicited $0.02: Do whatever you feel comfortable with. It's up to > > people trying to use the new/advanced features to make sure it's > > compatible with the calendar(1) that *they* are using, and I'm having > > a hard time imagining folks using deploying additional calendar data > > in ports outside of deskutils/calendar-data which you can curate for > > stuff like that. > > I only read your reply after committing the change that allows for > recursion. > > The issue reported by Julian H. Stacey on the freebsd-stable list > made me check for the code that implements these conditions, and > I noticed that there was no #ifdef (which he had tried to use), > but it was trivial to implement. > > The man-page mentions that a restricted subset of CPP directives > is supported, and ISTR that an earlier version of the calendar > program actually forked CPP to pre-process the data files. > > This approach required a "traditional" CPP that ignored the content > of the non-directives being processed, which is no longer available. > > In a way I'm removing some of the limitations that resulted from > the switch to an internal parser for the conditions. > > If there is consensus not to introduce any new features into our > calendar program, then I'm going to revert these changes. > > I had planned to give time for a discussion about a possible > merge to -STABLE. > > I have already created a port of the calendar program as > deskutils/calendar and was planning to upgrade the port to include > these changes in -CURRENT. > > The port could be used to provide release users with these features, > if they consider them useful. > > Since the changes are fully compatible with old data files, I do > not think that a MFC was a violation of POLA. > > We do now have the calendar-data port for use in -CURRENT and it > could be used to distribute calendar files that use the new features. > > Since old calendar programs will not look into the port's data file > directory, they will continue to operate on files in the base > system. > > If the calendar program from a port is used, it will support the > features of this version and that all calendar files that take > advantage of them. > > We might hide these new features by removal from the man-page or we > could discourage their use by declaring them unportable extensions. > Honestly, I think MFCing what we've committed to date and requiring calendar-data is fine. POLA isn't violated because you have to install a new port, especially when the program that 'fails' includes that in its failure message. It's the least bad solution, and calendar isn't a critical part of the infrastructure where we have to make herculean efforts to hide any changes. It beats the old files rotting in stable. Warner From owner-svn-src-head@freebsd.org Wed Oct 28 15:43:30 2020 Return-Path: Delivered-To: svn-src-head@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 290DC44A088; Wed, 28 Oct 2020 15:43:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLtC608wjz4HjS; Wed, 28 Oct 2020 15:43:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE04C1EA8A; Wed, 28 Oct 2020 15:43:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SFhT6K038901; Wed, 28 Oct 2020 15:43:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SFhTBp038899; Wed, 28 Oct 2020 15:43:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202010281543.09SFhTBp038899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 28 Oct 2020 15:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367109 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 367109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 15:43:30 -0000 Author: mav Date: Wed Oct 28 15:43:29 2020 New Revision: 367109 URL: https://svnweb.freebsd.org/changeset/base/367109 Log: Print NVMe controller capabilities in verbose dmesg. Those values are not reported in controller identification, while sometimes interesting for development and debugging. MFC after: 1 week Modified: head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Wed Oct 28 14:48:58 2020 (r367108) +++ head/sys/dev/nvme/nvme.h Wed Oct 28 15:43:29 2020 (r367109) @@ -98,12 +98,20 @@ #define NVME_CAP_HI_REG_CMBS_MASK (0x1) #define NVME_CAP_HI_DSTRD(x) \ (((x) >> NVME_CAP_HI_REG_DSTRD_SHIFT) & NVME_CAP_HI_REG_DSTRD_MASK) -#define NVME_CAP_HI_CSS_NVM(x) \ +#define NVME_CAP_HI_NSSRS(x) \ + (((x) >> NVME_CAP_HI_REG_NSSRS_SHIFT) & NVME_CAP_HI_REG_NSSRS_MASK) +#define NVME_CAP_HI_CSS(x) \ (((x) >> NVME_CAP_HI_REG_CSS_NVM_SHIFT) & NVME_CAP_HI_REG_CSS_NVM_MASK) +#define NVME_CAP_HI_BPS(x) \ + (((x) >> NVME_CAP_HI_REG_BPS_SHIFT) & NVME_CAP_HI_REG_BPS_MASK) #define NVME_CAP_HI_MPSMIN(x) \ (((x) >> NVME_CAP_HI_REG_MPSMIN_SHIFT) & NVME_CAP_HI_REG_MPSMIN_MASK) #define NVME_CAP_HI_MPSMAX(x) \ (((x) >> NVME_CAP_HI_REG_MPSMAX_SHIFT) & NVME_CAP_HI_REG_MPSMAX_MASK) +#define NVME_CAP_HI_PMRS(x) \ + (((x) >> NVME_CAP_HI_REG_PMRS_SHIFT) & NVME_CAP_HI_REG_PMRS_MASK) +#define NVME_CAP_HI_CMBS(x) \ + (((x) >> NVME_CAP_HI_REG_CMBS_SHIFT) & NVME_CAP_HI_REG_CMBS_MASK) #define NVME_CC_REG_EN_SHIFT (0) #define NVME_CC_REG_EN_MASK (0x1) Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Wed Oct 28 14:48:58 2020 (r367108) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed Oct 28 15:43:29 2020 (r367109) @@ -1365,7 +1365,7 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, de struct make_dev_args md_args; uint32_t cap_lo; uint32_t cap_hi; - uint32_t to; + uint32_t to, vs; uint8_t mpsmin; int status, timeout_period; @@ -1375,14 +1375,41 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, de if (bus_get_domain(dev, &ctrlr->domain) != 0) ctrlr->domain = 0; + cap_lo = nvme_mmio_read_4(ctrlr, cap_lo); + if (bootverbose) { + device_printf(dev, "CapLo: 0x%08x: MQES %u%s%s%s%s, TO %u\n", + cap_lo, NVME_CAP_LO_MQES(cap_lo), + NVME_CAP_LO_CQR(cap_lo) ? ", CQR" : "", + NVME_CAP_LO_AMS(cap_lo) ? ", AMS" : "", + (NVME_CAP_LO_AMS(cap_lo) & 0x1) ? " WRRwUPC" : "", + (NVME_CAP_LO_AMS(cap_lo) & 0x2) ? " VS" : "", + NVME_CAP_LO_TO(cap_lo)); + } cap_hi = nvme_mmio_read_4(ctrlr, cap_hi); + if (bootverbose) { + device_printf(dev, "CapHi: 0x%08x: DSTRD %u%s, CSS %x%s, " + "MPSMIN %u, MPSMAX %u %s%s\n", cap_hi, + NVME_CAP_HI_DSTRD(cap_hi), + NVME_CAP_HI_NSSRS(cap_lo) ? ", NSSRS" : "", + NVME_CAP_HI_CSS(cap_hi), + NVME_CAP_HI_BPS(cap_lo) ? ", BPS" : "", + NVME_CAP_HI_MPSMIN(cap_hi), + NVME_CAP_HI_MPSMAX(cap_hi), + NVME_CAP_HI_PMRS(cap_lo) ? ", PMRS" : "", + NVME_CAP_HI_CMBS(cap_lo) ? ", CMBS" : ""); + } + if (bootverbose) { + vs = nvme_mmio_read_4(ctrlr, vs); + device_printf(dev, "Version: 0x%08x: %d.%d\n", vs, + NVME_MAJOR(vs), NVME_MINOR(vs)); + } + ctrlr->dstrd = NVME_CAP_HI_DSTRD(cap_hi) + 2; mpsmin = NVME_CAP_HI_MPSMIN(cap_hi); ctrlr->min_page_size = 1 << (12 + mpsmin); /* Get ready timeout value from controller, in units of 500ms. */ - cap_lo = nvme_mmio_read_4(ctrlr, cap_lo); to = NVME_CAP_LO_TO(cap_lo) + 1; ctrlr->ready_timeout_in_ms = to * 500; From owner-svn-src-head@freebsd.org Wed Oct 28 16:54:38 2020 Return-Path: Delivered-To: svn-src-head@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 97B6744B3BB; Wed, 28 Oct 2020 16:54:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLvnB3W09z4LJk; Wed, 28 Oct 2020 16:54:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C42F1F713; Wed, 28 Oct 2020 16:54:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SGscg1081704; Wed, 28 Oct 2020 16:54:38 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SGscNB081703; Wed, 28 Oct 2020 16:54:38 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202010281654.09SGscNB081703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 28 Oct 2020 16:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367110 - head/usr.bin/man X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/man X-SVN-Commit-Revision: 367110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 16:54:38 -0000 Author: 0mp (doc,ports committer) Date: Wed Oct 28 16:54:37 2020 New Revision: 367110 URL: https://svnweb.freebsd.org/changeset/base/367110 Log: Update the list of searched manual sections after r367013 Modified: head/usr.bin/man/man.1 Modified: head/usr.bin/man/man.1 ============================================================================== --- head/usr.bin/man/man.1 Wed Oct 28 15:43:29 2020 (r367109) +++ head/usr.bin/man/man.1 Wed Oct 28 16:54:37 2020 (r367110) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 8, 2018 +.Dd October 28, 2020 .Dt MAN 1 .Os .Sh NAME @@ -115,7 +115,7 @@ environment variable. .It Fl S Ar mansect Restricts manual sections searched to the specified colon delimited list. Defaults to -.Dq Li 1:8:2:3:n:4:5:6:7:9:l . +.Dq Li 1:8:2:3:3lua:n:4:5:6:7:9:l . Overrides the .Ev MANSECT environment variable. From owner-svn-src-head@freebsd.org Wed Oct 28 17:28:49 2020 Return-Path: Delivered-To: svn-src-head@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 D3F6044C40E; Wed, 28 Oct 2020 17:28:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLwXd5JzMz4NNf; Wed, 28 Oct 2020 17:28:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F8A41F878; Wed, 28 Oct 2020 17:28:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SHSnAr002224; Wed, 28 Oct 2020 17:28:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SHSmPc002222; Wed, 28 Oct 2020 17:28:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202010281728.09SHSmPc002222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 28 Oct 2020 17:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367112 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 367112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 17:28:49 -0000 Author: mav Date: Wed Oct 28 17:28:48 2020 New Revision: 367112 URL: https://svnweb.freebsd.org/changeset/base/367112 Log: Use proper variable for device path. It seems *-passthru commands were broken from the day one, since the device path is fetched into opt.dev variable and not left in argv[optind]. The other three wrong argv[optind] instances are just in error messages. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sbin/nvmecontrol/ns.c head/sbin/nvmecontrol/passthru.c head/sbin/nvmecontrol/reset.c Modified: head/sbin/nvmecontrol/ns.c ============================================================================== --- head/sbin/nvmecontrol/ns.c Wed Oct 28 17:03:03 2020 (r367111) +++ head/sbin/nvmecontrol/ns.c Wed Oct 28 17:28:48 2020 (r367112) @@ -605,7 +605,7 @@ nscreate(const struct cmd *f, int argc, char *argv[]) pt.len = sizeof(struct nvme_namespace_data); pt.is_read = 0; /* passthrough writes data to ctrlr */ if ((result = ioctl(fd, NVME_PASSTHROUGH_CMD, &pt)) < 0) - errx(1, "ioctl request to %s failed: %d", argv[optind], result); + errx(1, "ioctl request to %s failed: %d", create_opt.dev, result); if (nvme_completion_is_error(&pt.cpl)) { errx(1, "namespace creation failed: %s", @@ -822,7 +822,7 @@ nsdetach(const struct cmd *f, int argc, char *argv[]) pt.len = sizeof(clist); if ((result = ioctl(fd, NVME_PASSTHROUGH_CMD, &pt)) < 0) - errx(1, "ioctl request to %s failed: %d", argv[optind], result); + errx(1, "ioctl request to %s failed: %d", detach_opt.dev, result); if (nvme_completion_is_error(&pt.cpl)) { errx(1, "namespace detach failed: %s", Modified: head/sbin/nvmecontrol/passthru.c ============================================================================== --- head/sbin/nvmecontrol/passthru.c Wed Oct 28 17:03:03 2020 (r367111) +++ head/sbin/nvmecontrol/passthru.c Wed Oct 28 17:28:48 2020 (r367112) @@ -164,7 +164,7 @@ passthru(const struct cmd *f, int argc, char *argv[]) if (arg_parse(argc, argv, f)) return; - open_dev(argv[optind], &fd, 1, 1); + open_dev(opt.dev, &fd, 1, 1); if (opt.read && opt.write) errx(1, "need exactly one of --read or --write"); Modified: head/sbin/nvmecontrol/reset.c ============================================================================== --- head/sbin/nvmecontrol/reset.c Wed Oct 28 17:03:03 2020 (r367111) +++ head/sbin/nvmecontrol/reset.c Wed Oct 28 17:28:48 2020 (r367112) @@ -70,7 +70,7 @@ reset(const struct cmd *f, int argc, char *argv[]) free(path); if (ioctl(fd, NVME_RESET_CONTROLLER) < 0) - err(1, "reset request to %s failed", argv[optind]); + err(1, "reset request to %s failed", opt.dev); exit(0); } From owner-svn-src-head@freebsd.org Wed Oct 28 18:22:26 2020 Return-Path: Delivered-To: svn-src-head@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 1793F44D2E9; Wed, 28 Oct 2020 18:22:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CLxkT6ymrz4R8R; Wed, 28 Oct 2020 18:22:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3C932069C; Wed, 28 Oct 2020 18:22:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SIMPpv038203; Wed, 28 Oct 2020 18:22:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SIMPfH038202; Wed, 28 Oct 2020 18:22:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202010281822.09SIMPfH038202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 28 Oct 2020 18:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367113 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 367113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 18:22:26 -0000 Author: mav Date: Wed Oct 28 18:22:25 2020 New Revision: 367113 URL: https://svnweb.freebsd.org/changeset/base/367113 Log: Fix unintentional constant rename in r367109. MFC after: 1 week Modified: head/sys/dev/nvme/nvme.h Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Wed Oct 28 17:28:48 2020 (r367112) +++ head/sys/dev/nvme/nvme.h Wed Oct 28 18:22:25 2020 (r367113) @@ -84,6 +84,8 @@ #define NVME_CAP_HI_REG_DSTRD_MASK (0xF) #define NVME_CAP_HI_REG_NSSRS_SHIFT (4) #define NVME_CAP_HI_REG_NSSRS_MASK (0x1) +#define NVME_CAP_HI_REG_CSS_SHIFT (5) +#define NVME_CAP_HI_REG_CSS_MASK (0xff) #define NVME_CAP_HI_REG_CSS_NVM_SHIFT (5) #define NVME_CAP_HI_REG_CSS_NVM_MASK (0x1) #define NVME_CAP_HI_REG_BPS_SHIFT (13) @@ -101,6 +103,8 @@ #define NVME_CAP_HI_NSSRS(x) \ (((x) >> NVME_CAP_HI_REG_NSSRS_SHIFT) & NVME_CAP_HI_REG_NSSRS_MASK) #define NVME_CAP_HI_CSS(x) \ + (((x) >> NVME_CAP_HI_REG_CSS_SHIFT) & NVME_CAP_HI_REG_CSS_MASK) +#define NVME_CAP_HI_CSS_NVM(x) \ (((x) >> NVME_CAP_HI_REG_CSS_NVM_SHIFT) & NVME_CAP_HI_REG_CSS_NVM_MASK) #define NVME_CAP_HI_BPS(x) \ (((x) >> NVME_CAP_HI_REG_BPS_SHIFT) & NVME_CAP_HI_REG_BPS_MASK) From owner-svn-src-head@freebsd.org Wed Oct 28 20:22:21 2020 Return-Path: Delivered-To: svn-src-head@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 A42D244F5F5; Wed, 28 Oct 2020 20:22:21 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM0Ns3z2Rz4XjR; Wed, 28 Oct 2020 20:22:21 +0000 (UTC) (envelope-from melifaro@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 5190E21D9E; Wed, 28 Oct 2020 20:22:21 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SKMLwj012286; Wed, 28 Oct 2020 20:22:21 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SKMLGG012285; Wed, 28 Oct 2020 20:22:21 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202010282022.09SKMLGG012285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 28 Oct 2020 20:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367114 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 367114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 20:22:21 -0000 Author: melifaro Date: Wed Oct 28 20:22:20 2020 New Revision: 367114 URL: https://svnweb.freebsd.org/changeset/base/367114 Log: Fix use-after-free in icmp6_notify_error(). Reported by: Maxime Villard Reviewed by: markj MFC after: 3 days Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Wed Oct 28 18:22:25 2020 (r367113) +++ head/sys/netinet6/icmp6.c Wed Oct 28 20:22:20 2020 (r367114) @@ -917,6 +917,7 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp } icmp6 = (struct icmp6_hdr *)(mtod(m, caddr_t) + off); eip6 = (struct ip6_hdr *)(icmp6 + 1); + bzero(&icmp6dst, sizeof(icmp6dst)); /* Detect the upper level protocol */ { @@ -925,7 +926,6 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp int eoff = off + sizeof(struct icmp6_hdr) + sizeof(struct ip6_hdr); struct ip6ctlparam ip6cp; - struct in6_addr *finaldst = NULL; int icmp6type = icmp6->icmp6_type; struct ip6_frag *fh; struct ip6_rthdr *rth; @@ -999,10 +999,11 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp } rth0 = (struct ip6_rthdr0 *) (mtod(m, caddr_t) + eoff); + /* just ignore a bogus header */ if ((rth0->ip6r0_len % 2) == 0 && (hops = rth0->ip6r0_len/2)) - finaldst = (struct in6_addr *)(rth0 + 1) + (hops - 1); + icmp6dst.sin6_addr = *((struct in6_addr *)(rth0 + 1) + (hops - 1)); } eoff += rthlen; nxt = rth->ip6r_nxt; @@ -1056,13 +1057,10 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp */ eip6 = (struct ip6_hdr *)(icmp6 + 1); - bzero(&icmp6dst, sizeof(icmp6dst)); icmp6dst.sin6_len = sizeof(struct sockaddr_in6); icmp6dst.sin6_family = AF_INET6; - if (finaldst == NULL) + if (IN6_IS_ADDR_UNSPECIFIED(&icmp6dst.sin6_addr)) icmp6dst.sin6_addr = eip6->ip6_dst; - else - icmp6dst.sin6_addr = *finaldst; if (in6_setscope(&icmp6dst.sin6_addr, m->m_pkthdr.rcvif, NULL)) goto freeit; bzero(&icmp6src, sizeof(icmp6src)); @@ -1074,13 +1072,11 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp icmp6src.sin6_flowinfo = (eip6->ip6_flow & IPV6_FLOWLABEL_MASK); - if (finaldst == NULL) - finaldst = &eip6->ip6_dst; ip6cp.ip6c_m = m; ip6cp.ip6c_icmp6 = icmp6; ip6cp.ip6c_ip6 = (struct ip6_hdr *)(icmp6 + 1); ip6cp.ip6c_off = eoff; - ip6cp.ip6c_finaldst = finaldst; + ip6cp.ip6c_finaldst = &icmp6dst.sin6_addr; ip6cp.ip6c_src = &icmp6src; ip6cp.ip6c_nxt = nxt; From owner-svn-src-head@freebsd.org Wed Oct 28 20:48:15 2020 Return-Path: Delivered-To: svn-src-head@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 CB83244F9FF for ; Wed, 28 Oct 2020 20:48:15 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM0yk6l9Zz4YfP for ; Wed, 28 Oct 2020 20:48:14 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-il1-x134.google.com with SMTP id y17so849172ilg.4 for ; Wed, 28 Oct 2020 13:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=HpcIvfNdCPKCE5UxG7q9PqVF0/mw/2c6bQIBJ4Llb5A=; b=Kp+s5Vsz0moDv0Id67gy254CR9CDI9haBbmeaeoIkuzOAmlIeIQFVF7C9eblBy1nGN vIKtfN+v8c648hfv+GdMyABH+6IMZMb+KUE3IslgCqDCcnxYc8P/uxn6tSz5SGnrqusa 51uJ7udCc5d/0yrr8vCaoNAI6N+d/NXCW7SRyihGjB3LUPZRN+j29vK0NQ8ySWfbQ1Fk 5pqpHslsmkyxrh5XfrkDztZFX84PWHCizFMCScQSMClC6bkmLg6Omkqebzi8PuE53NK7 jMsfvf8CUs82TokbO6s3e0DxO2OG4uqPje1vs6wSuvLeAkFm25aj1934VXrObMWbJpr3 LVJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=HpcIvfNdCPKCE5UxG7q9PqVF0/mw/2c6bQIBJ4Llb5A=; b=jRwErdV9ikQXeEm8qnibZhXCPXEKnRMMTJjkOcwLcsG/v7l4ftSOiuTnp/0XBer28X TtDRb7WYO/TF2fixJSS2bERdsXFH4QVGVnxX3NBSwSiyNDKstUKXQ96DXU5BYcAfU4sy H9uHPAAnGnnZ9oafm6LSwwW+W0wEwirCE1jIv9YqnftIdEVEveH5TqNxEJ3rQKnITTQh ReFpRqvHAnLdRYucxyv3z9pMfqCfXCacBY9GXSdvuINOwlHndaASNiLgTMsR/BpJzKtZ Mxj4Ks30SdsMR7mXPp0TPSPoPGxsVsOh2ESdVKQXC7uEKCnmJTItmu7aje+3Gas5TKol 2Liw== X-Gm-Message-State: AOAM532raXgSqYven+5Kj9MMOhQ7hX5UG/SH3k4P2pFf6CVcU1fZ7oZM gv7rqg8ZJ8nYZa6Xl3MHIErI7A== X-Google-Smtp-Source: ABdhPJwQ2RsQt6fwaLnEPCN0kbdDJlXwtGFIhywu5stXF/SKyuOsp8T1CK7lGd3u6ul5aeB2j9qXkw== X-Received: by 2002:a05:6e02:ea8:: with SMTP id u8mr690077ilj.305.1603918093886; Wed, 28 Oct 2020 13:48:13 -0700 (PDT) Received: from mutt-hbsd (pool-100-16-222-53.bltmmd.fios.verizon.net. [100.16.222.53]) by smtp.gmail.com with ESMTPSA id s85sm500417ilk.41.2020.10.28.13.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 13:48:13 -0700 (PDT) Date: Wed, 28 Oct 2020 16:48:12 -0400 From: Shawn Webb To: "Alexander V. Chernikov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367114 - head/sys/netinet6 Message-ID: <20201028204812.qmlmn32plyxwob6q@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA References: <202010282022.09SKMLGG012285@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="htxitcpath4kpir6" Content-Disposition: inline In-Reply-To: <202010282022.09SKMLGG012285@repo.freebsd.org> X-Rspamd-Queue-Id: 4CM0yk6l9Zz4YfP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=Kp+s5Vsz; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::134 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [-4.47 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-1.01)[-1.006]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; NEURAL_HAM_LONG(-1.01)[-1.014]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; NEURAL_HAM_SHORT(-0.35)[-0.352]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::134:from]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; RECEIVED_SPAMHAUS_PBL(0.00)[100.16.222.53:received] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 20:48:15 -0000 --htxitcpath4kpir6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 28, 2020 at 08:22:21PM +0000, Alexander V. Chernikov wrote: > Author: melifaro > Date: Wed Oct 28 20:22:20 2020 > New Revision: 367114 > URL: https://svnweb.freebsd.org/changeset/base/367114 >=20 > Log: > Fix use-after-free in icmp6_notify_error(). > =20 > Reported by: Maxime Villard > Reviewed by: markj > MFC after: 3 days Does this need a CVE? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Sha= wn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --htxitcpath4kpir6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAl+Z2QkACgkQ/y5nonf4 4fpzbg//SjiDo3jK9o8lsvyqQdPmDjWLlv5gFhwDbZcRrLIDNMdoNHOSQLcj/T8g kL09VZ0jr7JpYflE27/Wc3SMeSxiVu2jCUCivPjwadEfsoOFtu9zP+LhvMwapmuv Ubdua9ss3WPj4yp6+QIFWvjwPMhJ+cdLgLK4SUX87wGrxSMC6BNiZ8/IOXgRwEFb uoyusuv8WVFQfCDJh/V8FuP2ajuYVrK0hYHlO5/ZTEyVpNqu1uTVO2qSghco67Jm 1vI6EoSj/zcUx8cGZRwoGJUcr+uQUUliw6hTLLbqrzdNLe0idMmfdmHC4PcaXunA IqYewa5uHidPokruH4aZonsoTRKPSYQbv2cEAsqlwI82X5GKAaDinLeh7QMtDrK5 RYl94l5Slhz2MGAHjYjP+MYuZ1Pao2A+v/bIS3s1WWRJTt649OfwYL2nK1VXXkqz vLtn18X4qWNMKNEQkOMeB6D1P36d2t79+ntL1vNSm3DiAfcNYfE4LDSGVSMvOxPE M+2aMZ4NxnMtncKCID6ZH0SQUgRZ9M0hbk/2cNQTZglbd5f0Fw1pkH7DLbmrIim8 xWOJOVfD8caYtljPN/D/tYQHCoHIDNDK2alDtCBVWbQG/6PqRF7WIFEUh+jBHf5P BUQqB3q8SPbMJAWU4v1csBy1E4uQu5NAcwd8v5qhCqkeNYqaoHE= =PsGo -----END PGP SIGNATURE----- --htxitcpath4kpir6-- From owner-svn-src-head@freebsd.org Wed Oct 28 21:06:18 2020 Return-Path: Delivered-To: svn-src-head@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 54213450881; Wed, 28 Oct 2020 21:06:18 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM1MZ1XNWz4b1t; Wed, 28 Oct 2020 21:06:18 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1399F224EC; Wed, 28 Oct 2020 21:06:18 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SL6HBX036816; Wed, 28 Oct 2020 21:06:17 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SL6HmM036815; Wed, 28 Oct 2020 21:06:17 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202010282106.09SL6HmM036815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 28 Oct 2020 21:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367117 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 367117 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 21:06:18 -0000 Author: vmaffione Date: Wed Oct 28 21:06:17 2020 New Revision: 367117 URL: https://svnweb.freebsd.org/changeset/base/367117 Log: iflib: fix typo bug introduced by r367093 Code was supposed to call callout_reset_sbt_on() rather than callout_reset_sbt(). This resulted into passing a "cpu" value to a "flag" argument. A recipe for subtle errors. PR: 248652 Reported by: sg@efficientip.com MFC with: r367093 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Oct 28 21:02:43 2020 (r367116) +++ head/sys/net/iflib.c Wed Oct 28 21:06:17 2020 (r367117) @@ -1066,9 +1066,10 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl if (!(ctx->ifc_flags & IFC_NETMAP_TX_IRQ)) if (kring->nr_hwtail != nm_prev(kring->nr_hwcur, lim)) { - callout_reset_sbt(&txq->ift_netmap_timer, + callout_reset_sbt_on(&txq->ift_netmap_timer, NETMAP_TX_TIMER_US * SBT_1US, SBT_1US, - iflib_netmap_timer, txq, txq->ift_netmap_timer.c_cpu); + iflib_netmap_timer, txq, + txq->ift_netmap_timer.c_cpu, 0); } return (0); } From owner-svn-src-head@freebsd.org Wed Oct 28 21:09:57 2020 Return-Path: Delivered-To: svn-src-head@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 8652845055F; Wed, 28 Oct 2020 21:09:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM1Rn2zzVz4b87; Wed, 28 Oct 2020 21:09:57 +0000 (UTC) (envelope-from imp@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 45A5822276; Wed, 28 Oct 2020 21:09:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SL9vQE037161; Wed, 28 Oct 2020 21:09:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SL9voh037160; Wed, 28 Oct 2020 21:09:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202010282109.09SL9voh037160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 28 Oct 2020 21:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367118 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 367118 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 21:09:57 -0000 Author: imp Date: Wed Oct 28 21:09:56 2020 New Revision: 367118 URL: https://svnweb.freebsd.org/changeset/base/367118 Log: Note that sys/systm.h is special too If you need / want to includerd sys/systm.h, it has to be just after param.h/types.h. Document this existing practice. Not all kernel files include systm.h, but when you do, it should be done out of order. Reviewed by: vangyzen, kib, emaste Differential Review: https://reviews.freebsd.org/D26981 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Wed Oct 28 21:06:17 2020 (r367117) +++ head/share/man/man9/style.9 Wed Oct 28 21:09:56 2020 (r367118) @@ -25,7 +25,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd July 16, 2020 +.Dd October 28, 2020 .Dt STYLE 9 .Os .Sh NAME @@ -156,9 +156,13 @@ includes .In sys/types.h ; do not include both. .Pc +Next, include +.In sys/systm.h , +if needed. The remaining kernel headers should be sorted alphabetically. .Bd -literal #include /* Non-local includes in angle brackets. */ +#include #include #include #include From owner-svn-src-head@freebsd.org Wed Oct 28 21:18:04 2020 Return-Path: Delivered-To: svn-src-head@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 D9F65450C8B; Wed, 28 Oct 2020 21:18:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM1d85Pbwz4bsh; Wed, 28 Oct 2020 21:18:04 +0000 (UTC) (envelope-from imp@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 9CC0022981; Wed, 28 Oct 2020 21:18:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SLI4Lj043577; Wed, 28 Oct 2020 21:18:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SLI4uj043576; Wed, 28 Oct 2020 21:18:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202010282118.09SLI4uj043576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 28 Oct 2020 21:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367119 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 367119 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 21:18:04 -0000 Author: imp Date: Wed Oct 28 21:18:04 2020 New Revision: 367119 URL: https://svnweb.freebsd.org/changeset/base/367119 Log: loader: add aarch64 support for zstd We don't have NEON available in the boot loader, so we have to disable it. OpenZFS included ZSTD which used the wrong symbol to bring in neon support. Change to use the code that's been submitted upstream as a pull request to both. __ARM_NEON is the proper symbol, defined in ARM C Language Extensions Release 2.1 (https://developer.arm.com/documentation/ihi0053/d/). Some sources suggest __ARM_NEON__, but that's the obsolete spelling from prior versions of the standard. OpenZFS Pull Request: https://github.com/openzfs/zfs/pull/11055 ZSTD Pull Request: https://github.com/facebook/zstd/pull/2356 Modified: head/stand/libsa/zfs/Makefile.inc Modified: head/stand/libsa/zfs/Makefile.inc ============================================================================== --- head/stand/libsa/zfs/Makefile.inc Wed Oct 28 21:09:56 2020 (r367118) +++ head/stand/libsa/zfs/Makefile.inc Wed Oct 28 21:18:04 2020 (r367119) @@ -5,10 +5,8 @@ .PATH: ${ZFSOSSRC}/spl .PATH: ${OZFS}/module/zstd/lib ZFSSRC= zfs.c nvlist.c skein.c skein_block.c list.c -.if ${MACHINE_ARCH} != aarch64 ZFSSRC+= zstd_shim.c zstd.c CFLAGS+= -DHAS_ZSTD_ZFS -.endif SRCS+= ${ZFSSRC} CFLAGS+= -I${LDRSRC} From owner-svn-src-head@freebsd.org Wed Oct 28 21:24:07 2020 Return-Path: Delivered-To: svn-src-head@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 6F4DA450F81 for ; Wed, 28 Oct 2020 21:24:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM1m62RNrz4cMT for ; Wed, 28 Oct 2020 21:24:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82c.google.com with SMTP id h12so595871qtc.9 for ; Wed, 28 Oct 2020 14:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6uWUSmEuceWdWSEvZCN62HyJVi0c4ICA+HU+2D0LGj0=; b=Ta/qbGWgsV1ce3gdtWhHONcQq2CiTCw2ZmrSvvJ0LPElaqeGXItQZkJVK55v/n0fbb RNM8yDFn33JeHgxiXPnmrZrMlY5c1ZxelwNnyN2UC9JBBEaRHktYQMM2TGtU1oKrh8LK gGV/2qwwNhRucJR/Zp09o9ZcTN9vxb9j4loGIZxxSw2iCZ9uXKdD7vUG+A96NYuQ+N0Q SAWAO75/CQxQ7Ob9ePdZh+z9clguLukRyV9f30GKZtlnNdSOf5yfKSIFyeGt075GXWxD uARuMPfN/IOvnaX5U+4rtO57Vvm/C0xUi3RV6I1jvu9kcr19NcdFdBzneBGVJPbI/CoZ PIYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6uWUSmEuceWdWSEvZCN62HyJVi0c4ICA+HU+2D0LGj0=; b=ZMWpUXBdQRZPftP2ihl21eCQSq+i2JRX52vVaHXVF40zJjyMtv5M27zBM0pTDYjg9h wihsRPsXKDbiX10gUooWPw78beez2n2a1y3Pmn9LzIm2n6iI9Zecs3VicVxyJ9rAibbU XF/rUe/6y22m82kDXltr7s7s1VJbi3t2uEvFWslZW0s2bz14fFBe6yRZ/kD4LIocmRaf P8FwvupjdsIEQqg2DdHkyeW4awpmzmaYTYmBZtlzQ6rx/RlVdu7lFyxvlJmAp334bcUz AAx/zUGhlvmIL4EHTmHaflc9LpqGQz3wSxoe9KQLuZVV8nKEvPeyMEjOtmhZOdYsUJ5L FubQ== X-Gm-Message-State: AOAM532JAppDHYAStYsm3sAiUQXvu6uu+y1HtW7We/MbbMU9jUuiBjof mp7tHLlrriREaSlTzeBNe7X3ZnTU7Dy3GkxiqHAqMw== X-Google-Smtp-Source: ABdhPJynzp009YLIVziARphsn9ueCtPy5V0u9qBUZ2UWnqsBJiYejq7Nl2pePgqOVBw3W0F0w/ga5BWJoVuR93ytxww= X-Received: by 2002:a05:622a:10b:: with SMTP id u11mr837924qtw.235.1603920245202; Wed, 28 Oct 2020 14:24:05 -0700 (PDT) MIME-Version: 1.0 References: <202010282118.09SLI4uj043576@repo.freebsd.org> In-Reply-To: <202010282118.09SLI4uj043576@repo.freebsd.org> From: Warner Losh Date: Wed, 28 Oct 2020 15:23:54 -0600 Message-ID: Subject: Re: svn commit: r367119 - head/stand/libsa/zfs To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4CM1m62RNrz4cMT X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=Ta/qbGWg; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::82c) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.62 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.002]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.36)[0.362]; NEURAL_HAM_LONG(-0.98)[-0.984]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82c:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 21:24:07 -0000 This looks like it is missing something, but it isn't. I should have updated the commit message to say that it's just the makefile part of this since these commits were in upstream when it was last brought in. So it looks like things are missing but they are already in the tree... Warner On Wed, Oct 28, 2020 at 3:18 PM Warner Losh wrote: > Author: imp > Date: Wed Oct 28 21:18:04 2020 > New Revision: 367119 > URL: https://svnweb.freebsd.org/changeset/base/367119 > > Log: > loader: add aarch64 support for zstd > > We don't have NEON available in the boot loader, so we have to disable > it. OpenZFS included ZSTD which used the wrong symbol to bring in neon > support. Change to use the code that's been submitted upstream as a > pull request to both. > > __ARM_NEON is the proper symbol, defined in ARM C Language Extensions > Release 2.1 (https://developer.arm.com/documentation/ihi0053/d/). Some > sources suggest __ARM_NEON__, but that's the obsolete spelling from > prior versions of the standard. > > OpenZFS Pull Request: https://github.com/openzfs/zfs/pull/11055 > ZSTD Pull Request: https://github.com/facebook/zstd/pull/2356 > > Modified: > head/stand/libsa/zfs/Makefile.inc > > Modified: head/stand/libsa/zfs/Makefile.inc > > ============================================================================== > --- head/stand/libsa/zfs/Makefile.inc Wed Oct 28 21:09:56 2020 > (r367118) > +++ head/stand/libsa/zfs/Makefile.inc Wed Oct 28 21:18:04 2020 > (r367119) > @@ -5,10 +5,8 @@ > .PATH: ${ZFSOSSRC}/spl > .PATH: ${OZFS}/module/zstd/lib > ZFSSRC= zfs.c nvlist.c skein.c skein_block.c list.c > -.if ${MACHINE_ARCH} != aarch64 > ZFSSRC+= zstd_shim.c zstd.c > CFLAGS+= -DHAS_ZSTD_ZFS > -.endif > SRCS+= ${ZFSSRC} > > CFLAGS+= -I${LDRSRC} > From owner-svn-src-head@freebsd.org Wed Oct 28 22:12:47 2020 Return-Path: Delivered-To: svn-src-head@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 B682C451833; Wed, 28 Oct 2020 22:12:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM2rH4RPyz4dvF; Wed, 28 Oct 2020 22:12:47 +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 7B885231B5; Wed, 28 Oct 2020 22:12:47 +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 09SMClPB080205; Wed, 28 Oct 2020 22:12:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SMClWb080204; Wed, 28 Oct 2020 22:12:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202010282212.09SMClWb080204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Oct 2020 22:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367120 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 367120 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 22:12:47 -0000 Author: kib Date: Wed Oct 28 22:12:47 2020 New Revision: 367120 URL: https://svnweb.freebsd.org/changeset/base/367120 Log: Check for process group change in tty_wait_background(). The calling process's process group can change between PROC_UNLOCK(p) and PGRP_LOCK(pg) in tty_wait_background(), e.g. by a setpgid() call from another process. If that happens, the signal is not sent to the calling process, even if the prior checks determine that one should be sent. Re-check that the process group hasn't changed after acquiring the pgrp lock, and if it has, redo the checks. PR: 250701 Submitted by: Jakub Piecuch MFC after: 2 weeks Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Wed Oct 28 21:18:04 2020 (r367119) +++ head/sys/kern/tty.c Wed Oct 28 22:12:47 2020 (r367120) @@ -474,6 +474,19 @@ tty_wait_background(struct tty *tp, struct thread *td, sig = 0; } PGRP_LOCK(pg); + + /* + * pg may no longer be our process group. + * Re-check after locking process group. + */ + PROC_LOCK(p); + if (p->p_pgrp != pg) { + PROC_UNLOCK(p); + PGRP_UNLOCK(pg); + continue; + } + + PROC_UNLOCK(p); pgsignal(pg, ksi.ksi_signo, 1, &ksi); PGRP_UNLOCK(pg); From owner-svn-src-head@freebsd.org Wed Oct 28 23:10:55 2020 Return-Path: Delivered-To: svn-src-head@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 59B6F452390; Wed, 28 Oct 2020 23:10:55 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM47M1n8Cz3SXK; Wed, 28 Oct 2020 23:10:55 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21FEF23C90; Wed, 28 Oct 2020 23:10:55 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09SNAtSN013322; Wed, 28 Oct 2020 23:10:55 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09SNAtCQ013321; Wed, 28 Oct 2020 23:10:55 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202010282310.09SNAtCQ013321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 28 Oct 2020 23:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367121 - head/lib/libc/tests/ssp X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/lib/libc/tests/ssp X-SVN-Commit-Revision: 367121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 23:10:55 -0000 Author: brooks Date: Wed Oct 28 23:10:54 2020 New Revision: 367121 URL: https://svnweb.freebsd.org/changeset/base/367121 Log: Disable ssp raw test without ASAN r366981 disabled ASAN when it might not be reliable (with an external compiler), but this test is broken without ASAN so disable it completely in that case. PR: 250706 Reviewed by: emaste, lwhsu Differential Revision: https://reviews.freebsd.org/D26982 Modified: head/lib/libc/tests/ssp/Makefile Modified: head/lib/libc/tests/ssp/Makefile ============================================================================== --- head/lib/libc/tests/ssp/Makefile Wed Oct 28 22:12:47 2020 (r367120) +++ head/lib/libc/tests/ssp/Makefile Wed Oct 28 23:10:54 2020 (r367121) @@ -33,7 +33,7 @@ PROGS+= h_memset # probably needs to be fixed as it's currently hardcoded. # # sanitizer is not tested or supported for ARM right now. sbruno -.if ${COMPILER_TYPE} == "clang" && !defined(_SKIP_BUILD) && \ +.if ${COMPILER_TYPE} == "clang" && ${CC} == "cc" && !defined(_SKIP_BUILD) && \ (!defined(_RECURSING_PROGS) || ${PROG} == "h_raw") .if !defined(_CLANG_RESOURCE_DIR) _CLANG_RESOURCE_DIR!= ${CC:N${CCACHE_BIN}} -print-resource-dir From owner-svn-src-head@freebsd.org Thu Oct 29 00:03:20 2020 Return-Path: Delivered-To: svn-src-head@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 8815F452F30; Thu, 29 Oct 2020 00:03:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM5Hr332tz3VJX; Thu, 29 Oct 2020 00:03:20 +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 31BAE246AE; Thu, 29 Oct 2020 00:03:20 +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 09T03JCb047380; Thu, 29 Oct 2020 00:03:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09T03Jcx047376; Thu, 29 Oct 2020 00:03:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202010290003.09T03Jcx047376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Oct 2020 00:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367122 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 367122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 00:03:20 -0000 Author: jhb Date: Thu Oct 29 00:03:19 2020 New Revision: 367122 URL: https://svnweb.freebsd.org/changeset/base/367122 Log: Save the current TCP pacing rate in t_pacing_rate. Reviewed by: gallatin, gnn Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26875 Modified: head/sys/netinet/tcp_ratelimit.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Wed Oct 28 23:10:54 2020 (r367121) +++ head/sys/netinet/tcp_ratelimit.c Thu Oct 29 00:03:19 2020 (r367122) @@ -1220,6 +1220,8 @@ tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *if { const struct tcp_hwrate_limit_table *rte; + INP_WLOCK_ASSERT(tp->t_inpcb); + if (tp->t_inpcb->inp_snd_tag == NULL) { /* * We are setting up a rate for the first time. @@ -1250,6 +1252,7 @@ tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *if *error = EINVAL; rte = NULL; } + tp->t_pacing_rate = rte->rate; *error = 0; return (rte); } @@ -1264,6 +1267,8 @@ tcp_chg_pacing_rate(const struct tcp_hwrate_limit_tabl int is_indirect = 0; int err; + INP_WLOCK_ASSERT(tp->t_inpcb); + if ((tp->t_inpcb->inp_snd_tag == NULL) || (crte == NULL)) { /* Wrong interface */ @@ -1330,6 +1335,7 @@ re_rate: } if (error) *error = 0; + tp->t_pacing_rate = nrte->rate; return (nrte); } @@ -1340,6 +1346,9 @@ tcp_rel_pacing_rate(const struct tcp_hwrate_limit_tabl struct tcp_rate_set *rs; uint64_t pre; + INP_WLOCK_ASSERT(tp->t_inpcb); + + tp->t_pacing_rate = -1; crs = crte->ptbl; /* * Now we must break the const Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed Oct 28 23:10:54 2020 (r367121) +++ head/sys/netinet/tcp_subr.c Thu Oct 29 00:03:19 2020 (r367122) @@ -1783,6 +1783,7 @@ tcp_newtcpcb(struct inpcb *inp) /* Initialize the per-TCPCB log data. */ tcp_log_tcpcbinit(tp); #endif + tp->t_pacing_rate = -1; if (tp->t_fb->tfb_tcp_fb_init) { if ((*tp->t_fb->tfb_tcp_fb_init)(tp)) { refcount_release(&tp->t_fb->tfb_refcnt); Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Wed Oct 28 23:10:54 2020 (r367121) +++ head/sys/netinet/tcp_var.h Thu Oct 29 00:03:19 2020 (r367122) @@ -246,6 +246,7 @@ struct tcpcb { int t_dupacks; /* consecutive dup acks recd */ int t_lognum; /* Number of log entries */ int t_loglimit; /* Maximum number of log entries */ + int64_t t_pacing_rate; /* bytes / sec, -1 => unlimited */ struct tcp_log_stailq t_logs; /* Log buffer */ struct tcp_log_id_node *t_lin; struct tcp_log_id_bucket *t_lib; From owner-svn-src-head@freebsd.org Thu Oct 29 00:23:19 2020 Return-Path: Delivered-To: svn-src-head@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 662254532F5; Thu, 29 Oct 2020 00:23:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM5kt6cdrz3Wcs; Thu, 29 Oct 2020 00:23:18 +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 93419249B2; Thu, 29 Oct 2020 00:23:18 +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 09T0NIMs059624; Thu, 29 Oct 2020 00:23:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09T0NGkt059615; Thu, 29 Oct 2020 00:23:16 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202010290023.09T0NGkt059615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Oct 2020 00:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367123 - in head: sbin/ifconfig sys/dev/mlx5/mlx5_en sys/kern sys/net sys/netinet sys/sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: sbin/ifconfig sys/dev/mlx5/mlx5_en sys/kern sys/net sys/netinet sys/sys X-SVN-Commit-Revision: 367123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 00:23:19 -0000 Author: jhb Date: Thu Oct 29 00:23:16 2020 New Revision: 367123 URL: https://svnweb.freebsd.org/changeset/base/367123 Log: Support hardware rate limiting (pacing) with TLS offload. - Add a new send tag type for a send tag that supports both rate limiting (packet pacing) and TLS offload (mostly similar to D22669 but adds a separate structure when allocating the new tag type). - When allocating a send tag for TLS offload, check to see if the connection already has a pacing rate. If so, allocate a tag that supports both rate limiting and TLS offload rather than a plain TLS offload tag. - When setting an initial rate on an existing ifnet KTLS connection, set the rate in the TCP control block inp and then reset the TLS send tag (via ktls_output_eagain) to reallocate a TLS + ratelimit send tag. This allocates the TLS send tag asynchronously from a task queue, so the TLS rate limit tag alloc is always sleepable. - When modifying a rate on a connection using KTLS, look for a TLS send tag. If the send tag is only a plain TLS send tag, assume we failed to allocate a TLS ratelimit tag (either during the TCP_TXTLS_ENABLE socket option, or during the send tag reset triggered by ktls_output_eagain) and ignore the new rate. If the send tag is a ratelimit TLS send tag, change the rate on the TLS tag and leave the inp tag alone. - Lock the inp lock when setting sb_tls_info for a socket send buffer so that the routines in tcp_ratelimit can safely dereference the pointer without needing to grab the socket buffer lock. - Add an IFCAP_TXTLS_RTLMT capability flag and associated administrative controls in ifconfig(8). TLS rate limit tags are only allocated if this capability is enabled. Note that TLS offload (whether unlimited or rate limited) always requires IFCAP_TXTLS[46]. Reviewed by: gallatin, hselasky Relnotes: yes Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26691 Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifconfig.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/kern/uipc_ktls.c head/sys/net/if.h head/sys/net/if_var.h head/sys/net/if_vlan.c head/sys/netinet/tcp_ratelimit.c head/sys/sys/ktls.h Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Thu Oct 29 00:03:19 2020 (r367122) +++ head/sbin/ifconfig/ifconfig.8 Thu Oct 29 00:23:16 2020 (r367123) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd October 25, 2020 +.Dd October 28, 2020 .Dt IFCONFIG 8 .Os .Sh NAME @@ -561,6 +561,10 @@ It will always disable TLS for .Xr ip 4 and .Xr ip6 4 . +.It Cm txtlsrtlmt +Enable use of rate limiting (packet pacing) for TLS offload. +.It Fl txtlsrtlmt +Disable use of rate limiting for TLS offload. .It Cm nomap If the driver supports unmapped network buffers, enable them on the interface. Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Thu Oct 29 00:03:19 2020 (r367122) +++ head/sbin/ifconfig/ifconfig.c Thu Oct 29 00:23:16 2020 (r367123) @@ -1345,7 +1345,7 @@ unsetifdescr(const char *val, int value, int s, const "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ "\17TOE4\20TOE6\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \ "\26RXCSUM_IPV6\27TXCSUM_IPV6\31TXRTLMT\32HWRXTSTMP\33NOMAP\34TXTLS4\35TXTLS6" \ -"\36VXLAN_HWCSUM\37VXLAN_HWTSO" +"\36VXLAN_HWCSUM\37VXLAN_HWTSO\40TXTLS_RTLMT" /* * Print the status of the interface. If an address family was @@ -1685,6 +1685,8 @@ static struct cmd basic_cmds[] = { DEF_CMD("-wol_magic", -IFCAP_WOL_MAGIC, setifcap), DEF_CMD("txrtlmt", IFCAP_TXRTLMT, setifcap), DEF_CMD("-txrtlmt", -IFCAP_TXRTLMT, setifcap), + DEF_CMD("txtlsrtlmt", IFCAP_TXTLS_RTLMT, setifcap), + DEF_CMD("-txtlsrtlmt", -IFCAP_TXTLS_RTLMT, setifcap), DEF_CMD("hwrxtstmp", IFCAP_HWRXTSTMP, setifcap), DEF_CMD("-hwrxtstmp", -IFCAP_HWRXTSTMP, setifcap), DEF_CMD("normal", -IFF_LINK0, setifflags), Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Oct 29 00:03:19 2020 (r367122) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Oct 29 00:23:16 2020 (r367123) @@ -3349,6 +3349,10 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t ifp->if_capenable ^= IFCAP_TXTLS4; if (mask & IFCAP_TXTLS6) ifp->if_capenable ^= IFCAP_TXTLS6; +#ifdef RATELIMIT + if (mask & IFCAP_TXTLS_RTLMT) + ifp->if_capenable ^= IFCAP_TXTLS_RTLMT; +#endif if (mask & IFCAP_RXCSUM) ifp->if_capenable ^= IFCAP_RXCSUM; if (mask & IFCAP_RXCSUM_IPV6) @@ -4320,7 +4324,9 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) ifp->if_capabilities |= IFCAP_HWSTATS | IFCAP_HWRXTSTMP; ifp->if_capabilities |= IFCAP_NOMAP; ifp->if_capabilities |= IFCAP_TXTLS4 | IFCAP_TXTLS6; - ifp->if_capabilities |= IFCAP_TXRTLMT; +#ifdef RATELIMIT + ifp->if_capabilities |= IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT; +#endif ifp->if_snd_tag_alloc = mlx5e_snd_tag_alloc; ifp->if_snd_tag_free = mlx5e_snd_tag_free; ifp->if_snd_tag_modify = mlx5e_snd_tag_modify; Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Thu Oct 29 00:03:19 2020 (r367122) +++ head/sys/kern/uipc_ktls.c Thu Oct 29 00:23:16 2020 (r367123) @@ -814,12 +814,24 @@ ktls_alloc_snd_tag(struct inpcb *inp, struct ktls_sess ifp = nh->nh_ifp; if_ref(ifp); - params.hdr.type = IF_SND_TAG_TYPE_TLS; + /* + * Allocate a TLS + ratelimit tag if the connection has an + * existing pacing rate. + */ + if (tp->t_pacing_rate != -1 && + (ifp->if_capenable & IFCAP_TXTLS_RTLMT) != 0) { + params.hdr.type = IF_SND_TAG_TYPE_TLS_RATE_LIMIT; + params.tls_rate_limit.inp = inp; + params.tls_rate_limit.tls = tls; + params.tls_rate_limit.max_rate = tp->t_pacing_rate; + } else { + params.hdr.type = IF_SND_TAG_TYPE_TLS; + params.tls.inp = inp; + params.tls.tls = tls; + } params.hdr.flowid = inp->inp_flowid; params.hdr.flowtype = inp->inp_flowtype; params.hdr.numa_domain = inp->inp_numa_domain; - params.tls.inp = inp; - params.tls.tls = tls; INP_RUNLOCK(inp); if (ifp->if_snd_tag_alloc == NULL) { @@ -1034,6 +1046,7 @@ int ktls_enable_tx(struct socket *so, struct tls_enable *en) { struct ktls_session *tls; + struct inpcb *inp; int error; if (!ktls_offload_enable) @@ -1086,12 +1099,20 @@ ktls_enable_tx(struct socket *so, struct tls_enable *e return (error); } + /* + * Write lock the INP when setting sb_tls_info so that + * routines in tcp_ratelimit.c can read sb_tls_info while + * holding the INP lock. + */ + inp = so->so_pcb; + INP_WLOCK(inp); SOCKBUF_LOCK(&so->so_snd); so->so_snd.sb_tls_seqno = be64dec(en->rec_seq); so->so_snd.sb_tls_info = tls; if (tls->mode != TCP_TLS_MODE_SW) so->so_snd.sb_flags |= SB_TLS_IFNET; SOCKBUF_UNLOCK(&so->so_snd); + INP_WUNLOCK(inp); sbunlock(&so->so_snd); counter_u64_add(ktls_offload_total, 1); @@ -1344,6 +1365,42 @@ ktls_output_eagain(struct inpcb *inp, struct ktls_sess mtx_pool_unlock(mtxpool_sleep, tls); return (ENOBUFS); } + +#ifdef RATELIMIT +int +ktls_modify_txrtlmt(struct ktls_session *tls, uint64_t max_pacing_rate) +{ + union if_snd_tag_modify_params params = { + .rate_limit.max_rate = max_pacing_rate, + .rate_limit.flags = M_NOWAIT, + }; + struct m_snd_tag *mst; + struct ifnet *ifp; + int error; + + /* Can't get to the inp, but it should be locked. */ + /* INP_LOCK_ASSERT(inp); */ + + MPASS(tls->mode == TCP_TLS_MODE_IFNET); + + if (tls->snd_tag == NULL) { + /* + * Resetting send tag, ignore this change. The + * pending reset may or may not see this updated rate + * in the tcpcb. If it doesn't, we will just lose + * this rate change. + */ + return (0); + } + + MPASS(tls->snd_tag != NULL); + MPASS(tls->snd_tag->type == IF_SND_TAG_TYPE_TLS_RATE_LIMIT); + + mst = tls->snd_tag; + ifp = mst->ifp; + return (ifp->if_snd_tag_modify(mst, ¶ms)); +} +#endif #endif void Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Thu Oct 29 00:03:19 2020 (r367122) +++ head/sys/net/if.h Thu Oct 29 00:23:16 2020 (r367123) @@ -250,6 +250,7 @@ struct if_data { #define IFCAP_TXTLS6 0x10000000 /* can do TLS encryption and segmentation for TCP6 */ #define IFCAP_VXLAN_HWCSUM 0x20000000 /* can do IFCAN_HWCSUM on VXLANs */ #define IFCAP_VXLAN_HWTSO 0x40000000 /* can do IFCAP_TSO on VXLANs */ +#define IFCAP_TXTLS_RTLMT 0x80000000 /* can do TLS with rate limiting */ #define IFCAP_HWCSUM_IPV6 (IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6) Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Oct 29 00:03:19 2020 (r367122) +++ head/sys/net/if_var.h Thu Oct 29 00:23:16 2020 (r367123) @@ -191,7 +191,8 @@ struct m_snd_tag; #define IF_SND_TAG_TYPE_RATE_LIMIT 0 #define IF_SND_TAG_TYPE_UNLIMITED 1 #define IF_SND_TAG_TYPE_TLS 2 -#define IF_SND_TAG_TYPE_MAX 3 +#define IF_SND_TAG_TYPE_TLS_RATE_LIMIT 3 +#define IF_SND_TAG_TYPE_MAX 4 struct if_snd_tag_alloc_header { uint32_t type; /* send tag type, see IF_SND_TAG_XXX */ @@ -213,6 +214,13 @@ struct if_snd_tag_alloc_tls { const struct ktls_session *tls; }; +struct if_snd_tag_alloc_tls_rate_limit { + struct if_snd_tag_alloc_header hdr; + struct inpcb *inp; + const struct ktls_session *tls; + uint64_t max_rate; /* in bytes/s */ +}; + struct if_snd_tag_rate_limit_params { uint64_t max_rate; /* in bytes/s */ uint32_t queue_level; /* 0 (empty) .. 65535 (full) */ @@ -226,16 +234,19 @@ union if_snd_tag_alloc_params { struct if_snd_tag_alloc_rate_limit rate_limit; struct if_snd_tag_alloc_rate_limit unlimited; struct if_snd_tag_alloc_tls tls; + struct if_snd_tag_alloc_tls_rate_limit tls_rate_limit; }; union if_snd_tag_modify_params { struct if_snd_tag_rate_limit_params rate_limit; struct if_snd_tag_rate_limit_params unlimited; + struct if_snd_tag_rate_limit_params tls_rate_limit; }; union if_snd_tag_query_params { struct if_snd_tag_rate_limit_params rate_limit; struct if_snd_tag_rate_limit_params unlimited; + struct if_snd_tag_rate_limit_params tls_rate_limit; }; /* Query return flags */ Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Thu Oct 29 00:03:19 2020 (r367122) +++ head/sys/net/if_vlan.c Thu Oct 29 00:23:16 2020 (r367123) @@ -1782,10 +1782,10 @@ vlan_capabilities(struct ifvlan *ifv) * this ever changes, then a new IFCAP_VLAN_TXTLS can be * defined. */ - if (p->if_capabilities & IFCAP_TXTLS) - cap |= p->if_capabilities & IFCAP_TXTLS; - if (p->if_capenable & IFCAP_TXTLS) - ena |= mena & IFCAP_TXTLS; + if (p->if_capabilities & (IFCAP_TXTLS | IFCAP_TXTLS_RTLMT)) + cap |= p->if_capabilities & (IFCAP_TXTLS | IFCAP_TXTLS_RTLMT); + if (p->if_capenable & (IFCAP_TXTLS | IFCAP_TXTLS_RTLMT)) + ena |= mena & (IFCAP_TXTLS | IFCAP_TXTLS_RTLMT); ifp->if_capabilities = cap; ifp->if_capenable = ena; Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Thu Oct 29 00:03:19 2020 (r367122) +++ head/sys/netinet/tcp_ratelimit.c Thu Oct 29 00:23:16 2020 (r367123) @@ -1219,6 +1219,9 @@ tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *if uint64_t bytes_per_sec, int flags, int *error) { const struct tcp_hwrate_limit_table *rte; +#ifdef KERN_TLS + struct ktls_session *tls; +#endif INP_WLOCK_ASSERT(tp->t_inpcb); @@ -1233,17 +1236,30 @@ tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *if return (NULL); } #ifdef KERN_TLS + tls = NULL; if (tp->t_inpcb->inp_socket->so_snd.sb_flags & SB_TLS_IFNET) { + tls = tp->t_inpcb->inp_socket->so_snd.sb_tls_info; + + if ((ifp->if_capenable & IFCAP_TXTLS_RTLMT) == 0 || + tls->mode != TCP_TLS_MODE_IFNET) { + if (error) + *error = ENODEV; + return (NULL); + } + } +#endif + rte = rt_setup_rate(tp->t_inpcb, ifp, bytes_per_sec, flags, error); +#ifdef KERN_TLS + if (rte != NULL && tls != NULL && tls->snd_tag != NULL) { /* - * We currently can't do both TLS and hardware - * pacing + * Fake a route change error to reset the TLS + * send tag. This will convert the existing + * tag to a TLS ratelimit tag. */ - if (error) - *error = EINVAL; - return (NULL); + MPASS(tls->snd_tag->type == IF_SND_TAG_TYPE_TLS); + ktls_output_eagain(tp->t_inpcb, tls); } #endif - rte = rt_setup_rate(tp->t_inpcb, ifp, bytes_per_sec, flags, error); } else { /* * We are modifying a rate, wrong interface? @@ -1264,18 +1280,44 @@ tcp_chg_pacing_rate(const struct tcp_hwrate_limit_tabl { const struct tcp_hwrate_limit_table *nrte; const struct tcp_rate_set *rs; +#ifdef KERN_TLS + struct ktls_session *tls = NULL; +#endif int is_indirect = 0; int err; INP_WLOCK_ASSERT(tp->t_inpcb); - if ((tp->t_inpcb->inp_snd_tag == NULL) || - (crte == NULL)) { + if (crte == NULL) { /* Wrong interface */ if (error) *error = EINVAL; return (NULL); } + +#ifdef KERN_TLS + if (tp->t_inpcb->inp_socket->so_snd.sb_flags & SB_TLS_IFNET) { + tls = tp->t_inpcb->inp_socket->so_snd.sb_tls_info; + MPASS(tls->mode == TCP_TLS_MODE_IFNET); + if (tls->snd_tag != NULL && + tls->snd_tag->type != IF_SND_TAG_TYPE_TLS_RATE_LIMIT) { + /* + * NIC probably doesn't support ratelimit TLS + * tags if it didn't allocate one when an + * existing rate was present, so ignore. + */ + if (error) + *error = EOPNOTSUPP; + return (NULL); + } + } +#endif + if (tp->t_inpcb->inp_snd_tag == NULL) { + /* Wrong interface */ + if (error) + *error = EINVAL; + return (NULL); + } rs = crte->ptbl; if ((rs->rs_flags & RS_IS_DEAD) || (crte->flags & HDWRPACE_IFPDEPARTED)) { @@ -1327,7 +1369,12 @@ re_rate: return (NULL); } /* Change rates to our new entry */ - err = in_pcbmodify_txrtlmt(tp->t_inpcb, nrte->rate); +#ifdef KERN_TLS + if (tls != NULL) + err = ktls_modify_txrtlmt(tls, nrte->rate); + else +#endif + err = in_pcbmodify_txrtlmt(tp->t_inpcb, nrte->rate); if (err) { if (error) *error = err; @@ -1365,6 +1412,13 @@ tcp_rel_pacing_rate(const struct tcp_hwrate_limit_tabl rs_defer_destroy(rs); mtx_unlock(&rs_mtx); } + + /* + * XXX: If this connection is using ifnet TLS, should we + * switch it to using an unlimited rate, or perhaps use + * ktls_output_eagain() to reset the send tag to a plain + * TLS tag? + */ in_pcbdetach_txrtlmt(tp->t_inpcb); } Modified: head/sys/sys/ktls.h ============================================================================== --- head/sys/sys/ktls.h Thu Oct 29 00:03:19 2020 (r367122) +++ head/sys/sys/ktls.h Thu Oct 29 00:23:16 2020 (r367123) @@ -222,6 +222,9 @@ int ktls_get_rx_mode(struct socket *so); int ktls_set_tx_mode(struct socket *so, int mode); int ktls_get_tx_mode(struct socket *so); int ktls_output_eagain(struct inpcb *inp, struct ktls_session *tls); +#ifdef RATELIMIT +int ktls_modify_txrtlmt(struct ktls_session *tls, uint64_t max_pacing_rate); +#endif static inline struct ktls_session * ktls_hold(struct ktls_session *tls) From owner-svn-src-head@freebsd.org Thu Oct 29 02:02:30 2020 Return-Path: Delivered-To: svn-src-head@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 E45734576AE; Thu, 29 Oct 2020 02:02:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CM7xL5fxgz3fVN; Thu, 29 Oct 2020 02:02:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5A0D25CC6; Thu, 29 Oct 2020 02:02:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09T22UW5021471; Thu, 29 Oct 2020 02:02:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09T22UdH021470; Thu, 29 Oct 2020 02:02:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202010290202.09T22UdH021470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 29 Oct 2020 02:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367125 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 367125 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 02:02:31 -0000 Author: emaste Date: Thu Oct 29 02:02:30 2020 New Revision: 367125 URL: https://svnweb.freebsd.org/changeset/base/367125 Log: CI: switch to qemu42 package It appears that booting FreeBSD from qemu's synthesized FAT filesystem broke somehow in a recent qemu-devel update. qemu42 works so switch to it for now. Modified: head/.cirrus.yml Modified: head/.cirrus.yml ============================================================================== --- head/.cirrus.yml Thu Oct 29 00:30:38 2020 (r367124) +++ head/.cirrus.yml Thu Oct 29 02:02:30 2020 (r367125) @@ -14,7 +14,7 @@ task: only_if: $CIRRUS_BRANCH != 'svn_head' timeout_in: 120m install_script: - - pkg install -y qemu-devel uefi-edk2-qemu-x86_64 llvm11 + - pkg install -y qemu42 uefi-edk2-qemu-x86_64 llvm11 setup_user_script: - pw useradd user - mkdir -p /usr/obj/$(pwd -P) From owner-svn-src-head@freebsd.org Thu Oct 29 08:26:39 2020 Return-Path: Delivered-To: svn-src-head@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 C013E446693; Thu, 29 Oct 2020 08:26:39 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMJSb3MZSz4MwC; Thu, 29 Oct 2020 08:26:39 +0000 (UTC) (envelope-from se@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 386192AB95; Thu, 29 Oct 2020 08:26:39 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09T8QdFq055345; Thu, 29 Oct 2020 08:26:39 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09T8QdYx055344; Thu, 29 Oct 2020 08:26:39 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010290826.09T8QdYx055344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Thu, 29 Oct 2020 08:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367126 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367126 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 08:26:39 -0000 Author: se Date: Thu Oct 29 08:26:38 2020 New Revision: 367126 URL: https://svnweb.freebsd.org/changeset/base/367126 Log: Fix calendar -a processing of files included in the user's home directory The existing code performed a chdir() into the home directory, but the parser fell back to using the invoking user's home directory as the base directory for the search for an include file. Since use of the -a option is limited to UID==0, the directory searched was typically ~root/.calendar, not the .calendar directory of the user whose file is being processed. PR: 205580 Reported by: greg.bal4@gmail.com (Greg Balfour) MFC after: 3 days Modified: head/usr.bin/calendar/calendar.c Modified: head/usr.bin/calendar/calendar.c ============================================================================== --- head/usr.bin/calendar/calendar.c Thu Oct 29 02:02:30 2020 (r367125) +++ head/usr.bin/calendar/calendar.c Thu Oct 29 08:26:38 2020 (r367126) @@ -228,6 +228,7 @@ main(int argc, char *argv[]) if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETALL) != 0) errx(1, "setusercontext"); + setenv("HOME", pw->pw_dir, 1); cal(); exit(0); } From owner-svn-src-head@freebsd.org Thu Oct 29 08:31:48 2020 Return-Path: Delivered-To: svn-src-head@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 791234469F8; Thu, 29 Oct 2020 08:31:48 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMJZX2jcDz4Ndd; Thu, 29 Oct 2020 08:31:48 +0000 (UTC) (envelope-from se@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 4064F2AD18; Thu, 29 Oct 2020 08:31:48 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09T8Vm1n060439; Thu, 29 Oct 2020 08:31:48 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09T8VlbH060437; Thu, 29 Oct 2020 08:31:47 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010290831.09T8VlbH060437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Thu, 29 Oct 2020 08:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367127 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367127 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 08:31:48 -0000 Author: se Date: Thu Oct 29 08:31:47 2020 New Revision: 367127 URL: https://svnweb.freebsd.org/changeset/base/367127 Log: Simplify test for closing delimiter of #include argument (no functional change). While here: Fix invalid parameters of a commented-out debug printf() found when testing with this code enabled. MFC after: 3 days Modified: head/usr.bin/calendar/events.c head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/events.c ============================================================================== --- head/usr.bin/calendar/events.c Thu Oct 29 08:26:38 2020 (r367126) +++ head/usr.bin/calendar/events.c Thu Oct 29 08:31:47 2020 (r367127) @@ -207,8 +207,9 @@ event_print_all(FILE *fp) while (walkthrough_dates(&e) != 0) { #ifdef DEBUG - fprintf(stderr, "event_print_allmonth: %d, day: %d\n", - month, day); + if (e) + fprintf(stderr, "event_print_all month: %d, day: %d\n", + e->month, e->day); #endif /* Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Thu Oct 29 08:26:38 2020 (r367126) +++ head/usr.bin/calendar/io.c Thu Oct 29 08:31:47 2020 (r367127) @@ -215,26 +215,12 @@ token(char *line, FILE *out, int *skip) return (T_ERR); } - a = *walk; + a = *walk == '<' ? '>' : '\"'; walk++; c = walk[strlen(walk) - 1]; - switch(c) { - case '>': - if (a != '<') { - warnx("Unterminated include expecting '\"'"); - return (T_ERR); - } - break; - case '\"': - if (a != '\"') { - warnx("Unterminated include expecting '>'"); - return (T_ERR); - } - break; - default: - warnx("Unterminated include expecting '%c'", - a == '<' ? '>' : '\"' ); + if (a != c) { + warnx("Unterminated include expecting '%c'", a); return (T_ERR); } walk[strlen(walk) - 1] = '\0'; From owner-svn-src-head@freebsd.org Thu Oct 29 12:56:03 2020 Return-Path: Delivered-To: svn-src-head@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 85A16450619; Thu, 29 Oct 2020 12:56:03 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMQRR33Nfz3Sj7; Thu, 29 Oct 2020 12:56:03 +0000 (UTC) (envelope-from mjg@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 4D7212D7F5; Thu, 29 Oct 2020 12:56:03 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TCu3aG025341; Thu, 29 Oct 2020 12:56:03 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TCu2BF025339; Thu, 29 Oct 2020 12:56:02 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010291256.09TCu2BF025339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 29 Oct 2020 12:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367130 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 367130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 12:56:03 -0000 Author: mjg Date: Thu Oct 29 12:56:02 2020 New Revision: 367130 URL: https://svnweb.freebsd.org/changeset/base/367130 Log: vfs: add NDREINIT to facilitate repeated namei calls struct nameidata mixes caller arguments, internal state and output, which can be quite error prone. Recent addition of valdiating ni_resflags uncovered a caller which could repeatedly call namei, effectively operating on partially populated state. Add bare minimium validation this does not happen. The real fix would decouple aforementioned state. Reported by: pho Tested by: pho (different variant) Modified: head/sys/kern/vfs_lookup.c head/sys/kern/vfs_vnops.c head/sys/sys/namei.h Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Thu Oct 29 11:19:47 2020 (r367129) +++ head/sys/kern/vfs_lookup.c Thu Oct 29 12:56:02 2020 (r367130) @@ -502,6 +502,11 @@ namei(struct nameidata *ndp) cnp = &ndp->ni_cnd; td = cnp->cn_thread; #ifdef INVARIANTS + KASSERT((ndp->ni_debugflags & NAMEI_DBG_CALLED) == 0, + ("%s: repeated call to namei without NDREINIT", __func__)); + KASSERT(ndp->ni_debugflags == NAMEI_DBG_INITED, + ("%s: bad debugflags %d", __func__, ndp->ni_debugflags)); + ndp->ni_debugflags |= NAMEI_DBG_CALLED; /* * For NDVALIDATE. * Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Oct 29 11:19:47 2020 (r367129) +++ head/sys/kern/vfs_vnops.c Thu Oct 29 12:56:02 2020 (r367130) @@ -259,6 +259,7 @@ restart: if ((error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) != 0) return (error); + NDREINIT(ndp); goto restart; } if ((vn_open_flags & VN_OPEN_NAMECACHE) != 0) Modified: head/sys/sys/namei.h ============================================================================== --- head/sys/sys/namei.h Thu Oct 29 11:19:47 2020 (r367129) +++ head/sys/sys/namei.h Thu Oct 29 12:56:02 2020 (r367130) @@ -95,11 +95,15 @@ struct nameidata { */ u_int ni_resflags; /* + * Debug for validating API use by the callers. + */ + u_short ni_debugflags; + /* * Shared between namei and lookup/commit routines. */ + u_short ni_loopcnt; /* count of symlinks encountered */ size_t ni_pathlen; /* remaining chars in path */ char *ni_next; /* next location in pathname */ - u_int ni_loopcnt; /* count of symlinks encountered */ /* * Lookup parameters: this structure describes the subset of * information from the nameidata structure that is passed @@ -122,7 +126,15 @@ int cache_fplookup(struct nameidata *ndp, enum cache_f * * If modifying the list make sure to check whether NDVALIDATE needs updating. */ + /* + * Debug. + */ +#define NAMEI_DBG_INITED 0x0001 +#define NAMEI_DBG_CALLED 0x0002 +#define NAMEI_DBG_HADSTARTDIR 0x0004 + +/* * namei operational modifier flags, stored in ni_cnd.flags */ #define NC_NOMAKEENTRY 0x0001 /* name must not be added to cache */ @@ -215,8 +227,18 @@ int cache_fplookup(struct nameidata *ndp, enum cache_f */ #ifdef INVARIANTS #define NDINIT_PREFILL(arg) memset(arg, 0xff, sizeof(*arg)) +#define NDINIT_DBG(arg) { (arg)->ni_debugflags = NAMEI_DBG_INITED; } +#define NDREINIT_DBG(arg) { \ + if (((arg)->ni_debugflags & NAMEI_DBG_INITED) == 0) \ + panic("namei data not inited"); \ + if (((arg)->ni_debugflags & NAMEI_DBG_HADSTARTDIR) != 0) \ + panic("NDREINIT on namei data with NAMEI_DBG_HADSTARTDIR"); \ + (arg)->ni_debugflags = NAMEI_DBG_INITED; \ +} #else #define NDINIT_PREFILL(arg) do { } while (0) +#define NDINIT_DBG(arg) do { } while (0) +#define NDREINIT_DBG(arg) do { } while (0) #endif #define NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, startdir, rightsp, td) \ @@ -225,6 +247,7 @@ do { \ cap_rights_t *_rightsp = (rightsp); \ MPASS(_rightsp != NULL); \ NDINIT_PREFILL(_ndp); \ + NDINIT_DBG(_ndp); \ _ndp->ni_cnd.cn_nameiop = op; \ _ndp->ni_cnd.cn_flags = flags; \ _ndp->ni_segflg = segflg; \ @@ -235,6 +258,13 @@ do { \ filecaps_init(&_ndp->ni_filecaps); \ _ndp->ni_cnd.cn_thread = td; \ _ndp->ni_rightsneeded = _rightsp; \ +} while (0) + +#define NDREINIT(ndp) do { \ + struct nameidata *_ndp = (ndp); \ + NDREINIT_DBG(_ndp); \ + _ndp->ni_resflags = 0; \ + _ndp->ni_startdir = NULL; \ } while (0) #define NDF_NO_DVP_RELE 0x00000001 From owner-svn-src-head@freebsd.org Thu Oct 29 14:21:26 2020 Return-Path: Delivered-To: svn-src-head@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 25A6E452D26; Thu, 29 Oct 2020 14:21:26 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMSKy08scz3Y3y; Thu, 29 Oct 2020 14:21:26 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCD222EB38; Thu, 29 Oct 2020 14:21:25 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TELPqI084684; Thu, 29 Oct 2020 14:21:25 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TELP64084683; Thu, 29 Oct 2020 14:21:25 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202010291421.09TELP64084683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Thu, 29 Oct 2020 14:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367131 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 367131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 14:21:26 -0000 Author: lwhsu Date: Thu Oct 29 14:21:25 2020 New Revision: 367131 URL: https://svnweb.freebsd.org/changeset/base/367131 Log: Update the due date of the quarterly status report While here, move the date to keep 2 weeks ahead notificaion and fix the part of speech. Reviewed by: debdrup Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26998 Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu Oct 29 12:56:02 2020 (r367130) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu Oct 29 14:21:25 2020 (r367131) @@ -122,6 +122,7 @@ 03/14 Eric Turgeon born in Edmundston, New Brunswick, Canada, 1982 03/15 Paolo Pisati born in Lodi, Italy, 1977 03/15 Brian Fundakowski Feldman born in Alexandria, Virginia, United States, 1983 +03/15 First quarterly status reports are due on 03/31 03/17 Michael Smith born in Bankstown, New South Wales, Australia, 1971 03/17 Alexander Motin born in Simferopol, Ukraine, 1979 03/18 Koop Mast born in Dokkum, the Netherlands, 1981 @@ -142,7 +143,6 @@ 03/29 Dave Cottlehuber born in Christchurch, New Zealand, 1973 03/29 Thierry Thomas born in Luxeuil les Bains, France, 1961 03/30 Po-Chuan Hsieh born in Taipei, Taiwan, Republic of China, 1978 -03/31 First quarter status reports are due on 04/15 04/01 Matthew Jacob born in San Francisco, California, United States, 1958 04/01 Alexander V. Chernikov born in Moscow, Russian Federation, 1984 04/01 Bill Fenner born in Bellefonte, Pennsylvania, United States, 1971 @@ -249,6 +249,7 @@ 06/09 Stanislav Galabov born in Sofia, Bulgaria, 1978 06/11 Alonso Cardenas Marquez born in Arequipa, Peru, 1979 06/14 Josh Paetzel born in Minneapolis, Minnesota, United States, 1973 +06/15 Second quarterly status reports are due on 06/30 06/17 Tilman Linneweh born in Weinheim, Baden-Wuerttemberg, Germany, 1978 06/18 Li-Wen Hsu born in Taipei, Taiwan, Republic of China, 1984 06/18 Roman Bogorodskiy born in Saratov, Russian Federation, 1986 @@ -265,7 +266,6 @@ 06/29 Daniel Harris born in Lubbock, Texas, United States, 1985 06/29 Andrew Pantyukhin born in Moscow, Russian Federation, 1985 06/30 Guido van Rooij born in Best, Noord-Brabant, the Netherlands, 1965 -06/30 Second quarter status reports are due on 07/15 07/01 Matthew Dillon born in San Francisco, California, United States, 1966 07/01 Mateusz Guzik born in DoÅ‚ki Górne, Poland, 1986 07/02 Mark Christopher Ovens born in Preston, Lancashire, United Kingdom, 1958 @@ -364,6 +364,7 @@ 09/14 Matthew Seaman born in Bristol, United Kingdom, 1965 09/15 Aleksandr Rybalko born in Odessa, Ukraine, 1977 09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 +09/15 Third quarterly status reports are due on 09/30 09/16 Maksim Yevmenkin born in Taganrog, USSR, 1974 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/18 Matthew Fleming born in Cleveland, Ohio, United States, 1975 @@ -384,7 +385,6 @@ 09/29 Matthew Hunt born in Johnstown, Pennsylvania, United States, 1976 09/30 Mark Felder born in Prairie du Chien, Wisconsin, United States, 1985 09/30 Hiten M. Pandya born in Dar-es-Salaam, Tanzania, East Africa, 1986 -09/30 Third quarter status reports are due on 10/15 10/02 Beat Gaetzi born in Zurich, Switzerland, 1980 10/02 Grzegorz Blach born in Starachowice, Poland, 1985 10/05 Hiroki Sato born in Yamagata, Japan, 1977 @@ -464,6 +464,7 @@ 12/11 Koichiro Iwao born in Oita, Japan, 1987 12/15 James FitzGibbon born in Amersham, Buckinghamshire, United Kingdom, 1974 12/15 Timur I. Bakeyev born in Kazan, Republic of Tatarstan, USSR, 1974 +12/15 Fourth quarterly status reports are due on 12/31 12/18 Chris Timmons born in Ellensburg, Washington, United States, 1964 12/18 Dag-Erling Smorgrav born in Brussels, Belgium, 1977 12/18 Muhammad Moinur Rahman born in Dhaka, Bangladesh, 1983 @@ -484,6 +485,5 @@ 12/28 Marius Strobl born in Cham, Bavaria, Germany, 1978 12/30 Sean Eric Fagan born in Los Angeles, California, United States, 1967 12/31 Edwin Groothuis born in Geldrop, the Netherlands, 1970 -12/31 Fourth quarter status reports are due on 01/15 #endif /* !_calendar_freebsd_ */ From owner-svn-src-head@freebsd.org Thu Oct 29 14:23:54 2020 Return-Path: Delivered-To: svn-src-head@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 7509E452F9E; Thu, 29 Oct 2020 14:23:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMSNp2vdsz3YjD; Thu, 29 Oct 2020 14:23:54 +0000 (UTC) (envelope-from trasz@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 47C1D2F017; Thu, 29 Oct 2020 14:23:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TENsOh087233; Thu, 29 Oct 2020 14:23:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TENrW1087227; Thu, 29 Oct 2020 14:23:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010291423.09TENrW1087227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 29 Oct 2020 14:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367132 - in head: lib/libsysdecode sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: lib/libsysdecode sys/compat/linux X-SVN-Commit-Revision: 367132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 14:23:54 -0000 Author: trasz Date: Thu Oct 29 14:23:52 2020 New Revision: 367132 URL: https://svnweb.freebsd.org/changeset/base/367132 Log: Add defines for Linux errno values and use them to make linux_errtbl[] more readable. While here, add linux_check_errtbl() function to make sure we don't leave holes. No objections: emaste (earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26972 Added: head/sys/compat/linux/linux_errno.h (contents, props changed) Modified: head/lib/libsysdecode/errno.c head/sys/compat/linux/linux.h head/sys/compat/linux/linux_common.c head/sys/compat/linux/linux_errno.c head/sys/compat/linux/linux_errno.inc Modified: head/lib/libsysdecode/errno.c ============================================================================== --- head/lib/libsysdecode/errno.c Thu Oct 29 14:21:25 2020 (r367131) +++ head/lib/libsysdecode/errno.c Thu Oct 29 14:23:52 2020 (r367132) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) +#include static #include #endif Modified: head/sys/compat/linux/linux.h ============================================================================== --- head/sys/compat/linux/linux.h Thu Oct 29 14:21:25 2020 (r367131) +++ head/sys/compat/linux/linux.h Thu Oct 29 14:23:52 2020 (r367132) @@ -197,5 +197,6 @@ int linux_to_bsd_bits_(int value, struct bsd_to_linux_ #define BITMAP_1t1_LINUX(_name) BITMAP_EASY_LINUX(_name, LINUX_##_name) int bsd_to_linux_errno(int error); +void linux_check_errtbl(void); #endif /* _LINUX_MI_H_ */ Modified: head/sys/compat/linux/linux_common.c ============================================================================== --- head/sys/compat/linux/linux_common.c Thu Oct 29 14:21:25 2020 (r367131) +++ head/sys/compat/linux/linux_common.c Thu Oct 29 14:23:52 2020 (r367132) @@ -67,6 +67,9 @@ linux_common_modevent(module_t mod, int type, void *da switch(type) { case MOD_LOAD: +#ifdef INVARIANTS + linux_check_errtbl(); +#endif linux_dev_shm_create(); linux_osd_jail_register(); linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, Modified: head/sys/compat/linux/linux_errno.c ============================================================================== --- head/sys/compat/linux/linux_errno.c Thu Oct 29 14:21:25 2020 (r367131) +++ head/sys/compat/linux/linux_errno.c Thu Oct 29 14:23:52 2020 (r367132) @@ -8,6 +8,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include int @@ -19,3 +20,16 @@ bsd_to_linux_errno(int error) return (linux_errtbl[error]); } + +#ifdef INVARIANTS +void +linux_check_errtbl(void) +{ + int i; + + for (i = 1; i < sizeof(linux_errtbl); i++) { + KASSERT(linux_errtbl[i] != 0, + ("%s: linux_errtbl[%d] == 0", __func__, i)); + } +} +#endif Added: head/sys/compat/linux/linux_errno.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linux/linux_errno.h Thu Oct 29 14:23:52 2020 (r367132) @@ -0,0 +1,183 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 The FreeBSD Foundation + * + * This software was developed by Edward Tomasz Napierala under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUX_ERRNO_H_ +#define _LINUX_ERRNO_H_ + +#define LINUX_EPERM 1 +#define LINUX_ENOENT 2 +#define LINUX_ESRCH 3 +#define LINUX_EINTR 4 +#define LINUX_EIO 5 +#define LINUX_ENXIO 6 +#define LINUX_E2BIG 7 +#define LINUX_ENOEXEC 8 +#define LINUX_EBADF 9 + +#define LINUX_ECHILD 10 +#define LINUX_EAGAIN 11 +#define LINUX_ENOMEM 12 +#define LINUX_EACCES 13 +#define LINUX_EFAULT 14 +#define LINUX_ENOTBLK 15 +#define LINUX_EBUSY 16 +#define LINUX_EEXIST 17 +#define LINUX_EXDEV 18 +#define LINUX_ENODEV 19 + +#define LINUX_ENOTDIR 20 +#define LINUX_EISDIR 21 +#define LINUX_EINVAL 22 +#define LINUX_ENFILE 23 +#define LINUX_EMFILE 24 +#define LINUX_ENOTTY 25 +#define LINUX_ETXTBSY 26 +#define LINUX_EFBIG 27 +#define LINUX_ENOSPC 28 +#define LINUX_ESPIPE 29 + +#define LINUX_EROFS 30 +#define LINUX_EMLINK 31 +#define LINUX_EPIPE 32 +#define LINUX_EDOM 33 +#define LINUX_ERANGE 34 +#define LINUX_EDEADLK 35 +#define LINUX_ENAMETOOLONG 36 +#define LINUX_ENOLCK 37 +#define LINUX_ENOSYS 38 +#define LINUX_ENOTEMPTY 39 + +#define LINUX_ELOOP 40 +/* XXX: errno 41 is not defined in Linux. */ +#define LINUX_ENOMSG 42 +#define LINUX_EIDRM 43 +#define LINUX_ECHRNG 44 +#define LINUX_EL2NSYNC 45 +#define LINUX_EL3HLT 46 +#define LINUX_EL3RST 47 +#define LINUX_ELNRNG 48 +#define LINUX_EUNATCH 49 + +#define LINUX_ENOCSI 50 +#define LINUX_L2HLT 51 +#define LINUX_EBADE 52 +#define LINUX_EBADR 53 +#define LINUX_EXFULL 54 +#define LINUX_ENOANO 55 +#define LINUX_EBADRQC 56 +#define LINUX_EBADSLT 57 +/* XXX: errno 58 is not defined in Linux. */ +#define LINUX_EBFONT 59 + +#define LINUX_ENOSTR 60 +#define LINUX_ENODATA 61 +#define LINUX_ENOTIME 62 +#define LINUX_ENOSR 63 +#define LINUX_ENONET 64 +#define LINUX_ENOPKG 65 +#define LINUX_EREMOTE 66 +#define LINUX_ENOLINK 67 +#define LINUX_EADV 68 +#define LINUX_ESRMNT 69 + +#define LINUX_ECOMM 70 +#define LINUX_EPROTO 71 +#define LINUX_EMULTIHOP 72 +#define LINUX_EDOTDOT 73 +#define LINUX_EBADMSG 74 +#define LINUX_EOVERFLOW 75 +#define LINUX_ENOTUNIQ 76 +#define LINUX_EBADFD 77 +#define LINUX_EREMCHG 78 +#define LINUX_ELIBACC 79 + +#define LINUX_ELIBBAD 80 +#define LINUX_ELIBSCN 81 +#define LINUX_ELIBMAX 82 +#define LINUX_ELIBEXEC 83 +#define LINUX_EILSEQ 84 +#define LINUX_ERESTART 85 +#define LINUX_ESTRPIPE 86 +#define LINUX_EUSERS 87 +#define LINUX_ENOTSOCK 88 +#define LINUX_EDESTADDRREQ 89 + +#define LINUX_EMSGSIZE 90 +#define LINUX_EPROTOTYPE 91 +#define LINUX_ENOPROTOOPT 92 +#define LINUX_EPROTONOTSUPPORT 93 +#define LINUX_ESOCKNOTSUPPORT 94 +#define LINUX_EOPNOTSUPPORT 95 +#define LINUX_EPFNOTSUPPORT 96 +#define LINUX_EAFNOTSUPPORT 97 +#define LINUX_EADDRINUSE 98 +#define LINUX_EADDRNOTAVAIL 99 + +#define LINUX_ENETDOWN 100 +#define LINUX_ENETUNREACH 101 +#define LINUX_ENETRESET 102 +#define LINUX_ECONNABORTED 103 +#define LINUX_ECONNRESET 104 +#define LINUX_ENOBUFS 105 +#define LINUX_EISCONN 106 +#define LINUX_ENOTCONN 107 +#define LINUX_ESHUTDOWN 108 +#define LINUX_ETOOMANYREFS 109 + +#define LINUX_ETIMEDOUT 110 +#define LINUX_ECONNREFUSED 111 +#define LINUX_EHOSTDOWN 112 +#define LINUX_EHOSTUNREACH 113 +#define LINUX_EALREADY 114 +#define LINUX_EINPROGRESS 115 +#define LINUX_ESTALE 116 +#define LINUX_EUCLEAN 117 +#define LINUX_ENOTNAM 118 +#define LINUX_ENAVAIL 119 + +#define LINUX_EISNAM 120 +#define LINUX_EREMOTEIO 121 +#define LINUX_EDQUOT 122 +#define LINUX_ENOMEDIUM 123 +#define LINUX_EMEDIUMTYPE 124 +#define LINUX_ECANCELED 125 +#define LINUX_ENOKEY 126 +#define LINUX_EKEYEXPIRED 127 +#define LINUX_EKEYREVOKED 128 +#define LINUX_EKEYREJECTED 129 + +#define LINUX_EOWNERDEAD 130 +#define LINUX_ENOTRECOVERABLE 131 +#define LINUX_ERFKILL 132 +#define LINUX_EHWPOISON 133 + +#endif /* _LINUX_ERRNO_H_ */ Modified: head/sys/compat/linux/linux_errno.inc ============================================================================== --- head/sys/compat/linux/linux_errno.inc Thu Oct 29 14:21:25 2020 (r367131) +++ head/sys/compat/linux/linux_errno.inc Thu Oct 29 14:23:52 2020 (r367132) @@ -34,125 +34,128 @@ * FreeBSD: src/sys/sys/errno.h * Linux: include/uapi/asm-generic/errno-base.h * include/uapi/asm-generic/errno.h + * + * XXX: The "XXX" comments below should be replaced with rationale + * for the errno value chosen. */ const int linux_errtbl[ELAST + 1] = { /* [0, 9] */ [0] = -0, - [EPERM] = -1, - [ENOENT] = -2, - [ESRCH] = -3, - [EINTR] = -4, - [EIO] = -5, - [ENXIO] = -6, - [E2BIG] = -7, - [ENOEXEC] = -8, - [EBADF] = -9, + [EPERM] = -LINUX_EPERM, + [ENOENT] = -LINUX_ENOENT, + [ESRCH] = -LINUX_ESRCH, + [EINTR] = -LINUX_EINTR, + [EIO] = -LINUX_EIO, + [ENXIO] = -LINUX_ENXIO, + [E2BIG] = -LINUX_E2BIG, + [ENOEXEC] = -LINUX_ENOEXEC, + [EBADF] = -LINUX_EBADF, /* [10, 19] */ - [ECHILD] = -10, - [EDEADLK] = -35, - [ENOMEM] = -12, - [EACCES] = -13, - [EFAULT] = -14, - [ENOTBLK] = -15, - [EBUSY] = -16, - [EEXIST] = -17, - [EXDEV] = -18, - [ENODEV] = -19, + [ECHILD] = -LINUX_ECHILD, + [EDEADLK] = -LINUX_EDEADLK, + [ENOMEM] = -LINUX_ENOMEM, + [EACCES] = -LINUX_EACCES, + [EFAULT] = -LINUX_EFAULT, + [ENOTBLK] = -LINUX_ENOTBLK, + [EBUSY] = -LINUX_EBUSY, + [EEXIST] = -LINUX_EEXIST, + [EXDEV] = -LINUX_EXDEV, + [ENODEV] = -LINUX_ENODEV, /* [20, 29] */ - [ENOTDIR] = -20, - [EISDIR] = -21, - [EINVAL] = -22, - [ENFILE] = -23, - [EMFILE] = -24, - [ENOTTY] = -25, - [ETXTBSY] = -26, - [EFBIG] = -27, - [ENOSPC] = -28, - [ESPIPE] = -29, + [ENOTDIR] = -LINUX_ENOTDIR, + [EISDIR] = -LINUX_EISDIR, + [EINVAL] = -LINUX_EINVAL, + [ENFILE] = -LINUX_ENFILE, + [EMFILE] = -LINUX_EMFILE, + [ENOTTY] = -LINUX_ENOTTY, + [ETXTBSY] = -LINUX_ETXTBSY, + [EFBIG] = -LINUX_EFBIG, + [ENOSPC] = -LINUX_ENOSPC, + [ESPIPE] = -LINUX_ESPIPE, /* [30, 39] */ - [EROFS] = -30, - [EMLINK] = -31, - [EPIPE] = -32, - [EDOM] = -33, - [ERANGE] = -34, - [EAGAIN] = -11, - [EINPROGRESS] = -115, - [EALREADY] = -114, - [ENOTSOCK] = -88, - [EDESTADDRREQ] = -89, + [EROFS] = -LINUX_EROFS, + [EMLINK] = -LINUX_EMLINK, + [EPIPE] = -LINUX_EPIPE, + [EDOM] = -LINUX_EDOM, + [ERANGE] = -LINUX_ERANGE, + [EAGAIN] = -LINUX_EAGAIN, + [EINPROGRESS] = -LINUX_EINPROGRESS, + [EALREADY] = -LINUX_EALREADY, + [ENOTSOCK] = -LINUX_ENOTSOCK, + [EDESTADDRREQ] = -LINUX_EDESTADDRREQ, /* [40, 49] */ - [EMSGSIZE] = -90, - [EPROTOTYPE] = -91, - [ENOPROTOOPT] = -92, - [EPROTONOSUPPORT] = -93, - [ESOCKTNOSUPPORT] = -94, - [EOPNOTSUPP] = -95, - [EPFNOSUPPORT] = -96, - [EAFNOSUPPORT] = -97, - [EADDRINUSE] = -98, - [EADDRNOTAVAIL] = -99, + [EMSGSIZE] = -LINUX_EMSGSIZE, + [EPROTOTYPE] = -LINUX_EPROTOTYPE, + [ENOPROTOOPT] = -LINUX_ENOPROTOOPT, + [EPROTONOSUPPORT] = -LINUX_EPROTONOTSUPPORT, + [ESOCKTNOSUPPORT] = -LINUX_ESOCKNOTSUPPORT, + [EOPNOTSUPP] = -LINUX_EOPNOTSUPPORT, + [EPFNOSUPPORT] = -LINUX_EPFNOTSUPPORT, + [EAFNOSUPPORT] = -LINUX_EAFNOTSUPPORT, + [EADDRINUSE] = -LINUX_EADDRINUSE, + [EADDRNOTAVAIL] = -LINUX_EADDRNOTAVAIL, /* [50, 59] */ - [ENETDOWN] = -100, - [ENETUNREACH] = -101, - [ENETRESET] = -102, - [ECONNABORTED] = -103, - [ECONNRESET] = -104, - [ENOBUFS] = -105, - [EISCONN] = -106, - [ENOTCONN] = -107, - [ESHUTDOWN] = -108, - [ETOOMANYREFS] = -109, + [ENETDOWN] = -LINUX_ENETDOWN, + [ENETUNREACH] = -LINUX_ENETUNREACH, + [ENETRESET] = -LINUX_ENETRESET, + [ECONNABORTED] = -LINUX_ECONNABORTED, + [ECONNRESET] = -LINUX_ECONNRESET, + [ENOBUFS] = -LINUX_ENOBUFS, + [EISCONN] = -LINUX_EISCONN, + [ENOTCONN] = -LINUX_ENOTCONN, + [ESHUTDOWN] = -LINUX_ESHUTDOWN, + [ETOOMANYREFS] = -LINUX_ETOOMANYREFS, /* [60, 69] */ - [ETIMEDOUT] = -110, - [ECONNREFUSED] = -111, - [ELOOP] = -40, - [ENAMETOOLONG] = -36, - [EHOSTDOWN] = -112, - [EHOSTUNREACH] = -113, - [ENOTEMPTY] = -39, - [EPROCLIM] = -11, - [EUSERS] = -87, - [EDQUOT] = -122, + [ETIMEDOUT] = -LINUX_ETIMEDOUT, + [ECONNREFUSED] = -LINUX_ECONNREFUSED, + [ELOOP] = -LINUX_ELOOP, + [ENAMETOOLONG] = -LINUX_ENAMETOOLONG, + [EHOSTDOWN] = -LINUX_EHOSTDOWN, + [EHOSTUNREACH] = -LINUX_EHOSTUNREACH, + [ENOTEMPTY] = -LINUX_ENOTEMPTY, + [EPROCLIM] = -LINUX_EAGAIN, /* XXX */ + [EUSERS] = -LINUX_EUSERS, + [EDQUOT] = -LINUX_EDQUOT, /* [70, 79] */ - [ESTALE] = -116, - [EREMOTE] = -66, - [EBADRPC] = -6, /* EBADRPC -> ENXIO */ - [ERPCMISMATCH] = -6, /* ERPCMISMATCH -> ENXIO */ - [EPROGUNAVAIL] = -6, /* EPROGUNAVAIL -> ENXIO */ - [EPROGMISMATCH] = -6, /* EPROGMISMATCH -> ENXIO */ - [EPROCUNAVAIL] = -6, /* EPROCUNAVAIL -> ENXIO */ - [ENOLCK] = -37, - [ENOSYS] = -38, - [EFTYPE] = -9, + [ESTALE] = -LINUX_ESTALE, + [EREMOTE] = -LINUX_EREMOTE, + [EBADRPC] = -LINUX_ENXIO, /* XXX */ + [ERPCMISMATCH] = -LINUX_ENXIO, /* XXX */ + [EPROGUNAVAIL] = -LINUX_ENXIO, /* XXX */ + [EPROGMISMATCH] = -LINUX_ENXIO, /* XXX */ + [EPROCUNAVAIL] = -LINUX_ENXIO, /* XXX */ + [ENOLCK] = -LINUX_ENOLCK, + [ENOSYS] = -LINUX_ENOSYS, + [EFTYPE] = -LINUX_EBADF, /* XXX */ /* [80, 89] */ - [EAUTH] = -6, /* EAUTH -> ENXIO */ - [ENEEDAUTH] = -6, /* ENEEDAUTH -> ENXIO */ - [EIDRM] = -43, - [ENOMSG] = -42, - [EOVERFLOW] = -75, - [ECANCELED] = -125, - [EILSEQ] = -84, - [ENOATTR] = -61, - [EDOOFUS] = -22, /* EDOOFUS -> EINVAL */ - [EBADMSG] = -74, + [EAUTH] = -LINUX_ENXIO, /* XXX */ + [ENEEDAUTH] = -LINUX_ENXIO, /* XXX */ + [EIDRM] = -LINUX_EIDRM, + [ENOMSG] = -LINUX_ENOMSG, + [EOVERFLOW] = -LINUX_EOVERFLOW, + [ECANCELED] = -LINUX_ECANCELED, + [EILSEQ] = -LINUX_EILSEQ, + [ENOATTR] = -LINUX_ENODATA, /* XXX */ + [EDOOFUS] = -LINUX_EINVAL, /* XXX */ + [EBADMSG] = -LINUX_EBADMSG, /* [90, 99] */ - [EMULTIHOP] = -72, - [ENOLINK] = -67, - [EPROTO] = -71, - [ENOTCAPABLE] = -1, /* ENOTCAPABLE -> EPERM */ - [ECAPMODE] = -1, /* ECAPMODE -> EPERM */ - [ENOTRECOVERABLE] = -131, /* ENOTRECOVERABLE */ - [EOWNERDEAD] = -130, /* EOWNERDEAD */ - [EINTEGRITY] = -22, /* EINTEGRITY -> EINVAL */ + [EMULTIHOP] = -LINUX_EMULTIHOP, + [ENOLINK] = -LINUX_ENOLINK, + [EPROTO] = -LINUX_EPROTO, + [ENOTCAPABLE] = -LINUX_EPERM, /* XXX */ + [ECAPMODE] = -LINUX_EPERM, /* XXX */ + [ENOTRECOVERABLE] = -LINUX_ENOTRECOVERABLE, + [EOWNERDEAD] = -LINUX_EOWNERDEAD, + [EINTEGRITY] = -LINUX_EINVAL, /* XXX */ }; _Static_assert(ELAST == 97, From owner-svn-src-head@freebsd.org Thu Oct 29 14:42:03 2020 Return-Path: Delivered-To: svn-src-head@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 8BB514533E0; Thu, 29 Oct 2020 14:42:03 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMSnl3CLBz3ZdV; Thu, 29 Oct 2020 14:42:03 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 516712F1BA; Thu, 29 Oct 2020 14:42:03 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TEg3RJ098766; Thu, 29 Oct 2020 14:42:03 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TEg3hO098765; Thu, 29 Oct 2020 14:42:03 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202010291442.09TEg3hO098765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Thu, 29 Oct 2020 14:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367134 - head/bin/echo X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/bin/echo X-SVN-Commit-Revision: 367134 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 14:42:03 -0000 Author: lwhsu Date: Thu Oct 29 14:42:02 2020 New Revision: 367134 URL: https://svnweb.freebsd.org/changeset/base/367134 Log: Remove superfluous `this` in comment PR: 250721 Submitted by: Hiroya EBINE MFC after: 3 days Modified: head/bin/echo/echo.c Modified: head/bin/echo/echo.c ============================================================================== --- head/bin/echo/echo.c Thu Oct 29 14:28:27 2020 (r367133) +++ head/bin/echo/echo.c Thu Oct 29 14:42:02 2020 (r367134) @@ -104,7 +104,7 @@ main(int argc, char *argv[]) len = strlen(argv[0]); /* - * If the next argument is NULL then this is this + * If the next argument is NULL then this is * the last argument, therefore we need to check * for a trailing \c. */ From owner-svn-src-head@freebsd.org Thu Oct 29 14:42:52 2020 Return-Path: Delivered-To: svn-src-head@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 E25D24536C4; Thu, 29 Oct 2020 14:42:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMSph5ffkz3bDr; Thu, 29 Oct 2020 14:42:52 +0000 (UTC) (envelope-from trasz@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 A368A2F2D9; Thu, 29 Oct 2020 14:42:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TEgqYi099817; Thu, 29 Oct 2020 14:42:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TEgqm8099816; Thu, 29 Oct 2020 14:42:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010291442.09TEgqm8099816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 29 Oct 2020 14:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367135 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 367135 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 14:42:52 -0000 Author: trasz Date: Thu Oct 29 14:42:51 2020 New Revision: 367135 URL: https://svnweb.freebsd.org/changeset/base/367135 Log: Fix typo. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_errno.h Modified: head/sys/compat/linux/linux_errno.h ============================================================================== --- head/sys/compat/linux/linux_errno.h Thu Oct 29 14:42:02 2020 (r367134) +++ head/sys/compat/linux/linux_errno.h Thu Oct 29 14:42:51 2020 (r367135) @@ -88,7 +88,7 @@ #define LINUX_EUNATCH 49 #define LINUX_ENOCSI 50 -#define LINUX_L2HLT 51 +#define LINUX_EL2HLT 51 #define LINUX_EBADE 52 #define LINUX_EBADR 53 #define LINUX_EXFULL 54 From owner-svn-src-head@freebsd.org Thu Oct 29 14:44:10 2020 Return-Path: Delivered-To: svn-src-head@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 BE4014538A4; Thu, 29 Oct 2020 14:44:10 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMSrB3Lg3z3bJM; Thu, 29 Oct 2020 14:44:10 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 563AB2F484; Thu, 29 Oct 2020 14:44:10 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TEiA3a099943; Thu, 29 Oct 2020 14:44:10 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TEiATK099942; Thu, 29 Oct 2020 14:44:10 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202010291444.09TEiATK099942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Thu, 29 Oct 2020 14:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367136 - head/bin/echo X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/bin/echo X-SVN-Commit-Revision: 367136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 14:44:10 -0000 Author: lwhsu Date: Thu Oct 29 14:44:09 2020 New Revision: 367136 URL: https://svnweb.freebsd.org/changeset/base/367136 Log: Whitespace cleanup MFC after: 3 days Modified: head/bin/echo/echo.c Modified: head/bin/echo/echo.c ============================================================================== --- head/bin/echo/echo.c Thu Oct 29 14:42:51 2020 (r367135) +++ head/bin/echo/echo.c Thu Oct 29 14:44:09 2020 (r367136) @@ -71,7 +71,7 @@ errexit(const char *prog, const char *reason) write(STDERR_FILENO, "\n", 1); exit(1); } - + int main(int argc, char *argv[]) { @@ -100,13 +100,12 @@ main(int argc, char *argv[]) while (argv[0] != NULL) { size_t len; - + len = strlen(argv[0]); /* - * If the next argument is NULL then this is - * the last argument, therefore we need to check - * for a trailing \c. + * If the next argument is NULL then this is the last argument, + * therefore we need to check for a trailing \c. */ if (argv[1] == NULL) { /* is there room for a '\c' and is there one? */ From owner-svn-src-head@freebsd.org Thu Oct 29 15:28:16 2020 Return-Path: Delivered-To: svn-src-head@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 6E276454DE0; Thu, 29 Oct 2020 15:28:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMTq423Nvz3f5k; Thu, 29 Oct 2020 15:28:16 +0000 (UTC) (envelope-from trasz@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 288EE2FC4B; Thu, 29 Oct 2020 15:28:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TFSGfV024689; Thu, 29 Oct 2020 15:28:16 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TFSGhw024688; Thu, 29 Oct 2020 15:28:16 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010291528.09TFSGhw024688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 29 Oct 2020 15:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367137 - head/sys/fs/nullfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/fs/nullfs X-SVN-Commit-Revision: 367137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 15:28:16 -0000 Author: trasz Date: Thu Oct 29 15:28:15 2020 New Revision: 367137 URL: https://svnweb.freebsd.org/changeset/base/367137 Log: Make it possible to mount nullfs(5) using plain mount(8) instead of mount_nullfs(8). Obviously you'd need to force mount(8) to not call mount_nullfs(8) to make use of it. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26934 Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Thu Oct 29 14:44:09 2020 (r367136) +++ head/sys/fs/nullfs/null_vfsops.c Thu Oct 29 15:28:15 2020 (r367137) @@ -104,7 +104,9 @@ nullfs_mount(struct mount *mp) /* * Get argument */ - error = vfs_getopt(mp->mnt_optnew, "target", (void **)&target, &len); + error = vfs_getopt(mp->mnt_optnew, "from", (void **)&target, &len); + if (error != 0) + error = vfs_getopt(mp->mnt_optnew, "target", (void **)&target, &len); if (error || target[len - 1] != '\0') return (EINVAL); From owner-svn-src-head@freebsd.org Thu Oct 29 15:36:21 2020 Return-Path: Delivered-To: svn-src-head@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 AD5294554DF; Thu, 29 Oct 2020 15:36:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMV0P3YQSz3fjs; Thu, 29 Oct 2020 15:36:21 +0000 (UTC) (envelope-from trasz@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 5D6212FB46; Thu, 29 Oct 2020 15:36:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TFaLiJ030974; Thu, 29 Oct 2020 15:36:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TFaLX3030973; Thu, 29 Oct 2020 15:36:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010291536.09TFaLX3030973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 29 Oct 2020 15:36:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367138 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 367138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 15:36:21 -0000 Author: trasz Date: Thu Oct 29 15:36:20 2020 New Revision: 367138 URL: https://svnweb.freebsd.org/changeset/base/367138 Log: Optimize set_syscall_retval for riscv by predicting the return value to be zero. Reviewed by: mhorne, kp MFC after: 2 weeks Sponsored by: EPSRC Differential Revision: https://reviews.freebsd.org/D26990 Modified: head/sys/riscv/riscv/vm_machdep.c Modified: head/sys/riscv/riscv/vm_machdep.c ============================================================================== --- head/sys/riscv/riscv/vm_machdep.c Thu Oct 29 15:28:15 2020 (r367137) +++ head/sys/riscv/riscv/vm_machdep.c Thu Oct 29 15:36:20 2020 (r367138) @@ -132,12 +132,14 @@ cpu_set_syscall_retval(struct thread *td, int error) frame = td->td_frame; - switch (error) { - case 0: + if (__predict_true(error == 0)) { frame->tf_a[0] = td->td_retval[0]; frame->tf_a[1] = td->td_retval[1]; frame->tf_t[0] = 0; /* syscall succeeded */ - break; + return; + } + + switch (error) { case ERESTART: frame->tf_sepc -= 4; /* prev instruction */ break; From owner-svn-src-head@freebsd.org Thu Oct 29 15:44:44 2020 Return-Path: Delivered-To: svn-src-head@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 BEA02455C2E; Thu, 29 Oct 2020 15:44:44 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMVB44l0mz3ghd; Thu, 29 Oct 2020 15:44:44 +0000 (UTC) (envelope-from trasz@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 864048068; Thu, 29 Oct 2020 15:44:44 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TFiiBt037134; Thu, 29 Oct 2020 15:44:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TFii5j037133; Thu, 29 Oct 2020 15:44:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202010291544.09TFii5j037133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 29 Oct 2020 15:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367139 - head/sys/compat/linprocfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linprocfs X-SVN-Commit-Revision: 367139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 15:44:44 -0000 Author: trasz Date: Thu Oct 29 15:44:44 2020 New Revision: 367139 URL: https://svnweb.freebsd.org/changeset/base/367139 Log: Make linprocfs(4) print a warning when there's not enough room to fill /proc/self/maps. Submitted by: dchagin (earlier version) Reviewed by: emaste (earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20576 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Thu Oct 29 15:36:20 2020 (r367138) +++ head/sys/compat/linprocfs/linprocfs.c Thu Oct 29 15:44:44 2020 (r367139) @@ -1252,6 +1252,10 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) *name ? " " : " ", name ); + if (error == -1) { + linux_msg(td, "cannot fill /proc/self/maps; " + "consider bumping PFS_MAXBUFSIZ"); + } if (freename) free(freename, M_TEMP); vm_map_lock_read(map); From owner-svn-src-head@freebsd.org Thu Oct 29 15:50:29 2020 Return-Path: Delivered-To: svn-src-head@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 6253345603C; Thu, 29 Oct 2020 15:50:29 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMVJh0hbfz3y1Z; Thu, 29 Oct 2020 15:50:27 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-ot1-f50.google.com with SMTP id a6so2664064otp.10; Thu, 29 Oct 2020 08:50:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JddzKiZTpZBAcjMy4/onhqAK0FPisa0e/72+tyBW0ig=; b=C3mVogBzEJy4UBz1fMigQhvxknlHyFclrkOJqXr2Q8RprESq+iZaHAKE/OWMJoNGUy 7foNSGPMAF0Iv79k5FA/bMRDIzbGPgO37dU5RQg0NG7bLZm7FfsxX18NHo4srbMMrnkW 8D+CqlKCQHS/YLi4sGN/c3S15XEuNzRxrwpJZtylIFDYzjQxj5iQiWKhgJxrfbWmCgT+ AARF2RirywqGWrG6Gmc2LCtiu6C1MB63VXZI21FYlhCfIXX6/LiDgfKIvj3XnNNjwbHj xQf8UXxShguS6N2y8qAV8w7T6htf3twz/zyMACComrKB1ELfW3yaPrqlb3Xlw/8zE89a /cmw== X-Gm-Message-State: AOAM5308At3A/6KCEH7KWZPLvgv2nBX41aMsRodgxPk3iBmk6wgSshVn YLIXU/juoVR2bKTwSWfPvUcOcI4BezSSvT1Oo/Y= X-Google-Smtp-Source: ABdhPJzUyfqLEZvavC8hbW7DiIJ6KGr7wnAEN0T6UgvwWywAqW8Mq+mLjaQuvKdAzUgdAHkNlRAsNPityZlqBbvjQGg= X-Received: by 2002:a9d:604e:: with SMTP id v14mr3562292otj.234.1603986627053; Thu, 29 Oct 2020 08:50:27 -0700 (PDT) MIME-Version: 1.0 References: <202010160958.09G9wBIq018387@repo.freebsd.org> <20201016104744.GU2643@kib.kiev.ua> In-Reply-To: <20201016104744.GU2643@kib.kiev.ua> From: Edward Napierala Date: Thu, 29 Oct 2020 15:50:15 +0000 Message-ID: Subject: Re: svn commit: r366748 - head/sys/fs/pseudofs To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CMVJh0hbfz3y1Z X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of etnapierala@gmail.com designates 209.85.210.50 as permitted sender) smtp.mailfrom=etnapierala@gmail.com X-Spamd-Result: default: False [-2.17 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.84)[-0.841]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-0.97)[-0.966]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; RWL_MAILSPIKE_GOOD(0.00)[209.85.210.50:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.36)[-0.361]; RCVD_IN_DNSWL_NONE(0.00)[209.85.210.50:from]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[trasz@freebsd.org,etnapierala@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[trasz@freebsd.org,etnapierala@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 15:50:29 -0000 On Fri, 16 Oct 2020 at 11:47, Konstantin Belousov wrote: > > On Fri, Oct 16, 2020 at 09:58:11AM +0000, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Fri Oct 16 09:58:10 2020 > > New Revision: 366748 > > URL: https://svnweb.freebsd.org/changeset/base/366748 > > > > Log: > > Bump pseudofs size limit from 128kB to 1MB. The old limit could result > > in process' memory maps being truncated. > New limit could as well. True. With r367139 we'll at least emit a warning when that happens. From owner-svn-src-head@freebsd.org Thu Oct 29 16:55:51 2020 Return-Path: Delivered-To: svn-src-head@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 B88EB458403; Thu, 29 Oct 2020 16:55:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMWm74P9Vz42pZ; Thu, 29 Oct 2020 16:55:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:f8bd:c375:ada9:5a9a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 165CC256B3; Thu, 29 Oct 2020 16:55:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r367123 - in head: sbin/ifconfig sys/dev/mlx5/mlx5_en sys/kern sys/net sys/netinet sys/sys From: John Baldwin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010290023.09T0NGkt059615@repo.freebsd.org> Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <990a2614-5387-2803-0a59-b22a10dacdcb@FreeBSD.org> Date: Thu, 29 Oct 2020 09:55:49 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202010290023.09T0NGkt059615@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 16:55:51 -0000 On 10/28/20 5:23 PM, John Baldwin wrote: > Author: jhb > Date: Thu Oct 29 00:23:16 2020 > New Revision: 367123 > URL: https://svnweb.freebsd.org/changeset/base/367123 > > Log: > Support hardware rate limiting (pacing) with TLS offload. > > ... > > Modified: head/sys/net/if.h > ============================================================================== > --- head/sys/net/if.h Thu Oct 29 00:03:19 2020 (r367122) > +++ head/sys/net/if.h Thu Oct 29 00:23:16 2020 (r367123) > @@ -250,6 +250,7 @@ struct if_data { > #define IFCAP_TXTLS6 0x10000000 /* can do TLS encryption and segmentation for TCP6 */ > #define IFCAP_VXLAN_HWCSUM 0x20000000 /* can do IFCAN_HWCSUM on VXLANs */ > #define IFCAP_VXLAN_HWTSO 0x40000000 /* can do IFCAP_TSO on VXLANs */ > +#define IFCAP_TXTLS_RTLMT 0x80000000 /* can do TLS with rate limiting */ FYI, this is the last available bit in if_capabilities/if_capenable. We will probably have to think about extending these to an array at some point. -- John Baldwin From owner-svn-src-head@freebsd.org Thu Oct 29 18:34:47 2020 Return-Path: Delivered-To: svn-src-head@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 E72F445A3D6; Thu, 29 Oct 2020 18:34:47 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMYyH5sLhz47rf; Thu, 29 Oct 2020 18:34:47 +0000 (UTC) (envelope-from fernape@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 AC66BA30C; Thu, 29 Oct 2020 18:34:47 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TIYlJ9040547; Thu, 29 Oct 2020 18:34:47 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TIYlrb040546; Thu, 29 Oct 2020 18:34:47 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202010291834.09TIYlrb040546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Thu, 29 Oct 2020 18:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367141 - head/usr.bin/fetch X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/fetch X-SVN-Commit-Revision: 367141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:34:48 -0000 Author: fernape (ports committer) Date: Thu Oct 29 18:34:47 2020 New Revision: 367141 URL: https://svnweb.freebsd.org/changeset/base/367141 Log: fetch(1): Add EXAMPLES section Add a few examples covering flags: 1, R, a, o, q, r, s, v Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26946 Modified: head/usr.bin/fetch/fetch.1 Modified: head/usr.bin/fetch/fetch.1 ============================================================================== --- head/usr.bin/fetch/fetch.1 Thu Oct 29 18:29:22 2020 (r367140) +++ head/usr.bin/fetch/fetch.1 Thu Oct 29 18:34:47 2020 (r367141) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6, 2018 +.Dd October 29, 2020 .Dt FETCH 1 .Os .Sh NAME @@ -384,6 +384,51 @@ If the argument is used and the remote file is not newer than the specified file then the command will still return success, although no file is transferred. +.Sh EXAMPLES +Silently try to fetch the URLs passed as parameters. +The first one will fail. +If the second URL succeeds the third one will not be tried: +.Bd -literal -offset indent +$ fetch -1 -q https://www.freebsd.org/bad.html \\ + ftp.freebsd.org/pub/FreeBSD/README.TXT \\ + https://www.fake.url +fetch: https://www.freebsd.org/bad.html: Not Found +.Ed +.Pp +Be verbose when retrieving the +.Ql README.TXT +file: +.Bd -literal -offset indent +$ fetch -v ftp.freebsd.org/pub/FreeBSD/README.TXT +resolving server address: ftp.freebsd.org:80 +requesting http://ftp.freebsd.org/pub/FreeBSD/README.TXT +local size / mtime: 4259 / 1431015519 +remote size / mtime: 4259 / 1431015519 +README.TXT 4259 B 44 MBps 00s +.Ed +.Pp +Quietly save the +.Ql README.TXT file as +.Ql myreadme.txt +and do not delete the output file under any circumstances: +.Bd -literal -offset indent +fetch -o myreadme.txt -q -R ftp.freebsd.org/pub/FreeBSD/README.TXT +.Ed +.Pp +Print the size of the requested file and identify the request with a custom user +agent string: +.Bd -literal -offset indent +$ fetch -s ftp.freebsd.org/pub/FreeBSD/README.TXT +--user-agent="Mozilla/5.0 (X11; FreeBSD x86_64; rv:78.0) Gecko/20100101" +3513231 +.Ed +.Pp +Restart the transfer of the +.Ql README.TXT +file and retry the transfer upon soft failures: +.Bd -literal -offset indent +$ fetch -a -r http://ftp.freebsd.org/pub/FreeBSD/README.TXT +.Ed .Sh SEE ALSO .Xr fetch 3 , .Xr phttpget 8 From owner-svn-src-head@freebsd.org Thu Oct 29 18:35:15 2020 Return-Path: Delivered-To: svn-src-head@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 A916A45A4ED; Thu, 29 Oct 2020 18:35:15 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMYyq3yr2z488G; Thu, 29 Oct 2020 18:35:15 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (c-98-207-126-143.hsd1.ca.comcast.net [98.207.126.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id DD53525F90; Thu, 29 Oct 2020 18:35:14 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.42.20101102 Date: Thu, 29 Oct 2020 11:35:11 -0700 Subject: Re: svn commit: r367130 - in head/sys: kern sys From: Ravi Pokala To: Mateusz Guzik , , , Message-ID: Thread-Topic: svn commit: r367130 - in head/sys: kern sys References: <202010291256.09TCu2BF025339@repo.freebsd.org> In-Reply-To: <202010291256.09TCu2BF025339@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:35:15 -0000 Hi Mateusz, You define NAMEI_DBG_HADSTARTDIR, you check for it being set, but it doesn'= t look like you actually set it anywhere...? Thanks, Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: on behalf of Mateusz Guzik Date: 2020-10-29, Thursday at 05:56 To: , , Subject: svn commit: r367130 - in head/sys: kern sys Author: mjg Date: Thu Oct 29 12:56:02 2020 New Revision: 367130 URL: https://svnweb.freebsd.org/changeset/base/367130 Log: vfs: add NDREINIT to facilitate repeated namei calls struct nameidata mixes caller arguments, internal state and output, w= hich can be quite error prone. Recent addition of valdiating ni_resflags uncovered a caller which co= uld repeatedly call namei, effectively operating on partially populated s= tate. Add bare minimium validation this does not happen. The real fix would decouple aforementioned state. Reported by: pho Tested by: pho (different variant) Modified: head/sys/kern/vfs_lookup.c head/sys/kern/vfs_vnops.c head/sys/sys/namei.h Modified: head/sys/kern/vfs_lookup.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D --- head/sys/kern/vfs_lookup.c Thu Oct 29 11:19:47 2020 (r367129) +++ head/sys/kern/vfs_lookup.c Thu Oct 29 12:56:02 2020 (r367130) @@ -502,6 +502,11 @@ namei(struct nameidata *ndp) cnp =3D &ndp->ni_cnd; td =3D cnp->cn_thread; #ifdef INVARIANTS + KASSERT((ndp->ni_debugflags & NAMEI_DBG_CALLED) =3D=3D 0, + ("%s: repeated call to namei without NDREINIT", __func__)); + KASSERT(ndp->ni_debugflags =3D=3D NAMEI_DBG_INITED, + ("%s: bad debugflags %d", __func__, ndp->ni_debugflags)); + ndp->ni_debugflags |=3D NAMEI_DBG_CALLED; /* * For NDVALIDATE. * Modified: head/sys/kern/vfs_vnops.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D --- head/sys/kern/vfs_vnops.c Thu Oct 29 11:19:47 2020 (r367129) +++ head/sys/kern/vfs_vnops.c Thu Oct 29 12:56:02 2020 (r367130) @@ -259,6 +259,7 @@ restart: if ((error =3D vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) !=3D 0) return (error); + NDREINIT(ndp); goto restart; } if ((vn_open_flags & VN_OPEN_NAMECACHE) !=3D 0) Modified: head/sys/sys/namei.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D --- head/sys/sys/namei.h Thu Oct 29 11:19:47 2020 (r367129) +++ head/sys/sys/namei.h Thu Oct 29 12:56:02 2020 (r367130) @@ -95,11 +95,15 @@ struct nameidata { */ u_int ni_resflags; /* + * Debug for validating API use by the callers. + */ + u_short ni_debugflags; + /* * Shared between namei and lookup/commit routines. */ + u_short ni_loopcnt; /* count of symlinks encountered */ size_t ni_pathlen; /* remaining chars in path */ char *ni_next; /* next location in pathname */ - u_int ni_loopcnt; /* count of symlinks encountered */ /* * Lookup parameters: this structure describes the subset of * information from the nameidata structure that is passed @@ -122,7 +126,15 @@ int cache_fplookup(struct nameidata *ndp, enum cac= he_f * * If modifying the list make sure to check whether NDVALIDATE needs u= pdating. */ + /* + * Debug. + */ +#define NAMEI_DBG_INITED 0x0001 +#define NAMEI_DBG_CALLED 0x0002 +#define NAMEI_DBG_HADSTARTDIR 0x0004 + +/* * namei operational modifier flags, stored in ni_cnd.flags */ #define NC_NOMAKEENTRY 0x0001 /* name must not be added to cache */ @@ -215,8 +227,18 @@ int cache_fplookup(struct nameidata *ndp, enum cac= he_f */ #ifdef INVARIANTS #define NDINIT_PREFILL(arg) memset(arg, 0xff, sizeof(*arg)) +#define NDINIT_DBG(arg) { (arg)->ni_debugflags =3D NAMEI_DBG_INITED; } +#define NDREINIT_DBG(arg) { \ + if (((arg)->ni_debugflags & NAMEI_DBG_INITED) =3D=3D 0) \ + panic("namei data not inited"); \ + if (((arg)->ni_debugflags & NAMEI_DBG_HADSTARTDIR) !=3D 0) \ + panic("NDREINIT on namei data with NAMEI_DBG_HADSTARTDIR"); \ + (arg)->ni_debugflags =3D NAMEI_DBG_INITED; \ +} #else #define NDINIT_PREFILL(arg) do { } while (0) +#define NDINIT_DBG(arg) do { } while (0) +#define NDREINIT_DBG(arg) do { } while (0) #endif #define NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, startdir, rig= htsp, td) \ @@ -225,6 +247,7 @@ do { \ cap_rights_t *_rightsp =3D (rightsp); \ MPASS(_rightsp !=3D NULL); \ NDINIT_PREFILL(_ndp); \ + NDINIT_DBG(_ndp); \ _ndp->ni_cnd.cn_nameiop =3D op; \ _ndp->ni_cnd.cn_flags =3D flags; \ _ndp->ni_segflg =3D segflg; \ @@ -235,6 +258,13 @@ do { \ filecaps_init(&_ndp->ni_filecaps); \ _ndp->ni_cnd.cn_thread =3D td; \ _ndp->ni_rightsneeded =3D _rightsp; \ +} while (0) + +#define NDREINIT(ndp) do { \ + struct nameidata *_ndp =3D (ndp); \ + NDREINIT_DBG(_ndp); \ + _ndp->ni_resflags =3D 0; \ + _ndp->ni_startdir =3D NULL; \ } while (0) #define NDF_NO_DVP_RELE 0x00000001 From owner-svn-src-head@freebsd.org Thu Oct 29 18:37:21 2020 Return-Path: Delivered-To: svn-src-head@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 27F4B45A88B; Thu, 29 Oct 2020 18:37:21 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMZ1F0KVFz489B; Thu, 29 Oct 2020 18:37:21 +0000 (UTC) (envelope-from fernape@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 E3349A036; Thu, 29 Oct 2020 18:37:20 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TIbKBk040708; Thu, 29 Oct 2020 18:37:20 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TIbKap040707; Thu, 29 Oct 2020 18:37:20 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202010291837.09TIbKap040707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Thu, 29 Oct 2020 18:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367142 - head/usr.bin/fmt X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/fmt X-SVN-Commit-Revision: 367142 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:37:21 -0000 Author: fernape (ports committer) Date: Thu Oct 29 18:37:20 2020 New Revision: 367142 URL: https://svnweb.freebsd.org/changeset/base/367142 Log: fmt(1): Add EXAMPLES section Very small EXAMPLES section. While here, remove reference to nroff(1). Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26947 Modified: head/usr.bin/fmt/fmt.1 Modified: head/usr.bin/fmt/fmt.1 ============================================================================== --- head/usr.bin/fmt/fmt.1 Thu Oct 29 18:34:47 2020 (r367141) +++ head/usr.bin/fmt/fmt.1 Thu Oct 29 18:37:20 2020 (r367142) @@ -30,7 +30,7 @@ .\" .\" Modified by Gareth McCaughan to describe the new version of `fmt' .\" rather than the old one. -.Dd December 1, 2017 +.Dd October 29, 2020 .Dt FMT 1 .Os .Sh NAME @@ -89,10 +89,6 @@ Try to format mail header lines contained in the input Format lines beginning with a .Ql \&. (dot) character. -Normally, -.Nm -does not fill these lines, for compatibility with -.Xr nroff 1 . .It Fl p Allow indented paragraphs. Without the @@ -159,10 +155,23 @@ environment variables affect the execution of .Nm as described in .Xr environ 7 . +.Sh EXAMPLES +Center the text in standard input: +.Bd -literal -offset indent +$ echo -e 'The merit of all things\enlies\enin their difficulty' | fmt -c + The merit of all things + lies + in their difficulty +.Ed +.Pp +Format the text in standard input collapsing spaces: +.Bd -literal -offset indent +$ echo -e 'Multiple spaces will be collapsed' | fmt -s +Multiple spaces will be collapsed +.Ed .Sh SEE ALSO .Xr fold 1 , -.Xr mail 1 , -.Xr nroff 1 +.Xr mail 1 .Sh HISTORY The .Nm From owner-svn-src-head@freebsd.org Thu Oct 29 18:39:05 2020 Return-Path: Delivered-To: svn-src-head@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 6508E45A678; Thu, 29 Oct 2020 18:39:05 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMZ3F22p9z4942; Thu, 29 Oct 2020 18:39:05 +0000 (UTC) (envelope-from fernape@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 2989EA295; Thu, 29 Oct 2020 18:39:05 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TId53t040822; Thu, 29 Oct 2020 18:39:05 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TId5WY040821; Thu, 29 Oct 2020 18:39:05 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202010291839.09TId5WY040821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Thu, 29 Oct 2020 18:39:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367143 - head/usr.bin/fold X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/fold X-SVN-Commit-Revision: 367143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:39:05 -0000 Author: fernape (ports committer) Date: Thu Oct 29 18:39:04 2020 New Revision: 367143 URL: https://svnweb.freebsd.org/changeset/base/367143 Log: fold(1): Add EXAMPLES section A couple of examples covering -s and -w flags. Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26948 Modified: head/usr.bin/fold/fold.1 Modified: head/usr.bin/fold/fold.1 ============================================================================== --- head/usr.bin/fold/fold.1 Thu Oct 29 18:37:20 2020 (r367142) +++ head/usr.bin/fold/fold.1 Thu Oct 29 18:39:04 2020 (r367143) @@ -28,7 +28,7 @@ .\" @(#)fold.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 2015 +.Dd October 29, 2020 .Dt FOLD 1 .Os .Sh NAME @@ -76,6 +76,22 @@ environment variables affect the execution of .Nm as described in .Xr environ 7 . +.Sh EXAMPLES +Fold text in standard input with a width of 20 columns: +.Bd -literal -offset indent +$ echo "I am smart enough to know that I am dumb" | fold -w 15 +I am smart enou +gh to know that + I am dumb +.Ed +.Pp +Same as above but breaking lines after the last blank character: +.Bd -literal -offset indent +$ echo "I am smart enough to know that I am dumb" | fold -s -w 15 +I am smart +enough to know +that I am dumb +.Ed .Sh SEE ALSO .Xr expand 1 , .Xr fmt 1 From owner-svn-src-head@freebsd.org Thu Oct 29 18:43:38 2020 Return-Path: Delivered-To: svn-src-head@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 8C0C945A9AE; Thu, 29 Oct 2020 18:43:38 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMZ8V38sbz49YK; Thu, 29 Oct 2020 18:43:38 +0000 (UTC) (envelope-from mjg@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 4F9CFA04D; Thu, 29 Oct 2020 18:43:38 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TIhcN4047029; Thu, 29 Oct 2020 18:43:38 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TIhcUo047028; Thu, 29 Oct 2020 18:43:38 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010291843.09TIhcUo047028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 29 Oct 2020 18:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367144 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 367144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:43:38 -0000 Author: mjg Date: Thu Oct 29 18:43:37 2020 New Revision: 367144 URL: https://svnweb.freebsd.org/changeset/base/367144 Log: vfs: add NAMEI_DBG_HADSTARTDIR handling lost in rewrite Noted by: rpokala Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Thu Oct 29 18:39:04 2020 (r367143) +++ head/sys/kern/vfs_lookup.c Thu Oct 29 18:43:37 2020 (r367144) @@ -507,6 +507,8 @@ namei(struct nameidata *ndp) KASSERT(ndp->ni_debugflags == NAMEI_DBG_INITED, ("%s: bad debugflags %d", __func__, ndp->ni_debugflags)); ndp->ni_debugflags |= NAMEI_DBG_CALLED; + if (ndp->ni_startdir != NULL) + ndp->ni_debugflags |= NAMEI_DBG_HADSTARTDIR; /* * For NDVALIDATE. * From owner-svn-src-head@freebsd.org Thu Oct 29 18:44:19 2020 Return-Path: Delivered-To: svn-src-head@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 B4EED45A9BB; Thu, 29 Oct 2020 18:44:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMZ9H2n42z49tc; Thu, 29 Oct 2020 18:44:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x344.google.com with SMTP id e2so813700wme.1; Thu, 29 Oct 2020 11:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=tBJcQl8tRLBurowHbTB6wpmNCLPzogv7WnoGzueIZp4=; b=A6XEUveCTtcDIaJMwxZmbk/q0UXE8kL77J15r2q5ut5nGp+eXJCuhueXDwFHxC0nVm ZezVHNcJTMDiecDAzI+XuXS/GNwreGuXBxFbt62UhnIG8flRY2q7BBtEyIaTlzThC7/R Qabarj+YjX9izlqXgBwvHRtgQDpk/jnSeTD3/dGT79MLNrb3HGUgEOF2/OdSMyEESAQM too/+WkS5lTjEAUGsH5nhTaaJ6vHNCza6c3KOjzokTxgtQiOvRYUHuOeh+7Id2TiLvd+ R2TTW8KtMXM7hC9l940i0JUGgfX0u6wEED3I75JwlsWoKkMeKBmrLmF4U2J2gFgyfkk5 WCwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=tBJcQl8tRLBurowHbTB6wpmNCLPzogv7WnoGzueIZp4=; b=ABCj2isWm7AGbmwIXOlrRiaHgWG0qEgHzTFmVnbELS55g6UabQjyLTYj6YCFCclu/+ kuOXQKxGyefEgxSqVdvOZ63DHcSt5E/hNFa3lNd3rGX6xAvxWETrlHgcEzLYrvXqQfnr i6mpbPOyJ8tIKSEsU7DYDwILAVeX+9bNwxkGMYHleSfoAxe/a98r1B9eY6GaRN/YgXxC sVx5xAbmRo0USTIklDEDIn+X8Hjx4gWkNLzfGOJ8pNJjucjGQO6U77UcqPjq8yWew6NI YVleSJO8wOjkr61Ida5edH5CayM7/Zjt0GyaKWYaiRZlJO0gd0H2iR/AeQpewNa6fnbA S/Zg== X-Gm-Message-State: AOAM531eY8/NBjeLx7nEkFeKtKZdCObo6RN2jsWEgTVn/m7XpoM6/f5D cm4cq4xzOa0EImWH7daty3cipwg65JgE+MMwyYmveHOEoaE= X-Google-Smtp-Source: ABdhPJzVr4Lmg3aWGvC0qVVv8RkhwvevuGirufiHxE0HyH4pgN1TyKC9BXTRiYSo9CDvaEZzNNSzoS5hEXxTVq6yrwc= X-Received: by 2002:a1c:2441:: with SMTP id k62mr615952wmk.10.1603997057189; Thu, 29 Oct 2020 11:44:17 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:4c4f:0:0:0:0:0 with HTTP; Thu, 29 Oct 2020 11:44:16 -0700 (PDT) In-Reply-To: References: <202010291256.09TCu2BF025339@repo.freebsd.org> From: Mateusz Guzik Date: Thu, 29 Oct 2020 19:44:16 +0100 Message-ID: Subject: Re: svn commit: r367130 - in head/sys: kern sys To: Ravi Pokala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4CMZ9H2n42z49tc X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:44:19 -0000 Indeed! Fixed in r367144, thanks. On 10/29/20, Ravi Pokala wrote: > Hi Mateusz, > > You define NAMEI_DBG_HADSTARTDIR, you check for it being set, but it does= n't > look like you actually set it anywhere...? > > Thanks, > > Ravi (rpokala@) > > =EF=BB=BF-----Original Message----- > From: on behalf of Mateusz Guzik > > Date: 2020-10-29, Thursday at 05:56 > To: , , > > Subject: svn commit: r367130 - in head/sys: kern sys > > Author: mjg > Date: Thu Oct 29 12:56:02 2020 > New Revision: 367130 > URL: https://svnweb.freebsd.org/changeset/base/367130 > > Log: > vfs: add NDREINIT to facilitate repeated namei calls > > struct nameidata mixes caller arguments, internal state and output, > which > can be quite error prone. > > Recent addition of valdiating ni_resflags uncovered a caller which > could > repeatedly call namei, effectively operating on partially populated > state. > > Add bare minimium validation this does not happen. The real fix wou= ld > decouple aforementioned state. > > Reported by: pho > Tested by: pho (different variant) > > Modified: > head/sys/kern/vfs_lookup.c > head/sys/kern/vfs_vnops.c > head/sys/sys/namei.h > > Modified: head/sys/kern/vfs_lookup.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/vfs_lookup.c Thu Oct 29 11:19:47 2020 (r367129) > +++ head/sys/kern/vfs_lookup.c Thu Oct 29 12:56:02 2020 (r367130) > @@ -502,6 +502,11 @@ namei(struct nameidata *ndp) > cnp =3D &ndp->ni_cnd; > td =3D cnp->cn_thread; > #ifdef INVARIANTS > + KASSERT((ndp->ni_debugflags & NAMEI_DBG_CALLED) =3D=3D 0, > + ("%s: repeated call to namei without NDREINIT", __func__)); > + KASSERT(ndp->ni_debugflags =3D=3D NAMEI_DBG_INITED, > + ("%s: bad debugflags %d", __func__, ndp->ni_debugflags)); > + ndp->ni_debugflags |=3D NAMEI_DBG_CALLED; > /* > * For NDVALIDATE. > * > > Modified: head/sys/kern/vfs_vnops.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/vfs_vnops.c Thu Oct 29 11:19:47 2020 (r367129) > +++ head/sys/kern/vfs_vnops.c Thu Oct 29 12:56:02 2020 (r367130) > @@ -259,6 +259,7 @@ restart: > if ((error =3D vn_start_write(NULL, &mp, > V_XSLEEP | PCATCH)) !=3D 0) > return (error); > + NDREINIT(ndp); > goto restart; > } > if ((vn_open_flags & VN_OPEN_NAMECACHE) !=3D 0) > > Modified: head/sys/sys/namei.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/namei.h Thu Oct 29 11:19:47 2020 (r367129) > +++ head/sys/sys/namei.h Thu Oct 29 12:56:02 2020 (r367130) > @@ -95,11 +95,15 @@ struct nameidata { > */ > u_int ni_resflags; > /* > + * Debug for validating API use by the callers. > + */ > + u_short ni_debugflags; > + /* > * Shared between namei and lookup/commit routines. > */ > + u_short ni_loopcnt; /* count of symlinks encountered */ > size_t ni_pathlen; /* remaining chars in path */ > char *ni_next; /* next location in pathname */ > - u_int ni_loopcnt; /* count of symlinks encountered */ > /* > * Lookup parameters: this structure describes the subset of > * information from the nameidata structure that is passed > @@ -122,7 +126,15 @@ int cache_fplookup(struct nameidata *ndp, enum > cache_f > * > * If modifying the list make sure to check whether NDVALIDATE needs > updating. > */ > + > /* > + * Debug. > + */ > +#define NAMEI_DBG_INITED 0x0001 > +#define NAMEI_DBG_CALLED 0x0002 > +#define NAMEI_DBG_HADSTARTDIR 0x0004 > + > +/* > * namei operational modifier flags, stored in ni_cnd.flags > */ > #define NC_NOMAKEENTRY 0x0001 /* name must not be added to cache */ > @@ -215,8 +227,18 @@ int cache_fplookup(struct nameidata *ndp, enum > cache_f > */ > #ifdef INVARIANTS > #define NDINIT_PREFILL(arg) memset(arg, 0xff, sizeof(*arg)) > +#define NDINIT_DBG(arg) { (arg)->ni_debugflags =3D NAMEI_DBG_INITED= ; } > +#define NDREINIT_DBG(arg) { \ > + if (((arg)->ni_debugflags & NAMEI_DBG_INITED) =3D=3D 0) \ > + panic("namei data not inited"); \ > + if (((arg)->ni_debugflags & NAMEI_DBG_HADSTARTDIR) !=3D 0) \ > + panic("NDREINIT on namei data with NAMEI_DBG_HADSTARTDIR"); \ > + (arg)->ni_debugflags =3D NAMEI_DBG_INITED; \ > +} > #else > #define NDINIT_PREFILL(arg) do { } while (0) > +#define NDINIT_DBG(arg) do { } while (0) > +#define NDREINIT_DBG(arg) do { } while (0) > #endif > > #define NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, startdir, > rightsp, td) \ > @@ -225,6 +247,7 @@ do { \ > cap_rights_t *_rightsp =3D (rightsp); \ > MPASS(_rightsp !=3D NULL); \ > NDINIT_PREFILL(_ndp); \ > + NDINIT_DBG(_ndp); \ > _ndp->ni_cnd.cn_nameiop =3D op; \ > _ndp->ni_cnd.cn_flags =3D flags; \ > _ndp->ni_segflg =3D segflg; \ > @@ -235,6 +258,13 @@ do { \ > filecaps_init(&_ndp->ni_filecaps); \ > _ndp->ni_cnd.cn_thread =3D td; \ > _ndp->ni_rightsneeded =3D _rightsp; \ > +} while (0) > + > +#define NDREINIT(ndp) do { \ > + struct nameidata *_ndp =3D (ndp); \ > + NDREINIT_DBG(_ndp); \ > + _ndp->ni_resflags =3D 0; \ > + _ndp->ni_startdir =3D NULL; \ > } while (0) > > #define NDF_NO_DVP_RELE 0x00000001 > > > --=20 Mateusz Guzik From owner-svn-src-head@freebsd.org Thu Oct 29 18:47:38 2020 Return-Path: Delivered-To: svn-src-head@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 9DAA545AC96 for ; Thu, 29 Oct 2020 18:47:38 +0000 (UTC) (envelope-from xtouqh@icloud.com) Received: from st43p00im-zteg10062001.me.com (st43p00im-zteg10062001.me.com [17.58.63.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMZF55Wkfz4BrM for ; Thu, 29 Oct 2020 18:47:37 +0000 (UTC) (envelope-from xtouqh@icloud.com) Received: from [192.168.1.6] (unknown [91.240.124.157]) by st43p00im-zteg10062001.me.com (Postfix) with ESMTPSA id D39486C096F; Thu, 29 Oct 2020 18:47:28 +0000 (UTC) Subject: Re: svn commit: r367142 - head/usr.bin/fmt To: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010291837.09TIbKap040707@repo.freebsd.org> From: xtouqh@icloud.com Message-ID: <5bc7ce7a-c5d4-21e5-7a7c-e381e66b2b2f@icloud.com> Date: Thu, 29 Oct 2020 21:47:27 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <202010291837.09TIbKap040707@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-10-29_11:2020-10-29, 2020-10-29 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2010290129 X-Rspamd-Queue-Id: 4CMZF55Wkfz4BrM X-Spamd-Bar: ------- X-Spamd-Result: default: False [-7.72 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[icloud.com]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16]; DKIM_TRACE(0.00)[icloud.com:+]; DMARC_POLICY_ALLOW(-0.50)[icloud.com,quarantine]; NEURAL_HAM_SHORT(-0.74)[-0.739]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[icloud.com]; ASN(0.00)[asn:714, ipnet:17.58.63.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.978]; R_DKIM_ALLOW(-0.20)[icloud.com:s=1a1hai]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.01)[-1.006]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_LOW(-1.00)[icloud.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NO_DN(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[17.58.63.166:from]; WHITELIST_SPF_DKIM(-3.00)[icloud.com:d:+,icloud.com:s:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:47:38 -0000 Fernando Apesteguía wrote: > Author: fernape (ports committer) > Date: Thu Oct 29 18:37:20 2020 > New Revision: 367142 > URL: https://svnweb.freebsd.org/changeset/base/367142 > > Log: > fmt(1): Add EXAMPLES section > > Very small EXAMPLES section. > > While here, remove reference to nroff(1). > > Approved by: manpages (bcr@) > Differential Revision: https://reviews.freebsd.org/D26947 > > Modified: > head/usr.bin/fmt/fmt.1 > > Modified: head/usr.bin/fmt/fmt.1 > ============================================================================== > --- head/usr.bin/fmt/fmt.1 Thu Oct 29 18:34:47 2020 (r367141) > +++ head/usr.bin/fmt/fmt.1 Thu Oct 29 18:37:20 2020 (r367142) > @@ -30,7 +30,7 @@ > .\" > .\" Modified by Gareth McCaughan to describe the new version of `fmt' > .\" rather than the old one. > -.Dd December 1, 2017 > +.Dd October 29, 2020 > .Dt FMT 1 > .Os > .Sh NAME > @@ -89,10 +89,6 @@ Try to format mail header lines contained in the input > Format lines beginning with a > .Ql \&. > (dot) character. > -Normally, > -.Nm > -does not fill these lines, for compatibility with > -.Xr nroff 1 . Was the behavior of fmt(1) really changed? If not, you could just replace ".Xr nroff 1 ." with ".Nm nroff . ". > .It Fl p > Allow indented paragraphs. > Without the > @@ -159,10 +155,23 @@ environment variables affect the execution of > .Nm > as described in > .Xr environ 7 . > +.Sh EXAMPLES > +Center the text in standard input: > +.Bd -literal -offset indent > +$ echo -e 'The merit of all things\enlies\enin their difficulty' | fmt -c > + The merit of all things > + lies > + in their difficulty > +.Ed > +.Pp > +Format the text in standard input collapsing spaces: > +.Bd -literal -offset indent > +$ echo -e 'Multiple spaces will be collapsed' | fmt -s > +Multiple spaces will be collapsed > +.Ed > .Sh SEE ALSO > .Xr fold 1 , > -.Xr mail 1 , > -.Xr nroff 1 > +.Xr mail 1 > .Sh HISTORY > The > .Nm From owner-svn-src-head@freebsd.org Thu Oct 29 18:52:08 2020 Return-Path: Delivered-To: svn-src-head@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 157F745AFF3 for ; Thu, 29 Oct 2020 18:52:08 +0000 (UTC) (envelope-from xtouqh@icloud.com) Received: from st43p00im-ztfb10063301.me.com (st43p00im-ztfb10063301.me.com [17.58.63.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMZLH2qXvz4BHx for ; Thu, 29 Oct 2020 18:52:07 +0000 (UTC) (envelope-from xtouqh@icloud.com) Received: from [192.168.1.6] (unknown [91.240.124.157]) by st43p00im-ztfb10063301.me.com (Postfix) with ESMTPSA id 33884A401D6; Thu, 29 Oct 2020 18:52:00 +0000 (UTC) Subject: Re: svn commit: r367141 - head/usr.bin/fetch To: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010291834.09TIYlrb040546@repo.freebsd.org> From: xtouqh@icloud.com Message-ID: <023d1414-cc24-8c4b-fd11-02bd4d5ece40@icloud.com> Date: Thu, 29 Oct 2020 21:51:58 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <202010291834.09TIYlrb040546@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-10-29_12:2020-10-29, 2020-10-29 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2010290129 X-Rspamd-Queue-Id: 4CMZLH2qXvz4BHx X-Spamd-Bar: ------- X-Spamd-Result: default: False [-7.72 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16:c]; FREEMAIL_FROM(0.00)[icloud.com]; DKIM_TRACE(0.00)[icloud.com:+]; DMARC_POLICY_ALLOW(-0.50)[icloud.com,quarantine]; NEURAL_HAM_SHORT(-0.73)[-0.727]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[icloud.com]; ASN(0.00)[asn:714, ipnet:17.58.63.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.982]; R_DKIM_ALLOW(-0.20)[icloud.com:s=1a1hai]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.01)[-1.007]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_LOW(-1.00)[icloud.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NO_DN(0.00)[]; WHITELIST_SPF_DKIM(-3.00)[icloud.com:d:+,icloud.com:s:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[17.58.63.179:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:52:08 -0000 Fernando Apesteguía wrote: > Author: fernape (ports committer) > Date: Thu Oct 29 18:34:47 2020 > New Revision: 367141 > URL: https://svnweb.freebsd.org/changeset/base/367141 > > Log: > fetch(1): Add EXAMPLES section > > Add a few examples covering flags: 1, R, a, o, q, r, s, v > > Approved by: manpages (bcr@) > Differential Revision: https://reviews.freebsd.org/D26946 > > Modified: > head/usr.bin/fetch/fetch.1 > > Modified: head/usr.bin/fetch/fetch.1 > ============================================================================== > --- head/usr.bin/fetch/fetch.1 Thu Oct 29 18:29:22 2020 (r367140) > +++ head/usr.bin/fetch/fetch.1 Thu Oct 29 18:34:47 2020 (r367141) > @@ -30,7 +30,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd May 6, 2018 > +.Dd October 29, 2020 > .Dt FETCH 1 > .Os > .Sh NAME > @@ -384,6 +384,51 @@ If the > argument is used and the remote file is not newer than the > specified file then the command will still return success, > although no file is transferred. > +.Sh EXAMPLES > +Silently try to fetch the URLs passed as parameters. > +The first one will fail. > +If the second URL succeeds the third one will not be tried: > +.Bd -literal -offset indent > +$ fetch -1 -q https://www.freebsd.org/bad.html \\ > + ftp.freebsd.org/pub/FreeBSD/README.TXT \\ > + https://www.fake.url > +fetch: https://www.freebsd.org/bad.html: Not Found > +.Ed > +.Pp > +Be verbose when retrieving the > +.Ql README.TXT > +file: > +.Bd -literal -offset indent > +$ fetch -v ftp.freebsd.org/pub/FreeBSD/README.TXT > +resolving server address: ftp.freebsd.org:80 > +requesting http://ftp.freebsd.org/pub/FreeBSD/README.TXT > +local size / mtime: 4259 / 1431015519 > +remote size / mtime: 4259 / 1431015519 > +README.TXT 4259 B 44 MBps 00s > +.Ed > +.Pp > +Quietly save the > +.Ql README.TXT file as "file as" should be on separate line, otherwise it's treated as part of .Ql argument. BTW, why are we not using .Pa for these? > +.Ql myreadme.txt > +and do not delete the output file under any circumstances: > +.Bd -literal -offset indent > +fetch -o myreadme.txt -q -R ftp.freebsd.org/pub/FreeBSD/README.TXT > +.Ed > +.Pp > +Print the size of the requested file and identify the request with a custom user > +agent string: > +.Bd -literal -offset indent > +$ fetch -s ftp.freebsd.org/pub/FreeBSD/README.TXT > +--user-agent="Mozilla/5.0 (X11; FreeBSD x86_64; rv:78.0) Gecko/20100101" > +3513231 > +.Ed > +.Pp > +Restart the transfer of the > +.Ql README.TXT > +file and retry the transfer upon soft failures: > +.Bd -literal -offset indent > +$ fetch -a -r http://ftp.freebsd.org/pub/FreeBSD/README.TXT > +.Ed > .Sh SEE ALSO > .Xr fetch 3 , > .Xr phttpget 8 From owner-svn-src-head@freebsd.org Thu Oct 29 19:03:42 2020 Return-Path: Delivered-To: svn-src-head@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 BD24045B1C2; Thu, 29 Oct 2020 19:03:42 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMZbf0v2xz4D8v; Thu, 29 Oct 2020 19:03:41 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 33F7A16057; Thu, 29 Oct 2020 20:03:34 +0100 (CET) Date: Thu, 29 Oct 2020 20:03:34 +0100 From: Steffen Nurpmeso To: Fernando =?utf-8?Q?Apestegu=C3=ADa?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367141 - head/usr.bin/fetch Message-ID: <20201029190334.ejnr6%steffen@sdaoden.eu> In-Reply-To: <202010291834.09TIYlrb040546@repo.freebsd.org> References: <202010291834.09TIYlrb040546@repo.freebsd.org> Mail-Followup-To: Fernando =?utf-8?Q?Apestegu=C3=ADa?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.19-153-g406ec8b0 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4CMZbf0v2xz4D8v X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 19:03:42 -0000 Hey. Fernando Apestegu=C3=ADa wrote in <202010291834.09TIYlrb040546@repo.freebsd.org>: |Author: fernape (ports committer) |Date: Thu Oct 29 18:34:47 2020 |New Revision: 367141 |URL: https://svnweb.freebsd.org/changeset/base/367141 | |Log: | fetch(1): Add EXAMPLES section | =20 | Add a few examples covering flags: 1, R, a, o, q, r, s, v | =20 | Approved by: manpages (bcr@) | Differential Revision: https://reviews.freebsd.org/D26946 | |Modified: | head/usr.bin/fetch/fetch.1 ... |+$ fetch -1 -q https://www.freebsd.org/bad.html \\ |+ ftp.freebsd.org/pub/FreeBSD/README.TXT \\ groff(7) says \\ reduces to a single backslash; useful to delay its interpreta= =E2=80=90 tion as escape character in copy mode. For a printable back= =E2=80=90 slash, use \e, or even better \[rs], to be independent from the current escape character. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Thu Oct 29 22:14:35 2020 Return-Path: Delivered-To: svn-src-head@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 2A52445F839; Thu, 29 Oct 2020 22:14:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMfqv0GBvz4QGy; Thu, 29 Oct 2020 22:14:35 +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 DC67EC77D; Thu, 29 Oct 2020 22:14:34 +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 09TMEYbM076573; Thu, 29 Oct 2020 22:14:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TMEY4e076572; Thu, 29 Oct 2020 22:14:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202010292214.09TMEY4e076572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Oct 2020 22:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367146 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 367146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 22:14:35 -0000 Author: jhb Date: Thu Oct 29 22:14:34 2020 New Revision: 367146 URL: https://svnweb.freebsd.org/changeset/base/367146 Log: Store the new send tag in the right place. r350501 added the 'st' parameter, but did not pass it down to if_snd_tag_alloc(). Reviewed by: gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26997 Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Thu Oct 29 22:00:15 2020 (r367145) +++ head/sys/netinet/in_pcb.c Thu Oct 29 22:14:34 2020 (r367146) @@ -3333,7 +3333,7 @@ in_pcbattach_txrtlmt(struct inpcb *inp, struct ifnet * if (ifp->if_snd_tag_alloc == NULL) { error = EOPNOTSUPP; } else { - error = ifp->if_snd_tag_alloc(ifp, ¶ms, &inp->inp_snd_tag); + error = ifp->if_snd_tag_alloc(ifp, ¶ms, st); #ifdef INET if (error == 0) { From owner-svn-src-head@freebsd.org Thu Oct 29 22:17:00 2020 Return-Path: Delivered-To: svn-src-head@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 8FA6045F6D0; Thu, 29 Oct 2020 22:17:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMfth3F8Xz4QQ2; Thu, 29 Oct 2020 22:17:00 +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 53782CAA0; Thu, 29 Oct 2020 22:17:00 +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 09TMH0va076740; Thu, 29 Oct 2020 22:17:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TMH0Jh076739; Thu, 29 Oct 2020 22:17:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202010292217.09TMH0Jh076739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Oct 2020 22:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367147 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 367147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 22:17:00 -0000 Author: jhb Date: Thu Oct 29 22:16:59 2020 New Revision: 367147 URL: https://svnweb.freebsd.org/changeset/base/367147 Log: Remove an extra if_ref(). In r348254, if_snd_tag_alloc() routines were changed to bump the ifp refcount via m_snd_tag_init(). This function wasn't in the tree at the time and wasn't updated for the new semantics, so was still doing a separate bump after if_snd_tag_alloc() returned. Reviewed by: gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26999 Modified: head/sys/netinet/tcp_ratelimit.c Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Thu Oct 29 22:14:34 2020 (r367146) +++ head/sys/netinet/tcp_ratelimit.c Thu Oct 29 22:16:59 2020 (r367147) @@ -470,7 +470,6 @@ rl_attach_txrtlmt(struct ifnet *ifp, error = ifp->if_snd_tag_alloc(ifp, ¶ms, tag); #ifdef INET if (error == 0) { - if_ref((*tag)->ifp); counter_u64_add(rate_limit_set_ok, 1); counter_u64_add(rate_limit_active, 1); } else From owner-svn-src-head@freebsd.org Thu Oct 29 22:18:57 2020 Return-Path: Delivered-To: svn-src-head@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 A4A1545FA49; Thu, 29 Oct 2020 22:18:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMfwx3tTTz4QRH; Thu, 29 Oct 2020 22:18:57 +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 67D05CD02; Thu, 29 Oct 2020 22:18:57 +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 09TMIvJu076867; Thu, 29 Oct 2020 22:18:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TMIubb076864; Thu, 29 Oct 2020 22:18:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202010292218.09TMIubb076864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Oct 2020 22:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367148 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 367148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 22:18:57 -0000 Author: jhb Date: Thu Oct 29 22:18:56 2020 New Revision: 367148 URL: https://svnweb.freebsd.org/changeset/base/367148 Log: Call m_snd_tag_rele() to free send tags. Send tags are refcounted and if_snd_tag_free() is called by m_snd_tag_rele() when the last reference is dropped on a send tag. Reviewed by: gallatin, hselasky Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26995 Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/tcp_ratelimit.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Thu Oct 29 22:16:59 2020 (r367147) +++ head/sys/netinet/in_pcb.c Thu Oct 29 22:18:56 2020 (r367148) @@ -3347,20 +3347,10 @@ in_pcbattach_txrtlmt(struct inpcb *inp, struct ifnet * } void -in_pcbdetach_tag(struct ifnet *ifp, struct m_snd_tag *mst) +in_pcbdetach_tag(struct m_snd_tag *mst) { - if (ifp == NULL) - return; - /* - * If the device was detached while we still had reference(s) - * on the ifp, we assume if_snd_tag_free() was replaced with - * stubs. - */ - ifp->if_snd_tag_free(mst); - - /* release reference count on network interface */ - if_rele(ifp); + m_snd_tag_rele(mst); #ifdef INET counter_u64_add(rate_limit_active, -1); #endif Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Thu Oct 29 22:16:59 2020 (r367147) +++ head/sys/netinet/in_pcb.h Thu Oct 29 22:18:56 2020 (r367148) @@ -884,7 +884,7 @@ in_pcboutput_txrtlmt_locked(struct inpcb *, struct ifn int in_pcbattach_txrtlmt(struct inpcb *, struct ifnet *, uint32_t, uint32_t, uint32_t, struct m_snd_tag **); void in_pcbdetach_txrtlmt(struct inpcb *); -void in_pcbdetach_tag(struct ifnet *ifp, struct m_snd_tag *mst); +void in_pcbdetach_tag(struct m_snd_tag *); int in_pcbmodify_txrtlmt(struct inpcb *, uint32_t); int in_pcbquery_txrtlmt(struct inpcb *, uint32_t *); int in_pcbquery_txrlevel(struct inpcb *, uint32_t *); Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Thu Oct 29 22:16:59 2020 (r367147) +++ head/sys/netinet/tcp_ratelimit.c Thu Oct 29 22:18:56 2020 (r367148) @@ -1028,7 +1028,7 @@ rt_find_real_interface(struct ifnet *ifp, struct inpcb return (NULL); } tifp = tag->ifp; - tifp->if_snd_tag_free(tag); + m_snd_tag_rele(tag); return (tifp); } @@ -1161,7 +1161,6 @@ static void tcp_rl_ifnet_departure(void *arg __unused, struct ifnet *ifp) { struct tcp_rate_set *rs, *nrs; - struct ifnet *tifp; int i; mtx_lock(&rs_mtx); @@ -1173,8 +1172,7 @@ tcp_rl_ifnet_departure(void *arg __unused, struct ifne rs->rs_flags |= RS_IS_DEAD; for (i = 0; i < rs->rs_rate_cnt; i++) { if (rs->rs_rlt[i].flags & HDWRPACE_TAGPRESENT) { - tifp = rs->rs_rlt[i].tag->ifp; - in_pcbdetach_tag(tifp, rs->rs_rlt[i].tag); + in_pcbdetach_tag(rs->rs_rlt[i].tag); rs->rs_rlt[i].tag = NULL; } rs->rs_rlt[i].flags = HDWRPACE_IFPDEPARTED; @@ -1191,7 +1189,6 @@ static void tcp_rl_shutdown(void *arg __unused, int howto __unused) { struct tcp_rate_set *rs, *nrs; - struct ifnet *tifp; int i; mtx_lock(&rs_mtx); @@ -1201,8 +1198,7 @@ tcp_rl_shutdown(void *arg __unused, int howto __unused rs->rs_flags |= RS_IS_DEAD; for (i = 0; i < rs->rs_rate_cnt; i++) { if (rs->rs_rlt[i].flags & HDWRPACE_TAGPRESENT) { - tifp = rs->rs_rlt[i].tag->ifp; - in_pcbdetach_tag(tifp, rs->rs_rlt[i].tag); + in_pcbdetach_tag(rs->rs_rlt[i].tag); rs->rs_rlt[i].tag = NULL; } rs->rs_rlt[i].flags = HDWRPACE_IFPDEPARTED; From owner-svn-src-head@freebsd.org Thu Oct 29 22:22:28 2020 Return-Path: Delivered-To: svn-src-head@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 6424F45FB9B; Thu, 29 Oct 2020 22:22:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMg1024g2z4QwB; Thu, 29 Oct 2020 22:22:28 +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 2B89CCEAA; Thu, 29 Oct 2020 22:22:28 +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 09TMMS4o082445; Thu, 29 Oct 2020 22:22:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TMMSNO082444; Thu, 29 Oct 2020 22:22:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202010292222.09TMMSNO082444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Oct 2020 22:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367149 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 367149 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 22:22:28 -0000 Author: jhb Date: Thu Oct 29 22:22:27 2020 New Revision: 367149 URL: https://svnweb.freebsd.org/changeset/base/367149 Log: Use public interfaces to manage the nested rate limit send tag. Each TLS send tag in mlx5 contains a nested rate limit send tag. Previously, the driver was calling internal functions to manage the nested tag. Calling free methods directly instead of m_snd_tag_rele() leaked send tag references and references on the ifp. Changes to use the ifp methods for the nested tag for other methods are more cosmetic but do simplify the code. Reviewed by: gallatin, hselasky Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26996 Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Thu Oct 29 22:18:56 2020 (r367148) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Thu Oct 29 22:22:27 2020 (r367149) @@ -280,7 +280,7 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **ppmt) { - struct if_snd_tag_alloc_rate_limit rl_params; + union if_snd_tag_alloc_params rl_params; struct mlx5e_priv *priv; struct mlx5e_tls_tag *ptag; const struct tls_session_params *en; @@ -377,29 +377,17 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp, goto failure; } + memset(&rl_params, 0, sizeof(rl_params)); + rl_params.hdr = params->hdr; switch (params->hdr.type) { #if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: - memset(&rl_params, 0, sizeof(rl_params)); - rl_params.hdr = params->tls_rate_limit.hdr; rl_params.hdr.type = IF_SND_TAG_TYPE_RATE_LIMIT; rl_params.max_rate = params->tls_rate_limit.max_rate; - - error = mlx5e_rl_snd_tag_alloc(ifp, - container_of(&rl_params, union if_snd_tag_alloc_params, rate_limit), - &ptag->rl_tag); - if (error) - goto failure; break; #endif case IF_SND_TAG_TYPE_TLS: - memset(&rl_params, 0, sizeof(rl_params)); - rl_params.hdr = params->tls.hdr; rl_params.hdr.type = IF_SND_TAG_TYPE_UNLIMITED; - - error = mlx5e_ul_snd_tag_alloc(ifp, - container_of(&rl_params, union if_snd_tag_alloc_params, unlimited), - &ptag->rl_tag); if (error) goto failure; break; @@ -408,6 +396,10 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp, goto failure; } + error = ifp->if_snd_tag_alloc(ifp, &rl_params, &ptag->rl_tag); + if (error) + goto failure; + /* store pointer to mbuf tag */ MPASS(ptag->tag.refcount == 0); m_snd_tag_init(&ptag->tag, ifp, params->hdr.type); @@ -427,7 +419,7 @@ int mlx5e_tls_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *params) { #if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) - struct if_snd_tag_rate_limit_params rl_params; + union if_snd_tag_modify_params rl_params; struct mlx5e_tls_tag *ptag = container_of(pmt, struct mlx5e_tls_tag, tag); int error; @@ -437,9 +429,9 @@ mlx5e_tls_snd_tag_modify(struct m_snd_tag *pmt, union #if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: memset(&rl_params, 0, sizeof(rl_params)); - rl_params.max_rate = params->tls_rate_limit.max_rate; - error = mlx5e_rl_snd_tag_modify(ptag->rl_tag, - container_of(&rl_params, union if_snd_tag_modify_params, rate_limit)); + rl_params.rate_limit.max_rate = params->tls_rate_limit.max_rate; + error = ptag->rl_tag->ifp->if_snd_tag_modify(ptag->rl_tag, + &rl_params); return (error); #endif default: @@ -457,11 +449,10 @@ mlx5e_tls_snd_tag_query(struct m_snd_tag *pmt, union i switch (pmt->type) { #if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: - error = mlx5e_rl_snd_tag_query(ptag->rl_tag, params); - break; #endif case IF_SND_TAG_TYPE_TLS: - error = mlx5e_ul_snd_tag_query(ptag->rl_tag, params); + error = ptag->rl_tag->ifp->if_snd_tag_query(ptag->rl_tag, + params); break; default: error = EOPNOTSUPP; @@ -477,18 +468,8 @@ mlx5e_tls_snd_tag_free(struct m_snd_tag *pmt) container_of(pmt, struct mlx5e_tls_tag, tag); struct mlx5e_priv *priv; - switch (pmt->type) { -#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) - case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: - mlx5e_rl_snd_tag_free(ptag->rl_tag); - break; -#endif - case IF_SND_TAG_TYPE_TLS: - mlx5e_ul_snd_tag_free(ptag->rl_tag); - break; - default: - break; - } + MPASS(ptag->rl_tag->refcount == 1); + m_snd_tag_rele(ptag->rl_tag); MLX5E_TLS_TAG_LOCK(ptag); ptag->state = MLX5E_TLS_ST_FREED; From owner-svn-src-head@freebsd.org Thu Oct 29 23:15:11 2020 Return-Path: Delivered-To: svn-src-head@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 B6DBC44086D; Thu, 29 Oct 2020 23:15:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMh9q4T1gz4SrY; Thu, 29 Oct 2020 23:15:11 +0000 (UTC) (envelope-from glebius@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 784DED713; Thu, 29 Oct 2020 23:15:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TNFBVx014139; Thu, 29 Oct 2020 23:15:11 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TNFBa9014138; Thu, 29 Oct 2020 23:15:11 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202010292315.09TNFBa9014138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 29 Oct 2020 23:15:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367150 - head/sbin/savecore X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sbin/savecore X-SVN-Commit-Revision: 367150 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 23:15:11 -0000 Author: glebius Date: Thu Oct 29 23:15:11 2020 New Revision: 367150 URL: https://svnweb.freebsd.org/changeset/base/367150 Log: Convert flags from int to bool. Some (compress) were already used in comparisons with bool values. No functional changes. Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Thu Oct 29 22:22:27 2020 (r367149) +++ head/sbin/savecore/savecore.c Thu Oct 29 23:15:11 2020 (r367150) @@ -102,7 +102,8 @@ __FBSDID("$FreeBSD$"); static cap_channel_t *capsyslog; static fileargs_t *capfa; -static int checkfor, compress, clear, force, keep, verbose; /* flags */ +static bool checkfor, compress, clear, force, keep; /* flags */ +static int verbose; static int nfound, nsaved, nerr; /* statistics */ static int maxdumps; @@ -676,7 +677,7 @@ DoFile(const char *savedir, int savedirfd, const char dtoh32(kdhl.version), device); status = STATUS_BAD; - if (force == 0) + if (force == false) goto closefd; } } else if (compare_magic(&kdhl, KERNELDUMPMAGIC)) { @@ -686,7 +687,7 @@ DoFile(const char *savedir, int savedirfd, const char dtoh32(kdhl.version), device); status = STATUS_BAD; - if (force == 0) + if (force == false) goto closefd; } switch (kdhl.compression) { @@ -710,7 +711,7 @@ DoFile(const char *savedir, int savedirfd, const char device); status = STATUS_BAD; - if (force == 0) + if (force == false) goto closefd; if (compare_magic(&kdhl, KERNELDUMPMAGIC_CLEARED)) { @@ -727,7 +728,7 @@ DoFile(const char *savedir, int savedirfd, const char dtoh32(kdhl.version), device); status = STATUS_BAD; - if (force == 0) + if (force == false) goto closefd; } } @@ -741,7 +742,7 @@ DoFile(const char *savedir, int savedirfd, const char "parity error on last dump header on %s", device); nerr++; status = STATUS_BAD; - if (force == 0) + if (force == false) goto closefd; } dumpextent = dtoh64(kdhl.dumpextent); @@ -772,7 +773,7 @@ DoFile(const char *savedir, int savedirfd, const char "first and last dump headers disagree on %s", device); nerr++; status = STATUS_BAD; - if (force == 0) + if (force == false) goto closefd; } else { status = STATUS_GOOD; @@ -1110,7 +1111,8 @@ main(int argc, char **argv) char **devs; int i, ch, error, savedirfd; - checkfor = compress = clear = force = keep = verbose = 0; + checkfor = compress = clear = force = keep = false; + verbose = 0; nfound = nsaved = nerr = 0; savedir = "."; @@ -1124,16 +1126,16 @@ main(int argc, char **argv) while ((ch = getopt(argc, argv, "Ccfkm:vz")) != -1) switch(ch) { case 'C': - checkfor = 1; + checkfor = true; break; case 'c': - clear = 1; + clear = true; break; case 'f': - force = 1; + force = true; break; case 'k': - keep = 1; + keep = true; break; case 'm': maxdumps = atoi(optarg); From owner-svn-src-head@freebsd.org Thu Oct 29 23:28:41 2020 Return-Path: Delivered-To: svn-src-head@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 517D5440C5D; Thu, 29 Oct 2020 23:28:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMhTP1KTzz4TXw; Thu, 29 Oct 2020 23:28:41 +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 11FE1D989; Thu, 29 Oct 2020 23:28:41 +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 09TNSevo020534; Thu, 29 Oct 2020 23:28:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TNSdSL020526; Thu, 29 Oct 2020 23:28:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202010292328.09TNSdSL020526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Oct 2020 23:28:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367151 - in head/sys: dev/mlx5/mlx5_en kern net netinet sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: dev/mlx5/mlx5_en kern net netinet sys X-SVN-Commit-Revision: 367151 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 23:28:41 -0000 Author: jhb Date: Thu Oct 29 23:28:39 2020 New Revision: 367151 URL: https://svnweb.freebsd.org/changeset/base/367151 Log: Add m_snd_tag_alloc() as a wrapper around if_snd_tag_alloc(). This gives a more uniform API for send tag life cycle management. Reviewed by: gallatin, hselasky Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27000 Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c head/sys/kern/kern_mbuf.c head/sys/kern/uipc_ktls.c head/sys/net/if_lagg.c head/sys/net/if_vlan.c head/sys/netinet/in_pcb.c head/sys/netinet/tcp_ratelimit.c head/sys/sys/mbuf.h Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Thu Oct 29 23:15:11 2020 (r367150) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Thu Oct 29 23:28:39 2020 (r367151) @@ -396,7 +396,7 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp, goto failure; } - error = ifp->if_snd_tag_alloc(ifp, &rl_params, &ptag->rl_tag); + error = m_snd_tag_alloc(ifp, &rl_params, &ptag->rl_tag); if (error) goto failure; Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Thu Oct 29 23:15:11 2020 (r367150) +++ head/sys/kern/kern_mbuf.c Thu Oct 29 23:28:39 2020 (r367151) @@ -1525,6 +1525,16 @@ m_freem(struct mbuf *mb) mb = m_free(mb); } +int +m_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, + struct m_snd_tag **mstp) +{ + + if (ifp->if_snd_tag_alloc == NULL) + return (EOPNOTSUPP); + return (ifp->if_snd_tag_alloc(ifp, params, mstp)); +} + void m_snd_tag_init(struct m_snd_tag *mst, struct ifnet *ifp, u_int type) { Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Thu Oct 29 23:15:11 2020 (r367150) +++ head/sys/kern/uipc_ktls.c Thu Oct 29 23:28:39 2020 (r367151) @@ -834,10 +834,6 @@ ktls_alloc_snd_tag(struct inpcb *inp, struct ktls_sess params.hdr.numa_domain = inp->inp_numa_domain; INP_RUNLOCK(inp); - if (ifp->if_snd_tag_alloc == NULL) { - error = EOPNOTSUPP; - goto out; - } if ((ifp->if_capenable & IFCAP_NOMAP) == 0) { error = EOPNOTSUPP; goto out; @@ -853,7 +849,7 @@ ktls_alloc_snd_tag(struct inpcb *inp, struct ktls_sess goto out; } } - error = ifp->if_snd_tag_alloc(ifp, ¶ms, mstp); + error = m_snd_tag_alloc(ifp, ¶ms, mstp); out: if_rele(ifp); return (error); Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Thu Oct 29 23:15:11 2020 (r367150) +++ head/sys/net/if_lagg.c Thu Oct 29 23:28:39 2020 (r367151) @@ -1808,7 +1808,7 @@ lagg_snd_tag_alloc(struct ifnet *ifp, LAGG_RUNLOCK(); return (EOPNOTSUPP); } - if (lp->lp_ifp == NULL || lp->lp_ifp->if_snd_tag_alloc == NULL) { + if (lp->lp_ifp == NULL) { LAGG_RUNLOCK(); return (EOPNOTSUPP); } @@ -1822,7 +1822,7 @@ lagg_snd_tag_alloc(struct ifnet *ifp, return (ENOMEM); } - error = lp_ifp->if_snd_tag_alloc(lp_ifp, params, &lst->tag); + error = m_snd_tag_alloc(lp_ifp, params, &lst->tag); if_rele(lp_ifp); if (error) { free(lst, M_LAGG); Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Thu Oct 29 23:15:11 2020 (r367150) +++ head/sys/net/if_vlan.c Thu Oct 29 23:28:39 2020 (r367151) @@ -2047,7 +2047,7 @@ vlan_snd_tag_alloc(struct ifnet *ifp, parent = PARENT(ifv); else parent = NULL; - if (parent == NULL || parent->if_snd_tag_alloc == NULL) { + if (parent == NULL) { NET_EPOCH_EXIT(et); return (EOPNOTSUPP); } @@ -2060,7 +2060,7 @@ vlan_snd_tag_alloc(struct ifnet *ifp, return (ENOMEM); } - error = parent->if_snd_tag_alloc(parent, params, &vst->tag); + error = m_snd_tag_alloc(parent, params, &vst->tag); if_rele(parent); if (error) { free(vst, M_VLAN); Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Thu Oct 29 23:15:11 2020 (r367150) +++ head/sys/netinet/in_pcb.c Thu Oct 29 23:28:39 2020 (r367151) @@ -3330,19 +3330,14 @@ in_pcbattach_txrtlmt(struct inpcb *inp, struct ifnet * if (*st != NULL) return (EINVAL); - if (ifp->if_snd_tag_alloc == NULL) { - error = EOPNOTSUPP; - } else { - error = ifp->if_snd_tag_alloc(ifp, ¶ms, st); - + error = m_snd_tag_alloc(ifp, ¶ms, st); #ifdef INET - if (error == 0) { - counter_u64_add(rate_limit_set_ok, 1); - counter_u64_add(rate_limit_active, 1); - } else - counter_u64_add(rate_limit_alloc_fail, 1); + if (error == 0) { + counter_u64_add(rate_limit_set_ok, 1); + counter_u64_add(rate_limit_active, 1); + } else if (error != EOPNOTSUPP) + counter_u64_add(rate_limit_alloc_fail, 1); #endif - } return (error); } Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Thu Oct 29 23:15:11 2020 (r367150) +++ head/sys/netinet/tcp_ratelimit.c Thu Oct 29 23:28:39 2020 (r367151) @@ -464,18 +464,14 @@ rl_attach_txrtlmt(struct ifnet *ifp, .rate_limit.flags = M_NOWAIT, }; - if (ifp->if_snd_tag_alloc == NULL) { - error = EOPNOTSUPP; - } else { - error = ifp->if_snd_tag_alloc(ifp, ¶ms, tag); + error = m_snd_tag_alloc(ifp, ¶ms, tag); #ifdef INET - if (error == 0) { - counter_u64_add(rate_limit_set_ok, 1); - counter_u64_add(rate_limit_active, 1); - } else - counter_u64_add(rate_limit_alloc_fail, 1); + if (error == 0) { + counter_u64_add(rate_limit_set_ok, 1); + counter_u64_add(rate_limit_active, 1); + } else if (error != EOPNOTSUPP) + counter_u64_add(rate_limit_alloc_fail, 1); #endif - } return (error); } @@ -1014,13 +1010,7 @@ rt_find_real_interface(struct ifnet *ifp, struct inpcb #else params.rate_limit.hdr.flowtype = M_HASHTYPE_OPAQUE_HASH; #endif - tag = NULL; - if (ifp->if_snd_tag_alloc) { - if (error) - *error = ENODEV; - return (NULL); - } - err = ifp->if_snd_tag_alloc(ifp, ¶ms, &tag); + err = m_snd_tag_alloc(ifp, ¶ms, &tag); if (err) { /* Failed to setup a tag? */ if (error) Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Thu Oct 29 23:15:11 2020 (r367150) +++ head/sys/sys/mbuf.h Thu Oct 29 23:28:39 2020 (r367151) @@ -754,6 +754,7 @@ m_epg_pagelen(const struct mbuf *m, int pidx, int pgof #define MBUF_EXTPGS_MEM_NAME "mbuf_extpgs" #ifdef _KERNEL +union if_snd_tag_alloc_params; #ifdef WITNESS #define MBUF_CHECKSLEEP(how) do { \ @@ -834,6 +835,8 @@ int m_sanity(struct mbuf *, int); struct mbuf *m_split(struct mbuf *, int, int); struct mbuf *m_uiotombuf(struct uio *, int, int, int, int); struct mbuf *m_unshare(struct mbuf *, int); +int m_snd_tag_alloc(struct ifnet *, + union if_snd_tag_alloc_params *, struct m_snd_tag **); void m_snd_tag_init(struct m_snd_tag *, struct ifnet *, u_int); void m_snd_tag_destroy(struct m_snd_tag *); From owner-svn-src-head@freebsd.org Fri Oct 30 00:03:59 2020 Return-Path: Delivered-To: svn-src-head@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 E76CA442416; Fri, 30 Oct 2020 00:03:59 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMjG75qNyz4Wn2; Fri, 30 Oct 2020 00:03:59 +0000 (UTC) (envelope-from olivier@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 AADC4E0BF; Fri, 30 Oct 2020 00:03:59 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09U03xts045276; Fri, 30 Oct 2020 00:03:59 GMT (envelope-from olivier@FreeBSD.org) Received: (from olivier@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09U03xDx045275; Fri, 30 Oct 2020 00:03:59 GMT (envelope-from olivier@FreeBSD.org) Message-Id: <202010300003.09U03xDx045275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: olivier set sender to olivier@FreeBSD.org using -f From: Olivier Cochard Date: Fri, 30 Oct 2020 00:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367152 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: olivier X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 367152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 00:04:00 -0000 Author: olivier (ports committer) Date: Fri Oct 30 00:03:59 2020 New Revision: 367152 URL: https://svnweb.freebsd.org/changeset/base/367152 Log: bhyve currently reports each of "smbios.system.maker" and "smbios.system.family" as " ". This presents challenges for both humans and tools when trying to parse output that uses those results. The new values reported are now: smbios.system.family="Virtual Machine" smbios.system.maker="FreeBSD" PR: 250728 Approved by: grehan@FreeBSD.org Sponsored by: Netflix Modified: head/usr.sbin/bhyve/smbiostbl.c Modified: head/usr.sbin/bhyve/smbiostbl.c ============================================================================== --- head/usr.sbin/bhyve/smbiostbl.c Thu Oct 29 23:28:39 2020 (r367151) +++ head/usr.sbin/bhyve/smbiostbl.c Fri Oct 30 00:03:59 2020 (r367152) @@ -346,12 +346,12 @@ static int smbios_type1_initializer(struct smbios_stru uint16_t *n, uint16_t *size); const char *smbios_type1_strings[] = { - " ", /* manufacturer string */ - "BHYVE", /* product name string */ - "1.0", /* version string */ - "None", /* serial number string */ - "None", /* sku string */ - " ", /* family name string */ + "FreeBSD", /* manufacturer string */ + "BHYVE", /* product name string */ + "1.0", /* version string */ + "None", /* serial number string */ + "None", /* sku string */ + "Virtual Machine", /* family name string */ NULL }; From owner-svn-src-head@freebsd.org Fri Oct 30 00:06:37 2020 Return-Path: Delivered-To: svn-src-head@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 866B44423DF; Fri, 30 Oct 2020 00:06:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMjK930QDz4X7J; Fri, 30 Oct 2020 00:06:37 +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 49E6DE0C1; Fri, 30 Oct 2020 00:06:37 +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 09U06bQC045445; Fri, 30 Oct 2020 00:06:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09U06b3j045444; Fri, 30 Oct 2020 00:06:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202010300006.09U06b3j045444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Oct 2020 00:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367153 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 367153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 00:06:37 -0000 Author: jhb Date: Fri Oct 30 00:06:36 2020 New Revision: 367153 URL: https://svnweb.freebsd.org/changeset/base/367153 Log: Fix a couple of silly bugs in r367149. - Assign the TLS rate limit value to the correct member of the rl_params for the nested rate limit tag. - Remove a dead condition. Pointy hat to: jhb Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Fri Oct 30 00:03:59 2020 (r367152) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Fri Oct 30 00:06:36 2020 (r367153) @@ -383,13 +383,11 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp, #if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: rl_params.hdr.type = IF_SND_TAG_TYPE_RATE_LIMIT; - rl_params.max_rate = params->tls_rate_limit.max_rate; + rl_params.rate_limit.max_rate = params->tls_rate_limit.max_rate; break; #endif case IF_SND_TAG_TYPE_TLS: rl_params.hdr.type = IF_SND_TAG_TYPE_UNLIMITED; - if (error) - goto failure; break; default: error = EOPNOTSUPP; From owner-svn-src-head@freebsd.org Fri Oct 30 07:07:47 2020 Return-Path: Delivered-To: svn-src-head@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 485C744A206; Fri, 30 Oct 2020 07:07:47 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMtg621mWz4r61; Fri, 30 Oct 2020 07:07:46 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-qk1-f179.google.com with SMTP id x20so4070374qkn.1; Fri, 30 Oct 2020 00:07:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QgdkWlKsbuXP3RuHqhXjEDqXapnHikFz1fl9QDjzEwM=; b=IBvVYc7GVYDmU/Y7CsiIimfxOUx7Wdg75iZEku0y8d93n9G/npX90HtK1PQ4oS1C77 btqeJPRZRzNOie563iBIZfkGFq/Y5+qPdLsNflQow3H8vAomnMq05y9NU6StN1pEQIA3 vvXwb1tZ8OmN4zvwfeQfwdVqj57xwsxc+NruG4RUOrX1DqtV5aSrIAE01rsdE3KePMQc mIFpMyWeNmTlsVAiu1TW8p189hMsmDEmVjSuR8jd6xhWxWd6bq0OaZrhFqN0noNCdYyE txzTotbbg9QMM+8lpI601oZ+n7Uuz0pfEUtUrdmPySUHPuOW+4LbAxeCCxtu0qaTSbgY +grg== X-Gm-Message-State: AOAM5320DA4SWg3jYrGH1wPwALkxTRdp47d519zcD/KA97+uKjL/Vf74 usxKBhcupentYSgKQLyC4OCLNc87w41bcQ== X-Google-Smtp-Source: ABdhPJyRm6ouy97D6G1puWNNJ//cF1AkY8Te+itz05IESjozyhJuNmQOU5G0O/BymmErFaG7Kv0eng== X-Received: by 2002:ae9:efd6:: with SMTP id d205mr829308qkg.410.1604041665066; Fri, 30 Oct 2020 00:07:45 -0700 (PDT) Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com. [209.85.219.180]) by smtp.gmail.com with ESMTPSA id l7sm460820qtp.31.2020.10.30.00.07.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2020 00:07:44 -0700 (PDT) Received: by mail-yb1-f180.google.com with SMTP id b138so4303505yba.5; Fri, 30 Oct 2020 00:07:44 -0700 (PDT) X-Received: by 2002:a25:81d0:: with SMTP id n16mr1616749ybm.140.1604041664373; Fri, 30 Oct 2020 00:07:44 -0700 (PDT) MIME-Version: 1.0 References: <202010291837.09TIbKap040707@repo.freebsd.org> <5bc7ce7a-c5d4-21e5-7a7c-e381e66b2b2f@icloud.com> In-Reply-To: <5bc7ce7a-c5d4-21e5-7a7c-e381e66b2b2f@icloud.com> From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Fri, 30 Oct 2020 10:05:50 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r367142 - head/usr.bin/fmt To: xtouqh@icloud.com Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4CMtg621mWz4r61 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of fernandoapesteguia@gmail.com designates 209.85.222.179 as permitted sender) smtp.mailfrom=fernandoapesteguia@gmail.com X-Spamd-Result: default: False [-2.79 / 15.00]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.01)[-1.007]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.83)[-0.832]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.179:from]; NEURAL_HAM_MEDIUM(-0.96)[-0.956]; FREEMAIL_TO(0.00)[icloud.com]; FORGED_SENDER(0.30)[fernape@freebsd.org,fernandoapesteguia@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.179:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[fernape@freebsd.org,fernandoapesteguia@gmail.com]; TAGGED_FROM(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 07:07:47 -0000 On Thu, Oct 29, 2020 at 7:47 PM wrote: > Fernando Apestegu=C3=ADa wrote: > > Author: fernape (ports committer) > > Date: Thu Oct 29 18:37:20 2020 > > New Revision: 367142 > > URL: https://svnweb.freebsd.org/changeset/base/367142 > > > > Log: > > fmt(1): Add EXAMPLES section > > > > Very small EXAMPLES section. > > > > While here, remove reference to nroff(1). > > > > Approved by: manpages (bcr@) > > Differential Revision: https://reviews.freebsd.org/D2694= 7 > > > > Modified: > > head/usr.bin/fmt/fmt.1 > > > > Modified: head/usr.bin/fmt/fmt.1 > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > --- head/usr.bin/fmt/fmt.1 Thu Oct 29 18:34:47 2020 (r367141) > > +++ head/usr.bin/fmt/fmt.1 Thu Oct 29 18:37:20 2020 (r367142) > > @@ -30,7 +30,7 @@ > > .\" > > .\" Modified by Gareth McCaughan to describe the new version of `fmt' > > .\" rather than the old one. > > -.Dd December 1, 2017 > > +.Dd October 29, 2020 > > .Dt FMT 1 > > .Os > > .Sh NAME > > @@ -89,10 +89,6 @@ Try to format mail header lines contained in the inp= ut > > Format lines beginning with a > > .Ql \&. > > (dot) character. > > -Normally, > > -.Nm > > -does not fill these lines, for compatibility with > > -.Xr nroff 1 . > > Was the behavior of fmt(1) really changed? If not, you could just > replace ".Xr nroff 1 ." with ".Nm nroff . ". > Hi, Thanks for reviewing the commit! In another revision I did something similar ( https://reviews.freebsd.org/D26146) (commit r366516) removing a BUGS section with details about nroff since it is not in base anymore. I got the impression that we should not refer to things that might (or might not) be installed from ports (see bcr@ comment in that review). I am not a docs committer and I don't know the policy here beyond those comments. But nevertheless if the paragraph has to be restored without cross reference, I'll do it :-) > > > .It Fl p > > Allow indented paragraphs. > > Without the > > @@ -159,10 +155,23 @@ environment variables affect the execution of > > .Nm > > as described in > > .Xr environ 7 . > > +.Sh EXAMPLES > > +Center the text in standard input: > > +.Bd -literal -offset indent > > +$ echo -e 'The merit of all things\enlies\enin their difficulty' | fmt > -c > > + The merit of all things > > + lies > > + in their difficulty > > +.Ed > > +.Pp > > +Format the text in standard input collapsing spaces: > > +.Bd -literal -offset indent > > +$ echo -e 'Multiple spaces will be collapsed' | fmt -s > > +Multiple spaces will be collapsed > > +.Ed > > .Sh SEE ALSO > > .Xr fold 1 , > > -.Xr mail 1 , > > -.Xr nroff 1 > > +.Xr mail 1 > > .Sh HISTORY > > The > > .Nm > From owner-svn-src-head@freebsd.org Fri Oct 30 09:40:56 2020 Return-Path: Delivered-To: svn-src-head@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 40A9544D145; Fri, 30 Oct 2020 09:40:56 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMy3r13Kcz3Vll; Fri, 30 Oct 2020 09:40:56 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07779143D4; Fri, 30 Oct 2020 09:40:56 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09U9etlH095895; Fri, 30 Oct 2020 09:40:55 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09U9et2G095893; Fri, 30 Oct 2020 09:40:55 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202010300940.09U9et2G095893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Fri, 30 Oct 2020 09:40:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367159 - in head: share/man/man8 tools/build X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in head: share/man/man8 tools/build X-SVN-Commit-Revision: 367159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 09:40:56 -0000 Author: 0mp (doc,ports committer) Date: Fri Oct 30 09:40:55 2020 New Revision: 367159 URL: https://svnweb.freebsd.org/changeset/base/367159 Log: beinstall.sh: Use bectl instead of beadm by default This patch also introduces an environment variable BE_UTILITY, which can be used to specify the utility to use for managing ZFS boot environments (which can be either bectl or beadm). While here, fix some typos in the manual page and remove beadm from section "SEE ALSO". Reviewed by: bcr, kevans, rpokala Approved by: will Differential Revision: https://reviews.freebsd.org/D21111 Modified: head/share/man/man8/beinstall.8 head/tools/build/beinstall.sh Modified: head/share/man/man8/beinstall.8 ============================================================================== --- head/share/man/man8/beinstall.8 Fri Oct 30 08:06:56 2020 (r367158) +++ head/share/man/man8/beinstall.8 Fri Oct 30 09:40:55 2020 (r367159) @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd April 18, 2020 +.Dd October 30, 2020 .Dt BEINSTALL.SH 8 .Os .Sh NAME @@ -65,10 +65,8 @@ in a new boot environment. .Nm requires a fully built world and kernel. It also requires -.Xr beadm 1 -and .Xr pkg 8 , -which are not present in the base system and have to be installed manually. +which is not present in the base system and has to be installed manually. .Pp The .Ar options @@ -82,6 +80,13 @@ as described in User modifiable variables. Set these in the environment if desired: .Bl -tag -width indent +.It Ev BE_UTILITY Pq default: Dq Li "bectl" +Utility to manage ZFS boot environments. +This can be either +.Xr bectl 8 +from the base system or +.Xr beadm 1 +from ports (sysutils/beadm). .It Ev CONFIG_UPDATER Pq default: Dq Li "etcupdate" Config updater: .Xr etcupdate 8 @@ -110,9 +115,9 @@ Place where lives in the src tree. .El .Sh SEE ALSO -.Xr beadm 1 , .Xr build 7 , .Xr development 7 , +.Xr bectl 8 , .Xr etcupdate 8 , .Xr mergemaster 8 , .Xr pkg 8 Modified: head/tools/build/beinstall.sh ============================================================================== --- head/tools/build/beinstall.sh Fri Oct 30 08:06:56 2020 (r367158) +++ head/tools/build/beinstall.sh Fri Oct 30 09:40:55 2020 (r367159) @@ -30,7 +30,7 @@ # Install a boot environment using the current FreeBSD source tree. # Requires a fully built world & kernel. # -# Non-base tools required: beadm, pkg +# Non-base tools required: pkg # # In a sandbox for the new boot environment, this script also runs etcupdate # and pkg upgrade automatically in the sandbox. Upon successful completion, @@ -42,6 +42,8 @@ # beinstall [optional world/kernel flags e.g. KERNCONF] # ## User modifiable variables - set these in the environment if desired. +# Utility to manage ZFS boot environments. +BE_UTILITY="${BE_UTILITY:-"bectl"}" # If not empty, 'pkg upgrade' will be skipped. NO_PKG_UPGRADE="${NO_PKG_UPGRADE:-""}" # Config updater - 'etcupdate' and 'mergemaster' are supported. Set to an @@ -96,7 +98,7 @@ cleanup_be() { if [ -n "${created_be_dirs}" ]; then chroot ${BE_MNTPT} /bin/rm -rf ${created_be_dirs} fi - beadm destroy -F ${BENAME} + ${BE_UTILITY} destroy -F ${BENAME} } create_be_dirs() { @@ -150,8 +152,8 @@ postmortem() { unmount_be rmdir_be echo "Post-mortem cleanup complete." - echo "To destroy the BE (recommended), run: beadm destroy ${BENAME}" - echo "To instead continue with the BE, run: beadm activate ${BENAME}" + echo "To destroy the BE (recommended), run: ${BE_UTILITY} destroy ${BENAME}" + echo "To instead continue with the BE, run: ${BE_UTILITY} activate ${BENAME}" } if [ -n "$BEINSTALL_CMD" ]; then @@ -159,6 +161,9 @@ if [ -n "$BEINSTALL_CMD" ]; then exit $? fi +if [ "$(basename -- "${BE_UTILITY}")" = "bectl" ]; then + ${BE_UTILITY} check || errx "${BE_UTILITY} sanity check failed" +fi cleanup_commands="" trap 'errx "Interrupt caught"' HUP INT TERM @@ -205,10 +210,10 @@ BE_MNTPT=${BE_TMP}/mnt BE_MM_ROOT=${BE_TMP}/mergemaster # mergemaster will create mkdir -p ${BE_MNTPT} -beadm create ${BENAME} >/dev/null || errx "Unable to create BE ${BENAME}" +${BE_UTILITY} create ${BENAME} >/dev/null || errx "Unable to create BE ${BENAME}" [ -z "$NO_CLEANUP_BE" ] && cleanup_commands="cleanup_be ${cleanup_commands}" -beadm mount ${BENAME} ${BE_TMP}/mnt || errx "Unable to mount BE ${BENAME}." +${BE_UTILITY} mount ${BENAME} ${BE_TMP}/mnt || errx "Unable to mount BE ${BENAME}." echo "Mounted ${BENAME} to ${BE_MNTPT}, performing install/update ..." make "$@" DESTDIR=${BE_MNTPT} installkernel || errx "Installkernel failed!" @@ -252,8 +257,8 @@ fi unmount_be || errx "Unable to unmount BE" rmdir_be || errx "Unable to cleanup BE" -beadm activate ${BENAME} || errx "Unable to activate BE" +${BE_UTILITY} activate ${BENAME} || errx "Unable to activate BE" echo -beadm list +${BE_UTILITY} list echo echo "Boot environment ${BENAME} setup complete; reboot to use it." From owner-svn-src-head@freebsd.org Fri Oct 30 09:48:42 2020 Return-Path: Delivered-To: svn-src-head@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 9F4BC44D5CE; Fri, 30 Oct 2020 09:48:42 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMyDp3mM6z3WD7; Fri, 30 Oct 2020 09:48:42 +0000 (UTC) (envelope-from fernape@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 6100814CEA; Fri, 30 Oct 2020 09:48:42 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09U9mg1M000342; Fri, 30 Oct 2020 09:48:42 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09U9mgPL000341; Fri, 30 Oct 2020 09:48:42 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202010300948.09U9mgPL000341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Fri, 30 Oct 2020 09:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367160 - head/usr.bin/fetch X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/fetch X-SVN-Commit-Revision: 367160 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 09:48:42 -0000 Author: fernape (ports committer) Date: Fri Oct 30 09:48:41 2020 New Revision: 367160 URL: https://svnweb.freebsd.org/changeset/base/367160 Log: fetch(1): Fix style Fix style problems introduced in r367141: * s/Ql/Pa/ for file names * Break line properly in macro * Properly generate back slash character Not bumping .Dd Reported by: xtouqh@icloud.com, steffen@sdaoden.eu Approved by: 0mp@ Differential Revision: https://reviews.freebsd.org/D26946 Modified: head/usr.bin/fetch/fetch.1 Modified: head/usr.bin/fetch/fetch.1 ============================================================================== --- head/usr.bin/fetch/fetch.1 Fri Oct 30 09:40:55 2020 (r367159) +++ head/usr.bin/fetch/fetch.1 Fri Oct 30 09:48:41 2020 (r367160) @@ -389,14 +389,14 @@ Silently try to fetch the URLs passed as parameters. The first one will fail. If the second URL succeeds the third one will not be tried: .Bd -literal -offset indent -$ fetch -1 -q https://www.freebsd.org/bad.html \\ - ftp.freebsd.org/pub/FreeBSD/README.TXT \\ +$ fetch -1 -q https://www.freebsd.org/bad.html \e + ftp.freebsd.org/pub/FreeBSD/README.TXT \e https://www.fake.url fetch: https://www.freebsd.org/bad.html: Not Found .Ed .Pp Be verbose when retrieving the -.Ql README.TXT +.Pa README.TXT file: .Bd -literal -offset indent $ fetch -v ftp.freebsd.org/pub/FreeBSD/README.TXT @@ -408,8 +408,9 @@ README.TXT .Ed .Pp Quietly save the -.Ql README.TXT file as -.Ql myreadme.txt +.Pa README.TXT +file as +.Pa myreadme.txt and do not delete the output file under any circumstances: .Bd -literal -offset indent fetch -o myreadme.txt -q -R ftp.freebsd.org/pub/FreeBSD/README.TXT @@ -424,7 +425,7 @@ $ fetch -s ftp.freebsd.org/pub/FreeBSD/README.TXT .Ed .Pp Restart the transfer of the -.Ql README.TXT +.Pa README.TXT file and retry the transfer upon soft failures: .Bd -literal -offset indent $ fetch -a -r http://ftp.freebsd.org/pub/FreeBSD/README.TXT From owner-svn-src-head@freebsd.org Fri Oct 30 09:56:07 2020 Return-Path: Delivered-To: svn-src-head@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 186A644DBA8; Fri, 30 Oct 2020 09:56:07 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMyPL1wzQz3WNB; Fri, 30 Oct 2020 09:56:06 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-qk1-f177.google.com with SMTP id k9so4282147qki.6; Fri, 30 Oct 2020 02:56:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VZ/QGR0kajmzUn4qtDvz/dWAGdkKBYhn5rlifvz8RP8=; b=WBAUI31a70e6muQdL7e9ao0O2DoRNVj3iEFhJqHvwE8ilyj5O66T+tmRZZOW4X8/rw aMA7StPLtQEkvmUmh2xAuB0Vdnjqgizwv/kJ1GRDlQVPqAyk4mTveanNJIYXgFGFRFrU ke8JJQPsPWrsj6i13wX0bPrGoA0RFWpPYhCdIwhOJ+tUoxLU2thz7XsUzvqfMJpfG+oe uiU952GNZ//HivDBw678w9KXrWBqpHU+InBLhHWWXjDKS/SHfWAR0MSquCZpZPZahhLJ cWWZ3a5yzBFYGu76z+y1++0pLzC7LHHzyiSRDeukle+sEkrKdbSQN2rPThkw7ticlcOA l38g== X-Gm-Message-State: AOAM530uRPBgDUTMNkV0XbckoU6Qpjnl2iZ1rXhC2BbjxtSVAZrln1vZ Oqa90fXNf3Tp7FZzo+zPS0pWxRXfaMc+Nw== X-Google-Smtp-Source: ABdhPJya0wtqPz+25xVIQW5qOxrrzzPznjRbYfMvD7I9OCq4pr3YkWzsRQWkDdvCkJRUAx2jUCWe+Q== X-Received: by 2002:ae9:f502:: with SMTP id o2mr1226804qkg.478.1604051765094; Fri, 30 Oct 2020 02:56:05 -0700 (PDT) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com. [209.85.219.170]) by smtp.gmail.com with ESMTPSA id f1sm2368848qto.18.2020.10.30.02.56.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2020 02:56:04 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id f140so4630947ybg.3; Fri, 30 Oct 2020 02:56:04 -0700 (PDT) X-Received: by 2002:a25:bccc:: with SMTP id l12mr2371483ybm.187.1604051764641; Fri, 30 Oct 2020 02:56:04 -0700 (PDT) MIME-Version: 1.0 References: <202010291834.09TIYlrb040546@repo.freebsd.org> <023d1414-cc24-8c4b-fd11-02bd4d5ece40@icloud.com> In-Reply-To: <023d1414-cc24-8c4b-fd11-02bd4d5ece40@icloud.com> From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Fri, 30 Oct 2020 12:54:11 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r367141 - head/usr.bin/fetch To: xtouqh@icloud.com Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4CMyPL1wzQz3WNB X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of fernandoapesteguia@gmail.com designates 209.85.222.177 as permitted sender) smtp.mailfrom=fernandoapesteguia@gmail.com X-Spamd-Result: default: False [-1.47 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.01)[-1.006]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.55)[0.549]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.177:from]; NEURAL_HAM_MEDIUM(-1.01)[-1.014]; FREEMAIL_TO(0.00)[icloud.com]; FORGED_SENDER(0.30)[fernape@freebsd.org,fernandoapesteguia@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.177:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[fernape@freebsd.org,fernandoapesteguia@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 09:56:07 -0000 On Thu, Oct 29, 2020 at 7:52 PM wrote: > Fernando Apestegu=C3=ADa wrote: > > Author: fernape (ports committer) > > Date: Thu Oct 29 18:34:47 2020 > > New Revision: 367141 > > URL: https://svnweb.freebsd.org/changeset/base/367141 > > > > Log: > > fetch(1): Add EXAMPLES section > > > > Add a few examples covering flags: 1, R, a, o, q, r, s, v > > > > Approved by: manpages (bcr@) > > Differential Revision: https://reviews.freebsd.org/D2694= 6 > > > > Modified: > > head/usr.bin/fetch/fetch.1 > > > > Modified: head/usr.bin/fetch/fetch.1 > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > --- head/usr.bin/fetch/fetch.1 Thu Oct 29 18:29:22 2020 > (r367140) > > +++ head/usr.bin/fetch/fetch.1 Thu Oct 29 18:34:47 2020 > (r367141) > > @@ -30,7 +30,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd May 6, 2018 > > +.Dd October 29, 2020 > > .Dt FETCH 1 > > .Os > > .Sh NAME > > @@ -384,6 +384,51 @@ If the > > argument is used and the remote file is not newer than the > > specified file then the command will still return success, > > although no file is transferred. > > +.Sh EXAMPLES > > +Silently try to fetch the URLs passed as parameters. > > +The first one will fail. > > +If the second URL succeeds the third one will not be tried: > > +.Bd -literal -offset indent > > +$ fetch -1 -q https://www.freebsd.org/bad.html \\ > > + ftp.freebsd.org/pub/FreeBSD/README.TXT \\ > > + https://www.fake.url > > +fetch: https://www.freebsd.org/bad.html: Not Found > > +.Ed > > +.Pp > > +Be verbose when retrieving the > > +.Ql README.TXT > > +file: > > +.Bd -literal -offset indent > > +$ fetch -v ftp.freebsd.org/pub/FreeBSD/README.TXT > > +resolving server address: ftp.freebsd.org:80 > > +requesting http://ftp.freebsd.org/pub/FreeBSD/README.TXT > > +local size / mtime: 4259 / 1431015519 > > +remote size / mtime: 4259 / 1431015519 > > +README.TXT 4259 B 44 > MBps 00s > > +.Ed > > +.Pp > > +Quietly save the > > +.Ql README.TXT file as > > "file as" should be on separate line, otherwise it's treated as part of > .Ql argument. BTW, why are we not using .Pa for these? > Thanks for catching this. It should be fixed by now. Cheers. > > > +.Ql myreadme.txt > > +and do not delete the output file under any circumstances: > > +.Bd -literal -offset indent > > +fetch -o myreadme.txt -q -R ftp.freebsd.org/pub/FreeBSD/README.TXT > > +.Ed > > +.Pp > > +Print the size of the requested file and identify the request with a > custom user > > +agent string: > > +.Bd -literal -offset indent > > +$ fetch -s ftp.freebsd.org/pub/FreeBSD/README.TXT > > +--user-agent=3D"Mozilla/5.0 (X11; FreeBSD x86_64; rv:78.0) Gecko/20100= 101" > > +3513231 > > +.Ed > > +.Pp > > +Restart the transfer of the > > +.Ql README.TXT > > +file and retry the transfer upon soft failures: > > +.Bd -literal -offset indent > > +$ fetch -a -r http://ftp.freebsd.org/pub/FreeBSD/README.TXT > > +.Ed > > .Sh SEE ALSO > > .Xr fetch 3 , > > .Xr phttpget 8 > > From owner-svn-src-head@freebsd.org Fri Oct 30 09:56:31 2020 Return-Path: Delivered-To: svn-src-head@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 2B3CC44DC28; Fri, 30 Oct 2020 09:56:31 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMyPp1Tp9z3WNq; Fri, 30 Oct 2020 09:56:30 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-qv1-f41.google.com with SMTP id t20so2494268qvv.8; Fri, 30 Oct 2020 02:56:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=zvthjBpeDlZsFPu3GBrONLBJg2CItA7rNmoBs4KFZMc=; b=e4XIQwMr/6sPCCUMTkIUtABysr5lWV2+BJIVI+5rhCswUuTIbk8R2EOyXHFVU+0dhR m1CTOQXYHF1wG1pFekGHpe5bOYnvNtsqlmN0qZ4mquoR74xTQz8iNpO8TJ4BowJ7JKrf Cy5HohKKXgR7u5KxuRYOdr1p67EEg07neJVvzAtUnlODyXzsXWpykFTQEDMEwdWDa5Is uanmDkbPg1X262oAjFlWIPqwOBRb4KE2MXinsIxFJbwzEXEhZJlXv8k8yk0TeiKanVWr edIFIJCzsSbtHlzQJ5ZFaF97O/TmV+EU4NnFntChkzdQeRVpn7xw1TOYY31Xqt9GJjjk DL+w== X-Gm-Message-State: AOAM533SVsjKGLr88/tVncuxB/vwQD0nDELvuTKgmQlKoaD6LxJPYxjM mY54Ow6Th50U3NgCVZ1NN29FMt4fQb0nPg== X-Google-Smtp-Source: ABdhPJyse1vywawJjMA7owxqniH7S6gfy3KP+HicPv/SnEifw63+aUj2hCD/cd9tZg02NLTYBQqkxg== X-Received: by 2002:a05:6214:292:: with SMTP id l18mr8397859qvv.42.1604051789200; Fri, 30 Oct 2020 02:56:29 -0700 (PDT) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com. [209.85.219.178]) by smtp.gmail.com with ESMTPSA id y82sm1788000qkb.129.2020.10.30.02.56.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2020 02:56:29 -0700 (PDT) Received: by mail-yb1-f178.google.com with SMTP id o70so4649761ybc.1; Fri, 30 Oct 2020 02:56:28 -0700 (PDT) X-Received: by 2002:a25:ea03:: with SMTP id p3mr2085858ybd.377.1604051788733; Fri, 30 Oct 2020 02:56:28 -0700 (PDT) MIME-Version: 1.0 References: <202010291834.09TIYlrb040546@repo.freebsd.org> <20201029190334.ejnr6%steffen@sdaoden.eu> In-Reply-To: <20201029190334.ejnr6%steffen@sdaoden.eu> From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Fri, 30 Oct 2020 12:54:35 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r367141 - head/usr.bin/fetch To: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4CMyPp1Tp9z3WNq X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of fernandoapesteguia@gmail.com designates 209.85.219.41 as permitted sender) smtp.mailfrom=fernandoapesteguia@gmail.com X-Spamd-Result: default: False [-0.24 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[fernape@freebsd.org,fernandoapesteguia@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.01)[-1.009]; TO_DN_SOME(0.00)[]; URI_COUNT_ODD(1.00)[1]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-0.98)[-0.982]; NEURAL_SPAM_SHORT(0.75)[0.752]; RCVD_TLS_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.219.41:from]; FORGED_SENDER(0.30)[fernape@freebsd.org,fernandoapesteguia@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.219.41:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TAGGED_FROM(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 09:56:31 -0000 On Thu, Oct 29, 2020 at 8:03 PM Steffen Nurpmeso wrote= : > Hey. > > Fernando Apestegu=C3=ADa wrote in > <202010291834.09TIYlrb040546@repo.freebsd.org>: > |Author: fernape (ports committer) > |Date: Thu Oct 29 18:34:47 2020 > |New Revision: 367141 > |URL: https://svnweb.freebsd.org/changeset/base/367141 > | > |Log: > | fetch(1): Add EXAMPLES section > | > | Add a few examples covering flags: 1, R, a, o, q, r, s, v > | > | Approved by: manpages (bcr@) > | Differential Revision: https://reviews.freebsd.org/D2694= 6 > | > |Modified: > | head/usr.bin/fetch/fetch.1 > ... > |+$ fetch -1 -q https://www.freebsd.org/bad.html \\ > |+ ftp.freebsd.org/pub/FreeBSD/README.TXT \\ > > groff(7) says > > \\ reduces to a single backslash; useful to delay its interpreta= =E2=80=90 > tion as escape character in copy mode. For a printable back= =E2=80=90 > slash, use \e, or even better \[rs], to be independent from th= e > current escape character. > Thanks Steffen, Should be fixed by now. Cheers. > > --steffen > | > |Der Kragenbaer, The moon bear, > |der holt sich munter he cheerfully and one by one > |einen nach dem anderen runter wa.ks himself off > |(By Robert Gernhardt) > From owner-svn-src-head@freebsd.org Fri Oct 30 10:44:47 2020 Return-Path: Delivered-To: svn-src-head@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 6C13744E9A4; Fri, 30 Oct 2020 10:44:47 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMzTW2G8Gz3Yr3; Fri, 30 Oct 2020 10:44:47 +0000 (UTC) (envelope-from se@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 16BEE150F0; Fri, 30 Oct 2020 10:44:47 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UAikvg037002; Fri, 30 Oct 2020 10:44:46 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UAikd8037001; Fri, 30 Oct 2020 10:44:46 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010301044.09UAikd8037001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Fri, 30 Oct 2020 10:44:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367161 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367161 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 10:44:47 -0000 Author: se Date: Fri Oct 30 10:44:46 2020 New Revision: 367161 URL: https://svnweb.freebsd.org/changeset/base/367161 Log: Re-implement comment parsing missing in the internal pre-processor The internal pre-processor ignored lines that did not parse a calendar entries, but did not support multi-line comments in the way the external cpp did. The calendar files distributed with the base system (now in a port) do use comments, though. Implement comment processing for single-line (//) and multi-line comments (/* */) with same semantics as in a standard C pre-processor. All tests pass with this version, but there are no tests that specifically verify comment processing. Reported by: jhs@berklix.com (Julian H. Stacey) MFC after: 3 days Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Fri Oct 30 09:48:41 2020 (r367160) +++ head/usr.bin/calendar/io.c Fri Oct 30 10:44:46 2020 (r367161) @@ -278,6 +278,8 @@ cal_parse(FILE *in, FILE *out) char *pp, p; struct tm tm; int flags; + char *c, *cc; + bool incomment = false; /* Unused */ tm.tm_sec = 0; @@ -289,8 +291,55 @@ cal_parse(FILE *in, FILE *out) return (1); while ((linelen = getline(&line, &linecap, in)) > 0) { - if (*line == '#') { - switch (token(line+1, out, &skip)) { + buf = line; + if (buf[linelen - 1] == '\n') + buf[--linelen] = '\0'; + + if (incomment) { + c = strstr(buf, "*/"); + if (c) { + c += 2; + linelen -= c - buf; + buf = c; + incomment = false; + } else { + continue; + } + } + if (!incomment) { + do { + c = strstr(buf, "//"); + cc = strstr(buf, "/*"); + if (c != NULL && (cc == NULL || c - cc < 0)) { + *c = '\0'; + linelen = c - buf; + break; + } else if (cc != NULL) { + c = strstr(cc + 2, "*/"); + if (c != NULL) { + c += 2; + memmove(cc, c, c - buf + linelen); + linelen -= c - cc; + } else { + *cc = '\0'; + linelen = cc - buf; + incomment = true; + break; + } + } + } while (c != NULL || cc != NULL); + } + + for (l = linelen; + l > 0 && isspace((unsigned char)buf[l - 1]); + l--) + ; + buf[l] = '\0'; + if (buf[0] == '\0') + continue; + + if (buf == line && *buf == '#') { + switch (token(buf+1, out, &skip)) { case T_ERR: free(line); return (1); @@ -304,15 +353,6 @@ cal_parse(FILE *in, FILE *out) } if (skip != 0) - continue; - - buf = line; - for (l = linelen; - l > 0 && isspace((unsigned char)buf[l - 1]); - l--) - ; - buf[l] = '\0'; - if (buf[0] == '\0') continue; /* From owner-svn-src-head@freebsd.org Fri Oct 30 10:46:37 2020 Return-Path: Delivered-To: svn-src-head@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 40BC344E774; Fri, 30 Oct 2020 10:46:37 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMzWd10MSz3Yvw; Fri, 30 Oct 2020 10:46:37 +0000 (UTC) (envelope-from mjg@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 054EC156BC; Fri, 30 Oct 2020 10:46:37 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UAkabF037136; Fri, 30 Oct 2020 10:46:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UAkZg5037130; Fri, 30 Oct 2020 10:46:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010301046.09UAkZg5037130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 30 Oct 2020 10:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367162 - in head/sys: contrib/openzfs/module/os/freebsd/zfs fs/tmpfs kern sys ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: contrib/openzfs/module/os/freebsd/zfs fs/tmpfs kern sys ufs/ufs X-SVN-Commit-Revision: 367162 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 10:46:37 -0000 Author: mjg Date: Fri Oct 30 10:46:35 2020 New Revision: 367162 URL: https://svnweb.freebsd.org/changeset/base/367162 Log: cache: add cache_vop_mkdir and rename cache_rename to cache_vop_rename Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/vfs_cache.c head/sys/sys/param.h head/sys/sys/vnode.h head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c ============================================================================== --- head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c Fri Oct 30 10:44:46 2020 (r367161) +++ head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c Fri Oct 30 10:46:35 2020 (r367162) @@ -2273,6 +2273,16 @@ zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t * return (0); } +#if __FreeBSD_version < 1300124 +static void +cache_vop_rmdir(struct vnode *dvp, struct vnode *vp) +{ + + cache_purge(dvp); + cache_purge(vp); +} +#endif + /* * Remove a directory subdir entry. If the current working * directory is the same as the subdir to be removed, the @@ -2342,7 +2352,7 @@ zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name dmu_tx_commit(tx); - cache_purge(vp); + cache_vop_rmdir(dvp, vp); out: if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS) zil_commit(zilog, 0); @@ -3901,7 +3911,7 @@ zfs_rename_check(znode_t *szp, znode_t *sdzp, znode_t #if __FreeBSD_version < 1300110 static void -cache_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp, +cache_vop_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp, struct vnode *tvp, struct componentname *fcnp, struct componentname *tcnp) { @@ -4170,7 +4180,7 @@ zfs_rename_(vnode_t *sdvp, vnode_t **svpp, struct comp } } if (error == 0) { - cache_rename(sdvp, *svpp, tdvp, *tvpp, scnp, tcnp); + cache_vop_rename(sdvp, *svpp, tdvp, *tvpp, scnp, tcnp); } } Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Fri Oct 30 10:44:46 2020 (r367161) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Fri Oct 30 10:46:35 2020 (r367162) @@ -1210,7 +1210,7 @@ tmpfs_rename(struct vop_rename_args *v) tmpfs_dir_attach(tdvp, de); if (tmpfs_use_nc(fvp)) { - cache_rename(fdvp, fvp, tdvp, tvp, fcnp, tcnp); + cache_vop_rename(fdvp, fvp, tdvp, tvp, fcnp, tcnp); } error = 0; @@ -1331,7 +1331,7 @@ tmpfs_rmdir(struct vop_rmdir_args *v) TMPFS_NODE_UNLOCK(dnode); if (tmpfs_use_nc(dvp)) { - cache_purge(vp); + cache_vop_rmdir(dvp, vp); } /* Free the directory entry we just deleted. Note that the node Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Fri Oct 30 10:44:46 2020 (r367161) +++ head/sys/kern/vfs_cache.c Fri Oct 30 10:46:35 2020 (r367162) @@ -2659,8 +2659,11 @@ cache_purge_negative(struct vnode *vp) cache_free_batch(&batch); } +/* + * Entry points for modifying VOP operations. + */ void -cache_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp, +cache_vop_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp, struct vnode *tvp, struct componentname *fcnp, struct componentname *tcnp) { @@ -2678,6 +2681,15 @@ cache_rename(struct vnode *fdvp, struct vnode *fvp, st } else { cache_remove_cnp(tdvp, tcnp); } +} + +void +cache_vop_rmdir(struct vnode *dvp, struct vnode *vp) +{ + + ASSERT_VOP_IN_SEQC(dvp); + ASSERT_VOP_IN_SEQC(vp); + cache_purge(vp); } #ifdef INVARIANTS Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Oct 30 10:44:46 2020 (r367161) +++ head/sys/sys/param.h Fri Oct 30 10:46:35 2020 (r367162) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300123 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300124 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Oct 30 10:44:46 2020 (r367161) +++ head/sys/sys/vnode.h Fri Oct 30 10:46:35 2020 (r367162) @@ -641,9 +641,10 @@ void cache_vnode_init(struct vnode *vp); void cache_purge(struct vnode *vp); void cache_purge_vgone(struct vnode *vp); void cache_purge_negative(struct vnode *vp); -void cache_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp, - struct vnode *tvp, struct componentname *fcnp, struct componentname *tcnp); void cache_purgevfs(struct mount *mp); +void cache_vop_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp, + struct vnode *tvp, struct componentname *fcnp, struct componentname *tcnp); +void cache_vop_rmdir(struct vnode *dvp, struct vnode *vp); #ifdef INVARIANTS void cache_validate(struct vnode *dvp, struct vnode *vp, struct componentname *cnp); Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Fri Oct 30 10:44:46 2020 (r367161) +++ head/sys/ufs/ufs/ufs_vnops.c Fri Oct 30 10:46:35 2020 (r367162) @@ -1629,7 +1629,7 @@ relock: * name that references the old i-node if it has other links * or open file descriptors. */ - cache_rename(fdvp, fvp, tdvp, tvp, fcnp, tcnp); + cache_vop_rename(fdvp, fvp, tdvp, tvp, fcnp, tcnp); unlockout: if (want_seqc_end) { @@ -2220,7 +2220,7 @@ ufs_rmdir(ap) DIP_SET(ip, i_nlink, ip->i_nlink); UFS_INODE_SET_FLAG(ip, IN_CHANGE); } - cache_purge(vp); + cache_vop_rmdir(dvp, vp); #ifdef UFS_DIRHASH /* Kill any active hash; i_effnlink == 0, so it will not come back. */ if (ip->i_dirhash != NULL) From owner-svn-src-head@freebsd.org Fri Oct 30 13:32:59 2020 Return-Path: Delivered-To: svn-src-head@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 7A3BC452377; Fri, 30 Oct 2020 13:32:59 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN3Cb2KrCz401S; Fri, 30 Oct 2020 13:32:59 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 333A416FCF; Fri, 30 Oct 2020 13:32:59 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UDWxti041815; Fri, 30 Oct 2020 13:32:59 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UDWxBQ041814; Fri, 30 Oct 2020 13:32:59 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202010301332.09UDWxBQ041814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Fri, 30 Oct 2020 13:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367163 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 367163 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 13:32:59 -0000 Author: mhorne Date: Fri Oct 30 13:32:58 2020 New Revision: 367163 URL: https://svnweb.freebsd.org/changeset/base/367163 Log: net: add ETHER_IS_IPV6_MULTICAST This can be used to detect if an ethernet address is specifically an IPv6 multicast address, defined in accordance to RFC 2464. ETHER_IS_MULTICAST is still preferred in the general case. Reviewed by: ae Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26611 Modified: head/sys/net/ethernet.h Modified: head/sys/net/ethernet.h ============================================================================== --- head/sys/net/ethernet.h Fri Oct 30 10:46:35 2020 (r367162) +++ head/sys/net/ethernet.h Fri Oct 30 13:32:58 2020 (r367163) @@ -71,6 +71,8 @@ struct ether_addr { } __packed; #define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */ +#define ETHER_IS_IPV6_MULTICAST(addr) \ + (((addr)[0] == 0x33) && ((addr)[1] == 0x33)) #define ETHER_IS_BROADCAST(addr) \ (((addr)[0] & (addr)[1] & (addr)[2] & \ (addr)[3] & (addr)[4] & (addr)[5]) == 0xff) From owner-svn-src-head@freebsd.org Fri Oct 30 14:02:57 2020 Return-Path: Delivered-To: svn-src-head@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 3CB59452D26; Fri, 30 Oct 2020 14:02:57 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN3t90qt5z41QR; Fri, 30 Oct 2020 14:02:57 +0000 (UTC) (envelope-from mjg@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 009AC17962; Fri, 30 Oct 2020 14:02:57 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UE2uds060338; Fri, 30 Oct 2020 14:02:56 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UE2uAp060337; Fri, 30 Oct 2020 14:02:56 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010301402.09UE2uAp060337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 30 Oct 2020 14:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367164 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 367164 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 14:02:57 -0000 Author: mjg Date: Fri Oct 30 14:02:56 2020 New Revision: 367164 URL: https://svnweb.freebsd.org/changeset/base/367164 Log: vfs: change vnode poll to just a malloc type The size is 120, close fit for 128 and rarely used. The infrequent use avoidably populates per-CPU caches and ends up with more memory. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Oct 30 13:32:58 2020 (r367163) +++ head/sys/kern/vfs_subr.c Fri Oct 30 14:02:56 2020 (r367164) @@ -228,7 +228,7 @@ static smr_t buf_trie_smr; /* Zone for allocation of new vnodes - used exclusively by getnewvnode() */ static uma_zone_t vnode_zone; -static uma_zone_t vnodepoll_zone; +MALLOC_DEFINE(M_VNODEPOLL, "VN POLL", "vnode poll"); __read_frequently smr_t vfs_smr; @@ -660,8 +660,6 @@ vntblinit(void *dummy __unused) vnode_zone = uma_zcreate("VNODE", sizeof (struct vnode), NULL, NULL, vnode_init, vnode_fini, UMA_ALIGN_PTR, 0); uma_zone_set_smr(vnode_zone, vfs_smr); - vnodepoll_zone = uma_zcreate("VNODEPOLL", sizeof (struct vpollinfo), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); /* * Preallocate enough nodes to support one-per buf so that * we can not fail an insert. reassignbuf() callers can not @@ -4788,7 +4786,7 @@ destroy_vpollinfo_free(struct vpollinfo *vi) knlist_destroy(&vi->vpi_selinfo.si_note); mtx_destroy(&vi->vpi_lock); - uma_zfree(vnodepoll_zone, vi); + free(vi, M_VNODEPOLL); } static void @@ -4810,7 +4808,7 @@ v_addpollinfo(struct vnode *vp) if (vp->v_pollinfo != NULL) return; - vi = uma_zalloc(vnodepoll_zone, M_WAITOK | M_ZERO); + vi = malloc(sizeof(*vi), M_VNODEPOLL, M_WAITOK | M_ZERO); mtx_init(&vi->vpi_lock, "vnode pollinfo", NULL, MTX_DEF); knlist_init(&vi->vpi_selinfo.si_note, vp, vfs_knllock, vfs_knlunlock, vfs_knl_assert_locked, vfs_knl_assert_unlocked); From owner-svn-src-head@freebsd.org Fri Oct 30 14:07:26 2020 Return-Path: Delivered-To: svn-src-head@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 18A6A452963; Fri, 30 Oct 2020 14:07:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN3zK6w6Bz41pS; Fri, 30 Oct 2020 14:07:25 +0000 (UTC) (envelope-from mjg@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 D097F17963; Fri, 30 Oct 2020 14:07:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UE7PiH060732; Fri, 30 Oct 2020 14:07:25 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UE7Phw060731; Fri, 30 Oct 2020 14:07:25 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010301407.09UE7Phw060731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 30 Oct 2020 14:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367165 - head/sys/fs/tmpfs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/fs/tmpfs X-SVN-Commit-Revision: 367165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 14:07:26 -0000 Author: mjg Date: Fri Oct 30 14:07:25 2020 New Revision: 367165 URL: https://svnweb.freebsd.org/changeset/base/367165 Log: tmpfs: change tmpfs dirent zone into a malloc type It is 64 bytes. Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Fri Oct 30 14:02:56 2020 (r367164) +++ head/sys/fs/tmpfs/tmpfs_subr.c Fri Oct 30 14:07:25 2020 (r367165) @@ -75,7 +75,7 @@ SYSCTL_NODE(_vfs, OID_AUTO, tmpfs, CTLFLAG_RW | CTLFLA static long tmpfs_pages_reserved = TMPFS_PAGES_MINRESERVED; -static uma_zone_t tmpfs_dirent_pool; +MALLOC_DEFINE(M_TMPFSDIR, "tmpfs dir", "tmpfs dirent structure"); static uma_zone_t tmpfs_node_pool; VFS_SMR_DECLARE; @@ -129,9 +129,6 @@ tmpfs_node_fini(void *mem, int size) void tmpfs_subr_init(void) { - tmpfs_dirent_pool = uma_zcreate("TMPFS dirent", - sizeof(struct tmpfs_dirent), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, 0); tmpfs_node_pool = uma_zcreate("TMPFS node", sizeof(struct tmpfs_node), tmpfs_node_ctor, tmpfs_node_dtor, tmpfs_node_init, tmpfs_node_fini, UMA_ALIGN_PTR, 0); @@ -142,7 +139,6 @@ void tmpfs_subr_uninit(void) { uma_zdestroy(tmpfs_node_pool); - uma_zdestroy(tmpfs_dirent_pool); } static int @@ -506,7 +502,7 @@ tmpfs_alloc_dirent(struct tmpfs_mount *tmp, struct tmp { struct tmpfs_dirent *nde; - nde = uma_zalloc(tmpfs_dirent_pool, M_WAITOK); + nde = malloc(sizeof(*nde), M_TMPFSDIR, M_WAITOK); nde->td_node = node; if (name != NULL) { nde->ud.td_name = malloc(len, M_TMPFSNAME, M_WAITOK); @@ -542,7 +538,7 @@ tmpfs_free_dirent(struct tmpfs_mount *tmp, struct tmpf } if (!tmpfs_dirent_duphead(de) && de->ud.td_name != NULL) free(de->ud.td_name, M_TMPFSNAME); - uma_zfree(tmpfs_dirent_pool, de); + free(de, M_TMPFSDIR); } void From owner-svn-src-head@freebsd.org Fri Oct 30 14:08:37 2020 Return-Path: Delivered-To: svn-src-head@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 A48B0452FC4; Fri, 30 Oct 2020 14:08:37 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN40h3vqDz422q; Fri, 30 Oct 2020 14:08:36 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x32a.google.com with SMTP id c18so2973358wme.2; Fri, 30 Oct 2020 07:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=zIluw36lbLvzqCCt3ZqWbtANRzeAa7ITfduwNGg+Kmo=; b=Lge5IUuUWcHinfR4UOiKmk5kLsML+aSVyV8gRsaVLhqGt5p8KGiWf9AWLZcSjVwbRv hWvJK+XgW7cyWDe4h6nUTseJQ4YV145BjvOKRE7n8e2gPmlMkCCjfOmxB6RdT9sDHdVr ORwl9UsGRCJ9BmdlJD8pnxc9XYNhSs3j0TDoa+dRiiBwY2K8sv+O7WHBpKVL4Yx7PvZu X2xa0EsGVp+MnjXVtnlPD9hnlTmyrCTyA4Pej04a+DzDSPdgcascmDq2pN/2kRgHwxbf 6f4apKGfQqzPIE42J+RpcBOfFMde4rORxbHmRBXw3R44P3KBoSy/wSEngFhTWlVrMOp1 pADw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=zIluw36lbLvzqCCt3ZqWbtANRzeAa7ITfduwNGg+Kmo=; b=aKQ86onz3VY0cJpsZJ/1UqBuxJBJCaA3xO22wdBtwKG94iAMJ2KVE7798d0Dd/X9tN epey4mJrbcHXIvABHHdvXrJkcNxe1nxsnWLhATRirei9EfYC5F/5gaJR0wEcpC59ORCj NHJrDHOnEvox6lypB2Vt8IM4WKu3XVg6RpLMN1Z9Y3e/h0qb7NY2UHEN2aWMTJTDEstt TUCMV6JgarazC18/1gOvUTL28AZdFi0nj8F1GMCLF2CdImCQuC4SuZUBD3quqwNd2+xZ C7h6sC+lBY+Vw+hMuJ959k0Zj3UoZytE87vJJZapYK+ptA9aRitDg4ulw5s1sWn1qP6H pG8A== X-Gm-Message-State: AOAM533Za+zOwErrmh9f37pTGv/iKMA/V1L3uXxWNTa2jCxLyiGVY0c4 v5G8WpZAGEbLMgv1R6XIC/igny+/3EZofLbSwFRHbkGdREk= X-Google-Smtp-Source: ABdhPJxZBnBnGaTJO2q9o5qrkd9N+9qHDpqD7snb8qt57IKMrLMNIHeru7nxBoNC+8VDr3Al+RXhuV4GgxFfVh5yQBk= X-Received: by 2002:a1c:2441:: with SMTP id k62mr3050273wmk.10.1604066913672; Fri, 30 Oct 2020 07:08:33 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:4c4f:0:0:0:0:0 with HTTP; Fri, 30 Oct 2020 07:08:32 -0700 (PDT) In-Reply-To: <202010301407.09UE7Phw060731@repo.freebsd.org> References: <202010301407.09UE7Phw060731@repo.freebsd.org> From: Mateusz Guzik Date: Fri, 30 Oct 2020 15:08:32 +0100 Message-ID: Subject: Re: svn commit: r367165 - head/sys/fs/tmpfs To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CN40h3vqDz422q X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Lge5IUuU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::32a as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-2.80 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.01)[-1.013]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_SPAM_SHORT(0.21)[0.211]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::32a:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 14:08:37 -0000 On 10/30/20, Mateusz Guzik wrote: > Author: mjg > Date: Fri Oct 30 14:07:25 2020 > New Revision: 367165 > URL: https://svnweb.freebsd.org/changeset/base/367165 > > Log: > tmpfs: change tmpfs dirent zone into a malloc type > > It is 64 bytes. > Right now malloc has only power-of-2 zones but I'm looking into changing that. The allocator itself trivially extends to multiply of 16, but stat collection needs reworking. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Oct 30 14:32:14 2020 Return-Path: Delivered-To: svn-src-head@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 4230E453565; Fri, 30 Oct 2020 14:32:14 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN4Wy14hwz42c6; Fri, 30 Oct 2020 14:32:14 +0000 (UTC) (envelope-from se@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 086A4180A1; Fri, 30 Oct 2020 14:32:14 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UEWDOA076995; Fri, 30 Oct 2020 14:32:13 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UEWDSY076994; Fri, 30 Oct 2020 14:32:13 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010301432.09UEWDSY076994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Fri, 30 Oct 2020 14:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367166 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367166 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 14:32:14 -0000 Author: se Date: Fri Oct 30 14:32:13 2020 New Revision: 367166 URL: https://svnweb.freebsd.org/changeset/base/367166 Log: Fix length calculation in memmove MFC after: 3 days Modified: head/usr.bin/calendar/events.c head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/events.c ============================================================================== --- head/usr.bin/calendar/events.c Fri Oct 30 14:07:25 2020 (r367165) +++ head/usr.bin/calendar/events.c Fri Oct 30 14:32:13 2020 (r367166) @@ -55,6 +55,7 @@ set_new_encoding(void) const char *newenc; newenc = nl_langinfo(CODESET); + fprintf(stderr, "NEWENC=%s\n", newenc); // DEBUG if (currentEncoding == NULL) { currentEncoding = strdup(newenc); if (currentEncoding == NULL) @@ -98,13 +99,14 @@ convert(char *input) else err(1, "Initialization failure"); } + fprintf(stderr, "CONV=%p\n", conv); // DEBUG } inleft = strlen(input); inbuf = input; - outlen = inleft; - if ((output = malloc(outlen + 1)) == NULL) + outlen = inleft + 3; + if ((output = malloc(outlen)) == NULL) errx(1, "convert: cannot allocate memory"); for (;;) { @@ -112,7 +114,9 @@ convert(char *input) outbuf = output + converted; outleft = outlen - converted; + fprintf(stderr, "-< %s %p %ld %ld\n", inbuf, outbuf, inleft, outleft); // DEBUG converted = iconv(conv, (char **) &inbuf, &inleft, &outbuf, &outleft); + fprintf(stderr, "-> %ld %s %p %ld %ld\n", converted, inbuf, outbuf, inleft, outleft); // DEBUG if (converted != (size_t) -1 || errno == EINVAL) { /* finished or invalid multibyte, so truncate and ignore */ break; Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Fri Oct 30 14:07:25 2020 (r367165) +++ head/usr.bin/calendar/io.c Fri Oct 30 14:32:13 2020 (r367166) @@ -311,16 +311,19 @@ cal_parse(FILE *in, FILE *out) c = strstr(buf, "//"); cc = strstr(buf, "/*"); if (c != NULL && (cc == NULL || c - cc < 0)) { + /* single line comment */ *c = '\0'; linelen = c - buf; break; } else if (cc != NULL) { c = strstr(cc + 2, "*/"); if (c != NULL) { + /* multi-line comment ending on same line */ c += 2; - memmove(cc, c, c - buf + linelen); + memmove(cc, c, buf + linelen + 1 - c); linelen -= c - cc; } else { + /* multi-line comment */ *cc = '\0'; linelen = cc - buf; incomment = true; From owner-svn-src-head@freebsd.org Fri Oct 30 14:34:52 2020 Return-Path: Delivered-To: svn-src-head@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 3BBCC4533D6; Fri, 30 Oct 2020 14:34:52 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN4b00rbRz42jK; Fri, 30 Oct 2020 14:34:52 +0000 (UTC) (envelope-from se@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 0054317EC1; Fri, 30 Oct 2020 14:34:52 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UEYpAr079022; Fri, 30 Oct 2020 14:34:51 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UEYpdt079021; Fri, 30 Oct 2020 14:34:51 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010301434.09UEYpdt079021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Fri, 30 Oct 2020 14:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367167 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 14:34:52 -0000 Author: se Date: Fri Oct 30 14:34:51 2020 New Revision: 367167 URL: https://svnweb.freebsd.org/changeset/base/367167 Log: Revert debug output committed in r367166 by accident MFC after: 3 days Modified: head/usr.bin/calendar/events.c Modified: head/usr.bin/calendar/events.c ============================================================================== --- head/usr.bin/calendar/events.c Fri Oct 30 14:32:13 2020 (r367166) +++ head/usr.bin/calendar/events.c Fri Oct 30 14:34:51 2020 (r367167) @@ -55,7 +55,6 @@ set_new_encoding(void) const char *newenc; newenc = nl_langinfo(CODESET); - fprintf(stderr, "NEWENC=%s\n", newenc); // DEBUG if (currentEncoding == NULL) { currentEncoding = strdup(newenc); if (currentEncoding == NULL) @@ -99,14 +98,13 @@ convert(char *input) else err(1, "Initialization failure"); } - fprintf(stderr, "CONV=%p\n", conv); // DEBUG } inleft = strlen(input); inbuf = input; - outlen = inleft + 3; - if ((output = malloc(outlen)) == NULL) + outlen = inleft; + if ((output = malloc(outlen + 1)) == NULL) errx(1, "convert: cannot allocate memory"); for (;;) { @@ -114,9 +112,7 @@ convert(char *input) outbuf = output + converted; outleft = outlen - converted; - fprintf(stderr, "-< %s %p %ld %ld\n", inbuf, outbuf, inleft, outleft); // DEBUG converted = iconv(conv, (char **) &inbuf, &inleft, &outbuf, &outleft); - fprintf(stderr, "-> %ld %s %p %ld %ld\n", converted, inbuf, outbuf, inleft, outleft); // DEBUG if (converted != (size_t) -1 || errno == EINVAL) { /* finished or invalid multibyte, so truncate and ignore */ break; From owner-svn-src-head@freebsd.org Fri Oct 30 14:38:59 2020 Return-Path: Delivered-To: svn-src-head@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 DAF3845390E; Fri, 30 Oct 2020 14:38:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN4gl1rbZz43RZ; Fri, 30 Oct 2020 14:38:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 09UEcpLH022990 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 30 Oct 2020 16:38:54 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 09UEcpLH022990 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 09UEcpjp022989; Fri, 30 Oct 2020 16:38:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 30 Oct 2020 16:38:51 +0200 From: Konstantin Belousov To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367165 - head/sys/fs/tmpfs Message-ID: <20201030143851.GE2654@kib.kiev.ua> References: <202010301407.09UE7Phw060731@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4CN4gl1rbZz43RZ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [0.52 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_SPAM_SHORT(0.11)[0.111]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; NEURAL_SPAM_MEDIUM(0.01)[0.014]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.39)[0.393]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 14:38:59 -0000 On Fri, Oct 30, 2020 at 03:08:32PM +0100, Mateusz Guzik wrote: > On 10/30/20, Mateusz Guzik wrote: > > Author: mjg > > Date: Fri Oct 30 14:07:25 2020 > > New Revision: 367165 > > URL: https://svnweb.freebsd.org/changeset/base/367165 > > > > Log: > > tmpfs: change tmpfs dirent zone into a malloc type > > > > It is 64 bytes. > > > > Right now malloc has only power-of-2 zones but I'm looking into > changing that. The allocator itself trivially extends to multiply of > 16, but stat collection needs reworking. Either commit message or follow-up do not explain why stopping using zone for dirents is useful. Intuition says exactly reverse, dirents on tmpfs are allocation-intensive typically. From owner-svn-src-head@freebsd.org Fri Oct 30 14:47:23 2020 Return-Path: Delivered-To: svn-src-head@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 61A5E453AE9; Fri, 30 Oct 2020 14:47:23 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN4sR0WTBz44Rx; Fri, 30 Oct 2020 14:47:22 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x733.google.com with SMTP id x20so5043793qkn.1; Fri, 30 Oct 2020 07:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1kCuEyGfl3SMNeSqsMilMDKV0ykfZdMtwztIBU+nuAY=; b=nqCfqLd0QWBcbezhTdPp8WkobwhhJvupOK32bjYOSmZrBw43pL/IKY+zz2qX4LqNgd TfZFEHnVjXM7jabAnCvxNMTsful93VsholFmzxEq+RJvcg+hbGEZXDPwfAJQHGTfxYn5 DQ6jgrxwYtPIjKrek5Y/ewaqhDXsjFwLo+L5nDSJCDXrQFlMqaJjIkroR6KT8dgJ4GRm 0gX7cWHNN7soJj7DDFTheCzpxRCq9hn4ZUOA50RcgcFlLQPJU82/frf2CW6WR95ekplP 2SOiF52BjnaEnZyonLXG8kee2lUWmzuCFhNrJ/t2sFd596lUf6Cx7c4K7gXNvxws+zG+ 9YJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=1kCuEyGfl3SMNeSqsMilMDKV0ykfZdMtwztIBU+nuAY=; b=pWbN3W9x8US0Iexg/nZSP0WYHJJDz3VFs/ChS0ZLUu9RxQv76ZWIXqU61FBfg/wVvI VwKTceFm7qWcxeBuJCOyWOS/hFzP5CQ0vqPvPN6pdeRSgFDCuz+jSDfdy9gty/A+U9kj Wg2rgMOFotrqG0DKEr/RaT9g8cRAxnXTtZ0Dzv49tYq6Kn83Vw+fQj9THNSbQeAA+Vsd qiE7gF9SCb1q/m7orgwvFyiIBBzxviErSpjn92yOjcv5Rv/NnaKLNaboxSfz09YE97Ei +WZH0+b2pVAfdBsnkswQFoEeXEuGQrjRH2iUArwoDuJJUcDAhSuCOkrY/gWI6s7zrcEa 9Png== X-Gm-Message-State: AOAM530BdnnD6/fRgoy+VHHqwKPRU5QWEAILtpJaWQ4tzzvl45pdJCel mVBOWa7JLNec4JI4K0Rr8uMCsLoZYRs= X-Google-Smtp-Source: ABdhPJyAcuQbHLp9kteTVWlX1vjb/0twWVdrJdPE1DDh+afbAhVSBz9gSyPWYYIdf0FqAC5xzqabQA== X-Received: by 2002:a05:620a:814:: with SMTP id s20mr2445443qks.127.1604069241842; Fri, 30 Oct 2020 07:47:21 -0700 (PDT) Received: from raichu (toroon0560w-lp130-01-174-88-77-103.dsl.bell.ca. [174.88.77.103]) by smtp.gmail.com with ESMTPSA id p13sm2655538qkj.58.2020.10.30.07.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:21 -0700 (PDT) Sender: Mark Johnston Date: Fri, 30 Oct 2020 10:47:16 -0400 From: Mark Johnston To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367165 - head/sys/fs/tmpfs Message-ID: <20201030144716.GA60293@raichu> References: <202010301407.09UE7Phw060731@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202010301407.09UE7Phw060731@repo.freebsd.org> X-Rspamd-Queue-Id: 4CN4sR0WTBz44Rx X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 14:47:23 -0000 On Fri, Oct 30, 2020 at 02:07:25PM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Fri Oct 30 14:07:25 2020 > New Revision: 367165 > URL: https://svnweb.freebsd.org/changeset/base/367165 > > Log: > tmpfs: change tmpfs dirent zone into a malloc type > > It is 64 bytes. That could change though. What's the reason for whacking UMA zones? Is it to reduce fragmentation? If so it would worth trying to change UMA to share kegs among zones with identical item sizes. That would provide a similar benefit automatically. From owner-svn-src-head@freebsd.org Fri Oct 30 14:51:47 2020 Return-Path: Delivered-To: svn-src-head@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 B1963453A75; Fri, 30 Oct 2020 14:51:47 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN4yV6lBWz44TG; Fri, 30 Oct 2020 14:51:46 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x72f.google.com with SMTP id a64so1660278qkc.5; Fri, 30 Oct 2020 07:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mQpl05TJYtJnTg6LyZplIE3DTumk7QQM15nsViq2wTY=; b=CjeOjMg8EfCkRazoAMqB9LcX/0KtxSbqTExbNU1fnFIJGm7JESArSkk/+C4y+XGM2H J2fm909V+VrxGjeHaATNogOglPUbLiJoB547aDgEwRlu4oX+emPeFTYuox8RqvXqdEUC onQWiekdsuNMz4ze449eoA6qrJttXMCnPx5+9XQnwd9ASVPhppEZ0EGR3rEngxkTIQ1Z 2tsyUTSE7WoUB2cqydZjoVHo6zkIKkmJF2+I2h7NrCYRxL7Ef9yAIXnsKHdF7/2t3VhH IIZlBxwO1lh6PA23mU63JqL7D/Ky3djx0dabKr//GGRW3U/xdACNJOutK/Kaguo7/4tt RNlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=mQpl05TJYtJnTg6LyZplIE3DTumk7QQM15nsViq2wTY=; b=WohIGaYNfquVN9RXK9zDlWx61Fu9hBLEDOUF++VWBTQ/LNHpiMh9UuOayvgFF2l0c3 2p0fOD2A2ZB0d5F+6o4tn0JFazoglPZ2dW6uZN1/eyFpBVB6DQTk2q6deAucK1vSFSjs ke+VEpj3y5WBXpoL1nZXGMnND0SPlHZvxqn3XiBnzW3D9oM68Sbp1ZMSnUUtI/UE206r Qcjehpeeqd1REYc69VjNoC6jnEHcgCKJ0QbIoF8hin3g2ygyP2O4xCoY/r1+CFFHFxuc TWKDqtjTEdnayv5CcFfqJS1q/cErDTK02lzf7uADy/KifeHA+YfCHBART0eXztI0fduc //jA== X-Gm-Message-State: AOAM530QiaPkXb0jMlaOPpt7SBOw0Sti5dTylIcyh2344pinNNZxMIQh jNkwHKMEWGQGvLgNdyv/Bsitz4805kk= X-Google-Smtp-Source: ABdhPJyCnq4GLDlL5X3p0VYH4gR+TSKHVn9AvxGkijOuxWx1dw/wpoaiHZxllIb5l/FhHsrNSbgtSg== X-Received: by 2002:a37:4d13:: with SMTP id a19mr2454525qkb.159.1604069506130; Fri, 30 Oct 2020 07:51:46 -0700 (PDT) Received: from raichu (toroon0560w-lp130-01-174-88-77-103.dsl.bell.ca. [174.88.77.103]) by smtp.gmail.com with ESMTPSA id x3sm2699022qtp.5.2020.10.30.07.51.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:51:45 -0700 (PDT) Sender: Mark Johnston Date: Fri, 30 Oct 2020 10:51:43 -0400 From: Mark Johnston To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367165 - head/sys/fs/tmpfs Message-ID: <20201030145143.GB60293@raichu> References: <202010301407.09UE7Phw060731@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4CN4yV6lBWz44TG X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=CjeOjMg8; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::72f as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-1.83 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-1.02)[-1.023]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.09)[-0.086]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72f:from]; NEURAL_HAM_MEDIUM(-1.02)[-1.025]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 14:51:47 -0000 On Fri, Oct 30, 2020 at 03:08:32PM +0100, Mateusz Guzik wrote: > On 10/30/20, Mateusz Guzik wrote: > > Author: mjg > > Date: Fri Oct 30 14:07:25 2020 > > New Revision: 367165 > > URL: https://svnweb.freebsd.org/changeset/base/367165 > > > > Log: > > tmpfs: change tmpfs dirent zone into a malloc type > > > > It is 64 bytes. > > > > Right now malloc has only power-of-2 zones but I'm looking into > changing that. The allocator itself trivially extends to multiply of > 16, but stat collection needs reworking. Sums of consecutive powers of 2 also works well. That is, 16, 16 + 8, 32, 32 + 16, ... When I last looked I didn't see very many places that would benefit, at least outside of ZFS. Probably the main one is CAM CCBs, and that'll be helped by https://reviews.freebsd.org/D26844 . From owner-svn-src-head@freebsd.org Fri Oct 30 15:36:06 2020 Return-Path: Delivered-To: svn-src-head@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 8653B4548C5; Fri, 30 Oct 2020 15:36:06 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN5xf1lDbz46fx; Fri, 30 Oct 2020 15:36:05 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x335.google.com with SMTP id w23so3236832wmi.4; Fri, 30 Oct 2020 08:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Witx/dWeekJbGIGFSQLqx56JG2AGyfQvDqbO63+rVlw=; b=VsEOBXcqnM9QMUSWTlLBQULpgQp7gk5hj8VMCOAz87kBY4eNN6XV4/hNGCkBm8oxIJ YOAPQu3GzpI3IsDAUp1584H3wh9XTyhiGf0OOs5WBUpY4asKuuBeH/p8JO/APqDXh2yc QJoyQHhLL2O54zdmCaMezJnFHXx9bqyqYN6nqUl+YLyhU/0FKqcY6vrqBJiiCs7r9c0L maYOt/dyXJ4jQhciXiIe/spX+j5E9r/h6OBMpxXY0txfSLli6F0qbmXVqDFVTV6Bl6Pp jw+1VkO4dptef37AqwTXnMMKcjdX4puVM6gHAlWkiaQg6fgadeDGne/aicyqSyX9br+T j21Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Witx/dWeekJbGIGFSQLqx56JG2AGyfQvDqbO63+rVlw=; b=CyCUYeyGieOtcq+dez6r0r+g8WyDbc95BPhF50mAxkhD+8r4k67fIPMaVciOW2oqed IE4biWRNrP4QHnVoxjyXX7y2+wIs3WrWjHD/1BmvmlmLcoXNNvL46Uprl1v59uzw+TwA W9Hz+46mOqaJUNqOcFX49VL0e6dHvh2r5/MWAmQemCiwQTLAiOPFZl+Um6F2pdi9Yfun fY8SYQ6bgvm0hX7xmXM7ZXuYx0XZWBz3sWYsOLo5ZOy3pvM7TlVP62L1OqBS2W7AZm3s 1aqM7s+Jne9OW3QPigMkehfNZT6eEgLa/chkMwI8zRXKrHfQZBMjGvcPrVhgThww6A/+ wu1A== X-Gm-Message-State: AOAM530WYk2oXxdr+xzKy6lXw4gwezao10lUkpcuXMTNHYL+Senxy0x2 E3xPgwELFxtU0UfROB8xuZw5K7A8XvTkFcCCVATjW4v76q8= X-Google-Smtp-Source: ABdhPJyCgNSGAPxEMNSzA5CPdY8l2Q65wf01cwv7T4ItinFxv+S/b3V+nFkJSf8hOdy+7+4T7zDJ/M7DD4FcQCxgxLo= X-Received: by 2002:a7b:c451:: with SMTP id l17mr3393155wmi.127.1604072164287; Fri, 30 Oct 2020 08:36:04 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:4c4f:0:0:0:0:0 with HTTP; Fri, 30 Oct 2020 08:36:03 -0700 (PDT) In-Reply-To: <20201030145143.GB60293@raichu> References: <202010301407.09UE7Phw060731@repo.freebsd.org> <20201030145143.GB60293@raichu> From: Mateusz Guzik Date: Fri, 30 Oct 2020 16:36:03 +0100 Message-ID: Subject: Re: svn commit: r367165 - head/sys/fs/tmpfs To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CN5xf1lDbz46fx X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 15:36:06 -0000 On 10/30/20, Mark Johnston wrote: > On Fri, Oct 30, 2020 at 03:08:32PM +0100, Mateusz Guzik wrote: >> On 10/30/20, Mateusz Guzik wrote: >> > Author: mjg >> > Date: Fri Oct 30 14:07:25 2020 >> > New Revision: 367165 >> > URL: https://svnweb.freebsd.org/changeset/base/367165 >> > >> > Log: >> > tmpfs: change tmpfs dirent zone into a malloc type >> > >> > It is 64 bytes. >> > >> >> Right now malloc has only power-of-2 zones but I'm looking into >> changing that. The allocator itself trivially extends to multiply of >> 16, but stat collection needs reworking. > > Sums of consecutive powers of 2 also works well. That is, 16, 16 + 8, > 32, 32 + 16, ... > > When I last looked I didn't see very many places that would benefit, at > least outside of ZFS. Probably the main one is CAM CCBs, and that'll be > helped by https://reviews.freebsd.org/D26844 . > I collected stats over part of make tinderbox, where they are rounded up to mulitplies of 8. (so size of 5 is 1, size of 32 is 4). There is huge demand for non-power-of-2 and a multiply of 16 is a conservative adjustment which wont require more than a few workloads to compare before/after. For example you can see a solid contingent of 9 (72 bytes) which right now is served from 128 byte zones. dtrace -n 'fbt::malloc:entry { @ = lquantize(arg0 % 8 ? ((arg0 / 8) * 8 + 1) : arg0 / 8, 0, 32, 1); }' value ------------- Distribution ------------- count 0 | 0 1 | 292436 2 | 140962 3 | 322732 4 |@@@@@ 12150230 5 | 686069 6 | 41067 7 |@ 2847728 8 |@@@ 6449825 9 |@@ 5794112 10 | 1107100 11 | 5913 12 | 15392 13 | 21885 14 | 1852 15 | 4100 16 | 5177 17 |@ 1833685 18 | 1541 19 | 1567 20 | 1189 21 | 809 22 | 7294 23 | 423 24 | 355 25 | 364280 26 | 450 27 | 416 28 | 444 29 | 193 30 | 83 31 | 188 >= 32 |@@@@@@@@@@@@@@@@@@@@@@@@@@ 61740786 -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Oct 30 15:42:44 2020 Return-Path: Delivered-To: svn-src-head@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 15F3A454B1F; Fri, 30 Oct 2020 15:42:44 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN65H31Dkz470c; Fri, 30 Oct 2020 15:42:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x42e.google.com with SMTP id k10so5619636wrw.13; Fri, 30 Oct 2020 08:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5m9fox3XoAXccFwS/GIKFQMCVqiGETpGY7Rpp2t3bqg=; b=rnKV1b2p/3j9e4huJNkY3I7GJc9MlDTMrX+MnJZGsqrWLjCRHRSo2m/dV8DHNJZtrW jgi4djUOKeJ3LpEDBCSn+Lr1RVHhElZn2DxnipwMYnFxm2vICx4goU5Svb4pmA82QFAz XNP9GIVre0I8SlasZijxV/3/okP31HhUe62Lwz7LkMWeUHKPYlrJR5jxxi309pIKSYrr 63oR4U8ufH/2kiDCFyvge0vKK+ZIRHJDpCDYmPngx2r2J+iXS4axJ+Otbie1bsCstvNb ocBeIqrDNvGBnnrOMRmEQgOZ87EJm/OcyLIUDqGYT2yHYmTN2iu5iivkb+oOPMdzcuWT wN2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5m9fox3XoAXccFwS/GIKFQMCVqiGETpGY7Rpp2t3bqg=; b=KDIsOBXLKdI8cOZkjd0l0RZCwwNiF4X0rwTIfgUlXTtQpmLUnv/FdCfE4CDmHkiSW+ EecI8ehoF3+g0zoil64mom9DlhF+zLSshjBd5Bv8QmEoSwFUkjp5fAOsM7GpQud6C4UR MdnF1uLPQdOgzjINLmNAZv6btYBYwlMdbSvDnn7Lr/GXLMAUgnErAIxYg4YJ6802YE+h /SSLJ8iBIQZcByw/VJIdGK6z9kfmhyp3hVUqlfPEJdi93+ep5F60cTl0rb4ozXAohD0y ZmD11T+PXzstWE0TP/b9C/QsZj3t7Ya8MgznjVnt1WboMI5E+5n+HB2Kiyu5HGeyxufY SjdA== X-Gm-Message-State: AOAM530FwLxjS7UooFLfV3qYj2Ufcuz4bHbhhBFnoktjzDd/nhgJvsC8 Jm0fsVyFAw4BBColj7APJuvodUQJJpmV/bDVocQ= X-Google-Smtp-Source: ABdhPJyCEWStwBwQPV4YWDFTMEAfkCqlVPvLOzJfQuSWb037OnognrHqm9eYSugoz9TJoJ4qMmXTGorpS5E+hg1xDr8= X-Received: by 2002:adf:9043:: with SMTP id h61mr4026950wrh.237.1604072560776; Fri, 30 Oct 2020 08:42:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:4c4f:0:0:0:0:0 with HTTP; Fri, 30 Oct 2020 08:42:39 -0700 (PDT) In-Reply-To: <20201030143851.GE2654@kib.kiev.ua> References: <202010301407.09UE7Phw060731@repo.freebsd.org> <20201030143851.GE2654@kib.kiev.ua> From: Mateusz Guzik Date: Fri, 30 Oct 2020 16:42:39 +0100 Message-ID: Subject: Re: svn commit: r367165 - head/sys/fs/tmpfs To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CN65H31Dkz470c X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=rnKV1b2p; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::42e as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-2.73 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.002]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.28)[0.279]; NEURAL_HAM_LONG(-1.01)[-1.011]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::42e:from]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 15:42:44 -0000 On 10/30/20, Konstantin Belousov wrote: > On Fri, Oct 30, 2020 at 03:08:32PM +0100, Mateusz Guzik wrote: >> On 10/30/20, Mateusz Guzik wrote: >> > Author: mjg >> > Date: Fri Oct 30 14:07:25 2020 >> > New Revision: 367165 >> > URL: https://svnweb.freebsd.org/changeset/base/367165 >> > >> > Log: >> > tmpfs: change tmpfs dirent zone into a malloc type >> > >> > It is 64 bytes. >> > >> >> Right now malloc has only power-of-2 zones but I'm looking into >> changing that. The allocator itself trivially extends to multiply of >> 16, but stat collection needs reworking. > > Either commit message or follow-up do not explain why stopping using > zone for dirents is useful. Intuition says exactly reverse, dirents > on tmpfs are allocation-intensive typically. > Off hand the only reasons to use a dedicated zones that I see are: - use of any of the routines on object creation/destruction - non-standard flags like NOFREE - SMR - high expected allocated count with sizes poorly fit for malloc Since malloc itself is implemented on top of zones, the difference before/after the patch is that now it can re-use the pre-existing 64 byte buckets instead of creating its own copy. The above follow up was to address potential comments about the size changing from 64 -- with better malloc granularity this wont be a big deal. Also note tmpfs already uses malloc to store names. If anything in my opinion the kernel has unnecessary zones (like the vnode poll one I patched prior to this). -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Oct 30 15:43:53 2020 Return-Path: Delivered-To: svn-src-head@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 0651D4548F1; Fri, 30 Oct 2020 15:43:53 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN66c6QKJz472J; Fri, 30 Oct 2020 15:43:52 +0000 (UTC) (envelope-from se@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 C0451183FA; Fri, 30 Oct 2020 15:43:52 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UFhqO7021791; Fri, 30 Oct 2020 15:43:52 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UFhqsC021789; Fri, 30 Oct 2020 15:43:52 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010301543.09UFhqsC021789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Fri, 30 Oct 2020 15:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367173 - in head/usr.bin/calendar: . tests X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head/usr.bin/calendar: . tests X-SVN-Commit-Revision: 367173 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 15:43:53 -0000 Author: se Date: Fri Oct 30 15:43:52 2020 New Revision: 367173 URL: https://svnweb.freebsd.org/changeset/base/367173 Log: Print calendar entries in the order they occur The calendar program used to output entries in reverse order, due to the way an internal linked list was built up. A regression test with 2 entries for the same day has been adapted to the now non-reversed order. MFC after: 3 days Modified: head/usr.bin/calendar/dates.c head/usr.bin/calendar/tests/regress.s5.out Modified: head/usr.bin/calendar/dates.c ============================================================================== --- head/usr.bin/calendar/dates.c Fri Oct 30 14:42:02 2020 (r367172) +++ head/usr.bin/calendar/dates.c Fri Oct 30 15:43:52 2020 (r367173) @@ -64,6 +64,7 @@ struct cal_day { struct cal_month *month; /* points back */ struct cal_year *year; /* points back */ struct event *events; + struct event *lastevent; }; int debug_remember = 0; @@ -446,8 +447,13 @@ void addtodate(struct event *e, int year, int month, int day) { struct cal_day *d; + struct event *ee; d = find_day(year, month, day); - e->next = d->events; - d->events = e; + ee = d->lastevent; + if (ee != NULL) + ee->next = e; + else + d->events = e; + d->lastevent = e; } Modified: head/usr.bin/calendar/tests/regress.s5.out ============================================================================== --- head/usr.bin/calendar/tests/regress.s5.out Fri Oct 30 14:42:02 2020 (r367172) +++ head/usr.bin/calendar/tests/regress.s5.out Fri Oct 30 15:43:52 2020 (r367173) @@ -1,3 +1,3 @@ -Jun 21* sunthird Jun 21 jun 21 +Jun 21* sunthird Jun 22 jun 22 From owner-svn-src-head@freebsd.org Fri Oct 30 15:55:39 2020 Return-Path: Delivered-To: svn-src-head@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 1DBDC455A05; Fri, 30 Oct 2020 15:55:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN6NB0yv9z49WW; Fri, 30 Oct 2020 15:55:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 09UFtTHt043241 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 30 Oct 2020 17:55:32 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 09UFtTHt043241 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 09UFtTpk043240; Fri, 30 Oct 2020 17:55:29 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 30 Oct 2020 17:55:29 +0200 From: Konstantin Belousov To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367165 - head/sys/fs/tmpfs Message-ID: <20201030155529.GF2654@kib.kiev.ua> References: <202010301407.09UE7Phw060731@repo.freebsd.org> <20201030143851.GE2654@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4CN6NB0yv9z49WW X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [1.08 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_SPAM_SHORT(0.59)[0.588]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; NEURAL_SPAM_MEDIUM(0.03)[0.032]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.46)[0.459]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 15:55:39 -0000 On Fri, Oct 30, 2020 at 04:42:39PM +0100, Mateusz Guzik wrote: > On 10/30/20, Konstantin Belousov wrote: > > On Fri, Oct 30, 2020 at 03:08:32PM +0100, Mateusz Guzik wrote: > >> On 10/30/20, Mateusz Guzik wrote: > >> > Author: mjg > >> > Date: Fri Oct 30 14:07:25 2020 > >> > New Revision: 367165 > >> > URL: https://svnweb.freebsd.org/changeset/base/367165 > >> > > >> > Log: > >> > tmpfs: change tmpfs dirent zone into a malloc type > >> > > >> > It is 64 bytes. > >> > > >> > >> Right now malloc has only power-of-2 zones but I'm looking into > >> changing that. The allocator itself trivially extends to multiply of > >> 16, but stat collection needs reworking. > > > > Either commit message or follow-up do not explain why stopping using > > zone for dirents is useful. Intuition says exactly reverse, dirents > > on tmpfs are allocation-intensive typically. > > > > Off hand the only reasons to use a dedicated zones that I see are: > - use of any of the routines on object creation/destruction > - non-standard flags like NOFREE > - SMR > - high expected allocated count with sizes poorly fit for malloc - Visibility of allocation rate and memory consumption - Detection of leak on zone destruction (tmpfs unmount) > > Since malloc itself is implemented on top of zones, the difference > before/after the patch is that now it can re-use the pre-existing 64 > byte buckets instead of creating its own copy. > > The above follow up was to address potential comments about the size > changing from 64 -- with better malloc granularity this wont be a big > deal. Also note tmpfs already uses malloc to store names. Is it 64 on all arches, on only on LP64 ? I think the later, and then this additionally hits 32bit arches. > > If anything in my opinion the kernel has unnecessary zones (like the > vnode poll one I patched prior to this). For this one I agree, it is low-profile alloc type. From owner-svn-src-head@freebsd.org Fri Oct 30 16:19:19 2020 Return-Path: Delivered-To: svn-src-head@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 CF46A456057; Fri, 30 Oct 2020 16:19:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN6vW1rgGz4CN5; Fri, 30 Oct 2020 16:19:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x342.google.com with SMTP id k18so3455482wmj.5; Fri, 30 Oct 2020 09:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5hmnmgLdvpe1vv5XM+6wQ1AiXWVz3jrEMVxjUKgVSws=; b=pv8FuberU8t8wc+7k8NaTbd3bl2T8QIAZhD4lWSDBMzL1KF23TZU/JBn7f0njfzNcs t95s1ChNuAZ66BoYDMCGAYXRAp9p3ieF6fMIKIT8f477b4li3a9pMA27naFiY0+m/Uu/ 2y8XgSeUjM7dNlqApUekCjECiVnMTakVnYCEJW7QwM7MvgPwAcm53YsyhZ3zCS6CWuv0 O3Q8rAxtozxfPQlG1x2zvLoQBwuT/HeslgincuwYe80x6m4bq4Z4whTXsxAVyTdHJRgn ukO3FgA3RSJ0tW4sE8l9JC+mUMJ3kSfncFoqg7YZ778UpxeHUoH91RqZZDRDlrBBbBlz RP8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5hmnmgLdvpe1vv5XM+6wQ1AiXWVz3jrEMVxjUKgVSws=; b=OlqyxijWw91iIpo3oIsS0WUa6cpVc4jueXJWnD2uOzhTHalrtjRuCK41df3F6WdslL 6nj45f+VWuArqbotgg1cgOFu2bni+QgG/uTQRdnlnapHJSun7LtGU2b5Qs2Yn6R2pMUP GbGgFoDCN7fVrNFQfOPKhVoMpVGmueoIocdbdGaq0XkJbRMQgsQlshaJaqaWTonKHJtG /2AeaObSTA7/thbqfbil/JdP55AURBUCwu1OFr8GnPOVVyZbNRxhIBXcHlc44cjqGAmT MHDhZI7m13eHtpR2yzeeNArqmRneZApGWsJGC/SGz3p9f36cYcDhQbXgaVC0/pJMarYw 0BVQ== X-Gm-Message-State: AOAM533cI2AKUdOzPktqg4S9WwumbIp87PgkqvvjsRTXI1NzPAqH1y5J LpOB3zZLcCrsDt2YrbfLddy2CygOi+67dmADyHQ= X-Google-Smtp-Source: ABdhPJz5dZpS2fkhqqkFW3Z3pKn+23sXGdGjVDkPVZtOXy8GQz3jE4x09uQFk7l1u0UqNYHkgxQJS6spXCsHN2ozG0E= X-Received: by 2002:a7b:c20d:: with SMTP id x13mr3781175wmi.83.1604074757846; Fri, 30 Oct 2020 09:19:17 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:4c4f:0:0:0:0:0 with HTTP; Fri, 30 Oct 2020 09:19:17 -0700 (PDT) In-Reply-To: <20201030155529.GF2654@kib.kiev.ua> References: <202010301407.09UE7Phw060731@repo.freebsd.org> <20201030143851.GE2654@kib.kiev.ua> <20201030155529.GF2654@kib.kiev.ua> From: Mateusz Guzik Date: Fri, 30 Oct 2020 17:19:17 +0100 Message-ID: Subject: Re: svn commit: r367165 - head/sys/fs/tmpfs To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CN6vW1rgGz4CN5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=pv8Fuber; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::342 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-2.73 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.002]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.28)[0.278]; NEURAL_HAM_LONG(-1.01)[-1.011]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::342:from]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 16:19:19 -0000 On 10/30/20, Konstantin Belousov wrote: > On Fri, Oct 30, 2020 at 04:42:39PM +0100, Mateusz Guzik wrote: >> On 10/30/20, Konstantin Belousov wrote: >> > On Fri, Oct 30, 2020 at 03:08:32PM +0100, Mateusz Guzik wrote: >> >> On 10/30/20, Mateusz Guzik wrote: >> >> > Author: mjg >> >> > Date: Fri Oct 30 14:07:25 2020 >> >> > New Revision: 367165 >> >> > URL: https://svnweb.freebsd.org/changeset/base/367165 >> >> > >> >> > Log: >> >> > tmpfs: change tmpfs dirent zone into a malloc type >> >> > >> >> > It is 64 bytes. >> >> > >> >> >> >> Right now malloc has only power-of-2 zones but I'm looking into >> >> changing that. The allocator itself trivially extends to multiply of >> >> 16, but stat collection needs reworking. >> > >> > Either commit message or follow-up do not explain why stopping using >> > zone for dirents is useful. Intuition says exactly reverse, dirents >> > on tmpfs are allocation-intensive typically. >> > >> >> Off hand the only reasons to use a dedicated zones that I see are: >> - use of any of the routines on object creation/destruction >> - non-standard flags like NOFREE >> - SMR >> - high expected allocated count with sizes poorly fit for malloc > - Visibility of allocation rate and memory consumption This is tracked as reported by vmstat -m. > - Detection of leak on zone destruction (tmpfs unmount) Zones stopped being per-mount, so now it would be on tmpfs unload. Even then, this once more is provided thanks to malloc types -- there is per-cpu tracking of all allocations within given type and it is validated to be 0 on type destruction. Iow I don't see a loss in functionality. >> >> Since malloc itself is implemented on top of zones, the difference >> before/after the patch is that now it can re-use the pre-existing 64 >> byte buckets instead of creating its own copy. >> >> The above follow up was to address potential comments about the size >> changing from 64 -- with better malloc granularity this wont be a big >> deal. Also note tmpfs already uses malloc to store names. > Is it 64 on all arches, on only on LP64 ? I think the later, and then > this additionally hits 32bit arches. > I did not check 32-bit. With more granular malloc it is going to be once more exact fit or close it. Either way, with more granular malloc and more zones moved there the total memory use should go down thanks to avoiding spurious per-cpu buckets. >> >> If anything in my opinion the kernel has unnecessary zones (like the >> vnode poll one I patched prior to this). > For this one I agree, it is low-profile alloc type. > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Oct 30 17:05:37 2020 Return-Path: Delivered-To: svn-src-head@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 DE49A456DCC; Fri, 30 Oct 2020 17:05:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN7wx5X5pz4FhN; Fri, 30 Oct 2020 17:05:37 +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 A0E8419AC3; Fri, 30 Oct 2020 17:05:37 +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 09UH5buc071620; Fri, 30 Oct 2020 17:05:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UH5bRH071618; Fri, 30 Oct 2020 17:05:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202010301705.09UH5bRH071618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 30 Oct 2020 17:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367174 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 367174 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 17:05:37 -0000 Author: markj Date: Fri Oct 30 17:05:36 2020 New Revision: 367174 URL: https://svnweb.freebsd.org/changeset/base/367174 Log: opencrypto: Annotate hmac_init_(i|o)pad() to make auth_hash const This makes them friendlier to drivers that try to use const pointers whenever possible in their internal structures. Reviewed by: jhb Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D26901 Modified: head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptodev.h Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Fri Oct 30 15:43:52 2020 (r367173) +++ head/sys/opencrypto/crypto.c Fri Oct 30 17:05:36 2020 (r367174) @@ -411,8 +411,8 @@ crypto_terminate(struct proc **pp, void *q) } static void -hmac_init_pad(struct auth_hash *axf, const char *key, int klen, void *auth_ctx, - uint8_t padval) +hmac_init_pad(const struct auth_hash *axf, const char *key, int klen, + void *auth_ctx, uint8_t padval) { uint8_t hmac_key[HMAC_MAX_BLOCK_LEN]; u_int i; @@ -442,7 +442,7 @@ hmac_init_pad(struct auth_hash *axf, const char *key, } void -hmac_init_ipad(struct auth_hash *axf, const char *key, int klen, +hmac_init_ipad(const struct auth_hash *axf, const char *key, int klen, void *auth_ctx) { @@ -450,7 +450,7 @@ hmac_init_ipad(struct auth_hash *axf, const char *key, } void -hmac_init_opad(struct auth_hash *axf, const char *key, int klen, +hmac_init_opad(const struct auth_hash *axf, const char *key, int klen, void *auth_ctx) { Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Fri Oct 30 15:43:52 2020 (r367173) +++ head/sys/opencrypto/cryptodev.h Fri Oct 30 17:05:36 2020 (r367174) @@ -683,9 +683,9 @@ SYSCTL_DECL(_kern_crypto); /* Helper routines for drivers to initialize auth contexts for HMAC. */ struct auth_hash; -void hmac_init_ipad(struct auth_hash *axf, const char *key, int klen, +void hmac_init_ipad(const struct auth_hash *axf, const char *key, int klen, void *auth_ctx); -void hmac_init_opad(struct auth_hash *axf, const char *key, int klen, +void hmac_init_opad(const struct auth_hash *axf, const char *key, int klen, void *auth_ctx); /* From owner-svn-src-head@freebsd.org Fri Oct 30 18:16:11 2020 Return-Path: Delivered-To: svn-src-head@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 195154583F0; Fri, 30 Oct 2020 18:16:11 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN9VL6l5jz4K8h; Fri, 30 Oct 2020 18:16:10 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADA2C1A66D; Fri, 30 Oct 2020 18:16:10 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UIGAS4015213; Fri, 30 Oct 2020 18:16:10 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UIGAp7015212; Fri, 30 Oct 2020 18:16:10 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202010301816.09UIGAp7015212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Fri, 30 Oct 2020 18:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367175 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 367175 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 18:16:11 -0000 Author: mhorne Date: Fri Oct 30 18:16:10 2020 New Revision: 367175 URL: https://svnweb.freebsd.org/changeset/base/367175 Log: Slight refactor in vmimage.subr De-duplicate the invocation of mkimg(1). No functional change. Reviewed by: gjb MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26984 Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Fri Oct 30 17:05:36 2020 (r367174) +++ head/release/tools/vmimage.subr Fri Oct 30 18:16:10 2020 (r367175) @@ -24,40 +24,46 @@ write_partition_layout() { case "${TARGET}:${TARGET_ARCH}" in amd64:amd64 | i386:i386) - # Create an ESP - espfilename=$(mktemp /tmp/efiboot.XXXXXX) - make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi - mkimg -s gpt -f ${VMFORMAT} \ - -b ${BOOTFILES}/i386/pmbr/pmbr \ - -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ - -p efi:=${espfilename} \ - ${SWAPOPT} \ - -p freebsd-ufs/rootfs:=${VMBASE} \ - -o ${VMIMAGE} - rm ${espfilename} + ESP=yes + SCHEME=gpt + BOOTPARTS="-b ${BOOTFILES}/i386/pmbr/pmbr \ + -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot" + ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" ;; arm64:aarch64) - # Create an ESP - espfilename=$(mktemp /tmp/efiboot.XXXXXX) - make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi - mkimg -s mbr -f ${VMFORMAT} \ - -p efi:=${espfilename} \ - -p freebsd:=${VMBASE} \ - -o ${VMIMAGE} - rm ${espfilename} + ESP=yes + SCHEME=mbr + BOOTPARTS= + ROOTFSPART="-p freebsd:=${VMBASE}" ;; powerpc:powerpc*) - mkimg -s apm -f ${VMFORMAT} \ - -p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs \ - ${SWAPOPT} \ - -p freebsd-ufs/rootfs:=${VMBASE} \ - -o ${VMIMAGE} + ESP=no + SCHEME=apm + BOOTPARTS="-p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs" + ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" ;; *) # ENOTSUPP return 1 ;; esac + + if [ ${ESP} = "yes" ]; then + # Create an ESP + espfilename=$(mktemp /tmp/efiboot.XXXXXX) + make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi + BOOTPARTS="${BOOTPARTS} -p efi:=${espfilename}" + fi + + mkimg -s ${SCHEME} -f ${VMFORMAT} \ + ${BOOTPARTS} \ + ${SWAPOPT} \ + ${ROOTFSPART} \ + -o ${VMIMAGE} + + if [ ${ESP} = "yes" ]; then + rm ${espfilename} + fi return 0 } From owner-svn-src-head@freebsd.org Fri Oct 30 18:18:26 2020 Return-Path: Delivered-To: svn-src-head@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 89DDA458428; Fri, 30 Oct 2020 18:18:26 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN9Xy33hmz4K9Z; Fri, 30 Oct 2020 18:18:26 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C5551A764; Fri, 30 Oct 2020 18:18:26 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UIIQk3015355; Fri, 30 Oct 2020 18:18:26 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UIIQWE015354; Fri, 30 Oct 2020 18:18:26 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202010301818.09UIIQWE015354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Fri, 30 Oct 2020 18:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367176 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 367176 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 18:18:26 -0000 Author: mhorne Date: Fri Oct 30 18:18:25 2020 New Revision: 367176 URL: https://svnweb.freebsd.org/changeset/base/367176 Log: vmimage.subr: noisier failure for unsupported targets The return code of write_partition_layout() doesn't bubble up, so an invocation of make vm-release for an incorrect/unsupported target will appear to succeed while make vm-install will fail due to missing files. This isn't a common point of failure, but is worth handling properly. Upgrade this case to print a message to stderr, and exit in place. This is okay to do since at this point in the execution of mk-vmimage.sh, cleanup() has already been run. Reviewed by: gjb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26985 Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Fri Oct 30 18:16:10 2020 (r367175) +++ head/release/tools/vmimage.subr Fri Oct 30 18:18:25 2020 (r367176) @@ -43,8 +43,8 @@ write_partition_layout() { ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" ;; *) - # ENOTSUPP - return 1 + echo "vmimage.subr: unsupported target '${TARGET}:${TARGET_ARCH}'" >&2 + exit 1 ;; esac From owner-svn-src-head@freebsd.org Fri Oct 30 18:20:53 2020 Return-Path: Delivered-To: svn-src-head@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 A99654585B7; Fri, 30 Oct 2020 18:20:53 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN9bn41gSz4KDl; Fri, 30 Oct 2020 18:20:53 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D7E51AB37; Fri, 30 Oct 2020 18:20:53 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UIKrhM015564; Fri, 30 Oct 2020 18:20:53 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UIKr2J015562; Fri, 30 Oct 2020 18:20:53 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202010301820.09UIKr2J015562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Fri, 30 Oct 2020 18:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367177 - in head/release: scripts tools X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/release: scripts tools X-SVN-Commit-Revision: 367177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 18:20:53 -0000 Author: mhorne Date: Fri Oct 30 18:20:52 2020 New Revision: 367177 URL: https://svnweb.freebsd.org/changeset/base/367177 Log: arm64: convert virtual machine images to GPT These images were switched to MBR in r281876 as a way to cope with a hard-coded partition GUID in QEMU's default EFI firmware. Enough time has passed that this is no longer a problem; QEMU versions >= 4.0 include a copy of edk2 EFI firmware that can detect the root filesystem properly. Alternatively, sysutils/u-boot-qemu-arm64 can be used. Switch back to building these images with a GPT partition table, and re-enable the swap partition. Reviewed by: gjb, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26986 Modified: head/release/scripts/mk-vmimage.sh head/release/tools/vmimage.subr Modified: head/release/scripts/mk-vmimage.sh ============================================================================== --- head/release/scripts/mk-vmimage.sh Fri Oct 30 18:18:25 2020 (r367176) +++ head/release/scripts/mk-vmimage.sh Fri Oct 30 18:20:52 2020 (r367177) @@ -93,15 +93,7 @@ main() { . "${VMCONFIG}" fi - case ${TARGET}:${TARGET_ARCH} in - arm64:aarch64) - ROOTLABEL="ufs" - NOSWAP=1 - ;; - *) - ROOTLABEL="gpt" - ;; - esac + ROOTLABEL="gpt" vm_create_base vm_install_base Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Fri Oct 30 18:18:25 2020 (r367176) +++ head/release/tools/vmimage.subr Fri Oct 30 18:20:52 2020 (r367177) @@ -32,9 +32,9 @@ write_partition_layout() { ;; arm64:aarch64) ESP=yes - SCHEME=mbr + SCHEME=gpt BOOTPARTS= - ROOTFSPART="-p freebsd:=${VMBASE}" + ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" ;; powerpc:powerpc*) ESP=no From owner-svn-src-head@freebsd.org Fri Oct 30 18:22:46 2020 Return-Path: Delivered-To: svn-src-head@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 BF935458442; Fri, 30 Oct 2020 18:22:46 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN9dy4jQFz4Kff; Fri, 30 Oct 2020 18:22:46 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84EC61ABF3; Fri, 30 Oct 2020 18:22:46 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UIMkt2021422; Fri, 30 Oct 2020 18:22:46 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UIMk52021421; Fri, 30 Oct 2020 18:22:46 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202010301822.09UIMk52021421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Fri, 30 Oct 2020 18:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367178 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 367178 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 18:22:46 -0000 Author: mhorne Date: Fri Oct 30 18:22:46 2020 New Revision: 367178 URL: https://svnweb.freebsd.org/changeset/base/367178 Log: arm64: set the correct partition type in make-memstick.sh We create a UFS root filesystem using makefs(8), and later pass it to mkimg(1) when creating the final image. The correct partition type is freebsd-ufs; the freebsd parition type is for partitions containing a BSD disklabel. Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26987 Modified: head/release/arm64/make-memstick.sh Modified: head/release/arm64/make-memstick.sh ============================================================================== --- head/release/arm64/make-memstick.sh Fri Oct 30 18:20:52 2020 (r367177) +++ head/release/arm64/make-memstick.sh Fri Oct 30 18:22:46 2020 (r367178) @@ -45,7 +45,7 @@ make_esp_file ${espfilename} ${fat32min} ${1}/boot/loa mkimg -s gpt \ -p efi:=${espfilename} \ - -p freebsd:=${2}.part \ + -p freebsd-ufs:=${2}.part \ -o ${2} rm ${espfilename} rm ${2}.part From owner-svn-src-head@freebsd.org Fri Oct 30 18:48:10 2020 Return-Path: Delivered-To: svn-src-head@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 B17BC459368; Fri, 30 Oct 2020 18:48:10 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNBCG4CrTz4MHW; Fri, 30 Oct 2020 18:48:10 +0000 (UTC) (envelope-from se@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 59F001AA7B; Fri, 30 Oct 2020 18:48:10 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UImALN034126; Fri, 30 Oct 2020 18:48:10 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UIm9gU034123; Fri, 30 Oct 2020 18:48:09 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010301848.09UIm9gU034123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Fri, 30 Oct 2020 18:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367179 - in head: lib/libc/gen sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head: lib/libc/gen sys/kern sys/sys X-SVN-Commit-Revision: 367179 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 18:48:10 -0000 Author: se Date: Fri Oct 30 18:48:09 2020 New Revision: 367179 URL: https://svnweb.freebsd.org/changeset/base/367179 Log: Add read only sysctl variable user.localbase The value is provided by the C library as for other sysctl variables in the user tree. It is compiled in and returns the value of _PATH_LOCALBASE defined in paths.h. Reviewed by: imp, scottl Differential Revision: https://reviews.freebsd.org/D27009 Modified: head/lib/libc/gen/sysctl.c head/sys/kern/kern_mib.c head/sys/sys/sysctl.h Modified: head/lib/libc/gen/sysctl.c ============================================================================== --- head/lib/libc/gen/sysctl.c Fri Oct 30 18:22:46 2020 (r367178) +++ head/lib/libc/gen/sysctl.c Fri Oct 30 18:48:09 2020 (r367179) @@ -87,6 +87,15 @@ sysctl(const int *name, u_int namelen, void *oldp, siz if (oldp != NULL) memmove(oldp, _PATH_STDPATH, sizeof(_PATH_STDPATH)); return (0); + case USER_LOCALBASE: + if (oldp && orig_oldlen < sizeof(_PATH_LOCALBASE)) { + errno = ENOMEM; + return -1; + } + *oldlenp = sizeof(_PATH_LOCALBASE); + if (oldp != NULL) + memmove(oldp, _PATH_LOCALBASE, sizeof(_PATH_LOCALBASE)); + return(0); } if (oldp && *oldlenp < sizeof(int)) { Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Fri Oct 30 18:22:46 2020 (r367178) +++ head/sys/kern/kern_mib.c Fri Oct 30 18:48:09 2020 (r367179) @@ -652,6 +652,8 @@ SYSCTL_INT(_user, USER_STREAM_MAX, stream_max, CTLFLAG SYSCTL_NULL_INT_PTR, 0, "Min Maximum number of streams a process may have open at one time"); SYSCTL_INT(_user, USER_TZNAME_MAX, tzname_max, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, 0, "Min Maximum number of types supported for timezone names"); +SYSCTL_STRING(_user, USER_LOCALBASE, localbase, CTLFLAG_RD, + "", 0, "Prefix used to install and locate add-on packages"); #include SYSCTL_INT(_debug_sizeof, OID_AUTO, vnode, CTLFLAG_RD, Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Fri Oct 30 18:22:46 2020 (r367178) +++ head/sys/sys/sysctl.h Fri Oct 30 18:48:09 2020 (r367179) @@ -1070,6 +1070,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define USER_POSIX2_UPE 18 /* int: POSIX2_UPE */ #define USER_STREAM_MAX 19 /* int: POSIX2_STREAM_MAX */ #define USER_TZNAME_MAX 20 /* int: POSIX2_TZNAME_MAX */ +#define USER_LOCALBASE 21 /* string: _PATH_LOCALBASE */ #define CTL_P1003_1B_ASYNCHRONOUS_IO 1 /* boolean */ #define CTL_P1003_1B_MAPPED_FILES 2 /* boolean */ From owner-svn-src-head@freebsd.org Fri Oct 30 18:55:08 2020 Return-Path: Delivered-To: svn-src-head@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 C3967459503; Fri, 30 Oct 2020 18:55:08 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNBMJ4dVhz4MmP; Fri, 30 Oct 2020 18:55:08 +0000 (UTC) (envelope-from kibab@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 7EDDB1B418; Fri, 30 Oct 2020 18:55:08 +0000 (UTC) (envelope-from kibab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UIt8oX039865; Fri, 30 Oct 2020 18:55:08 GMT (envelope-from kibab@FreeBSD.org) Received: (from kibab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UIt8kp039864; Fri, 30 Oct 2020 18:55:08 GMT (envelope-from kibab@FreeBSD.org) Message-Id: <202010301855.09UIt8kp039864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kibab set sender to kibab@FreeBSD.org using -f From: Ilya Bakulin Date: Fri, 30 Oct 2020 18:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367180 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: kibab X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 367180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 18:55:08 -0000 Author: kibab Date: Fri Oct 30 18:55:08 2020 New Revision: 367180 URL: https://svnweb.freebsd.org/changeset/base/367180 Log: Add help messages for camcontrol(8) MMCCAM functionality This adds the help messages for camcontrol(8) in-binary help. Man page will follow in the separate change. Reviewed by: bz Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D25963 Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Fri Oct 30 18:48:09 2020 (r367179) +++ head/sbin/camcontrol/camcontrol.c Fri Oct 30 18:55:08 2020 (r367180) @@ -9988,6 +9988,13 @@ usage(int printlong) " camcontrol timestamp [dev_id][generic_args] <-r [-f format|-m|-U]>|\n" " <-s <-f format -T time | -U >>\n" " camcontrol devtype [dev_id]\n" +" camcontrol mmcsdcmd [dev_id] [[-c mmc_opcode] [-a mmc_arg]\n" +" [-f mmc_flags] [-l data_len]\n" +" [-W [-b data_byte]]] |\n" +" [-F frequency] |\n" +" [-I]\n" +" [-1 | -4]\n" +" [-S high|normal]\n" " \n" " camcontrol help\n"); if (!printlong) @@ -10034,6 +10041,7 @@ usage(int printlong) "epc send ATA Extended Power Conditions commands\n" "timestamp report or set the device's timestamp\n" "devtype report the type of device\n" +"mmcsdcmd send the given MMC command, needs -c and -a as well\n" "help this message\n" "Device Identifiers:\n" "bus:target specify the bus and target, lun defaults to 0\n" @@ -10242,6 +10250,18 @@ usage(int printlong) "-f format the format of the time string passed into strptime(3)\n" "-T time the time value passed into strptime(3)\n" "-U set the timestamp of the device to UTC time\n" +"mmcsdcmd arguments:\n" +"-c mmc_cmd MMC command to send to the card\n" +"-a mmc_arg Argument for the MMC command\n" +"-f mmc_flag Flags to set for the MMC command\n" +"-l data_len Expect data_len bytes of data in reply and display them\n" +"-W Fill the data buffer before invoking the MMC command\n" +"-b data_byte One byte of data to fill the data buffer with\n" +"-F frequency Operating frequency to set on the controller\n" +"-4 Set bus width to 4 bit\n" +"-1 Set bus width to 8 bit\n" +"-S high | std Set high-speed or standard timing\n" +"-I Display various card and host controller information\n" ); } From owner-svn-src-head@freebsd.org Fri Oct 30 19:00:43 2020 Return-Path: Delivered-To: svn-src-head@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 71A08459621; Fri, 30 Oct 2020 19:00:43 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNBTl2DJ2z4N13; Fri, 30 Oct 2020 19:00:43 +0000 (UTC) (envelope-from cem@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 2FCF71AE58; Fri, 30 Oct 2020 19:00:43 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UJ0hd8040199; Fri, 30 Oct 2020 19:00:43 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UJ0glY040197; Fri, 30 Oct 2020 19:00:42 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202010301900.09UJ0glY040197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 30 Oct 2020 19:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367181 - in head/sys/ufs: ffs ufs X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/ufs: ffs ufs X-SVN-Commit-Revision: 367181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 19:00:43 -0000 Author: cem Date: Fri Oct 30 19:00:42 2020 New Revision: 367181 URL: https://svnweb.freebsd.org/changeset/base/367181 Log: UFS2: Fix DoS due to corrupted extattrfile Prior versions of FreeBSD (11.x) may have produced a corrupt extattr file. (Specifically, r312416 accidentally fixed this defect by removing a strcpy.) CURRENT FreeBSD supports disk images from those prior versions of FreeBSD. Validate the internal structure as soon as we read it in from disk, to prevent these extattr files from causing invariants violations and DoS. Attempting to access the extattr portion of these files results in EINTEGRITY. At this time, the only way to repair files damaged in this way is to copy the contents to another file and move it over the original. PR: 244089 Reported by: Andrea Venturoli Reviewed by: kib Discussed with: mckusick (earlier draft) Security: no Differential Revision: https://reviews.freebsd.org/D27010 Modified: head/sys/ufs/ffs/ffs_vnops.c head/sys/ufs/ufs/extattr.h Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Fri Oct 30 18:55:08 2020 (r367180) +++ head/sys/ufs/ffs/ffs_vnops.c Fri Oct 30 19:00:42 2020 (r367181) @@ -1200,9 +1200,8 @@ ffs_findextattr(u_char *ptr, u_int length, int nspace, eap = (struct extattr *)ptr; eaend = (struct extattr *)(ptr + length); for (; eap < eaend; eap = EXTATTR_NEXT(eap)) { - /* make sure this entry is complete */ - if (EXTATTR_NEXT(eap) > eaend) - break; + KASSERT(EXTATTR_NEXT(eap) <= eaend, + ("extattr next %p beyond %p", EXTATTR_NEXT(eap), eaend)); if (eap->ea_namespace != nspace || eap->ea_namelength != nlen || memcmp(eap->ea_name, name, nlen) != 0) continue; @@ -1216,8 +1215,9 @@ ffs_findextattr(u_char *ptr, u_int length, int nspace, } static int -ffs_rdextattr(u_char **p, struct vnode *vp, struct thread *td, int extra) +ffs_rdextattr(u_char **p, struct vnode *vp, struct thread *td) { + const struct extattr *eap, *eaend, *eapnext; struct inode *ip; struct ufs2_dinode *dp; struct fs *fs; @@ -1231,10 +1231,10 @@ ffs_rdextattr(u_char **p, struct vnode *vp, struct thr fs = ITOFS(ip); dp = ip->i_din2; easize = dp->di_extsize; - if ((uoff_t)easize + extra > UFS_NXADDR * fs->fs_bsize) + if ((uoff_t)easize > UFS_NXADDR * fs->fs_bsize) return (EFBIG); - eae = malloc(easize + extra, M_TEMP, M_WAITOK); + eae = malloc(easize, M_TEMP, M_WAITOK); liovec.iov_base = eae; liovec.iov_len = easize; @@ -1249,8 +1249,18 @@ ffs_rdextattr(u_char **p, struct vnode *vp, struct thr error = ffs_extread(vp, &luio, IO_EXT | IO_SYNC); if (error) { free(eae, M_TEMP); - return(error); + return (error); } + /* Validate disk xattrfile contents. */ + for (eap = (void *)eae, eaend = (void *)(eae + easize); eap < eaend; + eap = eapnext) { + eapnext = EXTATTR_NEXT(eap); + /* Bogusly short entry or bogusly long entry. */ + if (eap->ea_length < sizeof(*eap) || eapnext > eaend) { + free(eae, M_TEMP); + return (EINTEGRITY); + } + } *p = eae; return (0); } @@ -1300,7 +1310,7 @@ ffs_open_ea(struct vnode *vp, struct ucred *cred, stru return (0); } dp = ip->i_din2; - error = ffs_rdextattr(&ip->i_ea_area, vp, td, 0); + error = ffs_rdextattr(&ip->i_ea_area, vp, td); if (error) { ffs_unlock_ea(vp); return (error); @@ -1606,9 +1616,8 @@ vop_listextattr { eap = (struct extattr *)ip->i_ea_area; eaend = (struct extattr *)(ip->i_ea_area + ip->i_ea_len); for (; error == 0 && eap < eaend; eap = EXTATTR_NEXT(eap)) { - /* make sure this entry is complete */ - if (EXTATTR_NEXT(eap) > eaend) - break; + KASSERT(EXTATTR_NEXT(eap) <= eaend, + ("extattr next %p beyond %p", EXTATTR_NEXT(eap), eaend)); if (eap->ea_namespace != ap->a_attrnamespace) continue; Modified: head/sys/ufs/ufs/extattr.h ============================================================================== --- head/sys/ufs/ufs/extattr.h Fri Oct 30 18:55:08 2020 (r367180) +++ head/sys/ufs/ufs/extattr.h Fri Oct 30 19:00:42 2020 (r367181) @@ -95,7 +95,7 @@ struct extattr { * content referenced by eap. */ #define EXTATTR_NEXT(eap) \ - ((struct extattr *)(((u_char *)(eap)) + (eap)->ea_length)) + ((struct extattr *)(__DECONST(char *, (eap)) + (eap)->ea_length)) #define EXTATTR_CONTENT(eap) \ (void *)(((u_char *)(eap)) + EXTATTR_BASE_LENGTH(eap)) #define EXTATTR_CONTENT_SIZE(eap) \ From owner-svn-src-head@freebsd.org Fri Oct 30 19:03:00 2020 Return-Path: Delivered-To: svn-src-head@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 74F0C4593E4; Fri, 30 Oct 2020 19:03:00 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNBXN2XBmz4N5C; Fri, 30 Oct 2020 19:03:00 +0000 (UTC) (envelope-from cem@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 3A1361B544; Fri, 30 Oct 2020 19:03:00 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UJ30op045918; Fri, 30 Oct 2020 19:03:00 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UJ30in045913; Fri, 30 Oct 2020 19:03:00 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202010301903.09UJ30in045913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 30 Oct 2020 19:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367182 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 367182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 19:03:00 -0000 Author: cem Date: Fri Oct 30 19:02:59 2020 New Revision: 367182 URL: https://svnweb.freebsd.org/changeset/base/367182 Log: linux(4): Quiesce warning about madvise(..., -1) This API misuse is intended to produce an error value to detect certain bogus stub implementations of MADV_WIPEONFORK. We don't need to log a warning about it. Example: https://boringssl.googlesource.com/boringssl/+/ad5582985cc6b89d0e7caf0d9cc7e301de61cf66%5E%21/ Reviewed by: emaste, trasz Differential Revision: https://reviews.freebsd.org/D27017 Modified: head/sys/compat/linux/linux_mmap.c Modified: head/sys/compat/linux/linux_mmap.c ============================================================================== --- head/sys/compat/linux/linux_mmap.c Fri Oct 30 19:00:42 2020 (r367181) +++ head/sys/compat/linux/linux_mmap.c Fri Oct 30 19:02:59 2020 (r367182) @@ -394,6 +394,16 @@ linux_madvise_common(struct thread *td, uintptr_t addr case LINUX_MADV_SOFT_OFFLINE: linux_msg(curthread, "unsupported madvise MADV_SOFT_OFFLINE"); return (EINVAL); + case -1: + /* + * -1 is sometimes used as a dummy value to detect simplistic + * madvise(2) stub implementations. This safeguard is used by + * BoringSSL, for example, before assuming MADV_WIPEONFORK is + * safe to use. Don't produce an "unsupported" error message + * for this special dummy value, which is unlikely to be used + * by any new advisory behavior feature. + */ + return (EINVAL); default: linux_msg(curthread, "unsupported madvise behav %d", behav); return (EINVAL); From owner-svn-src-head@freebsd.org Fri Oct 30 19:37:35 2020 Return-Path: Delivered-To: svn-src-head@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 2691E459FC7; Fri, 30 Oct 2020 19:37:35 +0000 (UTC) (envelope-from pizzamig@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNCJG74X1z4Pbg; Fri, 30 Oct 2020 19:37:34 +0000 (UTC) (envelope-from pizzamig@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 D1B9F1B95A; Fri, 30 Oct 2020 19:37:34 +0000 (UTC) (envelope-from pizzamig@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UJbYlf064722; Fri, 30 Oct 2020 19:37:34 GMT (envelope-from pizzamig@FreeBSD.org) Received: (from pizzamig@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UJbYuA064721; Fri, 30 Oct 2020 19:37:34 GMT (envelope-from pizzamig@FreeBSD.org) Message-Id: <202010301937.09UJbYuA064721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pizzamig set sender to pizzamig@FreeBSD.org using -f From: Luca Pizzamiglio Date: Fri, 30 Oct 2020 19:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367183 - head/sbin/bectl X-SVN-Group: head X-SVN-Commit-Author: pizzamig X-SVN-Commit-Paths: head/sbin/bectl X-SVN-Commit-Revision: 367183 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 19:37:35 -0000 Author: pizzamig (ports committer) Date: Fri Oct 30 19:37:34 2020 New Revision: 367183 URL: https://svnweb.freebsd.org/changeset/base/367183 Log: bectl(8): missing flag in the help message Flag -o for destroy subcommand is missing in the help message, but present in the man page. Fix it. PR: 249325 Approved by: kevans Differential Revision: https://reviews.freebsd.org/D26429 Modified: head/sbin/bectl/bectl.c Modified: head/sbin/bectl/bectl.c ============================================================================== --- head/sbin/bectl/bectl.c Fri Oct 30 19:02:59 2020 (r367182) +++ head/sbin/bectl/bectl.c Fri Oct 30 19:37:34 2020 (r367183) @@ -78,7 +78,7 @@ usage(bool explicit) "\tbectl check\n" "\tbectl create [-r] [-e {nonActiveBe | beName@snapshot}] beName\n" "\tbectl create [-r] beName@snapshot\n" - "\tbectl destroy [-F] {beName | beName@snapshot}\n" + "\tbectl destroy [-Fo] {beName | beName@snapshot}\n" "\tbectl export sourceBe\n" "\tbectl import targetBe\n" "\tbectl jail {-b | -U} [{-o key=value | -u key}]... " From owner-svn-src-head@freebsd.org Fri Oct 30 19:37:54 2020 Return-Path: Delivered-To: svn-src-head@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 96887459FD1; Fri, 30 Oct 2020 19:37:54 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNCJf3ZY6z4Q4f; Fri, 30 Oct 2020 19:37:54 +0000 (UTC) (envelope-from se@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 5EC191B857; Fri, 30 Oct 2020 19:37:54 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UJbsbB064789; Fri, 30 Oct 2020 19:37:54 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UJbrIj064788; Fri, 30 Oct 2020 19:37:53 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010301937.09UJbrIj064788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Fri, 30 Oct 2020 19:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367184 - in head: lib/libc/gen sbin/sysctl X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head: lib/libc/gen sbin/sysctl X-SVN-Commit-Revision: 367184 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 19:37:54 -0000 Author: se Date: Fri Oct 30 19:37:53 2020 New Revision: 367184 URL: https://svnweb.freebsd.org/changeset/base/367184 Log: Update man-pages to describe the user.localbase variable added in r367179. MFC after: 3 days Modified: head/lib/libc/gen/sysctl.3 head/sbin/sysctl/sysctl.8 Modified: head/lib/libc/gen/sysctl.3 ============================================================================== --- head/lib/libc/gen/sysctl.3 Fri Oct 30 19:37:34 2020 (r367183) +++ head/lib/libc/gen/sysctl.3 Fri Oct 30 19:37:53 2020 (r367184) @@ -28,7 +28,7 @@ .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd March 22, 2019 +.Dd October 30, 2020 .Dt SYSCTL 3 .Os .Sh NAME @@ -654,6 +654,7 @@ privilege may change the value. .It Dv USER_CS_PATH Ta string Ta no .It Dv USER_EXPR_NEST_MAX Ta integer Ta no .It Dv USER_LINE_MAX Ta integer Ta no +.It Dv USER_LOCALBASE Ta string Ta no .It Dv USER_POSIX2_CHAR_TERM Ta integer Ta no .It Dv USER_POSIX2_C_BIND Ta integer Ta no .It Dv USER_POSIX2_C_DEV Ta integer Ta no @@ -699,6 +700,9 @@ utility. .It Li USER_LINE_MAX The maximum length in bytes of a text-processing utility's input line. +.It Li USER_LOCALBASE +Return the value of localbase that has been compiled into system utilities +that need to have access to resources provided by a port or package. .It Li USER_POSIX2_CHAR_TERM Return 1 if the system supports at least one terminal type capable of all operations described in Modified: head/sbin/sysctl/sysctl.8 ============================================================================== --- head/sbin/sysctl/sysctl.8 Fri Oct 30 19:37:34 2020 (r367183) +++ head/sbin/sysctl/sysctl.8 Fri Oct 30 19:37:53 2020 (r367184) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd August 22, 2020 +.Dd October 30, 2020 .Dt SYSCTL 8 .Os .Sh NAME @@ -256,6 +256,7 @@ String and integer values can be set using .It "user.posix2_upe integer no" .It "user.stream_max integer no" .It "user.tzname_max integer no" +.It "user.localbase string no" .El .Sh FILES .Bl -tag -width ".In netinet/icmp_var.h" -compact From owner-svn-src-head@freebsd.org Fri Oct 30 19:53:17 2020 Return-Path: Delivered-To: svn-src-head@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 82D4245A063; Fri, 30 Oct 2020 19:53:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNCfP2dycz4Qfr; Fri, 30 Oct 2020 19:53:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E0501BF3A; Fri, 30 Oct 2020 19:53:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UJrHMe076784; Fri, 30 Oct 2020 19:53:17 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UJrGv6076783; Fri, 30 Oct 2020 19:53:16 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202010301953.09UJrGv6076783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 30 Oct 2020 19:53:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367185 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 367185 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 19:53:17 -0000 Author: jkim Date: Fri Oct 30 19:53:16 2020 New Revision: 367185 URL: https://svnweb.freebsd.org/changeset/base/367185 Log: Add ossl(4) to cryptotest. Modified: head/tests/sys/opencrypto/cryptotest.py head/tests/sys/opencrypto/runtests.sh Modified: head/tests/sys/opencrypto/cryptotest.py ============================================================================== --- head/tests/sys/opencrypto/cryptotest.py Fri Oct 30 19:37:53 2020 (r367184) +++ head/tests/sys/opencrypto/cryptotest.py Fri Oct 30 19:53:16 2020 (r367185) @@ -51,7 +51,7 @@ def katg(base, glob): return iglob(os.path.join(katdir, base, glob)) aesmodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0', 'safexcel0' ] -shamodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0', 'safexcel0' ] +shamodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0', 'ossl0', 'safexcel0' ] def GenTestCase(cname): try: @@ -456,6 +456,7 @@ aesni = GenTestCase('aesni0') armv8crypto = GenTestCase('armv8crypto0') ccr = GenTestCase('ccr0') ccp = GenTestCase('ccp0') +ossl = GenTestCase('ossl0') safexcel = GenTestCase('safexcel0') if __name__ == '__main__': Modified: head/tests/sys/opencrypto/runtests.sh ============================================================================== --- head/tests/sys/opencrypto/runtests.sh Fri Oct 30 19:37:53 2020 (r367184) +++ head/tests/sys/opencrypto/runtests.sh Fri Oct 30 19:53:16 2020 (r367185) @@ -68,7 +68,7 @@ aarch64) cpu_module=nexus/armv8crypto ;; amd64|i386) - cpu_module=nexus/aesni + cpu_module="nexus/aesni nexus/ossl" ;; esac From owner-svn-src-head@freebsd.org Fri Oct 30 20:02:33 2020 Return-Path: Delivered-To: svn-src-head@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 9AB6245A740; Fri, 30 Oct 2020 20:02:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNCs53Snlz4R9L; Fri, 30 Oct 2020 20:02:33 +0000 (UTC) (envelope-from mjg@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 5B54E1BBCD; Fri, 30 Oct 2020 20:02:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UK2XXq082721; Fri, 30 Oct 2020 20:02:33 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UK2W0j082717; Fri, 30 Oct 2020 20:02:32 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010302002.09UK2W0j082717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 30 Oct 2020 20:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367186 - in head/sys: amd64/amd64 i386/i386 kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 kern sys X-SVN-Commit-Revision: 367186 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 20:02:33 -0000 Author: mjg Date: Fri Oct 30 20:02:32 2020 New Revision: 367186 URL: https://svnweb.freebsd.org/changeset/base/367186 Log: malloc: delegate M_EXEC handling to dedicacted routines It is almost never needed and adds an avoidable branch. While here do minior clean ups in preparation for larger changes. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D27019 Modified: head/sys/amd64/amd64/bpf_jit_machdep.c head/sys/i386/i386/bpf_jit_machdep.c head/sys/kern/kern_malloc.c head/sys/kern/link_elf.c head/sys/sys/malloc.h Modified: head/sys/amd64/amd64/bpf_jit_machdep.c ============================================================================== --- head/sys/amd64/amd64/bpf_jit_machdep.c Fri Oct 30 19:53:16 2020 (r367185) +++ head/sys/amd64/amd64/bpf_jit_machdep.c Fri Oct 30 20:02:32 2020 (r367186) @@ -602,7 +602,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, siz *size = stream.cur_ip; #ifdef _KERNEL - stream.ibuf = malloc(*size, M_BPFJIT, M_EXEC | M_NOWAIT); + stream.ibuf = malloc_exec(*size, M_BPFJIT, M_NOWAIT); if (stream.ibuf == NULL) break; #else Modified: head/sys/i386/i386/bpf_jit_machdep.c ============================================================================== --- head/sys/i386/i386/bpf_jit_machdep.c Fri Oct 30 19:53:16 2020 (r367185) +++ head/sys/i386/i386/bpf_jit_machdep.c Fri Oct 30 20:02:32 2020 (r367186) @@ -632,7 +632,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, siz *size = stream.cur_ip; #ifdef _KERNEL - stream.ibuf = malloc(*size, M_BPFJIT, M_EXEC | M_NOWAIT); + stream.ibuf = malloc_exec(*size, M_BPFJIT, M_NOWAIT); if (stream.ibuf == NULL) break; #else Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Fri Oct 30 19:53:16 2020 (r367185) +++ head/sys/kern/kern_malloc.c Fri Oct 30 20:02:32 2020 (r367186) @@ -618,13 +618,14 @@ void * unsigned long osize = size; #endif + MPASS((flags & M_EXEC) == 0); #ifdef MALLOC_DEBUG va = NULL; if (malloc_dbg(&va, &size, mtp, flags) != 0) return (va); #endif - if (size <= kmem_zmax && (flags & M_EXEC) == 0) { + if (size <= kmem_zmax) { if (size & KMEM_ZMASK) size = (size & ~KMEM_ZMASK) + KMEM_ZBASE; indx = kmemsize[size >> KMEM_ZSHIFT]; @@ -640,10 +641,11 @@ void * va = malloc_large(&size, DOMAINSET_RR(), flags); malloc_type_allocated(mtp, va == NULL ? 0 : size); } - if (flags & M_WAITOK) - KASSERT(va != NULL, ("malloc(M_WAITOK) returned NULL")); - else if (va == NULL) + if (__predict_false(va == NULL)) { + KASSERT((flags & M_WAITOK) == 0, + ("malloc(M_WAITOK) returned NULL")); t_malloc_fail = time_uptime; + } #ifdef DEBUG_REDZONE if (va != NULL) va = redzone_setup(va, osize); @@ -682,40 +684,102 @@ malloc_domainset(size_t size, struct malloc_type *mtp, int flags) { struct vm_domainset_iter di; - caddr_t ret; + caddr_t va; int domain; int indx; #if defined(DEBUG_REDZONE) unsigned long osize = size; #endif + MPASS((flags & M_EXEC) == 0); #ifdef MALLOC_DEBUG - ret= NULL; - if (malloc_dbg(&ret, &size, mtp, flags) != 0) - return (ret); + va = NULL; + if (malloc_dbg(&va, &size, mtp, flags) != 0) + return (va); #endif - if (size <= kmem_zmax && (flags & M_EXEC) == 0) { + if (size <= kmem_zmax) { vm_domainset_iter_policy_init(&di, ds, &domain, &flags); do { - ret = malloc_domain(&size, &indx, mtp, domain, flags); - } while (ret == NULL && + va = malloc_domain(&size, &indx, mtp, domain, flags); + } while (va == NULL && vm_domainset_iter_policy(&di, &domain) == 0); - malloc_type_zone_allocated(mtp, ret == NULL ? 0 : size, indx); + malloc_type_zone_allocated(mtp, va == NULL ? 0 : size, indx); } else { /* Policy is handled by kmem. */ - ret = malloc_large(&size, ds, flags); - malloc_type_allocated(mtp, ret == NULL ? 0 : size); + va = malloc_large(&size, ds, flags); + malloc_type_allocated(mtp, va == NULL ? 0 : size); } + if (__predict_false(va == NULL)) { + KASSERT((flags & M_WAITOK) == 0, + ("malloc(M_WAITOK) returned NULL")); + t_malloc_fail = time_uptime; + } +#ifdef DEBUG_REDZONE + if (va != NULL) + va = redzone_setup(va, osize); +#endif + return (va); +} - if (flags & M_WAITOK) - KASSERT(ret != NULL, ("malloc(M_WAITOK) returned NULL")); - else if (ret == NULL) +/* + * Allocate an executable area. + */ +void * +malloc_exec(size_t size, struct malloc_type *mtp, int flags) +{ + caddr_t va; +#if defined(DEBUG_REDZONE) + unsigned long osize = size; +#endif + + flags |= M_EXEC; +#ifdef MALLOC_DEBUG + va = NULL; + if (malloc_dbg(&va, &size, mtp, flags) != 0) + return (va); +#endif + va = malloc_large(&size, DOMAINSET_RR(), flags); + malloc_type_allocated(mtp, va == NULL ? 0 : size); + if (__predict_false(va == NULL)) { + KASSERT((flags & M_WAITOK) == 0, + ("malloc(M_WAITOK) returned NULL")); t_malloc_fail = time_uptime; + } #ifdef DEBUG_REDZONE - if (ret != NULL) - ret = redzone_setup(ret, osize); + if (va != NULL) + va = redzone_setup(va, osize); #endif - return (ret); + return ((void *) va); +} + +void * +malloc_domainset_exec(size_t size, struct malloc_type *mtp, struct domainset *ds, + int flags) +{ + caddr_t va; +#if defined(DEBUG_REDZONE) + unsigned long osize = size; +#endif + + flags |= M_EXEC; +#ifdef MALLOC_DEBUG + va = NULL; + if (malloc_dbg(&va, &size, mtp, flags) != 0) + return (va); +#endif + /* Policy is handled by kmem. */ + va = malloc_large(&size, ds, flags); + malloc_type_allocated(mtp, va == NULL ? 0 : size); + if (__predict_false(va == NULL)) { + KASSERT((flags & M_WAITOK) == 0, + ("malloc(M_WAITOK) returned NULL")); + t_malloc_fail = time_uptime; + } +#ifdef DEBUG_REDZONE + if (va != NULL) + va = redzone_setup(va, osize); +#endif + return (va); } void * Modified: head/sys/kern/link_elf.c ============================================================================== --- head/sys/kern/link_elf.c Fri Oct 30 19:53:16 2020 (r367185) +++ head/sys/kern/link_elf.c Fri Oct 30 20:02:32 2020 (r367186) @@ -1129,7 +1129,7 @@ link_elf_load_file(linker_class_t cls, const char* fil goto out; } #else - mapbase = malloc(mapsize, M_LINKER, M_EXEC | M_WAITOK); + mapbase = malloc_exec(mapsize, M_LINKER, M_WAITOK); #endif ef->address = mapbase; Modified: head/sys/sys/malloc.h ============================================================================== --- head/sys/sys/malloc.h Fri Oct 30 19:53:16 2020 (r367185) +++ head/sys/sys/malloc.h Fri Oct 30 20:02:32 2020 (r367186) @@ -239,6 +239,11 @@ void *malloc_domainset(size_t size, struct malloc_type void *mallocarray(size_t nmemb, size_t size, struct malloc_type *type, int flags) __malloc_like __result_use_check __alloc_size2(1, 2); +void *malloc_exec(size_t size, struct malloc_type *type, int flags) __malloc_like + __result_use_check __alloc_size(1); +void *malloc_domainset_exec(size_t size, struct malloc_type *type, + struct domainset *ds, int flags) __malloc_like __result_use_check + __alloc_size(1); void malloc_init(void *); int malloc_last_fail(void); void malloc_type_allocated(struct malloc_type *type, unsigned long size); From owner-svn-src-head@freebsd.org Fri Oct 30 20:47:13 2020 Return-Path: Delivered-To: svn-src-head@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 8DB9945B326; Fri, 30 Oct 2020 20:47:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNDrd3G4Gz4T7q; Fri, 30 Oct 2020 20:47:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:883c:5f2d:bc59:967b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id DD9B411F36; Fri, 30 Oct 2020 20:47:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r367185 - head/tests/sys/opencrypto To: Jung-uk Kim , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010301953.09UJrGv6076783@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <1ee8885d-a3b6-68e4-e90c-8faadf27ee72@FreeBSD.org> Date: Fri, 30 Oct 2020 13:47:11 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202010301953.09UJrGv6076783@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 20:47:13 -0000 On 10/30/20 12:53 PM, Jung-uk Kim wrote: > Author: jkim > Date: Fri Oct 30 19:53:16 2020 > New Revision: 367185 > URL: https://svnweb.freebsd.org/changeset/base/367185 > > Log: > Add ossl(4) to cryptotest. Thanks! My bad for missing this. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Oct 30 21:05:51 2020 Return-Path: Delivered-To: svn-src-head@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 9393E45BAE6; Fri, 30 Oct 2020 21:05:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNFG73Mkfz4TtC; Fri, 30 Oct 2020 21:05:51 +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 57FFF1C47B; Fri, 30 Oct 2020 21:05:51 +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 09UL5p3j020081; Fri, 30 Oct 2020 21:05:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UL5oES020079; Fri, 30 Oct 2020 21:05:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202010302105.09UL5oES020079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Oct 2020 21:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367187 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 367187 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 21:05:51 -0000 Author: jhb Date: Fri Oct 30 21:05:50 2020 New Revision: 367187 URL: https://svnweb.freebsd.org/changeset/base/367187 Log: Remove IF_SND_TAG_TYPE_TLS_RATE_LIMIT conditionals. Support for TLS rate limit tags is now in the tree, so this macro is always defined. Reviewed by: hselasky Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27020 Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Fri Oct 30 20:02:32 2020 (r367186) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Fri Oct 30 21:05:50 2020 (r367187) @@ -380,7 +380,7 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp, memset(&rl_params, 0, sizeof(rl_params)); rl_params.hdr = params->hdr; switch (params->hdr.type) { -#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) +#ifdef RATELIMIT case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: rl_params.hdr.type = IF_SND_TAG_TYPE_RATE_LIMIT; rl_params.rate_limit.max_rate = params->tls_rate_limit.max_rate; @@ -416,7 +416,7 @@ failure: int mlx5e_tls_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *params) { -#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) +#ifdef RATELIMIT union if_snd_tag_modify_params rl_params; struct mlx5e_tls_tag *ptag = container_of(pmt, struct mlx5e_tls_tag, tag); @@ -424,7 +424,7 @@ mlx5e_tls_snd_tag_modify(struct m_snd_tag *pmt, union #endif switch (pmt->type) { -#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) +#ifdef RATELIMIT case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: memset(&rl_params, 0, sizeof(rl_params)); rl_params.rate_limit.max_rate = params->tls_rate_limit.max_rate; @@ -445,7 +445,7 @@ mlx5e_tls_snd_tag_query(struct m_snd_tag *pmt, union i int error; switch (pmt->type) { -#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) +#ifdef RATELIMIT case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: #endif case IF_SND_TAG_TYPE_TLS: @@ -690,7 +690,7 @@ mlx5e_sq_tls_xmit(struct mlx5e_sq *sq, struct mlx5e_xm ptag = mb->m_pkthdr.snd_tag; if ( -#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) +#ifdef RATELIMIT ptag->type != IF_SND_TAG_TYPE_TLS_RATE_LIMIT && #endif ptag->type != IF_SND_TAG_TYPE_TLS) Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Oct 30 20:02:32 2020 (r367186) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Oct 30 21:05:50 2020 (r367187) @@ -4126,7 +4126,7 @@ mlx5e_snd_tag_alloc(struct ifnet *ifp, #ifdef RATELIMIT case IF_SND_TAG_TYPE_RATE_LIMIT: return (mlx5e_rl_snd_tag_alloc(ifp, params, ppmt)); -#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) +#ifdef KERN_TLS case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: return (mlx5e_tls_snd_tag_alloc(ifp, params, ppmt)); #endif @@ -4150,7 +4150,7 @@ mlx5e_snd_tag_modify(struct m_snd_tag *pmt, union if_s #ifdef RATELIMIT case IF_SND_TAG_TYPE_RATE_LIMIT: return (mlx5e_rl_snd_tag_modify(pmt, params)); -#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) +#ifdef KERN_TLS case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: return (mlx5e_tls_snd_tag_modify(pmt, params)); #endif @@ -4172,7 +4172,7 @@ mlx5e_snd_tag_query(struct m_snd_tag *pmt, union if_sn #ifdef RATELIMIT case IF_SND_TAG_TYPE_RATE_LIMIT: return (mlx5e_rl_snd_tag_query(pmt, params)); -#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) +#ifdef KERN_TLS case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: return (mlx5e_tls_snd_tag_query(pmt, params)); #endif @@ -4241,7 +4241,7 @@ mlx5e_snd_tag_free(struct m_snd_tag *pmt) case IF_SND_TAG_TYPE_RATE_LIMIT: mlx5e_rl_snd_tag_free(pmt); break; -#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) +#ifdef KERN_TLS case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: mlx5e_tls_snd_tag_free(pmt); break; Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Oct 30 20:02:32 2020 (r367186) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Fri Oct 30 21:05:50 2020 (r367187) @@ -104,7 +104,7 @@ top: sq = container_of(mb_tag, struct mlx5e_rl_channel, tag)->sq; break; -#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) +#ifdef KERN_TLS case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: mb_tag = container_of(mb_tag, struct mlx5e_tls_tag, tag)->rl_tag; goto top; From owner-svn-src-head@freebsd.org Fri Oct 30 21:13:06 2020 Return-Path: Delivered-To: svn-src-head@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 1A89745B7E6; Fri, 30 Oct 2020 21:13:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNFQT6ymkz4VVw; Fri, 30 Oct 2020 21:13:05 +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 D224B1CA4C; Fri, 30 Oct 2020 21:13:05 +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 09ULD5DJ025900; Fri, 30 Oct 2020 21:13:05 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09ULD598025899; Fri, 30 Oct 2020 21:13:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202010302113.09ULD598025899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 30 Oct 2020 21:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367188 - head/sbin/sysctl X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sbin/sysctl X-SVN-Commit-Revision: 367188 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 21:13:06 -0000 Author: jhb Date: Fri Oct 30 21:13:05 2020 New Revision: 367188 URL: https://svnweb.freebsd.org/changeset/base/367188 Log: Use a dynamic buffer for the copy of a node's new value. This permits setting a node's value to a string longer than BUFSIZ. Reported by: Sony Arpita Das @ Chelsio Reviewed by: freqlabs MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D27027 Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Fri Oct 30 21:05:50 2020 (r367187) +++ head/sbin/sysctl/sysctl.c Fri Oct 30 21:13:05 2020 (r367188) @@ -344,13 +344,13 @@ parse_numeric(const char *newvalstr, const char *fmt, static int parse(const char *string, int lineno) { - int len, i, j; + int len, i, j, save_errno; const void *newval; char *newvalstr = NULL; void *newbuf; size_t newsize = Bflag; int mib[CTL_MAXNAME]; - char *cp, *bufp, buf[BUFSIZ], fmt[BUFSIZ], line[BUFSIZ]; + char *cp, *bufp, *buf, fmt[BUFSIZ], line[BUFSIZ]; u_int kind; if (lineno) @@ -365,11 +365,7 @@ parse(const char *string, int lineno) * Whitespace surrounding the delimiter is trimmed. * Quotes around the value are stripped. */ - cp = buf; - if (snprintf(buf, BUFSIZ, "%s", string) >= BUFSIZ) { - warnx("oid too long: '%s'%s", string, line); - return (1); - } + cp = buf = strdup(string); bufp = strsep(&cp, "=:"); if (cp != NULL) { /* Tflag just lists tunables, do not allow assignment */ @@ -403,22 +399,24 @@ parse(const char *string, int lineno) */ len = name2oid(bufp, mib); if (len < 0) { - if (iflag) + if (iflag) { + free(buf); return (0); - if (qflag) - return (1); - else { + } + if (!qflag) { if (errno == ENOENT) { warnx("unknown oid '%s'%s", bufp, line); } else { warn("unknown oid '%s'%s", bufp, line); } - return (1); } + free(buf); + return (1); } if (oidfmt(mib, len, fmt, &kind)) { warn("couldn't find format of oid '%s'%s", bufp, line); + free(buf); if (iflag) return (1); else @@ -430,6 +428,7 @@ parse(const char *string, int lineno) * show the node and its children. Otherwise, set the new value. */ if (newvalstr == NULL || dflag) { + free(buf); if ((kind & CTLTYPE) == CTLTYPE_NODE) { if (dflag) { i = show_var(mib, len, false); @@ -450,6 +449,7 @@ parse(const char *string, int lineno) */ if ((kind & CTLTYPE) == CTLTYPE_NODE) { warnx("oid '%s' isn't a leaf node%s", bufp, line); + free(buf); return (1); } @@ -459,6 +459,7 @@ parse(const char *string, int lineno) warnx("Tunable values are set in /boot/loader.conf"); } else warnx("oid '%s' is read only%s", bufp, line); + free(buf); return (1); } @@ -477,6 +478,7 @@ parse(const char *string, int lineno) case CTLTYPE_U64: if (strlen(newvalstr) == 0) { warnx("empty numeric value"); + free(buf); return (1); } /* FALLTHROUGH */ @@ -485,6 +487,7 @@ parse(const char *string, int lineno) default: warnx("oid '%s' is type %d, cannot set that%s", bufp, kind & CTLTYPE, line); + free(buf); return (1); } @@ -503,6 +506,7 @@ parse(const char *string, int lineno) warnx("invalid %s '%s'%s", ctl_typename[kind & CTLTYPE], cp, line); free(newbuf); + free(buf); return (1); } } @@ -515,10 +519,12 @@ parse(const char *string, int lineno) */ i = show_var(mib, len, false); if (sysctl(mib, len, 0, 0, newval, newsize) == -1) { + save_errno = errno; free(newbuf); + free(buf); if (!i && !bflag) putchar('\n'); - switch (errno) { + switch (save_errno) { case EOPNOTSUPP: warnx("%s: value is not available%s", string, line); @@ -532,11 +538,12 @@ parse(const char *string, int lineno) string, line); return (1); default: - warn("%s%s", string, line); + warnc(save_errno, "%s%s", string, line); return (1); } } free(newbuf); + free(buf); if (!bflag) printf(" -> "); i = nflag; From owner-svn-src-head@freebsd.org Fri Oct 30 22:00:36 2020 Return-Path: Delivered-To: svn-src-head@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 2A35D45C2F7; Fri, 30 Oct 2020 22:00:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNGTJ0PlBz4X2N; Fri, 30 Oct 2020 22:00:36 +0000 (UTC) (envelope-from imp@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 E65A61CD7E; Fri, 30 Oct 2020 22:00:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09UM0ZTA050979; Fri, 30 Oct 2020 22:00:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09UM0ZiA050978; Fri, 30 Oct 2020 22:00:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202010302200.09UM0ZiA050978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 30 Oct 2020 22:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367189 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 367189 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 22:00:36 -0000 Author: imp Date: Fri Oct 30 22:00:35 2020 New Revision: 367189 URL: https://svnweb.freebsd.org/changeset/base/367189 Log: Integrate 4.4BSD-Lite2 changes to IOC_* definitions Bring in the long-overdue 4.4BSD-Lite2 rev 8.3 by cgd of sys/ioccom.h. This uses UL suffix for the IOC_* constants so they don't sign extend. Also bring in the handy diagram from NetBSD's version of this file. This alters the 4.4BSD-Lite2 code slightly in a way that's semantically the same but more compact. This should stop the warnings from Chrome for bogus sign extension. Reviewed by: kib@, jhb@ Differential Revision: https://reviews.freebsd.org/D26423 Modified: head/sys/sys/ioccom.h Modified: head/sys/sys/ioccom.h ============================================================================== --- head/sys/sys/ioccom.h Fri Oct 30 21:13:05 2020 (r367188) +++ head/sys/sys/ioccom.h Fri Oct 30 22:00:35 2020 (r367189) @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ioccom.h 8.2 (Berkeley) 3/28/94 + * @(#)ioccom.h 8.3 (Berkeley) 1/9/95 * $FreeBSD$ */ @@ -39,6 +39,11 @@ * Ioctl's have the command encoded in the lower word, and the size of * any in or out parameters in the upper word. The high 3 bits of the * upper word are used to encode the in/out status of the parameter. + * + * 31 29 28 16 15 8 7 0 + * +---------------------------------------------------------------+ + * | I/O | Parameter Length | Command Group | Command | + * +---------------------------------------------------------------+ */ #define IOCPARM_SHIFT 13 /* number of bits for ioctl size */ #define IOCPARM_MASK ((1 << IOCPARM_SHIFT) - 1) /* parameter length mask */ @@ -47,11 +52,12 @@ #define IOCGROUP(x) (((x) >> 8) & 0xff) #define IOCPARM_MAX (1 << IOCPARM_SHIFT) /* max size of ioctl */ -#define IOC_VOID 0x20000000 /* no parameters */ -#define IOC_OUT 0x40000000 /* copy out parameters */ -#define IOC_IN 0x80000000 /* copy in parameters */ -#define IOC_INOUT (IOC_IN|IOC_OUT) -#define IOC_DIRMASK (IOC_VOID|IOC_OUT|IOC_IN) + +#define IOC_VOID 0x20000000UL /* no parameters */ +#define IOC_OUT 0x40000000UL /* copy out parameters */ +#define IOC_IN 0x80000000UL /* copy in parameters */ +#define IOC_INOUT (IOC_IN|IOC_OUT)/* copy parameters in and out */ +#define IOC_DIRMASK (IOC_VOID|IOC_OUT|IOC_IN)/* mask for IN/OUT/VOID */ #define _IOC(inout,group,num,len) ((unsigned long) \ ((inout) | (((len) & IOCPARM_MASK) << 16) | ((group) << 8) | (num))) From owner-svn-src-head@freebsd.org Sat Oct 31 01:12:35 2020 Return-Path: Delivered-To: svn-src-head@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 DDCA046112C; Sat, 31 Oct 2020 01:12:35 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNLkq5cQSz3Trv; Sat, 31 Oct 2020 01:12:35 +0000 (UTC) (envelope-from cem@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 A21281F8C2; Sat, 31 Oct 2020 01:12:35 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09V1CZ6g073403; Sat, 31 Oct 2020 01:12:35 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09V1CZaU073402; Sat, 31 Oct 2020 01:12:35 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202010310112.09V1CZaU073402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 31 Oct 2020 01:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367190 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 367190 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 01:12:36 -0000 Author: cem Date: Sat Oct 31 01:12:35 2020 New Revision: 367190 URL: https://svnweb.freebsd.org/changeset/base/367190 Log: linux(4): Add missing clone(2) flags Modified: head/sys/compat/linux/linux_misc.h Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Fri Oct 30 22:00:35 2020 (r367189) +++ head/sys/compat/linux/linux_misc.h Sat Oct 31 01:12:35 2020 (r367190) @@ -97,13 +97,25 @@ extern const char *linux_kplatform; #define LINUX_CLONE_FILES 0x00000400 #define LINUX_CLONE_SIGHAND 0x00000800 #define LINUX_CLONE_PID 0x00001000 /* No longer exist in Linux */ +#define LINUX_CLONE_PTRACE 0x00002000 #define LINUX_CLONE_VFORK 0x00004000 #define LINUX_CLONE_PARENT 0x00008000 #define LINUX_CLONE_THREAD 0x00010000 +#define LINUX_CLONE_NEWNS 0x00020000 /* New mount NS */ +#define LINUX_CLONE_SYSVSEM 0x00040000 #define LINUX_CLONE_SETTLS 0x00080000 #define LINUX_CLONE_PARENT_SETTID 0x00100000 #define LINUX_CLONE_CHILD_CLEARTID 0x00200000 +#define LINUX_CLONE_DETACHED 0x00400000 /* Unused */ +#define LINUX_CLONE_UNTRACED 0x00800000 #define LINUX_CLONE_CHILD_SETTID 0x01000000 +#define LINUX_CLONE_NEWCGROUP 0x02000000 /* New cgroup NS */ +#define LINUX_CLONE_NEWUTS 0x04000000 +#define LINUX_CLONE_NEWIPC 0x08000000 +#define LINUX_CLONE_NEWUSER 0x10000000 +#define LINUX_CLONE_NEWPID 0x20000000 +#define LINUX_CLONE_NEWNET 0x40000000 +#define LINUX_CLONE_IO 0x80000000 /* Scheduling policies */ #define LINUX_SCHED_OTHER 0 From owner-svn-src-head@freebsd.org Sat Oct 31 03:36:32 2020 Return-Path: Delivered-To: svn-src-head@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 6A2044672B8; Sat, 31 Oct 2020 03:36:32 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNPww2DmBz3fhv; Sat, 31 Oct 2020 03:36:32 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D28D2154E; Sat, 31 Oct 2020 03:36:32 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09V3aWRo060299; Sat, 31 Oct 2020 03:36:32 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09V3aWSl060298; Sat, 31 Oct 2020 03:36:32 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202010310336.09V3aWSl060298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 31 Oct 2020 03:36:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367195 - head X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 367195 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 03:36:32 -0000 Author: cperciva Date: Sat Oct 31 03:36:31 2020 New Revision: 367195 URL: https://svnweb.freebsd.org/changeset/base/367195 Log: Attempt to defuse a land mine before anyone else steps on it: The freebsd-boot partition is not always the first one. Following the instructions in UPDATING resulted in my overwriting the efiboot0 partition on my laptop with ZFS boot blocks, which had negative effects on the system's bootability. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D27002 Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Oct 31 02:57:53 2020 (r367194) +++ head/UPDATING Sat Oct 31 03:36:31 2020 (r367195) @@ -2203,9 +2203,11 @@ COMMON ITEMS: 2.) update the ZFS boot block on your boot drive - The following example updates the ZFS boot block on the first - partition (freebsd-boot) of a GPT partitioned drive ada0: - "gpart bootcode -p /boot/gptzfsboot -i 1 ada0" + The following example updates the ZFS boot block on the + freebsd-boot partition of a GPT partitioned drive ada0: + "gpart bootcode -p /boot/gptzfsboot -i $N ada0" + The value $N will typically be 1 (if booting from BIOS) or 2 (if + booting from EFI). Non-boot pools do not need these updates. From owner-svn-src-head@freebsd.org Sat Oct 31 11:44:11 2020 Return-Path: Delivered-To: svn-src-head@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 6595B448833; Sat, 31 Oct 2020 11:44:11 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNclb24Khz4Mr9; Sat, 31 Oct 2020 11:44:11 +0000 (UTC) (envelope-from se@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 2B7AE26ED8; Sat, 31 Oct 2020 11:44:11 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VBiB7G063211; Sat, 31 Oct 2020 11:44:11 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VBiBbh063210; Sat, 31 Oct 2020 11:44:11 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010311144.09VBiBbh063210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 31 Oct 2020 11:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367196 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 367196 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 11:44:11 -0000 Author: se Date: Sat Oct 31 11:44:10 2020 New Revision: 367196 URL: https://svnweb.freebsd.org/changeset/base/367196 Log: Fix style, no functional change Submitted by: kib MFC after: 3 days Modified: head/lib/libc/gen/sysctl.c Modified: head/lib/libc/gen/sysctl.c ============================================================================== --- head/lib/libc/gen/sysctl.c Sat Oct 31 03:36:31 2020 (r367195) +++ head/lib/libc/gen/sysctl.c Sat Oct 31 11:44:10 2020 (r367196) @@ -79,23 +79,23 @@ sysctl(const int *name, u_int namelen, void *oldp, siz switch (name[1]) { case USER_CS_PATH: - if (oldp && orig_oldlen < sizeof(_PATH_STDPATH)) { + if (oldp == NULL && orig_oldlen < sizeof(_PATH_STDPATH)) { errno = ENOMEM; - return -1; + return (-1); } *oldlenp = sizeof(_PATH_STDPATH); if (oldp != NULL) memmove(oldp, _PATH_STDPATH, sizeof(_PATH_STDPATH)); return (0); case USER_LOCALBASE: - if (oldp && orig_oldlen < sizeof(_PATH_LOCALBASE)) { + if (oldp == NULL && orig_oldlen < sizeof(_PATH_LOCALBASE)) { errno = ENOMEM; - return -1; + return (-1); } *oldlenp = sizeof(_PATH_LOCALBASE); if (oldp != NULL) memmove(oldp, _PATH_LOCALBASE, sizeof(_PATH_LOCALBASE)); - return(0); + return (0); } if (oldp && *oldlenp < sizeof(int)) { From owner-svn-src-head@freebsd.org Sat Oct 31 11:46:53 2020 Return-Path: Delivered-To: svn-src-head@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 42D4E44936F; Sat, 31 Oct 2020 11:46:53 +0000 (UTC) (envelope-from xtouqh@hotmail.com) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073029.outbound.protection.outlook.com [40.92.73.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNcph00W7z4Mqs; Sat, 31 Oct 2020 11:46:51 +0000 (UTC) (envelope-from xtouqh@hotmail.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yp8OInPZg5UKjihWIxZGGCHDYUe+3gkLzUSs6YIuqO/x5ccn1MnfQ8VvMDv4LT8myun/eRQlAmYFCXIyDKJyfmY5uTWIc5ToRLeGe2OZP5Z0UuOdaVQ109wprYOk8LEoJhyhBMd/ADVgrDJJs1WS8gv6MZfo3EaneN7ajaxdhpQSoTHQ99mtgztfZxlJb+9rLGoprcG4otUwGgXyx6Ynd/E9rD7A276SZwX8fPnJMwDCXmDx4Xld7qA4XqzlxPRaqb64dvfX1YLHiLzol3GZM8v9ct9OecITiwV/ncjFRbdY+mMcw5jI/jsA2261tJcDSuDv8FCwWHZVZfP0F1gTJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Sp1UR98Qg5ZUmJpOIUR6Nn9mTdsfmdOVuK4nxQp65+k=; b=XsMjmw+9et5boMPq7bccLD6e/VYhN8VZVSZjtTxq7Djy+segZHnICu96Y8mVwNgw4ioVSHf6abHJP7Pdd+geDOOF2iYFqCx+RIYX7jS97rJvKJynF4c389rhqYN41Sx1CmyBOcB4TCAkkbemaLdVS5BMphALigqUDCmSQSKr4C19xVZUv4UiHaKfxpDcIGwL57k+pDSzsN6OTWpld22eHnhkCzgw0XaMlsLngyW8u2zBE20mAR139UaxPgMsiyUCQOoyzAdICqBoejgY8xxPZKdPPCxOTSuhaHPD+e0RkcRFmw9XW/LsLChxw0Q1upU9Qa/I9TOV6SgecmRvyIThng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Sp1UR98Qg5ZUmJpOIUR6Nn9mTdsfmdOVuK4nxQp65+k=; b=N1JLssYsCV0esp2rAUsVtA/oAR2XMwD58Ss2Cj4my+hSfaUcXStqLZ2yNhJ7e0KBSu5b5E7BsQez9hqqCWIx8q9bEMIwTs/PB7G4PsdrBORdnn7vJy94Mos97USA/EW1tvITu+NaER7ljm/2yIWPypRPjgTqgV+ZJLxcOgZvjOGDUxIAVOqxoMGw8SYSIMDJBGnepciCnUXVETOwB1cKTpxbVTzzM8MzoB0ibX61aFBXXtHGKl163Ny9580lTQf8OLvAZSHp68N9Chj8frNCk5rnSiGvwPu8dnpXLhURn790ZPzEFHqfx2MUIG55l4G16q0wa3vwBmWzNu7dVkoiRQ== Received: from HE1EUR04FT052.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::52) by HE1EUR04HT019.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3520.15; Sat, 31 Oct 2020 11:46:49 +0000 Received: from AM0PR06MB3986.eurprd06.prod.outlook.com (2a01:111:e400:7e0d::42) by HE1EUR04FT052.mail.protection.outlook.com (2a01:111:e400:7e0d::297) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3520.15 via Frontend Transport; Sat, 31 Oct 2020 11:46:49 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:1021A006DE72009D57D1570AB1A2FF10572DE8FB8C5C264D8F0950D462045059; UpperCasedChecksum:EC077A9CFD4601522ABD7AD1D090E17C34B05F24B4966D29D14FC81BCD8970AA; SizeAsReceived:8673; Count:47 Received: from AM0PR06MB3986.eurprd06.prod.outlook.com ([fe80::759a:af46:6f2:8fb8]) by AM0PR06MB3986.eurprd06.prod.outlook.com ([fe80::759a:af46:6f2:8fb8%7]) with mapi id 15.20.3499.029; Sat, 31 Oct 2020 11:46:49 +0000 Subject: Re: svn commit: r367196 - head/lib/libc/gen To: =?UTF-8?Q?Stefan_E=c3=9fer?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010311144.09VBiBbh063210@repo.freebsd.org> From: xtouqh@hotmail.com Message-ID: Date: Sat, 31 Oct 2020 14:46:47 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 In-Reply-To: <202010311144.09VBiBbh063210@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TMN: [yZts5nuL2X4EyvfFBie9THpD5qX7ROiv] X-ClientProxiedBy: AM0PR04CA0047.eurprd04.prod.outlook.com (2603:10a6:208:1::24) To AM0PR06MB3986.eurprd06.prod.outlook.com (2603:10a6:208:b6::28) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.6] (91.240.124.157) by AM0PR04CA0047.eurprd04.prod.outlook.com (2603:10a6:208:1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18 via Frontend Transport; Sat, 31 Oct 2020 11:46:48 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: ac9d2173-cdbf-426d-446f-08d87d92a67f X-MS-TrafficTypeDiagnostic: HE1EUR04HT019: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b50odqrIxzzvfcJCnTrE/i+3bHRCZNjyoOPpE9TeJVaNkEnvMTFDfDBR6IkK3ETCqSbGiTnePraeDS8/a3MP6ZiAzRTAtnvCQwMkewIaeIqMyHlSLvB3kkzlDOmEiT9P+AW7yode2oMePa0UMwOJBVlOiYifoMjyNaHoP6cEzf34NQGKUoKq8c1gFaOClVChO4Tm+XSKuLlOMRDOfMldZwWmFPluXrWM+hFbGL9ekj2HWDMM2dYc/o2+VwPwGaK6 X-MS-Exchange-AntiSpam-MessageData: ZLvhaMGr4eyFFE/mH6/qOuQcQu3fzE6p7iybJCNt1GXOv5aQzPoC7oRu37NfvXOQL8auBlGetHxbh4cZB1ZpogAaMyqa2XGoqyuN0zPDpdRvTqiBuP3hGbfQHusa6tpgz/oqvEHL9kUomMX4rxwyGQ== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac9d2173-cdbf-426d-446f-08d87d92a67f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2020 11:46:48.9368 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT052.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT019 X-Rspamd-Queue-Id: 4CNcph00W7z4Mqs X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b=N1JLssYs; dmarc=pass (policy=none) header.from=hotmail.com; spf=pass (mx1.freebsd.org: domain of xtouqh@hotmail.com designates 40.92.73.29 as permitted sender) smtp.mailfrom=xtouqh@hotmail.com X-Spamd-Result: default: False [-2.30 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[hotmail.com]; R_SPF_ALLOW(-0.20)[+ip4:40.92.0.0/15]; DKIM_TRACE(0.00)[hotmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[hotmail.com,none]; NEURAL_HAM_SHORT(-0.82)[-0.821]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; ASN(0.00)[asn:8075, ipnet:40.80.0.0/12, country:US]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_MEDIUM(-1.01)[-1.011]; R_DKIM_ALLOW(-0.20)[hotmail.com:s=selector1]; RCVD_COUNT_FIVE(0.00)[5]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.97)[-0.966]; MIME_GOOD(-0.10)[text/plain]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; FROM_NO_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[40.92.73.29:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.92.73.29:from]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 11:46:53 -0000 Stefan Eßer wrote: > Author: se > Date: Sat Oct 31 11:44:10 2020 > New Revision: 367196 > URL: https://svnweb.freebsd.org/changeset/base/367196 > > Log: > Fix style, no functional change > > Submitted by: kib > MFC after: 3 days > > Modified: > head/lib/libc/gen/sysctl.c > > Modified: head/lib/libc/gen/sysctl.c > ============================================================================== > --- head/lib/libc/gen/sysctl.c Sat Oct 31 03:36:31 2020 (r367195) > +++ head/lib/libc/gen/sysctl.c Sat Oct 31 11:44:10 2020 (r367196) > @@ -79,23 +79,23 @@ sysctl(const int *name, u_int namelen, void *oldp, siz > > switch (name[1]) { > case USER_CS_PATH: > - if (oldp && orig_oldlen < sizeof(_PATH_STDPATH)) { > + if (oldp == NULL && orig_oldlen < sizeof(_PATH_STDPATH)) { These checks are not identical, should not the new one be != NULL? > errno = ENOMEM; > - return -1; > + return (-1); > } > *oldlenp = sizeof(_PATH_STDPATH); > if (oldp != NULL) > memmove(oldp, _PATH_STDPATH, sizeof(_PATH_STDPATH)); > return (0); > case USER_LOCALBASE: > - if (oldp && orig_oldlen < sizeof(_PATH_LOCALBASE)) { > + if (oldp == NULL && orig_oldlen < sizeof(_PATH_LOCALBASE)) { Same here. > errno = ENOMEM; > - return -1; > + return (-1); > } > *oldlenp = sizeof(_PATH_LOCALBASE); > if (oldp != NULL) > memmove(oldp, _PATH_LOCALBASE, sizeof(_PATH_LOCALBASE)); > - return(0); > + return (0); > } > > if (oldp && *oldlenp < sizeof(int)) { From owner-svn-src-head@freebsd.org Sat Oct 31 12:10:44 2020 Return-Path: Delivered-To: svn-src-head@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 68C2844AD1F; Sat, 31 Oct 2020 12:10:44 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNdLD1lHcz4PMc; Sat, 31 Oct 2020 12:10:44 +0000 (UTC) (envelope-from se@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 2028827433; Sat, 31 Oct 2020 12:10:44 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VCAi7J076294; Sat, 31 Oct 2020 12:10:44 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VCAihB076293; Sat, 31 Oct 2020 12:10:44 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010311210.09VCAihB076293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 31 Oct 2020 12:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367199 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 367199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 12:10:44 -0000 Author: se Date: Sat Oct 31 12:10:43 2020 New Revision: 367199 URL: https://svnweb.freebsd.org/changeset/base/367199 Log: Fix reversed condition after attempted style fix in r367196 Reported by: xtouqh@hotmail.com MFC after: 3 days Modified: head/lib/libc/gen/sysctl.c Modified: head/lib/libc/gen/sysctl.c ============================================================================== --- head/lib/libc/gen/sysctl.c Sat Oct 31 12:05:00 2020 (r367198) +++ head/lib/libc/gen/sysctl.c Sat Oct 31 12:10:43 2020 (r367199) @@ -79,7 +79,7 @@ sysctl(const int *name, u_int namelen, void *oldp, siz switch (name[1]) { case USER_CS_PATH: - if (oldp == NULL && orig_oldlen < sizeof(_PATH_STDPATH)) { + if (oldp != NULL && orig_oldlen < sizeof(_PATH_STDPATH)) { errno = ENOMEM; return (-1); } @@ -88,7 +88,7 @@ sysctl(const int *name, u_int namelen, void *oldp, siz memmove(oldp, _PATH_STDPATH, sizeof(_PATH_STDPATH)); return (0); case USER_LOCALBASE: - if (oldp == NULL && orig_oldlen < sizeof(_PATH_LOCALBASE)) { + if (oldp != NULL && orig_oldlen < sizeof(_PATH_LOCALBASE)) { errno = ENOMEM; return (-1); } From owner-svn-src-head@freebsd.org Sat Oct 31 12:14:35 2020 Return-Path: Delivered-To: svn-src-head@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 751CA44AF29; Sat, 31 Oct 2020 12:14:35 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNdQg2Slwz4QGB; Sat, 31 Oct 2020 12:14:35 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bbc00041f9800b152abd1.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:bc00:41f:9800:b152:abd1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id AF81918E3D; Sat, 31 Oct 2020 12:14:34 +0000 (UTC) (envelope-from se@freebsd.org) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202010311144.09VBiBbh063210@repo.freebsd.org> From: Stefan Esser Subject: Re: svn commit: r367196 - head/lib/libc/gen Message-ID: Date: Sat, 31 Oct 2020 13:14:33 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ssSGJEIwFEAn0ESPDRlKBbblrGriSQhgO" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 12:14:35 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ssSGJEIwFEAn0ESPDRlKBbblrGriSQhgO Content-Type: multipart/mixed; boundary="0VX0hvZpHEDLx27FpKmtaGqjxpvZcEXh8"; protected-headers="v1" From: Stefan Esser To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r367196 - head/lib/libc/gen References: <202010311144.09VBiBbh063210@repo.freebsd.org> In-Reply-To: --0VX0hvZpHEDLx27FpKmtaGqjxpvZcEXh8 Content-Type: multipart/mixed; boundary="------------41238D8B78E053E11E01C409" Content-Language: en-US This is a multi-part message in MIME format. --------------41238D8B78E053E11E01C409 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Sorry for the bad bug that I introduced with this attempted style fix! The correct code has been committed as r367199. Am 31.10.20 um 12:46 schrieb xtouqh@hotmail.com: > Stefan E=C3=9Fer wrote: >> Author: se >> Date: Sat Oct 31 11:44:10 2020 >> New Revision: 367196 >> URL: https://svnweb.freebsd.org/changeset/base/367196 >> >> Log: >> =C2=A0=C2=A0 Fix style, no functional change >> =C2=A0=C2=A0 Submitted by:=C2=A0=C2=A0=C2=A0 kib >> =C2=A0=C2=A0 MFC after:=C2=A0=C2=A0=C2=A0 3 days >> >> Modified: >> =C2=A0=C2=A0 head/lib/libc/gen/sysctl.c >> >> Modified: head/lib/libc/gen/sysctl.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=20 >> >> --- head/lib/libc/gen/sysctl.c=C2=A0=C2=A0=C2=A0 Sat Oct 31 03:36:31 2= 020=C2=A0=C2=A0=C2=A0 (r367195) >> +++ head/lib/libc/gen/sysctl.c=C2=A0=C2=A0=C2=A0 Sat Oct 31 11:44:10 2= 020=C2=A0=C2=A0=C2=A0 (r367196) >> @@ -79,23 +79,23 @@ sysctl(const int *name, u_int namelen, void *oldp,= =20 >> siz >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 switch (name[1]) { >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 case USER_CS_PATH: >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (oldp && orig_oldlen < = sizeof(_PATH_STDPATH)) { >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (oldp =3D=3D NULL && or= ig_oldlen < sizeof(_PATH_STDPATH)) { >=20 > These checks are not identical, should not the new one be !=3D NULL? >=20 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 errno =3D ENOMEM; >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 re= turn -1; >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 re= turn (-1); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *oldlenp =3D si= zeof(_PATH_STDPATH); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (oldp !=3D N= ULL) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 memmove(oldp, _PATH_STDPATH, sizeof(_PATH_STDPATH)); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return (0); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 case USER_LOCALBASE: >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (oldp && orig_oldlen < = sizeof(_PATH_LOCALBASE)) { >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (oldp =3D=3D NULL && or= ig_oldlen < sizeof(_PATH_LOCALBASE)) { >=20 > Same here. >=20 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 errno =3D ENOMEM; >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 re= turn -1; >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 re= turn (-1); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *oldlenp =3D si= zeof(_PATH_LOCALBASE); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (oldp !=3D N= ULL) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 memmove(oldp, _PATH_LOCALBASE, sizeof(_PATH_LOCALBASE)); >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return(0); >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return (0); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (oldp && *oldlenp < sizeof(int)) { >=20 --------------41238D8B78E053E11E01C409-- --0VX0hvZpHEDLx27FpKmtaGqjxpvZcEXh8-- --ssSGJEIwFEAn0ESPDRlKBbblrGriSQhgO Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAl+dVSkFAwAAAAAACgkQR+u171r99USK DQf/YTlx8AqjmP/WUYFMVpbXzQv3Ee5mGGJnnqnmp8twKFTZH3O8aXOS/oTuVgVyaHL6qxFtzbW6 A+FrP3ckfwRVZRr0uwF4/gMeyQn00bRGDxUTY3YPFTr+245TZmseHOeuVJsafx8HoynVWvpc4Clv x+M1sAE8LuOWc/e4CeL6/IBH+6FegxfnOY1EXWfvN6uq1x90wQbi9T3xD9ovsVYa3mUnFhqnu7tu ZA/bnIz6n3+FMGVh0QY3Bu5F2RtgMYXyfKcK4rAb/XK1c9UPMqmrCIga/GORBYwTQ9bkhOOKJbWv 1f7Uav0nQynsDoqCRhZRkgo5lgyfYCARCLS7xcMr0A== =4BxE -----END PGP SIGNATURE----- --ssSGJEIwFEAn0ESPDRlKBbblrGriSQhgO-- From owner-svn-src-head@freebsd.org Sat Oct 31 13:32:10 2020 Return-Path: Delivered-To: svn-src-head@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 315E044C17E; Sat, 31 Oct 2020 13:32:10 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNg894mssz4SpQ; Sat, 31 Oct 2020 13:32:09 +0000 (UTC) (envelope-from se@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 257A9846D; Sat, 31 Oct 2020 13:32:09 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VDW83Q026692; Sat, 31 Oct 2020 13:32:09 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VDW8HQ026691; Sat, 31 Oct 2020 13:32:08 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010311332.09VDW8HQ026691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 31 Oct 2020 13:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367203 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367203 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 13:32:10 -0000 Author: se Date: Sat Oct 31 13:32:08 2020 New Revision: 367203 URL: https://svnweb.freebsd.org/changeset/base/367203 Log: Add file names and line numbers to calendar format error messages Without file name and line number it is very cumbersum to identify the locations of errors in calendar files. MFC after: 3 days Modified: head/usr.bin/calendar/io.c head/usr.bin/calendar/parsedata.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Sat Oct 31 12:39:22 2020 (r367202) +++ head/usr.bin/calendar/io.c Sat Oct 31 13:32:08 2020 (r367203) @@ -75,6 +75,10 @@ static const char *calendarHomes[] = {".calendar", _PA static const char *calendarNoMail = "nomail";/* don't sent mail if file exist */ static char path[MAXPATHLEN]; +static const char *cal_home; +static const char *cal_dir; +static const char *cal_file; +static int cal_line; struct fixs neaster, npaskha, ncny, nfullmoon, nnewmoon; struct fixs nmarequinox, nsepequinox, njunsolstice, ndecsolstice; @@ -118,7 +122,7 @@ cal_fopen(const char *file) } if (chdir(home) != 0) { - warnx("Cannot enter home directory"); + warnx("Cannot enter home directory \"%s\"", home); return (NULL); } @@ -126,8 +130,12 @@ cal_fopen(const char *file) if (chdir(calendarHomes[i]) != 0) continue; - if ((fp = fopen(file, "r")) != NULL) + if ((fp = fopen(file, "r")) != NULL) { + cal_home = home; + cal_dir = calendarHomes[i]; + cal_file = file; return (fp); + } } warnx("can't open calendar file \"%s\"", file); @@ -139,10 +147,19 @@ cal_fopen(const char *file) return (NULL); } +#define WARN0(format) \ + warnx(format " in %s/%s/%s line %d", cal_home, cal_dir, cal_file, cal_line) +#define WARN1(format, arg1) \ + warnx(format " in %s/%s/%s line %d", arg1, cal_home, cal_dir, cal_file, cal_line) + static int token(char *line, FILE *out, int *skip) { char *walk, c, a; + const char *this_cal_home; + const char *this_cal_dir; + const char *this_cal_file; + int this_cal_line; if (strncmp(line, "endif", 5) == 0) { if (*skip > 0) @@ -155,7 +172,7 @@ token(char *line, FILE *out, int *skip) trimlr(&walk); if (*walk == '\0') { - warnx("Expecting arguments after #ifdef"); + WARN0("Expecting arguments after #ifdef"); return (T_ERR); } @@ -170,7 +187,7 @@ token(char *line, FILE *out, int *skip) trimlr(&walk); if (*walk == '\0') { - warnx("Expecting arguments after #ifndef"); + WARN0("Expecting arguments after #ifndef"); return (T_ERR); } @@ -185,7 +202,7 @@ token(char *line, FILE *out, int *skip) trimlr(&walk); if (*walk != '\0') { - warnx("Expecting no arguments after #else"); + WARN0("Expecting no arguments after #else"); return (T_ERR); } @@ -206,12 +223,12 @@ token(char *line, FILE *out, int *skip) trimlr(&walk); if (*walk == '\0') { - warnx("Expecting arguments after #include"); + WARN0("Expecting arguments after #include"); return (T_ERR); } if (*walk != '<' && *walk != '\"') { - warnx("Excecting '<' or '\"' after #include"); + WARN0("Excecting '<' or '\"' after #include"); return (T_ERR); } @@ -220,13 +237,21 @@ token(char *line, FILE *out, int *skip) c = walk[strlen(walk) - 1]; if (a != c) { - warnx("Unterminated include expecting '%c'", a); + WARN1("Unterminated include expecting '%c'", a); return (T_ERR); } walk[strlen(walk) - 1] = '\0'; + this_cal_home = cal_home; + this_cal_dir = cal_dir; + this_cal_file = cal_file; + this_cal_line = cal_line; if (cal_parse(cal_fopen(walk), out)) return (T_ERR); + cal_home = this_cal_home; + cal_dir = this_cal_dir; + cal_file = this_cal_file; + cal_line = this_cal_line; return (T_OK); } @@ -238,7 +263,7 @@ token(char *line, FILE *out, int *skip) trimlr(&walk); if (*walk == '\0') { - warnx("Expecting arguments after #define"); + WARN0("Expecting arguments after #define"); return (T_ERR); } @@ -290,7 +315,9 @@ cal_parse(FILE *in, FILE *out) if (in == NULL) return (1); + cal_line = 0; while ((linelen = getline(&line, &linecap, in)) > 0) { + cal_line++; buf = line; if (buf[linelen - 1] == '\n') buf[--linelen] = '\0'; Modified: head/usr.bin/calendar/parsedata.c ============================================================================== --- head/usr.bin/calendar/parsedata.c Sat Oct 31 12:39:22 2020 (r367202) +++ head/usr.bin/calendar/parsedata.c Sat Oct 31 13:32:08 2020 (r367203) @@ -312,10 +312,7 @@ allfine: } -void -remember(int *rememberindex, int *y, int *m, int *d, char **ed, int yy, int mm, - int dd, char *extra); -void +static void remember(int *rememberindex, int *y, int *m, int *d, char **ed, int yy, int mm, int dd, char *extra) { From owner-svn-src-head@freebsd.org Sat Oct 31 13:55:10 2020 Return-Path: Delivered-To: svn-src-head@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 D683144C8FC; Sat, 31 Oct 2020 13:55:10 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNgfk5Ltgz4Twd; Sat, 31 Oct 2020 13:55:10 +0000 (UTC) (envelope-from se@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 969DC866D; Sat, 31 Oct 2020 13:55:10 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VDtAcO042968; Sat, 31 Oct 2020 13:55:10 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VDtAAD042967; Sat, 31 Oct 2020 13:55:10 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010311355.09VDtAAD042967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 31 Oct 2020 13:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367204 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367204 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 13:55:10 -0000 Author: se Date: Sat Oct 31 13:55:10 2020 New Revision: 367204 URL: https://svnweb.freebsd.org/changeset/base/367204 Log: Add file names and line numbers to debug messages MFC after: 3 days Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Sat Oct 31 13:32:08 2020 (r367203) +++ head/usr.bin/calendar/io.c Sat Oct 31 13:55:10 2020 (r367204) @@ -448,7 +448,8 @@ cal_parse(FILE *in, FILE *out) if (count < 0) { /* Show error status based on return value */ if (debug) - fprintf(stderr, "Ignored: %s\n", buf); + fprintf(stderr, "Ignored: \"%s\" in %s/%s/%s line %d\n", + buf, cal_home, cal_dir, cal_file, cal_line); if (count == -1) continue; count = -count + 1; @@ -468,7 +469,8 @@ cal_parse(FILE *in, FILE *out) (void)strftime(dbuf, sizeof(dbuf), d_first ? "%e %b" : "%b %e", &tm); if (debug) - fprintf(stderr, "got %s\n", pp); + fprintf(stderr, "got \"%s\" in %s/%s/%s line %d\n", + pp, cal_home, cal_dir, cal_file, cal_line); events[i] = event_add(year[i], month[i], day[i], dbuf, ((flags &= F_VARIABLE) != 0) ? 1 : 0, pp, extradata[i]); From owner-svn-src-head@freebsd.org Sat Oct 31 14:27:14 2020 Return-Path: Delivered-To: svn-src-head@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 5CB4544D1BB; Sat, 31 Oct 2020 14:27:14 +0000 (UTC) (envelope-from rionda@gmail.com) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNhMj2fV1z4W7n; Sat, 31 Oct 2020 14:27:13 +0000 (UTC) (envelope-from rionda@gmail.com) Received: by mail-qk1-x730.google.com with SMTP id x20so7633406qkn.1; Sat, 31 Oct 2020 07:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=rjmrJEdWdmDzA8u/bccjC6pp7c+Az9vemMPqa6o/NAc=; b=vX08BzDWOoreHxSXK9/HUGLUcur5PNdizrAa2wjKGxFGyr85aCgvlbNX2RAMV2BmR8 3Il/tI9CZJ5+1uqpYlYclevi17H5cchjGtejMr3OpV/g55F9VO9Wrrp6DXOIEtGl4rN1 YgY4drAUFTqZu5l+g43hb65lzOaX29WdPtW7Dt0FgXLEiqyEpzpj4WPfSiPF4ZFjqisr WULufqTNNy2nmcp2mnMGaG1+dk0UoN/z2cO2CLpg5C5O9LJ0xAb7qJAaDBhDnN5aAoJw snqLzD77MlzmuN71w4dg3PYSiTPrBid/3sauNs9IQyXEgvyg30GjptkOAnSPaBY14ya7 zobA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=rjmrJEdWdmDzA8u/bccjC6pp7c+Az9vemMPqa6o/NAc=; b=G8i3nrhzy0PuTKqZT8SdQXXZtRt/68xTdtMeLLzjpThxHbNPgsaJWvx6XRqkHoeoOg BZcuLeDgy+91n6PLRf9Pu7flQUdzRKnLqdh3W/QfmwrQgs41sVr0vW2O3oXmROy/cArq B3ofdMWFy/yY1a8N3Pwz852hKWrhEskpTp+xctGTglNouCI5zGb60YOYGAuUSq7e3Wu9 4ho7WAddRoCqlpYb9cNNlUlnKtRVeytmBFbUwJz5XZz0Q0iqRAy7XAkYppFcKWOTFbKV VCCFiqFesN1FhrMTbdOZW3wuD5SnpTBqDb825tHkJS4FldXr9eHsWk/kqGpPv+ApW09Q 5iyQ== X-Gm-Message-State: AOAM532XrV6aooBh0lVUjzTXmRPRwa98u6sv058vWT77jRBCHSEo//ns S+Z3zo2fTBik0W+JKb7/DMhcv21MTeI= X-Google-Smtp-Source: ABdhPJxgMlMn8uambP+l+Xq+W80nkNpv0wrlTbM2NzkhJv9TVrCNPD61N4Xe4XoCvkp9ckHvctimRw== X-Received: by 2002:a05:620a:9d7:: with SMTP id y23mr7249608qky.429.1604154432011; Sat, 31 Oct 2020 07:27:12 -0700 (PDT) Received: from ?IPv6:2601:19b:4400:7529:f4b2:c14c:ee36:63de? ([2601:19b:4400:7529:f4b2:c14c:ee36:63de]) by smtp.gmail.com with ESMTPSA id u5sm4360616qtg.57.2020.10.31.07.27.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Oct 2020 07:27:11 -0700 (PDT) Sender: Matteo Riondato From: Matteo Riondato Message-Id: <91E4947E-61FF-4C17-B380-A4918814D8BB@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: svn commit: r364435 - head/usr.sbin/kldxref Date: Sat, 31 Oct 2020 10:27:09 -0400 In-Reply-To: <202008201850.07KIokXB063333@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Dimitry Andric References: <202008201850.07KIokXB063333@repo.freebsd.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4CNhMj2fV1z4W7n X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=vX08BzDW; dmarc=none; spf=pass (mx1.freebsd.org: domain of rionda@gmail.com designates 2607:f8b0:4864:20::730 as permitted sender) smtp.mailfrom=rionda@gmail.com X-Spamd-Result: default: False [-2.01 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_LONG(-0.97)[-0.972]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.03)[-1.028]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.31)[-0.314]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::730:from]; FORGED_SENDER(0.30)[matteo@FreeBSD.org,rionda@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[matteo@FreeBSD.org,rionda@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 14:27:14 -0000 > On Aug 20, 2020, at 2:50 PM, Dimitry Andric wrote: >=20 > Author: dim > Date: Thu Aug 20 18:50:46 2020 > New Revision: 364435 > URL: https://svnweb.freebsd.org/changeset/base/364435 >=20 > Log: > Bump kldxref's MAXSEGS to 16, to stop complaints about the kernel > supposedly having too many segments, when lld 11 links it. Such = kernels > should load just fine. Hi, I was doing an upgrade from 12.2-R to HEAD today, and at the end of = installkernel I got the warning =E2=80=9Ckldxref: too many segments=E2=80= =9D. Still, the system seems to claim that installkernel succeded. I = believe the message is caused by the fact that the system kldxref is = used to kldxref the new kernel, rather than using the one from = buildworld (I got this idea by looking at KLDXREF_CMD in = sys/conf/kern.opts.mk).=20 I don=E2=80=99t know if the message is innocuous or not (although I=E2=80=99= d love to know), but I also wonder whether installkernel should pick the = buildworld kldxref rather than the installed one. Thanks, Matteo From owner-svn-src-head@freebsd.org Sat Oct 31 15:11:24 2020 Return-Path: Delivered-To: svn-src-head@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 B667A44E62B; Sat, 31 Oct 2020 15:11:24 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNjLh4RHSz4YSr; Sat, 31 Oct 2020 15:11:24 +0000 (UTC) (envelope-from se@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 7BB5A962C; Sat, 31 Oct 2020 15:11:24 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VFBOsa087527; Sat, 31 Oct 2020 15:11:24 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VFBOnE087526; Sat, 31 Oct 2020 15:11:24 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010311511.09VFBOnE087526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 31 Oct 2020 15:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367207 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 367207 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 15:11:24 -0000 Author: se Date: Sat Oct 31 15:11:24 2020 New Revision: 367207 URL: https://svnweb.freebsd.org/changeset/base/367207 Log: Improve calendar file parsing and consistency tests Add line number information to more warning and error messages. Detect #else and #endif without corresponing #ifdef/#ifndef as error. Detect missing #endif at end of file and print warning but continue. Support for #undef has been added to reverse the effect of a prior #define. It is no error if the argument value has not been defined before. These changes may cause error aborts on malformed input files (e.g. with spurious #else or #endif), but no such errors exist in the calendar files in the FreeBSD base system and the calendar-data port and all tests pass. More tests will be added in a follow-up commit to detect regressions that might affect the newly added features. This commit ends a series of updates that enhance the pre-processor and make it behave much more like prior versions of the calendar progarm that called cpp to pre-process the data files. MFC after: 3 days Relnotes: yes Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Sat Oct 31 14:59:39 2020 (r367206) +++ head/usr.bin/calendar/io.c Sat Oct 31 15:11:24 2020 (r367207) @@ -153,7 +153,7 @@ cal_fopen(const char *file) warnx(format " in %s/%s/%s line %d", arg1, cal_home, cal_dir, cal_file, cal_line) static int -token(char *line, FILE *out, int *skip) +token(char *line, FILE *out, int *skip, int *unskip) { char *walk, c, a; const char *this_cal_home; @@ -164,6 +164,13 @@ token(char *line, FILE *out, int *skip) if (strncmp(line, "endif", 5) == 0) { if (*skip > 0) --*skip; + else if (*unskip > 0) + --*unskip; + else { + WARN0("#endif without prior #ifdef or #ifndef"); + return (T_ERR); + } + return (T_OK); } @@ -178,7 +185,9 @@ token(char *line, FILE *out, int *skip) if (*skip != 0 || definitions == NULL || sl_find(definitions, walk) == NULL) ++*skip; - + else + ++*unskip; + return (T_OK); } @@ -193,6 +202,8 @@ token(char *line, FILE *out, int *skip) if (*skip != 0 || (definitions != NULL && sl_find(definitions, walk) != NULL)) ++*skip; + else + ++*unskip; return (T_OK); } @@ -206,10 +217,18 @@ token(char *line, FILE *out, int *skip) return (T_ERR); } - if (*skip == 0) + if (*unskip == 0) { + if (*skip == 0) { + WARN0("#else without prior #ifdef or #ifndef"); + return (T_ERR); + } else if (*skip == 1) { + *skip = 0; + *unskip = 1; + } + } else if (*unskip == 1) { *skip = 1; - else if (*skip == 1) - *skip = 0; + *unskip = 0; + } return (T_OK); } @@ -267,10 +286,28 @@ token(char *line, FILE *out, int *skip) return (T_ERR); } - sl_add(definitions, strdup(walk)); + if (sl_find(definitions, walk) == NULL) + sl_add(definitions, strdup(walk)); return (T_OK); } + if (strncmp(line, "undef", 5) == 0) { + if (definitions != NULL) { + walk = line + 5; + trimlr(&walk); + + if (*walk == '\0') { + WARN0("Expecting arguments after #undef"); + return (T_ERR); + } + + walk = sl_find(definitions, walk); + if (walk != NULL) + walk[0] = '\0'; + } + return (T_OK); + } + return (T_PROCESS); } @@ -299,6 +336,7 @@ cal_parse(FILE *in, FILE *out) int day[MAXCOUNT]; int year[MAXCOUNT]; int skip = 0; + int unskip = 0; char dbuf[80]; char *pp, p; struct tm tm; @@ -369,7 +407,7 @@ cal_parse(FILE *in, FILE *out) continue; if (buf == line && *buf == '#') { - switch (token(buf+1, out, &skip)) { + switch (token(buf+1, out, &skip, &unskip)) { case T_ERR: free(line); return (1); @@ -448,8 +486,7 @@ cal_parse(FILE *in, FILE *out) if (count < 0) { /* Show error status based on return value */ if (debug) - fprintf(stderr, "Ignored: \"%s\" in %s/%s/%s line %d\n", - buf, cal_home, cal_dir, cal_file, cal_line); + WARN1("Ignored: \"%s\"", buf); if (count == -1) continue; count = -count + 1; @@ -469,12 +506,15 @@ cal_parse(FILE *in, FILE *out) (void)strftime(dbuf, sizeof(dbuf), d_first ? "%e %b" : "%b %e", &tm); if (debug) - fprintf(stderr, "got \"%s\" in %s/%s/%s line %d\n", - pp, cal_home, cal_dir, cal_file, cal_line); + WARN1("got \"%s\"", pp); events[i] = event_add(year[i], month[i], day[i], dbuf, ((flags &= F_VARIABLE) != 0) ? 1 : 0, pp, extradata[i]); } + } + while (skip-- > 0 || unskip-- > 0) { + cal_line++; + WARN0("Missing #endif assumed"); } free(line); From owner-svn-src-head@freebsd.org Sat Oct 31 15:27:46 2020 Return-Path: Delivered-To: svn-src-head@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 4447644EBA5; Sat, 31 Oct 2020 15:27:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNjjZ16bJz4Z3W; Sat, 31 Oct 2020 15:27:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09A6C964D; Sat, 31 Oct 2020 15:27:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VFRjPU098405; Sat, 31 Oct 2020 15:27:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VFRjNx098403; Sat, 31 Oct 2020 15:27:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202010311527.09VFRjNx098403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 31 Oct 2020 15:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367209 - in head: contrib/elftoolchain/readelf usr.bin/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: contrib/elftoolchain/readelf usr.bin/readelf X-SVN-Commit-Revision: 367209 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 15:27:46 -0000 Author: emaste Date: Sat Oct 31 15:27:45 2020 New Revision: 367209 URL: https://svnweb.freebsd.org/changeset/base/367209 Log: readelf: Add -z decompression support Compatible with GNU readelf, -z decompresses sections displayed by -x or -p. ELF Tool Chain ticket #555 https://sourceforge.net/p/elftoolchain/tickets/555/ Submitted by: Tiger Gao Reviewed by: markj MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26909 Modified: head/contrib/elftoolchain/readelf/readelf.1 head/contrib/elftoolchain/readelf/readelf.c head/usr.bin/readelf/Makefile Modified: head/contrib/elftoolchain/readelf/readelf.1 ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.1 Sat Oct 31 15:25:41 2020 (r367208) +++ head/contrib/elftoolchain/readelf/readelf.1 Sat Oct 31 15:27:45 2020 (r367209) @@ -24,7 +24,7 @@ .\" .\" $Id: readelf.1 3753 2019-06-28 01:13:13Z emaste $ .\" -.Dd June 27, 2019 +.Dd October 31, 2020 .Dt READELF 1 .Os .Sh NAME @@ -49,6 +49,7 @@ .Fl -debug-dump Ns Op Ns = Ns Ar long-option-name , Ns ... .Oc .Op Fl x Ar section | Fl -hex-dump Ns = Ns Ar section +.Op Fl z | Fl -decompress .Op Fl A | Fl -arch-specific .Op Fl D | Fl -use-dynamic .Op Fl H | Fl -help @@ -157,6 +158,13 @@ Display the contents of the specified section in hexad The argument .Ar section should be the name of a section or a numeric section index. +.It Fl z | Fl -decompress +Decompress contents of sections specified by +.Fl x +or +.Fl p +before displaying. +If the specified section is not compressed, it is displayed as is. .It Fl A | Fl -arch-specific This option is accepted but is currently unimplemented. .It Fl D | Fl -use-dynamic Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Sat Oct 31 15:25:41 2020 (r367208) +++ head/contrib/elftoolchain/readelf/readelf.c Sat Oct 31 15:27:45 2020 (r367209) @@ -40,12 +40,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include @@ -87,6 +89,7 @@ ELFTC_VCSID("$Id: readelf.c 3769 2019-06-29 15:15:02Z #define RE_WW 0x00040000 #define RE_W 0x00080000 #define RE_X 0x00100000 +#define RE_Z 0x00200000 /* * dwarf dump options. @@ -189,6 +192,7 @@ static struct option longopts[] = { {"arch-specific", no_argument, NULL, 'A'}, {"archive-index", no_argument, NULL, 'c'}, {"debug-dump", optional_argument, NULL, OPTION_DEBUG_DUMP}, + {"decompress", no_argument, 0, 'z'}, {"dynamic", no_argument, NULL, 'd'}, {"file-header", no_argument, NULL, 'h'}, {"full-section-name", no_argument, NULL, 'N'}, @@ -6900,17 +6904,96 @@ get_symbol_value(struct readelf *re, int symtab, int i return (sym.st_value); } +/* + * Decompress a data section if needed (using ZLIB). + * Returns true if sucessful, false otherwise. + */ +static bool decompress_section(struct section *s, + unsigned char *compressed_data_buffer, uint64_t compressed_size, + unsigned char **ret_buf, uint64_t *ret_sz) +{ + GElf_Shdr sh; + + if (gelf_getshdr(s->scn, &sh) == NULL) + errx(EXIT_FAILURE, "gelf_getshdr() failed: %s", elf_errmsg(-1)); + + if (sh.sh_flags & SHF_COMPRESSED) { + int ret; + GElf_Chdr chdr; + Elf64_Xword inflated_size; + unsigned char *uncompressed_data_buffer = NULL; + Elf64_Xword uncompressed_size; + z_stream strm; + + if (gelf_getchdr(s->scn, &chdr) == NULL) + errx(EXIT_FAILURE, "gelf_getchdr() failed: %s", elf_errmsg(-1)); + if (chdr.ch_type != ELFCOMPRESS_ZLIB) { + warnx("unknown compression type: %d", chdr.ch_type); + return (false); + } + + inflated_size = 0; + uncompressed_size = chdr.ch_size; + uncompressed_data_buffer = malloc(uncompressed_size); + compressed_data_buffer += sizeof(chdr); + compressed_size -= sizeof(chdr); + + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = compressed_size; + strm.avail_out = uncompressed_size; + ret = inflateInit(&strm); + + if (ret != Z_OK) + goto fail; + /* + * The section can contain several compressed buffers, + * so decompress in a loop until all data is inflated. + */ + while (inflated_size < compressed_size) { + strm.next_in = compressed_data_buffer + inflated_size; + strm.next_out = uncompressed_data_buffer + inflated_size; + ret = inflate(&strm, Z_FINISH); + if (ret != Z_STREAM_END) + goto fail; + inflated_size = uncompressed_size - strm.avail_out; + ret = inflateReset(&strm); + if (ret != Z_OK) + goto fail; + } + if (strm.avail_out != 0) + warnx("Warning: wrong info in compression header."); + ret = inflateEnd(&strm); + if (ret != Z_OK) + goto fail; + *ret_buf = uncompressed_data_buffer; + *ret_sz = uncompressed_size; + return (true); +fail: + inflateEnd(&strm); + if (strm.msg) + warnx("%s", strm.msg); + else + warnx("ZLIB error: %d", ret); + free(uncompressed_data_buffer); + return (false); + } + return (false); +} + static void hex_dump(struct readelf *re) { struct section *s; Elf_Data *d; - uint8_t *buf; + uint8_t *buf, *new_buf; size_t sz, nbytes; uint64_t addr; int elferr, i, j; for (i = 1; (size_t) i < re->shnum; i++) { + new_buf = NULL; s = &re->sl[i]; if (find_dumpop(re, (size_t) i, s->name, HEX_DUMP, -1) == NULL) continue; @@ -6932,6 +7015,11 @@ hex_dump(struct readelf *re) buf = d->d_buf; sz = d->d_size; addr = s->addr; + if (re->options & RE_Z) { + if (decompress_section(s, d->d_buf, d->d_size, + &new_buf, &sz)) + buf = new_buf; + } printf("\nHex dump of section '%s':\n", s->name); while (sz > 0) { printf(" 0x%8.8jx ", (uintmax_t)addr); @@ -6955,6 +7043,7 @@ hex_dump(struct readelf *re) addr += nbytes; sz -= nbytes; } + free(new_buf); } } @@ -6963,11 +7052,13 @@ str_dump(struct readelf *re) { struct section *s; Elf_Data *d; - unsigned char *start, *end, *buf_end; + unsigned char *start, *end, *buf_end, *new_buf; unsigned int len; + size_t sz; int i, j, elferr, found; for (i = 1; (size_t) i < re->shnum; i++) { + new_buf = NULL; s = &re->sl[i]; if (find_dumpop(re, (size_t) i, s->name, STR_DUMP, -1) == NULL) continue; @@ -6986,9 +7077,15 @@ str_dump(struct readelf *re) s->name); continue; } - buf_end = (unsigned char *) d->d_buf + d->d_size; - start = (unsigned char *) d->d_buf; found = 0; + start = d->d_buf; + sz = d->d_size; + if (re->options & RE_Z) { + if (decompress_section(s, d->d_buf, d->d_size, + &new_buf, &sz)) + start = new_buf; + } + buf_end = start + sz; printf("\nString dump of section '%s':\n", s->name); for (;;) { while (start < buf_end && !isprint(*start)) @@ -7009,6 +7106,7 @@ str_dump(struct readelf *re) break; start = end + 1; } + free(new_buf); if (!found) printf(" No strings found in this section."); putchar('\n'); @@ -7634,6 +7732,7 @@ Usage: %s [options] file...\n\ Display DWARF information.\n\ -x INDEX | --hex-dump=INDEX\n\ Display contents of a section as hexadecimal.\n\ + -z | --decompress Decompress the contents of a section before displaying it.\n\ -A | --arch-specific (accepted, but ignored)\n\ -D | --use-dynamic Print the symbol table specified by the DT_SYMTAB\n\ entry in the \".dynamic\" section.\n\ @@ -7668,7 +7767,7 @@ main(int argc, char **argv) memset(re, 0, sizeof(*re)); STAILQ_INIT(&re->v_dumpop); - while ((opt = getopt_long(argc, argv, "AacDdegHhIi:lNnp:rSstuVvWw::x:", + while ((opt = getopt_long(argc, argv, "AacDdegHhIi:lNnp:rSstuVvWw::x:z", longopts, NULL)) != -1) { switch(opt) { case '?': @@ -7764,6 +7863,9 @@ main(int argc, char **argv) else add_dumpop(re, 0, optarg, HEX_DUMP, DUMP_BY_NAME); + break; + case 'z': + re->options |= RE_Z; break; case OPTION_DEBUG_DUMP: re->options |= RE_W; Modified: head/usr.bin/readelf/Makefile ============================================================================== --- head/usr.bin/readelf/Makefile Sat Oct 31 15:25:41 2020 (r367208) +++ head/usr.bin/readelf/Makefile Sat Oct 31 15:27:45 2020 (r367209) @@ -10,7 +10,7 @@ READELFDIR= ${ELFTCDIR}/readelf PROG= readelf SRCS= readelf.c -LIBADD= dwarf elftc elf +LIBADD= dwarf elftc elf z .if ${MK_CASPER} != "no" LIBADD+= casper From owner-svn-src-head@freebsd.org Sat Oct 31 16:39:28 2020 Return-Path: Delivered-To: svn-src-head@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 5BCF9450F71; Sat, 31 Oct 2020 16:39:28 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNlJJ1j36z3RQD; Sat, 31 Oct 2020 16:39:28 +0000 (UTC) (envelope-from se@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 1ABADA797; Sat, 31 Oct 2020 16:39:28 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VGdRko043479; Sat, 31 Oct 2020 16:39:27 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VGdRoS043478; Sat, 31 Oct 2020 16:39:27 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010311639.09VGdRoS043478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 31 Oct 2020 16:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367221 - head X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 367221 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 16:39:28 -0000 Author: se Date: Sat Oct 31 16:39:27 2020 New Revision: 367221 URL: https://svnweb.freebsd.org/changeset/base/367221 Log: Mention the more strict consistency checks performed by calendar(), which can make the program abort with an error message on previously accepted but malformed input files. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Oct 31 16:24:11 2020 (r367220) +++ head/UPDATING Sat Oct 31 16:39:27 2020 (r367221) @@ -26,6 +26,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20101030: + The internal pre-processor in the calendar(1) program has been + extended to support more C pre-processor commands (e.g. #ifdef, #else, + and #undef) and to detect unbalanced conditional statements. + Error messages have been extended to include the filename and line + number if processing stops to help fixing malformed data files. + 20101026: All the data files for the calendar(1) program, except calendar.freebsd, have been moved to the deskutils/calendar-data port, much like the From owner-svn-src-head@freebsd.org Sat Oct 31 19:07:33 2020 Return-Path: Delivered-To: svn-src-head@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 6B7274538E3; Sat, 31 Oct 2020 19:07:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNpb92Jyhz3ZNf; Sat, 31 Oct 2020 19:07:33 +0000 (UTC) (envelope-from mjg@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 1BA99C175; Sat, 31 Oct 2020 19:07:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VJ7WOh036326; Sat, 31 Oct 2020 19:07:32 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VJ7WcY036325; Sat, 31 Oct 2020 19:07:32 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010311907.09VJ7WcY036325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 31 Oct 2020 19:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367229 - in head/sys/contrib/openzfs: include/sys/zstd module/zstd X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys/contrib/openzfs: include/sys/zstd module/zstd X-SVN-Commit-Revision: 367229 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 19:07:33 -0000 Author: mjg Date: Sat Oct 31 19:07:32 2020 New Revision: 367229 URL: https://svnweb.freebsd.org/changeset/base/367229 Log: zfs: zstd: track allocator statistics This applies: commit c4ede65bdfca11b532403620bbf0d6e33f0c1c1d Author: Mateusz Guzik Date: Fri Oct 30 23:26:10 2020 +0100 zstd: track allocator statistics Note that this only tracks sizes as requested by the caller. Actual allocated space will almost always be bigger (e.g., rounded up to the next power of 2 or page size). Additionally the allocated buffer may be holding other areas hostage. Nonetheless, this is a starting point for tracking memory usage in zstd. from openzfs Modified: head/sys/contrib/openzfs/include/sys/zstd/zstd.h head/sys/contrib/openzfs/module/zstd/zfs_zstd.c Modified: head/sys/contrib/openzfs/include/sys/zstd/zstd.h ============================================================================== --- head/sys/contrib/openzfs/include/sys/zstd/zstd.h Sat Oct 31 18:42:03 2020 (r367228) +++ head/sys/contrib/openzfs/include/sys/zstd/zstd.h Sat Oct 31 19:07:32 2020 (r367229) @@ -75,9 +75,11 @@ typedef struct zfs_zstd_header { * kstat helper macros */ #define ZSTDSTAT(stat) (zstd_stats.stat.value.ui64) -#define ZSTDSTAT_INCR(stat, val) \ +#define ZSTDSTAT_ADD(stat, val) \ atomic_add_64(&zstd_stats.stat.value.ui64, (val)) -#define ZSTDSTAT_BUMP(stat) ZSTDSTAT_INCR(stat, 1) +#define ZSTDSTAT_SUB(stat, val) \ + atomic_sub_64(&zstd_stats.stat.value.ui64, (val)) +#define ZSTDSTAT_BUMP(stat) ZSTDSTAT_ADD(stat, 1) /* (de)init for user space / kernel emulation */ int zstd_init(void); Modified: head/sys/contrib/openzfs/module/zstd/zfs_zstd.c ============================================================================== --- head/sys/contrib/openzfs/module/zstd/zfs_zstd.c Sat Oct 31 18:42:03 2020 (r367228) +++ head/sys/contrib/openzfs/module/zstd/zfs_zstd.c Sat Oct 31 19:07:32 2020 (r367229) @@ -62,6 +62,8 @@ typedef struct zstd_stats { kstat_named_t zstd_stat_dec_header_inval; kstat_named_t zstd_stat_com_fail; kstat_named_t zstd_stat_dec_fail; + kstat_named_t zstd_stat_buffers; + kstat_named_t zstd_stat_size; } zstd_stats_t; static zstd_stats_t zstd_stats = { @@ -74,6 +76,8 @@ static zstd_stats_t zstd_stats = { { "decompress_header_invalid", KSTAT_DATA_UINT64 }, { "compress_failed", KSTAT_DATA_UINT64 }, { "decompress_failed", KSTAT_DATA_UINT64 }, + { "buffers", KSTAT_DATA_UINT64 }, + { "size", KSTAT_DATA_UINT64 }, }; /* Enums describing the allocator type specified by kmem_type in zstd_kmem */ @@ -248,6 +252,8 @@ zstd_mempool_alloc(struct zstd_pool *zstd_mempool, siz /* Free memory if unused object older than 2 minutes */ if (pool->mem && gethrestime_sec() > pool->timeout) { vmem_free(pool->mem, pool->size); + ZSTDSTAT_SUB(zstd_stat_buffers, 1); + ZSTDSTAT_SUB(zstd_stat_size, pool->size); pool->mem = NULL; pool->size = 0; pool->timeout = 0; @@ -275,12 +281,13 @@ zstd_mempool_alloc(struct zstd_pool *zstd_mempool, siz /* Object is free, try to allocate new one */ if (!pool->mem) { mem = vmem_alloc(size, KM_SLEEP); - pool->mem = mem; - - if (pool->mem) { + if (mem) { + ZSTDSTAT_ADD(zstd_stat_buffers, 1); + ZSTDSTAT_ADD(zstd_stat_size, size); + pool->mem = mem; + pool->size = size; /* Keep track for later release */ mem->pool = pool; - pool->size = size; mem->kmem_type = ZSTD_KMEM_POOL; mem->kmem_size = size; } From owner-svn-src-head@freebsd.org Sat Oct 31 19:30:24 2020 Return-Path: Delivered-To: svn-src-head@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 7C30D454525; Sat, 31 Oct 2020 19:30:24 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNq5X2hFKz3bn2; Sat, 31 Oct 2020 19:30:24 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2580DC26A; Sat, 31 Oct 2020 19:30:24 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VJUOH9048438; Sat, 31 Oct 2020 19:30:24 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VJUO2t048437; Sat, 31 Oct 2020 19:30:24 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202010311930.09VJUO2t048437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 31 Oct 2020 19:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367230 - head/sys/dev/ichiic X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/ichiic X-SVN-Commit-Revision: 367230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 19:30:24 -0000 Author: wulf Date: Sat Oct 31 19:30:23 2020 New Revision: 367230 URL: https://svnweb.freebsd.org/changeset/base/367230 Log: ig4(4): Add PCI IDs for Intel Comit Lake I2C controllers. MFC after: 2 weeks Modified: head/sys/dev/ichiic/ig4_pci.c Modified: head/sys/dev/ichiic/ig4_pci.c ============================================================================== --- head/sys/dev/ichiic/ig4_pci.c Sat Oct 31 19:07:32 2020 (r367229) +++ head/sys/dev/ichiic/ig4_pci.c Sat Oct 31 19:30:23 2020 (r367230) @@ -107,6 +107,20 @@ static int ig4iic_pci_detach(device_t dev); #define PCI_CHIP_CANNONLAKE_H_I2C_1 0xa3698086 #define PCI_CHIP_CANNONLAKE_H_I2C_2 0xa36a8086 #define PCI_CHIP_CANNONLAKE_H_I2C_3 0xa36b8086 +#define PCI_CHIP_COMETLAKE_LP_I2C_0 0x02e88086 +#define PCI_CHIP_COMETLAKE_LP_I2C_1 0x02e98086 +#define PCI_CHIP_COMETLAKE_LP_I2C_2 0x02ea8086 +#define PCI_CHIP_COMETLAKE_LP_I2C_3 0x02eb8086 +#define PCI_CHIP_COMETLAKE_LP_I2C_4 0x02c58086 +#define PCI_CHIP_COMETLAKE_LP_I2C_5 0x02c68086 +#define PCI_CHIP_COMETLAKE_H_I2C_0 0x06e88086 +#define PCI_CHIP_COMETLAKE_H_I2C_1 0x06e98086 +#define PCI_CHIP_COMETLAKE_H_I2C_2 0x06ea8086 +#define PCI_CHIP_COMETLAKE_H_I2C_3 0x06eb8086 +#define PCI_CHIP_COMETLAKE_V_I2C_0 0xa3e08086 +#define PCI_CHIP_COMETLAKE_V_I2C_1 0xa3e18086 +#define PCI_CHIP_COMETLAKE_V_I2C_2 0xa3e28086 +#define PCI_CHIP_COMETLAKE_V_I2C_3 0xa3e38086 struct ig4iic_pci_device { uint32_t devid; @@ -156,6 +170,20 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = { PCI_CHIP_CANNONLAKE_H_I2C_1, "Intel Cannon Lake-H I2C Controller-1", IG4_CANNONLAKE}, { PCI_CHIP_CANNONLAKE_H_I2C_2, "Intel Cannon Lake-H I2C Controller-2", IG4_CANNONLAKE}, { PCI_CHIP_CANNONLAKE_H_I2C_3, "Intel Cannon Lake-H I2C Controller-3", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_LP_I2C_0, "Intel Comet Lake-LP I2C Controller-0", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_LP_I2C_1, "Intel Comet Lake-LP I2C Controller-1", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_LP_I2C_2, "Intel Comet Lake-LP I2C Controller-2", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_LP_I2C_3, "Intel Comet Lake-LP I2C Controller-3", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_LP_I2C_4, "Intel Comet Lake-LP I2C Controller-4", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_LP_I2C_5, "Intel Comet Lake-LP I2C Controller-5", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_H_I2C_0, "Intel Comet Lake-H I2C Controller-0", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_H_I2C_1, "Intel Comet Lake-H I2C Controller-1", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_H_I2C_2, "Intel Comet Lake-H I2C Controller-2", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_H_I2C_3, "Intel Comet Lake-H I2C Controller-3", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_V_I2C_0, "Intel Comet Lake-V I2C Controller-0", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_V_I2C_1, "Intel Comet Lake-V I2C Controller-1", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_V_I2C_2, "Intel Comet Lake-V I2C Controller-2", IG4_CANNONLAKE}, + { PCI_CHIP_COMETLAKE_V_I2C_3, "Intel Comet Lake-V I2C Controller-3", IG4_CANNONLAKE}, }; static int From owner-svn-src-head@freebsd.org Sat Oct 31 19:47:35 2020 Return-Path: Delivered-To: svn-src-head@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 021824545DF; Sat, 31 Oct 2020 19:47:35 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNqTL61pCz3cWQ; Sat, 31 Oct 2020 19:47:34 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE7D3C9AB; Sat, 31 Oct 2020 19:47:34 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VJlYbo060786; Sat, 31 Oct 2020 19:47:34 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VJlYCL060785; Sat, 31 Oct 2020 19:47:34 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202010311947.09VJlYCL060785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 31 Oct 2020 19:47:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367231 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 367231 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 19:47:35 -0000 Author: wulf Date: Sat Oct 31 19:47:34 2020 New Revision: 367231 URL: https://svnweb.freebsd.org/changeset/base/367231 Log: acpi: Tweak _DSM method evaluation helpers. - Use ACPI style for _DSM evaluation helper parameter types. - Constify UUID parameter. - Increase size of returned DSM function bitmap by acpi_DSMQuery() up to 64 items. Old limit of 8 functions is not sufficient for JEDEC JESD245 NVDIMMs. - Add new acpi_EvaluateDSMTyped() helper which performs additional return value type check as compared with acpi_EvaluateDSM(). - Reimplement acpi_EvaluateDSM() on top of the acpi_EvaluateDSMTyped() call. Reviewed by: scottph, manu Differential Revision: https://reviews.freebsd.org/D26602 Modified: head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpivar.h Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Sat Oct 31 19:30:23 2020 (r367230) +++ head/sys/dev/acpica/acpi.c Sat Oct 31 19:47:34 2020 (r367231) @@ -2632,8 +2632,8 @@ acpi_AppendBufferResource(ACPI_BUFFER *buf, ACPI_RESOU return (AE_OK); } -UINT8 -acpi_DSMQuery(ACPI_HANDLE h, uint8_t *uuid, int revision) +UINT64 +acpi_DSMQuery(ACPI_HANDLE h, const uint8_t *uuid, int revision) { /* * ACPI spec 9.1.1 defines this. @@ -2645,7 +2645,8 @@ acpi_DSMQuery(ACPI_HANDLE h, uint8_t *uuid, int revisi */ ACPI_BUFFER buf; ACPI_OBJECT *obj; - UINT8 ret = 0; + UINT64 ret = 0; + int i; if (!ACPI_SUCCESS(acpi_EvaluateDSM(h, uuid, revision, 0, NULL, &buf))) { ACPI_INFO(("Failed to enumerate DSM functions\n")); @@ -2663,12 +2664,13 @@ acpi_DSMQuery(ACPI_HANDLE h, uint8_t *uuid, int revisi */ switch (obj->Type) { case ACPI_TYPE_BUFFER: - ret = *(uint8_t *)obj->Buffer.Pointer; + for (i = 0; i < MIN(obj->Buffer.Length, sizeof(ret)); i++) + ret |= (((uint64_t)obj->Buffer.Pointer[i]) << (i * 8)); break; case ACPI_TYPE_INTEGER: ACPI_BIOS_WARNING((AE_INFO, "Possibly buggy BIOS with ACPI_TYPE_INTEGER for function enumeration\n")); - ret = obj->Integer.Value & 0xFF; + ret = obj->Integer.Value; break; default: ACPI_WARNING((AE_INFO, "Unexpected return type %u\n", obj->Type)); @@ -2684,9 +2686,18 @@ acpi_DSMQuery(ACPI_HANDLE h, uint8_t *uuid, int revisi * check the type of the returned object. */ ACPI_STATUS -acpi_EvaluateDSM(ACPI_HANDLE handle, uint8_t *uuid, int revision, - uint64_t function, union acpi_object *package, ACPI_BUFFER *out_buf) +acpi_EvaluateDSM(ACPI_HANDLE handle, const uint8_t *uuid, int revision, + UINT64 function, ACPI_OBJECT *package, ACPI_BUFFER *out_buf) { + return (acpi_EvaluateDSMTyped(handle, uuid, revision, function, + package, out_buf, ACPI_TYPE_ANY)); +} + +ACPI_STATUS +acpi_EvaluateDSMTyped(ACPI_HANDLE handle, const uint8_t *uuid, int revision, + UINT64 function, ACPI_OBJECT *package, ACPI_BUFFER *out_buf, + ACPI_OBJECT_TYPE type) +{ ACPI_OBJECT arg[4]; ACPI_OBJECT_LIST arglist; ACPI_BUFFER buf; @@ -2697,7 +2708,7 @@ acpi_EvaluateDSM(ACPI_HANDLE handle, uint8_t *uuid, in arg[0].Type = ACPI_TYPE_BUFFER; arg[0].Buffer.Length = ACPI_UUID_LENGTH; - arg[0].Buffer.Pointer = uuid; + arg[0].Buffer.Pointer = __DECONST(uint8_t *, uuid); arg[1].Type = ACPI_TYPE_INTEGER; arg[1].Integer.Value = revision; arg[2].Type = ACPI_TYPE_INTEGER; @@ -2714,7 +2725,7 @@ acpi_EvaluateDSM(ACPI_HANDLE handle, uint8_t *uuid, in arglist.Count = 4; buf.Pointer = NULL; buf.Length = ACPI_ALLOCATE_BUFFER; - status = AcpiEvaluateObject(handle, "_DSM", &arglist, &buf); + status = AcpiEvaluateObjectTyped(handle, "_DSM", &arglist, &buf, type); if (ACPI_FAILURE(status)) return (status); Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Sat Oct 31 19:30:23 2020 (r367230) +++ head/sys/dev/acpica/acpivar.h Sat Oct 31 19:47:34 2020 (r367231) @@ -349,10 +349,15 @@ ACPI_STATUS acpi_FindIndexedResource(ACPI_BUFFER *buf, ACPI_RESOURCE **resp); ACPI_STATUS acpi_AppendBufferResource(ACPI_BUFFER *buf, ACPI_RESOURCE *res); -UINT8 acpi_DSMQuery(ACPI_HANDLE h, uint8_t *uuid, int revision); -ACPI_STATUS acpi_EvaluateDSM(ACPI_HANDLE handle, uint8_t *uuid, - int revision, uint64_t function, union acpi_object *package, +UINT64 acpi_DSMQuery(ACPI_HANDLE h, const uint8_t *uuid, + int revision); +ACPI_STATUS acpi_EvaluateDSM(ACPI_HANDLE handle, const uint8_t *uuid, + int revision, UINT64 function, ACPI_OBJECT *package, ACPI_BUFFER *out_buf); +ACPI_STATUS acpi_EvaluateDSMTyped(ACPI_HANDLE handle, + const uint8_t *uuid, int revision, UINT64 function, + ACPI_OBJECT *package, ACPI_BUFFER *out_buf, + ACPI_OBJECT_TYPE type); ACPI_STATUS acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid, int revision, int count, uint32_t *caps_in, uint32_t *caps_out, bool query); From owner-svn-src-head@freebsd.org Sat Oct 31 20:04:11 2020 Return-Path: Delivered-To: svn-src-head@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 9ED0145520E; Sat, 31 Oct 2020 20:04:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNqrW3dMjz3dY9; Sat, 31 Oct 2020 20:04:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 59CCD1C50A; Sat, 31 Oct 2020 20:04:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id F1ACE27C0054; Sat, 31 Oct 2020 16:04:07 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Sat, 31 Oct 2020 16:04:07 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleejgddufeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepheeiieekkeffkeelkeel geetgfeltdetgffhudetieekveefvdfhgefgffdujefgnecuffhomhgrihhnpehfrhgvvg gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqud dtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdho rhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id A2C35C200A5; Sat, 31 Oct 2020 16:04:07 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35 Mime-Version: 1.0 Message-Id: <4468e66d-2615-48a7-bdde-90f9a1266bda@www.fastmail.com> In-Reply-To: <202010311527.09VFRjNx098403@repo.freebsd.org> References: <202010311527.09VFRjNx098403@repo.freebsd.org> Date: Sat, 31 Oct 2020 15:03:48 -0500 From: "Brandon Bergren" To: "Ed Maste" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: =?UTF-8?Q?Re:_svn_commit:_r367209_-_in_head:_contrib/elftoolchain/readel?= =?UTF-8?Q?f_usr.bin/readelf?= Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 20:04:11 -0000 This appears to have broken the build on platforms with a 32 bit size_t, given the current state of the tinderbox. On Sat, Oct 31, 2020, at 10:27 AM, Ed Maste wrote: > Author: emaste > Date: Sat Oct 31 15:27:45 2020 > New Revision: 367209 > URL: https://svnweb.freebsd.org/changeset/base/367209 > From owner-svn-src-head@freebsd.org Sat Oct 31 20:14:29 2020 Return-Path: Delivered-To: svn-src-head@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 7954F455514; Sat, 31 Oct 2020 20:14:29 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNr4P2crcz3f2K; Sat, 31 Oct 2020 20:14:29 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F1D2CF48; Sat, 31 Oct 2020 20:14:29 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VKESJr079065; Sat, 31 Oct 2020 20:14:28 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VKESgs079062; Sat, 31 Oct 2020 20:14:28 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202010312014.09VKESgs079062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 31 Oct 2020 20:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367232 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 367232 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 20:14:29 -0000 Author: wulf Date: Sat Oct 31 20:14:28 2020 New Revision: 367232 URL: https://svnweb.freebsd.org/changeset/base/367232 Log: acpi(9): Add EVENTHANDLERs for video and AC adapter events. They are required for coming ACPI support in LinuxKPI. Reviewed by: hselasky, manu (as part of D26603) Modified: head/sys/dev/acpica/acpi_acad.c head/sys/dev/acpica/acpi_video.c head/sys/dev/acpica/acpivar.h Modified: head/sys/dev/acpica/acpi_acad.c ============================================================================== --- head/sys/dev/acpica/acpi_acad.c Sat Oct 31 19:47:34 2020 (r367231) +++ head/sys/dev/acpica/acpi_acad.c Sat Oct 31 20:14:28 2020 (r367232) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -115,6 +116,7 @@ acpi_acad_get_status(void *context) ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), "%s Line\n", newstatus ? "On" : "Off"); acpi_UserNotify("ACAD", h, newstatus); + EVENTHANDLER_INVOKE(acpi_acad_event, newstatus); } else ACPI_SERIAL_END(acad); } Modified: head/sys/dev/acpica/acpi_video.c ============================================================================== --- head/sys/dev/acpica/acpi_video.c Sat Oct 31 19:47:34 2020 (r367231) +++ head/sys/dev/acpica/acpi_video.c Sat Oct 31 20:14:28 2020 (r367232) @@ -351,6 +351,12 @@ acpi_video_shutdown(device_t dev) } static void +acpi_video_invoke_event_handler(void *context) +{ + EVENTHANDLER_INVOKE(acpi_video_event, (int)(intptr_t)context); +} + +static void acpi_video_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context) { struct acpi_video_softc *sc; @@ -402,6 +408,8 @@ acpi_video_notify_handler(ACPI_HANDLE handle, UINT32 n device_printf(sc->device, "unknown notify event 0x%x\n", notify); } + AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_video_invoke_event_handler, + (void *)(uintptr_t)notify); } static void @@ -752,6 +760,9 @@ acpi_video_vo_notify_handler(ACPI_HANDLE handle, UINT3 out: ACPI_SERIAL_END(video_output); + + AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_video_invoke_event_handler, + (void *)(uintptr_t)notify); } /* ARGSUSED */ Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Sat Oct 31 19:47:34 2020 (r367231) +++ head/sys/dev/acpica/acpivar.h Sat Oct 31 20:14:28 2020 (r367232) @@ -433,6 +433,8 @@ typedef void (*acpi_event_handler_t)(void *, int); EVENTHANDLER_DECLARE(acpi_sleep_event, acpi_event_handler_t); EVENTHANDLER_DECLARE(acpi_wakeup_event, acpi_event_handler_t); +EVENTHANDLER_DECLARE(acpi_acad_event, acpi_event_handler_t); +EVENTHANDLER_DECLARE(acpi_video_event, acpi_event_handler_t); /* Device power control. */ ACPI_STATUS acpi_pwr_wake_enable(ACPI_HANDLE consumer, int enable); From owner-svn-src-head@freebsd.org Sat Oct 31 20:22:09 2020 Return-Path: Delivered-To: svn-src-head@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 935554555D2; Sat, 31 Oct 2020 20:22:09 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNrFF3RwMz3fXn; Sat, 31 Oct 2020 20:22:09 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 58C811CA02; Sat, 31 Oct 2020 20:22:09 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 2962627C0054; Sat, 31 Oct 2020 16:22:09 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Sat, 31 Oct 2020 16:22:09 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleejgddufeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdluddtmdenucfjughrpefofg ggkfgjfhffhffvufgtsehttdertderreejnecuhfhrohhmpedfuehrrghnughonhcuuegv rhhgrhgvnhdfuceosggurhgrghhonheshfhrvggvuefuffdrohhrgheqnecuggftrfgrth htvghrnhepheeiieekkeffkeelkeelgeetgfeltdetgffhudetieekveefvdfhgefgffdu jefgnecuffhomhgrihhnpehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id EBB13C200A5; Sat, 31 Oct 2020 16:22:08 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35 Mime-Version: 1.0 Message-Id: <7b9e157c-9b8e-4a0e-b3f6-38edbfebf005@www.fastmail.com> In-Reply-To: <202010311907.09VJ7WcY036325@repo.freebsd.org> References: <202010311907.09VJ7WcY036325@repo.freebsd.org> Date: Sat, 31 Oct 2020 15:21:05 -0500 From: "Brandon Bergren" To: "Mateusz Guzik" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: =?UTF-8?Q?Re:_svn_commit:_r367229_-_in_head/sys/contrib/openzfs:_include?= =?UTF-8?Q?/sys/zstd_module/zstd?= Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 20:22:09 -0000 This doesn't compile on platforms such as powerpc without pulling in the opensolaris atomics header from the spl that does locking emulation of 64 bit atomics, as platforms that don't have native 64 bit atomics do not provide them in the system header. On Sat, Oct 31, 2020, at 2:07 PM, Mateusz Guzik wrote: > Author: mjg > Date: Sat Oct 31 19:07:32 2020 > New Revision: 367229 > URL: https://svnweb.freebsd.org/changeset/base/367229 > > Log: > zfs: zstd: track allocator statistics > > This applies: > commit c4ede65bdfca11b532403620bbf0d6e33f0c1c1d > Author: Mateusz Guzik > Date: Fri Oct 30 23:26:10 2020 +0100 > > zstd: track allocator statistics > > Note that this only tracks sizes as requested by the caller. > Actual allocated space will almost always be bigger (e.g., rounded up to > the next power of 2 or page size). Additionally the allocated buffer may > be holding other areas hostage. Nonetheless, this is a starting point > for tracking memory usage in zstd. > > from openzfs > > Modified: > head/sys/contrib/openzfs/include/sys/zstd/zstd.h > head/sys/contrib/openzfs/module/zstd/zfs_zstd.c > From owner-svn-src-head@freebsd.org Sat Oct 31 20:23:07 2020 Return-Path: Delivered-To: svn-src-head@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 5ECDA455A1E; Sat, 31 Oct 2020 20:23:07 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNrGM0RNNz3fgD; Sat, 31 Oct 2020 20:23:06 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x336.google.com with SMTP id p22so5816496wmg.3; Sat, 31 Oct 2020 13:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DWOhpHPS3757yRIe7ZhdJ1T9mJ0uPs/rFHdIachPkWs=; b=tXWCjUWAKDI9e1gZsf3o2cPF/Eu5FOU8X43wkani2ZWq8ZsWB52WIw3USIf1pPrqFw So32Sw1YD3ofGJNXurlUdV3caOQ7MuPs/HkcEi+eY7iGyvBNq1GUAVK8fxkm1DfdKFEU COfcyrw1bM4iv8ACEQliYWo9viBfnCZM6rD5Ae2pKUw6ipUXbI7L+6WU/hTDAlg5yqoY 9ZDDfVR09WnG7Z42livLX6284tytlocglQgt8b/Xwmmno7VjtaGMsE91K28EXIX4i2Yt eX4dmQ7IOWNwyVMnCKlx7t4rGmniKx/1fd9C/ZfwwWqI/d8J7flQO9z+dCEqY5iF8Mei O6Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DWOhpHPS3757yRIe7ZhdJ1T9mJ0uPs/rFHdIachPkWs=; b=ocMcOI5NZ33DF6dF2roEO3auF+AdggfmLp0Igk+n88Zj/VgNidDFJCZh3gwh9yVOrO gvStCMKIo6NeBQkNLbdKKMuiu5HB7+ppaGRLpSPkr/y8IngdT/NWumqUYC6dLxtLVjVQ IFwjUw7MOEaqCyL2VALezW2kceSB38RleEwuU3j4H9XLuWYeKvtviWlf60Sh9EXKAUnH 0PVO0JM7b4j2waWSTvU0Zl9gDamH/LOq/k41W5wO6FHbpRn0zoH1eh/OnqcGfl32E16b M+jN2FzM7UyTxgYtw/8Retr5afhLn+wJvs0173ol7mK8toWT+HK9kb9Lx7gGHX4wFKpY bLyg== X-Gm-Message-State: AOAM530lD9dBVk+Npk/7soY/UIeRfEPOYNuxGgkpoIw3HAQJweH/lyRE x/20uD09PQFbEvp4yiMJSfLqvZ7JrqyscsG5TeJPJ0okHHQ= X-Google-Smtp-Source: ABdhPJy3Yyfl3z5iKV3G52gBdztsarIIO1TvXepZf99Ga3iLVNBU8jKGGVal49ewzamW0xpMtIQA4kRR/yZqXuvAhfk= X-Received: by 2002:a7b:c20d:: with SMTP id x13mr10186455wmi.83.1604175785333; Sat, 31 Oct 2020 13:23:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:4c4f:0:0:0:0:0 with HTTP; Sat, 31 Oct 2020 13:23:04 -0700 (PDT) In-Reply-To: <7b9e157c-9b8e-4a0e-b3f6-38edbfebf005@www.fastmail.com> References: <202010311907.09VJ7WcY036325@repo.freebsd.org> <7b9e157c-9b8e-4a0e-b3f6-38edbfebf005@www.fastmail.com> From: Mateusz Guzik Date: Sat, 31 Oct 2020 21:23:04 +0100 Message-ID: Subject: Re: svn commit: r367229 - in head/sys/contrib/openzfs: include/sys/zstd module/zstd To: Brandon Bergren Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CNrGM0RNNz3fgD X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 20:23:07 -0000 Yep, jenkins told me. Working on it. On 10/31/20, Brandon Bergren wrote: > This doesn't compile on platforms such as powerpc without pulling in the > opensolaris atomics header from the spl that does locking emulation of 64 > bit atomics, as platforms that don't have native 64 bit atomics do not > provide them in the system header. > > On Sat, Oct 31, 2020, at 2:07 PM, Mateusz Guzik wrote: >> Author: mjg >> Date: Sat Oct 31 19:07:32 2020 >> New Revision: 367229 >> URL: https://svnweb.freebsd.org/changeset/base/367229 >> >> Log: >> zfs: zstd: track allocator statistics >> >> This applies: >> commit c4ede65bdfca11b532403620bbf0d6e33f0c1c1d >> Author: Mateusz Guzik >> Date: Fri Oct 30 23:26:10 2020 +0100 >> >> zstd: track allocator statistics >> >> Note that this only tracks sizes as requested by the caller. >> Actual allocated space will almost always be bigger (e.g., rounded >> up to >> the next power of 2 or page size). Additionally the allocated buffer >> may >> be holding other areas hostage. Nonetheless, this is a starting >> point >> for tracking memory usage in zstd. >> >> from openzfs >> >> Modified: >> head/sys/contrib/openzfs/include/sys/zstd/zstd.h >> head/sys/contrib/openzfs/module/zstd/zfs_zstd.c >> > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sat Oct 31 20:25:56 2020 Return-Path: Delivered-To: svn-src-head@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 5BA74455C1A; Sat, 31 Oct 2020 20:25:56 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNrKc1nTdz3frS; Sat, 31 Oct 2020 20:25:56 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2060BD3E8; Sat, 31 Oct 2020 20:25:56 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VKPuPh085167; Sat, 31 Oct 2020 20:25:56 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VKPuBB085166; Sat, 31 Oct 2020 20:25:56 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202010312025.09VKPuBB085166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 31 Oct 2020 20:25:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367233 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 367233 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 20:25:56 -0000 Author: wulf Date: Sat Oct 31 20:25:55 2020 New Revision: 367233 URL: https://svnweb.freebsd.org/changeset/base/367233 Log: acpi_video(4): Add evdev support for reporting of video events. Modified: head/sys/dev/acpica/acpi_video.c Modified: head/sys/dev/acpica/acpi_video.c ============================================================================== --- head/sys/dev/acpica/acpi_video.c Sat Oct 31 20:14:28 2020 (r367232) +++ head/sys/dev/acpica/acpi_video.c Sat Oct 31 20:25:55 2020 (r367233) @@ -29,6 +29,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_evdev.h" + #include #include #include @@ -43,6 +45,11 @@ __FBSDID("$FreeBSD$"); #include +#ifdef EVDEV_SUPPORT +#include +#include +#endif + /* ACPI video extension driver. */ struct acpi_video_output { ACPI_HANDLE handle; @@ -61,6 +68,9 @@ struct acpi_video_output { int *vo_levels; struct sysctl_ctx_list vo_sysctl_ctx; struct sysctl_oid *vo_sysctl_tree; +#ifdef EVDEV_SUPPORT + struct evdev_dev *evdev; +#endif }; STAILQ_HEAD(acpi_video_output_queue, acpi_video_output); @@ -70,6 +80,9 @@ struct acpi_video_softc { ACPI_HANDLE handle; struct acpi_video_output_queue vid_outputs; eventhandler_tag vid_pwr_evh; +#ifdef EVDEV_SUPPORT + struct evdev_dev *evdev; +#endif }; /* interfaces */ @@ -107,10 +120,14 @@ static void vo_set_device_state(ACPI_HANDLE, UINT32); /* events */ #define VID_NOTIFY_SWITCHED 0x80 #define VID_NOTIFY_REPROBE 0x81 +#define VID_NOTIFY_CYCLE_OUT 0x82 +#define VID_NOTIFY_NEXT_OUT 0x83 +#define VID_NOTIFY_PREV_OUT 0x84 #define VID_NOTIFY_CYCLE_BRN 0x85 #define VID_NOTIFY_INC_BRN 0x86 #define VID_NOTIFY_DEC_BRN 0x87 #define VID_NOTIFY_ZERO_BRN 0x88 +#define VID_NOTIFY_DISP_OFF 0x89 /* _DOS (Enable/Disable Output Switching) argument bits */ #define DOS_SWITCH_MASK 3 @@ -175,6 +192,9 @@ static devclass_t acpi_video_devclass; DRIVER_MODULE(acpi_video, vgapci, acpi_video_driver, acpi_video_devclass, acpi_video_modevent, NULL); MODULE_DEPEND(acpi_video, acpi, 1, 1, 1); +#ifdef EVDEV_SUPPORT +MODULE_DEPEND(acpi_video, evdev, 1, 1, 1); +#endif static struct sysctl_ctx_list acpi_video_sysctl_ctx; static struct sysctl_oid *acpi_video_sysctl_tree; @@ -190,6 +210,45 @@ ACPI_SERIAL_DECL(video, "ACPI video"); ACPI_SERIAL_DECL(video_output, "ACPI video output"); static MALLOC_DEFINE(M_ACPIVIDEO, "acpivideo", "ACPI video extension"); +#ifdef EVDEV_SUPPORT +static const struct { + UINT32 notify; + uint16_t key; +} acpi_video_evdev_map[] = { + { VID_NOTIFY_SWITCHED, KEY_SWITCHVIDEOMODE }, + { VID_NOTIFY_REPROBE, KEY_SWITCHVIDEOMODE }, + { VID_NOTIFY_CYCLE_OUT, KEY_SWITCHVIDEOMODE }, + { VID_NOTIFY_NEXT_OUT, KEY_VIDEO_NEXT }, + { VID_NOTIFY_PREV_OUT, KEY_VIDEO_PREV }, + { VID_NOTIFY_CYCLE_BRN, KEY_BRIGHTNESS_CYCLE }, + { VID_NOTIFY_INC_BRN, KEY_BRIGHTNESSUP }, + { VID_NOTIFY_DEC_BRN, KEY_BRIGHTNESSDOWN }, + { VID_NOTIFY_ZERO_BRN, KEY_BRIGHTNESS_ZERO }, + { VID_NOTIFY_DISP_OFF, KEY_DISPLAY_OFF }, +}; + +static void +acpi_video_push_evdev_event(struct evdev_dev *evdev, UINT32 notify) +{ + int i; + uint16_t key; + + /* Do not allow to execute 2 instances this routine concurently */ + ACPI_SERIAL_ASSERT(video_output); + + for (i = 0; i < nitems(acpi_video_evdev_map); i++) { + if (acpi_video_evdev_map[i].notify == notify) { + key = acpi_video_evdev_map[i].key; + evdev_push_key(evdev, key, 1); + evdev_sync(evdev); + evdev_push_key(evdev, key, 0); + evdev_sync(evdev); + break; + } + } +} +#endif + static int acpi_video_modevent(struct module *mod __unused, int evt, void *cookie __unused) { @@ -247,12 +306,30 @@ acpi_video_attach(device_t dev) { struct acpi_softc *acpi_sc; struct acpi_video_softc *sc; +#ifdef EVDEV_SUPPORT + int i; +#endif sc = device_get_softc(dev); acpi_sc = devclass_get_softc(devclass_find("acpi"), 0); if (acpi_sc == NULL) return (ENXIO); + +#ifdef EVDEV_SUPPORT + sc->evdev = evdev_alloc(); + evdev_set_name(sc->evdev, device_get_desc(dev)); + evdev_set_phys(sc->evdev, device_get_nameunit(dev)); + evdev_set_id(sc->evdev, BUS_HOST, 0, 0, 1); + evdev_support_event(sc->evdev, EV_SYN); + evdev_support_event(sc->evdev, EV_KEY); + for (i = 0; i < nitems(acpi_video_evdev_map); i++) + evdev_support_key(sc->evdev, acpi_video_evdev_map[i].key); + + if (evdev_register(sc->evdev) != 0) + return (ENXIO); +#endif + ACPI_SERIAL_BEGIN(video); if (acpi_video_sysctl_tree == NULL) { acpi_video_sysctl_tree = SYSCTL_ADD_NODE(&acpi_video_sysctl_ctx, @@ -306,6 +383,10 @@ acpi_video_detach(device_t dev) } ACPI_SERIAL_END(video); +#ifdef EVDEV_SUPPORT + evdev_free(sc->evdev); +#endif + return (0); } @@ -404,12 +485,21 @@ acpi_video_notify_handler(ACPI_HANDLE handle, UINT32 n } ACPI_SERIAL_END(video); break; + /* Next events should not appear if DOS_SWITCH_BY_OSPM policy is set */ + case VID_NOTIFY_CYCLE_OUT: + case VID_NOTIFY_NEXT_OUT: + case VID_NOTIFY_PREV_OUT: default: device_printf(sc->device, "unknown notify event 0x%x\n", notify); } AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_video_invoke_event_handler, (void *)(uintptr_t)notify); +#ifdef EVDEV_SUPPORT + ACPI_SERIAL_BEGIN(video_output); + acpi_video_push_evdev_event(sc->evdev, notify); + ACPI_SERIAL_END(video_output); +#endif } static void @@ -454,6 +544,9 @@ acpi_video_bind_outputs_subr(ACPI_HANDLE handle, UINT3 } vo = acpi_video_vo_init(adr); if (vo != NULL) { +#ifdef EVDEV_SUPPORT + vo->evdev = sc->evdev; +#endif acpi_video_vo_bind(vo, handle); STAILQ_INSERT_TAIL(&sc->vid_outputs, vo, vo_next); } @@ -708,6 +801,7 @@ acpi_video_vo_notify_handler(ACPI_HANDLE handle, UINT3 case VID_NOTIFY_INC_BRN: case VID_NOTIFY_DEC_BRN: case VID_NOTIFY_ZERO_BRN: + case VID_NOTIFY_DISP_OFF: if (vo->vo_levels == NULL) goto out; level = vo_get_brightness(vo); @@ -757,6 +851,9 @@ acpi_video_vo_notify_handler(ACPI_HANDLE handle, UINT3 vo_set_brightness(vo, new_level); vo->vo_brightness = new_level; } +#ifdef EVDEV_SUPPORT + acpi_video_push_evdev_event(vo->evdev, notify); +#endif out: ACPI_SERIAL_END(video_output); From owner-svn-src-head@freebsd.org Sat Oct 31 20:26:10 2020 Return-Path: Delivered-To: svn-src-head@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 80FE3455B38; Sat, 31 Oct 2020 20:26:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNrKt2S7Nz3fy7; Sat, 31 Oct 2020 20:26:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 32A071C518; Sat, 31 Oct 2020 20:26:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 288CC27C0054; Sat, 31 Oct 2020 16:26:10 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Sat, 31 Oct 2020 16:26:10 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleejgddufeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id EB798C200A5; Sat, 31 Oct 2020 16:26:09 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <202010311907.09VJ7WcY036325@repo.freebsd.org> <7b9e157c-9b8e-4a0e-b3f6-38edbfebf005@www.fastmail.com> Date: Sat, 31 Oct 2020 15:25:49 -0500 From: "Brandon Bergren" To: "Mateusz Guzik" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: =?UTF-8?Q?Re:_svn_commit:_r367229_-_in_head/sys/contrib/openzfs:_include?= =?UTF-8?Q?/sys/zstd_module/zstd?= Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 20:26:10 -0000 Actually, looking at it again, it looks like the spl header is doing it wrong and not providing a fallback for atomic_sub_64, it's just defining it to atomic_subtract_64 and assuming that exists. On Sat, Oct 31, 2020, at 3:23 PM, Mateusz Guzik wrote: > Yep, jenkins told me. Working on it. > > On 10/31/20, Brandon Bergren wrote: > > This doesn't compile on platforms such as powerpc without pulling in the > > opensolaris atomics header from the spl that does locking emulation of 64 > > bit atomics, as platforms that don't have native 64 bit atomics do not > > provide them in the system header. From owner-svn-src-head@freebsd.org Sat Oct 31 20:28:14 2020 Return-Path: Delivered-To: svn-src-head@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 AD6A7455BED; Sat, 31 Oct 2020 20:28:14 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNrNG34m0z3gF4; Sat, 31 Oct 2020 20:28:14 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E001D235; Sat, 31 Oct 2020 20:28:14 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VKSEBC085311; Sat, 31 Oct 2020 20:28:14 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VKSExN085310; Sat, 31 Oct 2020 20:28:14 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202010312028.09VKSExN085310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 31 Oct 2020 20:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367234 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 367234 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 20:28:14 -0000 Author: wulf Date: Sat Oct 31 20:28:13 2020 New Revision: 367234 URL: https://svnweb.freebsd.org/changeset/base/367234 Log: acpi_video(4): Put display device in to D3 state on "Display off" event. As required by ACPI specs 6.3, appendix A.6, table B-8. Modified: head/sys/dev/acpica/acpi_video.c Modified: head/sys/dev/acpica/acpi_video.c ============================================================================== --- head/sys/dev/acpica/acpi_video.c Sat Oct 31 20:25:55 2020 (r367233) +++ head/sys/dev/acpica/acpi_video.c Sat Oct 31 20:28:13 2020 (r367234) @@ -846,6 +846,9 @@ acpi_video_vo_notify_handler(ACPI_HANDLE handle, UINT3 break; } break; + case VID_NOTIFY_DISP_OFF: + acpi_pwr_switch_consumer(handle, ACPI_STATE_D3); + break; } if (new_level != level) { vo_set_brightness(vo, new_level); From owner-svn-src-head@freebsd.org Sat Oct 31 20:33:38 2020 Return-Path: Delivered-To: svn-src-head@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 D20DD455ADC; Sat, 31 Oct 2020 20:33:38 +0000 (UTC) (envelope-from bdragon@imap.cc) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNrVV3WB7z3gml; Sat, 31 Oct 2020 20:33:38 +0000 (UTC) (envelope-from bdragon@imap.cc) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id BD2615C0078; Sat, 31 Oct 2020 16:33:37 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute5.internal (MEProxy); Sat, 31 Oct 2020 16:33:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imap.cc; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=eM9CJ8VIiSrtQ2sWD3YDd+X7JK0PvwE MEXkEY9LHBi0=; b=GadV1F/HWxikLzeb31EC5j7AsWnmu+hr3cULsgiKvXfO9IM HNDPEW702TTzm+IJWhBg5wFrcZZ0LlW6UyvC+yojQ/9jtYtzrwMHwJe+DHj4EY7F dTD4fOKo2bAL8yoC92jipP1a7s8/xgFNOs08p/s1Kw6C/oHkrXuMhfWpGoI0/5Qg sosMSOUVmxRd/z1z6DJHXlWI1FB5h6VMYtbUfxGQJOpPDPvV6Mr/zOFjf31m/dqv wObWo5M6dfHnDTH4Y+/NWrjofKhgqVdWr/AXIy0jBJcef+OCOP9mmUQPhIy7xMrH 0sqJz+p2yULKCakIr/Mp9y9XRE+EDG+ql63A9Pg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=eM9CJ8 VIiSrtQ2sWD3YDd+X7JK0PvwEMEXkEY9LHBi0=; b=JAcAn4fACoOukcoRcXqlDG yAuXbAX1OAbvaZlZyPLfoE/oItcxfLfuysC99cy+avBLZZ8qQoUqTtXIMis1ob3r GXLTsCjimTQ0T6KX34mrG/TZp5XqRQInZxdXXs7A7BdiJj9MwQS4ZfbeynFF0QAB Z5or2m09CnQ5qWayr6P5g9UfDhs0RNCns5RLAJooolS7Qm3eU5rbbDNuqDgeIXgI YVFjmYV6kjZHTdswyre08ifJkkjWp3Lsei7aamsp0LsqfFU1JrvyKm1Xjv8+oMjI ++q5QNT729ZG+a01EQ/dL7dhMMfTqVGY78zsuqNl6BhBTzu3BKPyw+hppPCVDHpQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleejgddufeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh esihhmrghprdgttgeqnecuggftrfgrthhtvghrnhepfeejgffgkeeitdeitdeuheevkeeh feejheetgedvgffhgffhvdfhvedvkeefhfdvnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhesihhmrghprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 45DA2C200A5; Sat, 31 Oct 2020 16:33:37 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35 Mime-Version: 1.0 Message-Id: <540675c8-35bb-40a7-b947-73f31a72bff2@www.fastmail.com> In-Reply-To: References: <202010311907.09VJ7WcY036325@repo.freebsd.org> <7b9e157c-9b8e-4a0e-b3f6-38edbfebf005@www.fastmail.com> Date: Sat, 31 Oct 2020 15:33:17 -0500 From: "Brandon Bergren" To: "Brandon Bergren" , "Mateusz Guzik" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: =?UTF-8?Q?Re:_svn_commit:_r367229_-_in_head/sys/contrib/openzfs:_include?= =?UTF-8?Q?/sys/zstd_module/zstd?= Content-Type: text/plain X-Rspamd-Queue-Id: 4CNrVV3WB7z3gml X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 20:33:38 -0000 Maybe this is it?: Index: sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h =================================================================== --- sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h (revision 367230) +++ sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h (working copy) @@ -188,6 +188,8 @@ */ #undef atomic_add_64 #define atomic_add_64(ptr, val) *(ptr) += val +#undef atomic_sub_64 +#define atomic_sub_64(ptr, val) *(ptr) -= val #endif /* !_STANDALONE */ #endif /* !_OPENSOLARIS_SYS_ATOMIC_H_ */ Note that there is also another build failure in the tree at the moment. On Sat, Oct 31, 2020, at 3:25 PM, Brandon Bergren wrote: > Actually, looking at it again, it looks like the spl header is doing it > wrong and not providing a fallback for atomic_sub_64, it's just > defining it to atomic_subtract_64 and assuming that exists. > > On Sat, Oct 31, 2020, at 3:23 PM, Mateusz Guzik wrote: > > Yep, jenkins told me. Working on it. > > > > On 10/31/20, Brandon Bergren wrote: > > > This doesn't compile on platforms such as powerpc without pulling in the > > > opensolaris atomics header from the spl that does locking emulation of 64 > > > bit atomics, as platforms that don't have native 64 bit atomics do not > > > provide them in the system header. > -- Brandon Bergren bdragon@imap.cc From owner-svn-src-head@freebsd.org Sat Oct 31 20:37:51 2020 Return-Path: Delivered-To: svn-src-head@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 5C12E456265; Sat, 31 Oct 2020 20:37:51 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNrbM1p0cz3xZh; Sat, 31 Oct 2020 20:37:51 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 00A921C99A; Sat, 31 Oct 2020 20:37:50 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id DF4E727C0054; Sat, 31 Oct 2020 16:37:50 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Sat, 31 Oct 2020 16:37:50 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleejgddugedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 93098C200A5; Sat, 31 Oct 2020 16:37:50 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35 Mime-Version: 1.0 Message-Id: In-Reply-To: <540675c8-35bb-40a7-b947-73f31a72bff2@www.fastmail.com> References: <202010311907.09VJ7WcY036325@repo.freebsd.org> <7b9e157c-9b8e-4a0e-b3f6-38edbfebf005@www.fastmail.com> <540675c8-35bb-40a7-b947-73f31a72bff2@www.fastmail.com> Date: Sat, 31 Oct 2020 15:37:30 -0500 From: "Brandon Bergren" To: "Brandon Bergren" , "Mateusz Guzik" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: =?UTF-8?Q?Re:_svn_commit:_r367229_-_in_head/sys/contrib/openzfs:_include?= =?UTF-8?Q?/sys/zstd_module/zstd?= Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 20:37:51 -0000 Yeah, that is what was happening. The minimal implementation needed for libsa was missing. On Sat, Oct 31, 2020, at 3:33 PM, Brandon Bergren wrote: > Maybe this is it?: > > Index: sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h > =================================================================== > --- sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h (revision 367230) > +++ sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h (working copy) > @@ -188,6 +188,8 @@ > */ > #undef atomic_add_64 > #define atomic_add_64(ptr, val) *(ptr) += val > +#undef atomic_sub_64 > +#define atomic_sub_64(ptr, val) *(ptr) -= val > #endif /* !_STANDALONE */ > > #endif /* !_OPENSOLARIS_SYS_ATOMIC_H_ */ > > > Note that there is also another build failure in the tree at the moment. > > On Sat, Oct 31, 2020, at 3:25 PM, Brandon Bergren wrote: > > Actually, looking at it again, it looks like the spl header is doing it > > wrong and not providing a fallback for atomic_sub_64, it's just > > defining it to atomic_subtract_64 and assuming that exists. > > > > On Sat, Oct 31, 2020, at 3:23 PM, Mateusz Guzik wrote: > > > Yep, jenkins told me. Working on it. > > > > > > On 10/31/20, Brandon Bergren wrote: > > > > This doesn't compile on platforms such as powerpc without pulling in the > > > > opensolaris atomics header from the spl that does locking emulation of 64 > > > > bit atomics, as platforms that don't have native 64 bit atomics do not > > > > provide them in the system header. > > > > -- > Brandon Bergren > bdragon@imap.cc > -- Brandon Bergren bdragon@FreeBSD.org From owner-svn-src-head@freebsd.org Sat Oct 31 20:57:12 2020 Return-Path: Delivered-To: svn-src-head@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 CF0BA4567C9; Sat, 31 Oct 2020 20:57:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNs1h3cwPz3yZK; Sat, 31 Oct 2020 20:57:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x434.google.com with SMTP id x7so10188572wrl.3; Sat, 31 Oct 2020 13:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VoaopnFWGuziRYsB8y1pt5mGALVOeaXu1YSdaMTQX6Q=; b=T6pulWlkZ4Xj73tB/WFpzWRAbSxAjNmcldWYo+07yFmFk78CBUTzoMt52xR3vkf/S2 /8jz5WD+gBdDZ8PzhExX1LS4d+5Z33EJGMtWe0kYH1vmLvrQC9mNGdVYXXZcD6W5wNPO 80OP+HO+5aL9OPxcKv2eHn3ou2L0uICUY35uVzCcP+uTJxWRccfjVSl5u+TjyZCTQAYA V3u6dcW8YkD73oy7TtL67MF7dPjNZ1Cbiljk0nzDH5d7d9XKekW0aesPPOuP/g5Vxgjw tVlzizyduhY4ZwymJw00DMUEteYSPGTq0/RKaRgZw55ldjFjf3AFDSD0D7URpvld3APh hL6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VoaopnFWGuziRYsB8y1pt5mGALVOeaXu1YSdaMTQX6Q=; b=UPYtpo9Of/xNkrldukVuvxVRK7ISw2GlnT/J3PWuQlLARBiDqDYPHiZ1uvsOoYIJre qBk8tq0ZfzNX7dYihHhFLos8cLM8W4Q9PPCuJsDD9g3J1SBV/z7K+AMeBuacrKtnKisr zEtDTvTI5ZVQ7YZQ23q12uUdUYXM5h1EW7ymNI8UW3JFdpRMtess1eGlrHmB22mfDqsK ipwoS5VPU2eRIavpRI5c6cX1Dk0KWrMmKn/l3zWwot6PR9yMbnffHhYhOxMRcwHxzu6V wZr8Iqoa8QN44GjL67IdOGqAvKOhir+X3PsH+zUxIHMuTRvrnFiPuovkLC1QTbvZ1W56 nBXA== X-Gm-Message-State: AOAM530p5kHUzhv4RAkRjTr2K6cnIfXo3LOelJ1z7fedLnq9wvsdzkPI NJEB/FaSool8MzDHhk3so+ZlWjAqG9XQRTS3DOhwe9OhCR8= X-Google-Smtp-Source: ABdhPJyCnQ0j7BLmbgFYsM9DbxJ/7Dq7gFnpGwi7Y1Nfm8mcNHF09/zof8ZYJFAnHSnLT0MuVDXu49YMao9uyqZBVIQ= X-Received: by 2002:a5d:4cd1:: with SMTP id c17mr11297229wrt.109.1604177830150; Sat, 31 Oct 2020 13:57:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:4c4f:0:0:0:0:0 with HTTP; Sat, 31 Oct 2020 13:57:09 -0700 (PDT) In-Reply-To: References: <202010311907.09VJ7WcY036325@repo.freebsd.org> <7b9e157c-9b8e-4a0e-b3f6-38edbfebf005@www.fastmail.com> <540675c8-35bb-40a7-b947-73f31a72bff2@www.fastmail.com> From: Mateusz Guzik Date: Sat, 31 Oct 2020 21:57:09 +0100 Message-ID: Subject: Re: svn commit: r367229 - in head/sys/contrib/openzfs: include/sys/zstd module/zstd To: Brandon Bergren Cc: Brandon Bergren , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CNs1h3cwPz3yZK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 20:57:12 -0000 I agree. Please commit. On 10/31/20, Brandon Bergren wrote: > Yeah, that is what was happening. The minimal implementation needed for > libsa was missing. > > On Sat, Oct 31, 2020, at 3:33 PM, Brandon Bergren wrote: >> Maybe this is it?: >> >> Index: sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h >> =================================================================== >> --- sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h (revision >> 367230) >> +++ sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h (working >> copy) >> @@ -188,6 +188,8 @@ >> */ >> #undef atomic_add_64 >> #define atomic_add_64(ptr, val) *(ptr) += val >> +#undef atomic_sub_64 >> +#define atomic_sub_64(ptr, val) *(ptr) -= val >> #endif /* !_STANDALONE */ >> >> #endif /* !_OPENSOLARIS_SYS_ATOMIC_H_ */ >> >> >> Note that there is also another build failure in the tree at the moment. >> >> On Sat, Oct 31, 2020, at 3:25 PM, Brandon Bergren wrote: >> > Actually, looking at it again, it looks like the spl header is doing it >> > >> > wrong and not providing a fallback for atomic_sub_64, it's just >> > defining it to atomic_subtract_64 and assuming that exists. >> > >> > On Sat, Oct 31, 2020, at 3:23 PM, Mateusz Guzik wrote: >> > > Yep, jenkins told me. Working on it. >> > > >> > > On 10/31/20, Brandon Bergren wrote: >> > > > This doesn't compile on platforms such as powerpc without pulling in >> > > > the >> > > > opensolaris atomics header from the spl that does locking emulation >> > > > of 64 >> > > > bit atomics, as platforms that don't have native 64 bit atomics do >> > > > not >> > > > provide them in the system header. >> > >> >> -- >> Brandon Bergren >> bdragon@imap.cc >> > > -- > Brandon Bergren > bdragon@FreeBSD.org > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sat Oct 31 21:11:35 2020 Return-Path: Delivered-To: svn-src-head@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 035B5456B83; Sat, 31 Oct 2020 21:11:35 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNsLG6NC6z40Bb; Sat, 31 Oct 2020 21:11:34 +0000 (UTC) (envelope-from bdragon@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 BE949DA1E; Sat, 31 Oct 2020 21:11:34 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VLBY8d012719; Sat, 31 Oct 2020 21:11:34 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VLBY8b012718; Sat, 31 Oct 2020 21:11:34 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202010312111.09VLBY8b012718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Sat, 31 Oct 2020 21:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367235 - head/sys/contrib/openzfs/include/os/freebsd/spl/sys X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/contrib/openzfs/include/os/freebsd/spl/sys X-SVN-Commit-Revision: 367235 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 21:11:35 -0000 Author: bdragon Date: Sat Oct 31 21:11:34 2020 New Revision: 367235 URL: https://svnweb.freebsd.org/changeset/base/367235 Log: Fix 32-bit build after r367229. The use of atomic_sub_64() in zfs_zstd.c was breaking the 32-bit build on platforms without native 64-bit atomics due to atomic_sub_64() not being available, and no fallback being provided in _STANDALONE. Provide a standalone stub to match atomic_add_64() using simple math. While this is not actually atomic, it does not matter in libsa context, since it always runs single-threaded and does not run under a scheduler. Reviewed by: mjg (in email) Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h ============================================================================== --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h Sat Oct 31 20:28:13 2020 (r367234) +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h Sat Oct 31 21:11:34 2020 (r367235) @@ -188,6 +188,8 @@ atomic_cas_ptr(volatile void *target, void *cmp, void */ #undef atomic_add_64 #define atomic_add_64(ptr, val) *(ptr) += val +#undef atomic_sub_64 +#define atomic_sub_64(ptr, val) *(ptr) -= val #endif /* !_STANDALONE */ #endif /* !_OPENSOLARIS_SYS_ATOMIC_H_ */ From owner-svn-src-head@freebsd.org Sat Oct 31 21:31:14 2020 Return-Path: Delivered-To: svn-src-head@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 CB5BD456A52; Sat, 31 Oct 2020 21:31:14 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNsmy4Yj5z40ty; Sat, 31 Oct 2020 21:31:14 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 795211CFA7; Sat, 31 Oct 2020 21:31:14 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 1A1BA27C0054; Sat, 31 Oct 2020 17:31:14 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Sat, 31 Oct 2020 17:31:14 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleejgdduheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne fuohhrthgvugcurhgvtghiphhsucdlgedtmdenfghrlhcuvffnffculddutddmnecujfgu rhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdeurhgrnhguoh hnuceuvghrghhrvghnfdcuoegsughrrghgohhnsefhrhgvvgeuufffrdhorhhgqeenucgg tffrrghtthgvrhhnpeehieeikeekffekleekleegtefgledttefghfduteeikeevfedvhf eggfffudejgfenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsughrrghgohhnodhmvghsmh htphgruhhthhhpvghrshhonhgrlhhithihqddutdegvdefheekieegqddukedutdekhedu qdgsughrrghgohhnpeephfhrvggvuefuffdrohhrghesihhmrghprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id AF908C200A5; Sat, 31 Oct 2020 17:31:13 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35 Mime-Version: 1.0 Message-Id: <47495073-df63-404d-8a3b-af2241e12f9b@www.fastmail.com> In-Reply-To: <4468e66d-2615-48a7-bdde-90f9a1266bda@www.fastmail.com> References: <202010311527.09VFRjNx098403@repo.freebsd.org> <4468e66d-2615-48a7-bdde-90f9a1266bda@www.fastmail.com> Date: Sat, 31 Oct 2020 16:30:53 -0500 From: "Brandon Bergren" To: "Brandon Bergren" , "Ed Maste" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: =?UTF-8?Q?Re:_svn_commit:_r367209_-_in_head:_contrib/elftoolchain/readel?= =?UTF-8?Q?f_usr.bin/readelf?= Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 21:31:14 -0000 On Sat, Oct 31, 2020, at 3:03 PM, Brandon Bergren wrote: > This appears to have broken the build on platforms with a 32 bit > size_t, given the current state of the tinderbox. > > On Sat, Oct 31, 2020, at 10:27 AM, Ed Maste wrote: > > Author: emaste > > Date: Sat Oct 31 15:27:45 2020 > > New Revision: 367209 > > URL: https://svnweb.freebsd.org/changeset/base/367209 > > > This seems more correct to me: It's not like it could have been larger than size_t anyway, since there is no way to malloc more than that anyway. Index: contrib/elftoolchain/readelf/readelf.c =================================================================== --- contrib/elftoolchain/readelf/readelf.c (revision 367230) +++ contrib/elftoolchain/readelf/readelf.c (working copy) @@ -6909,8 +6909,8 @@ * Returns true if sucessful, false otherwise. */ static bool decompress_section(struct section *s, - unsigned char *compressed_data_buffer, uint64_t compressed_size, - unsigned char **ret_buf, uint64_t *ret_sz) + unsigned char *compressed_data_buffer, size_t compressed_size, + unsigned char **ret_buf, size_t *ret_sz) { GElf_Shdr sh; From owner-svn-src-head@freebsd.org Sat Oct 31 21:53:24 2020 Return-Path: Delivered-To: svn-src-head@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 6559E457791; Sat, 31 Oct 2020 21:53:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNtGX21hhz41lk; Sat, 31 Oct 2020 21:53:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 28B70DD79; Sat, 31 Oct 2020 21:53:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VLrOYp039530; Sat, 31 Oct 2020 21:53:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VLrNrn039526; Sat, 31 Oct 2020 21:53:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202010312153.09VLrNrn039526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 31 Oct 2020 21:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367236 - in head: share/man/man4 sys/dev/usb sys/dev/usb/input X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/usb sys/dev/usb/input X-SVN-Commit-Revision: 367236 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 21:53:24 -0000 Author: hselasky Date: Sat Oct 31 21:53:23 2020 New Revision: 367236 URL: https://svnweb.freebsd.org/changeset/base/367236 Log: Implement the USB_GET_DEVICEINFO ioctl(2) for uhid(4). Submitted by: pedro martelletto MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/share/man/man4/uhid.4 head/sys/dev/usb/input/uhid.c head/sys/dev/usb/usb_generic.c head/sys/dev/usb/usb_generic.h Modified: head/share/man/man4/uhid.4 ============================================================================== --- head/share/man/man4/uhid.4 Sat Oct 31 21:11:34 2020 (r367235) +++ head/share/man/man4/uhid.4 Sat Oct 31 21:53:23 2020 (r367236) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2018 +.Dd Oct 31, 2020 .Dt UHID 4 .Os .Sh NAME @@ -131,6 +131,11 @@ and the .Va ugd_maxlen fields. This call may fail if the device does not support this feature. +.It Dv USB_GET_DEVICEINFO Pq Vt "struct usb_device_info" +Returns information about the device, like USB vendor ID and USB product ID. +This call will not issue any USB transactions. +Also refer to +.Xr ugen 4 . .El .Pp Use Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Sat Oct 31 21:11:34 2020 (r367235) +++ head/sys/dev/usb/input/uhid.c Sat Oct 31 21:53:23 2020 (r367236) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define USB_DEBUG_VAR uhid_debug #include @@ -144,11 +145,13 @@ static usb_fifo_cmd_t uhid_stop_write; static usb_fifo_open_t uhid_open; static usb_fifo_close_t uhid_close; static usb_fifo_ioctl_t uhid_ioctl; +static usb_fifo_ioctl_t uhid_ioctl_post; static struct usb_fifo_methods uhid_fifo_methods = { .f_open = &uhid_open, .f_close = &uhid_close, .f_ioctl = &uhid_ioctl, + .f_ioctl_post = &uhid_ioctl_post, .f_start_read = &uhid_start_read, .f_stop_read = &uhid_stop_read, .f_start_write = &uhid_start_write, @@ -642,6 +645,24 @@ uhid_ioctl(struct usb_fifo *fifo, u_long cmd, void *ad case USB_GET_REPORT_ID: *(int *)addr = 0; /* XXX: we only support reportid 0? */ + break; + + default: + error = ENOIOCTL; + break; + } + return (error); +} + +static int +uhid_ioctl_post(struct usb_fifo *fifo, u_long cmd, void *addr, + int fflags) +{ + int error; + + switch (cmd) { + case USB_GET_DEVICEINFO: + error = ugen_fill_deviceinfo(fifo, addr); break; default: Modified: head/sys/dev/usb/usb_generic.c ============================================================================== --- head/sys/dev/usb/usb_generic.c Sat Oct 31 21:11:34 2020 (r367235) +++ head/sys/dev/usb/usb_generic.c Sat Oct 31 21:53:23 2020 (r367236) @@ -109,8 +109,6 @@ static int ugen_set_interface(struct usb_fifo *, uint8 static int ugen_get_cdesc(struct usb_fifo *, struct usb_gen_descriptor *); static int ugen_get_sdesc(struct usb_fifo *, struct usb_gen_descriptor *); static int ugen_get_iface_driver(struct usb_fifo *f, struct usb_gen_descriptor *ugd); -static int usb_gen_fill_deviceinfo(struct usb_fifo *, - struct usb_device_info *); static int ugen_re_enumerate(struct usb_fifo *); static int ugen_iface_ioctl(struct usb_fifo *, u_long, void *, int); static uint8_t ugen_fs_get_complete(struct usb_fifo *, uint8_t *); @@ -814,7 +812,7 @@ ugen_get_iface_driver(struct usb_fifo *f, struct usb_g } /*------------------------------------------------------------------------* - * usb_gen_fill_deviceinfo + * ugen_fill_deviceinfo * * This function dumps information about an USB device to the * structure pointed to by the "di" argument. @@ -823,8 +821,8 @@ ugen_get_iface_driver(struct usb_fifo *f, struct usb_g * 0: Success * Else: Failure *------------------------------------------------------------------------*/ -static int -usb_gen_fill_deviceinfo(struct usb_fifo *f, struct usb_device_info *di) +int +ugen_fill_deviceinfo(struct usb_fifo *f, struct usb_device_info *di) { struct usb_device *udev; struct usb_device *hub; @@ -2205,7 +2203,7 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void * case USB_DEVICEINFO: case USB_GET_DEVICEINFO: - error = usb_gen_fill_deviceinfo(f, addr); + error = ugen_fill_deviceinfo(f, addr); break; case USB_DEVICESTATS: Modified: head/sys/dev/usb/usb_generic.h ============================================================================== --- head/sys/dev/usb/usb_generic.h Sat Oct 31 21:11:34 2020 (r367235) +++ head/sys/dev/usb/usb_generic.h Sat Oct 31 21:53:23 2020 (r367236) @@ -31,5 +31,6 @@ extern struct usb_fifo_methods usb_ugen_methods; int ugen_do_request(struct usb_fifo *f, struct usb_ctl_request *ur); +int ugen_fill_deviceinfo(struct usb_fifo *f, struct usb_device_info *di); #endif /* _USB_GENERIC_H_ */ From owner-svn-src-head@freebsd.org Sat Oct 31 21:56:47 2020 Return-Path: Delivered-To: svn-src-head@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 F330945789F for ; Sat, 31 Oct 2020 21:56:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNtLP6kkhz4230 for ; Sat, 31 Oct 2020 21:56:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x730.google.com with SMTP id a65so6094114qkg.13 for ; Sat, 31 Oct 2020 14:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sqAC1Qdcint626ftdfojnoAP2NTKomlvdtvgoNwulSA=; b=teAqngGSDeP0ev4vw35bZwYSPrPi3pxKurNyDmKeGpD5mk1ISOpJISex9akN5U1VhP hNFIMEx17J7bIRG8hJlgfuSAIE+Ja+9SvoxepPBOhWxUbeL+S2Mb6Bk/u+yYYTVHXd84 43YmjGAgeDtNv07PynsF7MhYC636XyQiiJNahBsNXt0CM9niPG+qASijhgHJ6DaylvDK ephRP94/Kw0o75Hl1kofyonY0NghCCFgC8TL7+lcfeRN3XzYtBPkjcvt07Hh9jI8Q4sq 1QPjNL7H5Pe7CN477aGWOusvoaQmr86+XoRhF08hjvGHdXWspvJV3GnEeTdB7vjCVrSv q3rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sqAC1Qdcint626ftdfojnoAP2NTKomlvdtvgoNwulSA=; b=QmR94JUwf/HLQ985AAjuz4zeQyvybdmCLQVL1rIHy9R2E4Nwq/0LLATPdz/U4TZjIt 1IjXA/Tu453T2Z8vH4Soxqje5c7sz+Me1MH4QMmxgQgNbedwoqYaQhqw8nYPVyO/Nx3O YWuPVv3huaJ5OV9KaxM9gnzIKZY35HSG4XPcnNdznu3QBaoAFm5yO6z946pzJUJT7qxB nAfQsq5rFVvTTIlhQOpImEXzkvYRKXahHD8ENNH8Kfab8HVK8fi/kUlf0zz7E1dBapuX L7qelpZgonahhpP5lM+JkwUmdSDIB58s+LfshzBQxo1ubGFsoZdrFYobyqriHMcXAW+g uAPw== X-Gm-Message-State: AOAM530Ucbweq4jOCOzokLzepKCVHG11sOjg49urcUxOCZUFniG6lr/d G3zh6FTWOasRpjWwz3GeBk7VFObZoPRmLt1qzVmouQ== X-Google-Smtp-Source: ABdhPJxZWmcYnjzbrrgiMUecD1Jg6PWD7ToCzH9s43sddQyWIHjvCPHQCnJ3mvOnIsIrtwiYaOcEfwnONGDNS+vdCEo= X-Received: by 2002:a05:620a:15cc:: with SMTP id o12mr8606561qkm.356.1604181404605; Sat, 31 Oct 2020 14:56:44 -0700 (PDT) MIME-Version: 1.0 References: <202010311907.09VJ7WcY036325@repo.freebsd.org> <7b9e157c-9b8e-4a0e-b3f6-38edbfebf005@www.fastmail.com> <540675c8-35bb-40a7-b947-73f31a72bff2@www.fastmail.com> In-Reply-To: From: Warner Losh Date: Sat, 31 Oct 2020 15:56:33 -0600 Message-ID: Subject: Re: svn commit: r367229 - in head/sys/contrib/openzfs: include/sys/zstd module/zstd To: Mateusz Guzik Cc: Brandon Bergren , Brandon Bergren , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4CNtLP6kkhz4230 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=teAqngGS; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::730) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.91 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.83)[-0.835]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_HAM_LONG(-0.98)[-0.980]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.10)[-0.096]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::730:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; FREEMAIL_CC(0.00)[freebsd.org,imap.cc] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 21:56:47 -0000 Go for it. Warner On Sat, Oct 31, 2020, 2:57 PM Mateusz Guzik wrote: > I agree. Please commit. > > On 10/31/20, Brandon Bergren wrote: > > Yeah, that is what was happening. The minimal implementation needed for > > libsa was missing. > > > > On Sat, Oct 31, 2020, at 3:33 PM, Brandon Bergren wrote: > >> Maybe this is it?: > >> > >> Index: sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h > >> =================================================================== > >> --- sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h (revision > >> 367230) > >> +++ sys/contrib/openzfs/include/os/freebsd/spl/sys/atomic.h (working > >> copy) > >> @@ -188,6 +188,8 @@ > >> */ > >> #undef atomic_add_64 > >> #define atomic_add_64(ptr, val) *(ptr) += val > >> +#undef atomic_sub_64 > >> +#define atomic_sub_64(ptr, val) *(ptr) -= val > >> #endif /* !_STANDALONE */ > >> > >> #endif /* !_OPENSOLARIS_SYS_ATOMIC_H_ */ > >> > >> > >> Note that there is also another build failure in the tree at the moment. > >> > >> On Sat, Oct 31, 2020, at 3:25 PM, Brandon Bergren wrote: > >> > Actually, looking at it again, it looks like the spl header is doing > it > >> > > >> > wrong and not providing a fallback for atomic_sub_64, it's just > >> > defining it to atomic_subtract_64 and assuming that exists. > >> > > >> > On Sat, Oct 31, 2020, at 3:23 PM, Mateusz Guzik wrote: > >> > > Yep, jenkins told me. Working on it. > >> > > > >> > > On 10/31/20, Brandon Bergren wrote: > >> > > > This doesn't compile on platforms such as powerpc without pulling > in > >> > > > the > >> > > > opensolaris atomics header from the spl that does locking > emulation > >> > > > of 64 > >> > > > bit atomics, as platforms that don't have native 64 bit atomics do > >> > > > not > >> > > > provide them in the system header. > >> > > >> > >> -- > >> Brandon Bergren > >> bdragon@imap.cc > >> > > > > -- > > Brandon Bergren > > bdragon@FreeBSD.org > > > > > -- > Mateusz Guzik > From owner-svn-src-head@freebsd.org Sat Oct 31 22:04:14 2020 Return-Path: Delivered-To: svn-src-head@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 8CD124576D9; Sat, 31 Oct 2020 22:04:14 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNtW238Bcz424Z; Sat, 31 Oct 2020 22:04:14 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50675E2CF; Sat, 31 Oct 2020 22:04:14 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VM4Efs046203; Sat, 31 Oct 2020 22:04:14 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VM4Ec3046202; Sat, 31 Oct 2020 22:04:14 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202010312204.09VM4Ec3046202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 31 Oct 2020 22:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367237 - head/sbin/devmatch X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sbin/devmatch X-SVN-Commit-Revision: 367237 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 22:04:14 -0000 Author: wulf Date: Sat Oct 31 22:04:13 2020 New Revision: 367237 URL: https://svnweb.freebsd.org/changeset/base/367237 Log: devmatch(8): Respect mask field when matching strings of Z type. While here, add debug output for this action. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26823 Modified: head/sbin/devmatch/devmatch.c Modified: head/sbin/devmatch/devmatch.c ============================================================================== --- head/sbin/devmatch/devmatch.c Sat Oct 31 21:53:23 2020 (r367236) +++ head/sbin/devmatch/devmatch.c Sat Oct 31 22:04:13 2020 (r367237) @@ -349,7 +349,12 @@ search_hints(const char *bus, const char *dev, const c } if (*cp == 'D') break; + if (bit >= 0 && ((1 << bit) & mask) == 0) + break; s = pnpval_as_str(cp + 2, pnpinfo); + if (verbose_flag) + printf("Matching %s (%c) table=%s tomatch=%s\n", + cp + 2, *cp, s, val1); if (strcmp(s, val1) != 0) notme++; break; From owner-svn-src-head@freebsd.org Sat Oct 31 22:14:37 2020 Return-Path: Delivered-To: svn-src-head@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 E1373457E09; Sat, 31 Oct 2020 22:14:37 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNtl15dSYz431g; Sat, 31 Oct 2020 22:14:37 +0000 (UTC) (envelope-from bdragon@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 A0E4AE811; Sat, 31 Oct 2020 22:14:37 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VMEbr5052310; Sat, 31 Oct 2020 22:14:37 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VMEbk0052308; Sat, 31 Oct 2020 22:14:37 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202010312214.09VMEbk0052308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Sat, 31 Oct 2020 22:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367238 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 367238 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 22:14:37 -0000 Author: bdragon Date: Sat Oct 31 22:14:37 2020 New Revision: 367238 URL: https://svnweb.freebsd.org/changeset/base/367238 Log: Fix 32-bit build after r367209 Fix build on systems with a 32-bit size_t. Since it's being passed as a pointer, a 64-bit write to it will overflow. MFC with: r367209 Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Sat Oct 31 22:04:13 2020 (r367237) +++ head/contrib/elftoolchain/readelf/readelf.c Sat Oct 31 22:14:37 2020 (r367238) @@ -6909,8 +6909,8 @@ get_symbol_value(struct readelf *re, int symtab, int i * Returns true if sucessful, false otherwise. */ static bool decompress_section(struct section *s, - unsigned char *compressed_data_buffer, uint64_t compressed_size, - unsigned char **ret_buf, uint64_t *ret_sz) + unsigned char *compressed_data_buffer, size_t compressed_size, + unsigned char **ret_buf, size_t *ret_sz) { GElf_Shdr sh; From owner-svn-src-head@freebsd.org Sat Oct 31 22:16:00 2020 Return-Path: Delivered-To: svn-src-head@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 4F157457B4E; Sat, 31 Oct 2020 22:16:00 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNtmc0vKmz43Jp; Sat, 31 Oct 2020 22:16:00 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0226CE4BD; Sat, 31 Oct 2020 22:16:00 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VMFxoX052420; Sat, 31 Oct 2020 22:15:59 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VMFx86052418; Sat, 31 Oct 2020 22:15:59 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202010312215.09VMFx86052418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 31 Oct 2020 22:15:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367239 - in head/sys/dev: acpica iicbus X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: in head/sys/dev: acpica iicbus X-SVN-Commit-Revision: 367239 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 22:16:00 -0000 Author: wulf Date: Sat Oct 31 22:15:59 2020 New Revision: 367239 URL: https://svnweb.freebsd.org/changeset/base/367239 Log: Add plug and play information macroses for ACPI and I2C buses. Matching table format is compatible with ACPI_ID_PROBE bus method. Note that while ACPI_ID_PROBE matches against _HID and all _CIDs, current acpi_pnpinfo_str() exports only _HID and first _CID. That means second and further _CIDs should be added to both acpi_pnpinfo_str() and ACPICOMPAT_PNP_INFO if device matching against them is required. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26824 Modified: head/sys/dev/acpica/acpivar.h head/sys/dev/iicbus/iicbus.h Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Sat Oct 31 22:14:37 2020 (r367238) +++ head/sys/dev/acpica/acpivar.h Sat Oct 31 22:15:59 2020 (r367239) @@ -232,6 +232,20 @@ extern int acpi_quirks; #define ACPI_Q_MADT_IRQ0 (1 << 2) /* + * Plug and play information for device matching. Matching table format + * is compatible with ids parameter of ACPI_ID_PROBE bus method. + * + * XXX: While ACPI_ID_PROBE matches against _HID and all _CIDs, current + * acpi_pnpinfo_str() exports only _HID and first _CID. That means second + * and further _CIDs should be added to both acpi_pnpinfo_str() and + * ACPICOMPAT_PNP_INFO if device matching against them is required. + */ +#define ACPICOMPAT_PNP_INFO(t, busname) \ + MODULE_PNP_INFO("Z:_HID", busname, t##hid, t, nitems(t)-1); \ + MODULE_PNP_INFO("Z:_CID", busname, t##cid, t, nitems(t)-1); +#define ACPI_PNP_INFO(t) ACPICOMPAT_PNP_INFO(t, acpi) + +/* * Note that the low ivar values are reserved to provide * interface compatibility with ISA drivers which can also * attach to ACPI. Modified: head/sys/dev/iicbus/iicbus.h ============================================================================== --- head/sys/dev/iicbus/iicbus.h Sat Oct 31 22:14:37 2020 (r367238) +++ head/sys/dev/iicbus/iicbus.h Sat Oct 31 22:15:59 2020 (r367239) @@ -77,6 +77,12 @@ IICBUS_ACCESSOR(addr, ADDR, uint32_t) #define IICBUS_FDT_PNP_INFO(t) #endif +#ifdef DEV_ACPI +#define IICBUS_ACPI_PNP_INFO(t) ACPICOMPAT_PNP_INFO(t, iicbus) +#else +#define IICBUS_ACPI_PNP_INFO(t) +#endif + int iicbus_generic_intr(device_t dev, int event, char *buf); void iicbus_init_frequency(device_t dev, u_int bus_freq); From owner-svn-src-head@freebsd.org Sat Oct 31 22:19:40 2020 Return-Path: Delivered-To: svn-src-head@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 50855457ACD; Sat, 31 Oct 2020 22:19:40 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNtrr1PSVz43Bk; Sat, 31 Oct 2020 22:19:40 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 131E0E6E4; Sat, 31 Oct 2020 22:19:40 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VMJdbv052691; Sat, 31 Oct 2020 22:19:39 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VMJdro052690; Sat, 31 Oct 2020 22:19:39 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202010312219.09VMJdro052690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 31 Oct 2020 22:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367240 - head/sys/dev/acpi_support X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/acpi_support X-SVN-Commit-Revision: 367240 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 22:19:40 -0000 Author: wulf Date: Sat Oct 31 22:19:39 2020 New Revision: 367240 URL: https://svnweb.freebsd.org/changeset/base/367240 Log: acpi_wmi(4): Add ACPI_PNP_INFO MFC after: 2 weeks Modified: head/sys/dev/acpi_support/acpi_wmi.c Modified: head/sys/dev/acpi_support/acpi_wmi.c ============================================================================== --- head/sys/dev/acpi_support/acpi_wmi.c Sat Oct 31 22:15:59 2020 (r367239) +++ head/sys/dev/acpi_support/acpi_wmi.c Sat Oct 31 22:19:39 2020 (r367240) @@ -201,6 +201,7 @@ DRIVER_MODULE(acpi_wmi, acpi, acpi_wmi_driver, acpi_wm MODULE_VERSION(acpi_wmi, 1); MODULE_DEPEND(acpi_wmi, acpi, 1, 1, 1); static char *wmi_ids[] = {"PNP0C14", NULL}; +ACPI_PNP_INFO(wmi_ids); /* * Probe for the PNP0C14 ACPI node From owner-svn-src-head@freebsd.org Sat Oct 31 22:20:43 2020 Return-Path: Delivered-To: svn-src-head@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 7F3A8457E7B; Sat, 31 Oct 2020 22:20:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNtt32Ymgz43Fr; Sat, 31 Oct 2020 22:20:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B32EE4BF; Sat, 31 Oct 2020 22:20:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VMKhUt052810; Sat, 31 Oct 2020 22:20:43 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VMKh2E052809; Sat, 31 Oct 2020 22:20:43 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202010312220.09VMKh2E052809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 31 Oct 2020 22:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367241 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 367241 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 22:20:43 -0000 Author: wulf Date: Sat Oct 31 22:20:42 2020 New Revision: 367241 URL: https://svnweb.freebsd.org/changeset/base/367241 Log: acpi_dock(4): Add ACPI_PNP_INFO MFC after: 2 weeks Modified: head/sys/dev/acpica/acpi_dock.c Modified: head/sys/dev/acpica/acpi_dock.c ============================================================================== --- head/sys/dev/acpica/acpi_dock.c Sat Oct 31 22:19:39 2020 (r367240) +++ head/sys/dev/acpica/acpi_dock.c Sat Oct 31 22:20:42 2020 (r367241) @@ -64,6 +64,8 @@ struct acpi_dock_softc { ACPI_SERIAL_DECL(dock, "ACPI Docking Station"); +static char *acpi_dock_pnp_ids[] = {"PNP0C15", NULL}; + /* * Utility functions */ @@ -545,3 +547,4 @@ static devclass_t acpi_dock_devclass; DRIVER_MODULE(acpi_dock, acpi, acpi_dock_driver, acpi_dock_devclass, 0, 0); MODULE_DEPEND(acpi_dock, acpi, 1, 1, 1); +ACPI_PNP_INFO(acpi_dock_pnp_ids); From owner-svn-src-head@freebsd.org Sat Oct 31 22:22:30 2020 Return-Path: Delivered-To: svn-src-head@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 9C3D8458201; Sat, 31 Oct 2020 22:22:30 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNtw63kTHz43tv; Sat, 31 Oct 2020 22:22:30 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 6164D1CBF4; Sat, 31 Oct 2020 22:22:30 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 4884C27C0054; Sat, 31 Oct 2020 18:22:30 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Sat, 31 Oct 2020 18:22:30 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleejgdduieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id AA66CC200A6; Sat, 31 Oct 2020 18:22:29 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35 Mime-Version: 1.0 Message-Id: <2ccbfa9e-9a28-41da-912d-66a3a6cdb031@www.fastmail.com> In-Reply-To: References: <202010311907.09VJ7WcY036325@repo.freebsd.org> <7b9e157c-9b8e-4a0e-b3f6-38edbfebf005@www.fastmail.com> <540675c8-35bb-40a7-b947-73f31a72bff2@www.fastmail.com> Date: Sat, 31 Oct 2020 17:22:10 -0500 From: "Brandon Bergren" To: "Warner Losh" , "Mateusz Guzik" Cc: "Brandon Bergren" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Ed Maste" Subject: =?UTF-8?Q?Re:_svn_commit:_r367229_-_in_head/sys/contrib/openzfs:_include?= =?UTF-8?Q?/sys/zstd_module/zstd?= Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 22:22:30 -0000 On Sat, Oct 31, 2020, at 4:56 PM, Warner Losh wrote: > Go for it. > > Warner > Done in r367235. I did an additional 32 bit build fix in r367238 (to readelf.c) that should fix the tree the rest of the way. (Could use a sanity check on that one fwiw, I have a vague suspicion that there should be some bounds checking there to deal with malicious files) From owner-svn-src-head@freebsd.org Sat Oct 31 23:48:42 2020 Return-Path: Delivered-To: svn-src-head@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 4119C45961E; Sat, 31 Oct 2020 23:48:42 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNwqZ13z9z47V5; Sat, 31 Oct 2020 23:48:42 +0000 (UTC) (envelope-from se@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 04B8DF1FF; Sat, 31 Oct 2020 23:48:42 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09VNmfBW009775; Sat, 31 Oct 2020 23:48:41 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09VNmfWN009773; Sat, 31 Oct 2020 23:48:41 GMT (envelope-from se@FreeBSD.org) Message-Id: <202010312348.09VNmfWN009773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 31 Oct 2020 23:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367243 - in head: lib/libc/gen sys/kern X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head: lib/libc/gen sys/kern X-SVN-Commit-Revision: 367243 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 23:48:42 -0000 Author: se Date: Sat Oct 31 23:48:41 2020 New Revision: 367243 URL: https://svnweb.freebsd.org/changeset/base/367243 Log: Make sysctl user.local a tunable that can be written at run-time This sysctl value had been provided as a read-only variable that is compiled into the C library based on the value of _PATH_LOCALBASE in paths.h. After this change, the value is compiled into the kernel as an empty string, which is translated to _PATH_LOCALBASE by the C library. This empty string can be overridden at boot time or by a privileged user at run time and will then be returned by sysctl. When set to an empty string, the value returned by sysctl reverts to _PATH_LOCALBASE. This update does not change the behavior on any system that does not modify the default value of user.localbase. I consider this change as experimental and would prefer if the run-time write permission was reconsidered and the sysctl variable defined with CLFLAG_RDTUN instead to restrict it to be set at boot time. MFC after: 1 month Modified: head/lib/libc/gen/sysctl.c head/sys/kern/kern_mib.c Modified: head/lib/libc/gen/sysctl.c ============================================================================== --- head/lib/libc/gen/sysctl.c Sat Oct 31 23:19:59 2020 (r367242) +++ head/lib/libc/gen/sysctl.c Sat Oct 31 23:48:41 2020 (r367243) @@ -68,14 +68,14 @@ sysctl(const int *name, u_int namelen, void *oldp, siz if (retval || name[0] != CTL_USER) return (retval); - if (newp != NULL) { - errno = EPERM; - return (-1); - } if (namelen != 2) { errno = EINVAL; return (-1); } + if (newp != NULL && name[1] != USER_LOCALBASE) { + errno = EPERM; + return (-1); + } switch (name[1]) { case USER_CS_PATH: @@ -88,13 +88,21 @@ sysctl(const int *name, u_int namelen, void *oldp, siz memmove(oldp, _PATH_STDPATH, sizeof(_PATH_STDPATH)); return (0); case USER_LOCALBASE: - if (oldp != NULL && orig_oldlen < sizeof(_PATH_LOCALBASE)) { - errno = ENOMEM; - return (-1); + if (oldlenp != NULL) { + if (oldp == NULL) { + if (*oldlenp == 1) + *oldlenp = sizeof(_PATH_LOCALBASE); + } else { + if (*oldlenp != 1) + return (retval); + if (orig_oldlen < sizeof(_PATH_LOCALBASE)) { + errno = ENOMEM; + return (-1); + } + *oldlenp = sizeof(_PATH_LOCALBASE); + memmove(oldp, _PATH_LOCALBASE, sizeof(_PATH_LOCALBASE)); + } } - *oldlenp = sizeof(_PATH_LOCALBASE); - if (oldp != NULL) - memmove(oldp, _PATH_LOCALBASE, sizeof(_PATH_LOCALBASE)); return (0); } Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Sat Oct 31 23:19:59 2020 (r367242) +++ head/sys/kern/kern_mib.c Sat Oct 31 23:48:41 2020 (r367243) @@ -652,8 +652,11 @@ SYSCTL_INT(_user, USER_STREAM_MAX, stream_max, CTLFLAG SYSCTL_NULL_INT_PTR, 0, "Min Maximum number of streams a process may have open at one time"); SYSCTL_INT(_user, USER_TZNAME_MAX, tzname_max, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, 0, "Min Maximum number of types supported for timezone names"); -SYSCTL_STRING(_user, USER_LOCALBASE, localbase, CTLFLAG_RD, - "", 0, "Prefix used to install and locate add-on packages"); + +static char localbase[MAXPATHLEN] = ""; + +SYSCTL_STRING(_user, USER_LOCALBASE, localbase, CTLFLAG_RWTUN, + localbase, sizeof(localbase), "Prefix used to install and locate add-on packages"); #include SYSCTL_INT(_debug_sizeof, OID_AUTO, vnode, CTLFLAG_RD,