svn commit: r324580 - head/sys/net80211
Author: adrian Date: Fri Oct 13 06:49:07 2017 New Revision: 324580 URL: https://svnweb.freebsd.org/changeset/base/324580 Log: [net80211] don't try to follow a NULL rxs pointer down the sink. It's smelly, and we already checked earlier whether we needed to. Modified: head/sys/net80211/ieee80211_input.h Modified: head/sys/net80211/ieee80211_input.h == --- head/sys/net80211/ieee80211_input.h Fri Oct 13 05:14:54 2017 (r324579) +++ head/sys/net80211/ieee80211_input.h Fri Oct 13 06:49:07 2017 (r324580) @@ -278,7 +278,7 @@ ok: */ if (ieee80211_check_rxseq_amsdu_more(rxs)) { ni->ni_rxseqs[tid] = rxseq; - if (ieee80211_check_rxseq_amsdu(rxs)) + if ((rxs != NULL) && ieee80211_check_rxseq_amsdu(rxs)) IEEE80211_NODE_STAT(ni, rx_amsdu_more_end); } else { /* .. still waiting */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r324570 - head/sys/net80211
god damnit. lemme go look at what's going on. thanks for the heads up! -a On 12 October 2017 at 18:53, Cy Schubert wrote: > In message <201710122156.v9cluwh4017...@repo.freebsd.org>, Adrian Chadd > writes: >> Author: adrian >> Date: Thu Oct 12 21:56:58 2017 >> New Revision: 324570 >> URL: https://svnweb.freebsd.org/changeset/base/324570 >> >> Log: >> [net80211] begin handling multiple hardware decap'ed A-MSDU in the RX path. >> >> The duplicate detection code currently expects A-MSDU frames to be encaped >> - >> they're decap'ed /after/ duplicate detection. >> >> However for ath10k (and iwm hardware later on) the firmware supports >> doing A-MSDU decap in hardware - which shows up as multiple frames with >> the same sequence number and IV. >> >> This is the first part of decap handling - if we see a stretch of A-MSDU >> frames from the driver with the MORE bit set, then don't treat them >> as duplicates. >> >> This isn't 100% complete as crypto sequence number handling and "A-MSDU in >> A-MPDU" needs handling, but it's a start. >> >> This should be a glorified no-op for everyone. Please tell me if it isn't. >> > > Hi Adrian, > > This is causing iwn in my laptop a bit of gas. > > wlan0: Ethernet address: 20:6a:8a:72:03:17 > <118>Created wlan(4) interfaces: wlan0. > <118>Created clone interfaces: lagg0. > <5>bge0: link state changed to DOWN > iwn0: iwn_read_firmware: ucode rev=0x12a80601 > <118>Starting wpa_supplicant. > <5>lagg0: link state changed to DOWN > iwn0: iwn_read_firmware: ucode rev=0x12a80601 > <118>Starting dhclient. > <118>lagg0: no link ... > > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x4 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0x8155cd59 > stack pointer = 0x28:0xfe01491e4790 > frame pointer = 0x28:0xfe01491e4830 > code segment= base 0x0, limit 0xf, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags= interrupt enabled, resume, IOPL = 0 > current process = 12 (irq265: iwn0) > trap number = 12 > panic: page fault > cpuid = 0 > time = 1507858438 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > 0xfe01491e4370 > vpanic() at vpanic+0x19c/frame 0xfe01491e43f0 > panic() at panic+0x43/frame 0xfe01491e4450 > trap_fatal() at trap_fatal+0x34d/frame 0xfe01491e44a0 > trap_pfault() at trap_pfault+0x49/frame 0xfe01491e4500 > trap() at trap+0x2a9/frame 0xfe01491e46c0 > calltrap() at calltrap+0x8/frame 0xfe01491e46c0 > --- trap 0xc, rip = 0x8155cd59, rsp = 0xfe01491e4790, rbp = > 0xfe01491e4830 --- > sta_input() at sta_input+0xb89/frame 0xfe01491e4830 > iwn_notif_intr() at iwn_notif_intr+0x15f7/frame 0xfe01491e4970 > iwn_intr() at iwn_intr+0x5a0/frame 0xfe01491e49e0 > intr_event_execute_handlers() at intr_event_execute_handlers+0xec/frame > 0xfe01491e4a20 > ithread_loop() at ithread_loop+0xd6/frame 0xfe01491e4a70 > fork_exit() at fork_exit+0x85/frame 0xfe01491e4ab0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfe01491e4ab0 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > Uptime: 29s > Dumping 704 out of 7978 MB:..3%..12%..21%..32%..41%..53%..62%..71%..82%..91% > > > Loaded symbols for /boot/kernel/nullfs.ko > #0 doadump (textdump=1) at pcpu.h:232 > 232 pcpu.h: No such file or directory. > in pcpu.h > (kgdb) bt > #0 doadump (textdump=1) at pcpu.h:232 > #1 0x80583eb6 in kern_reboot (howto=260) at > /opt/src/svn-current/sys/kern/kern_shutdown.c:386 > #2 0x805843a6 in vpanic (fmt=, ap= optimized out>) at /opt/src/svn-current/sys/kern/kern_shutdown.c:779 > #3 0x805841c3 in panic (fmt=) at > /opt/src/svn-current/sys/kern/kern_shutdown.c:710 > #4 0x80886a8d in trap_fatal (frame=0xfe01491e46d0, eva=4) at > /opt/src/svn-current/sys/amd64/amd64/trap.c:799 > #5 0x80886ae9 in trap_pfault (frame=0xfe01491e46d0, > usermode=0) at pcpu.h:232 > #6 0x80886339 in trap (frame=0xfe01491e46d0) at > /opt/src/svn-current/sys/amd64/amd64/trap.c:420 > #7 0x8086acf1 in calltrap () at /opt/src/svn-current/sys/amd64/amd6 > 4/exception.S:237 > #8 0x8155cd59 in sta_input (ni=0xfe0012651000, > m=0xf80004040e00, rxs=0x0, rssi=63, nf=-95) at ieee80211_input.h:280 > #9 0x81513987 in iwn_notif_intr () from /boot/kernel/if_iwn.ko > #10 0x8150a270 in iwn_intr () from /boot/kernel/if_iwn.ko > #11 0x80548dcc in intr_event_execute_handlers (p= out>, ie=0xf80002b06800) at /opt/src/svn-current/sys/kern/kern_intr.c:13 > 36 > #12 0x80549496 in ithread_loop (arg=0xf80002b50c20) at > /opt/src/svn-current/sys/kern/kern_intr.c:1349 > #13 0x80546135 in fork_exit (callout=0x805493c0 > , arg=0xf80002b50c20, frame=
svn commit: r324579 - stable/11/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Oct 13 05:14:54 2017 New Revision: 324579 URL: https://svnweb.freebsd.org/changeset/base/324579 Log: MFC 324517 hyperv/hn: Enable transparent VF by default. Sponsored by: Microsoft Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c == --- stable/11/sys/dev/hyperv/netvsc/if_hn.c Fri Oct 13 05:09:56 2017 (r324578) +++ stable/11/sys/dev/hyperv/netvsc/if_hn.c Fri Oct 13 05:14:54 2017 (r324579) @@ -584,7 +584,7 @@ SYSCTL_PROC(_hw_hn, OID_AUTO, vfmap, CTLFLAG_RD | CTLT 0, 0, hn_vfmap_sysctl, "A", "VF mapping"); /* Transparent VF */ -static int hn_xpnt_vf = 0; +static int hn_xpnt_vf = 1; SYSCTL_INT(_hw_hn, OID_AUTO, vf_transparent, CTLFLAG_RDTUN, &hn_xpnt_vf, 0, "Transparent VF mod"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324578 - stable/11/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Oct 13 05:09:56 2017 New Revision: 324578 URL: https://svnweb.freebsd.org/changeset/base/324578 Log: MFC 324489,324516 324489 hyperv/hn: Workaround erroneous hash type observed on WS2016. Background: - UDP 4-tuple hash type is unconditionally enabled in Hyper-V on WS2016, which is _not_ affected by NDIS_OBJTYPE_RSS_PARAMS. - Non-fragment UDP/IPv4 datagrams' hash type is delivered to VM as TCP_IPV4. Currently this erroneous behavior only applies to WS2016/Windows10. Force l3/l4 protocol check, if the RXed packet's hash type is TCP_IPV4, and the Hyper-V is running on WS2016/Windows10. If the RXed packet is UDP datagram, adjust mbuf hash type to UDP_IPV4. Sponsored by: Microsoft 324516 hyperv/hn: Workaround erroneous hash type observed on WS2016 for VF. The background was described in r324489. Sponsored by: Microsoft Modified: stable/11/sys/dev/hyperv/netvsc/hn_nvs.c stable/11/sys/dev/hyperv/netvsc/hn_rndis.c stable/11/sys/dev/hyperv/netvsc/if_hn.c stable/11/sys/dev/hyperv/netvsc/if_hnvar.h stable/11/sys/dev/hyperv/netvsc/ndis.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/netvsc/hn_nvs.c == --- stable/11/sys/dev/hyperv/netvsc/hn_nvs.cFri Oct 13 05:02:39 2017 (r324577) +++ stable/11/sys/dev/hyperv/netvsc/hn_nvs.cFri Oct 13 05:09:56 2017 (r324578) @@ -601,6 +601,11 @@ hn_nvs_attach(struct hn_softc *sc, int mtu) { int error; + if (hyperv_ver_major >= 10) { + /* UDP 4-tuple hash is enforced. */ + sc->hn_caps |= HN_CAP_UDPHASH; + } + /* * Initialize NVS. */ Modified: stable/11/sys/dev/hyperv/netvsc/hn_rndis.c == --- stable/11/sys/dev/hyperv/netvsc/hn_rndis.c Fri Oct 13 05:02:39 2017 (r324577) +++ stable/11/sys/dev/hyperv/netvsc/hn_rndis.c Fri Oct 13 05:09:56 2017 (r324578) @@ -521,6 +521,10 @@ hn_rndis_query_rsscaps(struct hn_softc *sc, int *rxr_c /* Commit! */ sc->hn_rss_ind_size = indsz; sc->hn_rss_hcap = hash_func | hash_types; + if (sc->hn_caps & HN_CAP_UDPHASH) { + /* UDP 4-tuple hash is unconditionally enabled. */ + sc->hn_rss_hcap |= NDIS_HASH_UDP_IPV4_X; + } *rxr_cnt0 = rxr_cnt; return (0); } @@ -760,8 +764,10 @@ hn_rndis_conf_rss(struct hn_softc *sc, uint16_t flags) ("NDIS 6.20+ is required, NDIS version 0x%08x", sc->hn_ndis_ver)); /* XXX only one can be specified through, popcnt? */ - KASSERT((sc->hn_rss_hash & NDIS_HASH_FUNCTION_MASK), ("no hash func")); - KASSERT((sc->hn_rss_hash & NDIS_HASH_TYPE_MASK), ("no hash types")); + KASSERT((sc->hn_rss_hash & NDIS_HASH_FUNCTION_MASK), + ("no hash func %08x", sc->hn_rss_hash)); + KASSERT((sc->hn_rss_hash & NDIS_HASH_STD), + ("no standard hash types %08x", sc->hn_rss_hash)); KASSERT(sc->hn_rss_ind_size > 0, ("no indirect table size")); if (bootverbose) { @@ -780,7 +786,8 @@ hn_rndis_conf_rss(struct hn_softc *sc, uint16_t flags) prm->ndis_hdr.ndis_rev = NDIS_RSS_PARAMS_REV_2; prm->ndis_hdr.ndis_size = rss_size; prm->ndis_flags = flags; - prm->ndis_hash = sc->hn_rss_hash; + prm->ndis_hash = sc->hn_rss_hash & + (NDIS_HASH_FUNCTION_MASK | NDIS_HASH_STD); prm->ndis_indsize = sizeof(rss->rss_ind[0]) * sc->hn_rss_ind_size; prm->ndis_indoffset = __offsetof(struct ndis_rssprm_toeplitz, rss_ind[0]); Modified: stable/11/sys/dev/hyperv/netvsc/if_hn.c == --- stable/11/sys/dev/hyperv/netvsc/if_hn.c Fri Oct 13 05:02:39 2017 (r324577) +++ stable/11/sys/dev/hyperv/netvsc/if_hn.c Fri Oct 13 05:09:56 2017 (r324578) @@ -385,6 +385,7 @@ static void hn_link_status(struct hn_softc *); static int hn_create_rx_data(struct hn_softc *, int); static voidhn_destroy_rx_data(struct hn_softc *); static int hn_check_iplen(const struct mbuf *, int); +static voidhn_rxpkt_proto(const struct mbuf *, int *, int *); static int hn_set_rxfilter(struct hn_softc *, uint32_t); static int hn_rxfilter_config(struct hn_softc *); static int hn_rss_reconfig(struct hn_softc *); @@ -399,6 +400,7 @@ static int hn_tx_ring_create(struct hn_softc *, int) static voidhn_tx_ring_destroy(struct hn_tx_ring *); static int hn_create_tx_data(struct hn_softc *, int); static voidhn_fix
svn commit: r324577 - in stable/11/sys/dev/hyperv: include vmbus
Author: sephe Date: Fri Oct 13 05:02:39 2017 New Revision: 324577 URL: https://svnweb.freebsd.org/changeset/base/324577 Log: MFC 324488 hyperv/vmbus: Expose Hyper-V major version. Sponsored by: Microsoft Modified: stable/11/sys/dev/hyperv/include/hyperv.h stable/11/sys/dev/hyperv/vmbus/hyperv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/include/hyperv.h == --- stable/11/sys/dev/hyperv/include/hyperv.h Fri Oct 13 04:55:54 2017 (r324576) +++ stable/11/sys/dev/hyperv/include/hyperv.h Fri Oct 13 05:02:39 2017 (r324577) @@ -90,6 +90,7 @@ int hyperv_guid2str(const struct hyperv_guid *, char */ extern hyperv_tc64_t hyperv_tc64; extern u_int hyperv_features;/* CPUID_HV_MSR_ */ +extern u_int hyperv_ver_major; #endif /* _KERNEL */ Modified: stable/11/sys/dev/hyperv/vmbus/hyperv.c == --- stable/11/sys/dev/hyperv/vmbus/hyperv.c Fri Oct 13 04:55:54 2017 (r324576) +++ stable/11/sys/dev/hyperv/vmbus/hyperv.c Fri Oct 13 05:02:39 2017 (r324577) @@ -77,6 +77,8 @@ static u_int hyperv_get_timecount(struct timecounter static boolhyperv_identify(void); static voidhypercall_memfree(void); +u_int hyperv_ver_major; + u_int hyperv_features; u_int hyperv_recommends; @@ -169,8 +171,9 @@ hyperv_identify(void) hyperv_features3 = regs[3]; do_cpuid(CPUID_LEAF_HV_IDENTITY, regs); + hyperv_ver_major = regs[1] >> 16; printf("Hyper-V Version: %d.%d.%d [SP%d]\n", - regs[1] >> 16, regs[1] & 0x, regs[0], regs[2]); + hyperv_ver_major, regs[1] & 0x, regs[0], regs[2]); printf(" Features=0x%b\n", hyperv_features, "\020" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324576 - stable/11/sys/dev/hyperv/vmbus
Author: sephe Date: Fri Oct 13 04:55:54 2017 New Revision: 324576 URL: https://svnweb.freebsd.org/changeset/base/324576 Log: MFC 324487 hyperv/vmbus: Add tunable to pin/unpin event tasks. Event tasks are pinned to their respective CPU by default, in the same fashion as they were. Unpin the event tasks by setting hw.vmbus.pin_evttask to 0, if certain CPUs serve special purpose. Sponsored by: Microsoft Modified: stable/11/sys/dev/hyperv/vmbus/vmbus.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hyperv/vmbus/vmbus.c == --- stable/11/sys/dev/hyperv/vmbus/vmbus.c Fri Oct 13 02:29:43 2017 (r324575) +++ stable/11/sys/dev/hyperv/vmbus/vmbus.c Fri Oct 13 04:55:54 2017 (r324576) @@ -128,6 +128,13 @@ static void vmbus_event_proc_dummy(struct vmbus_soft static struct vmbus_softc *vmbus_sc; +SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, +"Hyper-V vmbus"); + +static int vmbus_pin_evttask = 1; +SYSCTL_INT(_hw_vmbus, OID_AUTO, pin_evttask, CTLFLAG_RDTUN, +&vmbus_pin_evttask, 0, "Pin event tasks to their respective CPU"); + extern inthand_t IDTVEC(vmbus_isr); static const uint32_t vmbus_version[] = { @@ -905,10 +912,16 @@ vmbus_intr_setup(struct vmbus_softc *sc) VMBUS_PCPU_GET(sc, event_tq, cpu) = taskqueue_create_fast( "hyperv event", M_WAITOK, taskqueue_thread_enqueue, VMBUS_PCPU_PTR(sc, event_tq, cpu)); - CPU_SETOF(cpu, &cpu_mask); - taskqueue_start_threads_cpuset( - VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET, &cpu_mask, - "hvevent%d", cpu); + if (vmbus_pin_evttask) { + CPU_SETOF(cpu, &cpu_mask); + taskqueue_start_threads_cpuset( + VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET, + &cpu_mask, "hvevent%d", cpu); + } else { + taskqueue_start_threads( + VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET, + "hvevent%d", cpu); + } /* * Setup tasks and taskqueues to handle messages. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324575 - stable/10/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Oct 13 02:29:43 2017 New Revision: 324575 URL: https://svnweb.freebsd.org/changeset/base/324575 Log: MFC 324517 hyperv/hn: Enable transparent VF by default. Sponsored by: Microsoft Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c == --- stable/10/sys/dev/hyperv/netvsc/if_hn.c Fri Oct 13 02:26:39 2017 (r324574) +++ stable/10/sys/dev/hyperv/netvsc/if_hn.c Fri Oct 13 02:29:43 2017 (r324575) @@ -582,7 +582,7 @@ SYSCTL_PROC(_hw_hn, OID_AUTO, vfmap, CTLFLAG_RD | CTLT 0, 0, hn_vfmap_sysctl, "A", "VF mapping"); /* Transparent VF */ -static int hn_xpnt_vf = 0; +static int hn_xpnt_vf = 1; SYSCTL_INT(_hw_hn, OID_AUTO, vf_transparent, CTLFLAG_RDTUN, &hn_xpnt_vf, 0, "Transparent VF mod"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324574 - stable/10/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Oct 13 02:26:39 2017 New Revision: 324574 URL: https://svnweb.freebsd.org/changeset/base/324574 Log: MFC 324489,324516 324489 hyperv/hn: Workaround erroneous hash type observed on WS2016. Background: - UDP 4-tuple hash type is unconditionally enabled in Hyper-V on WS2016, which is _not_ affected by NDIS_OBJTYPE_RSS_PARAMS. - Non-fragment UDP/IPv4 datagrams' hash type is delivered to VM as TCP_IPV4. Currently this erroneous behavior only applies to WS2016/Windows10. Force l3/l4 protocol check, if the RXed packet's hash type is TCP_IPV4, and the Hyper-V is running on WS2016/Windows10. If the RXed packet is UDP datagram, adjust mbuf hash type to UDP_IPV4. Sponsored by: Microsoft 324516 hyperv/hn: Workaround erroneous hash type observed on WS2016 for VF. The background was described in r324489. Sponsored by: Microsoft Modified: stable/10/sys/dev/hyperv/netvsc/hn_nvs.c stable/10/sys/dev/hyperv/netvsc/hn_rndis.c stable/10/sys/dev/hyperv/netvsc/if_hn.c stable/10/sys/dev/hyperv/netvsc/if_hnvar.h stable/10/sys/dev/hyperv/netvsc/ndis.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/hn_nvs.c == --- stable/10/sys/dev/hyperv/netvsc/hn_nvs.cFri Oct 13 02:16:35 2017 (r324573) +++ stable/10/sys/dev/hyperv/netvsc/hn_nvs.cFri Oct 13 02:26:39 2017 (r324574) @@ -601,6 +601,11 @@ hn_nvs_attach(struct hn_softc *sc, int mtu) { int error; + if (hyperv_ver_major >= 10) { + /* UDP 4-tuple hash is enforced. */ + sc->hn_caps |= HN_CAP_UDPHASH; + } + /* * Initialize NVS. */ Modified: stable/10/sys/dev/hyperv/netvsc/hn_rndis.c == --- stable/10/sys/dev/hyperv/netvsc/hn_rndis.c Fri Oct 13 02:16:35 2017 (r324573) +++ stable/10/sys/dev/hyperv/netvsc/hn_rndis.c Fri Oct 13 02:26:39 2017 (r324574) @@ -522,6 +522,10 @@ hn_rndis_query_rsscaps(struct hn_softc *sc, int *rxr_c /* Commit! */ sc->hn_rss_ind_size = indsz; sc->hn_rss_hcap = hash_func | hash_types; + if (sc->hn_caps & HN_CAP_UDPHASH) { + /* UDP 4-tuple hash is unconditionally enabled. */ + sc->hn_rss_hcap |= NDIS_HASH_UDP_IPV4_X; + } *rxr_cnt0 = rxr_cnt; return (0); } @@ -761,8 +765,10 @@ hn_rndis_conf_rss(struct hn_softc *sc, uint16_t flags) ("NDIS 6.20+ is required, NDIS version 0x%08x", sc->hn_ndis_ver)); /* XXX only one can be specified through, popcnt? */ - KASSERT((sc->hn_rss_hash & NDIS_HASH_FUNCTION_MASK), ("no hash func")); - KASSERT((sc->hn_rss_hash & NDIS_HASH_TYPE_MASK), ("no hash types")); + KASSERT((sc->hn_rss_hash & NDIS_HASH_FUNCTION_MASK), + ("no hash func %08x", sc->hn_rss_hash)); + KASSERT((sc->hn_rss_hash & NDIS_HASH_STD), + ("no standard hash types %08x", sc->hn_rss_hash)); KASSERT(sc->hn_rss_ind_size > 0, ("no indirect table size")); if (bootverbose) { @@ -781,7 +787,8 @@ hn_rndis_conf_rss(struct hn_softc *sc, uint16_t flags) prm->ndis_hdr.ndis_rev = NDIS_RSS_PARAMS_REV_2; prm->ndis_hdr.ndis_size = rss_size; prm->ndis_flags = flags; - prm->ndis_hash = sc->hn_rss_hash; + prm->ndis_hash = sc->hn_rss_hash & + (NDIS_HASH_FUNCTION_MASK | NDIS_HASH_STD); prm->ndis_indsize = sizeof(rss->rss_ind[0]) * sc->hn_rss_ind_size; prm->ndis_indoffset = __offsetof(struct ndis_rssprm_toeplitz, rss_ind[0]); Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c == --- stable/10/sys/dev/hyperv/netvsc/if_hn.c Fri Oct 13 02:16:35 2017 (r324573) +++ stable/10/sys/dev/hyperv/netvsc/if_hn.c Fri Oct 13 02:26:39 2017 (r324574) @@ -119,6 +119,11 @@ __FBSDID("$FreeBSD$"); #define HN_IFSTART_SUPPORT +/* NOTE: M_HASHTYPE_RSS_UDP_IPV4 is not available on stable/10. */ +#ifndef M_HASHTYPE_RSS_UDP_IPV4 +#define M_HASHTYPE_RSS_UDP_IPV4M_HASHTYPE_OPAQUE +#endif + #define HN_RING_CNT_DEF_MAX8 #define HN_VFMAP_SIZE_DEF 8 @@ -378,6 +383,7 @@ static void hn_link_status(struct hn_softc *); static int hn_create_rx_data(struct hn_softc *, int); static voidhn_destroy_rx_data(struct hn_softc *); static int hn_check_iplen(const struct mbuf *, int); +static voidhn_rxpkt_proto(const struct mbuf *, int *, int *); static int hn_set_rxfilter(struct hn_softc *, uint32_t); static int hn_rxfilter_config(struct hn_softc *); stati
svn commit: r324573 - in stable/10/sys/dev/hyperv: include vmbus
Author: sephe Date: Fri Oct 13 02:16:35 2017 New Revision: 324573 URL: https://svnweb.freebsd.org/changeset/base/324573 Log: MFC 324488 hyperv/vmbus: Expose Hyper-V major version. Sponsored by: Microsoft Modified: stable/10/sys/dev/hyperv/include/hyperv.h stable/10/sys/dev/hyperv/vmbus/hyperv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/include/hyperv.h == --- stable/10/sys/dev/hyperv/include/hyperv.h Fri Oct 13 02:01:03 2017 (r324572) +++ stable/10/sys/dev/hyperv/include/hyperv.h Fri Oct 13 02:16:35 2017 (r324573) @@ -90,6 +90,7 @@ int hyperv_guid2str(const struct hyperv_guid *, char */ extern hyperv_tc64_t hyperv_tc64; extern u_int hyperv_features;/* CPUID_HV_MSR_ */ +extern u_int hyperv_ver_major; #endif /* _KERNEL */ Modified: stable/10/sys/dev/hyperv/vmbus/hyperv.c == --- stable/10/sys/dev/hyperv/vmbus/hyperv.c Fri Oct 13 02:01:03 2017 (r324572) +++ stable/10/sys/dev/hyperv/vmbus/hyperv.c Fri Oct 13 02:16:35 2017 (r324573) @@ -77,6 +77,8 @@ static u_int hyperv_get_timecount(struct timecounter static boolhyperv_identify(void); static voidhypercall_memfree(void); +u_int hyperv_ver_major; + u_int hyperv_features; u_int hyperv_recommends; @@ -169,8 +171,9 @@ hyperv_identify(void) hyperv_features3 = regs[3]; do_cpuid(CPUID_LEAF_HV_IDENTITY, regs); + hyperv_ver_major = regs[1] >> 16; printf("Hyper-V Version: %d.%d.%d [SP%d]\n", - regs[1] >> 16, regs[1] & 0x, regs[0], regs[2]); + hyperv_ver_major, regs[1] & 0x, regs[0], regs[2]); printf(" Features=0x%b\n", hyperv_features, "\020" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324572 - stable/10/sys/dev/hyperv/vmbus
Author: sephe Date: Fri Oct 13 02:01:03 2017 New Revision: 324572 URL: https://svnweb.freebsd.org/changeset/base/324572 Log: MFC 324487 hyperv/vmbus: Add tunable to pin/unpin event tasks. Event tasks are pinned to their respective CPU by default, in the same fashion as they were. Unpin the event tasks by setting hw.vmbus.pin_evttask to 0, if certain CPUs serve special purpose. Sponsored by: Microsoft Modified: stable/10/sys/dev/hyperv/vmbus/vmbus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/vmbus/vmbus.c == --- stable/10/sys/dev/hyperv/vmbus/vmbus.c Thu Oct 12 21:58:51 2017 (r324571) +++ stable/10/sys/dev/hyperv/vmbus/vmbus.c Fri Oct 13 02:01:03 2017 (r324572) @@ -129,6 +129,13 @@ static struct vmbus_softc *vmbus_sc; extern inthand_t IDTVEC(rsvd), IDTVEC(vmbus_isr); +SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, +"Hyper-V vmbus"); + +static int vmbus_pin_evttask = 1; +SYSCTL_INT(_hw_vmbus, OID_AUTO, pin_evttask, CTLFLAG_RDTUN, +&vmbus_pin_evttask, 0, "Pin event tasks to their respective CPU"); + static const uint32_t vmbus_version[] = { VMBUS_VERSION_WIN8_1, VMBUS_VERSION_WIN8, @@ -978,13 +985,15 @@ vmbus_intr_setup(struct vmbus_softc *sc) taskqueue_start_threads(VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET, "hvevent%d", cpu); - CPU_SETOF(cpu, &cpu_mask); - TASK_INIT(&cpuset_task, 0, vmbus_cpuset_setthread_task, - &cpu_mask); - taskqueue_enqueue(VMBUS_PCPU_GET(sc, event_tq, cpu), - &cpuset_task); - taskqueue_drain(VMBUS_PCPU_GET(sc, event_tq, cpu), - &cpuset_task); + if (vmbus_pin_evttask) { + CPU_SETOF(cpu, &cpu_mask); + TASK_INIT(&cpuset_task, 0, vmbus_cpuset_setthread_task, + &cpu_mask); + taskqueue_enqueue(VMBUS_PCPU_GET(sc, event_tq, cpu), + &cpuset_task); + taskqueue_drain(VMBUS_PCPU_GET(sc, event_tq, cpu), + &cpuset_task); + } /* * Setup tasks and taskqueues to handle messages. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r324570 - head/sys/net80211
In message <201710122156.v9cluwh4017...@repo.freebsd.org>, Adrian Chadd writes: > Author: adrian > Date: Thu Oct 12 21:56:58 2017 > New Revision: 324570 > URL: https://svnweb.freebsd.org/changeset/base/324570 > > Log: > [net80211] begin handling multiple hardware decap'ed A-MSDU in the RX path. > > The duplicate detection code currently expects A-MSDU frames to be encaped > - > they're decap'ed /after/ duplicate detection. > > However for ath10k (and iwm hardware later on) the firmware supports > doing A-MSDU decap in hardware - which shows up as multiple frames with > the same sequence number and IV. > > This is the first part of decap handling - if we see a stretch of A-MSDU > frames from the driver with the MORE bit set, then don't treat them > as duplicates. > > This isn't 100% complete as crypto sequence number handling and "A-MSDU in > A-MPDU" needs handling, but it's a start. > > This should be a glorified no-op for everyone. Please tell me if it isn't. > Hi Adrian, This is causing iwn in my laptop a bit of gas. wlan0: Ethernet address: 20:6a:8a:72:03:17 <118>Created wlan(4) interfaces: wlan0. <118>Created clone interfaces: lagg0. <5>bge0: link state changed to DOWN iwn0: iwn_read_firmware: ucode rev=0x12a80601 <118>Starting wpa_supplicant. <5>lagg0: link state changed to DOWN iwn0: iwn_read_firmware: ucode rev=0x12a80601 <118>Starting dhclient. <118>lagg0: no link ... Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x4 fault code = supervisor read data, page not present instruction pointer = 0x20:0x8155cd59 stack pointer = 0x28:0xfe01491e4790 frame pointer = 0x28:0xfe01491e4830 code segment= base 0x0, limit 0xf, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags= interrupt enabled, resume, IOPL = 0 current process = 12 (irq265: iwn0) trap number = 12 panic: page fault cpuid = 0 time = 1507858438 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe01491e4370 vpanic() at vpanic+0x19c/frame 0xfe01491e43f0 panic() at panic+0x43/frame 0xfe01491e4450 trap_fatal() at trap_fatal+0x34d/frame 0xfe01491e44a0 trap_pfault() at trap_pfault+0x49/frame 0xfe01491e4500 trap() at trap+0x2a9/frame 0xfe01491e46c0 calltrap() at calltrap+0x8/frame 0xfe01491e46c0 --- trap 0xc, rip = 0x8155cd59, rsp = 0xfe01491e4790, rbp = 0xfe01491e4830 --- sta_input() at sta_input+0xb89/frame 0xfe01491e4830 iwn_notif_intr() at iwn_notif_intr+0x15f7/frame 0xfe01491e4970 iwn_intr() at iwn_intr+0x5a0/frame 0xfe01491e49e0 intr_event_execute_handlers() at intr_event_execute_handlers+0xec/frame 0xfe01491e4a20 ithread_loop() at ithread_loop+0xd6/frame 0xfe01491e4a70 fork_exit() at fork_exit+0x85/frame 0xfe01491e4ab0 fork_trampoline() at fork_trampoline+0xe/frame 0xfe01491e4ab0 --- trap 0, rip = 0, rsp = 0, rbp = 0 --- Uptime: 29s Dumping 704 out of 7978 MB:..3%..12%..21%..32%..41%..53%..62%..71%..82%..91% Loaded symbols for /boot/kernel/nullfs.ko #0 doadump (textdump=1) at pcpu.h:232 232 pcpu.h: No such file or directory. in pcpu.h (kgdb) bt #0 doadump (textdump=1) at pcpu.h:232 #1 0x80583eb6 in kern_reboot (howto=260) at /opt/src/svn-current/sys/kern/kern_shutdown.c:386 #2 0x805843a6 in vpanic (fmt=, ap=) at /opt/src/svn-current/sys/kern/kern_shutdown.c:779 #3 0x805841c3 in panic (fmt=) at /opt/src/svn-current/sys/kern/kern_shutdown.c:710 #4 0x80886a8d in trap_fatal (frame=0xfe01491e46d0, eva=4) at /opt/src/svn-current/sys/amd64/amd64/trap.c:799 #5 0x80886ae9 in trap_pfault (frame=0xfe01491e46d0, usermode=0) at pcpu.h:232 #6 0x80886339 in trap (frame=0xfe01491e46d0) at /opt/src/svn-current/sys/amd64/amd64/trap.c:420 #7 0x8086acf1 in calltrap () at /opt/src/svn-current/sys/amd64/amd6 4/exception.S:237 #8 0x8155cd59 in sta_input (ni=0xfe0012651000, m=0xf80004040e00, rxs=0x0, rssi=63, nf=-95) at ieee80211_input.h:280 #9 0x81513987 in iwn_notif_intr () from /boot/kernel/if_iwn.ko #10 0x8150a270 in iwn_intr () from /boot/kernel/if_iwn.ko #11 0x80548dcc in intr_event_execute_handlers (p=, ie=0xf80002b06800) at /opt/src/svn-current/sys/kern/kern_intr.c:13 36 #12 0x80549496 in ithread_loop (arg=0xf80002b50c20) at /opt/src/svn-current/sys/kern/kern_intr.c:1349 #13 0x80546135 in fork_exit (callout=0x805493c0 , arg=0xf80002b50c20, frame=0xfe01491e4ac0) at /opt/src/svn-current/sys/kern/kern_fork.c:1044 #14 0x8086b2de in fork_trampoline () at /opt/src/svn-current/sys/amd 64/amd64/exception.S:651 #15 0x in ?? () Current language: auto; currently minimal -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.F
svn commit: r324571 - head/sys/dev/ath
Author: adrian Date: Thu Oct 12 21:58:51 2017 New Revision: 324571 URL: https://svnweb.freebsd.org/changeset/base/324571 Log: [ath] Begin using the replacement EDCA functions. As part of ath10k and other chipset support, the EDCA stuff has to be moved to potentially be per-VAP. For hardware that doesn't support it (ie, everything that we currently support) it can just fetch the "current" global EDCA parameters for the NIC. This is one of those parameters that is linked to the currently active channel context / VAP in Linux mac80211 parlance. Tested: * ath(4), STA and AP modes Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Thu Oct 12 21:56:58 2017(r324570) +++ head/sys/dev/ath/if_ath.c Thu Oct 12 21:58:51 2017(r324571) @@ -4049,9 +4049,13 @@ ath_txq_update(struct ath_softc *sc, int ac) #defineATH_EXPONENT_TO_VALUE(v)((1sc_ac2q[ac]; - struct wmeParams *wmep = &ic->ic_wme.wme_chanParams.cap_wmeParams[ac]; + struct chanAccParams chp; + struct wmeParams *wmep; struct ath_hal *ah = sc->sc_ah; HAL_TXQ_INFO qi; + + ieee80211_wme_ic_getparams(ic, &chp); + wmep = &chp.cap_wmeParams[ac]; ath_hal_gettxqueueprops(ah, txq->axq_qnum, &qi); #ifdef IEEE80211_SUPPORT_TDMA ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324570 - head/sys/net80211
Author: adrian Date: Thu Oct 12 21:56:58 2017 New Revision: 324570 URL: https://svnweb.freebsd.org/changeset/base/324570 Log: [net80211] begin handling multiple hardware decap'ed A-MSDU in the RX path. The duplicate detection code currently expects A-MSDU frames to be encaped - they're decap'ed /after/ duplicate detection. However for ath10k (and iwm hardware later on) the firmware supports doing A-MSDU decap in hardware - which shows up as multiple frames with the same sequence number and IV. This is the first part of decap handling - if we see a stretch of A-MSDU frames from the driver with the MORE bit set, then don't treat them as duplicates. This isn't 100% complete as crypto sequence number handling and "A-MSDU in A-MPDU" needs handling, but it's a start. This should be a glorified no-op for everyone. Please tell me if it isn't. Modified: head/sys/net80211/ieee80211_input.h head/sys/net80211/ieee80211_ioctl.h Modified: head/sys/net80211/ieee80211_input.h == --- head/sys/net80211/ieee80211_input.h Thu Oct 12 21:26:52 2017 (r324569) +++ head/sys/net80211/ieee80211_input.h Thu Oct 12 21:56:58 2017 (r324570) @@ -131,7 +131,39 @@ ishtinfooui(const uint8_t *frm) return frm[1] > 3 && le32dec(frm+2) == ((BCM_OUI_HTINFO<<24)|BCM_OUI); } +static __inline int +ieee80211_check_rxseq_amsdu(const struct ieee80211_rx_stats *rxs) +{ + + return (!! (rxs->c_pktflags & IEEE80211_RX_F_AMSDU)); +} + /* + * Return 1 if the rxseq check should increment the sequence + * number. Return 0 if it's part of an AMSDU batch and it isn't + * the final frame in the decap'ed burst. + */ +static __inline int +ieee80211_check_rxseq_amsdu_more(const struct ieee80211_rx_stats *rxs) +{ + /* No state? ok */ + if (rxs == NULL) + return (1); + + /* State but no AMSDU set? ok */ + if ((rxs->c_pktflags & IEEE80211_RX_F_AMSDU) == 0) + return (1); + + /* State, AMSDU set, then _MORE means "don't inc yet" */ + if (rxs->c_pktflags & IEEE80211_RX_F_AMSDU_MORE) { + return (0); + } + + /* Both are set, so return ok */ + return (1); +} + +/* * Check the current frame sequence number against the current TID * state and return whether it's in sequence or should be dropped. * @@ -238,7 +270,20 @@ ieee80211_check_rxseq(struct ieee80211_node *ni, struc goto fail; ok: - ni->ni_rxseqs[tid] = rxseq; + /* +* Only bump the sequence number if it's the last frame +* in a batch. That way frames in the rest of the batch +* get included, and the last frame in the batch kicks +* it next. +*/ + if (ieee80211_check_rxseq_amsdu_more(rxs)) { + ni->ni_rxseqs[tid] = rxseq; + if (ieee80211_check_rxseq_amsdu(rxs)) + IEEE80211_NODE_STAT(ni, rx_amsdu_more_end); + } else { + /* .. still waiting */ + IEEE80211_NODE_STAT(ni, rx_amsdu_more); + } return 1; Modified: head/sys/net80211/ieee80211_ioctl.h == --- head/sys/net80211/ieee80211_ioctl.h Thu Oct 12 21:26:52 2017 (r324569) +++ head/sys/net80211/ieee80211_ioctl.h Thu Oct 12 21:56:58 2017 (r324570) @@ -84,7 +84,11 @@ struct ieee80211_nodestats { uint32_tns_tx_deauth_code; /* last deauth reason */ uint32_tns_tx_disassoc; /* disassociations */ uint32_tns_tx_disassoc_code;/* last disassociation reason */ - uint32_tns_spare[8]; + + /* Hardware A-MSDU decode */ + uint32_tns_rx_amsdu_more; /* RX decap A-MSDU, more coming from A-MSDU */ + uint32_tns_rx_amsdu_more_end; /* RX decap A-MSDU (or any other frame), no more coming */ + uint32_tns_spare[6]; }; /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324569 - head/sys/dev/dpaa
Author: glebius Date: Thu Oct 12 21:26:52 2017 New Revision: 324569 URL: https://svnweb.freebsd.org/changeset/base/324569 Log: Fix build after r324446. Modified: head/sys/dev/dpaa/if_dtsec_rm.c Modified: head/sys/dev/dpaa/if_dtsec_rm.c == --- head/sys/dev/dpaa/if_dtsec_rm.c Thu Oct 12 21:25:11 2017 (r324568) +++ head/sys/dev/dpaa/if_dtsec_rm.c Thu Oct 12 21:26:52 2017 (r324569) @@ -347,7 +347,7 @@ dtsec_rm_fqr_mext_free(struct mbuf *m) if (bman_count(sc->sc_rx_pool) <= DTSEC_RM_POOL_RX_MAX_SIZE) bman_put_buffer(sc->sc_rx_pool, buffer); else - dtsec_rm_pool_rx_put_buffer(arg, buffer, NULL); + dtsec_rm_pool_rx_put_buffer(sc, buffer, NULL); } static e_RxStoreResponse ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324568 - head/cddl/contrib/opensolaris/lib/libzfs/common
Author: asomers Date: Thu Oct 12 21:25:11 2017 New Revision: 324568 URL: https://svnweb.freebsd.org/changeset/base/324568 Log: Optimize zpool_read_all_labels with AIO Read all labels in parallel instead of sequentially MFC after:3 weeks X-MFC-With: 322854 Sponsored by: Spectra Logic Corp Differential Revision:https://reviews.freebsd.org/D12495 Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Thu Oct 12 20:31:10 2017(r324567) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Thu Oct 12 21:25:11 2017(r324568) @@ -42,6 +42,7 @@ * using our derived config, and record the results. */ +#include #include #include #include @@ -919,13 +920,17 @@ zpool_read_label(int fd, nvlist_t **config) * Given a file descriptor, read the label information and return an nvlist * describing the configuration, if there is one. * returns the number of valid labels found + * If a label is found, returns it via config. The caller is responsible for + * freeing it. */ int zpool_read_all_labels(int fd, nvlist_t **config) { struct stat64 statbuf; + struct aiocb aiocbs[VDEV_LABELS]; + struct aiocb *aiocbps[VDEV_LABELS]; int l; - vdev_label_t *label; + vdev_label_t *labels; uint64_t state, txg, size; int nlabels = 0; @@ -935,19 +940,39 @@ zpool_read_all_labels(int fd, nvlist_t **config) return (0); size = P2ALIGN_TYPED(statbuf.st_size, sizeof (vdev_label_t), uint64_t); - if ((label = malloc(sizeof (vdev_label_t))) == NULL) + if ((labels = calloc(VDEV_LABELS, sizeof (vdev_label_t))) == NULL) return (0); + memset(aiocbs, 0, sizeof(aiocbs)); for (l = 0; l < VDEV_LABELS; l++) { + aiocbs[l].aio_fildes = fd; + aiocbs[l].aio_offset = label_offset(size, l); + aiocbs[l].aio_buf = &labels[l]; + aiocbs[l].aio_nbytes = sizeof(vdev_label_t); + aiocbs[l].aio_lio_opcode = LIO_READ; + aiocbps[l] = &aiocbs[l]; + } + + if (lio_listio(LIO_WAIT, aiocbps, VDEV_LABELS, NULL) != 0) { + if (errno == EAGAIN || errno == EINTR || errno == EIO) { + for (l = 0; l < VDEV_LABELS; l++) { + errno = 0; + int r = aio_error(&aiocbs[l]); + if (r != EINVAL) + (void)aio_return(&aiocbs[l]); + } + } + return (0); + } + + for (l = 0; l < VDEV_LABELS; l++) { nvlist_t *temp = NULL; - /* TODO: use aio_read so we can read al 4 labels in parallel */ - if (pread64(fd, label, sizeof (vdev_label_t), - label_offset(size, l)) != sizeof (vdev_label_t)) + if (aio_return(&aiocbs[l]) != sizeof(vdev_label_t)) continue; - if (nvlist_unpack(label->vl_vdev_phys.vp_nvlist, - sizeof (label->vl_vdev_phys.vp_nvlist), &temp, 0) != 0) + if (nvlist_unpack(labels[l].vl_vdev_phys.vp_nvlist, + sizeof (labels[l].vl_vdev_phys.vp_nvlist), &temp, 0) != 0) continue; if (nvlist_lookup_uint64(temp, ZPOOL_CONFIG_POOL_STATE, @@ -970,7 +995,7 @@ zpool_read_all_labels(int fd, nvlist_t **config) nlabels++; } - free(label); + free(labels); return (nlabels); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324567 - head/release
Author: gjb Date: Thu Oct 12 20:31:10 2017 New Revision: 324567 URL: https://svnweb.freebsd.org/changeset/base/324567 Log: Add arm/armv7 checks to env_check(). Sponsored by: The FreeBSD Foundation Modified: head/release/release.sh Modified: head/release/release.sh == --- head/release/release.sh Thu Oct 12 19:58:21 2017(r324566) +++ head/release/release.sh Thu Oct 12 20:31:10 2017(r324567) @@ -148,7 +148,7 @@ env_check() { WITH_COMPRESSED_IMAGES= NODOC=yes case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in - arm:armv6|arm64:aarch64) + arm:armv6|arm:armv7|arm64:aarch64) chroot_build_release_cmd="chroot_arm_build_release" ;; *) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r324511 - head/contrib/binutils/bfd
Note that this allows to use C++ EH on a gcc built PPC64 world for applications built by clang++. Roman On Wed, Oct 11, 2017 at 02:39:20AM +, Justin Hibbits wrote: > Author: jhibbits > Date: Wed Oct 11 02:39:20 2017 > New Revision: 324511 > URL: https://svnweb.freebsd.org/changeset/base/324511 > > Log: > Do exception offset computations in 64 bits, not 32. > > This fixes clang-built binaries on a gcc powerpc64 world. Gets us one step > closer to a clang-built world. The same change was made in later upstream > binutils. > > Submitted by: rdivacky > MFC after: 2 weeks > > Modified: > head/contrib/binutils/bfd/elf-eh-frame.c > > Modified: head/contrib/binutils/bfd/elf-eh-frame.c > == > --- head/contrib/binutils/bfd/elf-eh-frame.c Wed Oct 11 00:31:54 2017 > (r324510) > +++ head/contrib/binutils/bfd/elf-eh-frame.c Wed Oct 11 02:39:20 2017 > (r324511) > @@ -1344,7 +1344,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, > > val = read_value (abfd, buf, per_width, > get_DW_EH_PE_signed (per_encoding)); > - val += ent->offset - ent->new_offset; > + val += (bfd_vma)ent->offset - ent->new_offset; > val -= extra_string + extra_data; > write_value (abfd, buf, val, per_width); > action &= ~4; > @@ -1400,7 +1400,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, > } > break; > case DW_EH_PE_pcrel: > - value += ent->offset - ent->new_offset; > + value += (bfd_vma)ent->offset - ent->new_offset; > address += sec->output_section->vma + ent->offset + 8; > break; > } > @@ -1428,7 +1428,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, > if (value) > { > if ((ent->lsda_encoding & 0xf0) == DW_EH_PE_pcrel) > - value += ent->offset - ent->new_offset; > + value += (bfd_vma)ent->offset - ent->new_offset; > else if (ent->cie_inf->need_lsda_relative) > value -= (sec->output_section->vma + ent->new_offset + 8 > + ent->lsda_offset); > ___ > svn-src-h...@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-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324566 - head/tests/sys/kern
Author: bdrewery Date: Thu Oct 12 19:58:21 2017 New Revision: 324566 URL: https://svnweb.freebsd.org/changeset/base/324566 Log: Fix shadowed variable hidden by WARNS changing to 3 in r313006. Sponsored by: Dell EMC Isilon MFC after:1 week Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c == --- head/tests/sys/kern/ptrace_test.c Thu Oct 12 18:31:28 2017 (r324565) +++ head/tests/sys/kern/ptrace_test.c Thu Oct 12 19:58:21 2017 (r324566) @@ -3084,7 +3084,7 @@ ATF_TC_BODY(ptrace__PT_ATTACH_with_SBDRY_thread, tc) ATF_REQUIRE((child = fork()) != -1); if (child == 0) { pthread_t t[2]; - int error, cfd; + int cfd; error = pthread_barrier_wait(&barrier); if (error != 0 && error != PTHREAD_BARRIER_SERIAL_THREAD) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324565 - head/sys/compat/freebsd32
Author: emaste Date: Thu Oct 12 18:31:28 2017 New Revision: 324565 URL: https://svnweb.freebsd.org/changeset/base/324565 Log: regen freebsd32_sysent.c after r324564 (freebsd32_posix_fallocate) Modified: head/sys/compat/freebsd32/freebsd32_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cThu Oct 12 18:30:54 2017(r324564) +++ head/sys/compat/freebsd32/freebsd32_sysent.cThu Oct 12 18:31:28 2017(r324565) @@ -602,11 +602,11 @@ struct sysent freebsd32_sysent[] = { { AS(rctl_add_rule_args), (sy_call_t *)sys_rctl_add_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 528 = rctl_add_rule */ { AS(rctl_remove_rule_args), (sy_call_t *)sys_rctl_remove_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 529 = rctl_remove_rule */ #ifdef PAD64_REQUIRED - { AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_POSIX_FALLOCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ + { AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_POSIX_FALLOCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ { AS(freebsd32_posix_fadvise_args), (sy_call_t *)freebsd32_posix_fadvise, AUE_POSIX_FADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ { AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC },/* 532 = freebsd32_wait6 */ #else - { AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_POSIX_FALLOCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ + { AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_POSIX_FALLOCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ { AS(freebsd32_posix_fadvise_args), (sy_call_t *)freebsd32_posix_fadvise, AUE_POSIX_FADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ { AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC },/* 532 = freebsd32_wait6 */ #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324564 - head/sys/compat/freebsd32
Author: emaste Date: Thu Oct 12 18:30:54 2017 New Revision: 324564 URL: https://svnweb.freebsd.org/changeset/base/324564 Log: allow posix_fallocate in 32-bit compat capability mode Reported by: kib MFC after:2 weeks MFC with: r324560 Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/freebsd32/capabilities.conf Modified: head/sys/compat/freebsd32/capabilities.conf == --- head/sys/compat/freebsd32/capabilities.conf Thu Oct 12 18:00:29 2017 (r324563) +++ head/sys/compat/freebsd32/capabilities.conf Thu Oct 12 18:30:54 2017 (r324564) @@ -200,6 +200,7 @@ pdkill freebsd32_pipe pipe2 poll +freebsd32_posix_fallocate freebsd32_pread freebsd32_preadv profil ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r324560 - in head: lib/libc/sys sys/kern
On Thu, Oct 12, 2017 at 03:45:53PM +, Ed Maste wrote: > Author: emaste > Date: Thu Oct 12 15:45:53 2017 > New Revision: 324560 > URL: https://svnweb.freebsd.org/changeset/base/324560 > > Log: > allow posix_fallocate in capability mode > > posix_fallocate is logically equivalent to writing zero blocks to the > desired file size and there is no reason to prevent calling it in > capability mode. posix_fallocate already checked for the CAP_WRITE > right, so we merely need to list it in capabilities.conf. > > Reviewed by:allanjude > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D12640 > > Modified: > head/lib/libc/sys/posix_fallocate.2 > head/sys/kern/capabilities.conf You should also update compat/freebsd32. > head/sys/kern/vfs_syscalls.c ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324563 - head/sys/arm/allwinner
Author: manu Date: Thu Oct 12 18:00:29 2017 New Revision: 324563 URL: https://svnweb.freebsd.org/changeset/base/324563 Log: a10_ehci: Remove the passby code It doesn't seems to be needed anymore and this make ehci working again on the Pine64. Thanks to jmcneill@ for the help. Tested on:Pine64 (A64), OrangePi One (H3), BananapiM2 (A31s) Modified: head/sys/arm/allwinner/a10_ehci.c Modified: head/sys/arm/allwinner/a10_ehci.c == --- head/sys/arm/allwinner/a10_ehci.c Thu Oct 12 15:53:54 2017 (r324562) +++ head/sys/arm/allwinner/a10_ehci.c Thu Oct 12 18:00:29 2017 (r324563) @@ -65,17 +65,10 @@ __FBSDID("$FreeBSD$"); #define EHCI_HC_DEVSTR "Allwinner Integrated USB 2.0 controller" -#define SW_USB_PMU_IRQ_ENABLE 0x800 - #define SW_SDRAM_REG_HPCR_USB1 (0x250 + ((1 << 2) * 4)) #define SW_SDRAM_REG_HPCR_USB2 (0x250 + ((1 << 2) * 5)) #define SW_SDRAM_BP_HPCR_ACCESS(1 << 0) -#define SW_ULPI_BYPASS (1 << 0) -#define SW_AHB_INCRX_ALIGN (1 << 8) -#define SW_AHB_INCR4 (1 << 9) -#define SW_AHB_INCR8 (1 << 10) - #defineUSB_CONF(d) \ (void *)ofw_bus_search_compatible((d), compat_data)->ocd_data @@ -124,7 +117,7 @@ static struct ofw_compat_data compat_data[] = { { "allwinner,sun7i-a20-ehci", (uintptr_t)&a10_ehci_conf }, { "allwinner,sun8i-a83t-ehci", (uintptr_t)&a31_ehci_conf }, { "allwinner,sun8i-h3-ehci",(uintptr_t)&a31_ehci_conf }, - /* { "allwinner,sun50i-a64-ehci", (uintptr_t)&a31_ehci_conf }, */ + { "allwinner,sun50i-a64-ehci", (uintptr_t)&a31_ehci_conf }, { NULL, (uintptr_t)NULL } }; @@ -254,14 +247,6 @@ a10_ehci_attach(device_t self) } } - /* Enable passby */ - reg_value = A10_READ_4(sc, SW_USB_PMU_IRQ_ENABLE); - reg_value |= SW_AHB_INCR8; /* AHB INCR8 enable */ - reg_value |= SW_AHB_INCR4; /* AHB burst type INCR4 enable */ - reg_value |= SW_AHB_INCRX_ALIGN; /* AHB INCRX align enable */ - reg_value |= SW_ULPI_BYPASS; /* ULPI bypass enable */ - A10_WRITE_4(sc, SW_USB_PMU_IRQ_ENABLE, reg_value); - /* Configure port */ if (conf->sdram_init) { reg_value = A10_READ_4(sc, SW_SDRAM_REG_HPCR_USB2); @@ -332,14 +317,6 @@ a10_ehci_detach(device_t self) reg_value &= ~SW_SDRAM_BP_HPCR_ACCESS; A10_WRITE_4(sc, SW_SDRAM_REG_HPCR_USB2, reg_value); } - - /* Disable passby */ - reg_value = A10_READ_4(sc, SW_USB_PMU_IRQ_ENABLE); - reg_value &= ~SW_AHB_INCR8; /* AHB INCR8 disable */ - reg_value &= ~SW_AHB_INCR4; /* AHB burst type INCR4 disable */ - reg_value &= ~SW_AHB_INCRX_ALIGN; /* AHB INCRX align disable */ - reg_value &= ~SW_ULPI_BYPASS; /* ULPI bypass disable */ - A10_WRITE_4(sc, SW_USB_PMU_IRQ_ENABLE, reg_value); /* Disable clock */ TAILQ_FOREACH_SAFE(clk, &aw_sc->clk_list, next, clk_tmp) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324562 - head/sys/arm/arm
Author: bz Date: Thu Oct 12 15:53:54 2017 New Revision: 324562 URL: https://svnweb.freebsd.org/changeset/base/324562 Log: Add rev16 instruction to the disassembler. Reviewed by: andrew Differential Revision:https://reviews.freebsd.org/D12645 Modified: head/sys/arm/arm/disassem.c Modified: head/sys/arm/arm/disassem.c == --- head/sys/arm/arm/disassem.c Thu Oct 12 15:48:37 2017(r324561) +++ head/sys/arm/arm/disassem.c Thu Oct 12 15:53:54 2017(r324562) @@ -131,6 +131,7 @@ static const struct arm32_insn arm32_i[] = { { 0x0c50, 0x0440, "strb", "daW" }, { 0x0c50, 0x0450, "ldrb", "daW" }, #if __ARM_ARCH >= 6 +{ 0x0fff0ff0, 0x06bf0fb0, "rev16", "dm" }, { 0x, 0xf57ff01f, "clrex", "c" }, { 0x0ff00ff0, 0x01800f90, "strex", "dmo" }, { 0x0ff00fff, 0x01900f9f, "ldrex", "do" }, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324561 - head/sys/kern
Author: emaste Date: Thu Oct 12 15:48:37 2017 New Revision: 324561 URL: https://svnweb.freebsd.org/changeset/base/324561 Log: regen init_sysent.c r324560 Modified: head/sys/kern/init_sysent.c Modified: head/sys/kern/init_sysent.c == --- head/sys/kern/init_sysent.c Thu Oct 12 15:45:53 2017(r324560) +++ head/sys/kern/init_sysent.c Thu Oct 12 15:48:37 2017(r324561) @@ -581,7 +581,7 @@ struct sysent sysent[] = { { AS(rctl_get_limits_args), (sy_call_t *)sys_rctl_get_limits, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 527 = rctl_get_limits */ { AS(rctl_add_rule_args), (sy_call_t *)sys_rctl_add_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 528 = rctl_add_rule */ { AS(rctl_remove_rule_args), (sy_call_t *)sys_rctl_remove_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 529 = rctl_remove_rule */ - { AS(posix_fallocate_args), (sy_call_t *)sys_posix_fallocate, AUE_POSIX_FALLOCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = posix_fallocate */ + { AS(posix_fallocate_args), (sy_call_t *)sys_posix_fallocate, AUE_POSIX_FALLOCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 530 = posix_fallocate */ { AS(posix_fadvise_args), (sy_call_t *)sys_posix_fadvise, AUE_POSIX_FADVISE, NULL, 0, 0, 0, SY_THR_STATIC },/* 531 = posix_fadvise */ { AS(wait6_args), (sy_call_t *)sys_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC },/* 532 = wait6 */ { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 533 = cap_rights_limit */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324560 - in head: lib/libc/sys sys/kern
Author: emaste Date: Thu Oct 12 15:45:53 2017 New Revision: 324560 URL: https://svnweb.freebsd.org/changeset/base/324560 Log: allow posix_fallocate in capability mode posix_fallocate is logically equivalent to writing zero blocks to the desired file size and there is no reason to prevent calling it in capability mode. posix_fallocate already checked for the CAP_WRITE right, so we merely need to list it in capabilities.conf. Reviewed by: allanjude MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D12640 Modified: head/lib/libc/sys/posix_fallocate.2 head/sys/kern/capabilities.conf head/sys/kern/vfs_syscalls.c Modified: head/lib/libc/sys/posix_fallocate.2 == --- head/lib/libc/sys/posix_fallocate.2 Thu Oct 12 15:16:27 2017 (r324559) +++ head/lib/libc/sys/posix_fallocate.2 Thu Oct 12 15:45:53 2017 (r324560) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd January 23, 2014 +.Dd October 12, 2017 .Dt POSIX_FALLOCATE 2 .Os .Sh NAME @@ -118,6 +118,10 @@ argument does not refer to a regular file. .It Bq Er ENOSPC There is insufficient free space remaining on the file system storage media. +.It Bq Er ENOTCAPABLE +The file descriptor +.Fa fd +has insufficient rights. .It Bq Er ESPIPE The .Fa fd Modified: head/sys/kern/capabilities.conf == --- head/sys/kern/capabilities.conf Thu Oct 12 15:16:27 2017 (r324559) +++ head/sys/kern/capabilities.conf Thu Oct 12 15:45:53 2017 (r324560) @@ -488,6 +488,7 @@ poll ## ## Allow I/O-related file descriptors, subject to capability rights. ## +posix_fallocate pread preadv Modified: head/sys/kern/vfs_syscalls.c == --- head/sys/kern/vfs_syscalls.cThu Oct 12 15:16:27 2017 (r324559) +++ head/sys/kern/vfs_syscalls.cThu Oct 12 15:45:53 2017 (r324560) @@ -4400,7 +4400,7 @@ kern_posix_fallocate(struct thread *td, int fd, off_t if (offset > OFF_MAX - len) return (EFBIG); AUDIT_ARG_FD(fd); - error = fget(td, fd, cap_rights_init(&rights, CAP_WRITE), &fp); + error = fget(td, fd, cap_rights_init(&rights, CAP_PWRITE), &fp); if (error != 0) return (error); AUDIT_ARG_FILE(td->td_proc, fp); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324557 - in head/sys/boot/efi: include loader loader/arch/i386
Author: imp Date: Thu Oct 12 15:16:16 2017 New Revision: 324557 URL: https://svnweb.freebsd.org/changeset/base/324557 Log: Rename exit to efi_exit to avoid clashing with libsa exit definition Rename exit to efi_exit. It doesn't have the proper signature and conflicts with standard definition. Provide the standard definition as well. Sponsored by: Netflix Modified: head/sys/boot/efi/include/efilib.h head/sys/boot/efi/loader/arch/i386/exec.c head/sys/boot/efi/loader/efi_main.c Modified: head/sys/boot/efi/include/efilib.h == --- head/sys/boot/efi/include/efilib.h Thu Oct 12 14:57:05 2017 (r324556) +++ head/sys/boot/efi/include/efilib.h Thu Oct 12 15:16:16 2017 (r324557) @@ -95,7 +95,7 @@ void efi_time_fini(void); EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab); EFI_STATUS main(int argc, CHAR16 *argv[]); -void exit(EFI_STATUS status) __dead2; +void efi_exit(EFI_STATUS status) __dead2; void delay(int usecs); /* EFI environment initialization. */ Modified: head/sys/boot/efi/loader/arch/i386/exec.c == --- head/sys/boot/efi/loader/arch/i386/exec.c Thu Oct 12 14:57:05 2017 (r324556) +++ head/sys/boot/efi/loader/arch/i386/exec.c Thu Oct 12 15:16:16 2017 (r324557) @@ -36,12 +36,6 @@ __FBSDID("$FreeBSD$"); uint32_t __base; struct __v86 __v86; -/* XXX - Needed a definition here to implicitly define exit(); do not remove. */ -static void -exit(int x) -{ -} - void __v86int() { Modified: head/sys/boot/efi/loader/efi_main.c == --- head/sys/boot/efi/loader/efi_main.c Thu Oct 12 14:57:05 2017 (r324556) +++ head/sys/boot/efi/loader/efi_main.c Thu Oct 12 15:16:16 2017 (r324557) @@ -36,13 +36,20 @@ static EFI_PHYSICAL_ADDRESS heap; static UINTN heapsize; void -exit(EFI_STATUS exit_code) +efi_exit(EFI_STATUS exit_code) { BS->FreePages(heap, EFI_SIZE_TO_PAGES(heapsize)); BS->Exit(IH, exit_code, 0, NULL); } +void +exit(int status) +{ + + efi_exit(EFI_LOAD_ERROR); +} + static CHAR16 * arg_skipsep(CHAR16 *argp) { @@ -92,11 +99,11 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *sy setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); - /* Use exit() from here on... */ + /* Use efi_exit() from here on... */ status = BS->HandleProtocol(IH, &image_protocol, (VOID**)&img); if (status != EFI_SUCCESS) - exit(status); + efi_exit(status); /* * Pre-process the (optional) load options. If the option string @@ -176,6 +183,6 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *sy argv[argc] = NULL; status = main(argc, argv); - exit(status); + efi_exit(status); return (status); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324558 - in head/sys/boot: arm/uboot libsa mips/uboot powerpc/ofw powerpc/uboot
Author: imp Date: Thu Oct 12 15:16:22 2017 New Revision: 324558 URL: https://svnweb.freebsd.org/changeset/base/324558 Log: Define prototype for exit and ensure references Define a prototype for exit in stand.h. Provide a reference to exit in a few conf.c files to ensure that its definition gets pulled in early. Since exit() is a MD routine, it isn't defined in libsa. However, libsa tends to be listed last and will soon have panic() in it which calls exit(). The reference to exit early ensures that the MD exit is available to satisfy linking for static libraries. Modified: head/sys/boot/arm/uboot/conf.c head/sys/boot/libsa/stand.h head/sys/boot/mips/uboot/conf.c head/sys/boot/powerpc/ofw/conf.c head/sys/boot/powerpc/uboot/conf.c Modified: head/sys/boot/arm/uboot/conf.c == --- head/sys/boot/arm/uboot/conf.c Thu Oct 12 15:16:16 2017 (r324557) +++ head/sys/boot/arm/uboot/conf.c Thu Oct 12 15:16:22 2017 (r324558) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include "dev_net.h" #endif +/* Make sure we have an explicit reference to exit so libsa's panic pulls in the MD exit */ +void (*exitfn)(int) = exit; + struct devsw *devsw[] = { #if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT) &uboot_storage, Modified: head/sys/boot/libsa/stand.h == --- head/sys/boot/libsa/stand.h Thu Oct 12 15:16:16 2017(r324557) +++ head/sys/boot/libsa/stand.h Thu Oct 12 15:16:22 2017(r324558) @@ -376,6 +376,7 @@ extern int null_readdir(struct open_file *f, struct di * Machine dependent functions and data, must be provided or stubbed by * the consumer */ +extern voidexit(int); extern int getchar(void); extern int ischar(void); extern voidputchar(int); Modified: head/sys/boot/mips/uboot/conf.c == --- head/sys/boot/mips/uboot/conf.c Thu Oct 12 15:16:16 2017 (r324557) +++ head/sys/boot/mips/uboot/conf.c Thu Oct 12 15:16:22 2017 (r324558) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include "dev_net.h" #endif +/* Make sure we have an explicit reference to exit so libsa's panic pulls in the MD exit */ +void (*exitfn)(int) = exit; + struct devsw *devsw[] = { #if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT) &uboot_storage, Modified: head/sys/boot/powerpc/ofw/conf.c == --- head/sys/boot/powerpc/ofw/conf.cThu Oct 12 15:16:16 2017 (r324557) +++ head/sys/boot/powerpc/ofw/conf.cThu Oct 12 15:16:22 2017 (r324558) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include "dev_net.h" #endif +/* Make sure we have an explicit reference to exit so libsa's panic pulls in the MD exit */ +void (*exitfn)(int) = exit; + /* * We could use linker sets for some or all of these, but * then we would have to control what ended up linked into Modified: head/sys/boot/powerpc/uboot/conf.c == --- head/sys/boot/powerpc/uboot/conf.c Thu Oct 12 15:16:16 2017 (r324557) +++ head/sys/boot/powerpc/uboot/conf.c Thu Oct 12 15:16:22 2017 (r324558) @@ -35,6 +35,9 @@ __FBSDID("$FreeBSD$"); #include "dev_net.h" #endif +/* Make sure we have an explicit reference to exit so libsa's panic pulls in the MD exit */ +void (*exitfn)(int) = exit; + /* * We could use linker sets for some or all of these, but * then we would have to control what ended up linked into ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324559 - in head/sys/boot: common libsa
Author: imp Date: Thu Oct 12 15:16:27 2017 New Revision: 324559 URL: https://svnweb.freebsd.org/changeset/base/324559 Log: Move panic back into libsa. It's documented in libstand(3) to belong there. Sponsored by: Netflix Added: head/sys/boot/libsa/panic.c (contents, props changed) - copied, changed from r324558, head/sys/boot/common/panic.c Deleted: head/sys/boot/common/panic.c Modified: head/sys/boot/common/Makefile.inc head/sys/boot/libsa/Makefile Modified: head/sys/boot/common/Makefile.inc == --- head/sys/boot/common/Makefile.inc Thu Oct 12 15:16:22 2017 (r324558) +++ head/sys/boot/common/Makefile.inc Thu Oct 12 15:16:27 2017 (r324559) @@ -4,7 +4,7 @@ SRCS+= boot.c commands.c console.c devopen.c interp.c SRCS+= interp_backslash.c interp_parse.c ls.c misc.c -SRCS+= module.c panic.c +SRCS+= module.c .if ${MACHINE} == "i386" || ${MACHINE_CPUARCH} == "amd64" SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c Modified: head/sys/boot/libsa/Makefile == --- head/sys/boot/libsa/MakefileThu Oct 12 15:16:22 2017 (r324558) +++ head/sys/boot/libsa/MakefileThu Oct 12 15:16:27 2017 (r324559) @@ -25,8 +25,8 @@ CFLAGS+= -I${SASRC} # standalone components and stuff we have modified locally SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c environment.c getopt.c gets.c \ - globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \ - sbrk.c twiddle.c zalloc.c zalloc_malloc.c + globals.c pager.c panic.c printf.c strdup.c strerror.c strtol.c strtoul.c \ + random.c sbrk.c twiddle.c zalloc.c zalloc_malloc.c # private (pruned) versions of libc string functions SRCS+= strcasecmp.c Copied and modified: head/sys/boot/libsa/panic.c (from r324558, head/sys/boot/common/panic.c) == ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324555 - head/sys/boot/i386/zfsboot
Author: imp Date: Thu Oct 12 14:57:00 2017 New Revision: 324555 URL: https://svnweb.freebsd.org/changeset/base/324555 Log: Honor CFLAGS modifications in Makefile.inc by using += here. There's no hyper-small space constraints, so there's no reason to tightly control it. Sponsored by: Netflix Modified: head/sys/boot/i386/zfsboot/Makefile Modified: head/sys/boot/i386/zfsboot/Makefile == --- head/sys/boot/i386/zfsboot/Makefile Thu Oct 12 14:56:54 2017 (r324554) +++ head/sys/boot/i386/zfsboot/Makefile Thu Oct 12 14:57:00 2017 (r324555) @@ -18,7 +18,7 @@ REL1= 0x700 ORG1= 0x7c00 ORG2= 0x2000 -CFLAGS=-DBOOTPROG=\"zfsboot\" \ +CFLAGS+=-DBOOTPROG=\"zfsboot\" \ -O1 \ -DZFS -DBOOT2 \ -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324554 - in head/sys/boot: common i386/gptboot i386/gptzfsboot i386/zfsboot libsa uboot/lib
Author: imp Date: Thu Oct 12 14:56:54 2017 New Revision: 324554 URL: https://svnweb.freebsd.org/changeset/base/324554 Log: Move crc32.c, util.c and gpt.c over to libsa. Sponsored by: Netflix Added: head/sys/boot/libsa/crc32.c (contents, props changed) - copied, changed from r324553, head/sys/boot/common/crc32.c head/sys/boot/libsa/crc32.h (contents, props changed) - copied, changed from r324553, head/sys/boot/common/crc32.h head/sys/boot/libsa/gpt.c (contents, props changed) - copied, changed from r324553, head/sys/boot/common/gpt.c head/sys/boot/libsa/gpt.h (contents, props changed) - copied, changed from r324553, head/sys/boot/common/gpt.h head/sys/boot/libsa/util.c (contents, props changed) - copied, changed from r324553, head/sys/boot/common/util.c head/sys/boot/libsa/util.h (contents, props changed) - copied, changed from r324553, head/sys/boot/common/util.h Deleted: head/sys/boot/common/crc32.c head/sys/boot/common/crc32.h head/sys/boot/common/gpt.c head/sys/boot/common/gpt.h head/sys/boot/common/util.c head/sys/boot/common/util.h Modified: head/sys/boot/common/Makefile.inc head/sys/boot/i386/gptboot/Makefile head/sys/boot/i386/gptzfsboot/Makefile head/sys/boot/i386/zfsboot/Makefile head/sys/boot/uboot/lib/Makefile Modified: head/sys/boot/common/Makefile.inc == --- head/sys/boot/common/Makefile.inc Thu Oct 12 14:56:48 2017 (r324553) +++ head/sys/boot/common/Makefile.inc Thu Oct 12 14:56:54 2017 (r324554) @@ -1,5 +1,7 @@ # $FreeBSD$ +.PATH: ${SRCTOP}/sys/boot/common ${SRCTOP}/sys/boot/libsa + SRCS+= boot.c commands.c console.c devopen.c interp.c SRCS+= interp_backslash.c interp_parse.c ls.c misc.c SRCS+= module.c panic.c @@ -30,7 +32,6 @@ SRCS+=dev_net.c SRCS+= disk.c part.c CFLAGS+= -DLOADER_DISK_SUPPORT .if !defined(LOADER_NO_GPT_SUPPORT) -SRCS+= crc32.c CFLAGS+= -DLOADER_GPT_SUPPORT .endif .if !defined(LOADER_NO_MBR_SUPPORT) Modified: head/sys/boot/i386/gptboot/Makefile == --- head/sys/boot/i386/gptboot/Makefile Thu Oct 12 14:56:48 2017 (r324553) +++ head/sys/boot/i386/gptboot/Makefile Thu Oct 12 14:56:54 2017 (r324554) @@ -1,7 +1,9 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../boot2 ${.CURDIR}/../common ${.CURDIR}/../../common +.include "../Makefile.inc" +.PATH: ${.CURDIR}/../boot2 ${.CURDIR}/../common ${SASRC} + FILES= gptboot MAN= gptboot.8 @@ -20,7 +22,7 @@ GPTBOOT_UFS?= UFS1_AND_UFS2 #GPTBOOT_UFS?= UFS2_ONLY #GPTBOOT_UFS?= UFS1_ONLY -CFLAGS=-DBOOTPROG=\"gptboot\" \ +CFLAGS+=-DBOOTPROG=\"gptboot\" \ -O1 \ -DGPT \ -D${GPTBOOT_UFS} \ Modified: head/sys/boot/i386/gptzfsboot/Makefile == --- head/sys/boot/i386/gptzfsboot/Makefile Thu Oct 12 14:56:48 2017 (r324553) +++ head/sys/boot/i386/gptzfsboot/Makefile Thu Oct 12 14:56:54 2017 (r324554) @@ -1,10 +1,10 @@ # $FreeBSD$ -.include +.include "../Makefile.inc" .PATH: ${.CURDIR}/../boot2 ${.CURDIR}/../gptboot \ ${.CURDIR}/../zfsboot ${.CURDIR}/../common \ - ${.CURDIR}/../../common ${.CURDIR}/../../../crypto/skein + ${.CURDIR}/../../../crypto/skein ${SASRC} FILES= gptzfsboot MAN= gptzfsboot.8 @@ -19,7 +19,7 @@ REL1= 0x700 ORG1= 0x7c00 ORG2= 0x0 -CFLAGS=-DBOOTPROG=\"gptzfsboot\" \ +CFLAGS+=-DBOOTPROG=\"gptzfsboot\" \ -O1 \ -DGPT -DZFS -DBOOT2 \ -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ Modified: head/sys/boot/i386/zfsboot/Makefile == --- head/sys/boot/i386/zfsboot/Makefile Thu Oct 12 14:56:48 2017 (r324553) +++ head/sys/boot/i386/zfsboot/Makefile Thu Oct 12 14:56:54 2017 (r324554) @@ -1,7 +1,9 @@ # $FreeBSD$ +.include "../Makefile.inc" + .PATH: ${.CURDIR}/../boot2 ${.CURDIR}/../common \ - ${.CURDIR}/../../common ${.CURDIR}/../../../crypto/skein + ${.CURDIR}/../../../crypto/skein ${SASRC} FILES= zfsboot MAN= zfsboot.8 Copied and modified: head/sys/boot/libsa/crc32.c (from r324553, head/sys/boot/common/crc32.c) == Copied and modified: head/sys/boot/libsa/crc32.h (from r324553, head/sys/boot/common/crc32.h) == Copied and modified: head/sys/boot/libsa/gpt.c (from r324553, head/sys/boot/common/gpt.c) == Copied and modified: head/sys/boot/libsa/gpt.h (from r324553, head/sys/boot/common/gpt.h) ==
svn commit: r324556 - in head/sys/boot: common efi/boot1 i386/gptboot libsa powerpc/boot1.chrp sparc64/boot1
Author: imp Date: Thu Oct 12 14:57:05 2017 New Revision: 324556 URL: https://svnweb.freebsd.org/changeset/base/324556 Log: Move ufsread.c Move ufsread.c from sys/boot/common (which used to be all the common files for /boot/loader, but grew to be all the common files for sys/boot, but that's now sys/boot/libsa's job) to sys/boot/libsa. Sponsored by: Netflix Added: head/sys/boot/libsa/ufsread.c (contents, props changed) - copied, changed from r324555, head/sys/boot/common/ufsread.c Deleted: head/sys/boot/common/ufsread.c Modified: head/sys/boot/efi/boot1/Makefile head/sys/boot/i386/gptboot/Makefile head/sys/boot/powerpc/boot1.chrp/Makefile head/sys/boot/sparc64/boot1/Makefile Modified: head/sys/boot/efi/boot1/Makefile == --- head/sys/boot/efi/boot1/MakefileThu Oct 12 14:57:00 2017 (r324555) +++ head/sys/boot/efi/boot1/MakefileThu Oct 12 14:57:05 2017 (r324556) @@ -2,7 +2,7 @@ MAN= -.include +.include "../Makefile.inc" MK_SSP=no @@ -120,7 +120,7 @@ boot1.efi: ${PROG} -j .rela.dyn -j .reloc -j .eh_frame \ --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} -boot1.o: ${.CURDIR}/../../common/ufsread.c +boot1.o: ${SASRC}/ufsread.c # The following inserts our objects into a template FAT file system # created by generate-fat.sh Modified: head/sys/boot/i386/gptboot/Makefile == --- head/sys/boot/i386/gptboot/Makefile Thu Oct 12 14:57:00 2017 (r324555) +++ head/sys/boot/i386/gptboot/Makefile Thu Oct 12 14:57:05 2017 (r324556) @@ -78,7 +78,7 @@ gptboot.bin: gptboot.out gptboot.out: ${BTXCRT} gptboot.o sio.o crc32.o drv.o cons.o util.o ${OPENCRYPTO_XTS} ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSA32} -gptboot.o: ${.CURDIR}/../../common/ufsread.c +gptboot.o: ${SASRC}/ufsread.c .if ${MACHINE_CPUARCH} == "amd64" beforedepend gptboot.o: machine Copied and modified: head/sys/boot/libsa/ufsread.c (from r324555, head/sys/boot/common/ufsread.c) == Modified: head/sys/boot/powerpc/boot1.chrp/Makefile == --- head/sys/boot/powerpc/boot1.chrp/Makefile Thu Oct 12 14:57:00 2017 (r324555) +++ head/sys/boot/powerpc/boot1.chrp/Makefile Thu Oct 12 14:57:05 2017 (r324556) @@ -17,7 +17,8 @@ CFLAGS= -ffreestanding -msoft-float \ -D_STANDALONE LDFLAGS=-nostdlib -static -Wl,-N -.include "${.CURDIR}/../Makefile.inc" +.include "../Makefile.inc" + .PATH: ${.CURDIR}/../../../libkern ${.CURDIR}/../../../../lib/libc/powerpc/gen ${.CURDIR} # The following inserts out objects into a template HFS @@ -36,7 +37,7 @@ boot1.hfs: boot1.elf bootinfo.txt CLEANFILES= boot1.hfs -boot1.o: ${.CURDIR}/../../common/ufsread.c +boot1.o: ${SASRC}/ufsread.c .include Modified: head/sys/boot/sparc64/boot1/Makefile == --- head/sys/boot/sparc64/boot1/MakefileThu Oct 12 14:57:00 2017 (r324555) +++ head/sys/boot/sparc64/boot1/MakefileThu Oct 12 14:57:05 2017 (r324556) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include "../Makefile.inc" + PROG= boot1.elf INTERNALPROG= MAN= @@ -25,6 +27,6 @@ ${FILES}: boot1.aout boot1.aout: boot1.elf elf2aout -o ${.TARGET} ${.ALLSRC} -boot1.o: ${.CURDIR}/../../common/ufsread.c +boot1.o: ${SASRC}/ufsread.c .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324553 - in head/sys/boot: . libsa libsa32 libstand32
Author: imp Date: Thu Oct 12 14:56:48 2017 New Revision: 324553 URL: https://svnweb.freebsd.org/changeset/base/324553 Log: Rename libstand.a to libsa.a and libstand32.a to libsa32.a Sponsored by: Netflix Added: head/sys/boot/libsa32/ head/sys/boot/libsa32/Makefile (contents, props changed) - copied, changed from r324552, head/sys/boot/libstand32/Makefile head/sys/boot/libsa32/Makefile.depend (contents, props changed) - copied, changed from r324552, head/sys/boot/libstand32/Makefile.depend Deleted: head/sys/boot/libstand32/Makefile head/sys/boot/libstand32/Makefile.depend Modified: head/sys/boot/Makefile.amd64 head/sys/boot/Makefile.i386 head/sys/boot/Makefile.inc head/sys/boot/Makefile.powerpc head/sys/boot/libsa/Makefile Modified: head/sys/boot/Makefile.amd64 == --- head/sys/boot/Makefile.amd64Thu Oct 12 14:56:42 2017 (r324552) +++ head/sys/boot/Makefile.amd64Thu Oct 12 14:56:48 2017 (r324553) @@ -1,7 +1,7 @@ # $FreeBSD$ SUBDIR+= efi -SUBDIR+= libstand32 +SUBDIR+= libsa32 SUBDIR+= zfs SUBDIR+= userboot Modified: head/sys/boot/Makefile.i386 == --- head/sys/boot/Makefile.i386 Thu Oct 12 14:56:42 2017(r324552) +++ head/sys/boot/Makefile.i386 Thu Oct 12 14:56:48 2017(r324553) @@ -1,7 +1,7 @@ # $FreeBSD$ SUBDIR+= efi -SUBDIR+= libstand32 +SUBDIR+= libsa32 SUBDIR+= zfs .if !defined(LOADER_NO_GELI_SUPPORT) Modified: head/sys/boot/Makefile.inc == --- head/sys/boot/Makefile.inc Thu Oct 12 14:56:42 2017(r324552) +++ head/sys/boot/Makefile.inc Thu Oct 12 14:56:48 2017(r324553) @@ -5,11 +5,11 @@ .if !defined(__BOOT_MAKEFILE_INC__) __BOOT_MAKEFILE_INC__=${MFILE} -SASRC=${SRCTOP}/lib/libstand -# Normal standalone library -LIBSA=${OBJTOP}/sys/boot/libsa/libstand.a +SASRC=${SRCTOP}/sys/boot/libsa +# Normal Standalone library +LIBSA=${OBJTOP}/sys/boot/libsa/libsa.a # Standalone library compiled for 32-bit version of the processor -LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a +LIBSA32=${OBJTOP}/sys/boot/libsa32/libsa32.a CFLAGS+=-I${SASRC} Modified: head/sys/boot/Makefile.powerpc == --- head/sys/boot/Makefile.powerpc Thu Oct 12 14:56:42 2017 (r324552) +++ head/sys/boot/Makefile.powerpc Thu Oct 12 14:56:48 2017 (r324553) @@ -4,6 +4,6 @@ SUBDIR+= fdt .endif -SUBDIR+= libstand32 +SUBDIR+= libsa32 SUBDIR+= ofw SUBDIR+= uboot Modified: head/sys/boot/libsa/Makefile == --- head/sys/boot/libsa/MakefileThu Oct 12 14:56:42 2017 (r324552) +++ head/sys/boot/libsa/MakefileThu Oct 12 14:56:48 2017 (r324553) @@ -17,7 +17,7 @@ INTERNALLIB= LIBSTAND_CPUARCH?=${MACHINE_CPUARCH} LIBC_SRC= ${SRCTOP}/lib/libc -LIB?= stand +LIB?= sa NO_PIC= WARNS?=0 Copied and modified: head/sys/boot/libsa32/Makefile (from r324552, head/sys/boot/libstand32/Makefile) == --- head/sys/boot/libstand32/Makefile Thu Oct 12 14:56:42 2017 (r324552, copy source) +++ head/sys/boot/libsa32/Makefile Thu Oct 12 14:56:48 2017 (r324553) @@ -4,20 +4,18 @@ .include "../Makefile.inc" +LIB=sa32 .if ${MACHINE_CPUARCH} == "amd64" LIBSTAND_CPUARCH=i386 .else LIBSTAND_CPUARCH=${MACHINE_CPUARCH} .endif -INTERNALLIB= -INCS= -MAN= -.PATH: ${SASRC} .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -I. .endif +.PATH: ${SASRC} .include "${SASRC}/Makefile" .if ${MACHINE_CPUARCH} == "amd64" Copied and modified: head/sys/boot/libsa32/Makefile.depend (from r324552, head/sys/boot/libstand32/Makefile.depend) == ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324552 - in head/sys/boot: . userboot userboot/libstand userboot/userboot
Author: imp Date: Thu Oct 12 14:56:42 2017 New Revision: 324552 URL: https://svnweb.freebsd.org/changeset/base/324552 Log: Kill the userboot copy of libstand. It's not needed (it's now identical to libsa, and seems to have been for some time). Sponsored by: Netflix Deleted: head/sys/boot/userboot/libstand/Makefile head/sys/boot/userboot/libstand/Makefile.depend Modified: head/sys/boot/Makefile.inc head/sys/boot/userboot/Makefile head/sys/boot/userboot/userboot/Makefile Modified: head/sys/boot/Makefile.inc == --- head/sys/boot/Makefile.inc Thu Oct 12 14:56:28 2017(r324551) +++ head/sys/boot/Makefile.inc Thu Oct 12 14:56:42 2017(r324552) @@ -10,8 +10,6 @@ SASRC=${SRCTOP}/lib/libstand LIBSA=${OBJTOP}/sys/boot/libsa/libstand.a # Standalone library compiled for 32-bit version of the processor LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a -# Standalone library compiled for userboot -LIBSAU=${OBJTOP}/sys/boot/userboot/libstand/libstand.a CFLAGS+=-I${SASRC} Modified: head/sys/boot/userboot/Makefile == --- head/sys/boot/userboot/Makefile Thu Oct 12 14:56:28 2017 (r324551) +++ head/sys/boot/userboot/Makefile Thu Oct 12 14:56:42 2017 (r324552) @@ -2,7 +2,7 @@ .include -SUBDIR=ficl libstand test zfs userboot +SUBDIR=ficl test zfs userboot .include Modified: head/sys/boot/userboot/userboot/Makefile == --- head/sys/boot/userboot/userboot/MakefileThu Oct 12 14:56:28 2017 (r324551) +++ head/sys/boot/userboot/userboot/MakefileThu Oct 12 14:56:42 2017 (r324552) @@ -58,7 +58,7 @@ LIBZFSBOOT= ${.OBJDIR}/../zfs/libzfsboot.a .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. -DPADD+=${LIBFICL} ${LIBZFSBOOT} ${LIBSAU} -LDADD+=${LIBFICL} ${LIBZFSBOOT} ${LIBSAU} +DPADD+=${LIBFICL} ${LIBZFSBOOT} ${LIBSA} +LDADD+=${LIBFICL} ${LIBZFSBOOT} ${LIBSA} .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324551 - in head: lib/libstand lib/libstand/amd64 lib/libstand/i386 lib/libstand/mips lib/libstand/powerpc lib/libstand/sparc64 sys/boot/libsa sys/boot/libsa/amd64 sys/boot/libsa/i386 ...
Author: imp Date: Thu Oct 12 14:56:28 2017 New Revision: 324551 URL: https://svnweb.freebsd.org/changeset/base/324551 Log: Move lib/libstand to sys/boot/libsa Move the sources to sys/boot. Make adjustments related to the move. Kill LIBSTAND_SRC since it's no longer needed. Sponsored by: Netflix Added: head/sys/boot/libsa/Makefile.depend (contents, props changed) - copied, changed from r324550, head/lib/libstand/Makefile.depend head/sys/boot/libsa/__main.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/__main.c head/sys/boot/libsa/amd64/ head/sys/boot/libsa/amd64/_setjmp.S (contents, props changed) - copied, changed from r324550, head/lib/libstand/amd64/_setjmp.S head/sys/boot/libsa/arp.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/arp.c head/sys/boot/libsa/assert.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/assert.c head/sys/boot/libsa/bcd.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/bcd.c head/sys/boot/libsa/bootp.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/bootp.c head/sys/boot/libsa/bootp.h (contents, props changed) - copied, changed from r324550, head/lib/libstand/bootp.h head/sys/boot/libsa/bootparam.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/bootparam.c head/sys/boot/libsa/bootparam.h (contents, props changed) - copied, changed from r324550, head/lib/libstand/bootparam.h head/sys/boot/libsa/bzipfs.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/bzipfs.c head/sys/boot/libsa/cd9660.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/cd9660.c head/sys/boot/libsa/close.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/close.c head/sys/boot/libsa/closeall.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/closeall.c head/sys/boot/libsa/dev.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/dev.c head/sys/boot/libsa/dosfs.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/dosfs.c head/sys/boot/libsa/dosfs.h (contents, props changed) - copied, changed from r324550, head/lib/libstand/dosfs.h head/sys/boot/libsa/environment.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/environment.c head/sys/boot/libsa/ether.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/ether.c head/sys/boot/libsa/ext2fs.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/ext2fs.c head/sys/boot/libsa/fstat.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/fstat.c head/sys/boot/libsa/getopt.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/getopt.c head/sys/boot/libsa/gets.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/gets.c head/sys/boot/libsa/globals.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/globals.c head/sys/boot/libsa/gzipfs.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/gzipfs.c head/sys/boot/libsa/i386/ head/sys/boot/libsa/i386/_setjmp.S (contents, props changed) - copied, changed from r324550, head/lib/libstand/i386/_setjmp.S head/sys/boot/libsa/in_cksum.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/in_cksum.c head/sys/boot/libsa/inet_ntoa.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/inet_ntoa.c head/sys/boot/libsa/ioctl.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/ioctl.c head/sys/boot/libsa/iodesc.h (contents, props changed) - copied, changed from r324550, head/lib/libstand/iodesc.h head/sys/boot/libsa/ip.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/ip.c head/sys/boot/libsa/libstand.3 (contents, props changed) - copied, changed from r324550, head/lib/libstand/libstand.3 head/sys/boot/libsa/lseek.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/lseek.c head/sys/boot/libsa/mips/ head/sys/boot/libsa/mips/_setjmp.S (contents, props changed) - copied, changed from r324550, head/lib/libstand/mips/_setjmp.S head/sys/boot/libsa/nandfs.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/nandfs.c head/sys/boot/libsa/net.c (contents, props changed) - copied, changed from r324550, head/lib/libstand/net.c head/sys/boot/libsa/net.h (contents, props changed) - copied, changed from r324550, head/lib/libstand/net.h head/sys
svn commit: r324550 - head/lib/libstand
Author: imp Date: Thu Oct 12 14:53:25 2017 New Revision: 324550 URL: https://svnweb.freebsd.org/changeset/base/324550 Log: Add $FreeBSD$ to ancient sources that it's missing from. Sponsored by: Netflix Modified: head/lib/libstand/bootparam.h head/lib/libstand/tftp.h Modified: head/lib/libstand/bootparam.h == --- head/lib/libstand/bootparam.h Thu Oct 12 14:32:45 2017 (r324549) +++ head/lib/libstand/bootparam.h Thu Oct 12 14:53:25 2017 (r324550) @@ -1,4 +1,5 @@ /* $NetBSD: bootparam.h,v 1.3 1998/01/05 19:19:41 perry Exp $ */ +/* $FreeBSD$ */ int bp_whoami(int sock); int bp_getfile(int sock, char *key, struct in_addr *addrp, char *path); Modified: head/lib/libstand/tftp.h == --- head/lib/libstand/tftp.hThu Oct 12 14:32:45 2017(r324549) +++ head/lib/libstand/tftp.hThu Oct 12 14:53:25 2017(r324550) @@ -30,6 +30,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * + * $FreeBSD$ */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324549 - head/sys/arm/conf
Author: bz Date: Thu Oct 12 14:32:45 2017 New Revision: 324549 URL: https://svnweb.freebsd.org/changeset/base/324549 Log: Previously there was a VIRT kernel to which I had added these options. With that gone they need to go into GENERIC now. Makes FreeBSD/arm usable on gem5 by default. Reviewed by: andrew Differential Revision:https://reviews.freebsd.org/D12566 Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC == --- head/sys/arm/conf/GENERIC Thu Oct 12 14:08:55 2017(r324548) +++ head/sys/arm/conf/GENERIC Thu Oct 12 14:32:45 2017(r324549) @@ -99,6 +99,7 @@ deviceahci# AHCI-compatible SATA controllers # PCI optionsNEW_PCIB device pci +device pci_host_generic # PCI NICs device re # RealTek 8139C+/8169/8169S/8110S @@ -106,6 +107,7 @@ device re # RealTek 8139C+/8169/8169S/8110S # VirtIO device virtio device virtio_mmio +device virtio_pci device virtio_blk device vtnet ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324548 - stable/11/sys/dev/smc
Author: n_hibma Date: Thu Oct 12 14:08:55 2017 New Revision: 324548 URL: https://svnweb.freebsd.org/changeset/base/324548 Log: MFC 324088: Make smc compile with DEVICE_POLLING set. smc_poll had the wrong prototype. Reviewed by: benno Modified: stable/11/sys/dev/smc/if_smc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/smc/if_smc.c == --- stable/11/sys/dev/smc/if_smc.c Thu Oct 12 13:59:23 2017 (r324547) +++ stable/11/sys/dev/smc/if_smc.c Thu Oct 12 14:08:55 2017 (r324548) @@ -782,7 +782,7 @@ smc_task_rx(void *context, int pending) } #ifdef DEVICE_POLLING -static void +static int smc_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct smc_softc*sc; @@ -792,12 +792,13 @@ smc_poll(struct ifnet *ifp, enum poll_cmd cmd, int cou SMC_LOCK(sc); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { SMC_UNLOCK(sc); - return; + return (0); } SMC_UNLOCK(sc); if (cmd == POLL_AND_CHECK_STATUS) taskqueue_enqueue(sc->smc_tq, &sc->smc_intr); +return (0); } #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324547 - head/usr.bin/xinstall
Author: mjg Date: Thu Oct 12 13:59:23 2017 New Revision: 324547 URL: https://svnweb.freebsd.org/changeset/base/324547 Log: xinstall: plug an infinite loop in directory creation If stat continues to fail with ENOENT and mkdir with EEXIST the code wont finish. In particular this can show up when the target path follows through a symlink to a non-existent directory. Reported by: ae MFC after:1 week Modified: head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/xinstall.c == --- head/usr.bin/xinstall/xinstall.cThu Oct 12 08:27:57 2017 (r324546) +++ head/usr.bin/xinstall/xinstall.cThu Oct 12 13:59:23 2017 (r324547) @@ -1292,17 +1292,19 @@ install_dir(char *path) { char *p; struct stat sb; - int ch; + int ch, tried_mkdir; for (p = path;; ++p) if (!*p || (p != path && *p == '/')) { + tried_mkdir = 0; ch = *p; *p = '\0'; again: if (stat(path, &sb) < 0) { - if (errno != ENOENT) + if (errno != ENOENT || tried_mkdir) err(EX_OSERR, "stat %s", path); if (mkdir(path, 0755) < 0) { + tried_mkdir = 1; if (errno == EEXIST) goto again; err(EX_OSERR, "mkdir %s", path); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r324546 - in stable/11: lib/libcuse sys/fs/cuse
Author: hselasky Date: Thu Oct 12 08:27:57 2017 New Revision: 324546 URL: https://svnweb.freebsd.org/changeset/base/324546 Log: MFC r324320: Add support for new cuse(3) error code, CUSE_ERR_NO_DEVICE. This error code is useful when emulating Linux input event devices from userspace. PR: 218626 Submitted by: jan.kokemuel...@gmail.com Sponsored by: Mellanox Technologies Modified: stable/11/lib/libcuse/cuse.3 stable/11/sys/fs/cuse/cuse.c stable/11/sys/fs/cuse/cuse_defs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libcuse/cuse.3 == --- stable/11/lib/libcuse/cuse.3Wed Oct 11 23:42:29 2017 (r324545) +++ stable/11/lib/libcuse/cuse.3Thu Oct 12 08:27:57 2017 (r324546) @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 6, 2014 +.Dd October 5, 2017 .Dt CUSE 3 .Os .Sh NAME @@ -292,6 +292,7 @@ enum { CUSE_ERR_SIGNAL CUSE_ERR_OTHER CUSE_ERR_NOT_LOADED + CUSE_ERR_NO_DEVICE CUSE_POLL_NONE CUSE_POLL_READ Modified: stable/11/sys/fs/cuse/cuse.c == --- stable/11/sys/fs/cuse/cuse.cWed Oct 11 23:42:29 2017 (r324545) +++ stable/11/sys/fs/cuse/cuse.cThu Oct 12 08:27:57 2017 (r324546) @@ -390,6 +390,8 @@ cuse_convert_error(int error) return (EFAULT); case CUSE_ERR_SIGNAL: return (EINTR); + case CUSE_ERR_NO_DEVICE: + return (ENODEV); default: return (ENXIO); } Modified: stable/11/sys/fs/cuse/cuse_defs.h == --- stable/11/sys/fs/cuse/cuse_defs.h Wed Oct 11 23:42:29 2017 (r324545) +++ stable/11/sys/fs/cuse/cuse_defs.h Thu Oct 12 08:27:57 2017 (r324546) @@ -27,7 +27,7 @@ #ifndef _CUSE_DEFS_H_ #define_CUSE_DEFS_H_ -#defineCUSE_VERSION0x000122 +#defineCUSE_VERSION0x000123 #defineCUSE_ERR_NONE 0 #defineCUSE_ERR_BUSY -1 @@ -38,6 +38,7 @@ #defineCUSE_ERR_SIGNAL -6 #defineCUSE_ERR_OTHER -7 #defineCUSE_ERR_NOT_LOADED -8 +#defineCUSE_ERR_NO_DEVICE -9 #defineCUSE_POLL_NONE 0 #defineCUSE_POLL_READ 1 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"