Re: svn commit: r362600 - in head: sys/amd64/include sys/amd64/vmm usr.sbin/bhyve
> Author: cem > Date: Thu Jun 25 00:18:42 2020 > New Revision: 362600 > URL: https://svnweb.freebsd.org/changeset/base/362600 > > Log: > bhyve(8): For prototyping, reattempt decode in userspace > > If userspace has a newer bhyve than the kernel, it may be able to decode > and emulate some instructions vmm.ko is unaware of. In this scenario, > reset decoder state and try again. This is pretty darn cool. Thanks! -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362600 - in head: sys/amd64/include sys/amd64/vmm usr.sbin/bhyve
Author: cem Date: Thu Jun 25 00:18:42 2020 New Revision: 362600 URL: https://svnweb.freebsd.org/changeset/base/362600 Log: bhyve(8): For prototyping, reattempt decode in userspace If userspace has a newer bhyve than the kernel, it may be able to decode and emulate some instructions vmm.ko is unaware of. In this scenario, reset decoder state and try again. Reviewed by: grehan Differential Revision:https://reviews.freebsd.org/D24464 Modified: head/sys/amd64/include/vmm.h head/sys/amd64/include/vmm_instruction_emul.h head/sys/amd64/vmm/vmm_instruction_emul.c head/usr.sbin/bhyve/bhyverun.c Modified: head/sys/amd64/include/vmm.h == --- head/sys/amd64/include/vmm.hThu Jun 25 00:09:43 2020 (r362599) +++ head/sys/amd64/include/vmm.hThu Jun 25 00:18:42 2020 (r362600) @@ -546,6 +546,9 @@ _Static_assert(_Alignof(struct vie_op) == 2, "ABI"); struct vie { uint8_t inst[VIE_INST_SIZE];/* instruction bytes */ uint8_t num_valid; /* size of the instruction */ + +/* The following fields are all zeroed upon restart. */ +#definevie_startzero num_processed uint8_t num_processed; uint8_t addrsize:4, opsize:4; /* address and operand sizes */ Modified: head/sys/amd64/include/vmm_instruction_emul.h == --- head/sys/amd64/include/vmm_instruction_emul.h Thu Jun 25 00:09:43 2020(r362599) +++ head/sys/amd64/include/vmm_instruction_emul.h Thu Jun 25 00:18:42 2020(r362600) @@ -105,6 +105,7 @@ int vm_gla2gpa_nofault(struct vm *vm, int vcpuid, stru uint64_t gla, int prot, uint64_t *gpa, int *is_fault); #endif /* _KERNEL */ +void vie_restart(struct vie *vie); void vie_init(struct vie *vie, const char *inst_bytes, int inst_length); /* Modified: head/sys/amd64/vmm/vmm_instruction_emul.c == --- head/sys/amd64/vmm/vmm_instruction_emul.c Thu Jun 25 00:09:43 2020 (r362599) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Thu Jun 25 00:18:42 2020 (r362600) @@ -53,7 +53,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #defineKASSERT(exp,msg)assert((exp)) @@ -1990,22 +1992,36 @@ vie_calculate_gla(enum vm_cpu_mode cpu_mode, enum vm_r return (0); } +/* + * Prepare a partially decoded vie for a 2nd attempt. + */ void -vie_init(struct vie *vie, const char *inst_bytes, int inst_length) +vie_restart(struct vie *vie) { - KASSERT(inst_length >= 0 && inst_length <= VIE_INST_SIZE, - ("%s: invalid instruction length (%d)", __func__, inst_length)); + _Static_assert( + offsetof(struct vie, inst) < offsetof(struct vie, vie_startzero) && + offsetof(struct vie, num_valid) < offsetof(struct vie, vie_startzero), + "restart should not erase instruction length or contents"); - bzero(vie, sizeof(struct vie)); + memset((char *)vie + offsetof(struct vie, vie_startzero), 0, + sizeof(*vie) - offsetof(struct vie, vie_startzero)); vie->base_register = VM_REG_LAST; vie->index_register = VM_REG_LAST; vie->segment_register = VM_REG_LAST; +} - if (inst_length) { - bcopy(inst_bytes, vie->inst, inst_length); - vie->num_valid = inst_length; - } +void +vie_init(struct vie *vie, const char *inst_bytes, int inst_length) +{ + KASSERT(inst_length >= 0 && inst_length <= VIE_INST_SIZE, + ("%s: invalid instruction length (%d)", __func__, inst_length)); + + vie_restart(vie); + memset(vie->inst, 0, sizeof(vie->inst)); + if (inst_length != 0) + memcpy(vie->inst, inst_bytes, inst_length); + vie->num_valid = inst_length; } #ifdef _KERNEL Modified: head/usr.sbin/bhyve/bhyverun.c == --- head/usr.sbin/bhyve/bhyverun.c Thu Jun 25 00:09:43 2020 (r362599) +++ head/usr.sbin/bhyve/bhyverun.c Thu Jun 25 00:18:42 2020 (r362600) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #ifndef WITHOUT_CAPSICUM #include #endif +#include #include #include "bhyverun.h" @@ -746,12 +747,26 @@ vmexit_mtrap(struct vmctx *ctx, struct vm_exit *vmexit static int vmexit_inst_emul(struct vmctx *ctx, struct vm_exit *vmexit, int *pvcpu) { - int err, i; + int err, i, cs_d; struct vie *vie; + enum vm_cpu_mode mode; stats.vmexit_inst_emul++; vie = &vmexit->u.inst_emul.vie; + if (!vie->decoded) { + /* +* Attempt to decode in userspace as a fallback. This allows +* updating instruction deco
svn commit: r362599 - head/sys/dev/evdev
Author: wulf Date: Thu Jun 25 00:09:43 2020 New Revision: 362599 URL: https://svnweb.freebsd.org/changeset/base/362599 Log: atkbd/evdev: recognize the Chromebook menu key as F13 like Linux does. This is the key on the right side of the function keys, with the "hamburger menu" icon on it. Submitted by: GregV MFC after:1 week Differential Revision:https://reviews.freebsd.org/D25390 Modified: head/sys/dev/evdev/evdev_utils.c Modified: head/sys/dev/evdev/evdev_utils.c == --- head/sys/dev/evdev/evdev_utils.cThu Jun 25 00:01:24 2020 (r362598) +++ head/sys/dev/evdev/evdev_utils.cThu Jun 25 00:09:43 2020 (r362599) @@ -140,7 +140,7 @@ static uint16_t evdev_at_set1_scancodes[] = { KEY_KP2,KEY_KP3,KEY_KP0,KEY_KPDOT, NONE, NONE, KEY_102ND, KEY_F11, KEY_F12,NONE, NONE, NONE, - NONE, NONE, NONE, NONE, + NONE, KEY_F13,NONE, NONE, /* 0x60 - 0x7f */ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362596 - head
Author: cem Date: Wed Jun 24 23:22:36 2020 New Revision: 362596 URL: https://svnweb.freebsd.org/changeset/base/362596 Log: Clang-format: Avoid hardcoded LLVM include-order style Reported by: emaste Modified: head/.clang-format Modified: head/.clang-format == --- head/.clang-format Wed Jun 24 22:42:46 2020(r362595) +++ head/.clang-format Wed Jun 24 23:22:36 2020(r362596) @@ -134,6 +134,12 @@ IncludeCategories: - Regex: '^\".*\.h\"' Priority: 10 SortPriority: 100 +# LLVM's header include ordering style is almost the exact opposite of ours. +# Unfortunately, they have hard-coded their preferences into clang-format. +# Clobbering this regular expression to avoid matching prevents non-system +# headers from being forcibly moved to the top of the include list. +# http://llvm.org/docs/CodingStandards.html#include-style +IncludeIsMainRegex: 'BLAH_DONT_MATCH_ANYTHING' SortIncludes: true KeepEmptyLinesAtTheStartOfBlocks: true TypenameMacros: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362595 - head
Author: cem Date: Wed Jun 24 22:42:46 2020 New Revision: 362595 URL: https://svnweb.freebsd.org/changeset/base/362595 Log: Update .clang-format type and foreach macros lists No functional change. Reviewed by: markj Differential Revision:https://reviews.freebsd.org/D25429 Modified: head/.clang-format Modified: head/.clang-format == --- head/.clang-format Wed Jun 24 20:23:37 2020(r362594) +++ head/.clang-format Wed Jun 24 22:42:46 2020(r362595) @@ -29,30 +29,53 @@ CompactNamespaces: true DerivePointerAlignment: false DisableFormat: false ForEachMacros: + - ARB_ARRFOREACH + - ARB_ARRFOREACH_REVWCOND + - ARB_ARRFOREACH_REVERSE + - ARB_FOREACH + - ARB_FOREACH_FROM + - ARB_FOREACH_SAFE + - ARB_FOREACH_REVERSE + - ARB_FOREACH_REVERSE_FROM + - ARB_FOREACH_REVERSE_SAFE + - CPU_FOREACH + - FOREACH_THREAD_IN_PROC + - FOREACH_PROC_IN_SYSTEM + - FOREACH_PRISON_CHILD + - FOREACH_PRISON_DESCENDANT + - FOREACH_PRISON_DESCENDANT_LOCKED + - FOREACH_PRISON_DESCENDANT_LOCKED_LEVEL + - MNT_VNODE_FOREACH_ALL + - MNT_VNODE_FOREACH_ACTIVE + - RB_FOREACH + - RB_FOREACH_FROM + - RB_FOREACH_SAFE + - RB_FOREACH_REVERSE + - RB_FOREACH_REVERSE_FROM + - RB_FOREACH_REVERSE_SAFE - SLIST_FOREACH + - SLIST_FOREACH_FROM + - SLIST_FOREACH_FROM_SAFE - SLIST_FOREACH_SAFE + - SLIST_FOREACH_PREVPTR + - SPLAY_FOREACH - LIST_FOREACH + - LIST_FOREACH_FROM + - LIST_FOREACH_FROM_SAFE - LIST_FOREACH_SAFE - STAILQ_FOREACH + - STAILQ_FOREACH_FROM + - STAILQ_FOREACH_FROM_SAFE - STAILQ_FOREACH_SAFE - TAILQ_FOREACH - - TAILQ_FOREACH_SAFE + - TAILQ_FOREACH_FROM + - TAILQ_FOREACH_FROM_SAFE - TAILQ_FOREACH_REVERSE + - TAILQ_FOREACH_REVERSE_FROM + - TAILQ_FOREACH_REVERSE_FROM_SAFE - TAILQ_FOREACH_REVERSE_SAFE - - RB_FOREACH - - RB_FOREACH_SAFE - - RB_FOREACH_FROM - - RB_FOREACH_REVERSE - - RB_FOREACH_REVERSE_FROM - - RB_FOREACH_REVERSE_SAFE - - FOREACH_THREAD_IN_PROC - - FOREACH_PROC_IN_SYSTEM - - FOREACH_PRISON_CHILD - - FOREACH_PRISON_DESCENDANT - - FOREACH_PRISON_DESCENDANT_LOCKED - - FOREACH_PRISON_DESCENDANT_LOCKED_LEVEL - - MNT_VNODE_FOREACH_ALL - - MNT_VNODE_FOREACH_ACTIVE + - TAILQ_FOREACH_SAFE + - VM_MAP_ENTRY_FOREACH IndentCaseLabels: false IndentPPDirectives: None Language: Cpp @@ -113,12 +136,35 @@ IncludeCategories: SortPriority: 100 SortIncludes: true KeepEmptyLinesAtTheStartOfBlocks: true -# The options below will only be supported starting with clang 9.0: -# TODO-CLANG-9: TypenameMacros: -# TODO-CLANG-9: - SLIST_HEAD -# TODO-CLANG-9: - SLIST_ENTRY -# TODO-CLANG-9: - TAILQ_ENTRY -# TODO-CLANG-9: - TAILQ_HEAD -# TODO-CLANG-9: - STAILQ_ENTRY -# TODO-CLANG-9: - STAILQ_HEAD -... +TypenameMacros: + - ARB_ELMTYPE + - ARB_HEAD + - ARB8_HEAD + - ARB16_HEAD + - ARB32_HEAD + - ARB_ENTRY + - ARB8_ENTRY + - ARB16_ENTRY + - ARB32_ENTRY + - LIST_CLASS_ENTRY + - LIST_CLASS_HEAD + - LIST_ENTRY + - LIST_HEAD + - QUEUE_TYPEOF + - RB_ENTRY + - RB_HEAD + - SLIST_CLASS_HEAD + - SLIST_CLASS_ENTRY + - SLIST_HEAD + - SLIST_ENTRY + - SMR_POINTER + - SPLAY_ENTRY + - SPLAY_HEAD + - STAILQ_CLASS_ENTRY + - STAILQ_CLASS_HEAD + - STAILQ_ENTRY + - STAILQ_HEAD + - TAILQ_CLASS_ENTRY + - TAILQ_CLASS_HEAD + - TAILQ_ENTRY + - TAILQ_HEAD ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362592 - in head: share/man/man4 sys/dev/acpi_support
Author: markj Date: Wed Jun 24 19:51:03 2020 New Revision: 362592 URL: https://svnweb.freebsd.org/changeset/base/362592 Log: acpi_ibm(4): Rename disengaged mode to unthrottled mode. This mode was added in r362496. Rename it to make the meaning more clear. PR: 247306 Suggested by: rpokala Submitted by: Ali Abdallah MFC with: r362496 Modified: head/share/man/man4/acpi_ibm.4 head/sys/dev/acpi_support/acpi_ibm.c Modified: head/share/man/man4/acpi_ibm.4 == --- head/share/man/man4/acpi_ibm.4 Wed Jun 24 18:51:01 2020 (r362591) +++ head/share/man/man4/acpi_ibm.4 Wed Jun 24 19:51:03 2020 (r362592) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 19, 2020 +.Dd June 24, 2020 .Dt ACPI_IBM 4 .Os .Sh NAME @@ -293,7 +293,7 @@ is not set accordingly. .It Va dev.acpi_ibm.0.fan_level Indicates at what speed the fan should run when being in manual mode. Valid values range from 0 (off) to 7 (max) and 8. -Level 8 is used by the driver to set the fan in disengaged mode. +Level 8 is used by the driver to set the fan in unthrottled mode. In this mode, the fan is set to spin freely and will quickly reach a very high speed. Use this mode only if absolutely necessary, e.g., if the system has reached its @@ -311,7 +311,7 @@ off .It Li 6, 7 ~4300 RPM .It Li 8 -~6400 RPM (Full-speed, disengaged) +~6400 RPM (Full-speed, unthrottled) .El .It Va dev.acpi_ibm.0.fan_speed (read-only) Modified: head/sys/dev/acpi_support/acpi_ibm.c == --- head/sys/dev/acpi_support/acpi_ibm.cWed Jun 24 18:51:01 2020 (r362591) +++ head/sys/dev/acpi_support/acpi_ibm.cWed Jun 24 19:51:03 2020 (r362592) @@ -106,7 +106,7 @@ ACPI_MODULE_NAME("IBM") #define IBM_EC_MASK_MUTE (1 << 6) #define IBM_EC_FANSTATUS 0x2F #define IBM_EC_MASK_FANLEVEL 0x3f -#define IBM_EC_MASK_FANDISENGAGED(1 << 6) +#define IBM_EC_MASK_FANUNTHROTTLED (1 << 6) #define IBM_EC_MASK_FANSTATUS(1 << 7) #define IBM_EC_FANSPEED0x84 @@ -265,7 +265,7 @@ static struct { .name = "fan_level", .method = ACPI_IBM_METHOD_FANLEVEL, .description= "Fan level, 0-7 (recommended max), " - "8 (disengaged, full-speed)", + "8 (unthrottled, full-speed)", }, { .name = "fan", @@ -831,7 +831,7 @@ acpi_ibm_sysctl_get(struct acpi_ibm_softc *sc, int met */ if (!sc->fan_handle) { ACPI_EC_READ(sc->ec_dev, IBM_EC_FANSTATUS, &val_ec, 1); - if (val_ec & IBM_EC_MASK_FANDISENGAGED) + if (val_ec & IBM_EC_MASK_FANUNTHROTTLED) val = 8; else val = val_ec & IBM_EC_MASK_FANLEVEL; @@ -924,11 +924,11 @@ acpi_ibm_sysctl_set(struct acpi_ibm_softc *sc, int met /* Read the current fan status. */ ACPI_EC_READ(sc->ec_dev, IBM_EC_FANSTATUS, &val_ec, 1); val = val_ec & ~(IBM_EC_MASK_FANLEVEL | - IBM_EC_MASK_FANDISENGAGED); + IBM_EC_MASK_FANUNTHROTTLED); if (arg == 8) - /* Full speed, set the disengaged bit. */ - val |= 7 | IBM_EC_MASK_FANDISENGAGED; + /* Full speed, set the unthrottled bit. */ + val |= 7 | IBM_EC_MASK_FANUNTHROTTLED; else val |= arg; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362591 - head/sys/kern
Author: ngie Date: Wed Jun 24 18:51:01 2020 New Revision: 362591 URL: https://svnweb.freebsd.org/changeset/base/362591 Log: Add `kern.features.witness` Adding `kern.features.witness` helps expose whether or not the kernel has `options WITNESS` enabled, so the `feature_present(3)` API can be used to query whether or not witness(9) is built into the kernel. This support is helpful with userspace applications (generally speaking, tests), as it can be queried to determine whether or not tests related to WITNESS should be run. MFC after:1 week Reviewed by: cem, darrick.freebsd_gmail.com Differential Revision: https://reviews.freebsd.org/D25302 Sponsored by: DellEMC Isilon Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c == --- head/sys/kern/subr_witness.cWed Jun 24 18:40:43 2020 (r362590) +++ head/sys/kern/subr_witness.cWed Jun 24 18:51:01 2020 (r362591) @@ -361,6 +361,8 @@ static int witness_output(const char *fmt, ...) __prin static int witness_voutput(const char *fmt, va_list ap) __printflike(1, 0); static voidwitness_setflag(struct lock_object *lock, int flag, int set); +FEATURE(witness, "kernel has witness(9) support"); + static SYSCTL_NODE(_debug, OID_AUTO, witness, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "Witness Locking"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362590 - head
Author: cem Date: Wed Jun 24 18:40:43 2020 New Revision: 362590 URL: https://svnweb.freebsd.org/changeset/base/362590 Log: Update .clang-format with style(9) header-sorting Thanks to work done in the NetBSD clang-format project. No functional change. Reviewed by: markj Differential Revision:https://reviews.freebsd.org/D25428 Modified: head/.clang-format Modified: head/.clang-format == --- head/.clang-format Wed Jun 24 17:54:24 2020(r362589) +++ head/.clang-format Wed Jun 24 18:40:43 2020(r362590) @@ -64,7 +64,54 @@ TabWidth: 8 ColumnLimit: 80 UseTab: Always SpaceAfterCStyleCast: false -SortIncludes: false +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^\"opt_.*\.h\"' +Priority: 1 +SortPriority: 10 + - Regex: '^' +Priority: 2 +SortPriority: 20 + - Regex: '^' +Priority: 2 +SortPriority: 21 + - Regex: '^' +Priority: 2 +SortPriority: 22 + - Regex: '^' +Priority: 3 +SortPriority: 30 + - Regex: '^https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362589 - in head/lib/csu: aarch64 arm i386 riscv
Author: jhb Date: Wed Jun 24 17:54:24 2020 New Revision: 362589 URL: https://svnweb.freebsd.org/changeset/base/362589 Log: Always compile the brand and ignore init ELF notes standalone. Reviewed by: kib Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D25374 Modified: head/lib/csu/aarch64/Makefile head/lib/csu/aarch64/crt1_s.S head/lib/csu/arm/Makefile head/lib/csu/arm/crt1_s.S head/lib/csu/i386/Makefile head/lib/csu/i386/crt1_s.S head/lib/csu/riscv/Makefile head/lib/csu/riscv/crt1_s.S Modified: head/lib/csu/aarch64/Makefile == --- head/lib/csu/aarch64/Makefile Wed Jun 24 17:31:21 2020 (r362588) +++ head/lib/csu/aarch64/Makefile Wed Jun 24 17:54:24 2020 (r362589) @@ -18,20 +18,21 @@ FILESDIR= ${LIBDIR} .undef LIBRARIES_ONLY CLEANFILES=${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o +CLEANFILES+= crtbrand.o ignore_init_note.o gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o +gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} -crt1.o:crt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o +crt1.o:crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -Scrt1.o: Scrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o +Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} .include Modified: head/lib/csu/aarch64/crt1_s.S == --- head/lib/csu/aarch64/crt1_s.S Wed Jun 24 17:31:21 2020 (r362588) +++ head/lib/csu/aarch64/crt1_s.S Wed Jun 24 17:54:24 2020 (r362589) @@ -32,9 +32,6 @@ #include __FBSDID("$FreeBSD$"); -#include "crtbrand.S" -#include "ignore_init_note.S" - ENTRY(_start) mov x3, x2 /* cleanup */ add x1, x0, #8 /* load argv */ Modified: head/lib/csu/arm/Makefile == --- head/lib/csu/arm/Makefile Wed Jun 24 17:31:21 2020(r362588) +++ head/lib/csu/arm/Makefile Wed Jun 24 17:54:24 2020(r362589) @@ -18,23 +18,24 @@ FILESDIR= ${LIBDIR} .undef LIBRARIES_ONLY CLEANFILES=${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o +CLEANFILES+= crtbrand.o ignore_init_note.o crt1_c.o: crt1_c.c ${CC} ${CFLAGS} ${STATIC_CFLAGS} -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -crt1.o:crt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o +crt1.o:crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} ${STATIC_CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o +gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -Scrt1.o: Scrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o +Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} .include Modified: head/lib/csu/arm/crt1_s.S == --- head/lib/csu/arm/crt1_s.S Wed Jun 24 17:31:21 2020(r362588) +++ head/lib/csu/arm/crt1_s.S Wed Jun 24 17:54:24 2020(r362589) @@ -44,8 +44,9 @@ #include __FBSDID("$FreeBSD$"); -#include "crtbrand.S" -#include "ignore_init_note.S" +#include +#include +#include "notes.h" ENTRY(_start) mov r5, r2 /* cleanup */ Modified: head/lib/csu/i386/Makefile == --- head/lib/csu/i386/Makefile Wed Jun 24 17:31:21 2020(r362588) +++ head/lib/csu/i386/Makefile Wed Jun 24 17:54:24 2020(r362589) @@ -18,22 +18,23 @@ FILESDIR= ${LIBDIR} .undef LIBRARIES_ONLY CLEANFILES=${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o +CLEANFILES+= crtbrand.o ignore_init_note.o gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o +gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} -crt1.o:crt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o crt1.o -r crt1
svn commit: r362588 - head/share/man/man5
Author: cem Date: Wed Jun 24 17:31:21 2020 New Revision: 362588 URL: https://svnweb.freebsd.org/changeset/base/362588 Log: Regenerate src.conf.5 after r362587 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Wed Jun 24 17:03:42 2020 (r362587) +++ head/share/man/man5/src.conf.5 Wed Jun 24 17:31:21 2020 (r362588) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 6, 2020 +.Dd June 24, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -321,6 +321,8 @@ When set, it enforces these options: .It .Va WITHOUT_CLANG_EXTRAS .It +.Va WITHOUT_CLANG_FORMAT +.It .Va WITHOUT_CLANG_FULL .It .Va WITHOUT_LLVM_COV @@ -333,6 +335,8 @@ enabled unless an alternate compiler is provided via X .It Va WITH_CLANG_EXTRAS Set to build additional clang and llvm tools, such as bugpoint and clang-format. +.It Va WITH_CLANG_FORMAT +Set to build clang-format. .It Va WITHOUT_CLANG_FULL Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. @@ -441,6 +445,8 @@ When set, it enforces these options: .It .Va WITHOUT_CLANG_EXTRAS .It +.Va WITHOUT_CLANG_FORMAT +.It .Va WITHOUT_CLANG_FULL .It .Va WITHOUT_DTRACE_TESTS @@ -1623,6 +1629,8 @@ When set, it enforces these options: .Va WITHOUT_CLANG .It .Va WITHOUT_CLANG_EXTRAS +.It +.Va WITHOUT_CLANG_FORMAT .It .Va WITHOUT_CLANG_FULL .It ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362587 - in head: . lib/clang/libclang share/mk targets/pseudo/bootstrap-tools targets/pseudo/clang tools/build/mk tools/build/options usr.bin/clang
Author: cem Date: Wed Jun 24 17:03:42 2020 New Revision: 362587 URL: https://svnweb.freebsd.org/changeset/base/362587 Log: Add WITH_CLANG_FORMAT option clang-format is enabled conditional on either WITH_CLANG_EXTRAS or WITH_CLANG_FORMAT. Some sources in libclang are build conditional on either rule, and obviously the clang-format binary itself depends on the rule. clang-format could still use a manual page. Reviewed by: emaste Differential Revision:https://reviews.freebsd.org/D25427 Added: head/tools/build/options/WITH_CLANG_FORMAT (contents, props changed) Modified: head/Makefile.inc1 head/lib/clang/libclang/Makefile head/share/mk/src.opts.mk head/targets/pseudo/bootstrap-tools/Makefile head/targets/pseudo/clang/Makefile.depend head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/Makefile Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Jun 24 16:17:58 2020(r362586) +++ head/Makefile.inc1 Wed Jun 24 17:03:42 2020(r362587) @@ -676,7 +676,7 @@ BSARGS= DESTDIR= \ MK_HTML=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ - MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ + MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \ MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no \ MK_INCLUDES=yes @@ -697,7 +697,7 @@ TMAKE= \ SSP_CFLAGS= \ -DNO_LINT \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ - MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ + MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \ MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no # cross-tools stage @@ -2577,6 +2577,7 @@ NXBMAKEARGS+= \ SSP_CFLAGS= \ MK_CASPER=no \ MK_CLANG_EXTRAS=no \ + MK_CLANG_FORMAT=no \ MK_CLANG_FULL=no \ MK_CTF=no \ MK_DEBUG_FILES=no \ Modified: head/lib/clang/libclang/Makefile == --- head/lib/clang/libclang/MakefileWed Jun 24 16:17:58 2020 (r362586) +++ head/lib/clang/libclang/MakefileWed Jun 24 17:03:42 2020 (r362587) @@ -22,7 +22,7 @@ SRCDIR= clang/lib # Explanation of different SRCS variants below: # SRCS_MIN:always required, even for bootstrap -# SRCS_EXT:required for MK_CLANG_EXTRAS +# SRCS_EXT:required for MK_CLANG_EXTRAS || MK_CLANG_FORMAT # SRCS_FUL:required for MK_CLANG_FULL # SRCS_LDB:required for MK_LLDB @@ -686,7 +686,7 @@ SRCS_MIN+= Tooling/RefactoringCallbacks.cpp SRCS_MIN+= Tooling/Tooling.cpp SRCS_ALL+= ${SRCS_MIN} -.if ${MK_CLANG_EXTRAS} != "no" +.if ${MK_CLANG_EXTRAS} != "no" || ${MK_CLANG_FORMAT} != "no" SRCS_ALL+= ${SRCS_EXT} .endif .if ${MK_CLANG_FULL} != "no" Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Wed Jun 24 16:17:58 2020(r362586) +++ head/share/mk/src.opts.mk Wed Jun 24 17:03:42 2020(r362587) @@ -202,6 +202,7 @@ __DEFAULT_NO_OPTIONS = \ BHYVE_SNAPSHOT \ BSD_GREP \ CLANG_EXTRAS \ +CLANG_FORMAT \ DTRACE_TESTS \ EXPERIMENTAL \ GNU_GREP_COMPAT \ @@ -482,6 +483,7 @@ MK_LLDB:= no .if ${MK_CLANG} == "no" MK_CLANG_EXTRAS:= no +MK_CLANG_FORMAT:= no MK_CLANG_FULL:= no MK_LLVM_COV:= no .endif Modified: head/targets/pseudo/bootstrap-tools/Makefile == --- head/targets/pseudo/bootstrap-tools/MakefileWed Jun 24 16:17:58 2020(r362586) +++ head/targets/pseudo/bootstrap-tools/MakefileWed Jun 24 17:03:42 2020(r362587) @@ -43,7 +43,7 @@ BSARGS= DESTDIR= \ MK_HTML=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ - MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ + MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \ MK_LLDB=no MK_TESTS=no \ MK_INCLUDES=yes Modified: head/targets/pseudo/clang/Makefile.depend == --- head/targets/pseudo/clang/Makefile.depend Wed Jun 24 16:17:58 2020 (r362586) +++ head/targets/pseudo/clang/Makefile.depend Wed Jun 24 17:03:42 2020 (r362587) @@ -42,7 +42,6 @@ DIRDEPS+= \ .if ${MK_CLANG_EXTRAS} == "yes" DIRDEPS+= \ usr.bin/clang/bugpoint \ - usr.bin/clang/clang-format \ usr.bin/clang/llc \ usr.bin/clang/lli \ usr.bin/clang/llvm-ar \ @@ -69,6 +68,10 @@ DIRDEPS+= \ usr.bin/clang/llvm-xray \ usr.bin
svn commit: r362585 - head/sys/netpfil/ipfw
Author: markj Date: Wed Jun 24 15:46:33 2020 New Revision: 362585 URL: https://svnweb.freebsd.org/changeset/base/362585 Log: ipfw(4): make O_IPVER/ipversion match IPv4 or 6, not just IPv4. Submitted by: Neel Chauhan Reviewed by: Lutz Donnerhacke MFC after:1 week Differential Revision:https://reviews.freebsd.org/D25227 Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c == --- head/sys/netpfil/ipfw/ip_fw2.c Wed Jun 24 15:21:12 2020 (r362584) +++ head/sys/netpfil/ipfw/ip_fw2.c Wed Jun 24 15:46:33 2020 (r362585) @@ -2225,7 +2225,7 @@ do { \ break; case O_IPVER: - match = (is_ipv4 && + match = ((is_ipv4 || is_ipv6) && cmd->arg1 == ip->ip_v); break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362584 - head/sys/riscv/riscv
Author: mhorne Date: Wed Jun 24 15:21:12 2020 New Revision: 362584 URL: https://svnweb.freebsd.org/changeset/base/362584 Log: Only invalidate the early DTB mapping if it exists This temporary mapping will become optional. Booting via loader(8) means that the DTB will have already been copied into the kernel's staging area, and is therefore covered by the early KVA mappings. Reviewed by: markj Differential Revision:https://reviews.freebsd.org/D24911 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c == --- head/sys/riscv/riscv/pmap.c Wed Jun 24 15:20:00 2020(r362583) +++ head/sys/riscv/riscv/pmap.c Wed Jun 24 15:21:12 2020(r362584) @@ -619,8 +619,8 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, * possibility of an aliased mapping in the future. */ l2p = pmap_l2(kernel_pmap, VM_EARLY_DTB_ADDRESS); - KASSERT((pmap_load(l2p) & PTE_V) != 0, ("dtpb not mapped")); - pmap_clear(l2p); + if ((pmap_load(l2p) & PTE_V) != 0) + pmap_clear(l2p); sfence_vma(); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362583 - in head/sys/riscv: include riscv
Author: mhorne Date: Wed Jun 24 15:20:00 2020 New Revision: 362583 URL: https://svnweb.freebsd.org/changeset/base/362583 Log: Handle load from loader(8) In locore, we must detect and handle different arguments passed by loader(8) compared to what we recieve when booting directly via SBI firmware. Currently we receive the hart ID in a0 and a pointer to the device tree blob in a1. loader(8) provides only a pointer to its metadata in a0. The solution to this is to add an additional entry point, _alt_start. This will be placed first in the .text section, so SBI firmware will enter here, and jump to the common pagetable setup shortly after. Since loader(8) understands our ELF kernel, it will enter at the ELF's entry address, which points to _start. This approach leads to very little guesswork as to which way we booted. Fix-up initriscv() to parse the loader's metadata, continuing to use fake_preload_metadata() in the SBI direct boot case. Reviewed by: markj, jrtc27 (asm portion) Differential Revision:https://reviews.freebsd.org/D24912 Modified: head/sys/riscv/include/machdep.h head/sys/riscv/riscv/genassym.c head/sys/riscv/riscv/locore.S head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/include/machdep.h == --- head/sys/riscv/include/machdep.hWed Jun 24 15:05:42 2020 (r362582) +++ head/sys/riscv/include/machdep.hWed Jun 24 15:20:00 2020 (r362583) @@ -43,12 +43,12 @@ struct riscv_bootparams { vm_offset_t kern_stack; vm_offset_t dtbp_virt; /* Device tree blob virtual addr */ vm_offset_t dtbp_phys; /* Device tree blob physical addr */ + vm_offset_t modulep;/* loader(8) metadata */ }; extern vm_paddr_t physmap[PHYS_AVAIL_ENTRIES]; extern u_int physmap_idx; -vm_offset_t fake_preload_metadata(struct riscv_bootparams *rbp); void initriscv(struct riscv_bootparams *); #endif /* _MACHINE_MACHDEP_H_ */ Modified: head/sys/riscv/riscv/genassym.c == --- head/sys/riscv/riscv/genassym.c Wed Jun 24 15:05:42 2020 (r362582) +++ head/sys/riscv/riscv/genassym.c Wed Jun 24 15:20:00 2020 (r362583) @@ -107,3 +107,4 @@ ASSYM(RISCV_BOOTPARAMS_KERN_STACK, offsetof(struct ris kern_stack)); ASSYM(RISCV_BOOTPARAMS_DTBP_VIRT, offsetof(struct riscv_bootparams, dtbp_virt)); ASSYM(RISCV_BOOTPARAMS_DTBP_PHYS, offsetof(struct riscv_bootparams, dtbp_phys)); +ASSYM(RISCV_BOOTPARAMS_MODULEP, offsetof(struct riscv_bootparams, modulep)); Modified: head/sys/riscv/riscv/locore.S == --- head/sys/riscv/riscv/locore.S Wed Jun 24 15:05:42 2020 (r362582) +++ head/sys/riscv/riscv/locore.S Wed Jun 24 15:20:00 2020 (r362583) @@ -46,24 +46,24 @@ .globl kernbase .setkernbase, KERNBASE - /* Trap entries */ .text - - /* Reset vector */ - .text - .globl _start -_start: +/* + * Alternate entry point. Used when booting via SBI firmware. It must be placed + * at the beginning of the .text section. Arguments are as follows: + * - a0 = hart ID + * - a1 = dtbp + * + * Multiple CPUs might enter from this point, so we perform a hart lottery and + * send the losers to mpentry. + */ + .globl _alt_start +_alt_start: /* Set the global pointer */ .option push .option norelax lla gp, __global_pointer$ .option pop - /* -* a0 = hart id -* a1 = dtbp -*/ - /* Pick a hart to run the boot process. */ lla t0, hart_lottery li t1, 1 @@ -75,11 +75,43 @@ _start: */ beqzt0, 1f j mpentry +1: + /* Store the boot hart */ + lla t0, boot_hart + sw a0, 0(t0) + /* Load zero as modulep */ + mv a0, zero + j pagetables + +/* + * Main entry point. This routine is marked as the ELF entry, and is where + * loader(8) will enter the kernel. Arguments are as follows: + * - a0 = modulep + * - a1 = ??? + * + * It is expected that only a single CPU will enter here. + */ + .globl _start +_start: + /* Set the global pointer */ +.option push +.option norelax + lla gp, __global_pointer$ +.option pop + /* -* Page tables +* Zero a1 to indicate that we have no DTB pointer. It is already +* included in the loader(8) metadata. */ -1: + mv a1, zero + + /* +* Page tables setup +* a0 - modulep or zero +* a1 - zero or dtbp +*/ +pagetables: /* Get the kernel's load address */ jal get_physmem @@ -107,7 +139,7 @@ _start: li t2, 512 /* Build 512 entries */ add
svn commit: r362582 - head/sbin/ipfw
Author: markj Date: Wed Jun 24 15:05:42 2020 New Revision: 362582 URL: https://svnweb.freebsd.org/changeset/base/362582 Log: ipfw(8): In fill_ip6(), use a single statement for both "me" and "me6". Submitted by: Neel Chauhan Reviewed by: rgrimes, Lutz Donnerhacke MFC after:1 week Differential Revision:https://reviews.freebsd.org/D24403 Modified: head/sbin/ipfw/ipv6.c Modified: head/sbin/ipfw/ipv6.c == --- head/sbin/ipfw/ipv6.c Wed Jun 24 14:47:51 2020(r362581) +++ head/sbin/ipfw/ipv6.c Wed Jun 24 15:05:42 2020(r362582) @@ -342,13 +342,8 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen, stru if (strcmp(av, "any") == 0) return (1); - - if (strcmp(av, "me") == 0) {/* Set the data for "me" opt*/ - cmd->o.len |= F_INSN_SIZE(ipfw_insn); - return (1); - } - - if (strcmp(av, "me6") == 0) { /* Set the data for "me" opt*/ + /* Set the data for "me" opt */ + if (strcmp(av, "me") == 0 || strcmp(av, "me6") == 0) { cmd->o.len |= F_INSN_SIZE(ipfw_insn); return (1); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362581 - head/sys/netinet
Author: tuexen Date: Wed Jun 24 14:47:51 2020 New Revision: 362581 URL: https://svnweb.freebsd.org/changeset/base/362581 Log: Fix the acconting for fragmented unordered messages when using interleaving. This was reported for the userland stack in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19321 MFC after:1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c == --- head/sys/netinet/sctp_indata.c Wed Jun 24 13:52:53 2020 (r362580) +++ head/sys/netinet/sctp_indata.c Wed Jun 24 14:47:51 2020 (r362581) @@ -,6 +,16 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct #endif SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); + if (asoc->size_on_all_streams >= control->length) { + asoc->size_on_all_streams -= control->length; + } else { +#ifdef INVARIANTS + panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, control->length); +#else + asoc->size_on_all_streams = 0; +#endif + } + sctp_ucount_decr(asoc->cnt_on_all_streams); control->on_strm_q = 0; } if (control->on_read_q == 0) { @@ -1391,7 +1401,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struc } /* Must be added to the stream-in queue */ if (created_control) { - if (unordered == 0) { + if ((unordered == 0) || (asoc->idata_supported)) { sctp_ucount_incr(asoc->cnt_on_all_streams); } if (sctp_place_control_in_stream(strm, asoc, control)) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362580 - head/sys/netinet/cc
Author: rscheff Date: Wed Jun 24 13:52:53 2020 New Revision: 362580 URL: https://svnweb.freebsd.org/changeset/base/362580 Log: TCP: fix cubic RTO reaction. Proper TCP Cubic operation requires the knowledge of the maximum congestion window prior to the last congestion event. This restores and improves a bugfix previously added by jtl@ but subsequently removed due to a revert. Reported by: chengc_netapp.com Reviewed by: chengc_netapp.com, tuexen (mentor) Approved by: tuexen (mentor), rgrimes (mentor) MFC after:2 weeks Sponsored by: NetApp, Inc. Differential Revision:https://reviews.freebsd.org/D25133 Modified: head/sys/netinet/cc/cc_cubic.c Modified: head/sys/netinet/cc/cc_cubic.c == --- head/sys/netinet/cc/cc_cubic.c Wed Jun 24 13:49:30 2020 (r362579) +++ head/sys/netinet/cc/cc_cubic.c Wed Jun 24 13:52:53 2020 (r362580) @@ -313,10 +313,15 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) * timeout has fired more than once, as there is a reasonable * chance the first one is a false alarm and may not indicate * congestion. +* This will put Cubic firmly into the concave / TCP friendly +* region, for a slower ramp-up after two consecutive RTOs. */ if (CCV(ccv, t_rxtshift) >= 2) { cubic_data->flags |= CUBICFLAG_CONG_EVENT; cubic_data->t_last_cong = ticks; + cubic_data->max_cwnd = CCV(ccv, snd_cwnd_prev); + cubic_data->K = cubic_k(cubic_data->max_cwnd / + CCV(ccv, t_maxseg)); } break; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362577 - head/sys/netinet
Author: rscheff Date: Wed Jun 24 13:42:42 2020 New Revision: 362577 URL: https://svnweb.freebsd.org/changeset/base/362577 Log: TCP: make after-idle work for transactional sessions. The use of t_rcvtime as proxy for the last transmission fails for transactional IO, where the client requests data before the server can respond with a bulk transfer. Set aside a dedicated variable to actually track the last locally sent segment going forward. Reported by: rrs Reviewed by: rrs, tuexen (mentor) Approved by: tuexen (mentor), rgrimes (mentor) MFC after:2 weeks Sponsored by: NetApp, Inc. Differential Revision:https://reviews.freebsd.org/D25016 Modified: head/sys/netinet/tcp_output.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Wed Jun 24 13:11:19 2020 (r362576) +++ head/sys/netinet/tcp_output.c Wed Jun 24 13:42:42 2020 (r362577) @@ -260,7 +260,8 @@ tcp_output(struct tcpcb *tp) * to send, then transmit; otherwise, investigate further. */ idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una); - if (idle && ticks - tp->t_rcvtime >= tp->t_rxtcur) + if (idle && (((ticks - tp->t_rcvtime) >= tp->t_rxtcur) || + (tp->t_sndtime && ((ticks - tp->t_sndtime) >= tp->t_rxtcur cc_after_idle(tp); tp->t_flags &= ~TF_LASTIDLE; if (idle) { @@ -1502,6 +1503,7 @@ out: * Time this transmission if not a retransmission and * not currently timing anything. */ + tp->t_sndtime = ticks; if (tp->t_rtttime == 0) { tp->t_rtttime = ticks; tp->t_rtseq = startseq; Modified: head/sys/netinet/tcp_var.h == --- head/sys/netinet/tcp_var.h Wed Jun 24 13:11:19 2020(r362576) +++ head/sys/netinet/tcp_var.h Wed Jun 24 13:42:42 2020(r362577) @@ -188,8 +188,9 @@ struct tcpcb { tcp_seq snd_wl2;/* window update seg ack number */ tcp_seq irs;/* initial receive sequence number */ - tcp_seq iss;/* initial send sequence number */ - u_int t_acktime; + tcp_seq iss;/* initial send sequence number */ + u_int t_acktime; /* RACK and BBR incoming new data was acked */ + u_int t_sndtime; /* time last data was sent */ u_int ts_recent_age; /* when last updated */ tcp_seq snd_recover;/* for use in NewReno Fast Recovery */ uint16_t cl4_spare; /* Spare to adjust CL 4 */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib
On Wed, Jun 24, 2020 at 5:09 AM Dimitry Andric wrote: > > On 24 Jun 2020, at 02:41, Kyle Evans wrote: > > > > On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim wrote: > >> > >> Author: jkim > >> Date: Thu Jun 18 18:09:16 2020 > >> New Revision: 362333 > >> URL: https://svnweb.freebsd.org/changeset/base/362333 > >> > >> Log: > >> MFV: r362286 > >> > >> Merge flex 2.6.4. > >> > > > > Hi, > > > > I'm looking at getting amd64 world buildable again by gcc6; this seems > > to give it some gas: > > > > /usr/src/contrib/flex/src/main.c: In function 'check_options': > > /usr/src/contrib/flex/src/main.c:347:14: error: assignment discards > > 'const' qualifier from pointer target type > > [-Werror=discarded-qualifiers] > > if ((slash = strrchr(M4, '/')) != NULL) { > > > > The following trivial patch seems to make gcc6 happy again. > > This is a strange one. As gcc6 has been removed from ports, I had to > resort to an older 12-STABLE box which still had it, but no matter what > I try, I cannot get the warning that is being produced by the CI system. > What does it do differently? > > Also, the warning is indeed bogus, as strrchr() returns a non-const char > pointer. As I can't reproduce it, I also can't verify which gcc version > fixes the bogus warning. > It's bogus, but it's also not-even-wrong given that strrchr doesn't do anything to make it actually safe to mutate *strrchr() in a scenario like this where the input is apparently a string literal. I consider it an anti-footgun measure to make sure we've constified slash here. Thanks, Kyle Evans ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362576 - in head/lib: libc/tests/gen libc/tests/stdlib msun/tests
Author: mhorne Date: Wed Jun 24 13:11:19 2020 New Revision: 362576 URL: https://svnweb.freebsd.org/changeset/base/362576 Log: Enable long double tests on RISC-V Some of the NetBSD contributed tests are gated behind the __HAVE_LONG_DOUBLE flag. This flag seems to be defined only for platforms whose long double is larger than their double. I could not find this explicitly documented anywhere, but it is implied by the definitions in NetBSD's sys/arch/${arch}/include/math.h headers, and the following assertion from the UBSAN code: #ifdef __HAVE_LONG_DOUBLE long double LD; ASSERT(sizeof(LD) > sizeof(uint64_t)); #endif RISC-V has 128-bit long doubles, so enable the tests on this platform, and update the comments to better explain the purpose of this flag. Reviewed by: ngie MFC after:1 week Differential Revision:https://reviews.freebsd.org/D25419 Modified: head/lib/libc/tests/gen/Makefile head/lib/libc/tests/stdlib/Makefile head/lib/msun/tests/Makefile Modified: head/lib/libc/tests/gen/Makefile == --- head/lib/libc/tests/gen/MakefileWed Jun 24 12:17:40 2020 (r362575) +++ head/lib/libc/tests/gen/MakefileWed Jun 24 13:11:19 2020 (r362576) @@ -35,11 +35,12 @@ posix_spawn_test_FILESPACKAGE= ${PACKAGE} CFLAGS+= -DTEST_LONG_DOUBLE -# Not sure why this isn't defined for all architectures, since most -# have long double. +# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater +# precision than their double. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ -${MACHINE_CPUARCH} == "i386" +${MACHINE_CPUARCH} == "i386" || \ +${MACHINE_CPUARCH} == "riscv" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif Modified: head/lib/libc/tests/stdlib/Makefile == --- head/lib/libc/tests/stdlib/Makefile Wed Jun 24 12:17:40 2020 (r362575) +++ head/lib/libc/tests/stdlib/Makefile Wed Jun 24 13:11:19 2020 (r362576) @@ -19,11 +19,12 @@ ATF_TESTS_CXX+= cxa_thread_atexit_nothr_test # All architectures on FreeBSD have fenv.h CFLAGS+= -D__HAVE_FENV -# Not sure why this isn't defined for all architectures, since most -# have long double. +# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater +# precision than their double. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ -${MACHINE_CPUARCH} == "i386" +${MACHINE_CPUARCH} == "i386" || \ +${MACHINE_CPUARCH} == "riscv" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif Modified: head/lib/msun/tests/Makefile == --- head/lib/msun/tests/MakefileWed Jun 24 12:17:40 2020 (r362575) +++ head/lib/msun/tests/MakefileWed Jun 24 13:11:19 2020 (r362576) @@ -10,11 +10,12 @@ CFLAGS+=-DHAVE_FENV_H # For isqemu.h CFLAGS+= -I${TESTSRC:H}/libc/gen -# Not sure why this isn't defined for all architectures, since most -# have long double. +# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater +# precision than their double. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ -${MACHINE_CPUARCH} == "i386" +${MACHINE_CPUARCH} == "i386" || \ +${MACHINE_CPUARCH} == "riscv" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362575 - head/tests/sys/auditpipe
Author: trasz Date: Wed Jun 24 12:17:40 2020 New Revision: 362575 URL: https://svnweb.freebsd.org/changeset/base/362575 Log: Make sys.auditpipe depend on /dev/auditpipe. This fixes a few failures on armv7. MFC after:2 weeks Sponsored by: DARPA Modified: head/tests/sys/auditpipe/Makefile Modified: head/tests/sys/auditpipe/Makefile == --- head/tests/sys/auditpipe/Makefile Wed Jun 24 12:15:27 2020 (r362574) +++ head/tests/sys/auditpipe/Makefile Wed Jun 24 12:17:40 2020 (r362575) @@ -5,6 +5,7 @@ TESTSDIR= ${TESTSBASE}/sys/auditpipe ATF_TESTS_C= auditpipe_test TEST_METADATA+= required_user="root" +TEST_METADATA+= required_files="/dev/auditpipe" WARNS?=6 .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362574 - head/sys/dev/uart
Author: mw Date: Wed Jun 24 12:15:27 2020 New Revision: 362574 URL: https://svnweb.freebsd.org/changeset/base/362574 Log: Fix AccessWidth and BitWidth parsing in SPCR table The ACPI Specification defines a Generic Address Structure (GAS), which is used to describe UART controller register layout in the SPCR table. The driver responsible for parsing it (uart_cpu_acpi) wrongly associates the Access Size field to the uart_bas's regshft and the register BitWidth to the regiowidth - according to the definitions it should be opposite. This problem remained hidden most likely because the majority of platforms use 32-bit registers (BitWidth) which are accessed with the according size (Dword). However on Marvell Armada 8k / Cn913x platforms, the 32-bit registers should be accessed with Byte granulity, which unveiled the issue. This patch fixes above by proper values assignment and slightly improved parsing. Note that handling of the AccessWidth set to EFI_ACPI_6_0_UNDEFINED is needed to work around a buggy SPCR table on EC2 x86 "bare metal" instances. Reviewed by: manu, imp, cperciva, greg_unrelenting.technology Obtained from: Semihalf MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25373 Modified: head/sys/dev/uart/uart_cpu_acpi.c Modified: head/sys/dev/uart/uart_cpu_acpi.c == --- head/sys/dev/uart/uart_cpu_acpi.c Wed Jun 24 07:25:54 2020 (r362573) +++ head/sys/dev/uart/uart_cpu_acpi.c Wed Jun 24 12:15:27 2020 (r362574) @@ -120,11 +120,46 @@ uart_cpu_acpi_spcr(int devtype, struct uart_devinfo *d (int)spcr->SerialPort.SpaceId); goto out; } - if (spcr->SerialPort.AccessWidth == 0) + switch (spcr->SerialPort.AccessWidth) { + case 0: /* EFI_ACPI_6_0_UNDEFINED */ + /* FALLTHROUGH */ + case 1: /* EFI_ACPI_6_0_BYTE */ + di->bas.regiowidth = 1; + break; + case 2: /* EFI_ACPI_6_0_WORD */ + di->bas.regiowidth = 2; + break; + case 3: /* EFI_ACPI_6_0_DWORD */ + di->bas.regiowidth = 4; + break; + case 4: /* EFI_ACPI_6_0_QWORD */ + di->bas.regiowidth = 8; + break; + default: + printf("UART unsupported access width: %d!\n", + (int)spcr->SerialPort.AccessWidth); + goto out; + } + switch (spcr->SerialPort.BitWidth) { + case 0: + /* FALLTHROUGH */ + case 8: di->bas.regshft = 0; - else - di->bas.regshft = spcr->SerialPort.AccessWidth - 1; - di->bas.regiowidth = spcr->SerialPort.BitWidth / 8; + break; + case 16: + di->bas.regshft = 1; + break; + case 32: + di->bas.regshft = 2; + break; + case 64: + di->bas.regshft = 3; + break; + default: + printf("UART unsupported bit width: %d!\n", + (int)spcr->SerialPort.BitWidth); + goto out; + } switch (spcr->BaudRate) { case 0: /* Special value; means "keep current value unchanged". */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib
On 24 Jun 2020, at 02:41, Kyle Evans wrote: > > On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim wrote: >> >> Author: jkim >> Date: Thu Jun 18 18:09:16 2020 >> New Revision: 362333 >> URL: https://svnweb.freebsd.org/changeset/base/362333 >> >> Log: >> MFV: r362286 >> >> Merge flex 2.6.4. >> > > Hi, > > I'm looking at getting amd64 world buildable again by gcc6; this seems > to give it some gas: > > /usr/src/contrib/flex/src/main.c: In function 'check_options': > /usr/src/contrib/flex/src/main.c:347:14: error: assignment discards > 'const' qualifier from pointer target type > [-Werror=discarded-qualifiers] > if ((slash = strrchr(M4, '/')) != NULL) { > > The following trivial patch seems to make gcc6 happy again. This is a strange one. As gcc6 has been removed from ports, I had to resort to an older 12-STABLE box which still had it, but no matter what I try, I cannot get the warning that is being produced by the CI system. What does it do differently? Also, the warning is indeed bogus, as strrchr() returns a non-const char pointer. As I can't reproduce it, I also can't verify which gcc version fixes the bogus warning. -Dimitry signature.asc Description: Message signed with OpenPGP
svn commit: r362573 - head/tests/sys/geom/class/gate
Author: lwhsu Date: Wed Jun 24 07:25:54 2020 New Revision: 362573 URL: https://svnweb.freebsd.org/changeset/base/362573 Log: Temporarily skip unstable sys.geom.class.gate.ggate_test.ggated on i386 in CI PR: 244737 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/geom/class/gate/ggate_test.sh Modified: head/tests/sys/geom/class/gate/ggate_test.sh == --- head/tests/sys/geom/class/gate/ggate_test.shWed Jun 24 06:35:50 2020(r362572) +++ head/tests/sys/geom/class/gate/ggate_test.shWed Jun 24 07:25:54 2020(r362573) @@ -16,6 +16,11 @@ ggated_head() ggated_body() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/244737"; + fi + load_ggate us=$(alloc_ggate_dev) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"