svn commit: r366532 - in head: share/man/man4 sys/dev/cxgbe
Author: np Date: Thu Oct 8 10:00:13 2020 New Revision: 366532 URL: https://svnweb.freebsd.org/changeset/base/366532 Log: cxgbe(4): knobs to drop various kinds of undesirable frames on ingress. These kind of drops come for free in the sense that they do not use the filter TCAM or any other resource that wouldn't normally be used during rx. Frames dropped by the hardware get counted in the MAC's rx stats but are not delivered to the driver. hw.cxgbe.attack_filter Set to 1 to enable the "attack filter". Default is 0. The attack filter will drop an incoming frame if any of these conditions is true: src ip/ip6 == dst ip/ip6; tcp and src/dst ip is not unicast; src/dst ip is loopback (127.x.y.z); src ip6 is not unicast; src/dst ip6 is loopback (::1/128) or unspecified (::/128); tcp and src/dst ip6 is mcast (ff00::/8). hw.cxgbe.drop_ip_fragments Set to 1 to drop all incoming IP fragments. Default is 0. Note that this drops valid frames. hw.cxgbe.drop_pkts_with_l2_errors Set to 1 to drop incoming frames with Layer 2 length or checksum errors. Default is 1. hw.cxgbe.drop_pkts_with_l3_errors Set to 1 to drop incoming frames with IP version, length, or checksum errors. Default is 0. hw.cxgbe.drop_pkts_with_l4_errors Set to 1 to drop incoming frames with Layer 4 length, checksum, or other errors. Default is 0. MFC after:2 weeks Sponsored by: Chelsio Communications Modified: head/share/man/man4/cxgbe.4 head/sys/dev/cxgbe/t4_main.c Modified: head/share/man/man4/cxgbe.4 == --- head/share/man/man4/cxgbe.4 Thu Oct 8 04:00:31 2020(r366531) +++ head/share/man/man4/cxgbe.4 Thu Oct 8 10:00:13 2020(r366532) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 17, 2020 +.Dd October 8, 2020 .Dt CXGBE 4 .Os .Sh NAME @@ -362,6 +362,26 @@ The default value is 0 and should be changed only if P to communicate with each other. Different interfaces can be assigned different values using the dev..X.tx_vm_wr sysctl when the interface is administratively down. +.It Va hw.cxgbe.attack_filter +Set to 1 to enable the "attack filter". +Default is 0. +The attack filter will drop an incoming frame if any of these conditions is +true: src ip/ip6 == dst ip/ip6; tcp and src/dst ip is not unicast; src/dst ip is +loopback (127.x.y.z); src ip6 is not unicast; src/dst ip6 is loopback (::1/128) +or unspecified (::/128); tcp and src/dst ip6 is mcast (ff00::/8). +.It Va hw.cxgbe.drop_ip_fragments +Set to 1 to drop all incoming IP fragments. +Default is 0. +Note that this drops valid frames. +.It Va hw.cxgbe.drop_pkts_with_l2_errors +Set to 1 to drop incoming frames with Layer 2 length or checksum errors. +Default is 1. +.It Va hw.cxgbe.drop_pkts_with_l3_errors +Set to 1 to drop incoming frames with IP version, length, or checksum errors. +Default is 0. +.It Va hw.cxgbe.drop_pkts_with_l4_errors +Set to 1 to drop incoming frames with Layer 4 length, checksum, or other errors. +Default is 0. .El .Sh SUPPORT For general information and support, Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cThu Oct 8 04:00:31 2020 (r366531) +++ head/sys/dev/cxgbe/t4_main.cThu Oct 8 10:00:13 2020 (r366532) @@ -595,6 +595,46 @@ static int t4_tx_vm_wr = 0; SYSCTL_INT(_hw_cxgbe, OID_AUTO, tx_vm_wr, CTLFLAG_RWTUN, &t4_tx_vm_wr, 0, "Use VM work requests to transmit packets."); +/* + * Set to non-zero to enable the attack filter. A packet that matches any of + * these conditions will get dropped on ingress: + * 1) IP && source address == destination address. + * 2) TCP/IP && source address is not a unicast address. + * 3) TCP/IP && destination address is not a unicast address. + * 4) IP && source address is loopback (127.x.y.z). + * 5) IP && destination address is loopback (127.x.y.z). + * 6) IPv6 && source address == destination address. + * 7) IPv6 && source address is not a unicast address. + * 8) IPv6 && source address is loopback (::1/128). + * 9) IPv6 && destination address is loopback (::1/128). + * 10) IPv6 && source address is unspecified (::/128). + * 11) IPv6 && destination address is unspecified (::/128). + * 12) TCP/IPv6 && source address is multicast (ff00::/8). + * 13) TCP/IPv6 && destination address is multicast (ff00::/8). + */ +static int t4_attack_filter = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, attack_filter, CTLFLAG_RDTUN, +&t4_attack_filter, 0, "Drop suspicious traffic"); + +static int t4_drop_ip_fragments = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, drop_ip_fragments, CTLFLAG_RDTUN, +&t4_drop_ip_fragments, 0, "Drop IP fragments"); + +static int t4_drop_pkts_with_l2_errors = 1; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, drop_pkts_with_l2_errors, CTLFLAG_RDTUN, +&t4_drop_pkts_with_l2_errors, 0, +"Drop all frames with Layer 2
svn commit: r366533 - head/sys/dev/evdev
Author: hselasky Date: Thu Oct 8 10:59:49 2020 New Revision: 366533 URL: https://svnweb.freebsd.org/changeset/base/366533 Log: Allow evdev's rcpt_mask and sysmouse_t_axis parameters to be specified in /boot/loader.conf . MFC after:1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/evdev/evdev.c Modified: head/sys/dev/evdev/evdev.c == --- head/sys/dev/evdev/evdev.c Thu Oct 8 10:00:13 2020(r366532) +++ head/sys/dev/evdev/evdev.c Thu Oct 8 10:59:49 2020(r366533) @@ -77,10 +77,10 @@ int evdev_sysmouse_t_axis = 0; SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Evdev args"); #ifdef EVDEV_SUPPORT -SYSCTL_INT(_kern_evdev, OID_AUTO, rcpt_mask, CTLFLAG_RW, &evdev_rcpt_mask, 0, +SYSCTL_INT(_kern_evdev, OID_AUTO, rcpt_mask, CTLFLAG_RWTUN, &evdev_rcpt_mask, 0, "Who is receiving events: bit0 - sysmouse, bit1 - kbdmux, " "bit2 - mouse hardware, bit3 - keyboard hardware"); -SYSCTL_INT(_kern_evdev, OID_AUTO, sysmouse_t_axis, CTLFLAG_RW, +SYSCTL_INT(_kern_evdev, OID_AUTO, sysmouse_t_axis, CTLFLAG_RWTUN, &evdev_sysmouse_t_axis, 0, "Extract T-axis from 0-none, 1-ums, 2-psm"); #endif SYSCTL_NODE(_kern_evdev, OID_AUTO, input, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r366534 - head/sys/riscv/riscv
Author: trasz Date: Thu Oct 8 11:04:32 2020 New Revision: 366534 URL: https://svnweb.freebsd.org/changeset/base/366534 Log: Remove yet another useless assignment, adding a KASSERT just in case. Reviewed by: kp Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D26698 Modified: head/sys/riscv/riscv/trap.c Modified: head/sys/riscv/riscv/trap.c == --- head/sys/riscv/riscv/trap.c Thu Oct 8 10:59:49 2020(r366533) +++ head/sys/riscv/riscv/trap.c Thu Oct 8 11:04:32 2020(r366534) @@ -158,15 +158,12 @@ dump_regs(struct trapframe *frame) } static void -ecall_handler(struct trapframe *frame) +ecall_handler(void) { struct thread *td; td = curthread; - KASSERT(td->td_frame == frame, - ("%s: td_frame %p != frame %p", __func__, td->td_frame, frame)); - syscallenter(td); syscallret(td); } @@ -324,9 +321,11 @@ do_trap_user(struct trapframe *frame) struct pcb *pcb; td = curthread; - td->td_frame = frame; pcb = td->td_pcb; + KASSERT(td->td_frame == frame, + ("%s: td_frame %p != frame %p", __func__, td->td_frame, frame)); + /* Ensure we came from usermode, interrupts disabled */ KASSERT((csr_read(sstatus) & (SSTATUS_SPP | SSTATUS_SIE)) == 0, ("Came from U mode with interrupts enabled")); @@ -357,7 +356,7 @@ do_trap_user(struct trapframe *frame) break; case EXCP_USER_ECALL: frame->tf_sepc += 4;/* Next instruction */ - ecall_handler(frame); + ecall_handler(); break; case EXCP_ILLEGAL_INSTRUCTION: #ifdef FPE ___ 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: r366535 - head/sys/kern
Author: hselasky Date: Thu Oct 8 11:25:19 2020 New Revision: 366535 URL: https://svnweb.freebsd.org/changeset/base/366535 Log: The ethernet header structure is read-only. Add const keyword. (This is a diff reduction towards D26254) MFC after:1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/kern/uipc_mbufhash.c Modified: head/sys/kern/uipc_mbufhash.c == --- head/sys/kern/uipc_mbufhash.c Thu Oct 8 11:04:32 2020 (r366534) +++ head/sys/kern/uipc_mbufhash.c Thu Oct 8 11:25:19 2020 (r366535) @@ -78,7 +78,7 @@ m_ether_tcpip_hash(const uint32_t flags, const struct struct ether_vlan_header vlan; uint32_t port; } buf; - struct ether_header *eh; + const struct ether_header *eh; const struct ether_vlan_header *vlan; #ifdef INET const struct ip *ip; ___ 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: r366536 - head/sys/dev/usb
Author: hselasky Date: Thu Oct 8 11:30:22 2020 New Revision: 366536 URL: https://svnweb.freebsd.org/changeset/base/366536 Log: Try a bit harder to get the USB device descriptor in case the initial read fails. MFC after:1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/usb/usb_request.c Modified: head/sys/dev/usb/usb_request.c == --- head/sys/dev/usb/usb_request.c Thu Oct 8 11:25:19 2020 (r366535) +++ head/sys/dev/usb/usb_request.c Thu Oct 8 11:30:22 2020 (r366536) @@ -1973,9 +1973,23 @@ usbd_setup_device_desc(struct usb_device *udev, struct /* get partial device descriptor, some devices crash on this */ err = usbd_req_get_desc(udev, mtx, NULL, &udev->ddesc, USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0); - if (err != 0) - break; - + if (err != 0) { + DPRINTF("Trying fallback for getting the USB device descriptor\n"); + /* try 8 bytes bMaxPacketSize */ + udev->ddesc.bMaxPacketSize = 8; + /* get full device descriptor */ + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); + if (err == 0) + break; + /* try 16 bytes bMaxPacketSize */ + udev->ddesc.bMaxPacketSize = 16; + /* get full device descriptor */ + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); + if (err == 0) + break; + /* try 32/64 bytes bMaxPacketSize */ + udev->ddesc.bMaxPacketSize = 32; + } /* get the full device descriptor */ err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); break; ___ 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: r366537 - head/libexec/rc/rc.d
Author: kaktus Date: Thu Oct 8 11:45:10 2020 New Revision: 366537 URL: https://svnweb.freebsd.org/changeset/base/366537 Log: [pf] /etc/rc.d/pf should REQUIRE routing When a system with pf_enable="YES" in /etc/rc.conf uses hostnames in /etc/pf.conf, these hostnames cannot be resolved via external nameservers because the default route is not yet set. This results in an empty (all open) ruleset. Since r195026 already put netif back to REQUIRE, this change does not affect the issue that the firewall should rather have been setup before any network traffic can occur. PR: 211928 Submitted by: Robert Schulze Reported by: Robert Schulze Tested by:Mateusz Kwiatkowski No objections from: kp MFC after:3 days Modified: head/libexec/rc/rc.d/pf Modified: head/libexec/rc/rc.d/pf == --- head/libexec/rc/rc.d/pf Thu Oct 8 11:30:22 2020(r366536) +++ head/libexec/rc/rc.d/pf Thu Oct 8 11:45:10 2020(r366537) @@ -4,8 +4,7 @@ # # PROVIDE: pf -# REQUIRE: FILESYSTEMS netif pflog pfsync -# BEFORE: routing +# REQUIRE: FILESYSTEMS netif pflog pfsync routing # KEYWORD: nojailvnet . /etc/rc.subr ___ 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: r366538 - stable/12/usr.sbin/crunch/crunchgen
Author: kevans Date: Thu Oct 8 12:56:23 2020 New Revision: 366538 URL: https://svnweb.freebsd.org/changeset/base/366538 Log: MFC r366466: crunchgen: fix MK_AUTO_OBJ logic after r364166 r364166 converted echo -n `/bin/pwd` to a raw pwd invocation, leaving a trailing newline at the end of path. This caused a later stat() of it to erroneously fail and the fallback to MK_AUTO_OBJ=no logic proceeded as unexpected. Harry Schmalzbauer bissected the resulting build failure he experienced (stable/12 host, -HEAD build) down to r365887. This change is mostly unrelated, except it switches the build to bootstrapped crunchgen - clue! I then bissected recent crunchgen changes going back a bit since we wouldn't observe the failure immediately with -CURRENT in most configurations, which landed me on r364166. After many intense head-scratching minutes and printf debugging, I realized that the newline was the difference. This is where our tale ends. Modified: stable/12/usr.sbin/crunch/crunchgen/crunchgen.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/crunch/crunchgen/crunchgen.c == --- stable/12/usr.sbin/crunch/crunchgen/crunchgen.c Thu Oct 8 11:45:10 2020(r366537) +++ stable/12/usr.sbin/crunch/crunchgen/crunchgen.c Thu Oct 8 12:56:23 2020(r366538) @@ -666,6 +666,8 @@ fillin_program(prog_t *p) if (!*path) errx(1, "Can't perform pwd on: %s\n", p->srcdir); + /* Chop off trailing newline. */ + path[strlen(path) - 1] = '\0'; p->realsrcdir = strdup(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: r366539 - in vendor-sys/acpica/dist: . generate/release source/common source/compiler source/components/debugger source/components/disassembler source/components/events source/component...
Author: jkim Date: Thu Oct 8 16:44:28 2020 New Revision: 366539 URL: https://svnweb.freebsd.org/changeset/base/366539 Log: Import ACPICA 20200925. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/release/build.sh vendor-sys/acpica/dist/generate/release/release.sh vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/ahuuids.c vendor-sys/acpica/dist/source/common/dmtbinfo1.c vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslparseop.c vendor-sys/acpica/dist/source/compiler/aslprepkg.c vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/executer/exregion.c vendor-sys/acpica/dist/source/components/namespace/nsalloc.c vendor-sys/acpica/dist/source/components/namespace/nsarguments.c vendor-sys/acpica/dist/source/components/namespace/nsxfobj.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/utilities/utpredef.c vendor-sys/acpica/dist/source/components/utilities/utstrsuppt.c vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acexcep.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acuuid.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/os_specific/service_layers/oslinuxtbl.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c Modified: vendor-sys/acpica/dist/changes.txt == --- vendor-sys/acpica/dist/changes.txt Thu Oct 8 12:56:23 2020 (r366538) +++ vendor-sys/acpica/dist/changes.txt Thu Oct 8 16:44:28 2020 (r366539) @@ -1,6 +1,80 @@ +25 September 2020. Summary of changes for version 20200925: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Preserve memory opregion mappings. The ACPICA's strategy with respect to +the handling of memory mappings associated with memory operation regions +is to avoid mapping the entire region at once which may be problematic at +least in principle (for example, it may lead to conflicts with +overlapping mappings having different attributes created by drivers). It +may also be wasteful, because memory opregions on some systems take up +vastchunks of address space while the fields in those regions actually +accessed by AML are sparsely distributed. + +For this reason, a one-page "window" is mapped for a given opregion on +the first memory access through it and if that "window" does not cover an +address range accessed through that opregion subsequently, it is unmapped +and a new "window" is mapped to replace it. Next, if the new "window" is +not sufficient to access memory through the opregion in question in the +future, it will be replaced with yet another "window" and so on. That +may lead to a suboptimal sequence of memory mapping and unmapping +operations, for example if two fields in one opregion separated from each +other by a sufficiently wide chunk of unused address space are accessed +in an alternating pattern. + +Added support for 64 bit risc-v compilation. Useful for acpica tools and +incorporating ACPICA into the Firmware Test Suite. Colin Ian King +. + +Added support for SMBus predefined names (from SMBus Control Method +Interface Specification, Version 1.0, December 10, 1999. New predefined +names: +_SBA +_SBI +_SBR +_SBT +_SBW + +AML Disassembler: Added a new command, "All https://acpica.org/downloads @@ -94,7 +168,7 @@ would need to be updated to match the same behavior as utility and since acpiexec can already dump the entire namespace (via the 'namespace' command), we no longer have the need to maintain acpinames. -In order to dump the contents of the ACPI namepsace using acpiexec, +In order to dump the contents of the ACPI namespace using acpiexec, execute the following command from the command line: acpiexec -b "n" [aml files] @@ -17606,7 +17680,7 @@ bypass the "impli
svn commit: r366540 - vendor-sys/acpica/20200925
Author: jkim Date: Thu Oct 8 16:45:27 2020 New Revision: 366540 URL: https://svnweb.freebsd.org/changeset/base/366540 Log: Tag ACPICA 20200925. Added: vendor-sys/acpica/20200925/ - copied from r366539, vendor-sys/acpica/dist/ ___ 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: r366541 - head
Author: imp Date: Thu Oct 8 17:30:05 2020 New Revision: 366541 URL: https://svnweb.freebsd.org/changeset/base/366541 Log: Race in 32-bit fixed Use install insteald of install.sh for 32-bit builds to fight races there. Reviewed by: markj Modified: head/Makefile.libcompat Modified: head/Makefile.libcompat == --- head/Makefile.libcompat Thu Oct 8 16:45:27 2020(r366540) +++ head/Makefile.libcompat Thu Oct 8 17:30:05 2020(r366541) @@ -10,7 +10,7 @@ __<${_this:T}>__: # Yes, the flags are redundant. LIBCOMPATWMAKEENV+= \ - INSTALL="sh ${.CURDIR}/tools/install.sh" \ + INSTALL="${INSTALL_CMD} -U" \ PATH=${TMPPATH} \ SYSROOT=${LIBCOMPATTMP} \ LIBDIR=/usr/lib${libcompat} \ ___ 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: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 kern riscv/riscv sys
Author: mhorne Date: Thu Oct 8 18:02:05 2020 New Revision: 366542 URL: https://svnweb.freebsd.org/changeset/base/366542 Log: Add a routine to dump boot metadata The boot metadata (also referred to as modinfo, or preload metadata) provides information about the size and location of the kernel, pre-loaded modules, and other metadata (e.g. the EFI framebuffer) to be consumed during by the kernel during early boot. It is encoded as a series of type-length-value entries and is usually constructed by loader(8) and passed to the kernel. It is also faked on some architectures when booted by other means. Although much of the module information is available via kldstat(8), there is no easy way to debug the metadata in its entirety. Add some routines to parse this data and allow it to be printed to the console during early boot or output via a sysctl. Since the output can be lengthly, printing to the console is gated behind the debug.dump_modinfo_at_boot kenv variable as well as the BOOTVERBOSE flag. The sysctl to print the metadata is named debug.dump_modinfo. Reviewed by: tsoome Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D26687 Modified: head/sys/amd64/amd64/machdep.c head/sys/arm/arm/machdep.c head/sys/arm64/arm64/machdep.c head/sys/kern/subr_module.c head/sys/riscv/riscv/machdep.c head/sys/sys/linker.h Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Thu Oct 8 17:30:05 2020 (r366541) +++ head/sys/amd64/amd64/machdep.c Thu Oct 8 18:02:05 2020 (r366542) @@ -1853,6 +1853,15 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) if (late_console) cninit(); + /* +* Dump the boot metadata. We have to wait for cninit() since console +* output is required. If it's grossly incorrect the kernel will never +* make it this far. +*/ + if ((boothowto & RB_VERBOSE) && + getenv_is_true("debug.dump_modinfo_at_boot")) + preload_dump(); + #ifdef DEV_ISA #ifdef DEV_ATPIC elcr_probe(); Modified: head/sys/arm/arm/machdep.c == --- head/sys/arm/arm/machdep.c Thu Oct 8 17:30:05 2020(r366541) +++ head/sys/arm/arm/machdep.c Thu Oct 8 18:02:05 2020(r366542) @@ -1027,6 +1027,15 @@ initarm(struct arm_boot_params *abp) debugf(" dtbp = 0x%08x\n", (uint32_t)dtbp); arm_print_kenv(); + /* +* Dump the boot metadata. We have to wait for cninit() since console +* output is required. If it's grossly incorrect the kernel will never +* make it this far. +*/ + if ((boothowto & RB_VERBOSE) && + getenv_is_true("debug.dump_modinfo_at_boot")) + preload_dump(); + env = kern_getenv("kernelname"); if (env != NULL) { strlcpy(kernelname, env, sizeof(kernelname)); Modified: head/sys/arm64/arm64/machdep.c == --- head/sys/arm64/arm64/machdep.c Thu Oct 8 17:30:05 2020 (r366541) +++ head/sys/arm64/arm64/machdep.c Thu Oct 8 18:02:05 2020 (r366542) @@ -1242,6 +1242,15 @@ initarm(struct arm64_bootparams *abp) panic("Invalid bus configuration: %s", kern_getenv("kern.cfg.order")); + /* +* Dump the boot metadata. We have to wait for cninit() since console +* output is required. If it's grossly incorrect the kernel will never +* make it this far. +*/ + if ((boothowto & RB_VERBOSE) && + getenv_is_true("debug.dump_modinfo_at_boot")) + preload_dump(); + init_proc0(abp->kern_stack); msgbufinit(msgbufp, msgbufsize); mutex_init(); Modified: head/sys/kern/subr_module.c == --- head/sys/kern/subr_module.c Thu Oct 8 17:30:05 2020(r366541) +++ head/sys/kern/subr_module.c Thu Oct 8 18:02:05 2020(r366542) @@ -3,6 +3,8 @@ * * Copyright (c) 1998 Michael Smith * All rights reserved. + * Copyright (c) 2020 NetApp Inc. + * Copyright (c) 2020 Klara Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,7 +34,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include + #include #include @@ -304,3 +310,249 @@ preload_bootstrap_relocate(vm_offset_t offset) } } } + +/* + * Parse the modinfo type and append to the provided sbuf. + */ +static void +preload_modinfo_type(struct sbuf *sbp, int type) +{ + + if ((type & MODINFO_METAD
Re: svn commit: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 kern riscv/riscv sys
On Thu, Oct 8, 2020 at 1:02 PM Mitchell Horne wrote: > > Author: mhorne > Date: Thu Oct 8 18:02:05 2020 > New Revision: 366542 > URL: https://svnweb.freebsd.org/changeset/base/366542 > > Log: > Add a routine to dump boot metadata > > The boot metadata (also referred to as modinfo, or preload metadata) > provides information about the size and location of the kernel, > pre-loaded modules, and other metadata (e.g. the EFI framebuffer) to be > consumed during by the kernel during early boot. It is encoded as a > series of type-length-value entries and is usually constructed by > loader(8) and passed to the kernel. It is also faked on some > architectures when booted by other means. > > Although much of the module information is available via kldstat(8), > there is no easy way to debug the metadata in its entirety. Add some > routines to parse this data and allow it to be printed to the console > during early boot or output via a sysctl. > > Since the output can be lengthly, printing to the console is gated > behind the debug.dump_modinfo_at_boot kenv variable as well as the > BOOTVERBOSE flag. The sysctl to print the metadata is named > debug.dump_modinfo. > Hi, Why both a tunable and boot -v? The tunable is already specifically scoped to just this operation, it seems a little odd to double-gate it. Thanks, Kyle Evans ___ 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: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 kern riscv/riscv sys
Hi Mitchell, +static void +preload_dump_internal(struct sbuf *sbp) +{ + uint32_t *bptr, type, len; + + KASSERT(preload_metadata != NULL, + ("%s called without setting up preload_metadata", __func__)); + + /* +* Iterate through the TLV-encoded sections. +*/ + bptr = (uint32_t *)preload_metadata; + sbuf_putc(sbp, '\n'); + while (bptr[0] != MODINFO_END || bptr[0] != MODINFO_END) { The same expression is on both sides of the "||" ...? Thanks, Ravi (rpokala@) + sbuf_printf(sbp, " %p:\n", bptr); + type = *bptr++; + len = *bptr++; + + sbuf_printf(sbp, "\ttype:\t(%#04x) ", type); + preload_modinfo_type(sbp, type); + sbuf_putc(sbp, '\n'); + sbuf_printf(sbp, "\tlen:\t%u\n", len); + sbuf_cat(sbp, "\tvalue:\t"); + preload_modinfo_value(sbp, bptr, type, len); + sbuf_putc(sbp, '\n'); + + bptr += roundup(len, sizeof(u_long)) / sizeof(uint32_t); + } +} -Original Message- From: on behalf of Mitchell Horne Date: 2020-10-08, Thursday at 11:02 To: , , Subject: svn commit: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 kern riscv/riscv sys Author: mhorne Date: Thu Oct 8 18:02:05 2020 New Revision: 366542 URL: https://svnweb.freebsd.org/changeset/base/366542 Log: Add a routine to dump boot metadata The boot metadata (also referred to as modinfo, or preload metadata) provides information about the size and location of the kernel, pre-loaded modules, and other metadata (e.g. the EFI framebuffer) to be consumed during by the kernel during early boot. It is encoded as a series of type-length-value entries and is usually constructed by loader(8) and passed to the kernel. It is also faked on some architectures when booted by other means. Although much of the module information is available via kldstat(8), there is no easy way to debug the metadata in its entirety. Add some routines to parse this data and allow it to be printed to the console during early boot or output via a sysctl. Since the output can be lengthly, printing to the console is gated behind the debug.dump_modinfo_at_boot kenv variable as well as the BOOTVERBOSE flag. The sysctl to print the metadata is named debug.dump_modinfo. Reviewed by: tsoome Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision:https://reviews.freebsd.org/D26687 Modified: head/sys/amd64/amd64/machdep.c head/sys/arm/arm/machdep.c head/sys/arm64/arm64/machdep.c head/sys/kern/subr_module.c head/sys/riscv/riscv/machdep.c head/sys/sys/linker.h Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Thu Oct 8 17:30:05 2020 (r366541) +++ head/sys/amd64/amd64/machdep.c Thu Oct 8 18:02:05 2020 (r366542) @@ -1853,6 +1853,15 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) if (late_console) cninit(); + /* +* Dump the boot metadata. We have to wait for cninit() since console +* output is required. If it's grossly incorrect the kernel will never +* make it this far. +*/ + if ((boothowto & RB_VERBOSE) && + getenv_is_true("debug.dump_modinfo_at_boot")) + preload_dump(); + #ifdef DEV_ISA #ifdef DEV_ATPIC elcr_probe(); Modified: head/sys/arm/arm/machdep.c == --- head/sys/arm/arm/machdep.c Thu Oct 8 17:30:05 2020 (r366541) +++ head/sys/arm/arm/machdep.c Thu Oct 8 18:02:05 2020 (r366542) @@ -1027,6 +1027,15 @@ initarm(struct arm_boot_params *abp) debugf(" dtbp = 0x%08x\n", (uint32_t)dtbp); arm_print_kenv(); + /* +* Dump the boot metadata. We have to wait for cninit() since console +* output is required. If it's grossly incorrect the kernel will never +* make it this far. +*/ + if ((boothowto & RB_VERBOSE) && + getenv_is_true("debug.dump_modinfo_at_boot")) + preload_dump(); + env = kern_getenv("kernelname"); if (env != NULL) { strlcpy(kernelname, env, sizeof(kernelname)); Modified: head/sys/arm64/arm64/machdep.c == --- head/sys/arm64/arm64/machdep.c Thu Oct 8 17:30:05 2020 (r366541) +++ head/sys/arm64/arm64/machdep.c Thu Oct 8 18:02:05 2020 (r366542) @@ -1242,6 +1242,15 @@ initarm(struct arm64_bootpa
svn commit: r366543 - head/sys/kern
Author: mhorne Date: Thu Oct 8 18:29:17 2020 New Revision: 366543 URL: https://svnweb.freebsd.org/changeset/base/366543 Log: Fix a loop condition The correct way to identify the end of the metadata is two adjacent entries set to zero/MODINFO_END. I made a typo and this was checking the first entry twice. Reported by: rpokala Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Modified: head/sys/kern/subr_module.c Modified: head/sys/kern/subr_module.c == --- head/sys/kern/subr_module.c Thu Oct 8 18:02:05 2020(r366542) +++ head/sys/kern/subr_module.c Thu Oct 8 18:29:17 2020(r366543) @@ -496,7 +496,7 @@ preload_dump_internal(struct sbuf *sbp) */ bptr = (uint32_t *)preload_metadata; sbuf_putc(sbp, '\n'); - while (bptr[0] != MODINFO_END || bptr[0] != MODINFO_END) { + while (bptr[0] != MODINFO_END || bptr[1] != MODINFO_END) { sbuf_printf(sbp, " %p:\n", bptr); type = *bptr++; len = *bptr++; ___ 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: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 kern riscv/riscv sys
On Thu, Oct 8, 2020 at 3:19 PM Ravi Pokala wrote: > > Hi Mitchell, > > +static void > +preload_dump_internal(struct sbuf *sbp) > +{ > + uint32_t *bptr, type, len; > + > + KASSERT(preload_metadata != NULL, > + ("%s called without setting up preload_metadata", __func__)); > + > + /* > +* Iterate through the TLV-encoded sections. > +*/ > + bptr = (uint32_t *)preload_metadata; > + sbuf_putc(sbp, '\n'); > + while (bptr[0] != MODINFO_END || bptr[0] != MODINFO_END) { > > The same expression is on both sides of the "||" ...? > > Thanks, > > Ravi (rpokala@) Thank you for catching this --- it should be checking bptr[0] and bptr[1]. Fixed in r366543. Mitchell > > + sbuf_printf(sbp, " %p:\n", bptr); > + type = *bptr++; > + len = *bptr++; > + > + sbuf_printf(sbp, "\ttype:\t(%#04x) ", type); > + preload_modinfo_type(sbp, type); > + sbuf_putc(sbp, '\n'); > + sbuf_printf(sbp, "\tlen:\t%u\n", len); > + sbuf_cat(sbp, "\tvalue:\t"); > + preload_modinfo_value(sbp, bptr, type, len); > + sbuf_putc(sbp, '\n'); > + > + bptr += roundup(len, sizeof(u_long)) / sizeof(uint32_t); > + } > +} > > > > > -Original Message- > From: on behalf of Mitchell Horne > > Date: 2020-10-08, Thursday at 11:02 > To: , , > > Subject: svn commit: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 > kern riscv/riscv sys > > Author: mhorne > Date: Thu Oct 8 18:02:05 2020 > New Revision: 366542 > URL: https://svnweb.freebsd.org/changeset/base/366542 > > Log: > Add a routine to dump boot metadata > > The boot metadata (also referred to as modinfo, or preload metadata) > provides information about the size and location of the kernel, > pre-loaded modules, and other metadata (e.g. the EFI framebuffer) to be > consumed during by the kernel during early boot. It is encoded as a > series of type-length-value entries and is usually constructed by > loader(8) and passed to the kernel. It is also faked on some > architectures when booted by other means. > > Although much of the module information is available via kldstat(8), > there is no easy way to debug the metadata in its entirety. Add some > routines to parse this data and allow it to be printed to the console > during early boot or output via a sysctl. > > Since the output can be lengthly, printing to the console is gated > behind the debug.dump_modinfo_at_boot kenv variable as well as the > BOOTVERBOSE flag. The sysctl to print the metadata is named > debug.dump_modinfo. > > Reviewed by: tsoome > Sponsored by: NetApp, Inc. > Sponsored by: Klara, Inc. > Differential Revision:https://reviews.freebsd.org/D26687 > > Modified: > head/sys/amd64/amd64/machdep.c > head/sys/arm/arm/machdep.c > head/sys/arm64/arm64/machdep.c > head/sys/kern/subr_module.c > head/sys/riscv/riscv/machdep.c > head/sys/sys/linker.h > > Modified: head/sys/amd64/amd64/machdep.c > > == > --- head/sys/amd64/amd64/machdep.c Thu Oct 8 17:30:05 2020 > (r366541) > +++ head/sys/amd64/amd64/machdep.c Thu Oct 8 18:02:05 2020 > (r366542) > @@ -1853,6 +1853,15 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) > if (late_console) > cninit(); > > + /* > +* Dump the boot metadata. We have to wait for cninit() since console > +* output is required. If it's grossly incorrect the kernel will never > +* make it this far. > +*/ > + if ((boothowto & RB_VERBOSE) && > + getenv_is_true("debug.dump_modinfo_at_boot")) > + preload_dump(); > + > #ifdef DEV_ISA > #ifdef DEV_ATPIC > elcr_probe(); > > Modified: head/sys/arm/arm/machdep.c > > == > --- head/sys/arm/arm/machdep.c Thu Oct 8 17:30:05 2020 > (r366541) > +++ head/sys/arm/arm/machdep.c Thu Oct 8 18:02:05 2020 > (r366542) > @@ -1027,6 +1027,15 @@ initarm(struct arm_boot_params *abp) > debugf(" dtbp = 0x%08x\n", (uint32_t)dtbp); > arm_print_kenv(); > > + /* > +* Dump the boot metadata. We have to wait for cninit() since console > +* output is required. If it's grossly incorrect the kernel will never > +* make it this far. > +*/ > + if ((boothowto & RB_VERBOSE) && > + getenv_is_true("debug.dump_modinfo_at_boot")) > + preload_dump(); > + > env = kern_getenv("kernelname"); > if (env != NULL) { >
Re: svn commit: r366543 - head/sys/kern
-Original Message- From: on behalf of Mitchell Horne Date: 2020-10-08, Thursday at 11:29 To: , , Subject: svn commit: r366543 - head/sys/kern Author: mhorne Date: Thu Oct 8 18:29:17 2020 New Revision: 366543 URL: https://svnweb.freebsd.org/changeset/base/366543 Log: Fix a loop condition The correct way to identify the end of the metadata is two adjacent entries set to zero/MODINFO_END. I made a typo and this was checking the first entry twice. Reported by: rpokala Thanks! :-) Ravi (rpokala@) Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Modified: head/sys/kern/subr_module.c Modified: head/sys/kern/subr_module.c == --- head/sys/kern/subr_module.c Thu Oct 8 18:02:05 2020 (r366542) +++ head/sys/kern/subr_module.c Thu Oct 8 18:29:17 2020 (r366543) @@ -496,7 +496,7 @@ preload_dump_internal(struct sbuf *sbp) */ bptr = (uint32_t *)preload_metadata; sbuf_putc(sbp, '\n'); - while (bptr[0] != MODINFO_END || bptr[0] != MODINFO_END) { + while (bptr[0] != MODINFO_END || bptr[1] != MODINFO_END) { sbuf_printf(sbp, " %p:\n", bptr); type = *bptr++; len = *bptr++; ___ 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: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 kern riscv/riscv sys
On Thu, Oct 8, 2020 at 3:15 PM Kyle Evans wrote: > > On Thu, Oct 8, 2020 at 1:02 PM Mitchell Horne wrote: > > > > Author: mhorne > > Date: Thu Oct 8 18:02:05 2020 > > New Revision: 366542 > > URL: https://svnweb.freebsd.org/changeset/base/366542 > > > > Log: > > Add a routine to dump boot metadata > > > > The boot metadata (also referred to as modinfo, or preload metadata) > > provides information about the size and location of the kernel, > > pre-loaded modules, and other metadata (e.g. the EFI framebuffer) to be > > consumed during by the kernel during early boot. It is encoded as a > > series of type-length-value entries and is usually constructed by > > loader(8) and passed to the kernel. It is also faked on some > > architectures when booted by other means. > > > > Although much of the module information is available via kldstat(8), > > there is no easy way to debug the metadata in its entirety. Add some > > routines to parse this data and allow it to be printed to the console > > during early boot or output via a sysctl. > > > > Since the output can be lengthly, printing to the console is gated > > behind the debug.dump_modinfo_at_boot kenv variable as well as the > > BOOTVERBOSE flag. The sysctl to print the metadata is named > > debug.dump_modinfo. > > > > Hi, > > Why both a tunable and boot -v? The tunable is already specifically > scoped to just this operation, it seems a little odd to double-gate > it. > Hey Kyle, The original patch was gated behind just boot -v. In testing I realized this change is potentially quite noisy (even by bootverbose standards), so I added the tunable to make it opt-in. The thinking is that you could set debug.dump_modinfo_at_boot=1 once in loader.conf and forget it, as you wouldn't see the preload_dump() output on a normal boot. Thinking about it again, this might be overly complicated for what is at best a niche debugging feature. If gating it behind just the tunable is more in line with how other things work then I'm happy to change it. Mitchell > Thanks, > > Kyle Evans ___ 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: r366544 - in head/sys/modules: . apm
Author: imp Date: Thu Oct 8 20:55:55 2020 New Revision: 366544 URL: https://svnweb.freebsd.org/changeset/base/366544 Log: Remove apm module The apm code is about to be removed. Remove the module since it's about to be useless. Deleted: head/sys/modules/apm/Makefile Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Thu Oct 8 18:29:17 2020(r366543) +++ head/sys/modules/Makefile Thu Oct 8 20:55:55 2020(r366544) @@ -41,7 +41,6 @@ SUBDIR= \ amr \ ${_an} \ ${_aout} \ - ${_apm} \ ${_arcmsr} \ ${_allwinner} \ ${_armv8crypto} \ @@ -744,7 +743,6 @@ _vmm= vmm # XXX some of these can move now, but are untested on other architectures. _3dfx= 3dfx _3dfx_linux= 3dfx_linux -_apm= apm .if ${MK_SOURCELESS_HOST} != "no" _ce= ce .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: r366547 - in head/sys: i386/include x86/isa
Author: imp Date: Thu Oct 8 20:56:11 2020 New Revision: 366547 URL: https://svnweb.freebsd.org/changeset/base/366547 Log: timer_restore is now unused, remove it apm was the only consumer of timer_restore. Now that it's gone, this can be removed. Modified: head/sys/i386/include/clock.h head/sys/x86/isa/clock.c Modified: head/sys/i386/include/clock.h == --- head/sys/i386/include/clock.h Thu Oct 8 20:56:06 2020 (r366546) +++ head/sys/i386/include/clock.h Thu Oct 8 20:56:11 2020 (r366547) @@ -30,7 +30,6 @@ void clock_init(void); */ void startrtclock(void); -void timer_restore(void); void init_TSC(void); void resume_TSC(void); Modified: head/sys/x86/isa/clock.c == --- head/sys/x86/isa/clock.cThu Oct 8 20:56:06 2020(r366546) +++ head/sys/x86/isa/clock.cThu Oct 8 20:56:11 2020(r366547) @@ -388,26 +388,6 @@ i8254_restore(void) set_i8254_freq(MODE_STOP, 0); } -#ifndef __amd64__ -/* - * Restore all the timers non-atomically (XXX: should be atomically). - * - * This function is called from pmtimer_resume() to restore all the timers. - * This should not be necessary, but there are broken laptops that do not - * restore all the timers on resume. The APM spec was at best vague on the - * subject. - * pmtimer is used only with the old APM power management, and not with - * acpi, which is required for amd64, so skip it in that case. - */ -void -timer_restore(void) -{ - - i8254_restore();/* restore i8254_freq and hz */ - atrtc_restore();/* reenable RTC interrupts */ -} -#endif - /* This is separate from startrtclock() so that it can be called early. */ void i8254_init(void) ___ 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: r366545 - in head/sys: conf i386/conf modules/syscons modules/syscons/apm
Author: imp Date: Thu Oct 8 20:56:00 2020 New Revision: 366545 URL: https://svnweb.freebsd.org/changeset/base/366545 Log: Remove apm screen saver. APM BIOS support is about to be removed. Remove the apm screen saver and its module. They are about to be irrelevant. Deleted: head/sys/modules/syscons/apm/Makefile Modified: head/sys/conf/files.i386 head/sys/i386/conf/NOTES head/sys/modules/syscons/Makefile Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Thu Oct 8 20:55:55 2020(r366544) +++ head/sys/conf/files.i386Thu Oct 8 20:56:00 2020(r366545) @@ -119,7 +119,6 @@ dev/sbni/if_sbni_isa.c optional sbni isa dev/sbni/if_sbni_pci.c optional sbni pci dev/speaker/spkr.c optional speaker dev/superio/superio.c optional superio isa -dev/syscons/apm/apm_saver.coptional apm_saver apm dev/syscons/scvesactl.coptional sc vga vesa dev/syscons/scvgarndr.coptional sc vga dev/tpm/tpm.c optional tpm Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESThu Oct 8 20:55:55 2020(r366544) +++ head/sys/i386/conf/NOTESThu Oct 8 20:56:00 2020(r366545) @@ -275,7 +275,6 @@ device nvram # Access to rtc cmos via /dev/nvram device speaker #Play IBM BASIC-style noises out your speaker envvar hint.speaker.0.at="isa" envvar hint.speaker.0.port="0x61" -device apm_saver # Requires APM # Modified: head/sys/modules/syscons/Makefile == --- head/sys/modules/syscons/Makefile Thu Oct 8 20:55:55 2020 (r366544) +++ head/sys/modules/syscons/Makefile Thu Oct 8 20:56:00 2020 (r366545) @@ -1,7 +1,6 @@ # $FreeBSD$ -SUBDIR=${_apm} \ - beastie \ +SUBDIR= beastie \ blank \ daemon \ dragon \ @@ -14,9 +13,5 @@ SUBDIR= ${_apm} \ snake \ star \ warp - -.if ${MACHINE_CPUARCH} == "i386" -_apm= apm -.endif .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: r366546 - in head/sys: conf dev/syscons/apm i386/bios i386/conf
Author: imp Date: Thu Oct 8 20:56:06 2020 New Revision: 366546 URL: https://svnweb.freebsd.org/changeset/base/366546 Log: Remove APM BIOS support APM BIOS was relevant only to early laptops (approximately P166 or P200 and slower). These have not been relevant for a long time, and this code has been untested for a long time (as far as I can tell). The APM compat code in ACPI and the apm(8) command is not being retired. Both of these items are still in use (apm(8) is more scriptable than the replacement acpiconf, for the most part). This has been commented out of i386 GENERIC since 2002. This code is not relevant to any other port. Discussed on: arch@ Deleted: head/sys/dev/syscons/apm/apm_saver.c head/sys/i386/bios/apm.c head/sys/i386/bios/apm.h Modified: head/sys/conf/files.i386 head/sys/i386/conf/GENERIC head/sys/i386/conf/NOTES Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Thu Oct 8 20:56:00 2020(r366545) +++ head/sys/conf/files.i386Thu Oct 8 20:56:06 2020(r366546) @@ -162,7 +162,6 @@ acpi_wakedata.h optional acpi \ no-obj no-implicit-rule before-depend \ clean "acpi_wakedata.h" # -i386/bios/apm.coptional apm i386/bios/smapi.c optional smapi i386/bios/smapi_bios.S optional smapi i386/cloudabi32/cloudabi32_sysvec.coptional compat_cloudabi32 Modified: head/sys/i386/conf/GENERIC == --- head/sys/i386/conf/GENERIC Thu Oct 8 20:56:00 2020(r366545) +++ head/sys/i386/conf/GENERIC Thu Oct 8 20:56:06 2020(r366546) @@ -198,9 +198,6 @@ device vt_vga device agp # support several AGP chipsets -# Power management support (see NOTES for more options) -#deviceapm - # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support device cbb # cardbus (yenta) bridge Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESThu Oct 8 20:56:00 2020(r366545) +++ head/sys/i386/conf/NOTESThu Oct 8 20:56:06 2020(r366546) @@ -729,7 +729,6 @@ device hyperv # HyperV drivers # # Miscellaneous hardware: # -# apm: Laptop Advanced Power Management (experimental) # ipmi: Intelligent Platform Management Interface # smapi: System Management Application Program Interface driver # smbios: DMI/SMBIOS entry point @@ -739,10 +738,6 @@ device hyperv # HyperV drivers # si: Specialix International SI/XIO or SX intelligent serial card driver # tpm: Trusted Platform Module -# Notes on APM -# The flags takes the following meaning for apm0: -#0x0020 Statclock is broken. - # Notes on the Specialix SI/XIO driver: # The host card is memory, not IO mapped. # The Rev 1 host cards use a 64K chunk, on a 32K boundary. @@ -761,8 +756,6 @@ device hyperv # HyperV drivers # is the only thing truly supported, but apparently a fair percentage # of the Vaio extra features are controlled by this device. -device apm -envvar hint.apm.0.flags="0x20" device ipmi device smapi device smbios ___ 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: r366548 - head/sys/powerpc/powerpc
Author: alfredo Date: Thu Oct 8 22:00:31 2020 New Revision: 366548 URL: https://svnweb.freebsd.org/changeset/base/366548 Log: [PowerPC] add machdep.uprintf_signal sysctl Add support for sysctl 'machdep.uprintf_signal' that prints debugging information on trap signal. Reviewed by: jhibbits, luporl, bdragon Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision:https://reviews.freebsd.org/D26004 Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c == --- head/sys/powerpc/powerpc/trap.c Thu Oct 8 20:56:11 2020 (r366547) +++ head/sys/powerpc/powerpc/trap.c Thu Oct 8 22:00:31 2020 (r366548) @@ -153,6 +153,11 @@ static struct powerpc_exception powerpc_exceptions[] = { EXC_LAST, NULL } }; +static int uprintf_signal; +SYSCTL_INT(_machdep, OID_AUTO, uprintf_signal, CTLFLAG_RWTUN, +&uprintf_signal, 0, +"Print debugging information on trap signal to ctty"); + #define ESR_BITMASK\ "\20" \ "\040b0\037b1\036b2\035b3\034PIL\033PRR\032PTR\031FP" \ @@ -489,6 +494,14 @@ trap(struct trapframe *frame) ksi.ksi_code = (int) ucode; /* XXX, not POSIX */ ksi.ksi_addr = (void *)addr; ksi.ksi_trapno = type; + if (uprintf_signal) { + uprintf("pid %d comm %s: signal %d code %d type %d " + "addr 0x%lx r1 0x%lx srr0 0x%lx srr1 0x%lx\n", + p->p_pid, p->p_comm, sig, ucode, type, + (u_long)addr, (u_long)frame->fixreg[1], + (u_long)frame->srr0, (u_long)frame->srr1); + } + trapsignal(td, &ksi); } ___ 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: r366549 - head/sys/kern
Author: kib Date: Thu Oct 8 22:31:11 2020 New Revision: 366549 URL: https://svnweb.freebsd.org/changeset/base/366549 Log: Do not allow to use O_BENEATH as an oracle. Specifically, if lookup() returned any error and the topping directory was not latched, which means that (non-existent) path did not returned to the topping location, give ENOTCAPABLE a priority over the lookup() error. PR: 249960 Reviewed by: emaste, ngie Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D26695 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c == --- head/sys/kern/vfs_lookup.c Thu Oct 8 22:00:31 2020(r366548) +++ head/sys/kern/vfs_lookup.c Thu Oct 8 22:31:11 2020(r366549) @@ -595,8 +595,17 @@ namei(struct nameidata *ndp) for (;;) { ndp->ni_startdir = dp; error = lookup(ndp); - if (error != 0) + if (error != 0) { + /* +* Override an error to not allow user to use +* BENEATH as an oracle. +*/ + if ((ndp->ni_lcf & (NI_LCF_LATCH | + NI_LCF_BENEATH_LATCHED)) == NI_LCF_LATCH) + error = ENOTCAPABLE; goto out; + } + /* * If not a symbolic link, we're done. */ ___ 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: r366550 - head/sys/kern
Author: kib Date: Thu Oct 8 22:34:34 2020 New Revision: 366550 URL: https://svnweb.freebsd.org/changeset/base/366550 Log: sig_intr(9): return early if AST is not scheduled. Check td_flags for relevant AST requests lock-less. This opens the race slightly wider where sig_intr() returns false negative, but might be it is worth it. Requested by: mjg Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c == --- head/sys/kern/kern_sig.cThu Oct 8 22:31:11 2020(r366549) +++ head/sys/kern/kern_sig.cThu Oct 8 22:34:34 2020(r366550) @@ -3212,6 +3212,9 @@ sig_intr(void) int ret; td = curthread; + if ((td->td_flags & (TDF_NEEDSIGCHK | TDF_NEEDSUSPCHK)) == 0) + return (0); + p = td->td_proc; PROC_LOCK(p); ___ 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: r366551 - head/sys/ufs/ffs
Author: kib Date: Thu Oct 8 22:41:02 2020 New Revision: 366551 URL: https://svnweb.freebsd.org/changeset/base/366551 Log: Do not leak B_BARRIER. Normally when a buffer with B_BARRIER is written, the flag is cleared by g_vfs_strategy() when creating bio. But in some cases FFS buffer might not reach g_vfs_strategy(), for instance when copy-on-write reports an error like ENOSPC. In this case buffer is returned to dirty queue and might be written later by other means. Among then bdwrite() reasonably asserts that B_BARRIER is not set. In fact, the only current use of B_BARRIER is for lazy inode block initialization, where write of the new inode block is fenced against cylinder group write to mark inode as used. The situation could be seen that we break dependency by updating cg without written out inode. Practically since CoW was not able to find space for a copy of inode block, for the same reason cg group block write should fail. Reported by: pho Discussed with: chs, imp, mckusick Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D26511 Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c == --- head/sys/ufs/ffs/ffs_vfsops.c Thu Oct 8 22:34:34 2020 (r366550) +++ head/sys/ufs/ffs/ffs_vfsops.c Thu Oct 8 22:41:02 2020 (r366551) @@ -2582,6 +2582,7 @@ ffs_geom_strategy(struct bufobj *bo, struct buf *bp) error != EOPNOTSUPP) { bp->b_error = error; bp->b_ioflags |= BIO_ERROR; + bp->b_flags &= ~B_BARRIER; bufdone(bp); return; } @@ -2594,6 +2595,7 @@ ffs_geom_strategy(struct bufobj *bo, struct buf *bp) if (error != 0 && error != EOPNOTSUPP) { bp->b_error = error; bp->b_ioflags |= BIO_ERROR; + bp->b_flags &= ~B_BARRIER; bufdone(bp); return; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r366552 - head/sys/vm
Author: kib Date: Thu Oct 8 22:46:15 2020 New Revision: 366552 URL: https://svnweb.freebsd.org/changeset/base/366552 Log: vm_page_dump_index_to_pa(): Add braces to the expression involving + and &. The precedence of the '&' operator is less than of '+'. Added braces do change the order of evaluation into the natural one, in my opinion. On the other hand, the value of the expression should not change since all elements should have page-aligned values. This fixes a gcc warning reported. Reported by: adrian Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h == --- head/sys/vm/vm_page.h Thu Oct 8 22:41:02 2020(r366551) +++ head/sys/vm/vm_page.h Thu Oct 8 22:46:15 2020(r366552) @@ -639,7 +639,7 @@ vm_page_dump_index_to_pa(int bit) dump_avail[i] / PAGE_SIZE; if (bit < tot) return ((vm_paddr_t)bit * PAGE_SIZE + - dump_avail[i] & ~PAGE_MASK); + (dump_avail[i] & ~PAGE_MASK)); bit -= tot; } return ((vm_paddr_t)NULL); ___ 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: r366553 - releng/12.2/sys/conf
Author: gjb Date: Thu Oct 8 23:59:58 2020 New Revision: 366553 URL: https://svnweb.freebsd.org/changeset/base/366553 Log: Update releng/12.2 to RC2 as part of the 12.2-RELEASE cycle. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: releng/12.2/sys/conf/newvers.sh Modified: releng/12.2/sys/conf/newvers.sh == --- releng/12.2/sys/conf/newvers.sh Thu Oct 8 22:46:15 2020 (r366552) +++ releng/12.2/sys/conf/newvers.sh Thu Oct 8 23:59:58 2020 (r366553) @@ -49,7 +49,7 @@ TYPE="FreeBSD" REVISION="12.2" -BRANCH="RC1" +BRANCH="RC2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r366554 - head/usr.sbin/bsdinstall/scripts
Author: imp Date: Fri Oct 9 00:16:26 2020 New Revision: 366554 URL: https://svnweb.freebsd.org/changeset/base/366554 Log: Initial support for implementing the bootXXX.efi workaround Too many version of UEFI firmware (so far only confirmed on amd64) don't really support efibootmgr selection of boot. That's the most reliable, when it works, since there's no guesswork. However, many do not save, unmolested, the variables that efibootmgr sets, so as a fallback we also install loader.efi as bootXXX.efi (where XXX is either aa64 or x64) if it doesn't already exist in /efi/boot on the ESP. The standard only defines this for removable devices, but it's almost ubiquitously used as a fallback. Many BIOSes implement a drive selection feature that takes over the efibootmgr protocol, rendinering it useless (either generally, or for those vendors not on the short list). bootxxx.efi works around this. However, we don't install it unconditionally there, as that breaks some popular multi-boot setups. MFC After: 1 week Differential Revision: https://reviews.freebsd.org/D26428 Modified: head/usr.sbin/bsdinstall/scripts/bootconfig Modified: head/usr.sbin/bsdinstall/scripts/bootconfig == --- head/usr.sbin/bsdinstall/scripts/bootconfig Thu Oct 8 23:59:58 2020 (r366553) +++ head/usr.sbin/bsdinstall/scripts/bootconfig Fri Oct 9 00:16:26 2020 (r366554) @@ -124,6 +124,15 @@ if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" done fi + case $(uname -m) in + arm64) ARCHBOOTNAME=aa64 ;; + amd64) ARCHBOOTNAME=x64 ;; +# arm)ARCHBOOTNAME=arm ;; # No other support for arm install +# i386) ARCHBOOTNAME=ia32 ;; # no support for this in i386 kernels, rare machines + *) die "Unsupported arch $(uname -m) for UEFI install" + esac + BOOTNAME="/EFI/BOOT/BOOT${ARCHBOOTNAME}.EFI" + for esp in $ESPS; do f_dprintf "Formatting /dev/${esp} as FAT32" newfs_msdos -F 32 -c 1 -L EFISYS "/dev/$esp" > /dev/null 2>&1 @@ -141,6 +150,21 @@ if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" f_dprintf "Installing loader.efi onto ESP" mkdir -p "$mntpt/EFI/freebsd" cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/EFI/freebsd/loader.efi" + + # + # The following shouldn't be necessary. UEFI defines a way to + # specifically select what to boot (which we do via + # efibootmgr). However, virtual environments often times lack + # support for the NV variables efibootmgr sets. In addition, + # some UEFI implementations have features that interfere with + # the setting of these variables. To combat that, we install the + # default removable media boot file as a fallback if it doesn't + # exist. We don't install it all the time since that can + # interfere with other installations on the drive (like rEFInd). + # + if [ ! -f "${mntpt}/${BOOTNAME}" ]; then + cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${BOOTNAME}" + fi if [ "$num_esps" -gt 1 ]; then bootlabel="FreeBSD (${esp})" ___ 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: r366556 - head
Author: imp Date: Fri Oct 9 00:27:45 2020 New Revision: 366556 URL: https://svnweb.freebsd.org/changeset/base/366556 Log: Stop ignoring makeLINT generated files We're going to check these files in shortly since we don't need to generate them anymore. Generated files cause issues for different work flows anyway. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D26540 Modified: head/.gitignore Modified: head/.gitignore == --- head/.gitignore Fri Oct 9 00:27:40 2020(r366555) +++ head/.gitignore Fri Oct 9 00:27:45 2020(r366556) @@ -17,19 +17,3 @@ GTAGS ID cscope.out ?cscope.out -# Ignore LINT generated configs. -/sys/amd64/conf/LINT -/sys/amd64/conf/LINT-NOINET -/sys/amd64/conf/LINT-NOINET6 -/sys/amd64/conf/LINT-NOIP -/sys/arm/conf/LINT -/sys/arm/conf/LINT-V5 -/sys/arm/conf/LINT-V7 -/sys/arm64/conf/LINT -/sys/i386/conf/LINT -/sys/i386/conf/LINT-NOINET -/sys/i386/conf/LINT-NOINET6 -/sys/i386/conf/LINT-NOIP -/sys/powerpc/conf/LINT -/sys/powerpc/conf/LINT64 -/sys/sparc64/conf/LINT ___ 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: r366555 - head
Author: imp Date: Fri Oct 9 00:27:40 2020 New Revision: 366555 URL: https://svnweb.freebsd.org/changeset/base/366555 Log: Eliminate building LINT makefiles LINT config files are about to be checked in directly. Eliminate building them by hand here from NOTES files. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D26540 Modified: head/Makefile Modified: head/Makefile == --- head/Makefile Fri Oct 9 00:16:26 2020(r366554) +++ head/Makefile Fri Oct 9 00:27:40 2020(r366555) @@ -682,13 +682,6 @@ universe_${target}_${target_arch}: universe_${target}_ universe_${target}_done: universe_${target}_kernels .PHONY universe_${target}_kernels: universe_${target}_worlds .PHONY universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY - @if [ -e "${KERNSRCDIR}/${target}/conf/NOTES" ]; then \ - (cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \ - ${SUB_MAKE} LINT \ - > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ - (echo "${target} 'make LINT' failed," \ - "check _.${target}.makeLINT for details"| ${MAKEFAIL})); \ - fi @cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \ universe_kernels .endif # ${__DO_KERNELS} == "yes" @@ -760,9 +753,6 @@ universe_epilogue: .PHONY fi .endif .endif - -buildLINT: .PHONY - ${MAKE} -C ${.CURDIR}/sys/${_TARGET}/conf LINT .if defined(.PARSEDIR) # This makefile does not run in meta mode ___ 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: r366557 - head/sys/kern
Author: rmacklem Date: Fri Oct 9 01:04:28 2020 New Revision: 366557 URL: https://svnweb.freebsd.org/changeset/base/366557 Log: Make vn_generic_copy_file_range() interruptible via a signal. Without this patch, when vn_generic_copy_file_range() is doing a large copy, it will remain in the function for a considerable amount of time, delaying handling of any outstanding signals until the copy completes. This patch adds checks for signals that need to be processed after each successful data copy cycle. When sig_intr() returns non-zero, vn_generic_copy_file_range() will return. The check "if (len < savlen)" ensures that some data has been copied, so that progress will be made. Note that, since copy_file_range(2) is allowed to return fewer bytes copied than requested, it will never return EINTR/ERESTART when sig_intr() returns non-zero. Reviewed by: kib, asomers Differential Revision:https://reviews.freebsd.org/D26620 Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c == --- head/sys/kern/vfs_vnops.c Fri Oct 9 00:27:45 2020(r366556) +++ head/sys/kern/vfs_vnops.c Fri Oct 9 01:04:28 2020(r366557) @@ -3017,7 +3017,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t * struct uio io; off_t startoff, endoff, xfer, xfer2; u_long blksize; - int error; + int error, interrupted; bool cantseek, readzeros, eof, lastblock; ssize_t aresid; size_t copylen, len, rem, savlen; @@ -3027,6 +3027,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t * holein = holeout = 0; savlen = len = *lenp; error = 0; + interrupted = 0; dat = NULL; error = vn_lock(invp, LK_SHARED); @@ -3116,7 +3117,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t * * support holes on the server, but do not support FIOSEEKHOLE. */ eof = false; - while (len > 0 && error == 0 && !eof) { + while (len > 0 && error == 0 && !eof && interrupted == 0) { endoff = 0; /* To shut up compilers. */ cantseek = true; startoff = *inoffp; @@ -3177,6 +3178,8 @@ vn_generic_copy_file_range(struct vnode *invp, off_t * *inoffp += xfer; *outoffp += xfer; len -= xfer; + if (len < savlen) + interrupted = sig_intr(); } } copylen = MIN(len, endoff - startoff); @@ -3198,7 +3201,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t * xfer -= (*inoffp % blksize); } /* Loop copying the data block. */ - while (copylen > 0 && error == 0 && !eof) { + while (copylen > 0 && error == 0 && !eof && interrupted == 0) { if (copylen < xfer) xfer = copylen; error = vn_lock(invp, LK_SHARED); @@ -3239,6 +3242,8 @@ vn_generic_copy_file_range(struct vnode *invp, off_t * *outoffp += xfer; copylen -= xfer; len -= xfer; + if (len < savlen) + interrupted = sig_intr(); } } xfer = blksize; ___ 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: r366558 - in head/sys: amd64/conf arm/conf arm64/conf i386/conf mips/conf powerpc/conf
Author: kevans Date: Fri Oct 9 01:37:17 2020 New Revision: 366558 URL: https://svnweb.freebsd.org/changeset/base/366558 Log: sys/*/conf: drop the svn:ignore We're going to commit the LINT. Modified: Directory Properties: head/sys/amd64/conf/ (props changed) head/sys/arm/conf/ (props changed) head/sys/arm64/conf/ (props changed) head/sys/i386/conf/ (props changed) head/sys/mips/conf/ (props changed) head/sys/powerpc/conf/ (props changed) ___ 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: r366560 - head/sys/conf
Author: imp Date: Fri Oct 9 01:48:21 2020 New Revision: 366560 URL: https://svnweb.freebsd.org/changeset/base/366560 Log: Remove now-unused files makeLINT.mk isn't needed or used anymore, remove it and all the files it uses. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D26540 Deleted: head/sys/conf/makeLINT.mk head/sys/conf/makeLINT.sed ___ 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: r366559 - in head: . sys/amd64/conf sys/arm/conf sys/arm64/conf sys/i386/conf sys/powerpc/conf
Author: imp Date: Fri Oct 9 01:48:14 2020 New Revision: 366559 URL: https://svnweb.freebsd.org/changeset/base/366559 Log: Create in-tree LINT files Now that config(8) has supported include for 19 years, transition to including the NOTES files. include support didn't exist at the time, nor did the envvar stuff recently added. Now that it does, eliminate the building of LINT files by just including everything you need. Note: This may cause conflicts with updating in some cases. find sys -name LINT\* -rm is suggested across this commit to remove the generated LINT files. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D26540 Added: head/sys/amd64/conf/LINT (contents, props changed) head/sys/amd64/conf/LINT-NOINET (contents, props changed) head/sys/amd64/conf/LINT-NOINET6 (contents, props changed) head/sys/amd64/conf/LINT-NOIP (contents, props changed) head/sys/arm/conf/LINT (contents, props changed) head/sys/arm64/conf/LINT (contents, props changed) head/sys/i386/conf/LINT (contents, props changed) head/sys/i386/conf/LINT-NOINET (contents, props changed) head/sys/i386/conf/LINT-NOINET6 (contents, props changed) head/sys/i386/conf/LINT-NOIP (contents, props changed) head/sys/powerpc/conf/LINT (contents, props changed) head/sys/powerpc/conf/LINT64 (contents, props changed) Deleted: head/sys/amd64/conf/Makefile head/sys/arm/conf/Makefile head/sys/arm64/conf/Makefile head/sys/i386/conf/Makefile head/sys/powerpc/conf/Makefile Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Fri Oct 9 01:37:17 2020(r366558) +++ head/UPDATING Fri Oct 9 01:48:14 2020(r366559) @@ -26,6 +26,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20200923: + LINT files are no longer generated. We now include the relevant NOTES + files. Note: This may cause conflicts with updating in some cases. + find sys -name LINT\* -rm + is suggested across this commit to remove the generated LINT files. + + If you have tried to update with generated files there, the svn + command you want to un-auger the tree is + cd sys/amd64/conf + svn revert -R . + and then do the above find from the top level. Substitute 'amd64' + above with where the error message indicates a conflict. + 20200824: OpenZFS support has been integrated. Do not upgrade root pools until the loader is updated to support zstd. Furthermore, we caution against Added: head/sys/amd64/conf/LINT == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/conf/LINTFri Oct 9 01:48:14 2020(r366559) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +include "../../conf/NOTES" +include "../../x86/conf/NOTES" +include NOTES Added: head/sys/amd64/conf/LINT-NOINET == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/conf/LINT-NOINET Fri Oct 9 01:48:14 2020 (r366559) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +include LINT +ident LINT-NOINET +makeoptions MKMODULESENV+="WITHOUT_INET_SUPPORT=" +nooptions INET +nodevice gre +nodevice netmap Added: head/sys/amd64/conf/LINT-NOINET6 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/conf/LINT-NOINET6Fri Oct 9 01:48:14 2020 (r366559) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +include LINT +ident LINT-NOINET6 +makeoptions MKMODULESENV+="WITHOUT_INET6_SUPPORT=" +nooptions INET6 Added: head/sys/amd64/conf/LINT-NOIP == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/conf/LINT-NOIP Fri Oct 9 01:48:14 2020 (r366559) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +include LINT +ident LINT-NOIP +makeoptions MKMODULESENV+="WITHOUT_INET_SUPPORT=" +makeoptions MKMODULESENV+="WITHOUT_INET6_SUPPORT=" +nooptions INET +nooptions INET6 +nodevice age +nodevice alc +nodevice ale +nodevice bxe +nodevice em +nodevice fxp +nodevice jme +nodevice msk +nodevice mxge +nodevice sge +nodevice sk +nodevice txp +nodevice netmap Added: head/sys/arm/conf/LINT == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/LINT Fri Oct 9 01:48:14 2020(r366559) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +include "../../conf/NOTES" +in
Re: svn commit: r366537 - head/libexec/rc/rc.d
> Author: kaktus > Date: Thu Oct 8 11:45:10 2020 > New Revision: 366537 > URL: https://svnweb.freebsd.org/changeset/base/366537 > > Log: > [pf] /etc/rc.d/pf should REQUIRE routing > > When a system with pf_enable="YES" in /etc/rc.conf uses hostnames in > /etc/pf.conf, these hostnames cannot be resolved via external nameservers > because the default route is not yet set. This results in an empty > (all open) ruleset. Use of hostnames in pf, or any firewall for that mater tends to make my hair stand on end, unless those hostnames resolve via /etc/hosts or a link local resolver. > > Since r195026 already put netif back to REQUIRE, this change does not affect > the issue that the firewall should rather have been setup before any > network traffic can occur. This well cause any system that requires pf rules before routing can work to fail, aka almost any real router running a real routing protocol well now fail or have issues during route daemon start up as without firewall rules the default is to deny the routing protocol packets. This should be reverted, or at least made knobable in some way. > > PR: 211928 > Submitted by: Robert Schulze > Reported by:Robert Schulze > Tested by: Mateusz Kwiatkowski > No objections from: kp > MFC after: 3 days > > Modified: > head/libexec/rc/rc.d/pf > > Modified: head/libexec/rc/rc.d/pf > == > --- head/libexec/rc/rc.d/pf Thu Oct 8 11:30:22 2020(r366536) > +++ head/libexec/rc/rc.d/pf Thu Oct 8 11:45:10 2020(r366537) > @@ -4,8 +4,7 @@ > # > > # PROVIDE: pf > -# REQUIRE: FILESYSTEMS netif pflog pfsync > -# BEFORE: routing > +# REQUIRE: FILESYSTEMS netif pflog pfsync routing > # KEYWORD: nojailvnet > > . /etc/rc.subr > -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r366561 - head
Author: lwhsu Date: Fri Oct 9 04:03:57 2020 New Revision: 366561 URL: https://svnweb.freebsd.org/changeset/base/366561 Log: Correct the primary to find(1) Sponsored by: The FreeBSD Foundation Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Fri Oct 9 01:48:21 2020(r366560) +++ head/UPDATING Fri Oct 9 04:03:57 2020(r366561) @@ -29,7 +29,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: 20200923: LINT files are no longer generated. We now include the relevant NOTES files. Note: This may cause conflicts with updating in some cases. - find sys -name LINT\* -rm + find sys -name LINT\* -delete is suggested across this commit to remove the generated LINT files. If you have tried to update with generated files there, the svn ___ 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: r366562 - in head/sys/contrib/dev/acpica: . common compiler components/debugger components/disassembler components/events components/executer components/namespace components/parser comp...
Author: jkim Date: Fri Oct 9 05:27:02 2020 New Revision: 366562 URL: https://svnweb.freebsd.org/changeset/base/366562 Log: MFV: r366539 Merge ACPICA 20200925. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/ahuuids.c head/sys/contrib/dev/acpica/common/dmtbinfo1.c head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/aslmessages.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/aslparseop.c head/sys/contrib/dev/acpica/compiler/aslprepkg.c head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/components/debugger/dbexec.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbmethod.c head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c head/sys/contrib/dev/acpica/components/events/evrgnini.c head/sys/contrib/dev/acpica/components/executer/exregion.c head/sys/contrib/dev/acpica/components/namespace/nsalloc.c head/sys/contrib/dev/acpica/components/namespace/nsarguments.c head/sys/contrib/dev/acpica/components/namespace/nsxfobj.c head/sys/contrib/dev/acpica/components/parser/psparse.c head/sys/contrib/dev/acpica/components/utilities/utpredef.c head/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c head/sys/contrib/dev/acpica/include/acconfig.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acuuid.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt == --- head/sys/contrib/dev/acpica/changes.txt Fri Oct 9 04:03:57 2020 (r366561) +++ head/sys/contrib/dev/acpica/changes.txt Fri Oct 9 05:27:02 2020 (r366562) @@ -1,6 +1,80 @@ +25 September 2020. Summary of changes for version 20200925: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Preserve memory opregion mappings. The ACPICA's strategy with respect to +the handling of memory mappings associated with memory operation regions +is to avoid mapping the entire region at once which may be problematic at +least in principle (for example, it may lead to conflicts with +overlapping mappings having different attributes created by drivers). It +may also be wasteful, because memory opregions on some systems take up +vastchunks of address space while the fields in those regions actually +accessed by AML are sparsely distributed. + +For this reason, a one-page "window" is mapped for a given opregion on +the first memory access through it and if that "window" does not cover an +address range accessed through that opregion subsequently, it is unmapped +and a new "window" is mapped to replace it. Next, if the new "window" is +not sufficient to access memory through the opregion in question in the +future, it will be replaced with yet another "window" and so on. That +may lead to a suboptimal sequence of memory mapping and unmapping +operations, for example if two fields in one opregion separated from each +other by a sufficiently wide chunk of unused address space are accessed +in an alternating pattern. + +Added support for 64 bit risc-v compilation. Useful for acpica tools and +incorporating ACPICA into the Firmware Test Suite. Colin Ian King +. + +Added support for SMBus predefined names (from SMBus Control Method +Interface Specification, Version 1.0, December 10, 1999. New predefined +names: +_SBA +_SBI +_SBR +_SBT +_SBW + +AML Disassembler: Added a new command, "All https://acpica.org/downloads @@ -94,7 +168,7 @@ would need to be updated to match the same behavior as utility and since acpiexec can already dump the entire namespace (via the 'namespace' command), we no longer have the need to maintain acpinames. -In order to dump the contents of the ACPI namepsace using acpiexec, +In order to dump the contents of the ACPI namespace using acpiexec, execute the following command from the command line: acpiexec -b "n" [aml files] @@ -17606,7 +17680,7 @@ bypass the "implicit conversion" mechanism of the Stor The ACPI 2.0 semantics for the SizeOf operator are fully implemented. The change is that performing a SizeOf on a reference object causes an automatic dereference of the object to -tha actual value
svn commit: r366563 - stable/12/sys/fs/ext2fs
Author: pfg Date: Fri Oct 9 05:28:32 2020 New Revision: 366563 URL: https://svnweb.freebsd.org/changeset/base/366563 Log: MFC r366501: ext2fs: minor typo. Obtained from:Dragonfly Modified: stable/12/sys/fs/ext2fs/ext2_alloc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/ext2fs/ext2_alloc.c == --- stable/12/sys/fs/ext2fs/ext2_alloc.cFri Oct 9 05:27:02 2020 (r366562) +++ stable/12/sys/fs/ext2fs/ext2_alloc.cFri Oct 9 05:28:32 2020 (r366563) @@ -192,7 +192,7 @@ static SYSCTL_NODE(_vfs, OID_AUTO, ext2fs, CTLFLAG_RW, static int doasyncfree = 1; SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, -"Use asychronous writes to update block pointers when freeing blocks"); +"Use asynchronous writes to update block pointers when freeing blocks"); static int doreallocblks = 0; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"