svn commit: r315187 - head/lib/libc/stdlib
Author: pfg Date: Mon Mar 13 04:14:03 2017 New Revision: 315187 URL: https://svnweb.freebsd.org/changeset/base/315187 Log: Minor libc cleanup: let calloc(3) do the multiplication. MFC after:3 days Modified: head/lib/libc/stdlib/getenv.c Modified: head/lib/libc/stdlib/getenv.c == --- head/lib/libc/stdlib/getenv.c Mon Mar 13 02:12:33 2017 (r315186) +++ head/lib/libc/stdlib/getenv.c Mon Mar 13 04:14:03 2017 (r315187) @@ -342,7 +342,7 @@ __build_env(void) envVarsSize = envVarsTotal * 2; /* Create new environment. */ - envVars = calloc(1, sizeof (*envVars) * envVarsSize); + envVars = calloc(envVarsSize, sizeof(*envVars)); if (envVars == NULL) goto Failure; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315186 - head/lib/libcam
Author: ngie Date: Mon Mar 13 02:12:33 2017 New Revision: 315186 URL: https://svnweb.freebsd.org/changeset/base/315186 Log: lib/libcam/cam.3: note that cam_freeccb(3) with ccb == NULL is a no-op This allows me to accurately test this scenario, and for others to rely on the behavior, instead of relying on knowledge obtained via code inspection. Wording borrowed from free(3). MFC after:1 week Requested by: ken (D9928) Reviewed by: imp Sponsored by: Dell EMC Isilon Differential Revision:D9969 Modified: head/lib/libcam/cam.3 Modified: head/lib/libcam/cam.3 == --- head/lib/libcam/cam.3 Mon Mar 13 01:34:42 2017(r315185) +++ head/lib/libcam/cam.3 Mon Mar 13 02:12:33 2017(r315186) @@ -302,6 +302,11 @@ structure. .Fn cam_freeccb frees CCBs allocated by .Fn cam_getccb . +If +.Va ccb +is +.Dv NULL , +no action is taken. .Pp .Fn cam_path_string takes as arguments a ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r315112 - in head: sbin/geom/class/label sys/geom/part
> On Mar 11, 2017, at 20:15, Marcelo Araujo wrote: > > Author: araujo > Date: Sun Mar 12 04:15:56 2017 > New Revision: 315112 > URL: https://svnweb.freebsd.org/changeset/base/315112 > > Log: > Add the capability to refresh the gpart(8) label without need a reboot. > > gpart(8) has functionality to change the label of an GPT partition. > This functionality works like it should, however, after a label change > the /dev/gpt/ entries remain unchanged. glabel(8) status output remains > unchanged. The change only takes effect after a reboot. > > PR: 162690 > Submitted by:sub.mesa@gmail, Ben RUBSON , ae > Reviewed by: allanjude, bapt, bcr > MFC after: 6 weeks. > Differential Revision: https://reviews.freebsd.org/D9935 Hi Marcel, This change broke GENERIC when running the eli tests with a KASSERT: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/2104/console .Please fix or revert and fix later. Thanks, -Ngie signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec
On Sun, 12 Mar 2017, Ngie Cooper wrote: On Mar 12, 2017, at 11:04, Ian Lepore wrote: ... A quirk of C that's often forgotten is that a function-like macro is only expanded as a macro if the token following the macro name is an open paren. So nitems() is a macro invokation and nitems = 0; is just a variable. Perhaps it was a quirk in some pre-C90 compilers, but it is now intentional. I'm not arguing against the replacement of variables named nitems, I actually think that should have been done as part of importing the function-like definition of nitems from netbsd. I am arguing against it. Changing the it in the application would be punishing the application for the system stealing the application's namespace with undocumented pollution. Minor correction (as Pedro noted later): - NetBSD uses __arraycount. - OpenBSD uses nitems. FreeBSD has standardized on nitems, probably because it came about in 8.x, whereas __arraycount came about later. Good for NetBSD. __arraycount is not pollution and is clearly unusable in applications, at least when undocumented, since its name is reserved for the implementation. BTW, I lost the mail about churning HZ. Neither HZ or Hz is correct. HZ is only a bad name for the compile time default for the frequency of "clock ticks". The runtime frequency of "clock ticks" has the bad name "hz". The comment is trying to describe the latter. That is wrong too (see below). These names are bad because the name of a variable holding a freqency, or even the value of the variable, are very different from the units of the variable. "clock ticks" at the frequency of the misnamed variable "hz" are partly virtual now. On modern x86, there is no periodic clock, but one running at frequency hz is faked. The comment is trying to refer to this clock. But this is not the clock controlling the accuracy of the so-called "HZ" timestamp precision (TSP_HZ_. When hz is too large, the virtual clock ticks at frequency hz are scaled down by a factor of tc_tick that is larger than 1. This gives an accuracy of about 1/(hz/tc_tick). /sys/kern doesn't have many conflations of units with values under the spelling HZ (I think it has lots under the spelling hz; these are hard to avoid since the variable hz sometimes gives the correct frequency): - kern_poll.c says HZ=1000 in a comment (it means something like hz=1000) - sched_ule.c has a conversion macro named SCHED_TICK_HZ (it means from ticks in local units to ticks at frequency hz) - subr_param.c copies the bad example set by the config parameter HZ for HZ_VM - vfs_subr.c has 2 instances of HZ which should be (hz/tc_tick), and 2 instances of TSP_HZ. The sysctl for tc_tick has an incomplete description. It says that tc_tick is the "Approximate number of hardclock ticks in a millisecond". This is a bit verbose, but it avoids conflations with Hz and complications with the hz variable and units errors for "milli". But the stated approximation is impossible when hz is much smaller than 1000. Then tc_tick is 1. The sysctl is read-only, so users can't modify the scale factor to get more accuracy from TSP_HZ, etc. The implementation depends on hz/tc_tick being not much larger than 1000 (to work on slow or high latency systems) and tc_tick is chosen to give this. So description comment remains correct if it was correct originally. It is still simpler to describe this as a scale factor. It is not useful for users to know that this variable holds the stated value (except when it doesn't). It is useful for them to know that it scales the accuracy of hardclock ticks in some cases. Bruce ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315181 - head/sbin/setkey
Author: ngie Date: Mon Mar 13 01:05:25 2017 New Revision: 315181 URL: https://svnweb.freebsd.org/changeset/base/315181 Log: Fix CFLAGS for including netipsec headers #includes The netipsec headers are referenced via netipsec/..., not ./... . Thus, assuming that the netipsec/... is nested under ${SRCTOP}/sys/netipsec is wrong. This tripped up some individuals building ^/head on systems pre-r314812. MFC after:1 week Reported by: Roberto Rodriguez Jr Sponsored by: Dell EMC Isilon Modified: head/sbin/setkey/Makefile Modified: head/sbin/setkey/Makefile == --- head/sbin/setkey/Makefile Sun Mar 12 20:19:37 2017(r315180) +++ head/sbin/setkey/Makefile Mon Mar 13 01:05:25 2017(r315181) @@ -46,7 +46,7 @@ CLEANFILES= y.tab.c y.tab.h key_test.o k # ipsec_strerror.c is for avoiding shlib reference to non-exported function. .PATH: ${SRCTOP}/lib/libipsec ${SRCTOP}/sys/netipsec SRCS+= pfkey.c pfkey_dump.c key_debug.c ipsec_strerror.c -CFLAGS+= -I${SRCTOP}/sys/netipsec +CFLAGS+= -I${SRCTOP}/sys SRCS+= y.tab.h y.tab.h: parse.y ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec
> On Mar 12, 2017, at 11:04, Ian Lepore wrote: ... > A quirk of C that's often forgotten is that a function-like macro is > only expanded as a macro if the token following the macro name is an > open paren. So nitems() is a macro invokation and nitems = 0; is just > a variable. > > I'm not arguing against the replacement of variables named nitems, I > actually think that should have been done as part of importing the > function-like definition of nitems from netbsd. Minor correction (as Pedro noted later): - NetBSD uses __arraycount. - OpenBSD uses nitems. FreeBSD has standardized on nitems, probably because it came about in 8.x, whereas __arraycount came about later. Cheers, -Ngie ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315180 - head/usr.bin/diff
Author: bapt Date: Sun Mar 12 20:19:37 2017 New Revision: 315180 URL: https://svnweb.freebsd.org/changeset/base/315180 Log: Readd codes that creates a tmp file for diffing stdout or devices Modified: head/usr.bin/diff/diffreg.c Modified: head/usr.bin/diff/diffreg.c == --- head/usr.bin/diff/diffreg.c Sun Mar 12 19:49:08 2017(r315179) +++ head/usr.bin/diff/diffreg.c Sun Mar 12 20:19:37 2017(r315180) @@ -194,6 +194,7 @@ struct context_vec { }; #definediff_output printf +static FILE*opentemp(const char *); static void output(char *, FILE *, char *, FILE *, int); static void check(FILE *, FILE *, int); static void range(int, int, const char *); @@ -335,7 +336,14 @@ diffreg(char *file1, char *file2, int fl if (flags & D_EMPTY1) f1 = fopen(_PATH_DEVNULL, "r"); else { - if (strcmp(file1, "-") == 0) + if (!S_ISREG(stb1.st_mode)) { + if ((f1 = opentemp(file1)) == NULL || + fstat(fileno(f1), &stb1) < 0) { + warn("%s", file1); + status |= 2; + goto closem; + } + } else if (strcmp(file1, "-") == 0) f1 = stdin; else f1 = fopen(file1, "r"); @@ -349,7 +357,14 @@ diffreg(char *file1, char *file2, int fl if (flags & D_EMPTY2) f2 = fopen(_PATH_DEVNULL, "r"); else { - if (strcmp(file2, "-") == 0) + if (!S_ISREG(stb2.st_mode)) { + if ((f2 = opentemp(file2)) == NULL || + fstat(fileno(f2), &stb2) < 0) { + warn("%s", file2); + status |= 2; + goto closem; + } + } else if (strcmp(file2, "-") == 0) f2 = stdin; else f2 = fopen(file2, "r"); @@ -539,6 +554,37 @@ files_differ(FILE *f1, FILE *f2, int fla } } +static FILE * +opentemp(const char *f) +{ + char buf[BUFSIZ], tempfile[PATH_MAX]; + ssize_t nread; + int ifd, ofd; + + if (strcmp(f, "-") == 0) + ifd = STDIN_FILENO; + else if ((ifd = open(f, O_RDONLY, 0644)) < 0) + return (NULL); + + (void)strlcpy(tempfile, _PATH_TMP "/diff.", sizeof(tempfile)); + + if ((ofd = mkstemp(tempfile)) < 0) { + close(ifd); + return (NULL); + } + unlink(tempfile); + while ((nread = read(ifd, buf, BUFSIZ)) > 0) { + if (write(ofd, buf, nread) != nread) { + close(ifd); + close(ofd); + return (NULL); + } + } + close(ifd); + lseek(ofd, (off_t)0, SEEK_SET); + return (fdopen(ofd, "r")); +} + char * splice(char *dir, char *path) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315178 - head/sys/dev/evdev
Author: gonzo Date: Sun Mar 12 19:28:44 2017 New Revision: 315178 URL: https://svnweb.freebsd.org/changeset/base/315178 Log: [evdev] Fix Right Alt and Keypad Enter event codes for atkbd(4) and kbdmux(4) drivers Submitted by: Vladimir Kondratiev MFC after:1 week Differential Revision:https://reviews.freebsd.org/D9320 Modified: head/sys/dev/evdev/evdev_utils.c Modified: head/sys/dev/evdev/evdev_utils.c == --- head/sys/dev/evdev/evdev_utils.cSun Mar 12 19:27:44 2017 (r315177) +++ head/sys/dev/evdev/evdev_utils.cSun Mar 12 19:28:44 2017 (r315178) @@ -159,7 +159,7 @@ static uint16_t evdev_at_set1_scancodes[ KEY_PREVIOUSSONG, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, KEY_NEXTSONG, NONE, NONE, - NONE, KEY_KPENTER,KEY_RIGHTCTRL, NONE, + KEY_KPENTER,KEY_RIGHTCTRL, NONE, NONE, /* 0x20 - 0x3f. 0xE0 prefixed */ KEY_MUTE, KEY_CALC, KEY_PLAYPAUSE, NONE, KEY_STOPCD, NONE, NONE, NONE, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315177 - head/sys/dev/evdev
Author: gonzo Date: Sun Mar 12 19:27:44 2017 New Revision: 315177 URL: https://svnweb.freebsd.org/changeset/base/315177 Log: [evdev] Fix race condition between client's event queue reading and dropping Submitted by: Vladimir Kondratiev MFC after:1 week Differential Revision:https://reviews.freebsd.org/D9320 Modified: head/sys/dev/evdev/cdev.c Modified: head/sys/dev/evdev/cdev.c == --- head/sys/dev/evdev/cdev.c Sun Mar 12 19:26:24 2017(r315176) +++ head/sys/dev/evdev/cdev.c Sun Mar 12 19:27:44 2017(r315177) @@ -162,7 +162,7 @@ static int evdev_read(struct cdev *dev, struct uio *uio, int ioflag) { struct evdev_client *client; - struct input_event *event; + struct input_event event; int ret = 0; int remaining; @@ -197,13 +197,14 @@ evdev_read(struct cdev *dev, struct uio } while (ret == 0 && !EVDEV_CLIENT_EMPTYQ(client) && remaining > 0) { - event = &client->ec_buffer[client->ec_buffer_head]; + memcpy(&event, &client->ec_buffer[client->ec_buffer_head], + sizeof(struct input_event)); client->ec_buffer_head = (client->ec_buffer_head + 1) % client->ec_buffer_size; remaining--; EVDEV_CLIENT_UNLOCKQ(client); - ret = uiomove(event, sizeof(struct input_event), uio); + ret = uiomove(&event, sizeof(struct input_event), uio); EVDEV_CLIENT_LOCKQ(client); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec
On 3/12/2017 1:04 PM, Ian Lepore wrote: On Sun, 2017-03-12 at 12:30 -0500, Pedro Giffuni wrote: On 3/12/2017 12:14 PM, Lawrence Stewart wrote: Hi Pedro, On 07/03/2017 02:45, Pedro F. Giffuni wrote: Author: pfg Date: Mon Mar 6 15:45:46 2017 New Revision: 314780 URL: https://svnweb.freebsd.org/changeset/base/314780 Log: libpam: extra bounds checking through reallocarray(3). Reviewed by: des MFC after: 1 week Modified: head/lib/libpam/modules/pam_exec/pam_exec.c Modified: head/lib/libpam/modules/pam_exec/pam_exec.c = = --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:42:03 2017 (r314779) +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:45:46 2017 (r314780) @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, nitems = sizeof(env_items) / sizeof(*env_items); /* Count PAM return values put in the environment. */ nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * + tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, sizeof(*envlist)); if (tmp == NULL) { openpam_free_envlist(envlist); This commit breaks pam_exec for me... without this change I see the expected PAM_* environment variables from my execed script, but with this change I no longer see any of them. Thanks for the report. It seems strange this can cause any failure. Perhaps there is a latent overflow here and we have been living with it? I will revert while it is investigated. BTW, the "nitems" variable may conflict with nitems() in sys/param.h. A quirk of C that's often forgotten is that a function-like macro is only expanded as a macro if the token following the macro name is an open paren. So nitems() is a macro invokation and nitems = 0; is just a variable. I'm not arguing against the replacement of variables named nitems, I actually think that should have been done as part of importing the function-like definition of nitems from netbsd. I am not worried about 'nitems', which is actually FreeBSD-native (NetBSD has another name for it). I do think reallocarray() found an underlying issue here though. Pedro. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315176 - head/sys/dev/evdev
Author: gonzo Date: Sun Mar 12 19:26:24 2017 New Revision: 315176 URL: https://svnweb.freebsd.org/changeset/base/315176 Log: [evdev] Do not ignore result evdev_register in UI_DEV_CREATE handler Make sure that uinput state field reflects actual state by checking evdev_register result for errors Submitted by: Vladimir Kondratiev Differential Revision:https://reviews.freebsd.org/D9320 Modified: head/sys/dev/evdev/uinput.c Modified: head/sys/dev/evdev/uinput.c == --- head/sys/dev/evdev/uinput.c Sun Mar 12 18:59:16 2017(r315175) +++ head/sys/dev/evdev/uinput.c Sun Mar 12 19:26:24 2017(r315176) @@ -501,9 +501,10 @@ uinput_ioctl_sub(struct uinput_cdev_stat evdev_set_methods(state->ucs_evdev, state, &uinput_ev_methods); evdev_set_flag(state->ucs_evdev, EVDEV_FLAG_SOFTREPEAT); - evdev_register(state->ucs_evdev); - state->ucs_state = UINPUT_RUNNING; - return (0); + ret = evdev_register(state->ucs_evdev); + if (ret == 0) + state->ucs_state = UINPUT_RUNNING; + return (ret); case UI_DEV_DESTROY: if (state->ucs_state != UINPUT_RUNNING) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315175 - in head/gnu: lib/csu lib/libdialog lib/libgcov lib/libgomp lib/libreadline lib/libregex lib/libssp lib/libssp/libssp_nonshared lib/libstdc++ usr.bin/cc usr.bin/cc/include usr....
Author: imp Date: Sun Mar 12 18:59:16 2017 New Revision: 315175 URL: https://svnweb.freebsd.org/changeset/base/315175 Log: Convert gnu to using SRCTOP Prefer SRCTOP over CURDIR/../../contrib, etc. However, retain the "up one level" instances of ../ because they are really relative to this part of the tree and not a means to find the root of the tree. As such, it's better to leave them since that further the goal of being able to move directories if watned to in the future. Differential Revision:https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence On: arch@ (twice) Modified: head/gnu/lib/csu/Makefile head/gnu/lib/libdialog/Makefile head/gnu/lib/libgcov/Makefile head/gnu/lib/libgomp/Makefile head/gnu/lib/libreadline/Makefile.inc head/gnu/lib/libregex/Makefile head/gnu/lib/libssp/Makefile head/gnu/lib/libssp/libssp_nonshared/Makefile head/gnu/lib/libstdc++/Makefile head/gnu/usr.bin/cc/Makefile.inc head/gnu/usr.bin/cc/include/Makefile head/gnu/usr.bin/dialog/Makefile head/gnu/usr.bin/diff3/Makefile head/gnu/usr.bin/gperf/Makefile Modified: head/gnu/lib/csu/Makefile == --- head/gnu/lib/csu/Makefile Sun Mar 12 18:59:09 2017(r315174) +++ head/gnu/lib/csu/Makefile Sun Mar 12 18:59:16 2017(r315175) @@ -3,9 +3,9 @@ .include MK_SSP=no -GCCDIR=${.CURDIR}/../../../contrib/gcc -GCCLIB=${.CURDIR}/../../../contrib/gcclibs -CCDIR= ${.CURDIR}/../../usr.bin/cc +GCCDIR=${SRCTOP}/contrib/gcc +GCCLIB=${SRCTOP}/contrib/gcclibs +CCDIR= ${SRCTOP}/gnu/usr.bin/cc .include "${CCDIR}/Makefile.tgt" .include "${CCDIR}/cc_tools/Makefile.hdrs" Modified: head/gnu/lib/libdialog/Makefile == --- head/gnu/lib/libdialog/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libdialog/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -1,6 +1,6 @@ # $FreeBSD$ -DIALOG=${.CURDIR}/../../../contrib/dialog +DIALOG=${SRCTOP}/contrib/dialog LIB= dialog SHLIB_MAJOR= 8 Modified: head/gnu/lib/libgcov/Makefile == --- head/gnu/lib/libgcov/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libgcov/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -5,9 +5,9 @@ MK_SSP= no .include -GCCDIR=${.CURDIR}/../../../contrib/gcc -GCCLIB=${.CURDIR}/../../../contrib/gcclibs -CCDIR= ${.CURDIR}/../../usr.bin/cc +GCCDIR=${SRCTOP}/contrib/gcc +GCCLIB=${SRCTOP}/contrib/gcclibs +CCDIR= ${SRCTOP}/gnu/usr.bin/cc .include "${CCDIR}/Makefile.tgt" .include "${CCDIR}/cc_tools/Makefile.hdrs" Modified: head/gnu/lib/libgomp/Makefile == --- head/gnu/lib/libgomp/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libgomp/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -1,7 +1,7 @@ # $FreeBSD$ -GCCDIR=${.CURDIR}/../../../contrib/gcc -GCCLIB=${.CURDIR}/../../../contrib/gcclibs +GCCDIR=${SRCTOP}/contrib/gcc +GCCLIB=${SRCTOP}/contrib/gcclibs SRCDIR=${GCCLIB}/libgomp .PATH: ${SRCDIR} ${SRCDIR}/config/posix Modified: head/gnu/lib/libreadline/Makefile.inc == --- head/gnu/lib/libreadline/Makefile.inc Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libreadline/Makefile.inc Sun Mar 12 18:59:16 2017 (r315175) @@ -3,7 +3,7 @@ SHLIB_MAJOR=8 RL_LIBRARY_VERSION=5.2 -SRCDIR= ${.CURDIR}/../../../../contrib/libreadline +SRCDIR= ${SRCTOP}/contrib/libreadline .PATH: ${SRCDIR} ${.CURDIR}/.. LOCAL_CFLAGS= -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"' Modified: head/gnu/lib/libregex/Makefile == --- head/gnu/lib/libregex/Makefile Sun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libregex/Makefile Sun Mar 12 18:59:16 2017 (r315175) @@ -3,7 +3,7 @@ LIB= gnuregex SHLIB_MAJOR= 5 -REGEXDIR= ${.CURDIR}/../../../contrib/libgnuregex +REGEXDIR= ${SRCTOP}/contrib/libgnuregex .PATH: ${REGEXDIR} SRCS= gnuregex.c Modified: head/gnu/lib/libssp/Makefile == --- head/gnu/lib/libssp/MakefileSun Mar 12 18:59:09 2017 (r315174) +++ head/gnu/lib/libssp/MakefileSun Mar 12 18:59:16 2017 (r315175) @@ -7,8 +7,8 @@ MK_SSP= no .include -GCCDIR=${.CURDIR}/../../../contrib/gcc -GCCLIB=${.CURDIR}/../../../contrib/gcclibs +GCC
svn commit: r315174 - in head/rescue: librescue rescue
Author: imp Date: Sun Mar 12 18:59:09 2017 New Revision: 315174 URL: https://svnweb.freebsd.org/changeset/base/315174 Log: Make rescue use SRCTOP Transition to SRCTOP. Also, standardize of {} instead of () variable deliminators while I'm here. Differential Revision:https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence On: arch@ (twice) Modified: head/rescue/librescue/Makefile head/rescue/rescue/Makefile Modified: head/rescue/librescue/Makefile == --- head/rescue/librescue/Makefile Sun Mar 12 18:59:05 2017 (r315173) +++ head/rescue/librescue/Makefile Sun Mar 12 18:59:09 2017 (r315174) @@ -13,10 +13,10 @@ MK_SSP= no # This library should never be installed, and isn't even linked # with in the normal way. (See ../rescue/Makefile for details.) -.PATH: ${.CURDIR}/../../lib/libc/gen \ - ${.CURDIR}/../../lib/libc/net \ - ${.CURDIR}/../../lib/libc/stdlib \ - ${.CURDIR}/../../lib/libutil +.PATH: ${SRCTOP}/lib/libc/gen \ + ${SRCTOP}/lib/libc/net \ + ${SRCTOP}/lib/libc/stdlib \ + ${SRCTOP}/lib/libutil LIB= rescue INTERNALLIB= # Don't install this library @@ -42,6 +42,6 @@ CFLAGS+= -DYP .if ${MK_HESIOD} != "no" CFLAGS+= -DHESIOD .endif -CFLAGS+= -I${.CURDIR}/../../lib/libc/include +CFLAGS+= -I${SRCTOP}/lib/libc/include .include Modified: head/rescue/rescue/Makefile == --- head/rescue/rescue/Makefile Sun Mar 12 18:59:05 2017(r315173) +++ head/rescue/rescue/Makefile Sun Mar 12 18:59:09 2017(r315174) @@ -160,16 +160,16 @@ CRUNCH_PROGS_sbin+= bsdlabel fdisk CRUNCH_ALIAS_bsdlabel= disklabel .endif -CRUNCH_SRCDIR_atm= $(.CURDIR)/../../sbin/atm/atm -CRUNCH_SRCDIR_atmconfig= $(.CURDIR)/../../sbin/atm/atmconfig -CRUNCH_SRCDIR_fore_dnld= $(.CURDIR)/../../sbin/atm/fore_dnld -CRUNCH_SRCDIR_ilmid= $(.CURDIR)/../../sbin/atm/ilmid -CRUNCH_SRCDIR_rtquery= $(.CURDIR)/../../sbin/routed/rtquery -CRUNCH_SRCDIR_ipf= $(.CURDIR)/../../sbin/ipf/ipf +CRUNCH_SRCDIR_atm= ${SRCTOP}/sbin/atm/atm +CRUNCH_SRCDIR_atmconfig= ${SRCTOP}/sbin/atm/atmconfig +CRUNCH_SRCDIR_fore_dnld= ${SRCTOP}/sbin/atm/fore_dnld +CRUNCH_SRCDIR_ilmid= ${SRCTOP}/sbin/atm/ilmid +CRUNCH_SRCDIR_rtquery= ${SRCTOP}/sbin/routed/rtquery +CRUNCH_SRCDIR_ipf= ${SRCTOP}/sbin/ipf/ipf .if ${MK_ZFS} != "no" -CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs -CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool -CRUNCH_SRCDIR_zdb= ${.CURDIR}/../../cddl/usr.sbin/zdb +CRUNCH_SRCDIR_zfs= ${SRCTOP}/cddl/sbin/zfs +CRUNCH_SRCDIR_zpool= ${SRCTOP}/cddl/sbin/zpool +CRUNCH_SRCDIR_zdb= ${SRCTOP}/cddl/usr.sbin/zdb .endif CRUNCH_ALIAS_reboot= fastboot halt fasthalt CRUNCH_ALIAS_restore= rrestore ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315173 - in head/lib: libipsec libpathconv
Author: imp Date: Sun Mar 12 18:59:05 2017 New Revision: 315173 URL: https://svnweb.freebsd.org/changeset/base/315173 Log: Fix two CURDIR references in comments that should be SRCTOP references. Differential Revision:https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence On: arch@ (twice) Modified: head/lib/libipsec/Makefile head/lib/libpathconv/Makefile Modified: head/lib/libipsec/Makefile == --- head/lib/libipsec/Makefile Sun Mar 12 18:59:00 2017(r315172) +++ head/lib/libipsec/Makefile Sun Mar 12 18:59:05 2017(r315173) @@ -40,7 +40,7 @@ CFLAGS+=-DIPSEC_DEBUG -DIPSEC CFLAGS+=-DINET6 .endif -#.PATH:${.CURDIR}/../../sys/netipsec +#.PATH:${SRCTOP}/sys/netipsec #SRCS= pfkey.c pfkey_dump.c SRCS+= ipsec_strerror.c policy_parse.y policy_token.l SRCS+= ipsec_dump_policy.c ipsec_get_policylen.c Modified: head/lib/libpathconv/Makefile == --- head/lib/libpathconv/Makefile Sun Mar 12 18:59:00 2017 (r315172) +++ head/lib/libpathconv/Makefile Sun Mar 12 18:59:05 2017 (r315173) @@ -10,7 +10,7 @@ INCS= pathconv.h SRCS= abs2rel.c rel2abs.c -#VERSION_DEF= ${.CURDIR}/../libc/Versions.def +#VERSION_DEF= ${SRCTOP/lib/libc/Versions.def #SYMBOL_MAPS= ${.CURDIR}/Symbol.map .if ${MK_TESTS} != "no" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315172 - head/include
Author: imp Date: Sun Mar 12 18:59:00 2017 New Revision: 315172 URL: https://svnweb.freebsd.org/changeset/base/315172 Log: Convert include over to SRCTOP Use SRCTOP in place of .CURDIR/.. as appropriate. The hand-crafted relative paths for the "links" option remain, though, since those are relative to /usr/include/sys/ not to the source tree. Differential Revision:https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence On: arch@ (twice) Modified: head/include/Makefile Modified: head/include/Makefile == --- head/include/Makefile Sun Mar 12 18:58:55 2017(r315171) +++ head/include/Makefile Sun Mar 12 18:59:00 2017(r315172) @@ -29,7 +29,7 @@ INCS= a.out.h ar.h assert.h bitstring.h uchar.h ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h \ wchar.h wctype.h wordexp.h xlocale.h -.PATH: ${.CURDIR}/../contrib/libc-vis +.PATH: ${SRCTOP}/contrib/libc-vis INCS+= vis.h MHDRS= float.h floatingpoint.h stdarg.h @@ -103,7 +103,7 @@ SHARED?=copies INCS+= osreldate.h -SYSDIR=${.CURDIR}/../sys +SYSDIR=${SRCTOP}/sys NEWVERS_SH=${SYSDIR}/conf/newvers.sh PARAM_H= ${SYSDIR}/sys/param.h MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh @@ -142,7 +142,7 @@ compat: fi .endfor mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ - -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ + -f ${SRCTOP}/etc/mtree/BSD.include.dist \ -p ${DESTDIR}${INCLUDEDIR} > /dev/null copies: .PHONY .META @@ -156,101 +156,101 @@ copies: .PHONY .META fi .endfor .for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS} - cd ${.CURDIR}/../sys; \ + cd ${SRCTOP}/sys; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ ${DESTDIR}${INCLUDEDIR}/$i .endfor - cd ${.CURDIR}/../sys/dev/acpica; \ + cd ${SRCTOP}/sys/dev/acpica; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \ ${DESTDIR}${INCLUDEDIR}/dev/acpica; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpi_hpet.h \ ${DESTDIR}${INCLUDEDIR}/dev/acpica - cd ${.CURDIR}/../sys/dev/agp; \ + cd ${SRCTOP}/sys/dev/agp; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \ ${DESTDIR}${INCLUDEDIR}/dev/agp - cd ${.CURDIR}/../sys/dev/bktr; \ + cd ${SRCTOP}/sys/dev/bktr; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \ ${DESTDIR}${INCLUDEDIR}/dev/bktr .if ${MK_NAND} != "no" - cd ${.CURDIR}/../sys/dev/nand; \ + cd ${SRCTOP}/sys/dev/nand; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nandsim.h \ ${DESTDIR}${INCLUDEDIR}/dev/nand; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nand_dev.h \ ${DESTDIR}${INCLUDEDIR}/dev/nand .endif - cd ${.CURDIR}/../sys/dev/evdev; \ + cd ${SRCTOP}/sys/dev/evdev; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input.h \ ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \ ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \ ${DESTDIR}${INCLUDEDIR}/dev/evdev - cd ${.CURDIR}/../sys/dev/hyperv/include; \ + cd ${SRCTOP}/sys/dev/hyperv/include; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hyperv.h \ ${DESTDIR}${INCLUDEDIR}/dev/hyperv - cd ${.CURDIR}/../sys/dev/hyperv/utilities; \ + cd ${SRCTOP}/sys/dev/hyperv/utilities; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hv_snapshot.h \ ${DESTDIR}${INCLUDEDIR}/dev/hyperv - cd ${.CURDIR}/../sys/dev/pci; \ + cd ${SRCTOP}/sys/dev/pci; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \ ${DESTDIR}${INCLUDEDIR}/dev/pci - cd ${.CURDIR}/../sys/fs/cd9660/; \ + cd ${SRCTOP}/sys/fs/cd9660/; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/isofs/cd9660 .if ${MK_IPFILTER} != "no" - cd ${.CURDIR}/../sys/contrib/ipfilter/netinet; \ + cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/netinet .endif .if ${MK_PF} != "no" - cd ${.CURDIR}/../sys/netpfil/pf; \ + cd ${SRCTOP}/sys/netpfil/pf; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/netpfil/pf .endif - cd ${.CURDIR}/../sys/crypto; \ + cd
svn commit: r315171 - in head/etc: . sendmail
Author: imp Date: Sun Mar 12 18:58:55 2017 New Revision: 315171 URL: https://svnweb.freebsd.org/changeset/base/315171 Log: Move /etc/ to SRCTOP Prefer ${SRCTOP}/ to ${.CURDIR}/../ and ${.CURDIR}/../../ as appropriate. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence On: arch@ (twice) Modified: head/etc/Makefile head/etc/sendmail/Makefile Modified: head/etc/Makefile == --- head/etc/Makefile Sun Mar 12 18:58:44 2017(r315170) +++ head/etc/Makefile Sun Mar 12 18:58:55 2017(r315171) @@ -64,7 +64,7 @@ BIN1+=etc.${MACHINE_CPUARCH}/ttys .error etc.MACHINE/ttys missing .endif -OPENBSMDIR=${.CURDIR}/../contrib/openbsm +OPENBSMDIR=${SRCTOP}/contrib/openbsm BSM_ETC_OPEN_FILES=${OPENBSMDIR}/etc/audit_class \ ${OPENBSMDIR}/etc/audit_event BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ @@ -103,7 +103,7 @@ BIN1+= inetd.conf .endif .if ${MK_LOCATE} != "no" -BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc +BIN1+= ${SRCTOP}/usr.bin/locate/locate/locate.rc .endif .if ${MK_LPR} != "no" @@ -111,7 +111,7 @@ BIN1+= hosts.lpd printcap .endif .if ${MK_MAIL} != "no" -BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc +BIN1+= ${SRCTOP}/usr.bin/mail/misc/mail.rc .endif .if ${MK_NTP} != "no" @@ -119,12 +119,12 @@ BIN1+=ntp.conf .endif .if ${MK_OPENSSH} != "no" -SSH= ${.CURDIR}/../crypto/openssh/ssh_config \ - ${.CURDIR}/../crypto/openssh/sshd_config \ - ${.CURDIR}/../crypto/openssh/moduli +SSH= ${SRCTOP}/crypto/openssh/ssh_config \ + ${SRCTOP}/crypto/openssh/sshd_config \ + ${SRCTOP}/crypto/openssh/moduli .endif .if ${MK_OPENSSL} != "no" -SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf +SSL= ${SRCTOP}/crypto/openssl/apps/openssl.cnf .endif .if ${MK_NS_CACHING} != "no" @@ -185,7 +185,7 @@ DESTDIR:= ${DESTDIR:C://*:/:g} afterinstall: .if ${MK_MAN} != "no" - ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb + ${_+_}cd ${SRCTOP}/share/man; ${MAKE} makedb .endif distribute: @@ -263,8 +263,8 @@ distribution: ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install - ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap - ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt + ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap + ${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} @@ -328,9 +328,9 @@ distribution: cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${FREEBSD} ${DESTDIR}/ .if ${MK_BOOT} != "no" -.if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints) +.if exists(${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ + ${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .endif .endif Modified: head/etc/sendmail/Makefile == --- head/etc/sendmail/Makefile Sun Mar 12 18:58:44 2017(r315170) +++ head/etc/sendmail/Makefile Sun Mar 12 18:58:55 2017(r315171) @@ -6,7 +6,7 @@ CHMOD= chmod ROMODE=444 RM=rm -f -SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail +SENDMAIL_DIR= ${SRCTOP}/contrib/sendmail SMDIR= ${SENDMAIL_DIR}/src SENDMAIL_CF_DIR?=${SENDMAIL_DIR}/cf ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315170 - in head/usr.bin: bsdiff/bsdiff bzip2 bzip2recover chkey chpass compile_et cpio ctlstat drill ee elfcopy factor file ftp host ipcrm iscsictl kdump less lessecho lesskey lex lex...
Author: imp Date: Sun Mar 12 18:58:44 2017 New Revision: 315170 URL: https://svnweb.freebsd.org/changeset/base/315170 Log: Adopt SRCTOP in usr.bin Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo over ${.CURDIR}/../foo for paths in Makefiles. Differential Revision:https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence on: arch@ (twice) Modified: head/usr.bin/bsdiff/bsdiff/Makefile head/usr.bin/bzip2/Makefile head/usr.bin/bzip2recover/Makefile head/usr.bin/chkey/Makefile head/usr.bin/chpass/Makefile head/usr.bin/compile_et/Makefile head/usr.bin/cpio/Makefile head/usr.bin/ctlstat/Makefile head/usr.bin/drill/Makefile head/usr.bin/ee/Makefile head/usr.bin/elfcopy/Makefile head/usr.bin/factor/Makefile head/usr.bin/file/Makefile head/usr.bin/ftp/Makefile head/usr.bin/host/Makefile head/usr.bin/ipcrm/Makefile head/usr.bin/iscsictl/Makefile head/usr.bin/kdump/Makefile head/usr.bin/less/Makefile.common head/usr.bin/lessecho/Makefile head/usr.bin/lesskey/Makefile head/usr.bin/lex/Makefile head/usr.bin/lex/lib/Makefile head/usr.bin/locale/Makefile head/usr.bin/localedef/Makefile head/usr.bin/lzmainfo/Makefile head/usr.bin/m4/Makefile head/usr.bin/mandoc/Makefile head/usr.bin/minigzip/Makefile head/usr.bin/mkcsmapper/Makefile head/usr.bin/mkcsmapper/Makefile.inc head/usr.bin/mkcsmapper_static/Makefile head/usr.bin/mkesdb/Makefile head/usr.bin/mkesdb_static/Makefile head/usr.bin/mklocale/Makefile head/usr.bin/nc/Makefile head/usr.bin/opieinfo/Makefile head/usr.bin/opiekey/Makefile head/usr.bin/opiepasswd/Makefile head/usr.bin/pamtest/Makefile head/usr.bin/readelf/Makefile head/usr.bin/rsh/Makefile head/usr.bin/smbutil/Makefile head/usr.bin/svn/lib/Makefile.inc head/usr.bin/tar/Makefile head/usr.bin/telnet/Makefile head/usr.bin/tftp/Makefile head/usr.bin/top/Makefile head/usr.bin/truss/Makefile head/usr.bin/unvis/Makefile head/usr.bin/vacation/Makefile head/usr.bin/vi/Makefile head/usr.bin/vis/Makefile head/usr.bin/w/Makefile head/usr.bin/xinstall/Makefile head/usr.bin/xz/Makefile head/usr.bin/xzdec/Makefile head/usr.bin/yacc/Makefile head/usr.bin/ypwhich/Makefile Modified: head/usr.bin/bsdiff/bsdiff/Makefile == --- head/usr.bin/bsdiff/bsdiff/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/bsdiff/bsdiff/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -4,11 +4,11 @@ PROG= bsdiff # libdivsufsort configured with: # cmake -DCMAKE_BUILD_TYPE="Release" -DBUILD_DIVSUFSORT64=ON -.PATH: ${.CURDIR}/../../../contrib/libdivsufsort/lib +.PATH: ${SRCTOP}/contrib/libdivsufsort/lib CFLAGS+= -DHAVE_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE CFLAGS+= -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS CFLAGS+= -D__STDC_LIMIT_MACROS -DBUILD_DIVSUFSORT64 -CFLAGS+= -I${.CURDIR}/../../../contrib/libdivsufsort/include -I${.CURDIR} +CFLAGS+= -I${SRCTOP}/contrib/libdivsufsort/include -I${.CURDIR} SRCS= divsufsort.c sssort.c trsort.c utils.c SRCS+= bsdiff.c Modified: head/usr.bin/bzip2/Makefile == --- head/usr.bin/bzip2/Makefile Sun Mar 12 18:38:03 2017(r315169) +++ head/usr.bin/bzip2/Makefile Sun Mar 12 18:58:44 2017(r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -BZ2DIR=${.CURDIR}/../../contrib/bzip2 +BZ2DIR=${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} PROG= bzip2 Modified: head/usr.bin/bzip2recover/Makefile == --- head/usr.bin/bzip2recover/Makefile Sun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/bzip2recover/Makefile Sun Mar 12 18:58:44 2017 (r315170) @@ -1,6 +1,6 @@ # $FreeBSD$ -BZ2DIR=${.CURDIR}/../../contrib/bzip2 +BZ2DIR=${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} PROG= bzip2recover Modified: head/usr.bin/chkey/Makefile == --- head/usr.bin/chkey/Makefile Sun Mar 12 18:38:03 2017(r315169) +++ head/usr.bin/chkey/Makefile Sun Mar 12 18:58:44 2017(r315170) @@ -2,11 +2,11 @@ .include -.PATH: ${.CURDIR}/../newkey +.PATH: ${SRCTOP}/usr.bin/newkey PROG= chkey SRCS= chkey.c generic.c update.c -CFLAGS+= -I${.CURDIR}/../newkey +CFLAGS+= -I${SRCTOP}/usr.bin/newkey .if ${MK_NIS} != "no" CFLAGS+= -DYP .endif Modified: head/usr.bin/chpass/Makefile == --- head/usr.bin/chpass/MakefileSun Mar 12 18:38:03 2017 (r315169) +++ head/usr.bin/chpass/MakefileSun Mar 12 18:58:44 2017 (r315170) @@ -3,7 +3,7 @@ .include -.PATH: ${.
Re: svn commit: r315164 - head/lib/libpam/modules/pam_exec
> On Mar 12, 2017, at 10:41, Pedro F. Giffuni wrote: > > Author: pfg > Date: Sun Mar 12 17:41:51 2017 > New Revision: 315164 > URL: https://svnweb.freebsd.org/changeset/base/315164 > > Log: > Revert r314780 > libpam: extra bounds checking through reallocarray(3). > > It appears to be causing brokenness when reporting PAM_* environment > variables. This requires more investigation. > > Reported by:lstewart > > Modified: > head/lib/libpam/modules/pam_exec/pam_exec.c > > Modified: head/lib/libpam/modules/pam_exec/pam_exec.c > == > --- head/lib/libpam/modules/pam_exec/pam_exec.cSun Mar 12 16:55:18 2017 > (r315163) > +++ head/lib/libpam/modules/pam_exec/pam_exec.cSun Mar 12 17:41:51 2017 > (r315164) > @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, >nitems = sizeof(env_items) / sizeof(*env_items); >/* Count PAM return values put in the environment. */ >nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; > -tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, > +tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * Eep. nitems variable use here too (masking nitems macro). -Ngie ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315167 - head/sys/kern
Author: ian Date: Sun Mar 12 18:07:03 2017 New Revision: 315167 URL: https://svnweb.freebsd.org/changeset/base/315167 Log: Change 'Hz' back to 'HZ'... it's referring to the kernel config option named HZ, not being used as an abbreviation of the unit of measure. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cSun Mar 12 18:00:02 2017(r315166) +++ head/sys/kern/vfs_subr.cSun Mar 12 18:07:03 2017(r315167) @@ -767,7 +767,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS static int timestamp_precision = TSP_USEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, ×tamp_precision, 0, "File timestamp precision (0: seconds, " -"1: sec + ns accurate to 1/Hz, 2: sec + ns truncated to us, " +"1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to us, " "3+: sec + ns (max. precision))"); /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r315165 - head/sys/kern
On Sun, 2017-03-12 at 12:45 -0500, Benjamin Kaduk wrote: > On Sun, Mar 12, 2017 at 12:43 PM, Ian Lepore wrote: > > > > > Author: ian > > Date: Sun Mar 12 17:43:45 2017 > > New Revision: 315165 > > URL: https://svnweb.freebsd.org/changeset/base/315165 > > > > Log: > > Correct the abbreviations for microseconds (us, not ms), and for > > Hz (not > > HZ). > > > > Modified: > > head/sys/kern/vfs_subr.c > > > > Modified: head/sys/kern/vfs_subr.c > > > > == > > --- head/sys/kern/vfs_subr.cSun Mar 12 17:41:51 > > 2017(r315164) > > +++ head/sys/kern/vfs_subr.cSun Mar 12 17:43:45 > > 2017(r315165) > > @@ -767,7 +767,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS > > static int timestamp_precision = TSP_USEC; > > SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, > > ×tamp_precision, 0, "File timestamp precision (0: > > seconds, " > > -"1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " > > +"1: sec + ns accurate to 1/Hz, 2: sec + ns truncated to us, " > > > HZ looks like the kernel configuration parameter here, not the unit. > > -Ben > > > > > > "3+: sec + ns (max. precision))"); > > > > /* > > ___ Doh! Now that you mention it, I'm sure you're right. -- Ian ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec
On Sun, 2017-03-12 at 12:30 -0500, Pedro Giffuni wrote: > > On 3/12/2017 12:14 PM, Lawrence Stewart wrote: > > > > Hi Pedro, > > > > On 07/03/2017 02:45, Pedro F. Giffuni wrote: > > > > > > Author: pfg > > > Date: Mon Mar 6 15:45:46 2017 > > > New Revision: 314780 > > > URL: https://svnweb.freebsd.org/changeset/base/314780 > > > > > > Log: > > > libpam: extra bounds checking through reallocarray(3). > > > > > > Reviewed by: des > > > MFC after: 1 week > > > > > > Modified: > > > head/lib/libpam/modules/pam_exec/pam_exec.c > > > > > > Modified: head/lib/libpam/modules/pam_exec/pam_exec.c > > > = > > > = > > > --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 > > > 15:42:03 2017 (r314779) > > > +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 > > > 15:45:46 2017 (r314780) > > > @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, > > > nitems = sizeof(env_items) / sizeof(*env_items); > > > /* Count PAM return values put in the environment. */ > > > nitems_rv = options->return_prog_exit_status ? > > > PAM_RV_COUNT : 0; > > > - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv > > > + 1) * > > > + tmp = reallocarray(envlist, envlen + nitems + 1 + > > > nitems_rv + 1, > > > sizeof(*envlist)); > > > if (tmp == NULL) { > > > openpam_free_envlist(envlist); > > > > > This commit breaks pam_exec for me... without this change I see the > > expected PAM_* environment variables from my execed script, but > > with > > this change I no longer see any of them. > Thanks for the report. > > It seems strange this can cause any failure. Perhaps there is a > latent > overflow here and we have been living with it? I will revert while it > is > investigated. > > BTW, the "nitems" variable may conflict with nitems() in sys/param.h. > A quirk of C that's often forgotten is that a function-like macro is only expanded as a macro if the token following the macro name is an open paren. So nitems() is a macro invokation and nitems = 0; is just a variable. I'm not arguing against the replacement of variables named nitems, I actually think that should have been done as part of importing the function-like definition of nitems from netbsd. -- Ian ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315166 - head/sys/dev/acpica
Author: imp Date: Sun Mar 12 18:00:02 2017 New Revision: 315166 URL: https://svnweb.freebsd.org/changeset/base/315166 Log: Export the actual LID state via sysctl. This allows more complex policies about when to suspend based on other events happening AND the lid being closed through the use of clever devd or other scripts. Modified: head/sys/dev/acpica/acpi_lid.c Modified: head/sys/dev/acpica/acpi_lid.c == --- head/sys/dev/acpica/acpi_lid.c Sun Mar 12 17:43:45 2017 (r315165) +++ head/sys/dev/acpica/acpi_lid.c Sun Mar 12 18:00:02 2017 (r315166) @@ -122,6 +122,14 @@ acpi_lid_attach(device_t dev) if (acpi_parse_prw(sc->lid_handle, &prw) == 0) AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit); +/* + * Export the lid status + */ +SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "state", CTLFLAG_RD, &sc->lid_status, 0, + "Device set to wake the system"); + return (0); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec
On 3/12/2017 12:40 PM, Lawrence Stewart wrote: On 13/03/2017 04:30, Pedro Giffuni wrote: On 3/12/2017 12:14 PM, Lawrence Stewart wrote: Hi Pedro, On 07/03/2017 02:45, Pedro F. Giffuni wrote: Author: pfg Date: Mon Mar 6 15:45:46 2017 New Revision: 314780 URL: https://svnweb.freebsd.org/changeset/base/314780 Log: libpam: extra bounds checking through reallocarray(3). Reviewed by:des MFC after:1 week Modified: head/lib/libpam/modules/pam_exec/pam_exec.c Modified: head/lib/libpam/modules/pam_exec/pam_exec.c == --- head/lib/libpam/modules/pam_exec/pam_exec.cMon Mar 6 15:42:03 2017(r314779) +++ head/lib/libpam/modules/pam_exec/pam_exec.cMon Mar 6 15:45:46 2017(r314780) @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, nitems = sizeof(env_items) / sizeof(*env_items); /* Count PAM return values put in the environment. */ nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; -tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * +tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, sizeof(*envlist)); if (tmp == NULL) { openpam_free_envlist(envlist); This commit breaks pam_exec for me... without this change I see the expected PAM_* environment variables from my execed script, but with this change I no longer see any of them. Thanks for the report. It seems strange this can cause any failure. Perhaps there is a latent overflow here and we have been living with it? I will revert while it is investigated. BTW, the "nitems" variable may conflict with nitems() in sys/param.h. I don't think so. I manually ran the compile step in /usr/src/lib/libpam/modules/pam_exec replacing -o with -E per: cc -DOPENPAM_STATIC_MODULES -O2 -pipe -I/usr/src/contrib/openpam/include -I/usr/src/lib/libpam -DOPENPAM_DEBUG -MD -MF.depend.pam_exec.o -MTpam_exec.o -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments -c pam_exec.c -E | vim - and the preprocessed code in question looks sane (included a few lines of context either side): envlist = pam_getenvlist(pamh); for (envlen = 0; envlist[envlen] != ((void *)0); ++envlen) ; nitems = sizeof(env_items) / sizeof(*env_items); nitems_rv = options->return_prog_exit_status ? 24 : 0; tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, sizeof(*envlist)); if (tmp == ((void *)0)) { openpam_free_envlist(envlist); return (PAM_BUF_ERR); } OK, the nitems issue is cosmetical at this time. Are you getting PAM_BUF_ERR, in other words, is tmp NULL? We may be hitting some strict limit in reallocarray(). Pedro. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r315165 - head/sys/kern
On Sun, Mar 12, 2017 at 12:43 PM, Ian Lepore wrote: > Author: ian > Date: Sun Mar 12 17:43:45 2017 > New Revision: 315165 > URL: https://svnweb.freebsd.org/changeset/base/315165 > > Log: > Correct the abbreviations for microseconds (us, not ms), and for Hz (not > HZ). > > Modified: > head/sys/kern/vfs_subr.c > > Modified: head/sys/kern/vfs_subr.c > > == > --- head/sys/kern/vfs_subr.cSun Mar 12 17:41:51 2017(r315164) > +++ head/sys/kern/vfs_subr.cSun Mar 12 17:43:45 2017(r315165) > @@ -767,7 +767,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS > static int timestamp_precision = TSP_USEC; > SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, > ×tamp_precision, 0, "File timestamp precision (0: seconds, " > -"1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " > +"1: sec + ns accurate to 1/Hz, 2: sec + ns truncated to us, " > HZ looks like the kernel configuration parameter here, not the unit. -Ben > "3+: sec + ns (max. precision))"); > > /* > ___ > svn-src-...@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-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315165 - head/sys/kern
Author: ian Date: Sun Mar 12 17:43:45 2017 New Revision: 315165 URL: https://svnweb.freebsd.org/changeset/base/315165 Log: Correct the abbreviations for microseconds (us, not ms), and for Hz (not HZ). Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cSun Mar 12 17:41:51 2017(r315164) +++ head/sys/kern/vfs_subr.cSun Mar 12 17:43:45 2017(r315165) @@ -767,7 +767,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS static int timestamp_precision = TSP_USEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, ×tamp_precision, 0, "File timestamp precision (0: seconds, " -"1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " +"1: sec + ns accurate to 1/Hz, 2: sec + ns truncated to us, " "3+: sec + ns (max. precision))"); /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315164 - head/lib/libpam/modules/pam_exec
Author: pfg Date: Sun Mar 12 17:41:51 2017 New Revision: 315164 URL: https://svnweb.freebsd.org/changeset/base/315164 Log: Revert r314780 libpam: extra bounds checking through reallocarray(3). It appears to be causing brokenness when reporting PAM_* environment variables. This requires more investigation. Reported by: lstewart Modified: head/lib/libpam/modules/pam_exec/pam_exec.c Modified: head/lib/libpam/modules/pam_exec/pam_exec.c == --- head/lib/libpam/modules/pam_exec/pam_exec.c Sun Mar 12 16:55:18 2017 (r315163) +++ head/lib/libpam/modules/pam_exec/pam_exec.c Sun Mar 12 17:41:51 2017 (r315164) @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, nitems = sizeof(env_items) / sizeof(*env_items); /* Count PAM return values put in the environment. */ nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; - tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, + tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * sizeof(*envlist)); if (tmp == NULL) { openpam_free_envlist(envlist); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec
On 13/03/2017 04:30, Pedro Giffuni wrote: > > > On 3/12/2017 12:14 PM, Lawrence Stewart wrote: >> Hi Pedro, >> >> On 07/03/2017 02:45, Pedro F. Giffuni wrote: >>> Author: pfg >>> Date: Mon Mar 6 15:45:46 2017 >>> New Revision: 314780 >>> URL: https://svnweb.freebsd.org/changeset/base/314780 >>> >>> Log: >>>libpam: extra bounds checking through reallocarray(3). >>> Reviewed by:des >>>MFC after:1 week >>> >>> Modified: >>>head/lib/libpam/modules/pam_exec/pam_exec.c >>> >>> Modified: head/lib/libpam/modules/pam_exec/pam_exec.c >>> == >>> >>> --- head/lib/libpam/modules/pam_exec/pam_exec.cMon Mar 6 >>> 15:42:03 2017(r314779) >>> +++ head/lib/libpam/modules/pam_exec/pam_exec.cMon Mar 6 >>> 15:45:46 2017(r314780) >>> @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, >>> nitems = sizeof(env_items) / sizeof(*env_items); >>> /* Count PAM return values put in the environment. */ >>> nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; >>> -tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * >>> +tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, >>> sizeof(*envlist)); >>> if (tmp == NULL) { >>> openpam_free_envlist(envlist); >>> >> This commit breaks pam_exec for me... without this change I see the >> expected PAM_* environment variables from my execed script, but with >> this change I no longer see any of them. > Thanks for the report. > > It seems strange this can cause any failure. Perhaps there is a latent > overflow here and we have been living with it? I will revert while it is > investigated. > > BTW, the "nitems" variable may conflict with nitems() in sys/param.h. I don't think so. I manually ran the compile step in /usr/src/lib/libpam/modules/pam_exec replacing -o with -E per: cc -DOPENPAM_STATIC_MODULES -O2 -pipe -I/usr/src/contrib/openpam/include -I/usr/src/lib/libpam -DOPENPAM_DEBUG -MD -MF.depend.pam_exec.o -MTpam_exec.o -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments -c pam_exec.c -E | vim - and the preprocessed code in question looks sane (included a few lines of context either side): envlist = pam_getenvlist(pamh); for (envlen = 0; envlist[envlen] != ((void *)0); ++envlen) ; nitems = sizeof(env_items) / sizeof(*env_items); nitems_rv = options->return_prog_exit_status ? 24 : 0; tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, sizeof(*envlist)); if (tmp == ((void *)0)) { openpam_free_envlist(envlist); return (PAM_BUF_ERR); } Cheers, Lawrence ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec
On 3/12/2017 12:14 PM, Lawrence Stewart wrote: Hi Pedro, On 07/03/2017 02:45, Pedro F. Giffuni wrote: Author: pfg Date: Mon Mar 6 15:45:46 2017 New Revision: 314780 URL: https://svnweb.freebsd.org/changeset/base/314780 Log: libpam: extra bounds checking through reallocarray(3). Reviewed by: des MFC after: 1 week Modified: head/lib/libpam/modules/pam_exec/pam_exec.c Modified: head/lib/libpam/modules/pam_exec/pam_exec.c == --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:42:03 2017 (r314779) +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:45:46 2017 (r314780) @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, nitems = sizeof(env_items) / sizeof(*env_items); /* Count PAM return values put in the environment. */ nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * + tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, sizeof(*envlist)); if (tmp == NULL) { openpam_free_envlist(envlist); This commit breaks pam_exec for me... without this change I see the expected PAM_* environment variables from my execed script, but with this change I no longer see any of them. Thanks for the report. It seems strange this can cause any failure. Perhaps there is a latent overflow here and we have been living with it? I will revert while it is investigated. BTW, the "nitems" variable may conflict with nitems() in sys/param.h. Pedro. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec
Hi Pedro, On 07/03/2017 02:45, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Mar 6 15:45:46 2017 > New Revision: 314780 > URL: https://svnweb.freebsd.org/changeset/base/314780 > > Log: > libpam: extra bounds checking through reallocarray(3). > > Reviewed by:des > MFC after: 1 week > > Modified: > head/lib/libpam/modules/pam_exec/pam_exec.c > > Modified: head/lib/libpam/modules/pam_exec/pam_exec.c > == > --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:42:03 > 2017(r314779) > +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:45:46 > 2017(r314780) > @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, > nitems = sizeof(env_items) / sizeof(*env_items); > /* Count PAM return values put in the environment. */ > nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; > - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * > + tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, > sizeof(*envlist)); > if (tmp == NULL) { > openpam_free_envlist(envlist); > This commit breaks pam_exec for me... without this change I see the expected PAM_* environment variables from my execed script, but with this change I no longer see any of them. Cheers, Lawrence ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315163 - head/sys/dev/isp
Author: mav Date: Sun Mar 12 16:55:18 2017 New Revision: 315163 URL: https://svnweb.freebsd.org/changeset/base/315163 Log: Remove strange config_intrhook_establish() magic. Interrupts are enabled as part of chip reset just during driver attach. Later "enabling" of already enabled interrupts is useless. MFC after:2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c == --- head/sys/dev/isp/isp_freebsd.c Sun Mar 12 16:03:34 2017 (r315162) +++ head/sys/dev/isp/isp_freebsd.c Sun Mar 12 16:55:18 2017 (r315163) @@ -278,25 +278,11 @@ isp_attach(ispsoftc_t *isp) int du = device_get_unit(isp->isp_dev); int chan; - isp->isp_osinfo.ehook.ich_func = isp_intr_enable; - isp->isp_osinfo.ehook.ich_arg = isp; - /* -* Haha. Set this first, because if we're loaded as a module isp_intr_enable -* will be called right awawy, which will clear isp_osinfo.ehook_active, -* which would be unwise to then set again later. -*/ - isp->isp_osinfo.ehook_active = 1; - if (config_intrhook_establish(&isp->isp_osinfo.ehook) != 0) { - isp_prt(isp, ISP_LOGERR, "could not establish interrupt enable hook"); - return (-EIO); - } - /* * Create the device queue for our SIM(s). */ isp->isp_osinfo.devq = cam_simq_alloc(isp->isp_maxcmds); if (isp->isp_osinfo.devq == NULL) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); return (EIO); } @@ -330,10 +316,6 @@ unwind: ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); } - if (isp->isp_osinfo.ehook_active) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); - isp->isp_osinfo.ehook_active = 0; - } if (isp->isp_osinfo.cdev) { destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; @@ -371,10 +353,6 @@ isp_detach(ispsoftc_t *isp) destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; } - if (isp->isp_osinfo.ehook_active) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); - isp->isp_osinfo.ehook_active = 0; - } if (isp->isp_osinfo.devq != NULL) { cam_simq_free(isp->isp_osinfo.devq); isp->isp_osinfo.devq = NULL; @@ -786,28 +764,6 @@ ispioctl(struct cdev *dev, u_long c, cad return (retval); } -static void -isp_intr_enable(void *arg) -{ - int chan; - ispsoftc_t *isp = arg; - ISP_LOCK(isp); - if (IS_FC(isp)) { - for (chan = 0; chan < isp->isp_nchan; chan++) { - if (FCPARAM(isp, chan)->role != ISP_ROLE_NONE) { - ISP_ENABLE_INTS(isp); - break; - } - } - } else { - ISP_ENABLE_INTS(isp); - } - isp->isp_osinfo.ehook_active = 0; - ISP_UNLOCK(isp); - /* Release our hook so that the boot can continue. */ - config_intrhook_disestablish(&isp->isp_osinfo.ehook); -} - /* * Local Inlines */ Modified: head/sys/dev/isp/isp_freebsd.h == --- head/sys/dev/isp/isp_freebsd.h Sun Mar 12 16:03:34 2017 (r315162) +++ head/sys/dev/isp/isp_freebsd.h Sun Mar 12 16:55:18 2017 (r315163) @@ -270,7 +270,6 @@ struct isposinfo { struct mtx lock; device_tdev; struct cdev * cdev; - struct intr_config_hook ehook; struct cam_devq * devq; /* @@ -310,7 +309,6 @@ struct isposinfo { sixtyfourbit: 1,/* sixtyfour bit platform */ timer_active: 1, autoconf: 1, - ehook_active: 1, mbox_sleeping : 1, mbox_sleep_ok : 1, mboxcmd_done: 1, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315162 - in head/lib/libc: gen iconv net regex rpc stdio stdlib
Author: pfg Date: Sun Mar 12 16:03:34 2017 New Revision: 315162 URL: https://svnweb.freebsd.org/changeset/base/315162 Log: libc: provide some bounds-checking through reallocarray(3). reallocarray(3) is a non portable extension that originated in OpenBSD. Given that it is already in FreeBSD's libc it is useful for the cases where reallocation involves a multiplication. MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D9955 Modified: head/lib/libc/gen/glob.c head/lib/libc/gen/scandir.c head/lib/libc/gen/setmode.c head/lib/libc/gen/wordexp.c head/lib/libc/iconv/citrus_esdb.c head/lib/libc/net/nsdispatch.c head/lib/libc/regex/regcomp.c head/lib/libc/rpc/getnetconfig.c head/lib/libc/stdio/open_wmemstream.c head/lib/libc/stdio/printf-pos.c head/lib/libc/stdio/ungetc.c head/lib/libc/stdlib/getenv.c Modified: head/lib/libc/gen/glob.c == --- head/lib/libc/gen/glob.cSun Mar 12 15:36:07 2017(r315161) +++ head/lib/libc/gen/glob.cSun Mar 12 16:03:34 2017(r315162) @@ -850,7 +850,7 @@ globextend(const Char *path, glob_t *pgl const char *origpat) { char **pathv; - size_t i, newsize, len; + size_t i, newn, len; char *copy; const Char *p; @@ -860,9 +860,9 @@ globextend(const Char *path, glob_t *pgl return (GLOB_NOSPACE); } - newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs); - /* realloc(NULL, newsize) is equivalent to malloc(newsize). */ - pathv = realloc((void *)pglob->gl_pathv, newsize); + newn = 2 + pglob->gl_pathc + pglob->gl_offs; + /* reallocarray(NULL, newn, size) is equivalent to malloc(newn*size). */ + pathv = reallocarray(pglob->gl_pathv, newn, sizeof(*pathv)); if (pathv == NULL) return (GLOB_NOSPACE); Modified: head/lib/libc/gen/scandir.c == --- head/lib/libc/gen/scandir.c Sun Mar 12 15:36:07 2017(r315161) +++ head/lib/libc/gen/scandir.c Sun Mar 12 16:03:34 2017(r315162) @@ -116,8 +116,8 @@ scandir(const char *dirname, struct dire if (numitems >= arraysz) { struct dirent **names2; - names2 = (struct dirent **)realloc((char *)names, - (arraysz * 2) * sizeof(struct dirent *)); + names2 = reallocarray(names, arraysz, + 2 * sizeof(struct dirent *)); if (names2 == NULL) { free(p); goto fail; Modified: head/lib/libc/gen/setmode.c == --- head/lib/libc/gen/setmode.c Sun Mar 12 15:36:07 2017(r315161) +++ head/lib/libc/gen/setmode.c Sun Mar 12 16:03:34 2017(r315162) @@ -155,7 +155,7 @@ common: if (set->cmd2 & CMD2_CLR) { if (set >= endset) {\ BITCMD *newset; \ setlen += SET_LEN_INCR; \ - newset = realloc(saveset, sizeof(BITCMD) * setlen); \ + newset = reallocarray(saveset, setlen, sizeof(BITCMD)); \ if (newset == NULL) \ goto out; \ set = newset + (set - saveset); \ Modified: head/lib/libc/gen/wordexp.c == --- head/lib/libc/gen/wordexp.c Sun Mar 12 15:36:07 2017(r315161) +++ head/lib/libc/gen/wordexp.c Sun Mar 12 16:03:34 2017(r315162) @@ -234,8 +234,8 @@ we_askshell(const char *words, wordexp_t vofs += we->we_offs; we->we_wordc += nwords; we->we_nbytes += nbytes; - if ((nwv = realloc(we->we_wordv, (we->we_wordc + 1 + - (flags & WRDE_DOOFFS ? we->we_offs : 0)) * + if ((nwv = reallocarray(we->we_wordv, (we->we_wordc + 1 + + (flags & WRDE_DOOFFS ? we->we_offs : 0)), sizeof(char *))) == NULL) { error = WRDE_NOSPACE; goto cleanup; Modified: head/lib/libc/iconv/citrus_esdb.c == --- head/lib/libc/iconv/citrus_esdb.c Sun Mar 12 15:36:07 2017 (r315161) +++ head/lib/libc/iconv/citrus_esdb.c Sun Mar 12 16:03:34 2017 (r315162) @@ -347,7 +347,7 @@ _citrus_esdb_get_list(char ***rlist, siz ret = 0; /* XXX: why reallocing the list space posteriorly? shouldn't be done earlier? */ - q = realloc(list, num * sizeof(char *));
svn commit: r315161 - head/sys/dev/isp
Author: mav Date: Sun Mar 12 15:36:07 2017 New Revision: 315161 URL: https://svnweb.freebsd.org/changeset/base/315161 Log: Try to slight untangle I/O and loop status handling. MFC after:2 weeks Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Sun Mar 12 14:17:57 2017(r315160) +++ head/sys/dev/isp/isp.c Sun Mar 12 15:36:07 2017(r315161) @@ -4343,13 +4343,6 @@ isp_start(XS_T *xs) return (CMD_COMPLETE); } - /* -* Try again later. -*/ - if (fcp->isp_loopstate != LOOP_READY) { - return (CMD_RQLATER); - } - isp_prt(isp, ISP_LOGDEBUG2, "XS_TGT(xs)=%d", target); lp = &fcp->portdb[target]; if (target < 0 || target >= MAX_FC_TARG || @@ -4357,6 +4350,12 @@ isp_start(XS_T *xs) XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } + if (fcp->isp_loopstate != LOOP_READY) { + isp_prt(isp, ISP_LOGDEBUG1, + "%d.%d.%jx loop is not ready", + XS_CHANNEL(xs), target, (uintmax_t)XS_LUN(xs)); + return (CMD_RQLATER); + } if (lp->state == FC_PORTDB_STATE_ZOMBIE) { isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%jx target zombie", @@ -6544,7 +6543,8 @@ isp_parse_status(ispsoftc_t *isp, ispsta case RQCS_PORT_CHANGED: isp_prt(isp, ISP_LOGWARN, "port changed for target %d", XS_TGT(xs)); if (XS_NOERR(xs)) { - XS_SETERR(xs, HBA_SELTIMEOUT); + *XS_STSP(xs) = SCSI_BUSY; + XS_SETERR(xs, HBA_TGTBSY); } return; @@ -6693,11 +6693,11 @@ isp_parse_status_24xx(ispsoftc_t *isp, i case RQCS_PORT_CHANGED: isp_prt(isp, ISP_LOGWARN, "port changed for target %d chan %d", XS_TGT(xs), chan); if (XS_NOERR(xs)) { - XS_SETERR(xs, HBA_SELTIMEOUT); + *XS_STSP(xs) = SCSI_BUSY; + XS_SETERR(xs, HBA_TGTBSY); } return; - case RQCS_24XX_ENOMEM: /* f/w resource unavailable */ isp_prt(isp, ISP_LOGWARN, "f/w resource unavailable for target %d chan %d", XS_TGT(xs), chan); if (XS_NOERR(xs)) { Modified: head/sys/dev/isp/isp_freebsd.c == --- head/sys/dev/isp/isp_freebsd.c Sun Mar 12 14:17:57 2017 (r315160) +++ head/sys/dev/isp/isp_freebsd.c Sun Mar 12 15:36:07 2017 (r315161) @@ -3073,7 +3073,6 @@ isp_loop_changed(ispsoftc_t *isp, int ch isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop changed", chan); if (fcp->role & ISP_ROLE_INITIATOR) isp_freeze_loopdown(isp, chan); - fc->loop_dead = 0; fc->loop_down_time = time_uptime; wakeup(fc); } @@ -3085,7 +3084,6 @@ isp_loop_up(ispsoftc_t *isp, int chan) isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop is up", chan); fc->loop_seen_once = 1; - fc->loop_dead = 0; fc->loop_down_time = 0; isp_unfreeze_loopdown(isp, chan); } @@ -3149,7 +3147,6 @@ isp_loop_dead(ispsoftc_t *isp, int chan) } isp_unfreeze_loopdown(isp, chan); - fc->loop_dead = 1; fc->loop_down_time = 0; } @@ -3377,18 +3374,6 @@ isp_action(struct cam_sim *sim, union cc callout_reset(&PISP_PCMD(ccb)->wdog, ts, isp_watchdog, ccb); break; case CMD_RQLATER: - /* -* We get this result if the loop isn't ready -* or if the device in question has gone zombie. -*/ - if (ISP_FC_PC(isp, bus)->loop_dead) { - isp_prt(isp, ISP_LOGDEBUG0, - "%d.%jx loop is dead", - XS_TGT(ccb), (uintmax_t)XS_LUN(ccb)); - ccb->ccb_h.status = CAM_SEL_TIMEOUT; - isp_done((struct ccb_scsiio *) ccb); - break; - } isp_prt(isp, ISP_LOGDEBUG0, "%d.%jx retry later", XS_TGT(ccb), (uintmax_t)XS_LUN(ccb)); cam_freeze_devq(ccb->ccb_h.path); @@ -3913,8 +3898,6 @@ isp_action(struct cam_sim *sim, union cc } } -#defineISPDDB (CAM
Re: svn commit: r315068 - head/sys/modules/qlxgbe
On Sun, 12 Mar 2017, Andriy Gapon wrote: On 12/03/2017 04:44, Bruce Evans wrote: On Sat, 11 Mar 2017, Andriy Gapon wrote: Log: revert r314862, use of GCC_MS_EXTENSIONS in qlxgbe Commit r278913 made explicit use of GCC_MS_EXTENSIONS unnecessary. Requested by:glebius Does this module actually use ms extensions? This seems unlikely, since only gcc supports them. It probably doesn't. My kernels compile correctly with the correct CFLAGS (gcc -std=gnu99 -fno-ms-extensions). How did you manage to pass -std=gnu99 to the module build? I edited kern.mk to change CSTD together with removing -fms-extensions. No matter what flags I tried to modify the actual compiler invocations still had -std=iso9899:1999 after -std=gnu99 in them, so my modifications had no effect. GCC_MS_EXTENSIONS was the easiest way to get the job done. Hmm, more bugs: - kern.mk forces its wrong CSTD using '='. bsd.sys.mk uses '?=' as well as the correct CSTD. - -fms-extensions is now hard-coded too. However, it is a bit earlier in CFLAGS so might be easier to override. Controlling the order of CFLAGS has always been a problem. There are many undocumented macros and it isn't clear which ones are implementation details. Now I get -std second last and -Werror last CFLAGS. -Werror is set by WERROR?=, so WERROR can be used for overrides. Overriding -std is accepted and hopefully works. WERROR is before PROF in NORMAL_C, but PROF is not in NORMAL_S or PROFILE_C, so of you want to override PROF then you have to fix this or duplicate the overrides in WERROR and PROF. There are further problems with special rules. The ones for aesni are of nearly the lowest quality. These ensure breaking gcc using the order WERROR, NO_CAST_QUAL, PROF, then main unportable -m's (with at least -msse4 unsupported by gcc-4.2.1), then .IMPSRC. Bruce ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315160 - head/sys/dev/isp
Author: mav Date: Sun Mar 12 14:17:57 2017 New Revision: 315160 URL: https://svnweb.freebsd.org/changeset/base/315160 Log: Remove code for unsupported FreeBSD versions. MFC after:2 weeks Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_target.c Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Sun Mar 12 13:58:51 2017(r315159) +++ head/sys/dev/isp/isp.c Sun Mar 12 14:17:57 2017(r315160) @@ -4514,15 +4514,7 @@ isp_start(XS_T *xs) t7->req_tidlo = lp->portid; t7->req_tidhi = lp->portid >> 16; t7->req_vpidx = ISP_GET_VPIDX(isp, XS_CHANNEL(xs)); -#if __FreeBSD_version >= 1000700 be64enc(t7->req_lun, CAM_EXTLUN_BYTE_SWIZZLE(XS_LUN(xs))); -#else - if (XS_LUN(xs) >= 256) { - t7->req_lun[0] = XS_LUN(xs) >> 8; - t7->req_lun[0] |= 0x40; - } - t7->req_lun[1] = XS_LUN(xs); -#endif if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) { if (FCP_NEXT_CRN(isp, &t7->req_crn, xs)) { isp_prt(isp, ISP_LOG_WARN1, @@ -4555,19 +4547,11 @@ isp_start(XS_T *xs) ispreqt2e_t *t2e = (ispreqt2e_t *)local; t2e->req_target = lp->handle; t2e->req_scclun = XS_LUN(xs); -#if __FreeBSD_version < 1000700 - if (XS_LUN(xs) >= 256) - t2e->req_scclun |= 0x4000; -#endif cdbp = t2e->req_cdb; } else if (ISP_CAP_SCCFW(isp)) { ispreqt2_t *t2 = (ispreqt2_t *)local; t2->req_target = lp->handle; t2->req_scclun = XS_LUN(xs); -#if __FreeBSD_version < 1000700 - if (XS_LUN(xs) >= 256) - t2->req_scclun |= 0x4000; -#endif cdbp = t2->req_cdb; } else { t2->req_target = lp->handle; Modified: head/sys/dev/isp/isp_freebsd.c == --- head/sys/dev/isp/isp_freebsd.c Sun Mar 12 13:58:51 2017 (r315159) +++ head/sys/dev/isp/isp_freebsd.c Sun Mar 12 14:17:57 2017 (r315160) @@ -391,9 +391,7 @@ isp_freeze_loopdown(ispsoftc_t *isp, int isp_prt(isp, ISP_LOGDEBUG0, "Chan %d Freeze simq (loopdown)", chan); fc->simqfrozen = SIMQFRZ_LOOPDOWN; -#if __FreeBSD_version >= 139 xpt_hold_boot(); -#endif xpt_freeze_simq(fc->sim, 1); } else { isp_prt(isp, ISP_LOGDEBUG0, @@ -414,9 +412,7 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, i isp_prt(isp, ISP_LOGDEBUG0, "Chan %d Release simq", chan); xpt_release_simq(fc->sim, 1); -#if __FreeBSD_version >= 139 xpt_release_boot(); -#endif } } } @@ -1736,10 +1732,6 @@ isp_target_putback_atio(union ccb *ccb) at->at_header.rqs_entry_count = 1; if (ISP_CAP_SCCFW(isp)) { at->at_scclun = (uint16_t) ccb->ccb_h.target_lun; -#if __FreeBSD_version < 1000700 - if (at->at_scclun >= 256) - at->at_scclun |= 0x4000; -#endif } else { at->at_lun = (uint8_t) ccb->ccb_h.target_lun; } @@ -1788,9 +1780,6 @@ isp_handle_platform_atio2(ispsoftc_t *is fcp = FCPARAM(isp, 0); if (ISP_CAP_SCCFW(isp)) { lun = aep->at_scclun; -#if __FreeBSD_version < 1000700 - lun &= 0x3fff; -#endif } else { lun = aep->at_lun; } @@ -1926,12 +1915,7 @@ isp_handle_platform_atio7(ispsoftc_t *is did = (aep->at_hdr.d_id[0] << 16) | (aep->at_hdr.d_id[1] << 8) | aep->at_hdr.d_id[2]; sid = (aep->at_hdr.s_id[0] << 16) | (aep->at_hdr.s_id[1] << 8) | aep->at_hdr.s_id[2]; -#if __FreeBSD_version >= 1000700 lun = CAM_EXTLUN_BYTE_SWIZZLE(be64dec(aep->at_cmnd.fcp_cmnd_lun)); -#else - lun = (aep->at_cmnd.fcp_cmnd_lun[0] & 0x3f << 8) | - aep->at_cmnd.fcp_cmnd_lun[1]; -#endif /* * Find the N-port handle, and Virtual Port Index for this command. @@ -2419,9 +2403,6 @@ isp_handle_platform_notify_fc(ispsoftc_t if (ISP_CAP_SCCFW(isp)) { lun = inp->in_scclun; -#if __FreeBSD_version < 1000700 - lun &= 0x3fff; -#endif } else { lun = inp->in_lun; } @@ -3879,12 +3860,7 @@ isp_action(struc
Re: svn commit: r308996 - head/lib/libfetch
> On Mar 12, 2017, at 04:26, Dag-Erling Smørgrav wrote: > > "Ngie Cooper (yaneurabeya)" writes: >> Hi Bjoern, > > No, that was my father :) :D.. >>Shouldn’t this be strrchr instead of strchr since you’re >> scanning for the service from the right side of the host, >> e.g. “foo:service” or “[::1]:service”? This code would match index 3 >> in the first example, but it would match index 2 in the second >> example. > > Correct, although it may be slightly more complicated, which is why I > didn't immediately jump on it when bz@ pointed it out. I'm working on > it right now. Awesome! Great teamwork! -Ngie ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315159 - head/sys/kern
Author: kib Date: Sun Mar 12 13:58:51 2017 New Revision: 315159 URL: https://svnweb.freebsd.org/changeset/base/315159 Log: Avoid reusing p_ksi while it is on queue. When sending SIGCHLD informing reaper that a zombie was reparented to it, we might race with the situation where the previous parent still not finished delivering SIGCHLD and having its p_ksi structure on the signal queue. While on queue, the ksi should not be used for another send. Fix this by copying p_ksi into newly allocated ksi, which is directly put onto reaper sigqueue. The later ensures that siginfo for reaper SIGCHLD is always present, similar to guarantees for siginfo of child. Reported by: bdrewery Discussed with: jilles Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c == --- head/sys/kern/kern_exit.c Sun Mar 12 13:53:13 2017(r315158) +++ head/sys/kern/kern_exit.c Sun Mar 12 13:58:51 2017(r315159) @@ -189,6 +189,7 @@ exit1(struct thread *td, int rval, int s { struct proc *p, *nq, *q, *t; struct thread *tdt; + ksiginfo_t *ksi, *ksi1; mtx_assert(&Giant, MA_NOTOWNED); KASSERT(rval == 0 || signo == 0, ("exit1 rv %d sig %d", rval, signo)); @@ -449,14 +450,32 @@ exit1(struct thread *td, int rval, int s wakeup(q->p_reaper); for (; q != NULL; q = nq) { nq = LIST_NEXT(q, p_sibling); + ksi = ksiginfo_alloc(TRUE); PROC_LOCK(q); q->p_sigparent = SIGCHLD; if (!(q->p_flag & P_TRACED)) { proc_reparent(q, q->p_reaper); if (q->p_state == PRS_ZOMBIE) { + /* +* Inform reaper about the reparented +* zombie, since wait(2) has something +* new to report. Guarantee queueing +* of the SIGCHLD signal, similar to +* the _exit() behaviour, by providing +* our ksiginfo. Ksi is freed by the +* signal delivery. +*/ + if (q->p_ksi == NULL) { + ksi1 = NULL; + } else { + ksiginfo_copy(q->p_ksi, ksi); + ksi->ksi_flags |= KSI_INS; + ksi1 = ksi; + ksi = NULL; + } PROC_LOCK(q->p_reaper); - pksignal(q->p_reaper, SIGCHLD, q->p_ksi); + pksignal(q->p_reaper, SIGCHLD, ksi1); PROC_UNLOCK(q->p_reaper); } } else { @@ -489,6 +508,8 @@ exit1(struct thread *td, int rval, int s kern_psignal(q, SIGKILL); } PROC_UNLOCK(q); + if (ksi != NULL) + ksiginfo_free(ksi); } /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315158 - head/sys/vm
Author: kib Date: Sun Mar 12 13:53:13 2017 New Revision: 315158 URL: https://svnweb.freebsd.org/changeset/base/315158 Log: Follow-up to r313690. Fix two missed places where vm_object offset to index calculation should use unsigned shift, to allow handling of full range of unsigned offsets used to create device mappings. Reported and tested by: royger (previous version) Reviewed by: alc (previous version) Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c == --- head/sys/vm/vm_map.cSun Mar 12 13:51:13 2017(r315157) +++ head/sys/vm/vm_map.cSun Mar 12 13:53:13 2017(r315158) @@ -4122,7 +4122,7 @@ RetryLookup:; * Return the object/offset from this entry. If the entry was * copy-on-write or empty, it has been fixed up. */ - *pindex = OFF_TO_IDX((vaddr - entry->start) + entry->offset); + *pindex = UOFF_TO_IDX((vaddr - entry->start) + entry->offset); *object = entry->object.vm_object; *out_prot = prot; @@ -4203,7 +4203,7 @@ vm_map_lookup_locked(vm_map_t *var_map, * Return the object/offset from this entry. If the entry was * copy-on-write or empty, it has been fixed up. */ - *pindex = OFF_TO_IDX((vaddr - entry->start) + entry->offset); + *pindex = UOFF_TO_IDX((vaddr - entry->start) + entry->offset); *object = entry->object.vm_object; *out_prot = prot; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315157 - head/sys/kern
Author: kib Date: Sun Mar 12 13:51:13 2017 New Revision: 315157 URL: https://svnweb.freebsd.org/changeset/base/315157 Log: Accept linkers representation for ELF segments with zero on-disk length. For such segments, GNU bfd linker writes knowingly incorrect value into the the file offset field of the program header entry, with the motivation that file should not be mapped for creation of this segment at all. Relax checks for the ELF structure validity when on-disk segment length is zero, and explicitely set mapping length to zero for such segments to avoid validating rounding arithmetic. PR: 217610 Reported by: Robert Clausecker Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c == --- head/sys/kern/imgact_elf.c Sun Mar 12 13:49:42 2017(r315156) +++ head/sys/kern/imgact_elf.c Sun Mar 12 13:51:13 2017(r315157) @@ -522,7 +522,8 @@ __elfN(load_section)(struct image_params * While I'm here, might as well check for something else that * is invalid: filsz cannot be greater than memsz. */ - if ((off_t)filsz + offset > imgp->attr->va_size || filsz > memsz) { + if ((filsz != 0 && (off_t)filsz + offset > imgp->attr->va_size) || + filsz > memsz) { uprintf("elf_load_section: truncated ELF file\n"); return (ENOEXEC); } @@ -538,7 +539,9 @@ __elfN(load_section)(struct image_params * early and copy the initialized data into that first page. We * choose the second. */ - if (memsz > filsz) + if (filsz == 0) + map_len = 0; + else if (memsz > filsz) map_len = trunc_page_ps(offset + filsz, pagesize) - file_addr; else map_len = round_page_ps(offset + filsz, pagesize) - file_addr; @@ -570,7 +573,8 @@ __elfN(load_section)(struct image_params * segment in the file is extended to provide bss. It's a neat idea * to try and save a page, but it's a pain in the behind to implement. */ - copy_len = (offset + filsz) - trunc_page_ps(offset + filsz, pagesize); + copy_len = filsz == 0 ? 0 : (offset + filsz) - trunc_page_ps(offset + + filsz, pagesize); map_addr = trunc_page_ps((vm_offset_t)vmaddr + filsz, pagesize); map_len = round_page_ps((vm_offset_t)vmaddr + memsz, pagesize) - map_addr; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315156 - head/sys/kern
Author: kib Date: Sun Mar 12 13:49:42 2017 New Revision: 315156 URL: https://svnweb.freebsd.org/changeset/base/315156 Log: Style. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c == --- head/sys/kern/imgact_elf.c Sun Mar 12 13:48:24 2017(r315155) +++ head/sys/kern/imgact_elf.c Sun Mar 12 13:49:42 2017(r315156) @@ -508,7 +508,7 @@ __elfN(load_section)(struct image_params size_t map_len; vm_map_t map; vm_object_t object; - vm_offset_t map_addr; + vm_offset_t off, map_addr; int error, rv, cow; size_t copy_len; vm_ooffset_t file_addr; @@ -559,9 +559,8 @@ __elfN(load_section)(struct image_params return (EINVAL); /* we can stop now if we've covered it all */ - if (memsz == filsz) { + if (memsz == filsz) return (0); - } } @@ -580,14 +579,11 @@ __elfN(load_section)(struct image_params if (map_len != 0) { rv = __elfN(map_insert)(imgp, map, NULL, 0, map_addr, map_addr + map_len, VM_PROT_ALL, 0); - if (rv != KERN_SUCCESS) { + if (rv != KERN_SUCCESS) return (EINVAL); - } } if (copy_len != 0) { - vm_offset_t off; - sf = vm_imgact_map_page(object, offset + filsz); if (sf == NULL) return (EIO); @@ -598,14 +594,12 @@ __elfN(load_section)(struct image_params error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)map_addr, copy_len); vm_imgact_unmap_page(sf); - if (error) { + if (error != 0) return (error); - } } /* * set it to the specified protection. -* XXX had better undo the damage from pasting over the cracks here! */ vm_map_protect(map, trunc_page(map_addr), round_page(map_addr + map_len), prot, FALSE); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315155 - in head/sys: kern sys
Author: kib Date: Sun Mar 12 13:48:24 2017 New Revision: 315155 URL: https://svnweb.freebsd.org/changeset/base/315155 Log: Ktracing kevent(2) calls with unusual arguments might leads to an overly large allocation requests. When ktrace-ing io, sys_kevent() allocates memory to copy the requested changes and reported events. Allocations are sized by the incoming syscall lengths arguments, which are user-controlled, and might cause overflow in calculations or too large allocations. Since io trace chunks are limited by ktr_geniosize, there is no sense it even trying to satisfy unbounded allocations. Export ktr_geniosize and clamp the buffers sizes in advance. PR: 217435 Reported by: Tim Newsham Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/kern/kern_event.c head/sys/kern/kern_ktrace.c head/sys/sys/ktrace.h Modified: head/sys/kern/kern_event.c == --- head/sys/kern/kern_event.c Sun Mar 12 13:42:40 2017(r315154) +++ head/sys/kern/kern_event.c Sun Mar 12 13:48:24 2017(r315155) @@ -887,6 +887,15 @@ kern_kqueue(struct thread *td, int flags return (0); } +static size_t +kev_iovlen(int n, u_int kgio) +{ + + if (n < 0 || n >= kgio / sizeof(struct kevent)) + return (kgio); + return (n * sizeof(struct kevent)); +} + #ifndef _SYS_SYSPROTO_H_ struct kevent_args { int fd; @@ -910,6 +919,7 @@ sys_kevent(struct thread *td, struct kev struct iovec ktriov; struct uio *ktruioin = NULL; struct uio *ktruioout = NULL; + u_int kgio; #endif if (uap->timeout != NULL) { @@ -922,13 +932,15 @@ sys_kevent(struct thread *td, struct kev #ifdef KTRACE if (KTRPOINT(td, KTR_GENIO)) { + kgio = ktr_geniosize; ktriov.iov_base = uap->changelist; - ktriov.iov_len = uap->nchanges * sizeof(struct kevent); + ktriov.iov_len = kev_iovlen(uap->nchanges, kgio); ktruio = (struct uio){ .uio_iov = &ktriov, .uio_iovcnt = 1, .uio_segflg = UIO_USERSPACE, .uio_rw = UIO_READ, .uio_td = td }; ktruioin = cloneuio(&ktruio); ktriov.iov_base = uap->eventlist; + ktriov.iov_len = kev_iovlen(uap->nevents, kgio); ktriov.iov_len = uap->nevents * sizeof(struct kevent); ktruioout = cloneuio(&ktruio); } @@ -939,9 +951,9 @@ sys_kevent(struct thread *td, struct kev #ifdef KTRACE if (ktruioin != NULL) { - ktruioin->uio_resid = uap->nchanges * sizeof(struct kevent); + ktruioin->uio_resid = kev_iovlen(uap->nchanges, kgio); ktrgenio(uap->fd, UIO_WRITE, ktruioin, 0); - ktruioout->uio_resid = td->td_retval[0] * sizeof(struct kevent); + ktruioout->uio_resid = kev_iovlen(td->td_retval[0], kgio); ktrgenio(uap->fd, UIO_READ, ktruioout, error); } #endif Modified: head/sys/kern/kern_ktrace.c == --- head/sys/kern/kern_ktrace.c Sun Mar 12 13:42:40 2017(r315154) +++ head/sys/kern/kern_ktrace.c Sun Mar 12 13:48:24 2017(r315155) @@ -132,7 +132,7 @@ static SYSCTL_NODE(_kern, OID_AUTO, ktra static u_int ktr_requestpool = KTRACE_REQUEST_POOL; TUNABLE_INT("kern.ktrace.request_pool", &ktr_requestpool); -static u_int ktr_geniosize = PAGE_SIZE; +u_int ktr_geniosize = PAGE_SIZE; SYSCTL_UINT(_kern_ktrace, OID_AUTO, genio_size, CTLFLAG_RWTUN, &ktr_geniosize, 0, "Maximum size of genio event payload"); Modified: head/sys/sys/ktrace.h == --- head/sys/sys/ktrace.h Sun Mar 12 13:42:40 2017(r315154) +++ head/sys/sys/ktrace.h Sun Mar 12 13:48:24 2017(r315155) @@ -276,7 +276,7 @@ voidktrcapfail(enum ktr_cap_fail_type, ktrstruct("sockaddr", (s), ((struct sockaddr *)(s))->sa_len) #define ktrstat(s) \ ktrstruct("stat", (s), sizeof(struct stat)) - +extern u_int ktr_geniosize; #else #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315146 - head/share/man/man4
Author: mav Date: Sun Mar 12 12:38:16 2017 New Revision: 315146 URL: https://svnweb.freebsd.org/changeset/base/315146 Log: Some more polishing. MFC after:13 days Modified: head/share/man/man4/ctl.4 Modified: head/share/man/man4/ctl.4 == --- head/share/man/man4/ctl.4 Sun Mar 12 12:12:59 2017(r315145) +++ head/share/man/man4/ctl.4 Sun Mar 12 12:38:16 2017(r315146) @@ -31,7 +31,8 @@ .Nm ctl .Nd CAM Target Layer / SCSI target subsystem .Sh SYNOPSIS -To compile this driver into the kernel, place the following line in your +To compile this driver into the kernel, +place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device iscsi" @@ -47,15 +48,14 @@ ctl_load="YES" .Sh DESCRIPTION The .Nm -subsystem provides featured, performant and reliable SCSI target devices -emulation. +subsystem provides SCSI target devices emulation. It supports features such as: .Pp .Bl -bullet -compact .It -Disk, processor and cdrom device emulation +Disk, CD-ROM and processor device emulation .It -Tagged and untagged queueing +Tagged queueing .It SCSI task attribute support (ordered, head of queue, simple tags) .It @@ -122,7 +122,7 @@ subsystem includes two backends to creat kinds of backing stores: .Bl -tag -width ramdisk .It block -Stores data on ZFS ZVOLs, files or raw block devices. +Stores data in ZFS ZVOLs, files or raw block devices. .It ramdisk Stores data in RAM, that makes it mostly useful for performance testing. Depending on configured capacity can work as black hole, thin or thick @@ -187,7 +187,7 @@ primary; .It 1 secondary. .El -This role can be overriden on per-LUN basis using "ha_role" LUN option, +This role can be overridden on per-LUN basis using "ha_role" LUN option, so that for one LUN one node is primary, while for another -- another. Role change from primary to secondary for HA modes 0 and 2 closes backends, the opposite change -- opens. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315143 - head/lib/libfetch
Author: des Date: Sun Mar 12 11:54:35 2017 New Revision: 315143 URL: https://svnweb.freebsd.org/changeset/base/315143 Log: Add a __printflike() that would have caught the bug fixed in r314396. Modified: head/lib/libfetch/common.h Modified: head/lib/libfetch/common.h == --- head/lib/libfetch/common.h Sun Mar 12 10:56:19 2017(r315142) +++ head/lib/libfetch/common.h Sun Mar 12 11:54:35 2017(r315143) @@ -73,7 +73,7 @@ struct iovec; voidfetch_seterr(struct fetcherr *, int); voidfetch_syserr(void); -voidfetch_info(const char *, ...); +voidfetch_info(const char *, ...) __printflike(1, 2); int fetch_default_port(const char *); int fetch_default_proxy_port(const char *); struct addrinfo *fetch_resolve(const char *, int, int); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r308996 - head/lib/libfetch
"Ngie Cooper (yaneurabeya)" writes: > Hi Bjoern, No, that was my father :) > Shouldn’t this be strrchr instead of strchr since you’re > scanning for the service from the right side of the host, > e.g. “foo:service” or “[::1]:service”? This code would match index 3 > in the first example, but it would match index 2 in the second > example. Correct, although it may be slightly more complicated, which is why I didn't immediately jump on it when bz@ pointed it out. I'm working on it right now. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r315142 - head/usr.bin/man
Author: tijl Date: Sun Mar 12 10:56:19 2017 New Revision: 315142 URL: https://svnweb.freebsd.org/changeset/base/315142 Log: - Remove separate handling of /bin and /usr/bin in manpath. They are no longer a special case. - Prefer PREFIX/share/man over PREFIX/man. - Add /usr/local/share/man to man_default_path. - Update manpath man page. Reviewed by: bapt Modified: head/usr.bin/man/man.sh head/usr.bin/man/manpath.1 Modified: head/usr.bin/man/man.sh == --- head/usr.bin/man/man.sh Sun Mar 12 07:09:50 2017(r315141) +++ head/usr.bin/man/man.sh Sun Mar 12 10:56:19 2017(r315142) @@ -778,26 +778,19 @@ search_path() { IFS=: for path in $PATH; do - # Do a little special casing since the base manpages - # are in /usr/share/man instead of /usr/man or /man. - case "$path" in - /bin|/usr/bin) add_to_manpath "/usr/share/man" ;; - *) if add_to_manpath "$path/man"; then - : - elif add_to_manpath "$path/MAN"; then - : - else - case "$path" in - */bin) p="${path%/bin}/man" - add_to_manpath "$p" - p="${path%/bin}/share/man" - add_to_manpath "$p" - ;; - *) ;; - esac - fi - ;; - esac + if add_to_manpath "$path/man"; then + : + elif add_to_manpath "$path/MAN"; then + : + else + case "$path" in + */bin) p="${path%/bin}/share/man" + add_to_manpath "$p" + p="${path%/bin}/man" + add_to_manpath "$p" + ;; + esac + fi done unset IFS @@ -1007,7 +1000,7 @@ SYSCTL=/sbin/sysctl debug=0 man_default_sections='1:8:2:3:n:4:5:6:7:9:l' -man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/man' +man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/share/man:/usr/local/man' cattool='/usr/bin/zcat -f' config_global='/etc/man.conf' Modified: head/usr.bin/man/manpath.1 == --- head/usr.bin/man/manpath.1 Sun Mar 12 07:09:50 2017(r315141) +++ head/usr.bin/man/manpath.1 Sun Mar 12 10:56:19 2017(r315142) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 1, 2010 +.Dd March 11, 2017 .Dt MANPATH 1 .Os .Sh NAME @@ -66,15 +66,10 @@ for the first of: .Pa pathname/MAN .It If pathname ends with /bin: +.Pa pathname/../share/man +and .Pa pathname/../man .El -Note: Special logic exists to make -.Pa /bin -and -.Pa /usr/bin -look in -.Pa /usr/share/man -for manual files. .It The configuration files listed in the .Sx FILES ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r315068 - head/sys/modules/qlxgbe
On 12/03/2017 04:44, Bruce Evans wrote: > On Sat, 11 Mar 2017, Andriy Gapon wrote: > >> Log: >> revert r314862, use of GCC_MS_EXTENSIONS in qlxgbe >> >> Commit r278913 made explicit use of GCC_MS_EXTENSIONS unnecessary. >> >> Requested by:glebius > > Does this module actually use ms extensions? This seems unlikely, since > only gcc supports them. It probably doesn't. > My kernels compile correctly with the correct CFLAGS (gcc -std=gnu99 > -fno-ms-extensions). How did you manage to pass -std=gnu99 to the module build? No matter what flags I tried to modify the actual compiler invocations still had -std=iso9899:1999 after -std=gnu99 in them, so my modifications had no effect. GCC_MS_EXTENSIONS was the easiest way to get the job done. -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r315141 - head/sys/mips/conf
Hi, Your commit message shows in English what the diff already shows: the 'what changed'. IMHO it would add more value to the commit message to describe the 'why it changed'. What are your ideas about that? Regards, Ronald. On Sun, 12 Mar 2017 08:09:51 +0100, Emmanuel Vadot wrote: Author: manu Date: Sun Mar 12 07:09:50 2017 New Revision: 315141 URL: https://svnweb.freebsd.org/changeset/base/315141 Log: Use 'options EXT_RESOURCES' instead of 'device ext_resources' for FDT enabled MIPS kernel config. Modified: head/sys/mips/conf/JZ4780 head/sys/mips/conf/MT7620A_FDT head/sys/mips/conf/MT7620N_FDT head/sys/mips/conf/MT7621_FDT head/sys/mips/conf/MT7628_FDT head/sys/mips/conf/RT3050_FDT head/sys/mips/conf/RT3352_FDT head/sys/mips/conf/RT3883_FDT head/sys/mips/conf/RT5350_FDT head/sys/mips/conf/X1000 Modified: head/sys/mips/conf/JZ4780 == --- head/sys/mips/conf/JZ4780 Sun Mar 12 06:20:28 2017(r315140) +++ head/sys/mips/conf/JZ4780 Sun Mar 12 07:09:50 2017(r315141) @@ -71,7 +71,7 @@ devicefdt_pinctrl device clk device regulator -device ext_resources +optionsEXT_RESOURCES device gpio Modified: head/sys/mips/conf/MT7620A_FDT == --- head/sys/mips/conf/MT7620A_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/MT7620A_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -73,5 +73,5 @@ devicebpf device if_bridge # Extres -device ext_resources +optionsEXT_RESOURCES device clk Modified: head/sys/mips/conf/MT7620N_FDT == --- head/sys/mips/conf/MT7620N_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/MT7620N_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -70,5 +70,5 @@ devicebpf device if_bridge # Extres -device ext_resources +optionsEXT_RESOURCES device clk Modified: head/sys/mips/conf/MT7621_FDT == --- head/sys/mips/conf/MT7621_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/MT7621_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -69,5 +69,5 @@ devicebpf device if_bridge # Extres -device ext_resources +optionsEXT_RESOURCES device clk Modified: head/sys/mips/conf/MT7628_FDT == --- head/sys/mips/conf/MT7628_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/MT7628_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -72,5 +72,5 @@ devicebpf device if_bridge # Extres -device ext_resources +optionsEXT_RESOURCES device clk Modified: head/sys/mips/conf/RT3050_FDT == --- head/sys/mips/conf/RT3050_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/RT3050_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -74,5 +74,5 @@ devicebpf device if_bridge # Extres -device ext_resources +optionsEXT_RESOURCES device clk Modified: head/sys/mips/conf/RT3352_FDT == --- head/sys/mips/conf/RT3352_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/RT3352_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -70,5 +70,5 @@ devicebpf device if_bridge # Extres -device ext_resources +optionsEXT_RESOURCES device clk Modified: head/sys/mips/conf/RT3883_FDT == --- head/sys/mips/conf/RT3883_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/RT3883_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -74,7 +74,7 @@ devicebpf device if_bridge # Extres -device ext_resources +optionsEXT_RESOURCES device clk # For now there's no etherswitch support for RT3662/RT3883 Modified: head/sys/mips/conf/RT5350_FDT == --- head/sys/mips/conf/RT5350_FDT Sun Mar 12 06:20:28 2017 (r315140) +++ head/sys/mips/conf/RT5350_FDT Sun Mar 12 07:09:50 2017 (r315141) @@ -70,5 +