svn commit: r363121 - in head/sys/arm: broadcom/bcm2835 mv
Author: mmel Date: Sun Jul 12 07:27:21 2020 New Revision: 363121 URL: https://svnweb.freebsd.org/changeset/base/363121 Log: Fix the module name for some arm drivers. Module name (unlike of the of driver name) must be system wide unique. Reported by: Mark Millard(bcm_pci), andrew(mvebu_gpio) MFC with: r362954, r362385 Modified: head/sys/arm/broadcom/bcm2835/bcm2838_pci.c head/sys/arm/mv/mvebu_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2838_pci.c == --- head/sys/arm/broadcom/bcm2835/bcm2838_pci.c Sun Jul 12 07:25:02 2020 (r363120) +++ head/sys/arm/broadcom/bcm2835/bcm2838_pci.c Sun Jul 12 07:27:21 2020 (r363121) @@ -739,5 +739,5 @@ DEFINE_CLASS_1(pcib, bcm_pcib_driver, bcm_pcib_methods sizeof(struct bcm_pcib_softc), generic_pcie_fdt_driver); static devclass_t bcm_pcib_devclass; -DRIVER_MODULE(pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, 0); +DRIVER_MODULE(bcm_pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, 0); Modified: head/sys/arm/mv/mvebu_gpio.c == --- head/sys/arm/mv/mvebu_gpio.cSun Jul 12 07:25:02 2020 (r363120) +++ head/sys/arm/mv/mvebu_gpio.cSun Jul 12 07:27:21 2020 (r363121) @@ -864,6 +864,6 @@ static device_method_t mvebu_gpio_methods[] = { static devclass_t mvebu_gpio_devclass; static DEFINE_CLASS_0(gpio, mvebu_gpio_driver, mvebu_gpio_methods, sizeof(struct mvebu_gpio_softc)); -EARLY_DRIVER_MODULE(gpio, simplebus, mvebu_gpio_driver, +EARLY_DRIVER_MODULE(mvebu_gpio, simplebus, mvebu_gpio_driver, mvebu_gpio_devclass, NULL, NULL, BUS_PASS_TIMER + BUS_PASS_ORDER_LAST); ___ 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: r363122 - head/sys/dev/extres/clk
Author: mmel Date: Sun Jul 12 07:42:21 2020 New Revision: 363122 URL: https://svnweb.freebsd.org/changeset/base/363122 Log: Assigned clocks: fix off-by-one bug, don't leak allocated memory. MFC after: 1 week Modified: head/sys/dev/extres/clk/clk.c Modified: head/sys/dev/extres/clk/clk.c == --- head/sys/dev/extres/clk/clk.c Sun Jul 12 07:27:21 2020 (r363121) +++ head/sys/dev/extres/clk/clk.c Sun Jul 12 07:42:21 2020 (r363122) @@ -1420,15 +1420,17 @@ clk_set_assigned(device_t dev, phandle_t node) } /* First set it's parent if needed */ - if (i <= nparents) + if (i < nparents) clk_set_assigned_parent(dev, clk, i); /* Then set a new frequency */ - if (i <= nrates && rates[i] != 0) + if (i < nrates && rates[i] != 0) clk_set_assigned_rates(dev, clk, rates[i]); clk_release(clk); } + if (rates != NULL) + OF_prop_free(rates); 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"
svn commit: r363123 - head/sys/dev/extres/clk
Author: mmel Date: Sun Jul 12 07:59:15 2020 New Revision: 363123 URL: https://svnweb.freebsd.org/changeset/base/363123 Log: Reverse the processing order of assigned clocks property. Linux processes these clocks in reverse order and some DT relies on this fact. For example, the frequency setting for a given PLL is the last in the list, preceded by the frequency setting of its following divider or so... MFC after:1 week Modified: head/sys/dev/extres/clk/clk.c Modified: head/sys/dev/extres/clk/clk.c == --- head/sys/dev/extres/clk/clk.c Sun Jul 12 07:42:21 2020 (r363122) +++ head/sys/dev/extres/clk/clk.c Sun Jul 12 07:59:15 2020 (r363123) @@ -1407,7 +1407,7 @@ clk_set_assigned(device_t dev, phandle_t node) if (ofw_bus_parse_xref_list_get_length(node, "assigned-clock-parents", "#clock-cells", &nparents) != 0) nparents = -1; - for (i = 0; i < nclocks; i++) { + for (i = nclocks - 1; i >= 0; i--) { /* First get the clock we are supposed to modify */ rv = clk_get_by_ofw_index_prop(dev, 0, "assigned-clocks", i, &clk); ___ 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: r363125 - head/sys/compat/linux
Author: netchild Date: Sun Jul 12 09:51:09 2020 New Revision: 363125 URL: https://svnweb.freebsd.org/changeset/base/363125 Log: Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28). It is documented as a raw hardware-based clock not subject to NTP or incremental adjustments. With this "not as precise as CLOCK_MONOTONIC" description in mind, map it to our CLOCK_MONOTNIC_FAST (the same mapping as for the linux CLOCK_MONOTONIC_COARSE). This is needed for the webcomponent of steam (chromium) and some other steam component or game. The linux-steam-utils port contains a LD_PRELOAD based fix for this. There this is mapped to CLOCK_MONOTONIC. As an untrained ear/eye (= the majority of people) is normaly not noticing a difference of jitter in the 10-20 ms range, specially if you don't pay attention like for example in a browser session while watching a video stream, the mapping to CLOCK_MONOTONIC_FAST seems more appropriate than to CLOCK_MONOTONIC. Modified: head/sys/compat/linux/linux_time.c Modified: head/sys/compat/linux/linux_time.c == --- head/sys/compat/linux/linux_time.c Sun Jul 12 09:49:53 2020 (r363124) +++ head/sys/compat/linux/linux_time.c Sun Jul 12 09:51:09 2020 (r363125) @@ -212,6 +212,7 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) *n = CLOCK_THREAD_CPUTIME_ID; break; case LINUX_CLOCK_REALTIME_COARSE: + case LINUX_CLOCK_MONOTONIC_RAW: *n = CLOCK_REALTIME_FAST; break; case LINUX_CLOCK_MONOTONIC_COARSE: @@ -220,7 +221,6 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) case LINUX_CLOCK_BOOTTIME: *n = CLOCK_UPTIME; break; - case LINUX_CLOCK_MONOTONIC_RAW: case LINUX_CLOCK_REALTIME_ALARM: case LINUX_CLOCK_BOOTTIME_ALARM: case LINUX_CLOCK_SGI_CYCLE: ___ 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: r363127 - in head/sys/net: . route
Author: melifaro Date: Sun Jul 12 11:18:09 2020 New Revision: 363127 URL: https://svnweb.freebsd.org/changeset/base/363127 Log: Add destructor for the rib subscription system to simplify users code. Subscriptions are planned to be used by modules such as route lookup engines. In that case that's the module task to properly unsibscribe before detach. However, the in-kernel customer - inet6 wants to track default route changes. To avoid having inet6 store per-fib subscriptions, handle automatic destruction internally. Differential Revision:https://reviews.freebsd.org/D25614 Modified: head/sys/net/route.c head/sys/net/route/route_ctl.c head/sys/net/route/shared.h Modified: head/sys/net/route.c == --- head/sys/net/route.cSun Jul 12 10:07:01 2020(r363126) +++ head/sys/net/route.cSun Jul 12 11:18:09 2020(r363127) @@ -348,7 +348,7 @@ rt_table_init(int offset, int family, u_int fibnum) nhops_init_rib(rh); /* Init subscription system */ - CK_STAILQ_INIT(&rh->rnh_subscribers); + rib_init_subscriptions(rh); /* Finally, set base callbacks */ rh->rnh_addaddr = rn_addroute; @@ -382,6 +382,8 @@ rt_table_destroy(struct rib_head *rh) rn_walktree(&rh->rmhead.head, rt_freeentry, &rh->rmhead.head); nhops_destroy_rib(rh); + + rib_destroy_subscriptions(rh); /* Assume table is already empty */ RIB_LOCK_DESTROY(rh); Modified: head/sys/net/route/route_ctl.c == --- head/sys/net/route/route_ctl.c Sun Jul 12 10:07:01 2020 (r363126) +++ head/sys/net/route/route_ctl.c Sun Jul 12 11:18:09 2020 (r363127) @@ -847,3 +847,28 @@ destroy_subscription_epoch(epoch_context_t ctx) free(rs, M_RTABLE); } + +void +rib_init_subscriptions(struct rib_head *rnh) +{ + + CK_STAILQ_INIT(&rnh->rnh_subscribers); +} + +void +rib_destroy_subscriptions(struct rib_head *rnh) +{ + struct rib_subscription *rs; + struct epoch_tracker et; + + NET_EPOCH_ENTER(et); + RIB_WLOCK(rnh); + while ((rs = CK_STAILQ_FIRST(&rnh->rnh_subscribers)) != NULL) { + CK_STAILQ_REMOVE_HEAD(&rnh->rnh_subscribers, next); + epoch_call(net_epoch_preempt, destroy_subscription_epoch, + &rs->epoch_ctx); + } + RIB_WUNLOCK(rnh); + NET_EPOCH_EXIT(et); +} + Modified: head/sys/net/route/shared.h == --- head/sys/net/route/shared.h Sun Jul 12 10:07:01 2020(r363126) +++ head/sys/net/route/shared.h Sun Jul 12 11:18:09 2020(r363127) @@ -67,6 +67,10 @@ int nhop_create_from_nhop(struct rib_head *rnh, const void nhops_update_ifmtu(struct rib_head *rh, struct ifnet *ifp, uint32_t mtu); int nhops_dump_sysctl(struct rib_head *rh, struct sysctl_req *w); +/* subscriptions */ +void rib_init_subscriptions(struct rib_head *rnh); +void rib_destroy_subscriptions(struct rib_head *rnh); + /* route */ VNET_DECLARE(uma_zone_t, rtzone); /* Routing table UMA zone. */ #defineV_rtzoneVNET(rtzone) ___ 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: r363128 - in head/sys: net net/route netinet6
Author: melifaro Date: Sun Jul 12 11:24:23 2020 New Revision: 363128 URL: https://svnweb.freebsd.org/changeset/base/363128 Log: Switch inet6 default route subscription to the new rib subscription api. Old subscription model allowed only single customer. Switch inet6 to the new subscription api and eliminate the old model. Differential Revision:https://reviews.freebsd.org/D25615 Modified: head/sys/net/if_var.h head/sys/net/route/route_ctl.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_rtr.c Modified: head/sys/net/if_var.h == --- head/sys/net/if_var.h Sun Jul 12 11:18:09 2020(r363127) +++ head/sys/net/if_var.h Sun Jul 12 11:24:23 2020(r363128) @@ -61,8 +61,6 @@ */ struct rtentry;/* ifa_rtrequest */ -struct nhop_object;/* ifa_rtrequest */ -struct rt_addrinfo;/* ifa_rtrequest */ struct socket; struct carp_if; struct carp_softc; @@ -551,9 +549,6 @@ struct ifaddr { struct ifnet *ifa_ifp; /* back-pointer to interface */ struct carp_softc *ifa_carp; /* pointer to CARP data */ CK_STAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ - void(*ifa_rtrequest)/* check or clean routes (+ or -)'d */ - (int, struct rtentry *, struct nhop_object *, -struct rt_addrinfo *); u_short ifa_flags; /* mostly rt_flags for cloning */ #defineIFA_ROUTE RTF_UP /* route installed */ #defineIFA_RTSELF RTF_HOST/* loopback route to self installed */ Modified: head/sys/net/route/route_ctl.c == --- head/sys/net/route/route_ctl.c Sun Jul 12 11:18:09 2020 (r363127) +++ head/sys/net/route/route_ctl.c Sun Jul 12 11:24:23 2020 (r363128) @@ -79,7 +79,6 @@ struct rib_subscription { static void rib_notify(struct rib_head *rnh, enum rib_subscription_type type, struct rib_cmd_info *rc); -static void rt_notifydelete(struct rtentry *rt, struct rt_addrinfo *info); static void destroy_subscription_epoch(epoch_context_t ctx); static struct rib_head * @@ -275,10 +274,8 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in if ((rn != NULL) || (rt_old != NULL)) rib_notify(rnh, RIB_NOTIFY_DELAYED, rc); - if (rt_old != NULL) { - rt_notifydelete(rt_old, info); + if (rt_old != NULL) rtfree(rt_old); - } /* * If it still failed to go into the tree, @@ -290,13 +287,6 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in return (EEXIST); } - /* -* If this protocol has something to add to this then -* allow it to do that as well. -*/ - if (ifa->ifa_rtrequest) - ifa->ifa_rtrequest(RTM_ADD, rt, rt->rt_nhop, info); - RT_UNLOCK(rt); return (0); @@ -432,7 +422,6 @@ del_route(struct rib_head *rnh, struct rt_addrinfo *in return (error); rib_notify(rnh, RIB_NOTIFY_DELAYED, rc); - rt_notifydelete(rt, info); /* * If the caller wants it, then it can have it, @@ -554,15 +543,9 @@ change_route_one(struct rib_head *rnh, struct rt_addri RT_LOCK(rt); /* Provide notification to the protocols.*/ - if ((nh_orig->nh_ifa != nh->nh_ifa) && nh_orig->nh_ifa->ifa_rtrequest) - nh_orig->nh_ifa->ifa_rtrequest(RTM_DELETE, rt, nh_orig, info); - rt->rt_nhop = nh; rt_setmetrics(info, rt); - if ((nh_orig->nh_ifa != nh->nh_ifa) && nh_orig->nh_ifa->ifa_rtrequest) - nh_orig->nh_ifa->ifa_rtrequest(RTM_DELETE, rt, nh_orig, info); - /* Finalize notification */ rc->rc_rt = rt; rc->rc_nh_old = nh_orig; @@ -641,19 +624,6 @@ rib_action(uint32_t fibnum, int action, struct rt_addr } -static void -rt_notifydelete(struct rtentry *rt, struct rt_addrinfo *info) -{ - struct ifaddr *ifa; - - /* -* give the protocol a chance to keep things in sync. -*/ - ifa = rt->rt_nhop->nh_ifa; - if (ifa != NULL && ifa->ifa_rtrequest != NULL) - ifa->ifa_rtrequest(RTM_DELETE, rt, rt->rt_nhop, info); -} - struct rt_delinfo { struct rt_addrinfo info; @@ -748,8 +718,6 @@ rib_walk_del(u_int fibnum, int family, rt_filter_f_t * /* TODO std rt -> rt_addrinfo export */ di.info.rti_info[RTAX_DST] = rt_key(rt); di.info.rti_info[RTAX_NETMASK] = rt_mask(rt); - - rt_notifydelete(rt, &di.info); if (report) rt_routemsg(RTM_DELETE, rt, rt->rt_nhop->nh_ifp, 0, Modified: head/sys/netinet6/in6_rmx.c
Re: svn commit: r363125 - head/sys/compat/linux
On 12 Jul 2020, at 11:51, Alexander Leidinger wrote: > > Author: netchild > Date: Sun Jul 12 09:51:09 2020 > New Revision: 363125 > URL: https://svnweb.freebsd.org/changeset/base/363125 > > Log: > Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28). > > It is documented as a raw hardware-based clock not subject to NTP or > incremental adjustments. With this "not as precise as CLOCK_MONOTONIC" > description in mind, map it to our CLOCK_MONOTNIC_FAST (the same > mapping as for the linux CLOCK_MONOTONIC_COARSE). Okay, but: > @@ -212,6 +212,7 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) > *n = CLOCK_THREAD_CPUTIME_ID; > break; > case LINUX_CLOCK_REALTIME_COARSE: > + case LINUX_CLOCK_MONOTONIC_RAW: > *n = CLOCK_REALTIME_FAST; > break; > case LINUX_CLOCK_MONOTONIC_COARSE: this shows it is actually mapped to CLOCK_REALTIME_FAST, not CLOCK_MONOTONIC_FAST. Is the code right, or the commit message? :) -Dimitry signature.asc Description: Message signed with OpenPGP
svn commit: r363129 - head/sys/netinet
Author: tuexen Date: Sun Jul 12 14:50:12 2020 New Revision: 363129 URL: https://svnweb.freebsd.org/changeset/base/363129 Log: (Re)activate SCTP system calls when compiling SCTP support into the kernel r363079 introduced the possibility of loading the SCTP stack as a module in addition to compiling it into the kernel. As part of this, the registration of the system calls was removed and put into the loading of the module. Therefore, the system calls are not registered anymore when compiling the SCTP into the kernel. This patch addresses that. Reviewed by: markj Differential Revision:https://reviews.freebsd.org/D25632 Modified: head/sys/netinet/sctp_syscalls.c Modified: head/sys/netinet/sctp_syscalls.c == --- head/sys/netinet/sctp_syscalls.cSun Jul 12 11:24:23 2020 (r363128) +++ head/sys/netinet/sctp_syscalls.cSun Jul 12 14:50:12 2020 (r363129) @@ -117,6 +117,10 @@ sctp_syscalls_init(void) return (0); } +#ifdef SCTP +SYSINIT(sctp_syscalls, SI_SUB_SYSCALLS, SI_ORDER_ANY, sctp_syscalls_init, NULL); +#endif + int sctp_syscalls_uninit(void) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363130 - head/sys/compat/linux
Author: netchild Date: Sun Jul 12 14:57:29 2020 New Revision: 363130 URL: https://svnweb.freebsd.org/changeset/base/363130 Log: Fix r363125 (Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28)), by realy using the MONOTONIC version and not the REALTIME version. Noticed by: myfreeweb at github Modified: head/sys/compat/linux/linux_time.c Modified: head/sys/compat/linux/linux_time.c == --- head/sys/compat/linux/linux_time.c Sun Jul 12 14:50:12 2020 (r363129) +++ head/sys/compat/linux/linux_time.c Sun Jul 12 14:57:29 2020 (r363130) @@ -212,10 +212,10 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) *n = CLOCK_THREAD_CPUTIME_ID; break; case LINUX_CLOCK_REALTIME_COARSE: - case LINUX_CLOCK_MONOTONIC_RAW: *n = CLOCK_REALTIME_FAST; break; case LINUX_CLOCK_MONOTONIC_COARSE: + case LINUX_CLOCK_MONOTONIC_RAW: *n = CLOCK_MONOTONIC_FAST; break; case LINUX_CLOCK_BOOTTIME: ___ 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: r363125 - head/sys/compat/linux
Quoting Dimitry Andric (from Sun, 12 Jul 2020 15:36:25 +0200): On 12 Jul 2020, at 11:51, Alexander Leidinger wrote: Author: netchild Date: Sun Jul 12 09:51:09 2020 New Revision: 363125 URL: https://svnweb.freebsd.org/changeset/base/363125 Log: Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28). It is documented as a raw hardware-based clock not subject to NTP or incremental adjustments. With this "not as precise as CLOCK_MONOTONIC" description in mind, map it to our CLOCK_MONOTNIC_FAST (the same mapping as for the linux CLOCK_MONOTONIC_COARSE). Okay, but: @@ -212,6 +212,7 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) *n = CLOCK_THREAD_CPUTIME_ID; break; case LINUX_CLOCK_REALTIME_COARSE: + case LINUX_CLOCK_MONOTONIC_RAW: *n = CLOCK_REALTIME_FAST; break; case LINUX_CLOCK_MONOTONIC_COARSE: this shows it is actually mapped to CLOCK_REALTIME_FAST, not CLOCK_MONOTONIC_FAST. Is the code right, or the commit message? :) The commit message and the code I have running are right, the code I committed from a "no other change than that"-svn-tree was not. :( I think I should switch to "diff | patch" even for one-liners like that. I commited the fix based upon another message I've seen before this one, but thanks for looking at the code. Bye, Alexander. -- http://www.Leidinger.net alexan...@leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.orgnetch...@freebsd.org : PGP 0x8F31830F9F2772BF pgp_7abo8pzJT.pgp Description: Digitale PGP-Signatur
svn commit: r363132 - head/tests/sys/audit
Author: ngie Date: Sun Jul 12 17:16:57 2020 New Revision: 363132 URL: https://svnweb.freebsd.org/changeset/base/363132 Log: Don't leave `path` behind when executing `:chflags_success` Prior to this change a `SF_IMMUTABLE` chflagsat(2)'ed file (`path`) was left behind, which sabotaged kyua(1) from being able to clean up the work directory, This resulted in unnecessary work for folks having to clean up the work directory on non-disposable systems, which defaults to `/tmp`. Use `UF_OFFLINE` instead of `SF_IMMUTABLE`, in part because setting `SF_IMMUTABLE` isn't relevant to the test and `SF_IMMUTABLE` cannot be cleared at all securelevels, as pointed out by @asomers. Additional work is required to catch cases like this upfront in the future to avoid tester headache. See PR # 247765 for more details/followup. Suggested by: asomers Reviewed By: asomers, #tests MFC after:1 week PR: 247761 Sponsored by: DellEMC Differential Revision: https://reviews.freebsd.org/D25561 Modified: head/tests/sys/audit/file-attribute-modify.c Modified: head/tests/sys/audit/file-attribute-modify.c == --- head/tests/sys/audit/file-attribute-modify.cSun Jul 12 15:57:29 2020(r363131) +++ head/tests/sys/audit/file-attribute-modify.cSun Jul 12 17:16:57 2020(r363132) @@ -704,7 +704,7 @@ ATF_TC_BODY(chflagsat_success, tc) /* File needs to exist to call chflagsat(2) */ ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); FILE *pipefd = setup(fds, auclass); - ATF_REQUIRE_EQ(0, chflagsat(AT_FDCWD, path, SF_IMMUTABLE, 0)); + ATF_REQUIRE_EQ(0, chflagsat(AT_FDCWD, path, UF_OFFLINE, 0)); check_audit(fds, successreg, pipefd); close(filedesc); } @@ -726,7 +726,7 @@ ATF_TC_BODY(chflagsat_failure, tc) { FILE *pipefd = setup(fds, auclass); /* Failure reason: file does not exist */ - ATF_REQUIRE_EQ(-1, chflagsat(AT_FDCWD, errpath, SF_IMMUTABLE, 0)); + ATF_REQUIRE_EQ(-1, chflagsat(AT_FDCWD, errpath, UF_OFFLINE, 0)); check_audit(fds, failurereg, pipefd); } ___ 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: r363103 - head/usr.sbin/bsdinstall/scripts
> On Jul 11, 2020, at 10:20 AM, Allan Jude wrote: > > Author: allanjude > Date: Sat Jul 11 17:20:17 2020 > New Revision: 363103 > URL: https://svnweb.freebsd.org/changeset/base/363103 > > Log: > bsdinstall: only kill the dhclient for the interface we are restarting > > PR: 205821 > Reported by: mjg > MFC after: 2 weeks > Sponsored by:Klara Inc. > Event: July 2020 Bugathon > > Modified: > head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Allan, Thank you so very much for doing this!!! This has been an annoying nitpick of mine with sysinstall/bsdinstall, for many moons :). It looks like equivalent logic doesn’t need to be implemented for IPv6. Yay :). Cheers! -Enji ___ 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: r363088 - head/usr.bin/xinstall/tests
> On Jul 10, 2020, at 6:13 PM, Eugene Grosbein wrote: > > 11.07.2020 8:07, Eugene Grosbein wrote: > Fix the tests for install(1): add support for STRIPBIN's -o option. >>> Is this feature now completely gone? Are binaries being stripped >>> properly in ports, etc? > > Support for STRIPBIN has not changed. Stripping of ports etc. still works as > before, just more quick due to less I/O. Eugene, Got it! Thank you very much for the followup/additional information :). Cheers! -Enji ___ 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: r363133 - head/sys/netinet
Author: tuexen Date: Sun Jul 12 18:34:09 2020 New Revision: 363133 URL: https://svnweb.freebsd.org/changeset/base/363133 Log: Cleanup, no functional change intended. This file is only compiled if INET or INET6 is defined. So there is no need for checking that. Reviewed by: markj Differential Revision:https://reviews.freebsd.org/D25635 Modified: head/sys/netinet/sctp_syscalls.c Modified: head/sys/netinet/sctp_syscalls.c == --- head/sys/netinet/sctp_syscalls.cSun Jul 12 17:16:57 2020 (r363132) +++ head/sys/netinet/sctp_syscalls.cSun Jul 12 18:34:09 2020 (r363133) @@ -32,8 +32,6 @@ __FBSDID("$FreeBSD$"); #include "opt_capsicum.h" -#include "opt_inet.h" -#include "opt_inet6.h" #include "opt_sctp.h" #include "opt_ktrace.h" @@ -139,8 +137,6 @@ sctp_syscalls_uninit(void) /* * SCTP syscalls. - * Functionality only compiled in if SCTP is defined in the kernel Makefile, - * otherwise all return EOPNOTSUPP. */ int sys_sctp_peeloff(td, uap) @@ -150,7 +146,6 @@ sys_sctp_peeloff(td, uap) caddr_t name; } */ *uap; { -#if defined(INET) || defined(INET6) struct file *headfp, *nfp = NULL; struct socket *head, *so; cap_rights_t rights; @@ -212,7 +207,6 @@ done: fdrop(headfp, td); done2: return (error); -#endif } int @@ -228,7 +222,6 @@ sys_sctp_generic_sendmsg (td, uap) int flags } */ *uap; { -#if defined(INET) || defined(INET6) struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; struct file *fp = NULL; @@ -323,7 +316,6 @@ sctp_bad: sctp_bad2: free(to, M_SONAME); return (error); -#endif } int @@ -339,7 +331,6 @@ sys_sctp_generic_sendmsg_iov(td, uap) int flags } */ *uap; { -#if defined(INET) || defined(INET6) struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; struct file *fp = NULL; @@ -451,7 +442,6 @@ sctp_bad1: sctp_bad2: free(to, M_SONAME); return (error); -#endif } int @@ -467,7 +457,6 @@ sys_sctp_generic_recvmsg(td, uap) int *msg_flags } */ *uap; { -#if defined(INET) || defined(INET6) uint8_t sockbufstore[256]; struct uio auio; struct iovec *iov, *tiov; @@ -597,5 +586,4 @@ out1: fdrop(fp, td); return (error); -#endif } ___ 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: r363136 - head/usr.bin/xinstall
Author: eugen Date: Sun Jul 12 20:59:52 2020 New Revision: 363136 URL: https://svnweb.freebsd.org/changeset/base/363136 Log: install(1): another correction after r363064 Make sure we call fsync(2) on strip result in case of "safecopy" and "strip -o tempcopy -- src" before renaming tempcopy to destination. MFC after:3 weeks X-MFC-With: r363064 Modified: head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/xinstall.c == --- head/usr.bin/xinstall/xinstall.cSun Jul 12 19:39:56 2020 (r363135) +++ head/usr.bin/xinstall/xinstall.cSun Jul 12 20:59:52 2020 (r363136) @@ -147,7 +147,7 @@ static void install_dir(char *); static voidmetadata_log(const char *, const char *, struct timespec *, const char *, const char *, off_t); static int parseid(const char *, id_t *); -static int strip(const char *, const char *, char **); +static int strip(const char *, int, const char *, char **); static int trymmap(int); static voidusage(void); @@ -862,7 +862,7 @@ install(const char *from_name, const char *to_name, u_ if (!devnull) { if (dostrip) stripped = strip(tempcopy ? tempfile : to_name, -from_name, &digestresult); + to_fd, from_name, &digestresult); if (!stripped) digestresult = copy(from_fd, from_name, to_fd, tempcopy ? tempfile : to_name, from_sb.st_size); @@ -871,8 +871,8 @@ install(const char *from_name, const char *to_name, u_ if (dostrip) { if (!stripped) - (void)strip(tempcopy ? tempfile : to_name, NULL, - &digestresult); + (void)strip(tempcopy ? tempfile : to_name, to_fd, + NULL, &digestresult); /* * Re-open our fd on the target, in case @@ -1310,17 +1310,18 @@ copy(int from_fd, const char *from_name, int to_fd, co /* * strip -- * Use strip(1) to strip the target file. - * Just invoke strip(1) on to_name if from_name is NULL, - * else try to run "strip -o to_name -- from_name" and return 0 on failure. - * Return 1 on success and assign result of digest_file(to_name) to *dresp. + * Just invoke strip(1) on to_name if from_name is NULL, else try + * to run "strip -o to_name -- from_name" and return 0 on failure. + * Return 1 on success and assign result of digest_file(to_name) + * to *dresp. */ static int -strip(const char *to_name, const char *from_name, char **dresp) +strip(const char *to_name, int to_fd, const char *from_name, char **dresp) { const char *stripbin; const char *args[6]; pid_t pid; - int error, status; + int error, serrno, status; stripbin = getenv("STRIPBIN"); if (stripbin == NULL) @@ -1355,6 +1356,12 @@ strip(const char *to_name, const char *from_name, char (void)unlink(to_name); errx(EX_SOFTWARE, "strip command %s failed on %s", stripbin, to_name); + } + if (from_name != NULL && safecopy && fsync(to_fd) == -1) { + serrno = errno; + (void)unlink(to_name); + errno = serrno; + err(EX_OSERR, "fsync failed for %s", to_name); } if (dresp != NULL) *dresp = digest_file(to_name); ___ 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: r363125 - head/sys/compat/linux
Hi Alexander, On Sun, Jul 12, 2020 at 2:51 AM Alexander Leidinger wrote: > > Author: netchild > Date: Sun Jul 12 09:51:09 2020 > New Revision: 363125 > URL: https://svnweb.freebsd.org/changeset/base/363125 > > Log: > Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28). > > It is documented as a raw hardware-based clock not subject to NTP or > incremental adjustments. With this "not as precise as CLOCK_MONOTONIC" > description in mind, map it to our CLOCK_MONOTNIC_FAST (the same > mapping as for the linux CLOCK_MONOTONIC_COARSE). Can you point at the documentation suggesting CLOCK_MONOTONIC_RAW is any less precise than CLOCK_MONOTONIC? I'm looking at the Linux manual page and it does not seem to contain any language to that effect. > This is needed for the webcomponent of steam (chromium) and some > other steam component or game. > > The linux-steam-utils port contains a LD_PRELOAD based fix for this. > There this is mapped to CLOCK_MONOTONIC. > As an untrained ear/eye (= the majority of people) is normaly not > noticing a difference of jitter in the 10-20 ms range, specially > if you don't pay attention like for example in a browser session > while watching a video stream, the mapping to CLOCK_MONOTONIC_FAST > seems more appropriate than to CLOCK_MONOTONIC. I don't know how these programs use the clock, but 10-20 ms of jitter in the UI is noticeable to even casual users. (In FreeBSD these functions are purportedly accurate to 1 timer tick, which is 1ms on HZ=1000 (amd64) — much better than 10-20ms.) However, I'm concerned this is still insufficient precision compared with the documented behavior of the Linux functions. I think regular CLOCK_MONOTONIC is the closest thing we've got to Linux's CLOCK_MONOTONIC_RAW. The Linux analog of _FAST is _COARSE. Best, Conrad ___ 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: r363137 - head/sys/fs/nfsclient
Author: rmacklem Date: Mon Jul 13 01:28:45 2020 New Revision: 363137 URL: https://svnweb.freebsd.org/changeset/base/363137 Log: Minor code cleanup that removes "nd->nd_bpos = mcp;" in both if and else. The statement "nd->nd_bpos = mcp;" was in both the if and else. Correct, but potentially confusing. This patch fixes this. There should be no semantics change caused by this commit. Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c == --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun Jul 12 20:59:52 2020 (r363136) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Mon Jul 13 01:28:45 2020 (r363137) @@ -145,13 +145,12 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui for (left = 0; left < rem; left++) *mcp++ = '\0'; mp->m_len += rem; - nd->nd_bpos = mcp; if ((nd->nd_flag & ND_EXTPG) != 0) { nd->nd_bextpgsiz -= rem; mp->m_epg_last_len += rem; } - } else - nd->nd_bpos = mcp; + } + nd->nd_bpos = mcp; nd->nd_mb = mp; } ___ 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: r363138 - head/usr.bin/sed/tests
Author: yuripv Date: Mon Jul 13 01:32:37 2020 New Revision: 363138 URL: https://svnweb.freebsd.org/changeset/base/363138 Log: sed/multi_test: print comment for current test, not next one This is visible when e.g. 8.20 is failing: not ok 96 8.20 # \ in y command 8.20's comment should be '[ as an s delimiter and its escapes'. Modified: head/usr.bin/sed/tests/multi_test.sh Modified: head/usr.bin/sed/tests/multi_test.sh == --- head/usr.bin/sed/tests/multi_test.shMon Jul 13 01:28:45 2020 (r363137) +++ head/usr.bin/sed/tests/multi_test.shMon Jul 13 01:32:37 2020 (r363138) @@ -92,9 +92,9 @@ result() cp current.out $REGRESS/${TESTNAME} fi if diff -c $REGRESS/${TESTNAME} current.out ; then - echo "ok $MARK $TESTNAME # $TODO$COMMENT" + echo "ok $MARK $TESTNAME # $TODO$OCOMMENT" else - echo "not ok $MARK $TESTNAME # $TODO$COMMENT" + echo "not ok $MARK $TESTNAME # $TODO$OCOMMENT" fi 1>&4 2>&5 } @@ -102,6 +102,7 @@ result() mark() { [ $MARK -gt 0 ] && result + OCOMMENT=$COMMENT MARK=`expr $MARK + 1` TESTNAME=$1 exec 1>&4 2>&5 ___ 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: r363139 - head/stand/man
Author: allanjude Date: Mon Jul 13 02:09:21 2020 New Revision: 363139 URL: https://svnweb.freebsd.org/changeset/base/363139 Log: Loader: explain the syntax of currdev The origin text was: "Syntax for devices is odd." That is not very helpful. PR: 199103 Reviewed by: kevans, tsoome Sponsored by: Klara Inc. Event:July 2020 Bugathon Differential Revision:https://reviews.freebsd.org/D25629 Modified: head/stand/man/loader.8 Modified: head/stand/man/loader.8 == --- head/stand/man/loader.8 Mon Jul 13 01:32:37 2020(r363138) +++ head/stand/man/loader.8 Mon Jul 13 02:09:21 2020(r363139) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2018 +.Dd July 11, 2020 .Dt LOADER 8 .Os .Sh NAME @@ -479,8 +479,14 @@ In that case, the first listed console will become the userland output (e.g.\& from .Xr init 8 ) . .It Va currdev -Selects the default device. -Syntax for devices is odd. +Selects the default device to loader the kernel from. +The syntax is: +.Dl Ic loader_device: +or +.Dl Ic zfs:dataset: +Examples: +.Dl Ic disk0p2: +.Dl Ic zfs:zroot/ROOT/default: .It Va dumpdev Sets the device for kernel dumps. This can be used to ensure that a device is configured before the corresponding ___ 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: r363140 - head/usr.bin/mkimg
Author: gonzo Date: Mon Jul 13 02:24:31 2020 New Revision: 363140 URL: https://svnweb.freebsd.org/changeset/base/363140 Log: Fix invalid VHDX generation for image larger than 4Gb - Part of BAT payload location was lost due to invalid BAT entry encoding type (32 bits instead of 64 bits) - The sequence of PB/SB entries in BAT was broken due to off-by-one index check. It worked for smaller than 4Gb because there were no SB entries in BAT. MFC after:1 day Modified: head/usr.bin/mkimg/vhdx.c Modified: head/usr.bin/mkimg/vhdx.c == --- head/usr.bin/mkimg/vhdx.c Mon Jul 13 02:09:21 2020(r363139) +++ head/usr.bin/mkimg/vhdx.c Mon Jul 13 02:24:31 2020(r363140) @@ -429,7 +429,7 @@ vhdx_write_bat(int fd, uint64_t image_size) payload_offset = 3 + (bat_size / SIZE_1MB); bat_ptr = 0; for (idx = 0; idx < data_block_count; idx++) { - le32enc(bat + bat_ptr, + le64enc(bat + bat_ptr, BAT_ENTRY(payload_offset, PAYLOAD_BLOCK_FULLY_PRESENT)); bat_ptr += 8; payload_offset += (PAYLOAD_BLOCK_SIZE / SIZE_1MB); @@ -445,9 +445,9 @@ vhdx_write_bat(int fd, uint64_t image_size) bat_ptr = 0; } - if ((idx % chunk_ratio) == 0 && - (idx > 0) && (idx != data_block_count - 1)) { - le32enc(bat + bat_ptr, + if (((idx + 1) % chunk_ratio) == 0 && + (idx != data_block_count - 1)) { + le64enc(bat + bat_ptr, BAT_ENTRY(0, SB_BLOCK_NOT_PRESENT)); bat_ptr += 8; ___ 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"