svn commit: r335530 - stable/11/usr.sbin/service
Author: eadler Date: Fri Jun 22 04:54:51 2018 New Revision: 335530 URL: https://svnweb.freebsd.org/changeset/base/335530 Log: MFC r334472: service(1): Improve manual page * Sort options.. * Fix some typos. * Use one Bd macro for code blocks instead of a bunch of Dl * macros. * Improve formatting. * Clarify 'jail' argument PR: 228552 Modified: stable/11/usr.sbin/service/service.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/service/service.8 == --- stable/11/usr.sbin/service/service.8Fri Jun 22 03:40:03 2018 (r335529) +++ stable/11/usr.sbin/service/service.8Fri Jun 22 04:54:51 2018 (r335530) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2018 +.Dd May 31, 2018 .Dt SERVICE 8 .Os .Sh NAME @@ -32,19 +32,24 @@ .Nd "control (start/stop/etc.) or list system services" .Sh SYNOPSIS .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Fl e .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Fl R .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Op Fl v -.Fl l | r +.Fl l .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Op Fl v -.Ar start|stop|etc. +.Fl r +.Nm +.Op Fl j Ar jail +.Op Fl v +.Ar script +.Ar command .Sh DESCRIPTION The .Nm @@ -52,14 +57,16 @@ command is an easy interface to the rc.d system. Its primary purpose is to start and stop services provided by the rc.d scripts. When used for this purpose it will set the same restricted -environment that is in use at boot time (see below). +environment that is in use at boot time +.Po +see +.Sx ENVIRONMENT +.Pc . It can also be used to list the scripts using various criteria. .Pp The options are as follows: .Bl -tag -width F1 -.It Fl j Ao jail name or id Ac -Perform the given actions under the named jail. .It Fl e List services that are enabled. The list of scripts to check is compiled using @@ -70,8 +77,11 @@ then that list of scripts is checked for an .Qq rcvar assignment. If present the script is checked to see if it is enabled. -.It Fl R -Restart all enabled local services. +.It Fl j Ar jail +Perform the given actions under the named jail. +The +.Ar jail +argument can be either a jail ID or a jail name. .It Fl l List all files in .Pa /etc/rc.d @@ -88,8 +98,10 @@ Generate the as in .Fl e above, but list all of the files, not just what is enabled. +.It Fl R +Restart all enabled local services. .It Fl v -Be slightly more verbose +Be slightly more verbose. .El .Sh ENVIRONMENT When used to run rc.d scripts the @@ -111,21 +123,24 @@ at boot time. The following are examples of typical usage of the .Nm command: +.Bd -literal -offset -ident +service named status +service -j dns named status +service -rv +.Ed .Pp -.Dl "service named status" -.Dl "service -j dns named status" -.Dl "service -rv" -.Pp The following programmable completion entry can be use in .Xr bash 1 for the names of the rc.d scripts: -.Dl "_service () {" -.Dl " local cur" -.Dl " cur=${COMP_WORDS[COMP_CWORD]}" -.Dl " COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) )" -.Dl " return 0" -.Dl "}" -.Dl "complete -F _service service" +.Bd -literal -offset -ident +_service () { + local cur + cur=${COMP_WORDS[COMP_CWORD]} + COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) ) + return 0 +} +complete -F _service service +.Ed .Sh SEE ALSO .Xr bash 1 Pq Pa ports/shells/bash , .Xr rc.conf 5 , ___ 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-unsubscr...@freebsd.org"
svn commit: r335529 - head/usr.sbin/spi
Author: ian Date: Fri Jun 22 03:40:03 2018 New Revision: 335529 URL: https://svnweb.freebsd.org/changeset/base/335529 Log: Eliminate gcc "shadowed declaration" warnings by using idx rather than index as a variable name. Reported by: manu@ Modified: head/usr.sbin/spi/spi.c Modified: head/usr.sbin/spi/spi.c == --- head/usr.sbin/spi/spi.c Fri Jun 22 02:56:03 2018(r335528) +++ head/usr.sbin/spi/spi.c Fri Jun 22 03:40:03 2018(r335529) @@ -722,7 +722,7 @@ _read_write(int hdev, void *bufw, void *bufr, int cbrw static int _do_data_output(void *pr, struct spi_options *popt) { - int err, index, icount; + int err, idx, icount; const char *sz_bytes, *sz_byte2; const uint8_t *pbuf; @@ -758,8 +758,8 @@ _do_data_output(void *pr, struct spi_options *popt) sz_bytes); /* ASCII output */ - for (index = 0; !err && index < icount; index++) { - if (index) { + for (idx = 0; !err && idx < icount; idx++) { + if (idx) { /* * not the first time, insert separating space */ @@ -767,7 +767,7 @@ _do_data_output(void *pr, struct spi_options *popt) } if (!err) - err = fprintf(stdout, "%02hhx", pbuf[index]) < 0; + err = fprintf(stdout, "%02hhx", pbuf[idx]) < 0; } if (!err) @@ -902,7 +902,7 @@ static void verbose_dump_buffer(void *pbuf, int icount, int lsb) { uint8_t ch; - int ictr, ictr2, index; + int ictr, ictr2, idx; fputs("| 0 1 2 3 4 5 6 7 8 9 A B C D E F " "| |\n", stderr); @@ -911,10 +911,10 @@ verbose_dump_buffer(void *pbuf, int icount, int lsb) fprintf(stderr, " %6x | ", ictr & 0xf0); for (ictr2 = 0; ictr2 < 16; ictr2++) { - index = ictr + ictr2; + idx = ictr + ictr2; - if (index < icount) { - ch = ((uint8_t *) pbuf)[index]; + if (idx < icount) { + ch = ((uint8_t *) pbuf)[idx]; if (lsb) ch = reversebits[ch]; @@ -929,10 +929,10 @@ verbose_dump_buffer(void *pbuf, int icount, int lsb) fputs("| ", stderr); for (ictr2 = 0; ictr2 < 16; ictr2++) { - index = ictr + ictr2; + idx = ictr + ictr2; - if (index < icount) { - ch = ((uint8_t *) pbuf)[index]; + if (idx < icount) { + ch = ((uint8_t *) pbuf)[idx]; if (lsb) ch = reversebits[ch]; @@ -942,7 +942,7 @@ verbose_dump_buffer(void *pbuf, int icount, int lsb) fprintf(stderr, "%c", ch); } - else if (index < icount) { + else if (idx < icount) { out_of_range: fputc('.', stderr); } ___ 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-unsubscr...@freebsd.org"
svn commit: r335528 - head/tests/sys/audit
Author: asomers Date: Fri Jun 22 02:56:03 2018 New Revision: 335528 URL: https://svnweb.freebsd.org/changeset/base/335528 Log: audit(4): add tests for Sys V semaphore operations Submitted by: aniketp MFC after:2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision:https://reviews.freebsd.org/D15897 Modified: head/tests/sys/audit/inter-process.c Modified: head/tests/sys/audit/inter-process.c == --- head/tests/sys/audit/inter-process.cFri Jun 22 01:59:19 2018 (r335527) +++ head/tests/sys/audit/inter-process.cFri Jun 22 02:56:03 2018 (r335528) @@ -30,6 +30,8 @@ #include #include #include +#define _WANT_SEMUN +#include #include #include @@ -45,13 +47,17 @@ struct msgstr { }; typedef struct msgstr msgstr_t; + static pid_t pid; -static int msqid, shmid; +static int msqid, shmid, semid; +static union semun semarg; static struct pollfd fds[1]; static struct msqid_ds msgbuff; static struct shmid_ds shmbuff; +static struct semid_ds sembuff; static char ipcregex[BUFFSIZE]; static const char *auclass = "ip"; +static unsigned short semvals[BUFFSIZE]; ATF_TC_WITH_CLEANUP(msgget_success); @@ -729,6 +735,669 @@ ATF_TC_CLEANUP(shmctl_illegal_command, tc) } +ATF_TC_WITH_CLEANUP(semget_success); +ATF_TC_HEAD(semget_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "semget(2) call"); +} + +ATF_TC_BODY(semget_success, tc) +{ + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE((semid = + semget(IPC_PRIVATE, 1, IPC_CREAT | S_IRUSR)) != -1); + + /* Check the presence of semaphore set ID in audit record */ + snprintf(ipcregex, sizeof(ipcregex), + "semget.*return,success,%d", semid); + check_audit(fds, ipcregex, pipefd); + + /* Destroy the semaphore set with ID = semid */ + ATF_REQUIRE_EQ(0, semctl(semid, 0, IPC_RMID)); +} + +ATF_TC_CLEANUP(semget_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(semget_failure); +ATF_TC_HEAD(semget_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "semget(2) call"); +} + +ATF_TC_BODY(semget_failure, tc) +{ + pid = getpid(); + snprintf(ipcregex, sizeof(ipcregex), "semget.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: nsems is a negative number */ + ATF_REQUIRE_EQ(-1, semget(IPC_PRIVATE, -1, 0)); + check_audit(fds, ipcregex, pipefd); +} + +ATF_TC_CLEANUP(semget_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(semop_success); +ATF_TC_HEAD(semop_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "semop(2) call"); +} + +ATF_TC_BODY(semop_success, tc) +{ + /* Create a semaphore set and obtain the set identifier */ + ATF_REQUIRE((semid = + semget(IPC_PRIVATE, 1, IPC_CREAT | S_IRUSR)) != -1); + + /* Initialize a sembuf structure to operate on semaphore set */ + struct sembuf sop[1] = {{0, 1, 0}}; + /* Check the presence of semaphore set ID in audit record */ + snprintf(ipcregex, sizeof(ipcregex), + "semop.*Semaphore IPC.*%d.*return,success", semid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, semop(semid, sop, sizeof(sop)/sizeof(struct sembuf))); + check_audit(fds, ipcregex, pipefd); + + /* Destroy the semaphore set with ID = semid */ + ATF_REQUIRE_EQ(0, semctl(semid, 0, IPC_RMID)); +} + +ATF_TC_CLEANUP(semop_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(semop_failure); +ATF_TC_HEAD(semop_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "semop(2) call"); +} + +ATF_TC_BODY(semop_failure, tc) +{ + const char *regex = "semop.*0x.*return,failure : Invalid argument"; + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, semop(-1, NULL, 0)); + check_audit(fds, regex, pipefd); +} + +ATF_TC_CLEANUP(semop_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(semctl_getval_success); +ATF_TC_HEAD(semctl_getval_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "semctl(2) call for GETVAL command"); +} + +ATF_TC_BODY(semctl_getval_success, tc) +{ + /* Create a semaphore set and obtain the set identifier */ + ATF_REQUIRE((semid = + semget(IPC_PRIVATE, 1, IPC_CREAT | S_IRUSR)) != -1); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, semctl(semid, 0, GETVAL)); + /* Check the presence of semaphore ID and GETVAL in audit record */ +
svn commit: r335527 - in head/usr.sbin: . spi
Author: ian Date: Fri Jun 22 01:59:19 2018 New Revision: 335527 URL: https://svnweb.freebsd.org/changeset/base/335527 Log: Add spi(8), a utility for communicating with a device on a SPI bus from userland, conceptually similar to what i2c(8) provides for i2c devices. Submitted by: Bob Frazier Differential Revision:https://reviews.freebsd.org/D15029 Added: head/usr.sbin/spi/ head/usr.sbin/spi/Makefile (contents, props changed) head/usr.sbin/spi/spi.8 (contents, props changed) head/usr.sbin/spi/spi.c (contents, props changed) Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile == --- head/usr.sbin/Makefile Fri Jun 22 01:10:05 2018(r335526) +++ head/usr.sbin/Makefile Fri Jun 22 01:59:19 2018(r335527) @@ -84,6 +84,7 @@ SUBDIR= adduser \ setpmac \ smbmsg \ snapinfo \ + spi \ spray \ syslogd \ sysrc \ Added: head/usr.sbin/spi/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/spi/Makefile Fri Jun 22 01:59:19 2018(r335527) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +#.include + +PROG= spi + +MAN8= spi.8 + +.include Added: head/usr.sbin/spi/spi.8 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/spi/spi.8 Fri Jun 22 01:59:19 2018(r335527) @@ -0,0 +1,197 @@ +.\" Copyright (c) 2018 by S.F.T. Inc. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd "15 April 2018" +.Dt spi 8 +.Os +.Sh NAME +.Nm spi +.Nd communicate on SPI bus with slave devices +.Sh SYNOPSIS +.Nm +.Op Fl f Ar device +.Op Fl d Ar r|w|rw +.Op Fl m Ar mode +.Op Fl s Ar max-speed +.Op Fl c Ar count +.Op Fl C Ar cmd_bytes +.Op Fl A +.Op Fl b +.Op Fl L +.Op Fl v +.Nm +.Op Fl i +.Op Fl f Ar device +.Op Fl v +.Nm +.Op Fl h +.Sh DESCRIPTION +The +.Nm +utility can be used to perform raw data transfers +.Pq read, write, or simultaneous read/write +with devices on the SPI bus, via the +.Xr spigen 4 +device. +.Pp +Each +.Xr spigen 4 +device is associated with a specific +.Sq chip select +.Pq cs +pin on the spibus, and therefore needs to be specified. +If no device name is specified on the command line, +.Nm +assumes +.Sq spigen0.0 . +.Pp +For more information on the spigen device, see +.Xr spigen 4 . +.Pp +The options are as follows: +.Bl -tag -width ".Fl f Ar device" +.It Fl A +Specifies ASCII mode. +Both read and write data is input and output as +2-character hexadecimal values, optionally separated by white space, +such as 00 01 02 etc. +When combined with the +.Sq -b +flag, the data on stdin remains a sequence of ASCII hexadecimal +byte values, but the output reverts to binary mode. +.It Fl b +Binary +.Pq output +mode. +Only has an effect when +.Sq -A +has been specified. +Reverts the output back to binary +.Pq rather than ASCII , +while leaving the input format as-is. +Use in combination with +.Sq -A +to allow using something like +.Sq echo +to pass hexadecimal values to the SPI device, but output the received data +on stdout as binary. +.It Fl C Ar command bytes +Sends one or more +.Sq command +bytes, skipping any bytes read-in during the transfer. +The byte values should be specified as a quoted parameter, similar to the +format for data on stdin for +.Sq -A , +that is, 2 character hexadecimal values, optionally separated by white space. +An SPI device will typically require that a command be sent, followed by
svn commit: r335526 - head/usr.sbin/config
Author: bdrewery Date: Fri Jun 22 01:10:05 2018 New Revision: 335526 URL: https://svnweb.freebsd.org/changeset/base/335526 Log: Let -s actually work. MFC after:2 weeks Sponsored by: Dell EMC Modified: head/usr.sbin/config/main.c Modified: head/usr.sbin/config/main.c == --- head/usr.sbin/config/main.c Fri Jun 22 00:55:39 2018(r335525) +++ head/usr.sbin/config/main.c Fri Jun 22 01:10:05 2018(r335526) @@ -118,7 +118,7 @@ main(int argc, char **argv) printmachine = 0; kernfile = NULL; SLIST_INIT(); - while ((ch = getopt(argc, argv, "CI:d:gmpsVx:")) != -1) + while ((ch = getopt(argc, argv, "CI:d:gmps:Vx:")) != -1) switch (ch) { case 'C': filebased = 1; ___ 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-unsubscr...@freebsd.org"
svn commit: r335525 - head/sys/fs/nfsserver
Author: rmacklem Date: Fri Jun 22 00:55:39 2018 New Revision: 335525 URL: https://svnweb.freebsd.org/changeset/base/335525 Log: Add a counter to limit the number of disabled DSs for a mirrored pNFS MDS. This patch adds a counter that limits the number of disabled mirrored DSs to mirror level - 1. It also makes a small change that keeps a Write that has failed with EACCES when attempted by a client to a DS from disabling the DS. This patch only affects the pNFS server. Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c == --- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jun 22 00:47:18 2018 (r335524) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jun 22 00:55:39 2018 (r335525) @@ -128,6 +128,7 @@ static int nfsrv_returnoldstateid = 0, nfsrv_clients = static int nfsrv_clienthighwater = NFSRV_CLIENTHIGHWATER; static int nfsrv_nogsscallback = 0; static volatile int nfsrv_writedelegcnt = 0; +static int nfsrv_faildscnt; /* local functions */ static void nfsrv_dumpaclient(struct nfsclient *clp, @@ -6748,10 +6749,9 @@ nfsrv_flexlayouterr(struct nfsrv_descript *nd, uint32_ NFSD_DEBUG(4, "flexlayouterr op=%d stat=%d\n", opnum, stat); /* -* Except for NFSERR_ACCES errors for Reading, -* shut the mirror down. +* Except for NFSERR_ACCES errors, disable the mirror. */ - if (opnum != NFSV4OP_READ || stat != NFSERR_ACCES) + if (stat != NFSERR_ACCES) nfsrv_delds(devid, p); } } @@ -7514,6 +7514,10 @@ nfsrv_deldsnmp(struct nfsmount *nmp, NFSPROC_T *p) NFSD_DEBUG(4, "deldsdvp\n"); NFSDDSLOCK(); + if (nfsrv_faildscnt <= 0) { + NFSDDSUNLOCK(); + return (NULL); + } fndds = nfsv4_findmirror(nmp); if (fndds != NULL) nfsrv_deleteds(fndds); @@ -7547,6 +7551,10 @@ nfsrv_delds(char *devid, NFSPROC_T *p) nmp = NULL; fndmirror = 0; NFSDDSLOCK(); + if (nfsrv_faildscnt <= 0) { + NFSDDSUNLOCK(); + return (ENXIO); + } TAILQ_FOREACH(ds, _devidhead, nfsdev_list) { if (NFSBCMP(ds->nfsdev_deviceid, devid, NFSX_V4DEVICEID) == 0 && ds->nfsdev_nmp != NULL) { @@ -7593,6 +7601,7 @@ nfsrv_deleteds(struct nfsdevice *fndds) NFSD_DEBUG(4, "deleteds: deleting a mirror\n"); fndds->nfsdev_nmp = NULL; + nfsrv_faildscnt--; } /* @@ -7714,6 +7723,8 @@ nfsrv_createdevids(struct nfsd_nfsd_args *args, NFSPRO nfsrv_maxpnfsmirror = 1; return (ENXIO); } + /* We can fail at most one less DS than the mirror level. */ + nfsrv_faildscnt = nfsrv_maxpnfsmirror - 1; /* * Allocate the nfslayout hash table now, since this is a pNFS server. ___ 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-unsubscr...@freebsd.org"
svn commit: r335524 - head/sys/kern
Author: mmacy Date: Fri Jun 22 00:47:18 2018 New Revision: 335524 URL: https://svnweb.freebsd.org/changeset/base/335524 Log: epoch(9): make non-preemptible variant work early boot Modified: head/sys/kern/subr_epoch.c Modified: head/sys/kern/subr_epoch.c == --- head/sys/kern/subr_epoch.c Fri Jun 22 00:41:36 2018(r335523) +++ head/sys/kern/subr_epoch.c Fri Jun 22 00:47:18 2018(r335524) @@ -307,6 +307,7 @@ epoch_enter(epoch_t epoch) struct thread *td; MPASS(cold || epoch != NULL); + INIT_CHECK(epoch); td = curthread; critical_enter(); @@ -344,6 +345,7 @@ epoch_exit(epoch_t epoch) ck_epoch_record_t *record; struct thread *td; + INIT_CHECK(epoch); td = curthread; td->td_epochnest--; record = >e_pcpu[curcpu]->eps_record.er_record; ___ 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-unsubscr...@freebsd.org"
svn commit: r335521 - stable/11/usr.bin/ldd
Author: emaste Date: Fri Jun 22 00:30:24 2018 New Revision: 335521 URL: https://svnweb.freebsd.org/changeset/base/335521 Log: MFC r335213: ldd: reference readelf instead of objdump in warning message We have an obsolete GNU objdump 2.17.50 in the base system, which will be removed in the future. Suggest readelf(1) for examining ELF files instead; for most use cases it is the preferred tool anyhow. PR: 229046 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.bin/ldd/sods.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/ldd/sods.c == --- stable/11/usr.bin/ldd/sods.cFri Jun 22 00:29:29 2018 (r335520) +++ stable/11/usr.bin/ldd/sods.cFri Jun 22 00:30:24 2018 (r335521) @@ -203,7 +203,7 @@ dump_file(const char *fname) file_base = (const char *) objbase;/* Makes address arithmetic easier */ if (IS_ELF(*(const Elf32_Ehdr*) align_struct(file_base))) { - warnx("%s: this is an ELF program; use objdump to examine", fname); + warnx("%s: this is an ELF program; use readelf to examine", fname); ++error_count; munmap(objbase, sb.st_size); return; ___ 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-unsubscr...@freebsd.org"
svn commit: r335520 - stable/11/share/man/man5
Author: emaste Date: Fri Jun 22 00:29:29 2018 New Revision: 335520 URL: https://svnweb.freebsd.org/changeset/base/335520 Log: MFC r335209: elf.5: add readelf cross-reference objdump is sometimes used in cases where readelf is more appropriate, but the obsolete GNU objdump we have in the base system will be removed in the future. .Xr readelf from elf.5 to improve the odds the more appropriate tool will be found. PR: 229046 Sponsored by: The FreeBSD Foundation Modified: stable/11/share/man/man5/elf.5 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man5/elf.5 == --- stable/11/share/man/man5/elf.5 Fri Jun 22 00:28:28 2018 (r335519) +++ stable/11/share/man/man5/elf.5 Fri Jun 22 00:29:29 2018 (r335520) @@ -1281,6 +1281,7 @@ stored into the relocatable field. .Xr gdb 1 , .Xr ld 1 , .Xr objdump 1 , +.Xr readelf 1 , .Xr execve 2 , .Xr ar 5 , .Xr core 5 ___ 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-unsubscr...@freebsd.org"
svn commit: r335519 - stable/11/sys/conf
Author: emaste Date: Fri Jun 22 00:28:28 2018 New Revision: 335519 URL: https://svnweb.freebsd.org/changeset/base/335519 Log: MFC r335214: Correct kern.pre.mk comment: objcopy copies objects. (Not objdump.) PR: 229046 Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/kern.pre.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/kern.pre.mk == --- stable/11/sys/conf/kern.pre.mk Fri Jun 22 00:27:31 2018 (r335518) +++ stable/11/sys/conf/kern.pre.mk Fri Jun 22 00:28:28 2018 (r335519) @@ -229,7 +229,7 @@ MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" MKMODULESENV+= __MPATH="${__MPATH}" .endif -# Architecture and output format arguments for objdump to convert image to +# Architecture and output format arguments for objcopy to convert image to # object file .if ${MFS_IMAGE:Uno} != "no" ___ 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-unsubscr...@freebsd.org"
svn commit: r335518 - stable/11/usr.sbin/asf
Author: emaste Date: Fri Jun 22 00:27:31 2018 New Revision: 335518 URL: https://svnweb.freebsd.org/changeset/base/335518 Log: MFC r335221: Add deprecation notice in asf.8 PR: 229046 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/asf/asf.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/asf/asf.8 == --- stable/11/usr.sbin/asf/asf.8Fri Jun 22 00:02:36 2018 (r335517) +++ stable/11/usr.sbin/asf/asf.8Fri Jun 22 00:27:31 2018 (r335518) @@ -37,6 +37,15 @@ .Op Fl o Ar outfile .Op Fl X Ar suffix .Op Ar modules-path Op Ar outfile +.Sh DEPRECATION NOTICE +The +.Nm +utility is not present in +.Fx 12.0 +and later. +The +.Xr kgdb 1 +debugger handles kernel module state internally. .Sh DESCRIPTION By default, .Nm ___ 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-unsubscr...@freebsd.org"
svn commit: r335517 - head/usr.bin/top
Author: eadler Date: Fri Jun 22 00:02:36 2018 New Revision: 335517 URL: https://svnweb.freebsd.org/changeset/base/335517 Log: top(1): behave as documented for -t Show top itself by default, unless -t is specified. Modified: head/usr.bin/top/top.c Modified: head/usr.bin/top/top.c == --- head/usr.bin/top/top.c Fri Jun 22 00:02:05 2018(r335516) +++ head/usr.bin/top/top.c Fri Jun 22 00:02:36 2018(r335517) @@ -281,7 +281,7 @@ main(int argc, char *argv[]) /* get our name */ /* initialize some selection options */ ps.idle= true; -ps.self= false; +ps.self= true; ps.system = false; reset_uids(); ps.thread = false; ___ 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-unsubscr...@freebsd.org"
svn commit: r335515 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux
Author: chuck Date: Fri Jun 22 00:02:03 2018 New Revision: 335515 URL: https://svnweb.freebsd.org/changeset/base/335515 Log: Fix the Linux kernel version number calculation The Linux compatibility code was converting the version number (e.g. 2.6.32) in two different ways and then comparing the results. The linux_map_osrel() function converted MAJOR.MINOR.PATCH similar to what FreeBSD does natively. I.e. where major=v0, minor=v1, and patch=v2 v = v0 * 100 + v1 * 1000 + v2; The LINUX_KERNVER() macro, on the other hand, converted the value with bit shifts. I.e. where major=a, minor=b, and patch=c v = (((a) << 16) + ((b) << 8) + (c)) The Linux kernel uses the later format via the KERNEL_VERSION() macro in include/generated/uapi/linux/version.h Fix is to use the LINUX_KERNVER() macro in linux_map_osrel() as well as in the .trans_osrel functions. PR: 229209 Reviewed by: emaste, cem, imp (mentor) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D15952 Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/compat/linux/linux_mib.c head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c == --- head/sys/amd64/linux/linux_sysvec.c Thu Jun 21 23:29:17 2018 (r335514) +++ head/sys/amd64/linux/linux_sysvec.c Fri Jun 22 00:02:03 2018 (r335515) @@ -799,10 +799,11 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel return (false); /* -* For Linux we encode osrel as follows (see linux_mib.c): -* VVVMMMIII (version, major, minor), see linux_mib.c. +* For Linux we encode osrel using the Linux convention of +* (version << 16) | (major << 8) | (minor) +* See macro in linux_mib.h */ - *osrel = desc[1] * 100 + desc[2] * 1000 + desc[3]; + *osrel = LINUX_KERNVER(desc[1], desc[2], desc[3]); return (true); } Modified: head/sys/amd64/linux32/linux32_sysvec.c == --- head/sys/amd64/linux32/linux32_sysvec.c Thu Jun 21 23:29:17 2018 (r335514) +++ head/sys/amd64/linux32/linux32_sysvec.c Fri Jun 22 00:02:03 2018 (r335515) @@ -993,10 +993,11 @@ linux32_trans_osrel(const Elf_Note *note, int32_t *osr return (false); /* -* For Linux we encode osrel as follows (see linux_mib.c): -* VVVMMMIII (version, major, minor), see linux_mib.c. +* For Linux we encode osrel using the Linux convention of +* (version << 16) | (major << 8) | (minor) +* See macro in linux_mib.h */ - *osrel = desc[1] * 100 + desc[2] * 1000 + desc[3]; + *osrel = LINUX_KERNVER(desc[1], desc[2], desc[3]); return (true); } Modified: head/sys/compat/linux/linux_mib.c == --- head/sys/compat/linux/linux_mib.c Thu Jun 21 23:29:17 2018 (r335514) +++ head/sys/compat/linux/linux_mib.c Fri Jun 22 00:02:03 2018 (r335515) @@ -149,8 +149,8 @@ linux_map_osrel(char *osrelease, int *osrel) if (osrelease == sep || sep != eosrelease) return (EINVAL); - v = v0 * 100 + v1 * 1000 + v2; - if (v < 100) + v = LINUX_KERNVER(v0, v1, v2); + if (v < LINUX_KERNVER(1, 0, 0)) return (EINVAL); if (osrel != NULL) Modified: head/sys/i386/linux/linux_sysvec.c == --- head/sys/i386/linux/linux_sysvec.c Thu Jun 21 23:29:17 2018 (r335514) +++ head/sys/i386/linux/linux_sysvec.c Fri Jun 22 00:02:03 2018 (r335515) @@ -970,10 +970,11 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel return (false); /* -* For Linux we encode osrel as follows (see linux_mib.c): -* VVVMMMIII (version, major, minor), see linux_mib.c. +* For Linux we encode osrel using the Linux convention of +* (version << 16) | (major << 8) | (minor) +* See macro in linux_mib.h */ - *osrel = desc[1] * 100 + desc[2] * 1000 + desc[3]; + *osrel = LINUX_KERNVER(desc[1], desc[2], desc[3]); return (true); } ___ 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-unsubscr...@freebsd.org"
svn commit: r335516 - head/sys/compat/linprocfs
Author: chuck Date: Fri Jun 22 00:02:05 2018 New Revision: 335516 URL: https://svnweb.freebsd.org/changeset/base/335516 Log: Fix output of linprocfs stat entry The Linux /proc/stat entry has grown over time v2.5.41 < user, nice, system, idle v2.5.41 user, nice, system, idle, iowait, irq v2.6.11 user, nice, system, idle, iowait, irq, softirq, steal v2.6.24 user, nice, system, idle, iowait, irq, softirq, steal, guest v2.6.32 > user, nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice Some applications (e.g. nodejs) depend on the correct number of entries and will abort otherwise. Fix is to print the correct number of entries based on the value of osrelease set either in sysctl or the jail settings. Change is similar to approach used by illumos. Reviewed by: emaste, imp (mentor) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D15858 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Fri Jun 22 00:02:03 2018 (r335515) +++ head/sys/compat/linprocfs/linprocfs.c Fri Jun 22 00:02:05 2018 (r335516) @@ -469,9 +469,21 @@ linprocfs_dopartitions(PFS_FILL_ARGS) return (0); } - /* * Filler function for proc/stat + * + * Output depends on kernel version: + * + * v2.5.40 <= + * user nice system idle + * v2.5.41 + * user nice system idle iowait + * v2.6.11 + * user nice system idle iowait irq softirq steal + * v2.6.24 + * user nice system idle iowait irq softirq steal guest + * v2.6.33 >= + * user nice system idle iowait irq softirq steal guest guest_nice */ static int linprocfs_dostat(PFS_FILL_ARGS) @@ -481,22 +493,54 @@ linprocfs_dostat(PFS_FILL_ARGS) long *cp; struct timeval boottime; int i; + char *zero_pad; + bool has_intr = true; + if (linux_kernver(td) >= LINUX_KERNVER(2,6,33)) { + zero_pad = " 0 0 0 0\n"; + } else if (linux_kernver(td) >= LINUX_KERNVER(2,6,24)) { + zero_pad = " 0 0 0\n"; + } else if (linux_kernver(td) >= LINUX_KERNVER(2,6,11)) { + zero_pad = " 0 0\n"; + } else if (linux_kernver(td) >= LINUX_KERNVER(2,5,41)) { + has_intr = false; + zero_pad = " 0\n"; + } else { + has_intr = false; + zero_pad = "\n"; + } + read_cpu_time(cp_time); getboottime(); - sbuf_printf(sb, "cpu %ld %ld %ld %ld\n", + /* Parameters common to all versions */ + sbuf_printf(sb, "cpu %lu %lu %lu %lu", T2J(cp_time[CP_USER]), T2J(cp_time[CP_NICE]), - T2J(cp_time[CP_SYS] /*+ cp_time[CP_INTR]*/), + T2J(cp_time[CP_SYS]), T2J(cp_time[CP_IDLE])); + + /* Print interrupt stats if available */ + if (has_intr) { + sbuf_printf(sb, " 0 %lu", T2J(cp_time[CP_INTR])); + } + + /* Pad out remaining fields depending on version */ + sbuf_printf(sb, "%s", zero_pad); + CPU_FOREACH(i) { pcpu = pcpu_find(i); cp = pcpu->pc_cp_time; - sbuf_printf(sb, "cpu%d %ld %ld %ld %ld\n", i, + sbuf_printf(sb, "cpu%d %lu %lu %lu %lu", i, T2J(cp[CP_USER]), T2J(cp[CP_NICE]), - T2J(cp[CP_SYS] /*+ cp[CP_INTR]*/), + T2J(cp[CP_SYS]), T2J(cp[CP_IDLE])); + + if (has_intr) { + sbuf_printf(sb, " 0 %lu", T2J(cp[CP_INTR])); + } + + sbuf_printf(sb, "%s", zero_pad); } sbuf_printf(sb, "disk 0 0 0 0\n" ___ 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-unsubscr...@freebsd.org"
svn commit: r335514 - stable/11/sys/conf
Author: gjb Date: Thu Jun 21 23:29:17 2018 New Revision: 335514 URL: https://svnweb.freebsd.org/changeset/base/335514 Log: Set stable/11 from -PRERELEASE back to -STABLE. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh Modified: stable/11/sys/conf/newvers.sh == --- stable/11/sys/conf/newvers.sh Thu Jun 21 23:13:34 2018 (r335513) +++ stable/11/sys/conf/newvers.sh Thu Jun 21 23:29:17 2018 (r335514) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.2" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi ___ 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-unsubscr...@freebsd.org"
svn commit: r335513 - stable/11/release/doc/share/xml
Author: gjb Date: Thu Jun 21 23:13:34 2018 New Revision: 335513 URL: https://svnweb.freebsd.org/changeset/base/335513 Log: Prune SAs and ENs from 11.1-RELEASE in preparation for creating the 11.2-RELEASE errata page. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/errata.xml == --- stable/11/release/doc/share/xml/errata.xml Thu Jun 21 23:10:58 2018 (r335512) +++ stable/11/release/doc/share/xml/errata.xml Thu Jun 21 23:13:34 2018 (r335513) @@ -19,81 +19,9 @@ - FreeBSD-EN-17:07.vnet - 10August2017 - VNET kernel panic with asynchronous - I/O - - - - FreeBSD-EN-17:08.pf - 10August2017 -housekeeping thread causes kernel - panic - - - - FreeBSD-EN-17:09.tzdata - 2November2017 - Timezone database information - update - - - - FreeBSD-EN-18:01.tzdata - 07March2018 - Timezone database information - update - - - - FreeBSD-EN-18:02.file - 07March2018 - Stack-based buffer overflow - - - - FreeBSD-EN-18:03.tzdata - 04April2018 - Update timezone database - information - - - - FreeBSD-EN-18:04.mem - 04April2018 - Multiple small kernel memory - disclosures - - - - FreeBSD-EN-18:05.mem - 08May2018 - Multiple small kernel memory - disclosures - - - - FreeBSD-EN-18:06.tzdata - 08May2018 - Update timezone database - information - - - - FreeBSD-EN-18:07.pmap - 21June2018 - Fix TLB for Xen guests + No erratas + + Modified: stable/11/release/doc/share/xml/security.xml == --- stable/11/release/doc/share/xml/security.xmlThu Jun 21 23:10:58 2018(r335512) +++ stable/11/release/doc/share/xml/security.xmlThu Jun 21 23:13:34 2018(r335513) @@ -19,108 +19,9 @@ - FreeBSD-SA-17:06.openssh - 10August2017 - Denial of Service vulnerability - - - - FreeBSD-SA-17:07.wpa - 16October2017 - WPA2 protocol vulnerability - - - - FreeBSD-SA-17:08.ptrace - 15November2017 - Kernel data leak via - ptrace(PT_LWPINFO) - - - - FreeBSD-SA-17:10.kldstat - 15November2017 - Information leak - - - - FreeBSD-SA-17:11.openssl - 29November2017 - Multiple vulnerabilities - - - - FreeBSD-SA-17:12.openssl - 09December2017 - Multiple vulnerabilities - - - - FreeBSD-SA-18:01.ipsec - 07March2018 - Fix IPSEC validation and - use-after-free - - - - FreeBSD-SA-18:02.ntp - 07March2018 - Multiple vulnerabilities - - - - FreeBSD-SA-18:03.speculative_execution - 14March2018 - - Speculative Execution Vulnerabilities - - This advisory addresses the most significant issues - for 11.1 on CPUs. We expect to - update this advisory to include 10.x for - CPUs. Future releases will address this issue on - and other CPUs. - - - - - - FreeBSD-SA-18:04.vt - 04April2018 - Fix console memory - disclosure - - - - FreeBSD-SA-18:05.ipsec - 04April2018 - Fix denial of service - - - - FreeBSD-SA-18:06.debugreg - 08May2018 - Mishandling of x86 debug - exceptions - - - - FreeBSD-SA-18:07.lazyfpu - 21June2018 - Fix Lazy FPU information - disclosure + No advisories + + ___ 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-unsubscr...@freebsd.org"
svn commit: r335512 - stable/11/release/doc/en_US.ISO8859-1/errata
Author: gjb Date: Thu Jun 21 23:10:58 2018 New Revision: 335512 URL: https://svnweb.freebsd.org/changeset/base/335512 Log: Synchronize the stable/11 errata page with releng/11.2 in preparation for creating the 11.2-RELEASE errata.html page. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xmlThu Jun 21 23:09:40 2018(r335511) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xmlThu Jun 21 23:10:58 2018(r335512) @@ -57,7 +57,7 @@ Introduction This errata document contains late-breaking - news about Before installing this + news about . Before installing this version, it is important to consult this document to learn about any post-release discoveries or problems that may already have been found and fixed. @@ -121,19 +121,6 @@ boot - [2017-07-21] Due to a bug in earlier versions of - that is difficult to work around in the - upgrade process, to upgrade the system from sources via - buildworld to -CURRENT or , it is necessary to - upgrade machines running 9.x to at least revision r286035, - or machines running 10.x to revision r286033. Source-based - upgrades from 10.3-RELEASE are not affected. This differs - from the historical situation where one could generally - upgrade from anywhere on earlier stable branches, so caution - should be exercised. - - - [2017-07-25] / currently lacks EFI real-time clock (RTC) support, which may cause the system @@ -154,51 +141,6 @@ boot - [2017-07-26] Note for those upgrading from 11.1-RC2 in - VirtualBox: - - If system panics were experienced when upgrading from - 11.1-RC1 to 11.1-RC2, and the emulators/virtualbox-ose-additions{,-nox11} - port was built locally as a resolution, the port will either - need to be rebuilt when upgrading from 11.1-RC2 to - 11.1-RELEASE, or reinstall the package from the pkg(8) - mirrors using either: - - pkg install -f virtualbox-ose-additions - - or - - pkg install -f virtualbox-ose-additions-nox11 - - To ensure the system does not panic after rebooting into - the updated kernel, it is recommended to disable the - vboxguest service in - prior to rebooting the system if possible, or use - to forcefully reinstall the package. - - Systems being upgraded from 11.1-RC1 and earlier and - 11.1-RC3 to 11.1-RELEASE should be unaffected. - - - - [2017-07-27] The release notes erroneously state - revision r315330 was sponsored by Rubicon - Communications, LLC (Netgate), when in fact this work was - done by Hiroki Mori independently. - - - - [2017-08-09] The release notes stated the - , , and utilities - have been marked deprecated, however this change - was reversed in 12.0-CURRENT. - - The other utilities mentioned in the entry in the - release notes, however, are unchanged. - - - [2017-11-06] An issue with virtual machines with vagrant was discovered that affects the VirtualBox where the @@ -213,6 +155,23 @@ boot invocation of vagrant up will allow the virtual machine to successfully boot, allowing access via vagrant ssh. + + + + [2018-06-21] An issue had been discovered late in the + release cycle where removing ZFS vdevs + from a pool under certain conditions would cause a system + crash when is enabled in + . + + At present, it is believed to be limited to removal of + a mirror vdev from a pool consisting of + multiple mirror vdevs. + + See PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228750;>228750 + for more information and updates as the issue is + investigated. ___ 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-unsubscr...@freebsd.org"
svn commit: r335511 - stable/11/release/doc/share/xml
Author: gjb Date: Thu Jun 21 23:09:40 2018 New Revision: 335511 URL: https://svnweb.freebsd.org/changeset/base/335511 Log: Update version entities in release.ent. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/release.ent Modified: stable/11/release/doc/share/xml/release.ent == --- stable/11/release/doc/share/xml/release.ent Thu Jun 21 22:59:49 2018 (r335510) +++ stable/11/release/doc/share/xml/release.ent Thu Jun 21 23:09:40 2018 (r335511) @@ -6,23 +6,23 @@ - + - + - + - + - + https://www.FreeBSD.org/snapshots/;> ___ 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-unsubscr...@freebsd.org"
svn commit: r335510 - in releng/11.2: . lib/csu/common sys/conf
Author: gjb Date: Thu Jun 21 22:59:49 2018 New Revision: 335510 URL: https://svnweb.freebsd.org/changeset/base/335510 Log: - Switch releng/11.2 to -RELEASE. - Add the anticipated 11.2-RELEASE date to UPDATING. - Set a static __FreeBSD_version. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/UPDATING releng/11.2/lib/csu/common/crtbrand.c releng/11.2/sys/conf/newvers.sh Modified: releng/11.2/UPDATING == --- releng/11.2/UPDATINGThu Jun 21 21:50:00 2018(r335509) +++ releng/11.2/UPDATINGThu Jun 21 22:59:49 2018(r335510) @@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20180627: + 11.2-RELEASE. + 20180504: The tz database (tzdb) has been updated to 2018e. This version more correctly models time stamps in time zones with negative DST such as Modified: releng/11.2/lib/csu/common/crtbrand.c == --- releng/11.2/lib/csu/common/crtbrand.c Thu Jun 21 21:50:00 2018 (r335509) +++ releng/11.2/lib/csu/common/crtbrand.c Thu Jun 21 22:59:49 2018 (r335510) @@ -62,5 +62,5 @@ static const struct { .descsz = sizeof(int32_t), .type = ABI_NOTETYPE, .name = NOTE_FREEBSD_VENDOR, - .desc = __FreeBSD_version + .desc = 1102000 }; Modified: releng/11.2/sys/conf/newvers.sh == --- releng/11.2/sys/conf/newvers.sh Thu Jun 21 21:50:00 2018 (r335509) +++ releng/11.2/sys/conf/newvers.sh Thu Jun 21 22:59:49 2018 (r335510) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.2" -BRANCH="RC3" +BRANCH="RELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r335402 - head/sbin/veriexecctl
Warner Losh wrote: > > Officially this code is on the 12.0 target path, it needs > > to be in the tree sooner where many eyes can work on it. > > > > I concur here. Let's give it until 12 to get sorted. If it's mostly sorted > by then, we're good. > If not we can have the discussion then. > There's also some manifest signing stuff in the works that was recently > approved to go in. Simon was talking about that. Maybe that will help fill > the gaps? I think so. The work I've done for loader supports both X.509 and OpenPGP based signatures, I need to tweak the library a bit so it is useful for userland app too. FWIW I'd meant to suggest to steve not to commit the veriexecctl tool which I think we all agree is useless as is (never used by us). I believe he'll back that bit out when he can get access to his keys - he's travelling this week. Thanks --sjg ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r335509 - head/sys/kern
On Thu, Jun 21, 2018 at 4:50 PM, Kyle Evans wrote: > Author: kevans > Date: Thu Jun 21 21:50:00 2018 > New Revision: 335509 > URL: https://svnweb.freebsd.org/changeset/base/335509 > > Log: > subr_hints: Fix acpi unit hinting (at the very least) > > The refactoring in r335479 overlooked the fact that the dynamic kenv can > also be switched to if hintmode == 0. This is problematic because the > checkmethod bits are only ever ran once, but it worked previously because > the use_kenv was a global state and the first lookup would enable it if > occurring after the dynamic environment has been setup. > > Extending our local definition of use_kenv to include all non-STATIC > hintmodes as long as the dynamic_kenv is setup fixes this. We still have > potential issues if the dynamic kenv comes up while we're doing an anchored > search through the environment, but this is not much of a concern right now > because: > > 1.) The dynamic environment comes up super early in boot, just after kmem > > 2.) This is going to get rewritten to provide a safer mechanism for the > anchored searches, ensuring that we continue using the same environment > chain (dynamic env or static fallback) for all anchored search invocations > > Reported by: mmamcy > X-MFC-With: r335479 > Reported by: mmacy* ___ 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-unsubscr...@freebsd.org"
svn commit: r335509 - head/sys/kern
Author: kevans Date: Thu Jun 21 21:50:00 2018 New Revision: 335509 URL: https://svnweb.freebsd.org/changeset/base/335509 Log: subr_hints: Fix acpi unit hinting (at the very least) The refactoring in r335479 overlooked the fact that the dynamic kenv can also be switched to if hintmode == 0. This is problematic because the checkmethod bits are only ever ran once, but it worked previously because the use_kenv was a global state and the first lookup would enable it if occurring after the dynamic environment has been setup. Extending our local definition of use_kenv to include all non-STATIC hintmodes as long as the dynamic_kenv is setup fixes this. We still have potential issues if the dynamic kenv comes up while we're doing an anchored search through the environment, but this is not much of a concern right now because: 1.) The dynamic environment comes up super early in boot, just after kmem 2.) This is going to get rewritten to provide a safer mechanism for the anchored searches, ensuring that we continue using the same environment chain (dynamic env or static fallback) for all anchored search invocations Reported by: mmamcy X-MFC-With: r335479 Modified: head/sys/kern/subr_hints.c Modified: head/sys/kern/subr_hints.c == --- head/sys/kern/subr_hints.c Thu Jun 21 21:21:16 2018(r335508) +++ head/sys/kern/subr_hints.c Thu Jun 21 21:50:00 2018(r335509) @@ -123,7 +123,7 @@ res_find(int *line, int *startln, { int n = 0, hit, i = 0; char r_name[32]; - int r_unit, use_kenv = (hintmode == HINTMODE_FALLBACK); + int r_unit, use_kenv = (hintmode != HINTMODE_STATIC && dynamic_kenv); char r_resname[32]; char r_value[128]; const char *s, *cp; ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r335402 - head/sbin/veriexecctl
On Thu, Jun 21, 2018 at 3:10 PM, Rodney W. Grimes < free...@pdx.rh.cn85.dnsmgr.net> wrote: > ... > > > > Hi, > > > > > > While the code is out of HEAD, it can be posted to a github branch > > > (or > > > a projects/ branch if you prefer SVN) for people to try. > > > > > > Best regards, > > > Conrad > > > > > > > Yeah, put it on a branch where it'll get ignored for another two years. > > > > If this code had been committed long ago, as it probably should have > > been, then people would have been playing with it, and by time I needed > > it a few months ago there would have been all kinds of useful info in > > mailing lists and blogs about how to set it up and what was good and > > bad about it and so on. ?Iterative refinement would have been underway. > > > > Instead what I found was a bunch of patches and a big steep learning > > curve with no existing information about using it in the real world. > > With that info available, I/we ($work) would have been in a position to > > quickly adopt it and begin contributing to the ongoing refinement. > > Instead I had to conclude that product deadlines just didn't allow us > > to even try to get it working from a standing start as first-adopters, > > so we had to move in a different direction. Even though this is a > > better solution than what we did, business practicalities will likely > > prevent us from circling back and changing everything over to this > > scheme in the future, so now we'll end up never contributing much to > > this work. > > > > So, IMO, all this calling for things to be reverted isn't just > > inappropriate, it's actively harmful. This is -current where > > development happens and imperfection is expected. Hiding work in > > patchsets and reviews and alternate branches and other shadowy places > > because it's not perfect is just a way of ensuring it never gets any > > better. > > I am with Ian on this one, we have far too much code sitting > out of tree and rotting faster than anyone can maintain said > code out of tree, meaning we are litterly cutting our own > developement efforts off, not at just the foot but up closer > to the hip. > > The veriexec code landed, its in tree, fix it, polish it, > cut out the ugly bits, but for sake of sanity do not whole > sale revert it so it can generally rot some more. > > Officially this code is on the 12.0 target path, it needs > to be in the tree sooner where many eyes can work on it. > I concur here. Let's give it until 12 to get sorted. If it's mostly sorted by then, we're good. If not we can have the discussion then. There's also some manifest signing stuff in the works that was recently approved to go in. Simon was talking about that. Maybe that will help fill the gaps? Warner ___ 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-unsubscr...@freebsd.org"
svn commit: r335508 - stable/11/sys/vm
Author: kib Date: Thu Jun 21 21:21:16 2018 New Revision: 335508 URL: https://svnweb.freebsd.org/changeset/base/335508 Log: MFC r335171: Handle the race between fork/vm_object_split() and faults. Modified: stable/11/sys/vm/swap_pager.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/swap_pager.c == --- stable/11/sys/vm/swap_pager.c Thu Jun 21 21:19:48 2018 (r335507) +++ stable/11/sys/vm/swap_pager.c Thu Jun 21 21:21:16 2018 (r335508) @@ -1096,21 +1096,24 @@ swap_pager_getpages(vm_object_t object, vm_page_t *ma, int *rahead) { struct buf *bp; - vm_page_t mpred, msucc, p; + vm_page_t bm, mpred, msucc, p; vm_pindex_t pindex; daddr_t blk; - int i, j, maxahead, maxbehind, reqcount, shift; + int i, maxahead, maxbehind, reqcount; reqcount = count; - VM_OBJECT_WUNLOCK(object); - bp = getpbuf(_rcount); - VM_OBJECT_WLOCK(object); - - if (!swap_pager_haspage(object, ma[0]->pindex, , )) { - relpbuf(bp, _rcount); + /* +* Determine the final number of read-behind pages and +* allocate them BEFORE releasing the object lock. Otherwise, +* there can be a problematic race with vm_object_split(). +* Specifically, vm_object_split() might first transfer pages +* that precede ma[0] in the current object to a new object, +* and then this function incorrectly recreates those pages as +* read-behind pages in the current object. +*/ + if (!swap_pager_haspage(object, ma[0]->pindex, , )) return (VM_PAGER_FAIL); - } /* * Clip the readahead and readbehind ranges to exclude resident pages. @@ -1132,35 +1135,31 @@ swap_pager_getpages(vm_object_t object, vm_page_t *ma, *rbehind = pindex - mpred->pindex - 1; } + bm = ma[0]; + for (i = 0; i < count; i++) + ma[i]->oflags |= VPO_SWAPINPROG; + /* * Allocate readahead and readbehind pages. */ - shift = rbehind != NULL ? *rbehind : 0; - if (shift != 0) { - for (i = 1; i <= shift; i++) { + if (rbehind != NULL) { + for (i = 1; i <= *rbehind; i++) { p = vm_page_alloc(object, ma[0]->pindex - i, VM_ALLOC_NORMAL); - if (p == NULL) { - /* Shift allocated pages to the left. */ - for (j = 0; j < i - 1; j++) - bp->b_pages[j] = - bp->b_pages[j + shift - i + 1]; + if (p == NULL) break; - } - bp->b_pages[shift - i] = p; + p->oflags |= VPO_SWAPINPROG; + bm = p; } - shift = i - 1; - *rbehind = shift; + *rbehind = i - 1; } - for (i = 0; i < reqcount; i++) - bp->b_pages[i + shift] = ma[i]; if (rahead != NULL) { for (i = 0; i < *rahead; i++) { p = vm_page_alloc(object, ma[reqcount - 1]->pindex + i + 1, VM_ALLOC_NORMAL); if (p == NULL) break; - bp->b_pages[shift + reqcount + i] = p; + p->oflags |= VPO_SWAPINPROG; } *rahead = i; } @@ -1171,15 +1170,18 @@ swap_pager_getpages(vm_object_t object, vm_page_t *ma, vm_object_pip_add(object, count); - for (i = 0; i < count; i++) - bp->b_pages[i]->oflags |= VPO_SWAPINPROG; - - pindex = bp->b_pages[0]->pindex; + pindex = bm->pindex; blk = swp_pager_meta_ctl(object, pindex, 0); KASSERT(blk != SWAPBLK_NONE, ("no swap blocking containing %p(%jx)", object, (uintmax_t)pindex)); VM_OBJECT_WUNLOCK(object); + bp = getpbuf(_rcount); + /* Pages cannot leave the object while busy. */ + for (i = 0, p = bm; i < count; i++, p = TAILQ_NEXT(p, listq)) { + MPASS(p->pindex == bm->pindex + i); + bp->b_pages[i] = p; + } bp->b_flags |= B_PAGING; bp->b_iocmd = BIO_READ; ___ 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-unsubscr...@freebsd.org"
svn commit: r335507 - stable/11/sys/amd64/linux
Author: kib Date: Thu Jun 21 21:19:48 2018 New Revision: 335507 URL: https://svnweb.freebsd.org/changeset/base/335507 Log: MFC r335135: linuxolator/amd64: Don't mangle %r10 on return from syscall for EJUSTRETURN. Modified: stable/11/sys/amd64/linux/linux_sysvec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/linux/linux_sysvec.c == --- stable/11/sys/amd64/linux/linux_sysvec.cThu Jun 21 21:16:26 2018 (r335506) +++ stable/11/sys/amd64/linux/linux_sysvec.cThu Jun 21 21:19:48 2018 (r335507) @@ -257,7 +257,8 @@ linux_set_syscall_retval(struct thread *td, int error) * So, do not clobber %rdx and %r10 */ td->td_retval[1] = frame->tf_rdx; - frame->tf_r10 = frame->tf_rcx; + if (error != EJUSTRETURN) + frame->tf_r10 = frame->tf_rcx; cpu_set_syscall_retval(td, error); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r335506 - in head/sys: conf dev/spibus
Author: ian Date: Thu Jun 21 21:16:26 2018 New Revision: 335506 URL: https://svnweb.freebsd.org/changeset/base/335506 Log: Incorporate bus and chip select numbers into spigen(4) cdev names. Rather than assigning spigen device names in order of creation, this uses a device name that corresponds to the owning spibus and chip-select index. Example: /dev/spigen0.1 would be a child of spibus0, and use cs = 1 The intent is for systems like Raspberry Pi to have a consistent way of using an SPI interface with a specific cs value from a user application. Otherwise, there is no consistent way of knowing which cs pin will be assigned to a particular spigen device. The alternative is to specify everything in "the right order" in an overlay file, which is less than ideal. Additionally, this duplicates (to some extent) the way Linux handles a similar situation with their 'spidev' device, so it would be somewhat familiar to those who also use Linux. A new kernel config option, SPIGEN_LEGACY_CDEVNAME, causes the driver to also create /dev/spigenN device name aliases, with N incrementing in the order of device instantiation. This is provided to ease the transition for existing systems using the original naming convention (particularly when these changes are MFC'd to stable branches). Differential Revision:https://reviews.freebsd.org/D15301 Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/dev/spibus/spibus.c head/sys/dev/spibus/spigen.c Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Thu Jun 21 21:15:04 2018(r335505) +++ head/sys/conf/NOTES Thu Jun 21 21:16:26 2018(r335506) @@ -3044,3 +3044,6 @@ options UINPUT_DEBUG# enable uinput debug msgs # Encrypted kernel crash dumps. optionsEKCD + +# Enable legacy /dev/spigenN name aliases for /dev/spigenX.Y devices. +optionsSPIGEN_LEGACY_CDEVNAME # legacy device names for spigen Modified: head/sys/conf/options == --- head/sys/conf/options Thu Jun 21 21:15:04 2018(r335505) +++ head/sys/conf/options Thu Jun 21 21:16:26 2018(r335506) @@ -992,6 +992,9 @@ BHND_LOGLEVEL opt_global.h # GPIO and child devices GPIO_SPI_DEBUG opt_gpio.h +# SPI devices +SPIGEN_LEGACY_CDEVNAME opt_spi.h + # etherswitch(4) driver RTL8366_SOFT_RESET opt_etherswitch.h Modified: head/sys/dev/spibus/spibus.c == --- head/sys/dev/spibus/spibus.cThu Jun 21 21:15:04 2018 (r335505) +++ head/sys/dev/spibus/spibus.cThu Jun 21 21:16:26 2018 (r335506) @@ -122,8 +122,10 @@ spibus_child_location_str(device_t bus, device_t child size_t buflen) { struct spibus_ivar *devi = SPIBUS_IVAR(child); + int cs; - snprintf(buf, buflen, "cs=%d", devi->cs); + cs = devi->cs & ~SPIBUS_CS_HIGH; /* trim 'cs high' bit */ + snprintf(buf, buflen, "bus=%d cs=%d", device_get_unit(bus), cs); return (0); } Modified: head/sys/dev/spibus/spigen.c == --- head/sys/dev/spibus/spigen.cThu Jun 21 21:15:04 2018 (r335505) +++ head/sys/dev/spibus/spigen.cThu Jun 21 21:16:26 2018 (r335506) @@ -26,6 +26,7 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" +#include "opt_spi.h" #include #include @@ -64,6 +65,9 @@ __FBSDID("$FreeBSD$"); struct spigen_softc { device_t sc_dev; struct cdev *sc_cdev; +#ifdef SPIGEN_LEGACY_CDEVNAME + struct cdev *sc_adev; /* alias device */ +#endif struct mtx sc_mtx; uint32_t sc_command_length_max; /* cannot change while mmapped */ uint32_t sc_data_length_max;/* cannot change while mmapped */ @@ -186,15 +190,46 @@ spigen_attach(device_t dev) { struct spigen_softc *sc; const int unit = device_get_unit(dev); + int cs, res; + struct make_dev_args mda; + spibus_get_cs(dev, ); + cs &= ~SPIBUS_CS_HIGH; /* trim 'cs high' bit */ + sc = device_get_softc(dev); sc->sc_dev = dev; - sc->sc_cdev = make_dev(_cdevsw, unit, - UID_ROOT, GID_OPERATOR, 0660, "spigen%d", unit); - sc->sc_cdev->si_drv1 = dev; sc->sc_command_length_max = PAGE_SIZE; sc->sc_data_length_max = PAGE_SIZE; + mtx_init(>sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); + + make_dev_args_init(); + mda.mda_flags = MAKEDEV_WAITOK; + mda.mda_devsw = _cdevsw; + mda.mda_cr = NULL; + mda.mda_uid = UID_ROOT; + mda.mda_gid = GID_OPERATOR; + mda.mda_mode = 0660; + mda.mda_unit = unit; + mda.mda_si_drv1 = dev; + + res = make_dev_s(, &(sc->sc_cdev), "spigen%d.%d", +
svn commit: r335505 - head/sys/compat/linux
Author: kib Date: Thu Jun 21 21:15:04 2018 New Revision: 335505 URL: https://svnweb.freebsd.org/changeset/base/335505 Log: linux_clone_thread: mark new thread as TDB_BORN. So that the ptrace code will catch it and report it to attached debugger. Enables debugging of threaded Linux binaries with FreeBSD debugger. Submitted by: Yanko Yankulov MFC after:1 week Differential revision:https://reviews.freebsd.org/D15880 Modified: head/sys/compat/linux/linux_fork.c Modified: head/sys/compat/linux/linux_fork.c == --- head/sys/compat/linux/linux_fork.c Thu Jun 21 21:12:49 2018 (r335504) +++ head/sys/compat/linux/linux_fork.c Thu Jun 21 21:15:04 2018 (r335505) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -352,6 +353,9 @@ linux_clone_thread(struct thread *td, struct linux_clo thread_unlock(td); if (P_SHOULDSTOP(p)) newtd->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK; + + if (p->p_ptevents & PTRACE_LWP) + newtd->td_dbgflags |= TDB_BORN; PROC_UNLOCK(p); tidhash_add(newtd); ___ 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-unsubscr...@freebsd.org"
svn commit: r335504 - in head/sys: kern sys
Author: kib Date: Thu Jun 21 21:12:49 2018 New Revision: 335504 URL: https://svnweb.freebsd.org/changeset/base/335504 Log: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED. An RFSTOPPED thread can't clean TDB_STOPATFORK, which is done in the fork_return() in its context, so parent is stuck forever. Triggered when trying to ptrace linux process. Instead of waiting for the new thread to clear TDB_STOPATFORK, tag it as traced and reparent to the debugger in do_fork(), and let it only notify the debugger when run. Submitted by: Yanko Yankulov Reviewed by: jhb MFC after:1 week X-MFC-Note: keep p_dbgwait placeholder intact Differential revision:https://reviews.freebsd.org/D15857 Modified: head/sys/kern/kern_fork.c head/sys/kern/kern_proc.c head/sys/kern/kern_sig.c head/sys/sys/proc.h Modified: head/sys/kern/kern_fork.c == --- head/sys/kern/kern_fork.c Thu Jun 21 21:07:25 2018(r335503) +++ head/sys/kern/kern_fork.c Thu Jun 21 21:12:49 2018(r335504) @@ -721,18 +721,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct * but before we wait for the debugger. */ _PHOLD(p2); - if (p1->p_ptevents & PTRACE_FORK) { - /* -* Arrange for debugger to receive the fork event. -* -* We can report PL_FLAG_FORKED regardless of -* P_FOLLOWFORK settings, but it does not make a sense -* for runaway child. -*/ - td->td_dbgflags |= TDB_FORK; - td->td_dbg_forked = p2->p_pid; - td2->td_dbgflags |= TDB_STOPATFORK; - } if (fr->fr_flags & RFPPWAIT) { td->td_pflags |= TDP_RFPPWAIT; td->td_rfppwait_p = p2; @@ -756,7 +744,42 @@ do_fork(struct thread *td, struct fork_req *fr, struct procdesc_finit(p2->p_procdesc, fp_procdesc); fdrop(fp_procdesc, td); } - + + /* +* Speculative check for PTRACE_FORK. PTRACE_FORK is not +* synced with forks in progress so it is OK if we miss it +* if being set atm. +*/ + if ((p1->p_ptevents & PTRACE_FORK) != 0) { + sx_xlock(_lock); + PROC_LOCK(p2); + + /* +* p1->p_ptevents & p1->p_pptr are protected by both +* process and proctree locks for modifications, +* so owning proctree_lock allows the race-free read. +*/ + if ((p1->p_ptevents & PTRACE_FORK) != 0) { + /* +* Arrange for debugger to receive the fork event. +* +* We can report PL_FLAG_FORKED regardless of +* P_FOLLOWFORK settings, but it does not make a sense +* for runaway child. +*/ + td->td_dbgflags |= TDB_FORK; + td->td_dbg_forked = p2->p_pid; + td2->td_dbgflags |= TDB_STOPATFORK; + proc_set_traced(p2, true); + CTR2(KTR_PTRACE, + "do_fork: attaching to new child pid %d: oppid %d", + p2->p_pid, p2->p_oppid); + proc_reparent(p2, p1->p_pptr); + } + PROC_UNLOCK(p2); + sx_xunlock(_lock); + } + if ((fr->fr_flags & RFSTOPPED) == 0) { /* * If RFSTOPPED not requested, make child runnable and @@ -773,11 +796,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct } PROC_LOCK(p2); - /* -* Wait until debugger is attached to child. -*/ - while (td2->td_proc == p2 && (td2->td_dbgflags & TDB_STOPATFORK) != 0) - cv_wait(>p_dbgwait, >p_mtx); _PRELE(p2); racct_proc_fork_done(p2); PROC_UNLOCK(p2); @@ -1063,24 +1081,15 @@ fork_exit(void (*callout)(void *, struct trapframe *), void fork_return(struct thread *td, struct trapframe *frame) { - struct proc *p, *dbg; + struct proc *p; p = td->td_proc; if (td->td_dbgflags & TDB_STOPATFORK) { - sx_xlock(_lock); PROC_LOCK(p); - if (p->p_pptr->p_ptevents & PTRACE_FORK) { + if ((p->p_flag & P_TRACED) != 0) { /* -* If debugger still wants auto-attach for the -* parent's children, do it now. +* Inform the debugger if one is still present. */ - dbg = p->p_pptr->p_pptr; - proc_set_traced(p, true); - CTR2(KTR_PTRACE, -
Re: svn commit: r335402 - head/sbin/veriexecctl
... > > Hi, > > > > While the code is out of HEAD, it can be posted to a github branch > > (or > > a projects/ branch if you prefer SVN) for people to try. > > > > Best regards, > > Conrad > > > > Yeah, put it on a branch where it'll get ignored for another two years. > > If this code had been committed long ago, as it probably should have > been, then people would have been playing with it, and by time I needed > it a few months ago there would have been all kinds of useful info in > mailing lists and blogs about how to set it up and what was good and > bad about it and so on. ?Iterative refinement would have been underway. > > Instead what I found was a bunch of patches and a big steep learning > curve with no existing information about using it in the real world. > With that info available, I/we ($work) would have been in a position to > quickly adopt it and begin contributing to the ongoing refinement. > Instead I had to conclude that product deadlines just didn't allow us > to even try to get it working from a standing start as first-adopters, > so we had to move in a different direction. Even though this is a > better solution than what we did, business practicalities will likely > prevent us from circling back and changing everything over to this > scheme in the future, so now we'll end up never contributing much to > this work. > > So, IMO, all this calling for things to be reverted isn't just > inappropriate, it's actively harmful. This is -current where > development happens and imperfection is expected. Hiding work in > patchsets and reviews and alternate branches and other shadowy places > because it's not perfect is just a way of ensuring it never gets any > better. I am with Ian on this one, we have far too much code sitting out of tree and rotting faster than anyone can maintain said code out of tree, meaning we are litterly cutting our own developement efforts off, not at just the foot but up closer to the hip. The veriexec code landed, its in tree, fix it, polish it, cut out the ugly bits, but for sake of sanity do not whole sale revert it so it can generally rot some more. Officially this code is on the 12.0 target path, it needs to be in the tree sooner where many eyes can work on it. -- Rod Grimes rgri...@freebsd.org ___ 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-unsubscr...@freebsd.org"
svn commit: r335503 - in head/sys: kern sys
Author: kib Date: Thu Jun 21 21:07:25 2018 New Revision: 335503 URL: https://svnweb.freebsd.org/changeset/base/335503 Log: Update proc->p_ptevents annotation to reflect the actual locking. Submitted by: Yanko Yankulov Reviewed by: jhb MFC after:1 week Differential revision:https://reviews.freebsd.org/D15954 Modified: head/sys/kern/sys_process.c head/sys/sys/proc.h Modified: head/sys/kern/sys_process.c == --- head/sys/kern/sys_process.c Thu Jun 21 21:03:58 2018(r335502) +++ head/sys/kern/sys_process.c Thu Jun 21 21:07:25 2018(r335503) @@ -688,6 +688,7 @@ void proc_set_traced(struct proc *p, bool stop) { + sx_assert(_lock, SX_XLOCKED); PROC_LOCK_ASSERT(p, MA_OWNED); p->p_flag |= P_TRACED; if (stop) Modified: head/sys/sys/proc.h == --- head/sys/sys/proc.h Thu Jun 21 21:03:58 2018(r335502) +++ head/sys/sys/proc.h Thu Jun 21 21:07:25 2018(r335503) @@ -633,7 +633,7 @@ struct proc { u_int p_stype;/* (c) Stop event type. */ charp_step; /* (c) Process is stopped. */ u_char p_pfsflags; /* (c) Procfs flags. */ - u_int p_ptevents; /* (c) ptrace() event mask. */ + u_int p_ptevents; /* (c + e) ptrace() event mask. */ struct nlminfo *p_nlminfo; /* (?) Only used by/for lockd. */ struct kaioinfo *p_aioinfo; /* (y) ASYNC I/O info. */ struct thread *p_singlethread;/* (c + j) If single threading this is it */ ___ 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-unsubscr...@freebsd.org"
svn commit: r335502 - head/sys/netinet
Author: rrs Date: Thu Jun 21 21:03:58 2018 New Revision: 335502 URL: https://svnweb.freebsd.org/changeset/base/335502 Log: This adds in an optimization so that we only walk one time through the mbuf chain during copy and TSO limiting. It is used by both Rack and now the FreeBSD stack. Sponsored by: Netflix Inc Differential Revision: https://reviews.freebsd.org/D15937 Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Thu Jun 21 20:18:23 2018 (r335501) +++ head/sys/netinet/tcp_output.c Thu Jun 21 21:03:58 2018 (r335502) @@ -209,6 +209,8 @@ tcp_output(struct tcpcb *tp) int32_t len; uint32_t recwin, sendwin; int off, flags, error = 0; /* Keep compiler happy */ + u_int if_hw_tsomaxsegcount = 0; + u_int if_hw_tsomaxsegsize; struct mbuf *m; struct ip *ip = NULL; #ifdef TCPDEBUG @@ -879,9 +881,6 @@ send: if (tso) { u_int if_hw_tsomax; - u_int if_hw_tsomaxsegcount; - u_int if_hw_tsomaxsegsize; - struct mbuf *mb; u_int moff; int max_len; @@ -913,66 +912,7 @@ send: len = max_len; } } - /* -* Check if we should limit by maximum segment -* size and count: -*/ - if (if_hw_tsomaxsegcount != 0 && - if_hw_tsomaxsegsize != 0) { - /* -* Subtract one segment for the LINK -* and TCP/IP headers mbuf that will -* be prepended to this mbuf chain -* after the code in this section -* limits the number of mbufs in the -* chain to if_hw_tsomaxsegcount. -*/ - if_hw_tsomaxsegcount -= 1; - max_len = 0; - mb = sbsndmbuf(>so_snd, off, ); - - while (mb != NULL && max_len < len) { - u_int mlen; - u_int frags; - - /* -* Get length of mbuf fragment -* and how many hardware frags, -* rounded up, it would use: -*/ - mlen = (mb->m_len - moff); - frags = howmany(mlen, - if_hw_tsomaxsegsize); - - /* Handle special case: Zero Length Mbuf */ - if (frags == 0) - frags = 1; - - /* -* Check if the fragment limit -* will be reached or exceeded: -*/ - if (frags >= if_hw_tsomaxsegcount) { - max_len += min(mlen, - if_hw_tsomaxsegcount * - if_hw_tsomaxsegsize); - break; - } - max_len += mlen; - if_hw_tsomaxsegcount -= frags; - moff = 0; - mb = mb->m_next; - } - if (max_len <= 0) { - len = 0; - } else if (len > max_len) { - sendalot = 1; - len = max_len; - } - } - - /* * Prevent the last segment from being * fractional unless the send sockbuf can be * emptied: @@ -1006,7 +946,6 @@ send: */ if (tp->t_flags & TF_NEEDFIN) sendalot = 1; - } else { len = tp->t_maxseg - optlen - ipoptlen; sendalot = 1; @@
svn commit: r335501 - head/sys/netinet
Author: mmacy Date: Thu Jun 21 20:18:23 2018 New Revision: 335501 URL: https://svnweb.freebsd.org/changeset/base/335501 Log: raw_ip: validate inp in both loops Continuation of r335497. Also move the lock acquisition up to validate before referencing inp_cred. Reported by: pho Modified: head/sys/netinet/raw_ip.c Modified: head/sys/netinet/raw_ip.c == --- head/sys/netinet/raw_ip.c Thu Jun 21 18:40:15 2018(r335500) +++ head/sys/netinet/raw_ip.c Thu Jun 21 20:18:23 2018(r335501) @@ -312,29 +312,31 @@ rip_input(struct mbuf **mp, int *offp, int proto) continue; if (inp->inp_faddr.s_addr != ip->ip_src.s_addr) continue; - if (jailed_without_vnet(inp->inp_cred)) { - /* -* XXX: If faddr was bound to multicast group, -* jailed raw socket will drop datagram. -*/ - if (prison_check_ip4(inp->inp_cred, >ip_dst) != 0) - continue; - } if (last != NULL) { struct mbuf *n; n = m_copym(m, 0, M_COPYALL, M_NOWAIT); if (n != NULL) - (void) rip_append(last, ip, n, ); + (void) rip_append(last, ip, n, ); /* XXX count dropped packet */ INP_RUNLOCK(last); + last = NULL; } INP_RLOCK(inp); - last = inp; - if (__predict_false(inp->inp_flags2 & INP_FREED)) { - last = NULL; - INP_RUNLOCK(inp); + if (__predict_false(inp->inp_flags2 & INP_FREED)) + goto skip_1; + if (jailed_without_vnet(inp->inp_cred)) { + /* +* XXX: If faddr was bound to multicast group, +* jailed raw socket will drop datagram. +*/ + if (prison_check_ip4(inp->inp_cred, >ip_dst) != 0) + goto skip_1; } + last = inp; + continue; + skip_1: + INP_RUNLOCK(inp); } CK_LIST_FOREACH(inp, _ripcbinfo.ipi_hashbase[0], inp_hash) { if (inp->inp_ip_p && inp->inp_ip_p != proto) @@ -350,6 +352,19 @@ rip_input(struct mbuf **mp, int *offp, int proto) if (!in_nullhost(inp->inp_faddr) && !in_hosteq(inp->inp_faddr, ip->ip_src)) continue; + if (last != NULL) { + struct mbuf *n; + + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + if (n != NULL) + (void) rip_append(last, ip, n, ); + /* XXX count dropped packet */ + INP_RUNLOCK(last); + last = NULL; + } + INP_RLOCK(inp); + if (__predict_false(inp->inp_flags2 & INP_FREED)) + goto skip_2; if (jailed_without_vnet(inp->inp_cred)) { /* * Allow raw socket in jail to receive multicast; @@ -358,7 +373,7 @@ rip_input(struct mbuf **mp, int *offp, int proto) */ if (!IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) && prison_check_ip4(inp->inp_cred, >ip_dst) != 0) - continue; + goto skip_2; } /* * If this raw socket has multicast state, and we @@ -399,20 +414,13 @@ rip_input(struct mbuf **mp, int *offp, int proto) if (blocked != MCAST_PASS) { IPSTAT_INC(ips_notmember); - continue; + goto skip_2; } } - if (last != NULL) { - struct mbuf *n; - - n = m_copym(m, 0, M_COPYALL, M_NOWAIT); - if (n != NULL) - (void) rip_append(last, ip, n, ); - /* XXX count dropped packet */ - INP_RUNLOCK(last); - } - INP_RLOCK(inp); last = inp; + continue; + skip_2: + INP_RUNLOCK(inp); } INP_INFO_RUNLOCK(_ripcbinfo); if (last != NULL) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to
Re: svn commit: r335402 - head/sbin/veriexecctl
On Thu, 2018-06-21 at 19:02 +, Mark Linimon wrote: > On Thu, Jun 21, 2018 at 12:33:26PM -0600, Ian Lepore wrote: > > > > Hiding work in patchsets and reviews and alternate branches and > > other > > shadowy places because it's not perfect > I do not consider bugzilla and phabricator to be "shadowy places"; > therefore, I reject this argument. > > Although I don't have statistics, AFAICT phabricator patches have a > better-than-even chance of going in. > > But, in any case, a middle position would have been to commit this to > a vendor branch and publish instructions on how to grab it from there > and enable it. > > I understand that -current will have regressions in it. However, the > pendulum has recently swung in the direction of "free-for-all". This > slows down (e.g.) my own work on -currernt such as testing arm boards > and trying to fix ports there. ATM I'm not even *attempting* to do > the > latter because I have little faith that any -current I bring in past > the one I'm locked down to (r333619 May 16 UTC 2018) will do anything > but burn my time trying to track down regressions. > > tl:dr; I have enough work to do without trying to fix other people's > stuff. If that's harsh, so be it. > > mcl > I guess you missed the part about all of this new code being optional and compiled-in only if you add the new options to your kernel config? -- Ian ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r335402 - head/sbin/veriexecctl
On Thu, Jun 21, 2018 at 12:33:26PM -0600, Ian Lepore wrote: > Hiding work in patchsets and reviews and alternate branches and other > shadowy places because it's not perfect I do not consider bugzilla and phabricator to be "shadowy places"; therefore, I reject this argument. Although I don't have statistics, AFAICT phabricator patches have a better-than-even chance of going in. But, in any case, a middle position would have been to commit this to a vendor branch and publish instructions on how to grab it from there and enable it. I understand that -current will have regressions in it. However, the pendulum has recently swung in the direction of "free-for-all". This slows down (e.g.) my own work on -currernt such as testing arm boards and trying to fix ports there. ATM I'm not even *attempting* to do the latter because I have little faith that any -current I bring in past the one I'm locked down to (r333619 May 16 UTC 2018) will do anything but burn my time trying to track down regressions. tl:dr; I have enough work to do without trying to fix other people's stuff. If that's harsh, so be it. mcl ___ 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-unsubscr...@freebsd.org"
svn commit: r335500 - head/sys/netinet
Author: mmacy Date: Thu Jun 21 18:40:15 2018 New Revision: 335500 URL: https://svnweb.freebsd.org/changeset/base/335500 Log: in_pcblookup_hash: validate inp before return Post r335356 it is possible to have an inpcb on the hash lists that is partially torn down. Validate before using. Also as a side effect of this change the lock ordering issue between hash lock and inpcb no longer exists allowing some simplification. Reported by: pho@ Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c == --- head/sys/netinet/in_pcb.c Thu Jun 21 18:13:04 2018(r335499) +++ head/sys/netinet/in_pcb.c Thu Jun 21 18:40:15 2018(r335500) @@ -2214,7 +2214,6 @@ found: INP_WUNLOCK(inp); else INP_RUNLOCK(inp); - INP_HASH_RUNLOCK(pcbinfo); return (NULL); } else if (!locked) in_pcbref(inp); @@ -2386,40 +2385,35 @@ in_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in struct ifnet *ifp) { struct inpcb *inp; - bool locked; INP_HASH_RLOCK(pcbinfo); inp = in_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, (lookupflags & ~(INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)), ifp); if (inp != NULL) { - if (lookupflags & INPLOOKUP_WLOCKPCB) - locked = INP_TRY_WLOCK(inp); - else if (lookupflags & INPLOOKUP_RLOCKPCB) - locked = INP_TRY_RLOCK(inp); - else - panic("%s: locking bug", __func__); - if (!locked) - in_pcbref(inp); - INP_HASH_RUNLOCK(pcbinfo); - if (!locked) { - if (lookupflags & INPLOOKUP_WLOCKPCB) { - INP_WLOCK(inp); - if (in_pcbrele_wlocked(inp)) - return (NULL); - } else { - INP_RLOCK(inp); - if (in_pcbrele_rlocked(inp)) - return (NULL); + if (lookupflags & INPLOOKUP_WLOCKPCB) { + INP_WLOCK(inp); + if (__predict_false(inp->inp_flags2 & INP_FREED)) { + INP_WUNLOCK(inp); + inp = NULL; } - } + } else if (lookupflags & INPLOOKUP_RLOCKPCB) { + INP_RLOCK(inp); + if (__predict_false(inp->inp_flags2 & INP_FREED)) { + INP_RUNLOCK(inp); + inp = NULL; + } + } else + panic("%s: locking bug", __func__); #ifdef INVARIANTS - if (lookupflags & INPLOOKUP_WLOCKPCB) - INP_WLOCK_ASSERT(inp); - else - INP_RLOCK_ASSERT(inp); + if (inp != NULL) { + if (lookupflags & INPLOOKUP_WLOCKPCB) + INP_WLOCK_ASSERT(inp); + else + INP_RLOCK_ASSERT(inp); + } #endif - } else - INP_HASH_RUNLOCK(pcbinfo); + } + INP_HASH_RUNLOCK(pcbinfo); return (inp); } ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r335402 - head/sbin/veriexecctl
On Thu, 2018-06-21 at 11:13 -0700, Conrad Meyer wrote: > On Thu, Jun 21, 2018 at 9:51 AM, Stephen Kiernan om> wrote: > > > > On Wed, Jun 20, 2018 at 10:36 PM, Eitan Adler > > wrote: > > > > > > > > > On 19 June 2018 at 20:08, Eitan Adler > > > wrote: > > > > > > > > On 19 June 2018 at 18:08, Stephen J. Kiernan > > > g> wrote: > > > > > > > > > > Added: head/sbin/veriexecctl/Makefile > > > > > > > > > > = > > > > > = > > > > > --- /dev/null 00:00:00 1970 (empty, because file is newly > > > > > added) > > > > > +++ head/sbin/veriexecctl/Makefile Wed Jun 20 01:08:54 > > > > > 2018 > > > > > (r335402) > > > > > @@ -0,0 +1,11 @@ > > > > > +# $FreeBSD$ > > > > > + > > > > > +PROG= veriexecctl > > > > > +MAN= veriexecctl.8 > > > > > +SRCS= veriexecctl_parse.y veriexecctl_conf.l veriexecctl.c > > > > > + > > > > > +WARNS?=3 > > > > Why are we introducing new code with lower-than-6 warnings ? > > > In all the commotion about the more important issues this fell > > > through. Also its argument parsing appears to not be using > > > getopt[_long] ? > > > > I replied to this 2 days ago with: > > "veriexecctl came from NetBSD originally and that is what they had, > > but I believe it should be able to be bumped up." > > > > However, there has been some discussion about just not putting in > > veriexecctl for now and wait for some work that Simon Gerraty has > > been > > doing, using some of the work for the verified loader, instead. > > However, it > > would also mean that in the meantime, there would be nothing > > available > > to be able to people to try out veriexec to provide some feedback > > until > > that utility was completed and committed. > Hi, > > While the code is out of HEAD, it can be posted to a github branch > (or > a projects/ branch if you prefer SVN) for people to try. > > Best regards, > Conrad > Yeah, put it on a branch where it'll get ignored for another two years. If this code had been committed long ago, as it probably should have been, then people would have been playing with it, and by time I needed it a few months ago there would have been all kinds of useful info in mailing lists and blogs about how to set it up and what was good and bad about it and so on. Iterative refinement would have been underway. Instead what I found was a bunch of patches and a big steep learning curve with no existing information about using it in the real world. With that info available, I/we ($work) would have been in a position to quickly adopt it and begin contributing to the ongoing refinement. Instead I had to conclude that product deadlines just didn't allow us to even try to get it working from a standing start as first-adopters, so we had to move in a different direction. Even though this is a better solution than what we did, business practicalities will likely prevent us from circling back and changing everything over to this scheme in the future, so now we'll end up never contributing much to this work. So, IMO, all this calling for things to be reverted isn't just inappropriate, it's actively harmful. This is -current where development happens and imperfection is expected. Hiding work in patchsets and reviews and alternate branches and other shadowy places because it's not perfect is just a way of ensuring it never gets any better. -- Ian ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r335402 - head/sbin/veriexecctl
On Thu, Jun 21, 2018 at 9:51 AM, Stephen Kiernan wrote: > On Wed, Jun 20, 2018 at 10:36 PM, Eitan Adler wrote: >> >> On 19 June 2018 at 20:08, Eitan Adler wrote: >> > On 19 June 2018 at 18:08, Stephen J. Kiernan wrote: >> >> Added: head/sbin/veriexecctl/Makefile >> >> >> >> == >> >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> >> +++ head/sbin/veriexecctl/Makefile Wed Jun 20 01:08:54 2018 >> >> (r335402) >> >> @@ -0,0 +1,11 @@ >> >> +# $FreeBSD$ >> >> + >> >> +PROG= veriexecctl >> >> +MAN= veriexecctl.8 >> >> +SRCS= veriexecctl_parse.y veriexecctl_conf.l veriexecctl.c >> >> + >> >> +WARNS?=3 >> > >> > Why are we introducing new code with lower-than-6 warnings ? >> >> In all the commotion about the more important issues this fell >> through. Also its argument parsing appears to not be using >> getopt[_long] ? > > > I replied to this 2 days ago with: > "veriexecctl came from NetBSD originally and that is what they had, > but I believe it should be able to be bumped up." > > However, there has been some discussion about just not putting in > veriexecctl for now and wait for some work that Simon Gerraty has been > doing, using some of the work for the verified loader, instead. However, it > would also mean that in the meantime, there would be nothing available > to be able to people to try out veriexec to provide some feedback until > that utility was completed and committed. Hi, While the code is out of HEAD, it can be posted to a github branch (or a projects/ branch if you prefer SVN) for people to try. Best regards, Conrad ___ 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-unsubscr...@freebsd.org"
svn commit: r335499 - in releng/11.2/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/installation en_US.ISO8859-1/relnotes share/xml
Author: gjb Date: Thu Jun 21 18:13:04 2018 New Revision: 335499 URL: https://svnweb.freebsd.org/changeset/base/335499 Log: Final touches to 11.2-RELEASE release notes: - Remove an empty section that was left over from a previous commit to prune empty sections. - Add a note about a late discovered issue with zfsd(8) (Bugzilla 228750). Fix a sentence stop while here. - Document SA-18:07, which had been included in RC3. - Fix FreeBSD versions in the installation.html page. Approved by: re (implicit, relnotes) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/errata/article.xml releng/11.2/release/doc/en_US.ISO8859-1/installation/article.xml releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml releng/11.2/release/doc/share/xml/security.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/errata/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 21 17:35:13 2018(r335498) +++ releng/11.2/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 21 18:13:04 2018(r335499) @@ -57,7 +57,7 @@ Introduction This errata document contains late-breaking - news about Before installing this + news about . Before installing this version, it is important to consult this document to learn about any post-release discoveries or problems that may already have been found and fixed. @@ -155,6 +155,23 @@ boot invocation of vagrant up will allow the virtual machine to successfully boot, allowing access via vagrant ssh. + + + + [2018-06-21] An issue had been discovered late in the + release cycle where removing ZFS vdevs + from a pool under certain conditions would cause a system + crash when is enabled in + . + + At present, it is believed to be limited to removal of + a mirror vdev from a pool consisting of + multiple mirror vdevs. + + See PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228750;>228750 + for more information and updates as the issue is + investigated. Modified: releng/11.2/release/doc/en_US.ISO8859-1/installation/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/installation/article.xmlThu Jun 21 17:35:13 2018(r335498) +++ releng/11.2/release/doc/en_US.ISO8859-1/installation/article.xmlThu Jun 21 18:13:04 2018(r335499) @@ -82,8 +82,8 @@ The utility supports binary upgrades of and systems running earlier FreeBSD releases. Systems running - 10.3-RELEASE, - 11.0-RELEASE can upgrade as follows: + 10.4-RELEASE or + 11.1-RELEASE can upgrade as follows: freebsd-update fetch freebsd-update install Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlThu Jun 21 17:35:13 2018(r335498) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlThu Jun 21 18:13:04 2018(r335499) @@ -458,13 +458,6 @@ updated to default to UEFI-only boot. - - - /etc/rc.d - Scripts - - - Modified: releng/11.2/release/doc/share/xml/security.xml == --- releng/11.2/release/doc/share/xml/security.xml Thu Jun 21 17:35:13 2018(r335498) +++ releng/11.2/release/doc/share/xml/security.xml Thu Jun 21 18:13:04 2018(r335499) @@ -113,6 +113,14 @@ Mishandling of x86 debug exceptions + + + FreeBSD-SA-18:07.lazyfpu + 21June2018 + Fix Lazy FPU information + disclosure + ___ 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-unsubscr...@freebsd.org"
svn commit: r335498 - head/sys/libkern
Author: cem Date: Thu Jun 21 17:35:13 2018 New Revision: 335498 URL: https://svnweb.freebsd.org/changeset/base/335498 Log: Sync strlcpy with userland version, again No functional change. Please remember to update libkern copies of libc functions when you update libc. Sponsored by: Dell EMC Isilon Modified: head/sys/libkern/strlcpy.c Modified: head/sys/libkern/strlcpy.c == --- head/sys/libkern/strlcpy.c Thu Jun 21 17:24:10 2018(r335497) +++ head/sys/libkern/strlcpy.c Thu Jun 21 17:35:13 2018(r335498) @@ -1,7 +1,7 @@ -/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $*/ +/* $OpenBSD: strlcpy.c,v 1.12 2015/01/15 03:54:12 millert Exp $*/ -/*- - * Copyright (c) 1998 Todd C. Miller +/* + * Copyright (c) 1998, 2015 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -23,32 +23,31 @@ __FBSDID("$FreeBSD$"); #include /* - * Copy src to string dst of size siz. At most siz-1 characters - * will be copied. Always NUL terminates (unless siz == 0). - * Returns strlen(src); if retval >= siz, truncation occurred. + * Copy string src to buffer dst of size dsize. At most dsize-1 + * chars will be copied. Always NUL terminates (unless dsize == 0). + * Returns strlen(src); if retval >= dsize, truncation occurred. */ size_t -strlcpy(char * __restrict dst, const char * __restrict src, size_t siz) +strlcpy(char * __restrict dst, const char * __restrict src, size_t dsize) { - char *d = dst; - const char *s = src; - size_t n = siz; + const char *osrc = src; + size_t nleft = dsize; - /* Copy as many bytes as will fit */ - if (n != 0) { - while (--n != 0) { - if ((*d++ = *s++) == '\0') + /* Copy as many bytes as will fit. */ + if (nleft != 0) { + while (--nleft != 0) { + if ((*dst++ = *src++) == '\0') break; } } - /* Not enough room in dst, add NUL and traverse rest of src */ - if (n == 0) { - if (siz != 0) - *d = '\0'; /* NUL-terminate dst */ - while (*s++) + /* Not enough room in dst, add NUL and traverse rest of src. */ + if (nleft == 0) { + if (dsize != 0) + *dst = '\0';/* NUL-terminate dst */ + while (*src++) ; } - return(s - src - 1);/* count does not include NUL */ + return(src - osrc - 1); /* count does not include NUL */ } ___ 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-unsubscr...@freebsd.org"
svn commit: r335497 - head/sys/netinet
Author: mmacy Date: Thu Jun 21 17:24:10 2018 New Revision: 335497 URL: https://svnweb.freebsd.org/changeset/base/335497 Log: raw_ip: validate inp Post r335356 it is possible to have an inpcb on the hash lists that is partially torn down. Validate before using. Reported by: pho Modified: head/sys/netinet/raw_ip.c Modified: head/sys/netinet/raw_ip.c == --- head/sys/netinet/raw_ip.c Thu Jun 21 17:05:31 2018(r335496) +++ head/sys/netinet/raw_ip.c Thu Jun 21 17:24:10 2018(r335497) @@ -331,6 +331,10 @@ rip_input(struct mbuf **mp, int *offp, int proto) } INP_RLOCK(inp); last = inp; + if (__predict_false(inp->inp_flags2 & INP_FREED)) { + last = NULL; + INP_RUNLOCK(inp); + } } CK_LIST_FOREACH(inp, _ripcbinfo.ipi_hashbase[0], inp_hash) { if (inp->inp_ip_p && inp->inp_ip_p != proto) ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r335476 - in head/sys: arm/allwinner conf
On Thu, 21 Jun 2018 11:49:21 + (UTC) Ilya Bakulin wrote: > Author: kibab > Date: Thu Jun 21 11:49:21 2018 > New Revision: 335476 > URL: https://svnweb.freebsd.org/changeset/base/335476 > > Log: > Add MMCCAM support to AllWinner MMC driver > > Using MMCCAM on AllWinner boards is now possible, reaching highest > possible data transfer speed. > > For now, MMCCAM doesn't scan cards on boot. This means that scanning > has to be done manually and that it's not possible to mount root FS > from MMC/SD card since there is no block device at the boot time. > > For manually scanning the cards, run: > # camcontrol rescan X:0:0 > Where X is the bus number (look at camcontrol devlist to determine > bus number assigned to the MMC controller). > > Reviewed by:manu No, as I said in the review I haven't reviewed it since I know nothing about CAM. > Approved by:imp (mentor) > Differential Revision: https://reviews.freebsd.org/D15891 > > Modified: > head/sys/arm/allwinner/aw_mmc.c > head/sys/arm/allwinner/files.allwinner > head/sys/conf/files.arm64 > > Modified: head/sys/arm/allwinner/aw_mmc.c > == > --- head/sys/arm/allwinner/aw_mmc.c Thu Jun 21 11:43:54 2018 > (r335475) > +++ head/sys/arm/allwinner/aw_mmc.c Thu Jun 21 11:49:21 2018 > (r335476) > @@ -55,6 +55,16 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include "opt_mmccam.h" > + > +#ifdef MMCCAM > +#include > +#include > +#include > +#include > +#include > +#endif > + > #define AW_MMC_MEMRES 0 > #define AW_MMC_IRQRES 1 > #define AW_MMC_RESSZ2 > @@ -112,7 +122,14 @@ struct aw_mmc_softc { > int aw_timeout; > struct callout aw_timeoutc; > struct mmc_host aw_host; > +#ifdef MMCCAM > + union ccb * ccb; > + struct cam_devq * devq; > + struct cam_sim *sim; > + struct mtx sim_mtx; > +#else > struct mmc_request *aw_req; > +#endif > struct mtx aw_mtx; > struct resource * aw_res[AW_MMC_RESSZ]; > struct aw_mmc_conf *aw_mmc_conf; > @@ -148,11 +165,19 @@ static int aw_mmc_init(struct aw_mmc_softc *); > static void aw_mmc_intr(void *); > static int aw_mmc_update_clock(struct aw_mmc_softc *, uint32_t); > > +static void aw_mmc_print_error(uint32_t); > static int aw_mmc_update_ios(device_t, device_t); > static int aw_mmc_request(device_t, device_t, struct mmc_request *); > static int aw_mmc_get_ro(device_t, device_t); > static int aw_mmc_acquire_host(device_t, device_t); > static int aw_mmc_release_host(device_t, device_t); > +#ifdef MMCCAM > +static void aw_mmc_cam_action(struct cam_sim *, union ccb *); > +static void aw_mmc_cam_poll(struct cam_sim *); > +static int aw_mmc_cam_settran_settings(struct aw_mmc_softc *, union ccb *); > +static int aw_mmc_cam_request(struct aw_mmc_softc *, union ccb *); > +static void aw_mmc_cam_handle_mmcio(struct cam_sim *, union ccb *); > +#endif > > #define AW_MMC_LOCK(_sc)mtx_lock(&(_sc)->aw_mtx) > #define AW_MMC_UNLOCK(_sc) mtx_unlock(&(_sc)->aw_mtx) > @@ -161,7 +186,201 @@ static int aw_mmc_release_host(device_t, device_t); > #define AW_MMC_WRITE_4(_sc, _reg, _value) > \ > bus_write_4((_sc)->aw_res[AW_MMC_MEMRES], _reg, _value) > > +#ifdef MMCCAM > +static void > +aw_mmc_cam_handle_mmcio(struct cam_sim *sim, union ccb *ccb) > +{ > + struct aw_mmc_softc *sc; > + > + sc = cam_sim_softc(sim); > + > + aw_mmc_cam_request(sc, ccb); > +} > + > +static void > +aw_mmc_cam_action(struct cam_sim *sim, union ccb *ccb) > +{ > + struct aw_mmc_softc *sc; > + > + sc = cam_sim_softc(sim); > + if (sc == NULL) { > + ccb->ccb_h.status = CAM_SEL_TIMEOUT; > + xpt_done(ccb); > + return; > + } > + > + mtx_assert(>sim_mtx, MA_OWNED); > + > + switch (ccb->ccb_h.func_code) { > + case XPT_PATH_INQ: > + { > + struct ccb_pathinq *cpi; > + > + cpi = >cpi; > + cpi->version_num = 1; > + cpi->hba_inquiry = 0; > + cpi->target_sprt = 0; > + cpi->hba_misc = PIM_NOBUSRESET | PIM_SEQSCAN; > + cpi->hba_eng_cnt = 0; > + cpi->max_target = 0; > + cpi->max_lun = 0; > + cpi->initiator_id = 1; > + cpi->maxio = (sc->aw_mmc_conf->dma_xferlen * > + AW_MMC_DMA_SEGS) / MMC_SECTOR_SIZE; > + strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); > + strncpy(cpi->hba_vid, "Deglitch Networks", HBA_IDLEN); > + strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); > + cpi->unit_number = cam_sim_unit(sim); > + cpi->bus_id = cam_sim_bus(sim); > +
svn commit: r335496 - in stable/11/release/doc/en_US.ISO8859-1: errata hardware readme relnotes
Author: gjb Date: Thu Jun 21 17:05:31 2018 New Revision: 335496 URL: https://svnweb.freebsd.org/changeset/base/335496 Log: Add xml:id attributes for future diff reduction. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml stable/11/release/doc/en_US.ISO8859-1/readme/article.xml stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xmlThu Jun 21 16:53:48 2018(r335495) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xmlThu Jun 21 17:05:31 2018(r335496) @@ -14,6 +14,7 @@ http://docbook.org/ns/docbook; xmlns:xlink="http://www.w3.org/1999/xlink; + xml:id="top" version="5.0"> Errata Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Jun 21 16:53:48 2018(r335495) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Jun 21 17:05:31 2018(r335496) @@ -7,7 +7,9 @@ %devauto; ]> http://docbook.org/ns/docbook; - xmlns:xlink="http://www.w3.org/1999/xlink; version="5.0"> + xmlns:xlink="http://www.w3.org/1999/xlink; + xml:id="top" + version="5.0"> Hardware Notes Modified: stable/11/release/doc/en_US.ISO8859-1/readme/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/readme/article.xmlThu Jun 21 16:53:48 2018(r335495) +++ stable/11/release/doc/en_US.ISO8859-1/readme/article.xmlThu Jun 21 17:05:31 2018(r335496) @@ -13,7 +13,9 @@ End: --> http://docbook.org/ns/docbook; - xmlns:xlink="http://www.w3.org/1999/xlink; version="5.0"> + xmlns:xlink="http://www.w3.org/1999/xlink; + xml:id="top" + version="5.0"> README @@ -70,7 +72,7 @@ , the latest point along the branch. - + About is an operating system based on 4.4 BSD Lite for @@ -107,7 +109,7 @@ be quickly installed from the installation program. - + Target Audience This is aimed @@ -163,7 +165,7 @@ complete distribution, rather than updating an existing installation. - + CDROM and DVD -RELEASE distributions may be ordered on CDROM or DVD @@ -180,7 +182,7 @@ appendix to the Handbook. - + HTTPS releases may be downloaded via @@ -189,7 +191,7 @@ which is the official release site. - + FTP You can use FTP to retrieve and any or all of its @@ -222,7 +224,7 @@ Contacting the Project - + Email and Mailing Lists For any questions or general technical support issues, @@ -265,7 +267,7 @@ - + Submitting Problem Reports Suggestions, bug reports and contributions of code are @@ -369,7 +371,7 @@ - + Manual Pages As with almost all like operating systems, @@ -387,7 +389,7 @@ and (a style guide to kernel coding). - + Books and Articles Two highly-useful collections of -related information, Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 21 16:53:48 2018(r335495) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 21 17:05:31 2018(r335496) @@ -11,7 +11,9 @@ ]> http://docbook.org/ns/docbook; - xmlns:xlink="http://www.w3.org/1999/xlink; version="5.0"> + xmlns:xlink="http://www.w3.org/1999/xlink; + xml:id="top" + version="5.0"> Release Notes ___ 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-unsubscr...@freebsd.org"
svn commit: r335495 - stable/11/release/doc/share/xml
Author: gjb Date: Thu Jun 21 16:53:48 2018 New Revision: 335495 URL: https://svnweb.freebsd.org/changeset/base/335495 Log: Document EN-18:07, SA-18:07. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/errata.xml == --- stable/11/release/doc/share/xml/errata.xml Thu Jun 21 16:40:07 2018 (r335494) +++ stable/11/release/doc/share/xml/errata.xml Thu Jun 21 16:53:48 2018 (r335495) @@ -88,6 +88,13 @@ Update timezone database information + + + FreeBSD-EN-18:07.pmap + 21June2018 + Fix TLB for Xen guests + Modified: stable/11/release/doc/share/xml/security.xml == --- stable/11/release/doc/share/xml/security.xmlThu Jun 21 16:40:07 2018(r335494) +++ stable/11/release/doc/share/xml/security.xmlThu Jun 21 16:53:48 2018(r335495) @@ -114,6 +114,14 @@ Mishandling of x86 debug exceptions + + + FreeBSD-SA-18:07.lazyfpu + 21June2018 + Fix Lazy FPU information + disclosure + ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r335402 - head/sbin/veriexecctl
On Wed, Jun 20, 2018 at 10:36 PM, Eitan Adler wrote: > On 19 June 2018 at 20:08, Eitan Adler wrote: > > On 19 June 2018 at 18:08, Stephen J. Kiernan wrote: > >> Added: head/sbin/veriexecctl/Makefile > >> > == > >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) > >> +++ head/sbin/veriexecctl/Makefile Wed Jun 20 01:08:54 2018 > (r335402) > >> @@ -0,0 +1,11 @@ > >> +# $FreeBSD$ > >> + > >> +PROG= veriexecctl > >> +MAN= veriexecctl.8 > >> +SRCS= veriexecctl_parse.y veriexecctl_conf.l veriexecctl.c > >> + > >> +WARNS?=3 > > > > Why are we introducing new code with lower-than-6 warnings ? > > In all the commotion about the more important issues this fell > through. Also its argument parsing appears to not be using > getopt[_long] ? > I replied to this 2 days ago with: "veriexecctl came from NetBSD originally and that is what they had, but I believe it should be able to be bumped up." However, there has been some discussion about just not putting in veriexecctl for now and wait for some work that Simon Gerraty has been doing, using some of the work for the verified loader, instead. However, it would also mean that in the meantime, there would be nothing available to be able to people to try out veriexec to provide some feedback until that utility was completed and committed. -Steve ___ 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-unsubscr...@freebsd.org"
svn commit: r335494 - head/sys/sys
Author: bdrewery Date: Thu Jun 21 16:40:07 2018 New Revision: 335494 URL: https://svnweb.freebsd.org/changeset/base/335494 Log: Minor comment fix d_namelen -> d_namlen Modified: head/sys/sys/dirent.h Modified: head/sys/sys/dirent.h == --- head/sys/sys/dirent.h Thu Jun 21 16:39:38 2018(r335493) +++ head/sys/sys/dirent.h Thu Jun 21 16:40:07 2018(r335494) @@ -58,7 +58,7 @@ typedef __off_t off_t; * byte boundary with null bytes. All names are guaranteed null terminated. * The maximum length of a name in a directory is MAXNAMLEN. * - * Explicit padding between the last member of the header (d_namelen) and + * Explicit padding between the last member of the header (d_namlen) and * d_name avoids ABI padding at the end of dirent on LP64 architectures. * There is code depending on d_name being last. */ ___ 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-unsubscr...@freebsd.org"
svn commit: r335493 - head/share/man/man5
Author: bdrewery Date: Thu Jun 21 16:39:38 2018 New Revision: 335493 URL: https://svnweb.freebsd.org/changeset/base/335493 Log: ino64 uses 8 byte padding now. Modified: head/share/man/man5/dir.5 Modified: head/share/man/man5/dir.5 == --- head/share/man/man5/dir.5 Thu Jun 21 16:12:30 2018(r335492) +++ head/share/man/man5/dir.5 Thu Jun 21 16:39:38 2018(r335493) @@ -28,7 +28,7 @@ .\" @(#)dir.5 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd February 13, 2017 +.Dd June 20, 2018 .Dt DIR 5 .Os .Sh NAME @@ -90,7 +90,7 @@ The directory entry format is defined in the file * * A directory entry has a struct dirent at the front of it, containing its * inode number, the length of the entry, and the length of the name - * contained in the entry. These are followed by the name padded to a 4 + * contained in the entry. These are followed by the name padded to a 8 * byte boundary with null bytes. All names are guaranteed null terminated. * The maximum length of a name in a directory is MAXNAMLEN. * Explicit pad is added between the last member of the header and ___ 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-unsubscr...@freebsd.org"
svn commit: r335492 - stable/11/usr.sbin/syslogd
Author: ed Date: Thu Jun 21 16:12:30 2018 New Revision: 335492 URL: https://svnweb.freebsd.org/changeset/base/335492 Log: MFC r335314: Fix bad logic in iovlist_truncate(). To conform to RFC 5426, this function is intended to truncate messages if they exceed the message size limits. Unfortunately, the amount of space was computed the wrong way around, causing messages to be truncated entirely. Reported by: Michael Grimm on stable@ Modified: stable/11/usr.sbin/syslogd/syslogd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/syslogd/syslogd.c == --- stable/11/usr.sbin/syslogd/syslogd.cThu Jun 21 15:59:05 2018 (r335491) +++ stable/11/usr.sbin/syslogd/syslogd.cThu Jun 21 16:12:30 2018 (r335492) @@ -1611,8 +1611,8 @@ iovlist_truncate(struct iovlist *il, size_t size) struct iovec *last; size_t diff; - while (size > il->totalsize) { - diff = size - il->totalsize; + while (il->totalsize > size) { + diff = il->totalsize - size; last = >iov[il->iovcnt - 1]; if (diff >= last->iov_len) { /* Remove the last iovec entirely. */ ___ 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-unsubscr...@freebsd.org"
svn commit: r335491 - head/sys/powerpc/cpufreq
Author: jhibbits Date: Thu Jun 21 15:59:05 2018 New Revision: 335491 URL: https://svnweb.freebsd.org/changeset/base/335491 Log: Fix the build post-PMCR addition. Submitted by: lwhsu Modified: head/sys/powerpc/cpufreq/pmcr.c Modified: head/sys/powerpc/cpufreq/pmcr.c == --- head/sys/powerpc/cpufreq/pmcr.c Thu Jun 21 15:47:47 2018 (r335490) +++ head/sys/powerpc/cpufreq/pmcr.c Thu Jun 21 15:59:05 2018 (r335491) @@ -195,7 +195,7 @@ pmcr_set(device_t dev, const struct cf_setting *set) pmcr = ((long)pstate_ids[set->spec[0]] << PMCR_LOWERPS_SHIFT) & PMCR_LOWERPS_MASK; pmcr |= ((long)pstate_ids[set->spec[0]] << PMCR_UPPERPS_SHIFT) & - PMCR_UPPERPS_MASK + PMCR_UPPERPS_MASK; pmcr |= PMCR_VERSION_1; mtspr(SPR_PMCR, pmcr); ___ 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-unsubscr...@freebsd.org"
svn commit: r335490 - head/sys/dev/xen/grant_table
Author: royger Date: Thu Jun 21 15:47:47 2018 New Revision: 335490 URL: https://svnweb.freebsd.org/changeset/base/335490 Log: xen: check if there are clients waiting in gnttab_end_foreign_access_references Without a call to check_free_callbacks() clients waiting for grant references would not be woken up even when there are sufficient grant references available. The check was likely left out as a mistake when the function was first added. Note that other functions used to free grant references already call check_free_callbacks. Submitted by: pratyush Reviewed by: royger Differential review: https://reviews.freebsd.org/D15899 Modified: head/sys/dev/xen/grant_table/grant_table.c Modified: head/sys/dev/xen/grant_table/grant_table.c == --- head/sys/dev/xen/grant_table/grant_table.c Thu Jun 21 15:21:17 2018 (r335489) +++ head/sys/dev/xen/grant_table/grant_table.c Thu Jun 21 15:47:47 2018 (r335490) @@ -245,6 +245,7 @@ gnttab_end_foreign_access_references(u_int count, gran gnttab_free_count += count; gnttab_entry(tail) = gnttab_free_head; gnttab_free_head = head; + check_free_callbacks(); mtx_unlock(_list_lock); } } ___ 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-unsubscr...@freebsd.org"
svn commit: r335489 - head/lib/libc/sys
Author: ian Date: Thu Jun 21 15:21:17 2018 New Revision: 335489 URL: https://svnweb.freebsd.org/changeset/base/335489 Log: Add some words clarifying that rename(2) does nothing when the 'from' and 'to' args are the same file. Wording borrowed from POSIX.1-2017, but the freebsd code to implement this behavior was added in 2002 (r103180). Modified: head/lib/libc/sys/rename.2 Modified: head/lib/libc/sys/rename.2 == --- head/lib/libc/sys/rename.2 Thu Jun 21 15:11:14 2018(r335488) +++ head/lib/libc/sys/rename.2 Thu Jun 21 15:21:17 2018(r335489) @@ -28,7 +28,7 @@ .\" @(#)rename.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 15, 2017 +.Dd June 21, 2018 .Dt RENAME 2 .Os .Sh NAME @@ -75,6 +75,15 @@ If the final component of is a symbolic link, the symbolic link is renamed, not the file or directory to which it points. +.Pp +If +.Fa from +and +.Fa to +resolve to the same directory entry, or to different directory +entries for the same existing file, +.Fn rename +returns success without taking any further action. .Pp The .Fn renameat ___ 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-unsubscr...@freebsd.org"
svn commit: r335488 - stable/11/usr.sbin/bsdconfig
Author: dteske Date: Thu Jun 21 15:11:14 2018 New Revision: 335488 URL: https://svnweb.freebsd.org/changeset/base/335488 Log: MFC r335306: bsdconfig: Make examples optional PR: bin/228485 Submitted by: Dmitry Wagin Reported by: Dmitry Wagin Sponsored by: Smule, Inc. Modified: stable/11/usr.sbin/bsdconfig/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdconfig/Makefile == --- stable/11/usr.sbin/bsdconfig/Makefile Thu Jun 21 15:02:17 2018 (r335487) +++ stable/11/usr.sbin/bsdconfig/Makefile Thu Jun 21 15:11:14 2018 (r335488) @@ -1,10 +1,11 @@ # $FreeBSD$ +.include + SUBDIR=console \ diskmgmt \ docsinstall \ dot \ - examples \ include \ includes \ mouse \ @@ -17,6 +18,10 @@ SUBDIR= console \ timezone \ ttys \ usermgmt + +.if ${MK_EXAMPLES} != "no" +SUBDIR+= examples +.endif FILESDIR= ${LIBEXECDIR}/bsdconfig FILES= USAGE ___ 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-unsubscr...@freebsd.org"
svn commit: r335487 - stable/10/usr.sbin/bsdconfig/usermgmt/share
Author: dteske Date: Thu Jun 21 15:02:17 2018 New Revision: 335487 URL: https://svnweb.freebsd.org/changeset/base/335487 Log: MFC r335308: bsdconfig: Fix a bug when editing users The usermgmt API was stomping on a global ($user_gid to be specific) so things would appear to work fine until you tried to make a second pass into the API with the now-tainted variable contents. Fixed by localizing menu-specific contents as to not leak outside API. PR: bin/208774 Reported by: Martin Waschbuesch Sponsored by: Smule, Inc. Modified: stable/10/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/usermgmt/share/user_input.subr == --- stable/10/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Thu Jun 21 14:59:23 2018(r335486) +++ stable/10/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Thu Jun 21 15:02:17 2018(r335487) @@ -1020,13 +1020,6 @@ f_dialog_menu_user_add() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1038,6 +1031,14 @@ f_dialog_menu_user_add() eval f_shell_escape \"\$user_$var\" _user_$var done + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi + menu_list=" 'X' '$msg_add/$msg_exit' '1' '$msg_login: $_user_name' @@ -1137,13 +1138,6 @@ f_dialog_menu_user_delete() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1155,6 +1149,14 @@ f_dialog_menu_user_delete() eval f_shell_escape \"\$user_$var\" _user_$var done + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi + menu_list=" 'X' '$msg_delete/$msg_exit' '1' '$msg_login: $_user_name' @@ -1254,13 +1256,6 @@ f_dialog_menu_user_edit() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1271,6 +1266,14 @@ f_dialog_menu_user_edit() local _user_$var eval f_shell_escape \"\$user_$var\" _user_$var done + + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi menu_list=" 'X' '$msg_save/$msg_exit' ___ 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-unsubscr...@freebsd.org"
svn commit: r335486 - head/sys/conf
Author: ian Date: Thu Jun 21 14:59:23 2018 New Revision: 335486 URL: https://svnweb.freebsd.org/changeset/base/335486 Log: Add a note about using option VERBOSE_SYSINIT=0 to get the verbose code compiled in but disabled by default. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Thu Jun 21 14:55:26 2018(r335485) +++ head/sys/conf/NOTES Thu Jun 21 14:59:23 2018(r335486) @@ -2861,7 +2861,9 @@ options IFMEDIA_DEBUG # enable debugging in net/if_me # # Make the SYSINIT process performed by mi_startup() verbose. This is very # useful when porting to a new architecture. If DDB is also enabled, this -# will print function names instead of addresses. +# will print function names instead of addresses. If defined with a value +# of zero, the verbose code is compiled-in but disabled by default, and can +# be enabled with the debug.verbose_sysinit=1 tunable. optionsVERBOSE_SYSINIT # ___ 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-unsubscr...@freebsd.org"
svn commit: r335485 - stable/11/usr.sbin/bsdconfig/usermgmt/share
Author: dteske Date: Thu Jun 21 14:55:26 2018 New Revision: 335485 URL: https://svnweb.freebsd.org/changeset/base/335485 Log: MFC r335308: bsdconfig: Fix a bug when editing users The usermgmt API was stomping on a global ($user_gid to be specific) so things would appear to work fine until you tried to make a second pass into the API with the now-tainted variable contents. Fixed by localizing menu-specific contents as to not leak outside API. PR: bin/208774 Reported by: Martin Waschbuesch Sponsored by: Smule, Inc. Modified: stable/11/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdconfig/usermgmt/share/user_input.subr == --- stable/11/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Thu Jun 21 14:41:58 2018(r335484) +++ stable/11/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Thu Jun 21 14:55:26 2018(r335485) @@ -1020,13 +1020,6 @@ f_dialog_menu_user_add() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1038,6 +1031,14 @@ f_dialog_menu_user_add() eval f_shell_escape \"\$user_$var\" _user_$var done + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi + menu_list=" 'X' '$msg_add/$msg_exit' '1' '$msg_login: $_user_name' @@ -1137,13 +1138,6 @@ f_dialog_menu_user_delete() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1155,6 +1149,14 @@ f_dialog_menu_user_delete() eval f_shell_escape \"\$user_$var\" _user_$var done + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi + menu_list=" 'X' '$msg_delete/$msg_exit' '1' '$msg_login: $_user_name' @@ -1254,13 +1256,6 @@ f_dialog_menu_user_edit() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1271,6 +1266,14 @@ f_dialog_menu_user_edit() local _user_$var eval f_shell_escape \"\$user_$var\" _user_$var done + + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi menu_list=" 'X' '$msg_save/$msg_exit' ___ 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-unsubscr...@freebsd.org"
svn commit: r335484 - stable/11/usr.sbin/bsdconfig/share
Author: dteske Date: Thu Jun 21 14:41:58 2018 New Revision: 335484 URL: https://svnweb.freebsd.org/changeset/base/335484 Log: MFC r335280-r335281, r335302: sysrc.subr updates r335280: Fix handling of files with missing newline at EOF r335302: Fix a comment for accuracy PR: bin/203435 Reported by: Andreas Sommer r335281: Fix display when value is "-n" PR: bin/226406 Reported by: Marius Halden Sponsored by: Smule, Inc. Modified: stable/11/usr.sbin/bsdconfig/share/sysrc.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdconfig/share/sysrc.subr == --- stable/11/usr.sbin/bsdconfig/share/sysrc.subr Thu Jun 21 14:30:14 2018(r335483) +++ stable/11/usr.sbin/bsdconfig/share/sysrc.subr Thu Jun 21 14:41:58 2018(r335484) @@ -200,7 +200,7 @@ f_sysrc_get() # such as "${varname?}" and "${varname:?}" (see "Parameter # Expansion" in sh(1) for more information). # - eval echo '"${'"$1"'}"' 2> /dev/null + eval printf "'%s\\n'" '"${'"$1"'}"' 2> /dev/null ) } @@ -338,7 +338,7 @@ f_sysrc_get_default() # such as "${varname?}" and "${varname:?}" (see "Parameter # Expansion" in sh(1) for more information). # - eval echo '"${'"$1"'}"' 2> /dev/null + eval printf "'%s\\n'" '"${'"$1"'}"' 2> /dev/null ) } @@ -556,9 +556,16 @@ f_sysrc_set() fi # - # If not found, append new value to last file and return. + # If not found, append new value to first file and return. # if [ "$not_found" ]; then + # Add a newline if missing before appending to the file + awk 'BEGIN { wc = 0 } NR == 1 { + (cmd = "wc -l " FILENAME) | getline + close(cmd) + wc = $1 + } END { exit wc != NR }' "$file" || + echo >> "$file" || return $? echo "$varname=\"$new_value\"" >> "$file" return $? fi @@ -606,8 +613,11 @@ f_sysrc_set() # # Operate on the matching file, replacing only the last occurrence. # + # Use awk to ensure LF at end of each line, else files without ending + # LF will trigger a bug in `tail -r' where last two lines are joined. + # local new_contents retval - new_contents=$( tail -r $file 2> /dev/null ) + new_contents=$( awk 1 "$file" 2> /dev/null | tail -r ) new_contents=$( echo "$new_contents" | awk -v varname="$varname" \ -v new_value="$new_value" "$f_sysrc_set_awk" ) retval=$? ___ 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-unsubscr...@freebsd.org"
svn commit: r335483 - in head/sys: conf powerpc/include
Author: jhibbits Date: Thu Jun 21 14:30:14 2018 New Revision: 335483 URL: https://svnweb.freebsd.org/changeset/base/335483 Log: Add the rest of the files for r335481 Missed hooking PMCR cpufreq(4) to the build, and adding the SPR to the header. Modified: head/sys/conf/files.powerpc head/sys/powerpc/include/spr.h Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Thu Jun 21 14:28:20 2018(r335482) +++ head/sys/conf/files.powerpc Thu Jun 21 14:30:14 2018(r335483) @@ -121,6 +121,7 @@ powerpc/booke/spe.c optionalpowerpcspe powerpc/cpufreq/dfs.c optionalcpufreq powerpc/cpufreq/mpc85xx_jog.c optionalcpufreq mpc85xx powerpc/cpufreq/pcr.c optionalcpufreq aim +powerpc/cpufreq/pmcr.c optionalcpufreq aim powerpc64 powerpc/cpufreq/pmufreq.c optionalcpufreq aim pmu powerpc/fpu/fpu_add.c optionalfpu_emu powerpc/fpu/fpu_compare.c optionalfpu_emu Modified: head/sys/powerpc/include/spr.h == --- head/sys/powerpc/include/spr.h Thu Jun 21 14:28:20 2018 (r335482) +++ head/sys/powerpc/include/spr.h Thu Jun 21 14:30:14 2018 (r335483) @@ -384,6 +384,7 @@ #defineSPR_MD_RAM0 0x339 /* ..8 IMMU RAM entry read reg 0 */ #defineSPR_MD_RAM1 0x33a /* ..8 IMMU RAM entry read reg 1 */ #defineSPR_PSSCR 0x357 /* Processor Stop Status and Control Register (ISA 3.0) */ +#defineSPR_PMCR0x374 /* Processor Management Control Register */ #defineSPR_UMMCR2 0x3a0 /* .6. User Monitor Mode Control Register 2 */ #defineSPR_UMMCR0 0x3a8 /* .6. User Monitor Mode Control Register 0 */ #defineSPR_USIA0x3ab /* .6. User Sampled Instruction Address */ ___ 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-unsubscr...@freebsd.org"
svn commit: r335482 - in head: . usr.bin usr.bin/elfcopy usr.bin/objcopy
Author: emaste Date: Thu Jun 21 14:28:20 2018 New Revision: 335482 URL: https://svnweb.freebsd.org/changeset/base/335482 Log: Rename usr.bin/elfcopy to usr.bin/objcopy We always install ELF Tool Chain's elfcopy as objcopy, so to avoid confusion rename the src directory containing our reach-over Makefile to match. Requested by: jhb Sponsored by: The FreeBSD Foundation Added: head/usr.bin/objcopy/ - copied from r335481, head/usr.bin/elfcopy/ Deleted: head/usr.bin/elfcopy/ Modified: head/Makefile.inc1 head/usr.bin/Makefile Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Jun 21 14:26:43 2018(r335481) +++ head/Makefile.inc1 Thu Jun 21 14:28:20 2018(r335482) @@ -2182,7 +2182,7 @@ _binutils=gnu/usr.bin/binutils .if ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" _elftctools= lib/libelftc \ lib/libpe \ - usr.bin/elfcopy \ + usr.bin/objcopy \ usr.bin/nm \ usr.bin/size \ usr.bin/strings @@ -2195,7 +2195,7 @@ _elftctools+= usr.bin/addr2line # the target (for at least crunchide). _elftctools= lib/libelftc \ lib/libpe \ - usr.bin/elfcopy + usr.bin/objcopy .endif .if ${MK_CLANG_BOOTSTRAP} != "no" @@ -2280,7 +2280,7 @@ NXBDIRS+= \ usr.bin/cmp \ usr.bin/diff \ usr.bin/dirname \ -usr.bin/elfcopy \ +usr.bin/objcopy \ usr.bin/env \ usr.bin/fetch \ usr.bin/find \ Modified: head/usr.bin/Makefile == --- head/usr.bin/Makefile Thu Jun 21 14:26:43 2018(r335481) +++ head/usr.bin/Makefile Thu Jun 21 14:28:20 2018(r335482) @@ -264,7 +264,7 @@ SUBDIR.${MK_TOOLCHAIN}+=c89 SUBDIR.${MK_TOOLCHAIN}+= c99 SUBDIR.${MK_TOOLCHAIN}+= ctags SUBDIR.${MK_TOOLCHAIN}+= cxxfilt -SUBDIR.${MK_TOOLCHAIN}+= elfcopy +SUBDIR.${MK_TOOLCHAIN}+= objcopy SUBDIR.${MK_TOOLCHAIN}+= file2c # ARM64TODO gprof does not build # RISCVTODO gprof does not build ___ 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-unsubscr...@freebsd.org"
svn commit: r335481 - in head/sys: kern powerpc/cpufreq sys
Author: jhibbits Date: Thu Jun 21 14:26:43 2018 New Revision: 335481 URL: https://svnweb.freebsd.org/changeset/base/335481 Log: Introduce PMCR-based cpufreq(4) driver, for IBM POWER8 and POWER9 systems Summary: POWER8 and POWER9 use a single CPU register, per core, to change clock speed. Everything else is handled by the on-chip controller. This change necessitates a change to the cpufreq global kernel driver to bump supported levels, as the device tree for these systems can have theoretically 256 different options. On my POWER9 Talos, the list consists of 100 items. At 16.67MHz intervals, that allows for a change of roughly 1.67GHz between lowest and highest. This has only been tested on the POWER9. However, since they're similar, this should work on POWER8 as well. Reviewed By: nwhitehorn Differential Revision: https://reviews.freebsd.org/D15932 Added: head/sys/powerpc/cpufreq/pmcr.c (contents, props changed) Modified: head/sys/kern/kern_cpu.c head/sys/sys/cpu.h Modified: head/sys/kern/kern_cpu.c == --- head/sys/kern/kern_cpu.cThu Jun 21 14:21:11 2018(r335480) +++ head/sys/kern/kern_cpu.cThu Jun 21 14:26:43 2018(r335481) @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); * Number of levels we can handle. Levels are synthesized from settings * so for M settings and N drivers, there may be M*N levels. */ -#define CF_MAX_LEVELS 64 +#define CF_MAX_LEVELS 256 struct cf_saved_freq { struct cf_level level; Added: head/sys/powerpc/cpufreq/pmcr.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/cpufreq/pmcr.c Thu Jun 21 14:26:43 2018 (r335481) @@ -0,0 +1,248 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Justin Hibbits + * + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + +#include "cpufreq_if.h" + +static int pstate_ids[256]; +static int pstate_freqs[256]; +static int npstates; + +static void parse_pstates(void) +{ + phandle_t node; + + node = OF_finddevice("/ibm,opal/power-mgt"); + + /* If this fails, npstates will remain 0, and any attachment will bail. */ + if (node == -1) + return; + + npstates = OF_getencprop(node, "ibm,pstate-ids", pstate_ids, + sizeof(pstate_ids)); + if (npstates < 0) { + npstates = 0; + return; + } + + if (OF_getencprop(node, "ibm,pstate-frequencies-mhz", pstate_freqs, + sizeof(pstate_freqs)) != npstates) { + npstates = 0; + return; + } + npstates /= sizeof(cell_t); + +} + +/* Make this a sysinit so it runs before the cpufreq driver attaches. */ +SYSINIT(parse_pstates, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, parse_pstates, NULL); + +#definePMCR_UPPERPS_MASK 0xff00UL +#definePMCR_UPPERPS_SHIFT 56 +#definePMCR_LOWERPS_MASK 0x00ffUL +#definePMCR_LOWERPS_SHIFT 48 +#definePMCR_VERSION_MASK 0x000f +#define PMCR_VERSION_1 1 + +struct pmcr_softc { + device_t dev; +}; + +static voidpmcr_identify(driver_t *driver, device_t parent); +static int pmcr_probe(device_t dev); +static int pmcr_attach(device_t dev); +static int pmcr_settings(device_t dev, struct cf_setting *sets, int *count); +static int pmcr_set(device_t dev, const struct cf_setting *set); +static
svn commit: r335480 - stable/11/share/examples
Author: dteske Date: Thu Jun 21 14:21:11 2018 New Revision: 335480 URL: https://svnweb.freebsd.org/changeset/base/335480 Log: MFC r330886: Install files added in SVN's r295373, r295457, r295542 Reported by: woodsb02 Sponsored by: Smule, Inc. Modified: stable/11/share/examples/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/examples/Makefile == --- stable/11/share/examples/Makefile Thu Jun 21 14:04:02 2018 (r335479) +++ stable/11/share/examples/Makefile Thu Jun 21 14:21:11 2018 (r335480) @@ -76,6 +76,12 @@ XFILES= BSD_daemon/FreeBSD.pfa \ indent/indent.pro \ ipfw/change_rules.sh \ jails/README \ + jails/VIMAGE \ + jails/jail.xxx.conf \ + jails/jib \ + jails/jng \ + jails/rc.conf.jails \ + jails/rcjail.xxx.conf \ kld/Makefile \ kld/cdev/Makefile \ kld/cdev/README \ ___ 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-unsubscr...@freebsd.org"
svn commit: r335479 - head/sys/kern
Author: kevans Date: Thu Jun 21 14:04:02 2018 New Revision: 335479 URL: https://svnweb.freebsd.org/changeset/base/335479 Log: subr_hints: simplify a little bit Some complexity exists in these bits that isn't needed. The sysctl handler, upon change to '2', runs through the current set of hints and sets them in the kenv. However, this isn't at all necessary if we're pulling hints from the kenv, static or dynamic, as the former will get added to the latter in init_dynamic_kenv (see: kern_environment.c). We can reduce this configuration to just adding static_hints to the kenv if we were previously using them. The changes in res_find are minimal and based on the observation that once use_kenv gets set to '1' it will never be reset to '0', and it gets set to '1' as soon as we hit fallback mode. Later work will refactor res_find a little bit and eliminate this now-local, because it's become clear that there's some funkiness revolving around use_kenv=1 and it being used to imply that we're certainly looking at the dynamic_kenv. Reviewed by: ray MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D15940 Modified: head/sys/kern/subr_hints.c Modified: head/sys/kern/subr_hints.c == --- head/sys/kern/subr_hints.c Thu Jun 21 13:14:52 2018(r335478) +++ head/sys/kern/subr_hints.c Thu Jun 21 14:04:02 2018(r335479) @@ -37,12 +37,15 @@ __FBSDID("$FreeBSD$"); #include #include +#defineHINTMODE_KENV 0 +#defineHINTMODE_STATIC 1 +#defineHINTMODE_FALLBACK 2 + /* * Access functions for device resources. */ static int checkmethod = 1; -static int use_kenv; static char *hintp; /* @@ -56,10 +59,8 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) { const char *cp; char *line, *eq; - int eqidx, error, from_kenv, i, value; + int eqidx, error, i, value; - from_kenv = 0; - cp = kern_envp; value = hintmode; /* Fetch candidate for new hintmode value */ @@ -67,47 +68,33 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) if (error || req->newptr == NULL) return (error); - if (value != 2) + if (value != HINTMODE_FALLBACK) /* Only accept swithing to hintmode 2 */ return (EINVAL); - /* Migrate from static to dynamic hints */ - switch (hintmode) { - case 0: - if (dynamic_kenv) { - /* -* Already here. But assign hintmode to 2, to not -* check it in the future. -*/ - hintmode = 2; - return (0); - } - from_kenv = 1; - cp = kern_envp; - break; - case 1: - cp = static_hints; - break; - case 2: - /* Nothing to do, hintmode already 2 */ + /* +* The rest of the sysctl handler is just making sure that our +* environment is consistent with the world we've already seen. +* If we came from kenv at all, then we have nothing to do: static +* kenv will get merged into dynamic kenv as soon as kmem becomes +* available, dynamic kenv is the environment we'd be setting these +* things in anyways. Therefore, we have nothing left to do unless +* we came from a static hints configuration. +*/ + if (hintmode != HINTMODE_STATIC) { + hintmode = value; return (0); } - while (cp) { - i = strlen(cp); - if (i == 0) - break; - if (from_kenv) { - if (strncmp(cp, "hint.", 5) != 0) - /* kenv can have not only hints */ - continue; - } + cp = static_hints; + while (cp && *cp != '\0') { eq = strchr(cp, '='); if (eq == NULL) /* Bad hint value */ continue; eqidx = eq - cp; + i = strlen(cp); line = malloc(i+1, M_TEMP, M_WAITOK); strcpy(line, cp); line[eqidx] = '\0'; @@ -117,7 +104,6 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) } hintmode = value; - use_kenv = 1; return (0); } @@ -137,7 +123,7 @@ res_find(int *line, int *startln, { int n = 0, hit, i = 0; char r_name[32]; - int r_unit; + int r_unit, use_kenv = (hintmode == HINTMODE_FALLBACK); char r_resname[32]; char r_value[128]; const char *s, *cp; @@ -147,13 +133,13 @@ res_find(int *line, int *startln, hintp = NULL; switch (hintmode) { -
Re: svn commit: r335454 - head/usr.bin/ar
> On 20 June 2018 at 20:48, Rodney W. Grimes > wrote: > > > > My claim still stands, the commit message and reality do not match, > > Ed claimed that he was switching to 2-clause FreeBSD license, yet > > it does not appear to actually do that. > > The commit message could have been more clear indeed. Thanks for acknowledging that. > > > Does SPDX have rules for dual tagging a file? I seem to recall that > > there was some way to do that at least. > > It does (using license1 AND/OR license2), but in this case one of the > licenses is a subset of the other. I think it would be best to indicate that both exist in the SPDX tag so that decisions can be made about this rather bad situation of licenses. Though it may be a subset it is still unclear as to exactly what this means, or how to apply them seperatly. Technically the 2 clause "authors" are above the 3 clause license in the file, does that mean that clause 3 applies to them too? I do not believe that was the original intent, but that is the literal fact. Use of above and below in the license is probably bad legal form and should have an absolute reference rather than an ambibous relative reference. -- Rod Grimes rgri...@freebsd.org ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r334329 - head/sys/arm64/arm64
Hi, I'm trying to boot kernel on ThunderX2 but I've got following error: panic: efi_init: PA out of range, PA: 0xfafd0018 This error comes from PHYS_TO_DMAP macro. I can workaround this issue by disabling EFI Runtime Services in kernel config but it seems to be a problem with discontignous DMAP mapping. 2018-05-29 15:52 GMT+02:00 Andrew Turner : > Author: andrew > Date: Tue May 29 13:52:25 2018 > New Revision: 334329 > URL: https://svnweb.freebsd.org/changeset/base/334329 > > Log: > On ThunderX2 we need to be careful to only map the memory the firmware > lists in the EFI memory map. As such we need to reduce the mappings to > restrict them to not be the full 1G block. For now reduce this to a 2M > block, however this may be further restricted to be 4k page aligned as > other SoCs may require. > > This allows ThunderX2 to boot reliably to userspace without performing > any speculative memory accesses to invalid physical memory. > > This is a recommit of r334035 now that we can access the EFI Runtime data > through the DMAP region. > > Tested by:tuexen > Sponsored by: DARPA, AFRL > > Modified: > head/sys/arm64/arm64/pmap.c > > Modified: head/sys/arm64/arm64/pmap.c > == > --- head/sys/arm64/arm64/pmap.c Tue May 29 13:43:16 2018(r334328) > +++ head/sys/arm64/arm64/pmap.c Tue May 29 13:52:25 2018(r334329) > @@ -590,33 +590,100 @@ pmap_early_vtophys(vm_offset_t l1pt, vm_offset_t va) > return ((l2[l2_slot] & ~ATTR_MASK) + (va & L2_OFFSET)); > } > > -static void > -pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, vm_paddr_t > max_pa) > +static vm_offset_t > +pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, > +vm_offset_t freemempos) > { > + pt_entry_t *l2; > vm_offset_t va; > - vm_paddr_t pa; > - u_int l1_slot; > + vm_paddr_t l2_pa, pa; > + u_int l1_slot, l2_slot, prev_l1_slot; > int i; > > dmap_phys_base = min_pa & ~L1_OFFSET; > dmap_phys_max = 0; > dmap_max_addr = 0; > + l2 = NULL; > + prev_l1_slot = -1; > > +#defineDMAP_TABLES ((DMAP_MAX_ADDRESS - DMAP_MIN_ADDRESS) >> > L0_SHIFT) > + memset(pagetable_dmap, 0, PAGE_SIZE * DMAP_TABLES); > + > for (i = 0; i < (physmap_idx * 2); i += 2) { > - pa = physmap[i] & ~L1_OFFSET; > + pa = physmap[i] & ~L2_OFFSET; > va = pa - dmap_phys_base + DMAP_MIN_ADDRESS; > > - for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; > + /* Create L2 mappings at the start of the region */ > + if ((pa & L1_OFFSET) != 0) { > + l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); > + if (l1_slot != prev_l1_slot) { > + prev_l1_slot = l1_slot; > + l2 = (pt_entry_t *)freemempos; > + l2_pa = pmap_early_vtophys(kern_l1, > + (vm_offset_t)l2); > + freemempos += PAGE_SIZE; > + > + pmap_load_store(_dmap[l1_slot], > + (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE); > + > + memset(l2, 0, PAGE_SIZE); > + } > + KASSERT(l2 != NULL, > + ("pmap_bootstrap_dmap: NULL l2 map")); > + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; > + pa += L2_SIZE, va += L2_SIZE) { > + /* > +* We are on a boundary, stop to > +* create a level 1 block > +*/ > + if ((pa & L1_OFFSET) == 0) > + break; > + > + l2_slot = pmap_l2_index(va); > + KASSERT(l2_slot != 0, ("...")); > + pmap_load_store([l2_slot], > + (pa & ~L2_OFFSET) | ATTR_DEFAULT | > ATTR_XN | > + ATTR_IDX(CACHED_MEMORY) | L2_BLOCK); > + } > + KASSERT(va == (pa - dmap_phys_base + > DMAP_MIN_ADDRESS), > + ("...")); > + } > + > + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1] && > + (physmap[i + 1] - pa) >= L1_SIZE; > pa += L1_SIZE, va += L1_SIZE) { > l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); > - /* We already have an entry */ > - if (pagetable_dmap[l1_slot] != 0) > - continue; > pmap_load_store(_dmap[l1_slot], >
svn commit: r335477 - head/sys/riscv/riscv
Author: br Date: Thu Jun 21 11:52:09 2018 New Revision: 335477 URL: https://svnweb.freebsd.org/changeset/base/335477 Log: PLIC driver was sponsored by ECATS contract, not CTSRD one. Modified: head/sys/riscv/riscv/plic.c Modified: head/sys/riscv/riscv/plic.c == --- head/sys/riscv/riscv/plic.c Thu Jun 21 11:49:21 2018(r335476) +++ head/sys/riscv/riscv/plic.c Thu Jun 21 11:52:09 2018(r335477) @@ -5,8 +5,9 @@ * 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 - * ("CTSRD"), as part of the DARPA CRASH research programme. + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions ___ 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-unsubscr...@freebsd.org"
svn commit: r335476 - in head/sys: arm/allwinner conf
Author: kibab Date: Thu Jun 21 11:49:21 2018 New Revision: 335476 URL: https://svnweb.freebsd.org/changeset/base/335476 Log: Add MMCCAM support to AllWinner MMC driver Using MMCCAM on AllWinner boards is now possible, reaching highest possible data transfer speed. For now, MMCCAM doesn't scan cards on boot. This means that scanning has to be done manually and that it's not possible to mount root FS from MMC/SD card since there is no block device at the boot time. For manually scanning the cards, run: # camcontrol rescan X:0:0 Where X is the bus number (look at camcontrol devlist to determine bus number assigned to the MMC controller). Reviewed by: manu Approved by: imp (mentor) Differential Revision:https://reviews.freebsd.org/D15891 Modified: head/sys/arm/allwinner/aw_mmc.c head/sys/arm/allwinner/files.allwinner head/sys/conf/files.arm64 Modified: head/sys/arm/allwinner/aw_mmc.c == --- head/sys/arm/allwinner/aw_mmc.c Thu Jun 21 11:43:54 2018 (r335475) +++ head/sys/arm/allwinner/aw_mmc.c Thu Jun 21 11:49:21 2018 (r335476) @@ -55,6 +55,16 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_mmccam.h" + +#ifdef MMCCAM +#include +#include +#include +#include +#include +#endif + #defineAW_MMC_MEMRES 0 #defineAW_MMC_IRQRES 1 #defineAW_MMC_RESSZ2 @@ -112,7 +122,14 @@ struct aw_mmc_softc { int aw_timeout; struct callout aw_timeoutc; struct mmc_host aw_host; +#ifdef MMCCAM + union ccb * ccb; + struct cam_devq * devq; + struct cam_sim *sim; + struct mtx sim_mtx; +#else struct mmc_request *aw_req; +#endif struct mtx aw_mtx; struct resource * aw_res[AW_MMC_RESSZ]; struct aw_mmc_conf *aw_mmc_conf; @@ -148,11 +165,19 @@ static int aw_mmc_init(struct aw_mmc_softc *); static void aw_mmc_intr(void *); static int aw_mmc_update_clock(struct aw_mmc_softc *, uint32_t); +static void aw_mmc_print_error(uint32_t); static int aw_mmc_update_ios(device_t, device_t); static int aw_mmc_request(device_t, device_t, struct mmc_request *); static int aw_mmc_get_ro(device_t, device_t); static int aw_mmc_acquire_host(device_t, device_t); static int aw_mmc_release_host(device_t, device_t); +#ifdef MMCCAM +static void aw_mmc_cam_action(struct cam_sim *, union ccb *); +static void aw_mmc_cam_poll(struct cam_sim *); +static int aw_mmc_cam_settran_settings(struct aw_mmc_softc *, union ccb *); +static int aw_mmc_cam_request(struct aw_mmc_softc *, union ccb *); +static void aw_mmc_cam_handle_mmcio(struct cam_sim *, union ccb *); +#endif #defineAW_MMC_LOCK(_sc)mtx_lock(&(_sc)->aw_mtx) #defineAW_MMC_UNLOCK(_sc) mtx_unlock(&(_sc)->aw_mtx) @@ -161,7 +186,201 @@ static int aw_mmc_release_host(device_t, device_t); #defineAW_MMC_WRITE_4(_sc, _reg, _value) \ bus_write_4((_sc)->aw_res[AW_MMC_MEMRES], _reg, _value) +#ifdef MMCCAM +static void +aw_mmc_cam_handle_mmcio(struct cam_sim *sim, union ccb *ccb) +{ + struct aw_mmc_softc *sc; + + sc = cam_sim_softc(sim); + + aw_mmc_cam_request(sc, ccb); +} + +static void +aw_mmc_cam_action(struct cam_sim *sim, union ccb *ccb) +{ + struct aw_mmc_softc *sc; + + sc = cam_sim_softc(sim); + if (sc == NULL) { + ccb->ccb_h.status = CAM_SEL_TIMEOUT; + xpt_done(ccb); + return; + } + + mtx_assert(>sim_mtx, MA_OWNED); + + switch (ccb->ccb_h.func_code) { + case XPT_PATH_INQ: + { + struct ccb_pathinq *cpi; + + cpi = >cpi; + cpi->version_num = 1; + cpi->hba_inquiry = 0; + cpi->target_sprt = 0; + cpi->hba_misc = PIM_NOBUSRESET | PIM_SEQSCAN; + cpi->hba_eng_cnt = 0; + cpi->max_target = 0; + cpi->max_lun = 0; + cpi->initiator_id = 1; + cpi->maxio = (sc->aw_mmc_conf->dma_xferlen * + AW_MMC_DMA_SEGS) / MMC_SECTOR_SIZE; + strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); + strncpy(cpi->hba_vid, "Deglitch Networks", HBA_IDLEN); + strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); + cpi->unit_number = cam_sim_unit(sim); + cpi->bus_id = cam_sim_bus(sim); + cpi->protocol = PROTO_MMCSD; + cpi->protocol_version = SCSI_REV_0; + cpi->transport = XPORT_MMCSD; + cpi->transport_version = 1; + + cpi->ccb_h.status = CAM_REQ_CMP; + break; + } + case XPT_GET_TRAN_SETTINGS: + { + struct
svn commit: r335475 - head/sys/vm
Author: br Date: Thu Jun 21 11:43:54 2018 New Revision: 335475 URL: https://svnweb.freebsd.org/changeset/base/335475 Log: Fix uma_zalloc_pcpu_arg() operation in case of !SMP build. Reviewed by: mjg Sponsored by: DARPA, AFRL Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Thu Jun 21 11:24:20 2018(r335474) +++ head/sys/vm/uma_core.c Thu Jun 21 11:43:54 2018(r335475) @@ -2234,13 +2234,19 @@ void * uma_zalloc_pcpu_arg(uma_zone_t zone, void *udata, int flags) { void *item; +#ifdef SMP int i; MPASS(zone->uz_flags & UMA_ZONE_PCPU); +#endif item = uma_zalloc_arg(zone, udata, flags &~ M_ZERO); if (item != NULL && (flags & M_ZERO)) { +#ifdef SMP CPU_FOREACH(i) bzero(zpcpu_get_cpu(item, i), zone->uz_size); +#else + bzero(item, zone->uz_size); +#endif } return (item); } ___ 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-unsubscr...@freebsd.org"
svn commit: r335474 - stable/10/sys/netinet/libalias
Author: ae Date: Thu Jun 21 11:24:20 2018 New Revision: 335474 URL: https://svnweb.freebsd.org/changeset/base/335474 Log: MFC r335133: In m_megapullup() use m_getjcl() to allocate 9k or 16k mbuf when requested. It is better to try allocate a big mbuf, than just silently drop a big packet. A better solution could be reworking of libalias modules to be able use m_copydata()/m_copyback() instead of requiring the single contiguous buffer. PR: 229006 Modified: stable/10/sys/netinet/libalias/alias.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/libalias/alias.c == --- stable/10/sys/netinet/libalias/alias.c Thu Jun 21 10:51:25 2018 (r335473) +++ stable/10/sys/netinet/libalias/alias.c Thu Jun 21 11:24:20 2018 (r335474) @@ -1749,7 +1749,8 @@ LibAliasUnLoadAllModule(void) * the input packet, on failure NULL. The input packet is always consumed. */ struct mbuf * -m_megapullup(struct mbuf *m, int len) { +m_megapullup(struct mbuf *m, int len) +{ struct mbuf *mcl; if (len > m->m_pkthdr.len) @@ -1758,7 +1759,14 @@ m_megapullup(struct mbuf *m, int len) { if (m->m_next == NULL && M_WRITABLE(m)) return (m); - mcl = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR); + if (len <= MJUMPAGESIZE) + mcl = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR); + else if (len <= MJUM9BYTES) + mcl = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + else if (len <= MJUM16BYTES) + mcl = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM16BYTES); + else + goto bad; if (mcl == NULL) goto bad; m_align(mcl, len); ___ 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-unsubscr...@freebsd.org"
svn commit: r335473 - stable/11/sys/netinet/libalias
Author: ae Date: Thu Jun 21 10:51:25 2018 New Revision: 335473 URL: https://svnweb.freebsd.org/changeset/base/335473 Log: MFC r335133: In m_megapullup() use m_getjcl() to allocate 9k or 16k mbuf when requested. It is better to try allocate a big mbuf, than just silently drop a big packet. A better solution could be reworking of libalias modules to be able use m_copydata()/m_copyback() instead of requiring the single contiguous buffer. PR: 229006 Modified: stable/11/sys/netinet/libalias/alias.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/libalias/alias.c == --- stable/11/sys/netinet/libalias/alias.c Thu Jun 21 09:45:03 2018 (r335472) +++ stable/11/sys/netinet/libalias/alias.c Thu Jun 21 10:51:25 2018 (r335473) @@ -1749,7 +1749,8 @@ LibAliasUnLoadAllModule(void) * the input packet, on failure NULL. The input packet is always consumed. */ struct mbuf * -m_megapullup(struct mbuf *m, int len) { +m_megapullup(struct mbuf *m, int len) +{ struct mbuf *mcl; if (len > m->m_pkthdr.len) @@ -1758,7 +1759,14 @@ m_megapullup(struct mbuf *m, int len) { if (m->m_next == NULL && M_WRITABLE(m)) return (m); - mcl = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR); + if (len <= MJUMPAGESIZE) + mcl = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR); + else if (len <= MJUM9BYTES) + mcl = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + else if (len <= MJUM16BYTES) + mcl = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM16BYTES); + else + goto bad; if (mcl == NULL) goto bad; m_align(mcl, len); ___ 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-unsubscr...@freebsd.org"
svn commit: r335472 - stable/11/sys/compat/ndis
Author: dim Date: Thu Jun 21 09:45:03 2018 New Revision: 335472 URL: https://svnweb.freebsd.org/changeset/base/335472 Log: MFC r335297: Fix build of ndis with base gcc on i386 Casting from rman_res_t to a pointer results in "cast to pointer from integer of different size" warnings with base gcc on i386, so use an intermediate cast to uintptr_t to suppress it. In this case, the I/O port range is effectively limited to the range of 0..65535. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D15746 Modified: stable/11/sys/compat/ndis/subr_ndis.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/ndis/subr_ndis.c == --- stable/11/sys/compat/ndis/subr_ndis.c Thu Jun 21 09:41:44 2018 (r335471) +++ stable/11/sys/compat/ndis/subr_ndis.c Thu Jun 21 09:45:03 2018 (r335472) @@ -1285,7 +1285,7 @@ NdisMRegisterIoPortRange(offset, adapter, port, numpor if (rman_get_size(sc->ndis_res_io) < numports) return (NDIS_STATUS_INVALID_LENGTH); - *offset = (void *)rman_get_start(sc->ndis_res_io); + *offset = (void *)(uintptr_t)rman_get_start(sc->ndis_res_io); return (NDIS_STATUS_SUCCESS); } ___ 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-unsubscr...@freebsd.org"
svn commit: r335471 - stable/11/sys/dev/acpi_support
Author: dim Date: Thu Jun 21 09:41:44 2018 New Revision: 335471 URL: https://svnweb.freebsd.org/changeset/base/335471 Log: MFC r335296: Fix build of aibs with base gcc on i386 Add a few intermediate casts to intptr_t to suppress "cast to pointer from integer of different size" warnings from gcc. In this case, the 'arg2' part of SYSCTL_HANDLER_ARGS is used to pass in a pointer, via an intermediate intmax_t, so no information is lost. Reviewed by: avg Differential Revision: https://reviews.freebsd.org/D15725 Modified: stable/11/sys/dev/acpi_support/atk0110.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpi_support/atk0110.c == --- stable/11/sys/dev/acpi_support/atk0110.cThu Jun 21 08:19:11 2018 (r335470) +++ stable/11/sys/dev/acpi_support/atk0110.cThu Jun 21 09:41:44 2018 (r335471) @@ -453,7 +453,7 @@ static int aibs_sysctl(SYSCTL_HANDLER_ARGS) { struct aibs_softc *sc = arg1; - struct aibs_sensor *sensor = (void *)arg2; + struct aibs_sensor *sensor = (void *)(intptr_t)arg2; int i = oidp->oid_number; ACPI_STATUS rs; ACPI_OBJECT p, *bp; @@ -519,7 +519,7 @@ static int aibs_sysctl_ggrp(SYSCTL_HANDLER_ARGS) { struct aibs_softc *sc = arg1; - struct aibs_sensor *sensor = (void *)arg2; + struct aibs_sensor *sensor = (void *)(intptr_t)arg2; ACPI_STATUS rs; ACPI_OBJECT p, *bp; ACPI_OBJECT_LISTarg; ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r335456 - head/share/man/man7
On 0620T1408, Ian Lepore wrote: > On Wed, 2018-06-20 at 22:54 +0300, Konstantin Belousov wrote: > > On Wed, Jun 20, 2018 at 07:16:51PM +, Edward Tomasz Napierala wrote: > > > > > > Author: trasz > > > Date: Wed Jun 20 19:16:51 2018 > > > New Revision: 335456 > > > URL: https://svnweb.freebsd.org/changeset/base/335456 > > > > > > Log: > > > Improve wording. > > > > > > MFC after: 2 weeks > > > > > > Modified: > > > head/share/man/man7/development.7 > > > > > > Modified: head/share/man/man7/development.7 > > > == > > > --- head/share/man/man7/development.7 Wed Jun 20 18:51:38 2018 > > > (r335455) > > > +++ head/share/man/man7/development.7 Wed Jun 20 19:16:51 2018 > > > (r335456) > > > @@ -24,7 +24,7 @@ > > > .\" > > > .\" $FreeBSD$ > > > .\" > > > -.Dd May 11, 2018 > > > +.Dd June 20, 2018 > > > .Dt DEVELOPMENT 7 > > > .Os > > > .Sh NAME > > > @@ -81,7 +81,7 @@ Build instructions can be found in > > > .Xr build 7 > > > and > > > .Xr release 7 . > > > -Kernel APIs are usually documented, use > > > +Kernel APIs are documented in section 9 manual pages; use > > Kernel API is an oxymoron. Section 9 describes Kernel Programming > > Interfaces, the A from Application is not needed. We usually abbreviate > > it as KPI. > > This is the manpage a new developer is going to look at, and if you > throw an abbreviation like KPI at them and they search for what it > means, they're going to find "Key Performance Indicator" and nothing > about kernels. This might be a good place to introduce and define that > acronym, maybe something like "Kernel programming interfaces (KPIs) are > documented...". Thank you both, fixed. ___ 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-unsubscr...@freebsd.org"
svn commit: r335470 - head/share/man/man7
Author: trasz Date: Thu Jun 21 08:19:11 2018 New Revision: 335470 URL: https://svnweb.freebsd.org/changeset/base/335470 Log: "Kernel APIs" is a misnomer; use the proper name instead. Suggested by: kib@, ian@ MFC after:2 weeks Modified: head/share/man/man7/development.7 Modified: head/share/man/man7/development.7 == --- head/share/man/man7/development.7 Thu Jun 21 07:42:28 2018 (r335469) +++ head/share/man/man7/development.7 Thu Jun 21 08:19:11 2018 (r335470) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2018 +.Dd June 21, 2018 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -81,7 +81,8 @@ Build instructions can be found in .Xr build 7 and .Xr release 7 . -Kernel APIs are documented in section 9 manual pages; use +Kernel programming interfaces (KPIs) are documented in section 9 +manual pages; use .Ql "apropos -s 9 ''" for a list. Regression test suite is described in ___ 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-unsubscr...@freebsd.org"
svn commit: r335469 - head/usr.bin/systat
Author: delphij Date: Thu Jun 21 07:42:28 2018 New Revision: 335469 URL: https://svnweb.freebsd.org/changeset/base/335469 Log: Don't leak tmpstr. MFC after:2 weeks Modified: head/usr.bin/systat/cmds.c Modified: head/usr.bin/systat/cmds.c == --- head/usr.bin/systat/cmds.c Thu Jun 21 06:10:52 2018(r335468) +++ head/usr.bin/systat/cmds.c Thu Jun 21 07:42:28 2018(r335469) @@ -61,7 +61,7 @@ command(const char *cmd) if (*cp) *cp++ = '\0'; if (*tmpstr1 == '\0') - return; + goto done; for (; *cp && isspace(*cp); cp++) ; if (strcmp(tmpstr1, "quit") == 0 || strcmp(tmpstr1, "q") == 0) ___ 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-unsubscr...@freebsd.org"
svn commit: r335468 - head/sys/netinet
Author: mmacy Date: Thu Jun 21 06:10:52 2018 New Revision: 335468 URL: https://svnweb.freebsd.org/changeset/base/335468 Log: udp_ctlinput: don't refer to unpcb after we drop the lock Reported by: pho@ Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c == --- head/sys/netinet/udp_usrreq.c Thu Jun 21 05:28:00 2018 (r335467) +++ head/sys/netinet/udp_usrreq.c Thu Jun 21 06:10:52 2018 (r335468) @@ -802,14 +802,15 @@ udp_common_ctlinput(int cmd, struct sockaddr *sa, void INPLOOKUP_WILDCARD | INPLOOKUP_RLOCKPCB, NULL); if (inp != NULL) { struct udpcb *up; + void *ctx; + udp_tun_icmp_t func; up = intoudpcb(inp); - if (up->u_icmp_func != NULL) { - INP_RUNLOCK(inp); - (*up->u_icmp_func)(cmd, sa, vip, up->u_tun_ctx); - } else { - INP_RUNLOCK(inp); - } + ctx = up->u_tun_ctx; + func = up->u_icmp_func; + INP_RUNLOCK(inp); + if (func != NULL) + (*func)(cmd, sa, vip, ctx); } } } else ___ 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-unsubscr...@freebsd.org"
svn commit: r335467 - head/tools/build/mk
Author: kevans Date: Thu Jun 21 05:28:00 2018 New Revision: 335467 URL: https://svnweb.freebsd.org/changeset/base/335467 Log: Don't remove loader.conf(5) when built WITHOUT_FORTH The new stand/ structure installs loader.conf(5) and defaults/loader.conf regardless of interpreter. The only thing gating installation now is MK_BOOT. Reported by: eadler Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 21 05:18:08 2018(r335466) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 21 05:28:00 2018(r335467) @@ -2335,7 +2335,6 @@ OLD_FILES+=usr/share/man/man8/fdcontrol.8.gz .endif .if ${MK_FORTH} == no -OLD_FILES+=usr/share/man/man5/loader.conf.5.gz OLD_FILES+=usr/share/man/man8/beastie.4th.8.gz OLD_FILES+=usr/share/man/man8/brand.4th.8.gz OLD_FILES+=usr/share/man/man8/check-password.4th.8.gz ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r335402 - head/sbin/veriexecctl
On 19 June 2018 at 20:08, Eitan Adler wrote: > On 19 June 2018 at 18:08, Stephen J. Kiernan wrote: >> Added: head/sbin/veriexecctl/Makefile >> == >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sbin/veriexecctl/Makefile Wed Jun 20 01:08:54 2018 >> (r335402) >> @@ -0,0 +1,11 @@ >> +# $FreeBSD$ >> + >> +PROG= veriexecctl >> +MAN= veriexecctl.8 >> +SRCS= veriexecctl_parse.y veriexecctl_conf.l veriexecctl.c >> + >> +WARNS?=3 > > Why are we introducing new code with lower-than-6 warnings ? In all the commotion about the more important issues this fell through. Also its argument parsing appears to not be using getopt[_long] ? -- Eitan Adler ___ 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-unsubscr...@freebsd.org"