Re: svn commit: r349010 - head/sbin/camcontrol
On Wed, Jun 12, 2019, 11:19 PM Warner Losh wrote: > Author: imp > Date: Thu Jun 13 05:19:36 2019 > New Revision: 349010 > URL: https://svnweb.freebsd.org/changeset/base/349010 > > Log: > Increase the timeout for READ NATIVE MAX > > READ NATIVE MAX can take longer than a second if the queued NCQ I/Os > take longer than a second to drain. > I didn't mean to commit this with such a short commit message and was planning on getting it reviewed first. So this may change again. Warner Modified: > head/sbin/camcontrol/camcontrol.c > > Modified: head/sbin/camcontrol/camcontrol.c > > == > --- head/sbin/camcontrol/camcontrol.c Thu Jun 13 05:05:58 2019 > (r349009) > +++ head/sbin/camcontrol/camcontrol.c Thu Jun 13 05:19:36 2019 > (r349010) > @@ -2059,7 +2059,7 @@ ata_read_native_max(struct cam_device *device, int > ret >/*sector_count*/0, >/*data_ptr*/NULL, >/*dxfer_len*/0, > - timeout ? timeout : 1000, > + timeout ? timeout : 5000, >is48bit); > > if (error) > > ___ 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: r349011 - head/sys/dev/ciss
Author: imp Date: Thu Jun 13 05:19:42 2019 New Revision: 349011 URL: https://svnweb.freebsd.org/changeset/base/349011 Log: Don't print the request we may be aborting in ciss_notify_abort as part of ciss_detach. It's a left-over debug that isn't needed and also discloses a kernel address. Only root could provoke as part of a devctl or kldunload. Submitted by: Fuqian Huang MFC After: 1 week Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c == --- head/sys/dev/ciss/ciss.cThu Jun 13 05:19:36 2019(r349010) +++ head/sys/dev/ciss/ciss.cThu Jun 13 05:19:42 2019(r349011) @@ -107,6 +107,10 @@ #include #include +#ifdef CISS_DEBUG +#include "opt_ddb.h" +#endif + static MALLOC_DEFINE(CISS_MALLOC_CLASS, "ciss_data", "ciss internal data buffers"); @@ -197,7 +201,9 @@ static void ciss_notify_logical(struct ciss_softc *sc, static voidciss_notify_physical(struct ciss_softc *sc, struct ciss_notify *cn); /* debugging output */ +#ifdef DDB static voidciss_print_request(struct ciss_request *cr); +#endif static voidciss_print_ldrive(struct ciss_softc *sc, struct ciss_ldrive *ld); static const char *ciss_name_ldrive_status(int status); static int ciss_decode_ldrive_status(int status); @@ -3811,8 +3817,9 @@ ciss_notify_abort(struct ciss_softc *sc) cnc->opcode = CISS_OPCODE_WRITE; cnc->command = CISS_COMMAND_ABORT_NOTIFY; cnc->length = htonl(CISS_NOTIFY_DATA_SIZE); - +#if 0 ciss_print_request(cr); +#endif /* * Submit the request and wait for it to complete. @@ -4237,6 +4244,7 @@ ciss_kill_notify_thread(struct ciss_softc *sc) / * Print a request. */ +#ifdef DDB static void ciss_print_request(struct ciss_request *cr) { @@ -4290,6 +4298,7 @@ ciss_print_request(struct ciss_request *cr) } } } +#endif / * Print information about the status of a logical drive. @@ -4353,8 +4362,6 @@ ciss_print_ldrive(struct ciss_softc *sc, struct ciss_l } } -#ifdef CISS_DEBUG -#include "opt_ddb.h" #ifdef DDB #include / @@ -4408,7 +4415,6 @@ DB_COMMAND(ciss_prt, db_ciss_prt) ciss_print_adapter(sc); } } -#endif #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: r349010 - head/sbin/camcontrol
Author: imp Date: Thu Jun 13 05:19:36 2019 New Revision: 349010 URL: https://svnweb.freebsd.org/changeset/base/349010 Log: Increase the timeout for READ NATIVE MAX READ NATIVE MAX can take longer than a second if the queued NCQ I/Os take longer than a second to drain. Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c == --- head/sbin/camcontrol/camcontrol.c Thu Jun 13 05:05:58 2019 (r349009) +++ head/sbin/camcontrol/camcontrol.c Thu Jun 13 05:19:36 2019 (r349010) @@ -2059,7 +2059,7 @@ ata_read_native_max(struct cam_device *device, int ret /*sector_count*/0, /*data_ptr*/NULL, /*dxfer_len*/0, - timeout ? timeout : 1000, + timeout ? timeout : 5000, is48bit); if (error) ___ 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: r349009 - head/tests/sys/net
Author: asomers Date: Thu Jun 13 05:05:58 2019 New Revision: 349009 URL: https://svnweb.freebsd.org/changeset/base/349009 Log: Add test cases for epair Implements the missing test cases for epair in a similar fashion to the existing tests. Fixes shared abstractions to work with epair tests. Submitted by: Ryan Moeller Reviewed by: asomers MFC after:2 weeks Sponsored by: iXsystems, Inc. Differential Revision:https://reviews.freebsd.org/D20498 Modified: head/tests/sys/net/if_clone_test.sh Modified: head/tests/sys/net/if_clone_test.sh == --- head/tests/sys/net/if_clone_test.sh Thu Jun 13 03:48:36 2019 (r349008) +++ head/tests/sys/net/if_clone_test.sh Thu Jun 13 05:05:58 2019 (r349009) @@ -39,6 +39,52 @@ TESTLEN=10 # seconds +atf_test_case epair_stress cleanup +epair_stress_head() +{ + atf_set "descr" "Simultaneously create and destroy an epair(4)" + atf_set "require.user" "root" +} +epair_stress_body() +{ + do_stress "epair" +} +epair_stress_cleanup() +{ + cleanup_ifaces +} + +atf_test_case epair_up_stress cleanup +epair_up_stress_head() +{ + atf_set "descr" "Simultaneously up and detroy an epair(4)" + atf_set "require.user" "root" +} +epair_up_stress_body() +{ + do_up_stress "epair" "" "" +} +epair_up_stress_cleanup() +{ + cleanup_ifaces +} + +atf_test_case epair_ipv6_up_stress cleanup +epair_ipv6_up_stress_head() +{ + atf_set "descr" "Simultaneously up and destroy an epair(4) with IPv6" + atf_set "require.user" "root" +} +epair_ipv6_up_stress_body() +{ + atf_skip "Quickly panics: page fault in in6_unlink_ifa (PR 225438)" + do_up_stress "epair" "6" "" +} +epair_ipv6_up_stress_cleanup() +{ + cleanup_ifaces +} + atf_test_case faith_stress cleanup faith_stress_head() { @@ -369,7 +415,9 @@ vmnet_ipv6_up_stress_cleanup() atf_init_test_cases() { - # TODO: add epair(4) tests, which need a different syntax + atf_add_test_case epair_ipv6_up_stress + atf_add_test_case epair_stress + atf_add_test_case epair_up_stress atf_add_test_case faith_ipv6_up_stress atf_add_test_case faith_stress atf_add_test_case faith_up_stress @@ -396,13 +444,13 @@ atf_init_test_cases() do_stress() { - local IFACE + local IFACE CREATOR_PID DESTROYER_PID IFACE=`get_iface $1` # First thread: create the interface while true; do - ifconfig $IFACE create 2>/dev/null && \ + ifconfig ${IFACE%a} create 2>/dev/null && \ echo -n . >> creator_count.txt done & CREATOR_PID=$! @@ -417,7 +465,7 @@ do_stress() sleep ${TESTLEN} kill $CREATOR_PID kill $DESTROYER_PID - echo "Created $IFACE `stat -f %z creator_count.txt` times." + echo "Created ${IFACE%a} `stat -f %z creator_count.txt` times." echo "Destroyed it `stat -f %z destroyer_count.txt` times." } @@ -428,7 +476,8 @@ do_stress() # $3 p2p for point to point interfaces, anything else for normal interfaces do_up_stress() { - local IFACE IPv6 MAC P2P SRCDIR + local ADDR DSTADDR MASK MEAN_SLEEP_SECONDS MAX_SLEEP_USECS \ + IFACE IPV6 P2P SRCDIR LOOP_PID ipv6_cmd up_cmd # Configure the interface to use an RFC5737 nonrouteable addresses ADDR="192.0.2.2" @@ -464,7 +513,7 @@ do_up_stress() ifconfig $IFACE destroy && echo -n . >> destroy_count.txt ; } & wait - ifconfig $IFACE create + ifconfig ${IFACE%a} create done & LOOP_PID=$! @@ -489,7 +538,11 @@ get_iface() N=$(($N + 1)) fi done - local DEV=${CLASS}${N} + if [ ${CLASS} = "epair" ]; then + DEV=${CLASS}${N}a + else + DEV=${CLASS}${N} + fi # Record the device so we can clean it up later echo ${DEV} >> "devices_to_cleanup" echo ${DEV} @@ -501,11 +554,7 @@ cleanup_ifaces() local DEV for DEV in `cat "devices_to_cleanup"`; do - if [ ${DEV%%[0-9]*a} = "epair" ]; then - ifconfig ${DEV}a destroy - else - ifconfig ${DEV} destroy - fi + ifconfig ${DEV} destroy done true } ___ 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: r349008 - head/stand/efi/boot1
Author: lwhsu Date: Thu Jun 13 03:48:36 2019 New Revision: 349008 URL: https://svnweb.freebsd.org/changeset/base/349008 Log: Fix gcc build by removing redeclaration Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D20622 Modified: head/stand/efi/boot1/boot_module.h Modified: head/stand/efi/boot1/boot_module.h == --- head/stand/efi/boot1/boot_module.h Thu Jun 13 01:23:03 2019 (r349007) +++ head/stand/efi/boot1/boot_module.h Thu Jun 13 03:48:36 2019 (r349008) @@ -109,5 +109,4 @@ extern const boot_module_t zfs_module; /* Functions available to modules. */ extern void add_device(dev_info_t **devinfop, dev_info_t *devinfo); -extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); #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: r349006 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Thu Jun 13 01:21:32 2019 New Revision: 349006 URL: https://svnweb.freebsd.org/changeset/base/349006 Log: Move write aggregation memory copy out of vq_lock. Memory copy is too heavy operation to do under the congested lock. Moving it out reduces congestion by many times to almost invisible. Since the original zio removed from the queue, and the child zio is not executed yet, I don't see why would the copy need protection. My guess it just remained like this from the time when lock was not dropped here, which was added later to fix lock ordering issue. Multi-threaded sequential write tests with both HDD and SSD pools with ZVOL block sizes of 4KB, 16KB, 64KB and 128KB all show major reduction of lock congestion, saving from 15% to 35% of CPU time and increasing throughput from 10% to 40%. Reviewed by: ahrens, behlendorf, ryao MFC after:2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cWed Jun 12 23:09:10 2019(r349005) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cThu Jun 13 01:21:32 2019(r349006) @@ -815,6 +815,18 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) do { dio = nio; nio = AVL_NEXT(t, dio); + zio_add_child(dio, aio); + vdev_queue_io_remove(vq, dio); + } while (dio != last); + + /* +* We need to drop the vdev queue's lock during zio_execute() to +* avoid a deadlock that we could encounter due to lock order +* reversal between vq_lock and io_lock in zio_change_priority(). +* Use the dropped lock to do memory copy without congestion. +*/ + mutex_exit(>vq_lock); + while ((dio = zio_walk_parents(aio, )) != NULL) { ASSERT3U(dio->io_type, ==, aio->io_type); if (dio->io_flags & ZIO_FLAG_NODATA) { @@ -826,16 +838,6 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) dio->io_offset - aio->io_offset, 0, dio->io_size); } - zio_add_child(dio, aio); - vdev_queue_io_remove(vq, dio); - } while (dio != last); - - /* -* We need to drop the vdev queue's lock to avoid a deadlock that we -* could encounter since this I/O will complete immediately. -*/ - mutex_exit(>vq_lock); - while ((dio = zio_walk_parents(aio, )) != NULL) { zio_vdev_io_bypass(dio); zio_execute(dio); } ___ 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: r349005 - head/sys/modules/ocs_fc
Author: bdrewery Date: Wed Jun 12 23:09:10 2019 New Revision: 349005 URL: https://svnweb.freebsd.org/changeset/base/349005 Log: Don't delete .depend files outside of cleandepend. Sponsored by: DellEMC Modified: head/sys/modules/ocs_fc/Makefile Modified: head/sys/modules/ocs_fc/Makefile == --- head/sys/modules/ocs_fc/MakefileWed Jun 12 21:10:37 2019 (r349004) +++ head/sys/modules/ocs_fc/MakefileWed Jun 12 23:09:10 2019 (r349005) @@ -41,6 +41,6 @@ SRCS += ocs_cam.c CINCS = -I. -CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .depend.* +CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .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"
Re: svn commit: r348847 - head/sys/sys
On Wed, Jun 12, 2019 at 4:49 PM Gleb Smirnoff wrote: > On Mon, Jun 10, 2019 at 11:09:09AM +0200, Tijl Coosemans wrote: > T> > Date: Mon Jun 10 05:28:03 2019 > T> > New Revision: 348847 > T> > URL: https://svnweb.freebsd.org/changeset/base/348847 > T> > > T> > Log: > T> > Use C11 anonymous unions. > T> > > T> > PR: 215202 > T> > Reported by: glebius > T> > MFC after: 2 weeks > T> > > T> > Modified: > T> > head/sys/sys/ucred.h > T> > > T> > Modified: head/sys/sys/ucred.h > T> > > == > T> > --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019(r348846) > T> > +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019(r348847) > T> > @@ -89,12 +89,11 @@ struct xucred { > T> >gid_t cr_groups[XU_NGROUPS]; /* groups */ > T> >union { > T> >void*_cr_unused1; /* compatibility with old ucred */ > T> > - pid_t _pid; > T> > - } _cr; > T> > + pid_t cr_pid; > T> > + }; > T> > }; > T> > #define XUCRED_VERSION 0 > T> > > T> > -#define cr_pid _cr._pid > T> > /* This can be used for both ucred and xucred structures. */ > T> > #define cr_gid cr_groups[0] > T> > T> Isn't this a userland header that should work with non-C11 compilers? > > It could make sense to keep such low bar for standard headers, but ucred.h > is BSD-specific header and struct xucred is FreeBSD specific. > This is solvable with proper visibility, I'd think.. Warner ___ 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: r348847 - head/sys/sys
On Mon, Jun 10, 2019 at 11:09:09AM +0200, Tijl Coosemans wrote: T> > Date: Mon Jun 10 05:28:03 2019 T> > New Revision: 348847 T> > URL: https://svnweb.freebsd.org/changeset/base/348847 T> > T> > Log: T> > Use C11 anonymous unions. T> > T> > PR: 215202 T> > Reported by: glebius T> > MFC after: 2 weeks T> > T> > Modified: T> > head/sys/sys/ucred.h T> > T> > Modified: head/sys/sys/ucred.h T> > == T> > --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019(r348846) T> > +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019(r348847) T> > @@ -89,12 +89,11 @@ struct xucred { T> >gid_t cr_groups[XU_NGROUPS]; /* groups */ T> >union { T> >void*_cr_unused1; /* compatibility with old ucred */ T> > - pid_t _pid; T> > - } _cr; T> > + pid_t cr_pid; T> > + }; T> > }; T> > #define XUCRED_VERSION 0 T> > T> > -#define cr_pid _cr._pid T> > /* This can be used for both ucred and xucred structures. */ T> > #define cr_gid cr_groups[0] T> T> Isn't this a userland header that should work with non-C11 compilers? It could make sense to keep such low bar for standard headers, but ucred.h is BSD-specific header and struct xucred is FreeBSD specific. -- Gleb Smirnoff ___ 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: r349004 - in head: . contrib/compiler-rt/lib/sanitizer_common contrib/libunwind/src contrib/llvm/lib/DebugInfo/DWARF contrib/llvm/lib/MC contrib/llvm/lib/Object contrib/llvm/lib/Target/...
Author: dim Date: Wed Jun 12 21:10:37 2019 New Revision: 349004 URL: https://svnweb.freebsd.org/changeset/base/349004 Log: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp to the upstream release_80 branch r363030 (effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a week or so. MFC after:2 weeks Modified: head/ObsoleteFiles.inc head/UPDATING head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc head/contrib/libunwind/src/UnwindRegistersRestore.S head/contrib/libunwind/src/UnwindRegistersSave.S head/contrib/libunwind/src/assembly.h head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp head/contrib/llvm/lib/MC/ELFObjectWriter.cpp head/contrib/llvm/lib/MC/MCWin64EH.cpp head/contrib/llvm/lib/MC/WasmObjectWriter.cpp head/contrib/llvm/lib/Object/COFFImportFile.cpp head/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredExynos.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredicates.td head/contrib/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp head/contrib/llvm/lib/Target/AMDGPU/VOP2Instructions.td head/contrib/llvm/lib/Target/AVR/AVRISelLowering.cpp head/contrib/llvm/lib/Target/AVR/AVRISelLowering.h head/contrib/llvm/lib/Target/AVR/AVRSubtarget.cpp head/contrib/llvm/lib/Target/AVR/AVRSubtarget.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp head/contrib/llvm/lib/Target/Mips/MipsFastISel.cpp head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp head/contrib/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Linux.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp head/contrib/llvm/tools/lld/COFF/Writer.cpp head/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp head/contrib/llvm/tools/lld/ELF/InputSection.cpp head/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp head/contrib/llvm/tools/lld/ELF/Writer.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/lib/clang/freebsd_cc_version.h head/lib/clang/headers/Makefile head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/clang/Config/config.h head/lib/clang/include/lld/Common/Version.inc head/lib/clang/include/llvm/Config/config.h head/lib/clang/include/llvm/Config/llvm-config.h head/lib/clang/include/llvm/Support/VCSRevision.h head/lib/libclang_rt/Makefile.inc head/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/libc++/ (props changed) head/contrib/libunwind/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) head/contrib/openmp/ (props changed) Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Wed Jun 12 20:38:49 2019(r349003) +++ head/ObsoleteFiles.inc Wed Jun 12 21:10:37 2019(r349004) @@ -38,6 +38,157 @@ # xargs -n1 | sort | uniq -d; # done +# 20190612: new clang import which bumps version from 8.0.0 to 8.0.1. +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/esan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/hwasan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/8.0.0
Re: svn commit: r348843 - head/sys/vm
On Mon, Jun 10, 2019 at 09:00:34AM -0400, Shawn Webb wrote: > On Mon, Jun 10, 2019 at 03:07:11AM +, Doug Moore wrote: > > Author: dougm > > Date: Mon Jun 10 03:07:10 2019 > > New Revision: 348843 > > URL: https://svnweb.freebsd.org/changeset/base/348843 > > > > Log: > > There are times when a len==0 parameter to mmap is okay. But on a > > 32-bit machine, a len parameter just a few bytes short of 4G, rounded > > up to a page boundary and hitting zero then, is not okay. Return > > failure in that case. > > > > Reported by: pho > > Reviewed by: alc, kib (mentor) > > Tested by: pho > > Differential Revision: https://reviews.freebsd.org/D20580 > > > > Modified: > > head/sys/vm/vm_mmap.c > > > > Modified: head/sys/vm/vm_mmap.c > > == > > --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019(r348842) > > +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019(r348843) > > @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s > > > > /* Adjust size for rounding (on both ends). */ > > size += pageoff;/* low end... */ > > - size = (vm_size_t) round_page(size);/* hi end */ > > + /* Check for rounding up to zero. */ > > + if (round_page(size) < size) > > + return (EINVAL); > > The mmap(2) manpage says that len==0 results in EINVAL, so the manpage > needs updating. The manpage is correct for ABIs people are actually writing code for (ELF). I suppose it could document the exception for a.out (see the conditional containing SV_CURPROC_FLAG(SV_AOUT) in kern_mmap()), but it should be in BUGS, HISTORY, or some such. -- Brooks signature.asc Description: PGP signature
svn commit: r349003 - head/sys/arm64/arm64
Author: alc Date: Wed Jun 12 20:38:49 2019 New Revision: 349003 URL: https://svnweb.freebsd.org/changeset/base/349003 Log: Change pmap_demote_l2_locked() so that it removes the superpage mapping on a demotion failure. Otherwise, some callers to pmap_demote_l2_locked(), such as pmap_protect(), may leave an incorrect mapping in place on a demotion failure. Change pmap_demote_l2_locked() so that it handles addresses that are not superpage aligned. Some callers to pmap_demote_l2_locked(), such as pmap_protect(), may not pass a superpage aligned address. Change pmap_enter_l2() so that it correctly calls vm_page_free_pages_toq(). The arm64 pmap is updating the count of wired pages when freeing page table pages, so pmap_enter_l2() should pass false to vm_page_free_pages_toq(). Optimize TLB invalidation in pmap_remove_l2(). Reviewed by: kib, markj (an earlier version) Discussed with: andrew MFC after:3 weeks Differential Revision:https://reviews.freebsd.org/D20585 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Wed Jun 12 19:31:26 2019(r349002) +++ head/sys/arm64/arm64/pmap.c Wed Jun 12 20:38:49 2019(r349003) @@ -2267,6 +2267,8 @@ pmap_pv_demote_l2(pmap_t pmap, vm_offset_t va, vm_padd int bit, field; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT((va & L2_OFFSET) == 0, + ("pmap_pv_demote_l2: va is not 2mpage aligned")); KASSERT((pa & L2_OFFSET) == 0, ("pmap_pv_demote_l2: pa is not 2mpage aligned")); CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); @@ -2277,7 +2279,6 @@ pmap_pv_demote_l2(pmap_t pmap, vm_offset_t va, vm_padd * must not be released until the last pv entry is reinstantiated. */ pvh = pa_to_pvh(pa); - va = va & ~L2_OFFSET; pv = pmap_pvh_remove(pvh, pmap, va); KASSERT(pv != NULL, ("pmap_pv_demote_l2: pv not found")); m = PHYS_TO_VM_PAGE(pa); @@ -2433,7 +2434,13 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_ old_l2 = pmap_load_clear(l2); KASSERT((old_l2 & ATTR_DESCR_MASK) == L2_BLOCK, ("pmap_remove_l2: L2e %lx is not a block mapping", old_l2)); - pmap_invalidate_range(pmap, sva, sva + L2_SIZE); + + /* +* Since a promotion must break the 4KB page mappings before making +* the 2MB page mapping, a pmap_invalidate_page() suffices. +*/ + pmap_invalidate_page(pmap, sva); + if (old_l2 & ATTR_SW_WIRED) pmap->pm_stats.wired_count -= L2_SIZE / PAGE_SIZE; pmap_resident_count_dec(pmap, L2_SIZE / PAGE_SIZE); @@ -2571,8 +2578,8 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t pmap_remove_l2(pmap, l2, sva, pmap_load(l1), , ); continue; - } else if (pmap_demote_l2_locked(pmap, l2, - sva &~L2_OFFSET, ) == NULL) + } else if (pmap_demote_l2_locked(pmap, l2, sva, + ) == NULL) continue; l3_paddr = pmap_load(l2); } @@ -3052,8 +3059,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v if (pde != NULL && lvl == 1) { l2 = pmap_l1_to_l2(pde, va); if ((pmap_load(l2) & ATTR_DESCR_MASK) == L2_BLOCK && - (l3 = pmap_demote_l2_locked(pmap, l2, va & ~L2_OFFSET, - )) != NULL) { + (l3 = pmap_demote_l2_locked(pmap, l2, va, )) != NULL) { l3 = [pmap_l3_index(va)]; if (va < VM_MAXUSER_ADDRESS) { mpte = PHYS_TO_VM_PAGE( @@ -3391,7 +3397,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t lockp) != 0) break; } - vm_page_free_pages_toq(, true); + vm_page_free_pages_toq(, false); if (va >= VM_MAXUSER_ADDRESS) { /* * Both pmap_remove_l2() and pmap_remove_l3() will @@ -3419,7 +3425,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t * Invalidate those entries. */ pmap_invalidate_page(pmap, va); - vm_page_free_pages_toq(, true); + vm_page_free_pages_toq(, false); } CTR2(KTR_PMAP, "pmap_enter_l2: failure for va %#lx in pmap %p", @@ -4331,8 +4337,7 @@ retry_pv_loop: va = pv->pv_va; pte = pmap_pte(pmap,
svn commit: r349002 - head/lib/libcasper/services/cap_fileargs
Author: oshogbo Date: Wed Jun 12 19:31:26 2019 New Revision: 349002 URL: https://svnweb.freebsd.org/changeset/base/349002 Log: fileargs: add wrapping/unwrapping functions Those function may be useful to pass fileargs connections around. Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c == --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Wed Jun 12 19:29:48 2019(r349001) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Wed Jun 12 19:31:26 2019(r349002) @@ -424,6 +424,39 @@ fileargs_free(fileargs_t *fa) free(fa); } +cap_channel_t * +fileargs_unwrap(fileargs_t *fa, int *flags) +{ + cap_channel_t *chan; + + if (fa == NULL) + return (NULL); + + assert(fa->fa_magic == FILEARGS_MAGIC); + + chan = fa->fa_chann; + if (flags != NULL) { + *flags = fa->fa_fdflags; + } + + nvlist_destroy(fa->fa_cache); + explicit_bzero(>fa_magic, sizeof(fa->fa_magic)); + free(fa); + + return (chan); +} + +fileargs_t * +fileargs_wrap(cap_channel_t *chan, int fdflags) +{ + + if (chan == NULL) { + return (NULL); + } + + return (fileargs_create(chan, fdflags)); +} + /* * Service functions. */ Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.h == --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Wed Jun 12 19:29:48 2019(r349001) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Wed Jun 12 19:31:26 2019(r349002) @@ -54,6 +54,9 @@ int fileargs_lstat(fileargs_t *fa, const char *name, s int fileargs_open(fileargs_t *fa, const char *name); void fileargs_free(fileargs_t *fa); FILE *fileargs_fopen(fileargs_t *fa, const char *name, const char *mode); + +fileargs_t *fileargs_wrap(cap_channel_t *chan, int fdflags); +cap_channel_t *fileargs_unwrap(fileargs_t *fa, int *fdflags); #else typedef struct fileargs { int fa_flags; @@ -114,7 +117,27 @@ FILE *fileargs_fopen(fileargs_t *fa, const char *name, (void) fa; return (fopen(name, mode)); } -#definefileargs_free(fa) (free(fa)) +#definefileargs_free(fa) (free(fa)) + +static inline fileargs_t * +fileargs_wrap(cap_channel_t *chan, int fdflags) +{ + + cap_close(chan); + return (fileargs_init(0, NULL, fdflags, 0, NULL, 0)); +} + +static inline cap_channel_t * +fileargs_unwrap(fileargs_t *fa, int *fdflags) +{ + + if (fdflags != NULL) { + *fdflags = fa->fa_flags; + } + fileargs_free(fa); + return (cap_init()); +} + #endif #endif /* !_FILEARGS_H_ */ ___ 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: r349000 - head/sys/geom/eli
Author: oshogbo Date: Wed Jun 12 19:29:12 2019 New Revision: 349000 URL: https://svnweb.freebsd.org/changeset/base/349000 Log: geli: partially revert r348709 Let's change the unsigned arguments to the signed one, but let's don't change pointers to the array notation. Requested by: pjd Modified: head/sys/geom/eli/g_eli.h head/sys/geom/eli/g_eli_hmac.c head/sys/geom/eli/pkcs5v2.c head/sys/geom/eli/pkcs5v2.h Modified: head/sys/geom/eli/g_eli.h == --- head/sys/geom/eli/g_eli.h Wed Jun 12 18:07:04 2019(r348999) +++ head/sys/geom/eli/g_eli.h Wed Jun 12 19:29:12 2019(r349000) @@ -721,12 +721,12 @@ struct hmac_ctx { SHA512_CTX outerctx; }; -void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char hkey[], +void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char *hkey, size_t hkeylen); void g_eli_crypto_hmac_update(struct hmac_ctx *ctx, const uint8_t *data, size_t datasize); void g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t *md, size_t mdsize); -void g_eli_crypto_hmac(const char hkey[], size_t hkeysize, +void g_eli_crypto_hmac(const char *hkey, size_t hkeysize, const uint8_t *data, size_t datasize, uint8_t *md, size_t mdsize); void g_eli_key_fill(struct g_eli_softc *sc, struct g_eli_key *key, Modified: head/sys/geom/eli/g_eli_hmac.c == --- head/sys/geom/eli/g_eli_hmac.c Wed Jun 12 18:07:04 2019 (r348999) +++ head/sys/geom/eli/g_eli_hmac.c Wed Jun 12 19:29:12 2019 (r349000) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include void -g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char hkey[], +g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char *hkey, size_t hkeylen) { u_char k_ipad[128], k_opad[128], key[128]; @@ -110,7 +110,7 @@ g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t } void -g_eli_crypto_hmac(const char hkey[], size_t hkeysize, const uint8_t *data, +g_eli_crypto_hmac(const char *hkey, size_t hkeysize, const uint8_t *data, size_t datasize, uint8_t *md, size_t mdsize) { struct hmac_ctx ctx; Modified: head/sys/geom/eli/pkcs5v2.c == --- head/sys/geom/eli/pkcs5v2.c Wed Jun 12 18:07:04 2019(r348999) +++ head/sys/geom/eli/pkcs5v2.c Wed Jun 12 19:29:12 2019(r349000) @@ -52,7 +52,7 @@ xor(uint8_t *dst, const uint8_t *src, size_t size) void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt, -size_t saltsize, const char passphrase[], u_int iterations) +size_t saltsize, const char *passphrase, u_int iterations) { uint8_t md[SHA512_MDLEN], saltcount[saltsize + sizeof(uint32_t)]; uint8_t *counter, *keyp; Modified: head/sys/geom/eli/pkcs5v2.h == --- head/sys/geom/eli/pkcs5v2.h Wed Jun 12 18:07:04 2019(r348999) +++ head/sys/geom/eli/pkcs5v2.h Wed Jun 12 19:29:12 2019(r349000) @@ -31,7 +31,7 @@ #ifndef _PKCS5V2_H_ #define_PKCS5V2_H_ void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt, -size_t saltsize, const char passphrase[], u_int iterations); +size_t saltsize, const char *passphrase, u_int iterations); #ifndef _KERNEL int pkcs5v2_calculate(int usecs); #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: r349001 - head/sys/geom/eli
Author: oshogbo Date: Wed Jun 12 19:29:48 2019 New Revision: 349001 URL: https://svnweb.freebsd.org/changeset/base/349001 Log: geli: style nits Modified: head/sys/geom/eli/g_eli_hmac.c Modified: head/sys/geom/eli/g_eli_hmac.c == --- head/sys/geom/eli/g_eli_hmac.c Wed Jun 12 19:29:12 2019 (r349000) +++ head/sys/geom/eli/g_eli_hmac.c Wed Jun 12 19:29:48 2019 (r349001) @@ -96,11 +96,11 @@ g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t /* Complete inner hash */ SHA512_Final(digest, >innerctx); - + /* Complete outer hash */ SHA512_Update(>outerctx, digest, sizeof(digest)); SHA512_Final(digest, >outerctx); - + explicit_bzero(ctx, sizeof(*ctx)); /* mdsize == 0 means "Give me the whole hash!" */ if (mdsize == 0) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r348999 - in head: bin/stty share/man/man4 sys/dev/uart sys/dev/usb/serial sys/kern sys/sys
Author: shurd Date: Wed Jun 12 18:07:04 2019 New Revision: 348999 URL: https://svnweb.freebsd.org/changeset/base/348999 Log: Some devices take undesired actions when RTS and DTR are asserted. Some development boards for example will reset on DTR, and some radio interfaces will transmit on RTS. This patch allows "stty -f /dev/ttyu9.init -rtsdtr" to prevent RTS and DTR from being asserted on open(), allowing these devices to be used without problems. Reviewed by:imp Differential Revision: https://reviews.freebsd.org/D20031 Modified: head/bin/stty/modes.c head/bin/stty/print.c head/bin/stty/stty.1 head/share/man/man4/termios.4 head/sys/dev/uart/uart_tty.c head/sys/dev/usb/serial/umcs.c head/sys/dev/usb/serial/usb_serial.c head/sys/kern/tty.c head/sys/sys/_termios.h Modified: head/bin/stty/modes.c == --- head/bin/stty/modes.c Wed Jun 12 16:49:01 2019(r348998) +++ head/bin/stty/modes.c Wed Jun 12 18:07:04 2019(r348999) @@ -91,6 +91,8 @@ static const struct modes cmodes[] = { { "-rtsflow", 0, CRTS_IFLOW }, { "mdmbuf", MDMBUF, 0 }, { "-mdmbuf",0, MDMBUF }, + { "rtsdtr", 0, CNO_RTSDTR }, + { "-rtsdtr",CNO_RTSDTR, 0 }, { NULL, 0, 0 }, }; Modified: head/bin/stty/print.c == --- head/bin/stty/print.c Wed Jun 12 16:49:01 2019(r348998) +++ head/bin/stty/print.c Wed Jun 12 18:07:04 2019(r348999) @@ -184,6 +184,12 @@ print(struct termios *tp, struct winsize *wp, int ldis put("-dsrflow", CDSR_OFLOW, 0); put("-dtrflow", CDTR_IFLOW, 0); put("-mdmbuf", MDMBUF, 0); /* XXX mdmbuf == dtrflow */ + if (on(CNO_RTSDTR)) + bput("-rtsdtr"); + else { + if (fmt >= BSD) + bput("rtsdtr"); + } /* special control characters */ cc = tp->c_cc; Modified: head/bin/stty/stty.1 == --- head/bin/stty/stty.1Wed Jun 12 16:49:01 2019(r348998) +++ head/bin/stty/stty.1Wed Jun 12 18:07:04 2019(r348999) @@ -145,6 +145,8 @@ Assume a line without (with) modem control. .It Cm crtscts Pq Fl crtscts Enable (disable) RTS/CTS flow control. +.It Cm rtsdtr Pq Fl -rtsdtr +Enable (disable) asserting RTS/DTR on open. .El .Ss Input Modes: This corresponds to the c_iflag in the termios structure. Modified: head/share/man/man4/termios.4 == --- head/share/man/man4/termios.4 Wed Jun 12 16:49:01 2019 (r348998) +++ head/share/man/man4/termios.4 Wed Jun 12 18:07:04 2019 (r348999) @@ -1185,6 +1185,8 @@ flow control of output */ /* RTS flow control of input */ .It Dv MDMBUF /* flow control output via Carrier */ +.It Dv CNO_RTSDTR +/* Do not assert RTS or DTR automatically */ .El .Pp The @@ -1266,6 +1268,12 @@ If .Dv MDMBUF is set then output flow control is controlled by the state of Carrier Detect. +.Pp +If +.Dv CNO_RTSDTR +is set then the RTS and DTR lines will not be asserted when the device +is opened. +As a result, this flag is only useful on initial-state devices. .Pp If the object for which the control modes are set is not an asynchronous serial connection, some of the modes may be ignored; for example, if an Modified: head/sys/dev/uart/uart_tty.c == --- head/sys/dev/uart/uart_tty.cWed Jun 12 16:49:01 2019 (r348998) +++ head/sys/dev/uart/uart_tty.cWed Jun 12 18:07:04 2019 (r348999) @@ -285,13 +285,16 @@ uart_tty_param(struct tty *tp, struct termios *t) parity = UART_PARITY_NONE; if (UART_PARAM(sc, t->c_ospeed, databits, stopbits, parity) != 0) return (EINVAL); - UART_SETSIG(sc, SER_DDTR | SER_DTR); + if ((t->c_cflag & CNO_RTSDTR) == 0) + UART_SETSIG(sc, SER_DDTR | SER_DTR); /* Set input flow control state. */ if (!sc->sc_hwiflow) { if ((t->c_cflag & CRTS_IFLOW) && sc->sc_isquelch) UART_SETSIG(sc, SER_DRTS); - else - UART_SETSIG(sc, SER_DRTS | SER_RTS); + else { + if ((t->c_cflag & CNO_RTSDTR) == 0) + UART_SETSIG(sc, SER_DRTS | SER_RTS); + } } else UART_IOCTL(sc, UART_IOCTL_IFLOW, (t->c_cflag & CRTS_IFLOW)); /* Set output flow control state. */ Modified: head/sys/dev/usb/serial/umcs.c == --- head/sys/dev/usb/serial/umcs.c Wed Jun 12 16:49:01 2019
svn commit: r348998 - head/usr.sbin/bhyve
Author: jhb Date: Wed Jun 12 16:49:01 2019 New Revision: 348998 URL: https://svnweb.freebsd.org/changeset/base/348998 Log: Remove a spurious break when setting up a 64-bit memory BAR. This was causing 'enbit' to not be initialized in this case. CID: 1401924 Reported by: Coverity MFC after:1 week Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c == --- head/usr.sbin/bhyve/pci_emul.c Wed Jun 12 16:34:02 2019 (r348997) +++ head/usr.sbin/bhyve/pci_emul.c Wed Jun 12 16:49:01 2019 (r348998) @@ -634,7 +634,6 @@ pci_emul_alloc_pbar(struct pci_devinst *pdi, int idx, mask = PCIM_BAR_MEM_BASE; lobits = PCIM_BAR_MEM_SPACE | PCIM_BAR_MEM_64 | PCIM_BAR_MEM_PREFETCH; - break; } else { baseptr = _emul_membase32; limit = PCI_EMUL_MEMLIMIT32; ___ 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: r348996 - head/sys/dev/ipmi
Author: jtl Date: Wed Jun 12 16:06:31 2019 New Revision: 348996 URL: https://svnweb.freebsd.org/changeset/base/348996 Log: The current IPMI KCS code is waiting 100us for all transitions (roughly between each byte either sent or received). However, most transitions actually complete in 2-3 microseconds. By polling the status register with a delay of 4us with exponential backoff, the performance of most IPMI operations is significantly improved: - A BMC update on a Supermicro x9 or x11 motherboard goes from ~1 hour to ~6-8 minutes. - An ipmitool sensor list time improves by a factor of 4. Testing showed no significant improvements on a modern server by using a lower delay. The changes should also generally reduce the total amount of CPU or I/O bandwidth used for a given IPMI operation. Submitted by: Loic Prylli Reviewed by: jhb MFC after:2 weeks Sponsored by: Netflix Differential Revision:https://reviews.freebsd.org/D20527 Modified: head/sys/dev/ipmi/ipmi_kcs.c Modified: head/sys/dev/ipmi/ipmi_kcs.c == --- head/sys/dev/ipmi/ipmi_kcs.cWed Jun 12 16:05:20 2019 (r348995) +++ head/sys/dev/ipmi/ipmi_kcs.cWed Jun 12 16:06:31 2019 (r348996) @@ -48,55 +48,46 @@ __FBSDID("$FreeBSD$"); #include #endif +#definePOLLING_DELAY_MIN 4 /* Waits are 2-3 usecs on typical systems */ +#definePOLLING_DELAY_MAX 256 + static voidkcs_clear_obf(struct ipmi_softc *, int); static voidkcs_error(struct ipmi_softc *); -static int kcs_wait_for_ibf(struct ipmi_softc *, int); -static int kcs_wait_for_obf(struct ipmi_softc *, int); +static int kcs_wait_for_ibf(struct ipmi_softc *, bool); +static int kcs_wait_for_obf(struct ipmi_softc *, bool); static int -kcs_wait_for_ibf(struct ipmi_softc *sc, int state) +kcs_wait(struct ipmi_softc *sc, int value, int mask) { int status, start = ticks; + int delay_usec = POLLING_DELAY_MIN; status = INB(sc, KCS_CTL_STS); - if (state == 0) { - /* WAIT FOR IBF = 0 */ - while (ticks - start < MAX_TIMEOUT && status & KCS_STATUS_IBF) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } - } else { - /* WAIT FOR IBF = 1 */ - while (ticks - start < MAX_TIMEOUT && - !(status & KCS_STATUS_IBF)) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } + while (ticks - start < MAX_TIMEOUT && (status & mask) != value) { + /* +* The wait delay is increased exponentially to avoid putting +* significant load on I/O bus. +*/ + DELAY(delay_usec); + status = INB(sc, KCS_CTL_STS); + if (delay_usec < POLLING_DELAY_MAX) + delay_usec *= 2; } return (status); } static int -kcs_wait_for_obf(struct ipmi_softc *sc, int state) +kcs_wait_for_ibf(struct ipmi_softc *sc, bool level) { - int status, start = ticks; - status = INB(sc, KCS_CTL_STS); - if (state == 0) { - /* WAIT FOR OBF = 0 */ - while (ticks - start < MAX_TIMEOUT && status & KCS_STATUS_OBF) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } - } else { - /* WAIT FOR OBF = 1 */ - while (ticks - start < MAX_TIMEOUT && - !(status & KCS_STATUS_OBF)) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } - } - return (status); + return (kcs_wait(sc, level ? KCS_STATUS_IBF : 0, KCS_STATUS_IBF)); +} + +static int +kcs_wait_for_obf(struct ipmi_softc *sc, bool level) +{ + + return (kcs_wait(sc, level ? KCS_STATUS_OBF : 0, KCS_STATUS_OBF)); } static void ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r348995 - head/sys/modules/hwpmc
Author: ian Date: Wed Jun 12 16:05:20 2019 New Revision: 348995 URL: https://svnweb.freebsd.org/changeset/base/348995 Log: Don't attempt to include hwpmc support for armv6, we're missing some of the necessary support functions in cpu-v6.h, and it may be that the only armv6 platform we support (RPi, the bcm2835 SOC) is incapable of supporting hwpmc. Reported by: dim@ Modified: head/sys/modules/hwpmc/Makefile Modified: head/sys/modules/hwpmc/Makefile == --- head/sys/modules/hwpmc/Makefile Wed Jun 12 15:58:11 2019 (r348994) +++ head/sys/modules/hwpmc/Makefile Wed Jun 12 16:05:20 2019 (r348995) @@ -22,7 +22,7 @@ SRCS+=hwpmc_x86.c hwpmc_uncore.c SRCS+= hwpmc_arm.c .endif -.if ${MACHINE_ARCH:Marmv[67]*} != "" +.if ${MACHINE_ARCH} == "armv7" SRCS+= hwpmc_armv7.c .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: r348994 - head/sys/powerpc/aim
Author: bdragon Date: Wed Jun 12 15:58:11 2019 New Revision: 348994 URL: https://svnweb.freebsd.org/changeset/base/348994 Log: Fix PPC970 boot after r348783 r348783 changed the behavior of the kernel mappings and broke booting on G5. - Split the kernel mapping logic out so that the case where we are running from the wrong memory space is handled using identity mappings, and the case where we are not using a DMAP is handled by forcibly mapping the kernel into the dmap range as intended by r348783. Reported by: Mikael Urankar Reviewed by: luporl Approved by: jhibbits (mentor) Differential Revision:https://reviews.freebsd.org/D20608 Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c == --- head/sys/powerpc/aim/mmu_oea64.cWed Jun 12 13:34:12 2019 (r348993) +++ head/sys/powerpc/aim/mmu_oea64.cWed Jun 12 15:58:11 2019 (r348994) @@ -684,8 +684,16 @@ moea64_setup_direct_map(mmu_t mmup, vm_offset_t kernel * without a direct map or on which the kernel is not already executing * out of the direct-mapped region. */ - - if (!hw_direct_map || kernelstart < DMAP_BASE_ADDRESS) { + if (kernelstart < DMAP_BASE_ADDRESS) { + /* +* For pre-dmap execution, we need to use identity mapping +* because we will be operating with the mmu on but in the +* wrong address configuration until we __restartkernel(). +*/ + for (pa = kernelstart & ~PAGE_MASK; pa < kernelend; + pa += PAGE_SIZE) + moea64_kenter(mmup, pa, pa); + } else if (!hw_direct_map) { pkernelstart = kernelstart & ~DMAP_BASE_ADDRESS; pkernelend = kernelend & ~DMAP_BASE_ADDRESS; for (pa = pkernelstart & ~PAGE_MASK; pa < pkernelend; ___ 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: r348993 - in head: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive_fe contrib/libarchive/tar lib/libarchive usr.bin/bsdcat usr.bin/cpio usr.bin/tar
Author: mm Date: Wed Jun 12 13:34:12 2019 New Revision: 348993 URL: https://svnweb.freebsd.org/changeset/base/348993 Log: MFV r348971,r348977: Sync libarchive with vendor. Relevant vendor changes: - check_symlinks_fsobj() without chdir() and fchdir() - bsdtar.1 manpage fixes - patches from OpenBSD to libarchive_fe/passphrase.c - version bumped to 3.4.0 MFC after:2 weeks Modified: head/contrib/libarchive/NEWS head/contrib/libarchive/README.md head/contrib/libarchive/libarchive/archive.h head/contrib/libarchive/libarchive/archive_entry.h head/contrib/libarchive/libarchive/archive_write_add_filter_b64encode.c head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive_fe/line_reader.c head/contrib/libarchive/libarchive_fe/passphrase.c head/contrib/libarchive/tar/bsdtar.1 head/lib/libarchive/config_freebsd.h head/usr.bin/bsdcat/Makefile head/usr.bin/cpio/Makefile head/usr.bin/tar/Makefile Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/NEWS == --- head/contrib/libarchive/NEWSWed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/NEWSWed Jun 12 13:34:12 2019 (r348993) @@ -1,3 +1,7 @@ +Jun 11, 2019: libarchive 3.4.0 released + +May 18, 2019: Fixes for reading Android APK and JAR archives + Apr 16, 2019: Support for non-recursive list and extract Apr 14, 2019: New tar option: --exclude-vcs @@ -6,7 +10,7 @@ Mar 27, 2019: Support for file and directory symlinks Mar 12, 2019: Important fixes for storing file attributes and flags -Jan 20, 2019: Support for xz, lzma, ppmd8 and bzip2 compression in zip archives +Jan 20, 2019: Support for xz, lzma, ppmd8 and bzip2 decompression in ZIP files Oct 06, 2018: RAR 5.0 reader Modified: head/contrib/libarchive/README.md == --- head/contrib/libarchive/README.md Wed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/README.md Wed Jun 12 13:34:12 2019 (r348993) @@ -81,6 +81,7 @@ Currently, the library automatically detects and reads * Binary cpio (big-endian or little-endian) * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions) * ZIP archives (with uncompressed or "deflate" compressed entries, including support for encrypted Zip archives) + * ZIPX archives (with support for bzip2, ppmd8, lzma and xz compressed entries) * GNU and BSD 'ar' archives * 'mtree' format * 7-Zip archives Modified: head/contrib/libarchive/libarchive/archive.h == --- head/contrib/libarchive/libarchive/archive.hWed Jun 12 12:19:34 2019(r348992) +++ head/contrib/libarchive/libarchive/archive.hWed Jun 12 13:34:12 2019(r348993) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#defineARCHIVE_VERSION_NUMBER 3003003 +#defineARCHIVE_VERSION_NUMBER 3004000 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#defineARCHIVE_VERSION_ONLY_STRING "3.3.3" +#defineARCHIVE_VERSION_ONLY_STRING "3.4.0" #defineARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); Modified: head/contrib/libarchive/libarchive/archive_entry.h == --- head/contrib/libarchive/libarchive/archive_entry.h Wed Jun 12 12:19:34 2019(r348992) +++ head/contrib/libarchive/libarchive/archive_entry.h Wed Jun 12 13:34:12 2019(r348993) @@ -30,7 +30,7 @@ #defineARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#defineARCHIVE_VERSION_NUMBER 3003003 +#defineARCHIVE_VERSION_NUMBER 3004000 /* * Note: archive_entry.h is for use outside of libarchive; the Modified: head/contrib/libarchive/libarchive/archive_write_add_filter_b64encode.c == --- head/contrib/libarchive/libarchive/archive_write_add_filter_b64encode.c Wed Jun 12 12:19:34 2019(r348992) +++ head/contrib/libarchive/libarchive/archive_write_add_filter_b64encode.c Wed Jun 12 13:34:12 2019(r348993) @@ -60,7 +60,7 @@ static int archive_filter_b64encode_write(struct archi const void *, size_t); static int archive_filter_b64encode_close(struct archive_write_filter *); static int archive_filter_b64encode_free(struct archive_write_filter *); -static void
Re: svn commit: r348981 - head/etc/mtree
On Wed, 12 Jun 2019 03:03:10 -0700 (PDT) "Rodney W. Grimes" wrote: > > Author: manu > > Date: Wed Jun 12 09:16:42 2019 > > New Revision: 348981 > > URL: https://svnweb.freebsd.org/changeset/base/348981 > > > > Log: > > pkgbase: Set a default package=runtime for var directories > > > > This way every directory is at least present in packages. > > While here tag some directory from being in sendmail or dma > > > > Reviewed by: bapt > > MFC after:1 month > > Differential Revision:https://reviews.freebsd.org/D20605 > > > > Modified: > > head/etc/mtree/BSD.var.dist > > > > Modified: head/etc/mtree/BSD.var.dist > > == > > --- head/etc/mtree/BSD.var.dist Wed Jun 12 01:53:14 2019 > > (r348980) > > +++ head/etc/mtree/BSD.var.dist Wed Jun 12 09:16:42 2019 > > (r348981) > > @@ -3,7 +3,7 @@ > > # Please see the file src/etc/mtree/README before making changes to this > > file. > > # > > > > -/set type=dir uname=root gname=wheel mode=0755 > > +/set type=dir uname=root gname=wheel mode=0755 tags=package=runtime > > . > > account > > .. > > @@ -32,7 +32,7 @@ > > .. > > crash > > .. > > -crontags=package=runtime > > +cron > > tabsmode=0700 > > .. > > .. > > @@ -59,21 +59,21 @@ > > .. > > .. > > .. > > -empty mode=0555 flags=schg tags=package=runtime > > +empty mode=0555 flags=schg > > .. > > games gname=games mode=0775 > > .. > > heimdal mode=0700 > > .. > > -log tags=package=runtime > > +log > > .. > > -mailgname=mail mode=0775 tags=package=runtime > > +mailgname=mail mode=0775 > > .. > > msgsuname=daemon > > .. > > preserve > > .. > > -run tags=package=runtime > > +run > > dhclient > > .. > > ppp gname=network mode=0770 > > @@ -84,16 +84,18 @@ > > rwhogname=daemon mode=0775 > > .. > > spool > > -dma uname=root gname=mail mode=0770 > > +clientmqueue uname=smmsp gname=smmsp mode=0770 > > tags=package=sendmail > > .. > > -lockuname=uucp gname=dialer mode=0775 > > +dma uname=root gname=mail mode=0770 tags=package=dma > > .. > > +lockuname=uucp gname=dialer > > Is loss of mode=0775 intentional here?? I think that may break cu locks. I miss read the mode=0755 above. > > +.. > > /set gname=daemon > > lpd > > .. > > -mqueue > > +mqueue tags=package=sendmail > > .. > > -opielocks mode=0700 > > +opielocks > > Again, loss of mode??? Both mode are restored in 348990, thanks for noticing. > > > .. > > output > > lpd > > @@ -101,7 +103,7 @@ > > .. > > /set gname=wheel > > .. > > -tmp mode=01777 tags=package=runtime > > +tmp mode=01777 > > vi.recover mode=01777 > > .. > > .. > > > > -- > Rod Grimes rgri...@freebsd.org -- Emmanuel Vadot ___ 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: r348990 - head/etc/mtree
Author: manu Date: Wed Jun 12 11:34:16 2019 New Revision: 348990 URL: https://svnweb.freebsd.org/changeset/base/348990 Log: mtree: Restore mode for /var/spool/lock and opielocks mode was dropped unintentionally in r348981 for those two directories. Reviewed by: rgrimes MFC after:1 month X-MFC-With: r348981 Modified: head/etc/mtree/BSD.var.dist Modified: head/etc/mtree/BSD.var.dist == --- head/etc/mtree/BSD.var.dist Wed Jun 12 11:18:11 2019(r348989) +++ head/etc/mtree/BSD.var.dist Wed Jun 12 11:34:16 2019(r348990) @@ -88,14 +88,14 @@ .. dma uname=root gname=mail mode=0770 tags=package=dma .. -lockuname=uucp gname=dialer +lockuname=uucp gname=dialer mode=0775 .. /set gname=daemon lpd .. mqueue tags=package=sendmail .. -opielocks +opielocks mode=0700 .. output lpd ___ 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: r348989 - head/sys/contrib/ipfilter/netinet
In message <201906121118.x5cbibnj071...@repo.freebsd.org>, Cy Schubert writes: > Author: cy > Date: Wed Jun 12 11:18:11 2019 > New Revision: 348989 > URL: https://svnweb.freebsd.org/changeset/base/348989 > > Log: > Whitespace adjustments replacing spaces with tabs. > > MFC after: 1 month > X-MFC with: r348987 > > Modified: > head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c > > Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c > = > = > --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.cWed Jun 12 11:0 > 9:33 2019 (r348988) > +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.cWed Jun 12 11:1 > 8:11 2019 (r348989) > @@ -1480,21 +1480,21 @@ ipf_pcksum6(fin, ip6, off, len) > > sp = (u_short *)>ip6_src; > sum = *sp++; /* ip6_src */ > -sum += *sp++; > -sum += *sp++; > -sum += *sp++; > -sum += *sp++; > -sum += *sp++; > -sum += *sp++; > -sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > sum += *sp++; /* ip6_dst */ > -sum += *sp++; > -sum += *sp++; > -sum += *sp++; > -sum += *sp++; > -sum += *sp++; > -sum += *sp++; > -sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > return(ipf_pcksum(fin, off, sum)); > } > #endif > The reason for this latecomer is this change was in my use-everyday svn tree I boot from while the version with the incorrect whitespace was in my git repo I commit from. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ 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: r348989 - head/sys/contrib/ipfilter/netinet
Author: cy Date: Wed Jun 12 11:18:11 2019 New Revision: 348989 URL: https://svnweb.freebsd.org/changeset/base/348989 Log: Whitespace adjustments replacing spaces with tabs. MFC after:1 month X-MFC with: r348987 Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c == --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 12 11:09:33 2019(r348988) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 12 11:18:11 2019(r348989) @@ -1480,21 +1480,21 @@ ipf_pcksum6(fin, ip6, off, len) sp = (u_short *)>ip6_src; sum = *sp++; /* ip6_src */ -sum += *sp++; -sum += *sp++; -sum += *sp++; -sum += *sp++; -sum += *sp++; -sum += *sp++; -sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; sum += *sp++; /* ip6_dst */ -sum += *sp++; -sum += *sp++; -sum += *sp++; -sum += *sp++; -sum += *sp++; -sum += *sp++; -sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; return(ipf_pcksum(fin, off, sum)); } #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: r348987 - head/sys/contrib/ipfilter/netinet
Author: cy Date: Wed Jun 12 11:06:58 2019 New Revision: 348987 URL: https://svnweb.freebsd.org/changeset/base/348987 Log: Resolve IPv6 checksum errors with stateful inspection. According to PR/203585 this appears to have been broken by r235959, which predates the ipfilter 5.1.2 import into FreeBSD. The IPv6 checksum calculation is incorrect. To resolve this we call in6_cksum() to do the the heavy lifting for us, through a new function ipf_pcksum6(). Should we need to revisit this area again, a DTrace probe is added to aid with future debugging. PR: 203275, 203585 MFC after:1 month Differential Revision:https://reviews.freebsd.org/D20583 Modified: head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_fil.h head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/fil.c == --- head/sys/contrib/ipfilter/netinet/fil.c Wed Jun 12 11:06:54 2019 (r348986) +++ head/sys/contrib/ipfilter/netinet/fil.c Wed Jun 12 11:06:58 2019 (r348987) @@ -3422,35 +3422,21 @@ fr_cksum(fin, ip, l4proto, l4hdr) sum += *sp++; sum += *sp++; /* ip_dst */ sum += *sp++; + slen = fin->fin_plen - off; + sum += htons(slen); #ifdef USE_INET6 } else if (IP_V(ip) == 6) { + mb_t *m; + + m = fin->fin_m; ip6 = (ip6_t *)ip; - hlen = sizeof(*ip6); - off = ((char *)fin->fin_dp - (char *)fin->fin_ip); - sp = (u_short *)>ip6_src; - sum += *sp++; /* ip6_src */ - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - /* This needs to be routing header aware. */ - sum += *sp++; /* ip6_dst */ - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; + off = ((caddr_t)ip6 - m->m_data) + sizeof(struct ip6_hdr); + int len = ntohs(ip6->ip6_plen) - (off - sizeof(*ip6)); + return(ipf_pcksum6(fin, ip6, off, len)); } else { return 0x; } #endif - slen = fin->fin_plen - off; - sum += htons(slen); switch (l4proto) { @@ -6645,6 +6631,12 @@ ipf_checkl4sum(fin) if ((fin->fin_flx & (FI_FRAG|FI_SHORT|FI_BAD)) != 0) return 1; + DT2(l4sumo, int, fin->fin_out, int, (int)fin->fin_p); + if (fin->fin_out == 1) { + fin->fin_cksum = FI_CK_SUMOK; + return 0; + } + csump = NULL; hdrsum = 0; dosum = 0; @@ -6696,7 +6688,11 @@ ipf_checkl4sum(fin) } #endif DT2(l4sums, u_short, hdrsum, u_short, sum); +#ifdef USE_INET6 + if (hdrsum == sum || (sum == 0 && fin->fin_p == IPPROTO_ICMPV6)) { +#else if (hdrsum == sum) { +#endif fin->fin_cksum = FI_CK_SUMOK; return 0; } Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h == --- head/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jun 12 11:06:54 2019 (r348986) +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jun 12 11:06:58 2019 (r348987) @@ -1836,6 +1836,10 @@ extern int ipf_matchicmpqueryreply __P((int, icmpinfo struct icmp *, int)); extern u_32_t ipf_newisn __P((fr_info_t *)); extern u_int ipf_pcksum __P((fr_info_t *, int, u_int)); +#ifdef USE_INET6 +extern u_int ipf_pcksum6 __P((fr_info_t *, ip6_t *, + u_int32_t, u_int32_t)); +#endif extern voidipf_rule_expire __P((ipf_main_softc_t *)); extern int ipf_scanlist __P((fr_info_t *, u_32_t)); extern frentry_t *ipf_srcgrpmap __P((fr_info_t *, u_32_t *)); Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c == --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 12 11:06:54 2019(r348986) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 12 11:06:58 2019(r348987) @@ -1446,3 +1446,56 @@ ipf_pcksum(fin, hlen, sum) sum2 = ~sum & 0x; return sum2; } + +#ifdef USE_INET6 +#ifdef _KERNEL +u_int +ipf_pcksum6(fin, ip6, off, len) + fr_info_t *fin; + ip6_t *ip6; + u_int32_t off; + u_int32_t len; +{ + struct mbuf *m; + int sum; + + m = fin->fin_m; + if
svn commit: r348985 - head/sys/contrib/ipfilter/netinet
Author: cy Date: Wed Jun 12 11:06:51 2019 New Revision: 348985 URL: https://svnweb.freebsd.org/changeset/base/348985 Log: Enclose a long multi-line single conditional statement in braces to improve legibility and aesthetics. MFC after:1 week Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c == --- head/sys/contrib/ipfilter/netinet/mlfk_ipl.cWed Jun 12 10:50:17 2019(r348984) +++ head/sys/contrib/ipfilter/netinet/mlfk_ipl.cWed Jun 12 11:06:51 2019(r348985) @@ -211,7 +211,7 @@ vnet_ipf_init(void) else defpass = "no-match -> block"; - if (IS_DEFAULT_VNET(curvnet)) + if (IS_DEFAULT_VNET(curvnet)) { printf("%s initialized. Default = %s all, Logging = %s%s\n", ipfilter_version, defpass, #ifdef IPFILTER_LOG @@ -225,6 +225,7 @@ vnet_ipf_init(void) "" #endif ); + } } VNET_SYSINIT(vnet_ipf_init, SI_SUB_PROTO_FIREWALL, SI_ORDER_THIRD, vnet_ipf_init, NULL); ___ 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: r348986 - head/sys/contrib/ipfilter/netinet
Author: cy Date: Wed Jun 12 11:06:54 2019 New Revision: 348986 URL: https://svnweb.freebsd.org/changeset/base/348986 Log: Register pfil hooks when VNET != vnet0. r302298, which virtualized ipf, assumed the pfil hook registration performed in ipf_modload() would take care of this. However ipf_modload() is only called when the ipl kld is loaded or when ipfilter is first called when it is statically linked into the kernel at build time. Prior to this, even though r302298 has been in the tree for a while, it has never been used. So, r302298 in reality begins now. PR: 212000 Reported by: ahsanb@ MFC after:1 month Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c == --- head/sys/contrib/ipfilter/netinet/mlfk_ipl.cWed Jun 12 11:06:51 2019(r348985) +++ head/sys/contrib/ipfilter/netinet/mlfk_ipl.cWed Jun 12 11:06:54 2019(r348986) @@ -225,6 +225,9 @@ vnet_ipf_init(void) "" #endif ); + } else { + (void)ipf_pfil_hook(); + ipf_event_reg(); } } VNET_SYSINIT(vnet_ipf_init, SI_SUB_PROTO_FIREWALL, SI_ORDER_THIRD, ___ 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: r348981 - head/etc/mtree
> Author: manu > Date: Wed Jun 12 09:16:42 2019 > New Revision: 348981 > URL: https://svnweb.freebsd.org/changeset/base/348981 > > Log: > pkgbase: Set a default package=runtime for var directories > > This way every directory is at least present in packages. > While here tag some directory from being in sendmail or dma > > Reviewed by:bapt > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D20605 > > Modified: > head/etc/mtree/BSD.var.dist > > Modified: head/etc/mtree/BSD.var.dist > == > --- head/etc/mtree/BSD.var.dist Wed Jun 12 01:53:14 2019 > (r348980) > +++ head/etc/mtree/BSD.var.dist Wed Jun 12 09:16:42 2019 > (r348981) > @@ -3,7 +3,7 @@ > # Please see the file src/etc/mtree/README before making changes to this > file. > # > > -/set type=dir uname=root gname=wheel mode=0755 > +/set type=dir uname=root gname=wheel mode=0755 tags=package=runtime > . > account > .. > @@ -32,7 +32,7 @@ > .. > crash > .. > -crontags=package=runtime > +cron > tabsmode=0700 > .. > .. > @@ -59,21 +59,21 @@ > .. > .. > .. > -empty mode=0555 flags=schg tags=package=runtime > +empty mode=0555 flags=schg > .. > games gname=games mode=0775 > .. > heimdal mode=0700 > .. > -log tags=package=runtime > +log > .. > -mailgname=mail mode=0775 tags=package=runtime > +mailgname=mail mode=0775 > .. > msgsuname=daemon > .. > preserve > .. > -run tags=package=runtime > +run > dhclient > .. > ppp gname=network mode=0770 > @@ -84,16 +84,18 @@ > rwhogname=daemon mode=0775 > .. > spool > -dma uname=root gname=mail mode=0770 > +clientmqueue uname=smmsp gname=smmsp mode=0770 tags=package=sendmail > .. > -lockuname=uucp gname=dialer mode=0775 > +dma uname=root gname=mail mode=0770 tags=package=dma > .. > +lockuname=uucp gname=dialer Is loss of mode=0775 intentional here?? I think that may break cu locks. > +.. > /set gname=daemon > lpd > .. > -mqueue > +mqueue tags=package=sendmail > .. > -opielocks mode=0700 > +opielocks Again, loss of mode??? > .. > output > lpd > @@ -101,7 +103,7 @@ > .. > /set gname=wheel > .. > -tmp mode=01777 tags=package=runtime > +tmp mode=01777 > vi.recover mode=01777 > .. > .. > -- 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: r348983 - head/etc
Author: manu Date: Wed Jun 12 09:18:23 2019 New Revision: 348983 URL: https://svnweb.freebsd.org/changeset/base/348983 Log: pkgbase: Add some tags to files installed in distribution target Add the MK_MAIL dependant file to the runtime package as well as the MK_KERBEROS ones the empty locate database, the FreeBSD copyright file and the GENERIC.hints. Tag the unbound link from /etc to /var to belong in the unbound package. Reviewed by: bapt MFC after:1 month Differential Revision:https://reviews.freebsd.org/D20607 Modified: head/etc/Makefile Modified: head/etc/Makefile == --- head/etc/Makefile Wed Jun 12 09:17:32 2019(r348982) +++ head/etc/Makefile Wed Jun 12 09:18:23 2019(r348983) @@ -59,7 +59,8 @@ distribution: ${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt .if ${MK_UNBOUND} != "no" if [ ! -e ${DESTDIR}/etc/unbound ]; then \ - ${INSTALL_SYMLINK} ../var/unbound ${DESTDIR}/etc/unbound; \ + ${INSTALL_SYMLINK} -T "package=unbound" \ + ../var/unbound ${DESTDIR}/etc/unbound; \ fi .endif .if ${MK_SENDMAIL} != "no" @@ -68,26 +69,29 @@ distribution: .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + -T "package=runtime" \ dot.k5login ${DESTDIR}/root/.k5login; .endif .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - ${ETCMAIL} ${DESTDIR}/etc/mail + -T "package=runtime" ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ ! -f ${DESTDIR}/etc/aliases ]; then \ - ${INSTALL_SYMLINK} mail/aliases ${DESTDIR}/etc/aliases; \ + ${INSTALL_SYMLINK} -T "package=runtime" \ + mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif .if ${MK_LOCATE} != "no" - ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ - ${DESTDIR}/var/db/locate.database + ${INSTALL} -o nobody -g ${BINGRP} -m 644 -T "package=runtime"\ + /dev/null ${DESTDIR}/var/db/locate.database .endif cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${FREEBSD} ${DESTDIR}/ + -T "package=runtime" ${FREEBSD} ${DESTDIR}/ .if ${MK_BOOT} != "no" .if exists(${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + -T "package=runtime" \ ${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .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: r348982 - head/etc/sendmail
Author: manu Date: Wed Jun 12 09:17:32 2019 New Revision: 348982 URL: https://svnweb.freebsd.org/changeset/base/348982 Log: pkgbase: Add the correct package for sendmail configuration files Reviewed by: bapt MFC after:1 month Differential Revision:https://reviews.freebsd.org/D20606 Modified: head/etc/sendmail/Makefile Modified: head/etc/sendmail/Makefile == --- head/etc/sendmail/Makefile Wed Jun 12 09:16:42 2019(r348981) +++ head/etc/sendmail/Makefile Wed Jun 12 09:17:32 2019(r348982) @@ -64,29 +64,29 @@ ${mc:T:R}.cf: ${mc} all: ${ALL} distribution: - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ ${.CURDIR}/freebsd.mc freebsd.cf ${DESTDIR}/etc/mail - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ ${.CURDIR}/freebsd.submit.mc freebsd.submit.cf ${DESTDIR}/etc/mail - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ ${SMDIR}/helpfile ${DESTDIR}/etc/mail .if defined(INSTALL_CF) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ ${INSTALL_CF} ${DEST_CF} .else - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ freebsd.cf ${DEST_CF} .endif .if defined(SENDMAIL_ADDITIONAL_CF) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ ${SENDMAIL_ADDITIONAL_CF} ${DESTDIR}/etc/mail .endif .if !defined(SENDMAIL_SET_USER_ID) .if defined(INSTALL_SUBMIT_CF) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ ${INSTALL_SUBMIT_CF} ${DEST_SUBMIT_CF} .else - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ freebsd.submit.cf ${DEST_SUBMIT_CF} .endif .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: r348981 - head/etc/mtree
Author: manu Date: Wed Jun 12 09:16:42 2019 New Revision: 348981 URL: https://svnweb.freebsd.org/changeset/base/348981 Log: pkgbase: Set a default package=runtime for var directories This way every directory is at least present in packages. While here tag some directory from being in sendmail or dma Reviewed by: bapt MFC after:1 month Differential Revision:https://reviews.freebsd.org/D20605 Modified: head/etc/mtree/BSD.var.dist Modified: head/etc/mtree/BSD.var.dist == --- head/etc/mtree/BSD.var.dist Wed Jun 12 01:53:14 2019(r348980) +++ head/etc/mtree/BSD.var.dist Wed Jun 12 09:16:42 2019(r348981) @@ -3,7 +3,7 @@ # Please see the file src/etc/mtree/README before making changes to this file. # -/set type=dir uname=root gname=wheel mode=0755 +/set type=dir uname=root gname=wheel mode=0755 tags=package=runtime . account .. @@ -32,7 +32,7 @@ .. crash .. -crontags=package=runtime +cron tabsmode=0700 .. .. @@ -59,21 +59,21 @@ .. .. .. -empty mode=0555 flags=schg tags=package=runtime +empty mode=0555 flags=schg .. games gname=games mode=0775 .. heimdal mode=0700 .. -log tags=package=runtime +log .. -mailgname=mail mode=0775 tags=package=runtime +mailgname=mail mode=0775 .. msgsuname=daemon .. preserve .. -run tags=package=runtime +run dhclient .. ppp gname=network mode=0770 @@ -84,16 +84,18 @@ rwhogname=daemon mode=0775 .. spool -dma uname=root gname=mail mode=0770 +clientmqueue uname=smmsp gname=smmsp mode=0770 tags=package=sendmail .. -lockuname=uucp gname=dialer mode=0775 +dma uname=root gname=mail mode=0770 tags=package=dma .. +lockuname=uucp gname=dialer +.. /set gname=daemon lpd .. -mqueue +mqueue tags=package=sendmail .. -opielocks mode=0700 +opielocks .. output lpd @@ -101,7 +103,7 @@ .. /set gname=wheel .. -tmp mode=01777 tags=package=runtime +tmp mode=01777 vi.recover mode=01777 .. .. ___ 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"