On Thu, Jun 11, 2020 at 09:33:31AM -0700, David Wolfskill wrote: > On Thu, Jun 11, 2020 at 12:24:17PM -0400, Mark Johnston wrote: > > ... > > > Unfortunately, I ran out of time to do further experiments for now; I'll > > > need to do some work-related things for a while, but thought that this > > > might at least provide some useful information. > > > > > > Here is what I commented out: > > > > > > g1-55(12.1-S)[2] grep KIB boot/loader.conf > > > # KIB coretemp_load="YES" > > > # KIB iwn5000fw_load="YES" > > > # KIB linux_load="YES" > > > # KIB nvidia-modeset_load="YES" > > > # KIB cuse_load="YES" > > > # KIB geom_eli_load="YES" > > > # KIB filemon_load="YES" > > > > Thanks. I'm able to reproduce a somewhat similar problem in bhyve: if I > > preload iwn5000fw.ko, a r362045 kernel fails to boot very early with > > > > ---<<BOOT>>--- > > ACPI: Failed to map RSDT > > APIC: Could not find any APICs. > > panic: running without device atpic requires a local APIC > > Ah -- excellent (that you are able to pretty much reproduce this). And > it explains why my build machine wasn't affected: it doesn't use > wireless drivers at all. > > > Reverting r362035 allows the kernel to boot again, but so does adding a > > few printf() calls to the pmap and ACPI code. > > Kinky. :-}
This should fix noexec for modules. diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 81db4d7ca85..cb84fc95691 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1698,7 +1698,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, int cpu; /* It is not necessary to signal other CPUs while in the debugger. */ - if (kdb_active || KERNEL_PANICKED()) { + if (kdb_active || KERNEL_PANICKED() || !smp_started) { curcpu_cb(pmap, addr1, addr2); return; } @@ -1759,13 +1759,10 @@ void smp_masked_invltlb(cpuset_t mask, pmap_t pmap, smp_invl_cb_t curcpu_cb) { - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, pmap, 0, 0, - curcpu_cb); + smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, pmap, 0, 0, curcpu_cb); #ifdef COUNT_XINVLTLB_HITS - ipi_global++; + ipi_global++; #endif - } } void @@ -1773,13 +1770,10 @@ smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, pmap_t pmap, smp_invl_cb_t curcpu_cb) { - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLPG, pmap, addr, 0, - curcpu_cb); + smp_targeted_tlb_shootdown(mask, IPI_INVLPG, pmap, addr, 0, curcpu_cb); #ifdef COUNT_XINVLTLB_HITS - ipi_page++; + ipi_page++; #endif - } } void @@ -1787,24 +1781,20 @@ smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2, pmap_t pmap, smp_invl_cb_t curcpu_cb) { - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, pmap, - addr1, addr2, curcpu_cb); + smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, pmap, addr1, addr2, + curcpu_cb); #ifdef COUNT_XINVLTLB_HITS - ipi_range++; - ipi_range_size += (addr2 - addr1) / PAGE_SIZE; + ipi_range++; + ipi_range_size += (addr2 - addr1) / PAGE_SIZE; #endif - } } void smp_cache_flush(smp_invl_cb_t curcpu_cb) { - if (smp_started) { - smp_targeted_tlb_shootdown(all_cpus, IPI_INVLCACHE, NULL, - 0, 0, curcpu_cb); - } + smp_targeted_tlb_shootdown(all_cpus, IPI_INVLCACHE, NULL, 0, 0, + curcpu_cb); } /* _______________________________________________ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"