History log of /dflybsd-src/sys/kern/ (Results 1 – 25 of 4708)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
bbd7e13329-Nov-2024 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix signal / signal-mask-change race

* Fix race between incoming signals and sigsuspend(), ppoll(),
or pselect() when used to change the signal mask. A signal can
be received and queue

kernel - Fix signal / signal-mask-change race

* Fix race between incoming signals and sigsuspend(), ppoll(),
or pselect() when used to change the signal mask. A signal can
be received and queued to a process that is in the middle of
unmasking said signal without triggering signal processing.

* Our kernel *sleep*() and wakeup functions avoid whole-process
locks to ensure high thread performance, but this can result in
a race when a signal cannot be delivered to a thread and gets
queued to the process instead.

In order to keep the high-performance sleep, we instead use
atomic ops and a ref-counter only in code paths related to
general signal delivery to the process. Code which changes the
signal mask then waits for the ref-counter to become zero as
needed to ensure proper interlocked tests across signal mask
changes to close the race.

show more ...

b07befac17-Oct-2024 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Improve umount -f operation

* Increase the process test/kill retry loop for umount -f from 10
to 50 (from 2.5 seconds to 12.5 seconds) to give processes more
time to exit after receivin

kernel - Improve umount -f operation

* Increase the process test/kill retry loop for umount -f from 10
to 50 (from 2.5 seconds to 12.5 seconds) to give processes more
time to exit after receiving a KILL signal.

* Make the tsleep() used for the retry delay unconditional to ensure a
reasonable period of time is allowed to elapse.

* Release the mount structure lock during the 0.25 second tsleep()
in the retry loop. This allows processes to unstick during the
umount -f retry loop.

* Add a P_MUSTKILL flag to the process structure, set if necessary
during a umount -f. Process core dumps (which are usually
uninterruptable) will be aborted if this flag is found to be set.
Further tests for this flag may be needed.

Reported-by: marino (via loki kernel crash)

show more ...


/dflybsd-src/contrib/diffutils/COPYING
/dflybsd-src/contrib/diffutils/README
/dflybsd-src/contrib/diffutils/README.DELETED
/dflybsd-src/contrib/diffutils/README.DRAGONFLY
/dflybsd-src/contrib/diffutils/doc/diffutils.info
/dflybsd-src/contrib/diffutils/lib/allocator.c
/dflybsd-src/contrib/diffutils/lib/allocator.h
/dflybsd-src/contrib/diffutils/lib/anytostr.c
/dflybsd-src/contrib/diffutils/lib/areadlink.c
/dflybsd-src/contrib/diffutils/lib/areadlink.h
/dflybsd-src/contrib/diffutils/lib/argmatch.c
/dflybsd-src/contrib/diffutils/lib/argmatch.h
/dflybsd-src/contrib/diffutils/lib/asnprintf.c
/dflybsd-src/contrib/diffutils/lib/assure.h
/dflybsd-src/contrib/diffutils/lib/basename-lgpl.c
/dflybsd-src/contrib/diffutils/lib/basename.c
/dflybsd-src/contrib/diffutils/lib/binary-io.c
/dflybsd-src/contrib/diffutils/lib/binary-io.h
/dflybsd-src/contrib/diffutils/lib/bitrotate.c
/dflybsd-src/contrib/diffutils/lib/bitrotate.h
/dflybsd-src/contrib/diffutils/lib/c-ctype.c
/dflybsd-src/contrib/diffutils/lib/c-ctype.h
/dflybsd-src/contrib/diffutils/lib/c-stack.c
/dflybsd-src/contrib/diffutils/lib/c-stack.h
/dflybsd-src/contrib/diffutils/lib/c-strcase.h
/dflybsd-src/contrib/diffutils/lib/c-strcasecmp.c
/dflybsd-src/contrib/diffutils/lib/c-strcaseeq.h
/dflybsd-src/contrib/diffutils/lib/c-strncasecmp.c
/dflybsd-src/contrib/diffutils/lib/careadlinkat.c
/dflybsd-src/contrib/diffutils/lib/careadlinkat.h
/dflybsd-src/contrib/diffutils/lib/cdefs.h
/dflybsd-src/contrib/diffutils/lib/cloexec.c
/dflybsd-src/contrib/diffutils/lib/cloexec.h
/dflybsd-src/contrib/diffutils/lib/cmpbuf.c
/dflybsd-src/contrib/diffutils/lib/cmpbuf.h
/dflybsd-src/contrib/diffutils/lib/diffseq.h
/dflybsd-src/contrib/diffutils/lib/dirname-lgpl.c
/dflybsd-src/contrib/diffutils/lib/dirname.c
/dflybsd-src/contrib/diffutils/lib/dirname.h
/dflybsd-src/contrib/diffutils/lib/dosname.h
/dflybsd-src/contrib/diffutils/lib/dup2.c
/dflybsd-src/contrib/diffutils/lib/error.c
/dflybsd-src/contrib/diffutils/lib/error.h
/dflybsd-src/contrib/diffutils/lib/exclude.c
/dflybsd-src/contrib/diffutils/lib/exclude.h
/dflybsd-src/contrib/diffutils/lib/exitfail.c
/dflybsd-src/contrib/diffutils/lib/exitfail.h
/dflybsd-src/contrib/diffutils/lib/fcntl.c
/dflybsd-src/contrib/diffutils/lib/fd-hook.c
/dflybsd-src/contrib/diffutils/lib/fd-hook.h
/dflybsd-src/contrib/diffutils/lib/file-type.c
/dflybsd-src/contrib/diffutils/lib/file-type.h
/dflybsd-src/contrib/diffutils/lib/filename.h
/dflybsd-src/contrib/diffutils/lib/filenamecat-lgpl.c
/dflybsd-src/contrib/diffutils/lib/filenamecat.c
/dflybsd-src/contrib/diffutils/lib/filenamecat.h
/dflybsd-src/contrib/diffutils/lib/flexmember.h
/dflybsd-src/contrib/diffutils/lib/float+.h
/dflybsd-src/contrib/diffutils/lib/fnmatch.c
/dflybsd-src/contrib/diffutils/lib/fnmatch_loop.c
/dflybsd-src/contrib/diffutils/lib/freopen-safer.c
/dflybsd-src/contrib/diffutils/lib/freopen.c
/dflybsd-src/contrib/diffutils/lib/getopt-core.h
/dflybsd-src/contrib/diffutils/lib/getopt-ext.h
/dflybsd-src/contrib/diffutils/lib/getopt-pfx-core.h
/dflybsd-src/contrib/diffutils/lib/getopt-pfx-ext.h
/dflybsd-src/contrib/diffutils/lib/getopt.c
/dflybsd-src/contrib/diffutils/lib/getopt1.c
/dflybsd-src/contrib/diffutils/lib/getopt_int.h
/dflybsd-src/contrib/diffutils/lib/getprogname.c
/dflybsd-src/contrib/diffutils/lib/getprogname.h
/dflybsd-src/contrib/diffutils/lib/gettext.h
/dflybsd-src/contrib/diffutils/lib/gettime.c
/dflybsd-src/contrib/diffutils/lib/hard-locale.c
/dflybsd-src/contrib/diffutils/lib/hard-locale.h
/dflybsd-src/contrib/diffutils/lib/hash.c
/dflybsd-src/contrib/diffutils/lib/hash.h
/dflybsd-src/contrib/diffutils/lib/ignore-value.h
/dflybsd-src/contrib/diffutils/lib/imaxtostr.c
/dflybsd-src/contrib/diffutils/lib/intprops.h
/dflybsd-src/contrib/diffutils/lib/inttostr.c
/dflybsd-src/contrib/diffutils/lib/inttostr.h
/dflybsd-src/contrib/diffutils/lib/libc-config.h
/dflybsd-src/contrib/diffutils/lib/localcharset.c
/dflybsd-src/contrib/diffutils/lib/localcharset.h
/dflybsd-src/contrib/diffutils/lib/localtime-buffer.c
/dflybsd-src/contrib/diffutils/lib/localtime-buffer.h
/dflybsd-src/contrib/diffutils/lib/malloca.c
/dflybsd-src/contrib/diffutils/lib/malloca.h
/dflybsd-src/contrib/diffutils/lib/mbchar.c
/dflybsd-src/contrib/diffutils/lib/mbchar.h
/dflybsd-src/contrib/diffutils/lib/mbiter.c
/dflybsd-src/contrib/diffutils/lib/mbiter.h
/dflybsd-src/contrib/diffutils/lib/mbscasecmp.c
/dflybsd-src/contrib/diffutils/lib/mbslen.c
/dflybsd-src/contrib/diffutils/lib/mbsstr.c
/dflybsd-src/contrib/diffutils/lib/mbuiter.c
/dflybsd-src/contrib/diffutils/lib/mbuiter.h
/dflybsd-src/contrib/diffutils/lib/minmax.h
/dflybsd-src/contrib/diffutils/lib/mktime-internal.h
/dflybsd-src/contrib/diffutils/lib/mktime.c
/dflybsd-src/contrib/diffutils/lib/msvc-inval.h
/dflybsd-src/contrib/diffutils/lib/msvc-nothrow.h
/dflybsd-src/contrib/diffutils/lib/nstrftime.c
/dflybsd-src/contrib/diffutils/lib/offtostr.c
/dflybsd-src/contrib/diffutils/lib/prepargs.c
/dflybsd-src/contrib/diffutils/lib/prepargs.h
/dflybsd-src/contrib/diffutils/lib/printf-args.c
/dflybsd-src/contrib/diffutils/lib/printf-args.h
/dflybsd-src/contrib/diffutils/lib/printf-parse.c
/dflybsd-src/contrib/diffutils/lib/printf-parse.h
/dflybsd-src/contrib/diffutils/lib/progname.c
/dflybsd-src/contrib/diffutils/lib/progname.h
/dflybsd-src/contrib/diffutils/lib/propername.c
/dflybsd-src/contrib/diffutils/lib/propername.h
/dflybsd-src/contrib/diffutils/lib/quote.h
/dflybsd-src/contrib/diffutils/lib/quotearg.c
/dflybsd-src/contrib/diffutils/lib/quotearg.h
/dflybsd-src/contrib/diffutils/lib/rawmemchr.c
/dflybsd-src/contrib/diffutils/lib/regcomp.c
/dflybsd-src/contrib/diffutils/lib/regex.c
/dflybsd-src/contrib/diffutils/lib/regex.h
/dflybsd-src/contrib/diffutils/lib/regex_internal.c
/dflybsd-src/contrib/diffutils/lib/regex_internal.h
/dflybsd-src/contrib/diffutils/lib/regexec.c
/dflybsd-src/contrib/diffutils/lib/sh-quote.c
/dflybsd-src/contrib/diffutils/lib/sh-quote.h
/dflybsd-src/contrib/diffutils/lib/sig-handler.c
/dflybsd-src/contrib/diffutils/lib/sig-handler.h
/dflybsd-src/contrib/diffutils/lib/stat-macros.h
/dflybsd-src/contrib/diffutils/lib/stat-time.c
/dflybsd-src/contrib/diffutils/lib/stat-time.h
/dflybsd-src/contrib/diffutils/lib/stdio--.h
/dflybsd-src/contrib/diffutils/lib/stdio-safer.h
/dflybsd-src/contrib/diffutils/lib/str-kmp.h
/dflybsd-src/contrib/diffutils/lib/streq.h
/dflybsd-src/contrib/diffutils/lib/strerror-override.c
/dflybsd-src/contrib/diffutils/lib/strerror-override.h
/dflybsd-src/contrib/diffutils/lib/strerror.c
/dflybsd-src/contrib/diffutils/lib/strftime.h
/dflybsd-src/contrib/diffutils/lib/striconv.c
/dflybsd-src/contrib/diffutils/lib/striconv.h
/dflybsd-src/contrib/diffutils/lib/stripslash.c
/dflybsd-src/contrib/diffutils/lib/strnlen1.c
/dflybsd-src/contrib/diffutils/lib/strnlen1.h
/dflybsd-src/contrib/diffutils/lib/system-quote.c
/dflybsd-src/contrib/diffutils/lib/system-quote.h
/dflybsd-src/contrib/diffutils/lib/tempname.c
/dflybsd-src/contrib/diffutils/lib/tempname.h
/dflybsd-src/contrib/diffutils/lib/time-internal.h
/dflybsd-src/contrib/diffutils/lib/time_rz.c
/dflybsd-src/contrib/diffutils/lib/timegm.c
/dflybsd-src/contrib/diffutils/lib/timespec.c
/dflybsd-src/contrib/diffutils/lib/timespec.h
/dflybsd-src/contrib/diffutils/lib/trim.c
/dflybsd-src/contrib/diffutils/lib/trim.h
/dflybsd-src/contrib/diffutils/lib/uinttostr.c
/dflybsd-src/contrib/diffutils/lib/umaxtostr.c
/dflybsd-src/contrib/diffutils/lib/unistd.c
/dflybsd-src/contrib/diffutils/lib/unistr/u8-mbtoucr.c
/dflybsd-src/contrib/diffutils/lib/unistr/u8-uctomb-aux.c
/dflybsd-src/contrib/diffutils/lib/unistr/u8-uctomb.c
/dflybsd-src/contrib/diffutils/lib/uniwidth/cjk.h
/dflybsd-src/contrib/diffutils/lib/uniwidth/width.c
/dflybsd-src/contrib/diffutils/lib/unlocked-io.h
/dflybsd-src/contrib/diffutils/lib/vasnprintf.c
/dflybsd-src/contrib/diffutils/lib/vasnprintf.h
/dflybsd-src/contrib/diffutils/lib/verify.h
/dflybsd-src/contrib/diffutils/lib/version-etc-fsf.c
/dflybsd-src/contrib/diffutils/lib/version-etc.c
/dflybsd-src/contrib/diffutils/lib/version-etc.h
/dflybsd-src/contrib/diffutils/lib/wctype-h.c
/dflybsd-src/contrib/diffutils/lib/xalloc-die.c
/dflybsd-src/contrib/diffutils/lib/xalloc-oversized.h
/dflybsd-src/contrib/diffutils/lib/xalloc.h
/dflybsd-src/contrib/diffutils/lib/xasprintf.c
/dflybsd-src/contrib/diffutils/lib/xfreopen.c
/dflybsd-src/contrib/diffutils/lib/xfreopen.h
/dflybsd-src/contrib/diffutils/lib/xmalloc.c
/dflybsd-src/contrib/diffutils/lib/xreadlink.c
/dflybsd-src/contrib/diffutils/lib/xreadlink.h
/dflybsd-src/contrib/diffutils/lib/xsize.c
/dflybsd-src/contrib/diffutils/lib/xsize.h
/dflybsd-src/contrib/diffutils/lib/xstriconv.c
/dflybsd-src/contrib/diffutils/lib/xstriconv.h
/dflybsd-src/contrib/diffutils/lib/xstrndup.c
/dflybsd-src/contrib/diffutils/lib/xstrndup.h
/dflybsd-src/contrib/diffutils/lib/xstrtol-error.c
/dflybsd-src/contrib/diffutils/lib/xstrtol.c
/dflybsd-src/contrib/diffutils/lib/xstrtol.h
/dflybsd-src/contrib/diffutils/lib/xstrtoul.c
/dflybsd-src/contrib/diffutils/lib/xstrtoumax.c
/dflybsd-src/contrib/diffutils/lib/xvasprintf.c
/dflybsd-src/contrib/diffutils/lib/xvasprintf.h
/dflybsd-src/contrib/diffutils/man/diff.1
/dflybsd-src/contrib/diffutils/man/diff3.1
/dflybsd-src/contrib/diffutils/man/sdiff.1
/dflybsd-src/contrib/diffutils/src/analyze.c
/dflybsd-src/contrib/diffutils/src/context.c
/dflybsd-src/contrib/diffutils/src/die.h
/dflybsd-src/contrib/diffutils/src/diff.c
/dflybsd-src/contrib/diffutils/src/diff.h
/dflybsd-src/contrib/diffutils/src/diff3.c
/dflybsd-src/contrib/diffutils/src/dir.c
/dflybsd-src/contrib/diffutils/src/ed.c
/dflybsd-src/contrib/diffutils/src/ifdef.c
/dflybsd-src/contrib/diffutils/src/io.c
/dflybsd-src/contrib/diffutils/src/normal.c
/dflybsd-src/contrib/diffutils/src/sdiff.c
/dflybsd-src/contrib/diffutils/src/side.c
/dflybsd-src/contrib/diffutils/src/system.h
/dflybsd-src/contrib/diffutils/src/util.c
/dflybsd-src/gnu/usr.bin/Makefile
/dflybsd-src/gnu/usr.bin/diff/Makefile
/dflybsd-src/gnu/usr.bin/diff/Makefile.inc
/dflybsd-src/gnu/usr.bin/diff/Makefile.inc0
/dflybsd-src/gnu/usr.bin/diff/diff/Makefile
/dflybsd-src/gnu/usr.bin/diff/diff/paths.h
/dflybsd-src/gnu/usr.bin/diff/diff/system.h
/dflybsd-src/gnu/usr.bin/diff/diff3/Makefile
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/Makefile
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/alloca.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/arg-nonnull.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/config.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/fcntl.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/fnmatch.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/getopt-cdefs.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/getopt.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/string.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/strings.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/sys/stat.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/time.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/unistr.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/unitypes.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/uniwidth.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/unused-parameter.h
/dflybsd-src/gnu/usr.bin/diff/libdiffutils/warn-on-use.h
/dflybsd-src/gnu/usr.bin/diff/libver/Makefile
/dflybsd-src/gnu/usr.bin/diff/libver/version.c
/dflybsd-src/gnu/usr.bin/diff/libver/version.h
/dflybsd-src/gnu/usr.bin/diff/sdiff/Makefile
/dflybsd-src/initrd/rescue/Makefile
/dflybsd-src/libexec/Makefile
/dflybsd-src/libexec/diff3prog/Makefile
/dflybsd-src/libexec/diff3prog/diff3prog.c
/dflybsd-src/sbin/fsck_hammer2/test.c
imgact_elf.c
kern_sig.c
vfs_syscalls.c
/dflybsd-src/sys/sys/proc.h
/dflybsd-src/usr.bin/Makefile
/dflybsd-src/usr.bin/diff/Makefile
/dflybsd-src/usr.bin/diff/diff.1
/dflybsd-src/usr.bin/diff/diff.c
/dflybsd-src/usr.bin/diff/diff.h
/dflybsd-src/usr.bin/diff/diffdir.c
/dflybsd-src/usr.bin/diff/diffreg.c
/dflybsd-src/usr.bin/diff/xmalloc.c
/dflybsd-src/usr.bin/diff/xmalloc.h
/dflybsd-src/usr.bin/diff3/Makefile
/dflybsd-src/usr.bin/diff3/diff3
/dflybsd-src/usr.bin/diff3/diff3.1
/dflybsd-src/usr.bin/sdiff/Makefile
/dflybsd-src/usr.bin/sdiff/Makefile.depend
/dflybsd-src/usr.bin/sdiff/edit.c
/dflybsd-src/usr.bin/sdiff/extern.h
/dflybsd-src/usr.bin/sdiff/sdiff.1
/dflybsd-src/usr.bin/sdiff/sdiff.c
cc8e70bd08-Oct-2024 Sergey Zigachev <s.zi@outlook.com>

kern - Make lseek(2) generic

* Extend fileops with fo_seek function allowing pluggable lseek(2)
implementations. Part of preparation for linux DMA-BUF compat API.

* Move current vnode lseek imple

kern - Make lseek(2) generic

* Extend fileops with fo_seek function allowing pluggable lseek(2)
implementations. Part of preparation for linux DMA-BUF compat API.

* Move current vnode lseek implementation into vnode and devfs fileops.
Code is exactly the same in both, note about duplication added.

* Set remaining fileops to badfo_seek.

Mentored-By: dillon

show more ...

5af8357c11-Sep-2024 Matthew Dillon <dillon@apollo.backplane.com>

futimesat() - Add futimesat() legacy system call

* Add legacy call for FreeBSD compatibility

83e7061f28-Aug-2024 Matthew Dillon <dillon@apollo.backplane.com>

poll - Fix events == 0 handling for TAP and TUN, fix console spam

* BSD poll() supports events == 0 representing a "HUP ONLY" event.
Most of our devices properly support this but TAP and TUN did n

poll - Fix events == 0 handling for TAP and TUN, fix console spam

* BSD poll() supports events == 0 representing a "HUP ONLY" event.
Most of our devices properly support this but TAP and TUN did not.

Fix TAP and TUN to support this feature. This fixes openvpn()
when operating under heavier loads.

* Fix console spam on non-debug kprintf()s by rate-limiting any
such spam if it occurs. If a device doe snot support poll()'s
HUP ONLY feature, the loop deregistration path will be hit and
generate a kprintf(). We don't want console spam to stall the
cpu.

show more ...


/dflybsd-src/contrib/less/LICENSE
/dflybsd-src/contrib/less/NEWS
/dflybsd-src/contrib/less/README.DRAGONFLY
/dflybsd-src/contrib/less/brac.c
/dflybsd-src/contrib/less/ch.c
/dflybsd-src/contrib/less/charset.c
/dflybsd-src/contrib/less/charset.h
/dflybsd-src/contrib/less/cmd.h
/dflybsd-src/contrib/less/cmdbuf.c
/dflybsd-src/contrib/less/command.c
/dflybsd-src/contrib/less/compose.uni
/dflybsd-src/contrib/less/cvt.c
/dflybsd-src/contrib/less/decode.c
/dflybsd-src/contrib/less/edit.c
/dflybsd-src/contrib/less/evar.c
/dflybsd-src/contrib/less/filename.c
/dflybsd-src/contrib/less/fmt.uni
/dflybsd-src/contrib/less/forwback.c
/dflybsd-src/contrib/less/funcs.h
/dflybsd-src/contrib/less/help.c
/dflybsd-src/contrib/less/ifile.c
/dflybsd-src/contrib/less/input.c
/dflybsd-src/contrib/less/jump.c
/dflybsd-src/contrib/less/lang.h
/dflybsd-src/contrib/less/less.h
/dflybsd-src/contrib/less/less.nro
/dflybsd-src/contrib/less/lessecho.c
/dflybsd-src/contrib/less/lessecho.nro
/dflybsd-src/contrib/less/lesskey.c
/dflybsd-src/contrib/less/lesskey.h
/dflybsd-src/contrib/less/lesskey.nro
/dflybsd-src/contrib/less/lesskey_parse.c
/dflybsd-src/contrib/less/lglob.h
/dflybsd-src/contrib/less/line.c
/dflybsd-src/contrib/less/linenum.c
/dflybsd-src/contrib/less/lsystem.c
/dflybsd-src/contrib/less/main.c
/dflybsd-src/contrib/less/mark.c
/dflybsd-src/contrib/less/optfunc.c
/dflybsd-src/contrib/less/option.c
/dflybsd-src/contrib/less/option.h
/dflybsd-src/contrib/less/opttbl.c
/dflybsd-src/contrib/less/os.c
/dflybsd-src/contrib/less/output.c
/dflybsd-src/contrib/less/pattern.c
/dflybsd-src/contrib/less/pattern.h
/dflybsd-src/contrib/less/pckeys.h
/dflybsd-src/contrib/less/position.c
/dflybsd-src/contrib/less/position.h
/dflybsd-src/contrib/less/prompt.c
/dflybsd-src/contrib/less/screen.c
/dflybsd-src/contrib/less/search.c
/dflybsd-src/contrib/less/signal.c
/dflybsd-src/contrib/less/tags.c
/dflybsd-src/contrib/less/ttyin.c
/dflybsd-src/contrib/less/ubin.uni
/dflybsd-src/contrib/less/version.c
/dflybsd-src/contrib/less/wide.uni
/dflybsd-src/contrib/less/xbuf.c
/dflybsd-src/contrib/less/xbuf.h
/dflybsd-src/crypto/openssh/PROTOCOL
/dflybsd-src/crypto/openssh/PROTOCOL.agent
/dflybsd-src/crypto/openssh/PROTOCOL.key
/dflybsd-src/crypto/openssh/PROTOCOL.krl
/dflybsd-src/crypto/openssh/PROTOCOL.mux
/dflybsd-src/crypto/openssh/README
/dflybsd-src/crypto/openssh/README.DELETED
/dflybsd-src/crypto/openssh/README.DRAGONFLY
/dflybsd-src/crypto/openssh/addr.c
/dflybsd-src/crypto/openssh/addr.h
/dflybsd-src/crypto/openssh/audit-bsm.c
/dflybsd-src/crypto/openssh/audit-linux.c
/dflybsd-src/crypto/openssh/audit.c
/dflybsd-src/crypto/openssh/auth-bsdauth.c
/dflybsd-src/crypto/openssh/auth-krb5.c
/dflybsd-src/crypto/openssh/auth-options.c
/dflybsd-src/crypto/openssh/auth-pam.c
/dflybsd-src/crypto/openssh/auth-pam.h
/dflybsd-src/crypto/openssh/auth-rhosts.c
/dflybsd-src/crypto/openssh/auth-shadow.c
/dflybsd-src/crypto/openssh/auth-sia.c
/dflybsd-src/crypto/openssh/auth.c
/dflybsd-src/crypto/openssh/auth.h
/dflybsd-src/crypto/openssh/auth2-gss.c
/dflybsd-src/crypto/openssh/auth2-hostbased.c
/dflybsd-src/crypto/openssh/auth2-kbdint.c
/dflybsd-src/crypto/openssh/auth2-methods.c
/dflybsd-src/crypto/openssh/auth2-none.c
/dflybsd-src/crypto/openssh/auth2-passwd.c
/dflybsd-src/crypto/openssh/auth2-pubkey.c
/dflybsd-src/crypto/openssh/auth2-pubkeyfile.c
/dflybsd-src/crypto/openssh/auth2.c
/dflybsd-src/crypto/openssh/authfd.c
/dflybsd-src/crypto/openssh/authfd.h
/dflybsd-src/crypto/openssh/authfile.c
/dflybsd-src/crypto/openssh/canohost.c
/dflybsd-src/crypto/openssh/chacha.c
/dflybsd-src/crypto/openssh/channels.c
/dflybsd-src/crypto/openssh/channels.h
/dflybsd-src/crypto/openssh/cipher-aes.c
/dflybsd-src/crypto/openssh/cipher-aesctr.c
/dflybsd-src/crypto/openssh/cipher-chachapoly-libcrypto.c
/dflybsd-src/crypto/openssh/cipher-chachapoly.c
/dflybsd-src/crypto/openssh/cipher.c
/dflybsd-src/crypto/openssh/cipher.h
/dflybsd-src/crypto/openssh/clientloop.c
/dflybsd-src/crypto/openssh/clientloop.h
/dflybsd-src/crypto/openssh/compat.c
/dflybsd-src/crypto/openssh/compat.h
/dflybsd-src/crypto/openssh/config.guess
/dflybsd-src/crypto/openssh/config.h.in
/dflybsd-src/crypto/openssh/config.log
/dflybsd-src/crypto/openssh/config.sub
/dflybsd-src/crypto/openssh/configure
/dflybsd-src/crypto/openssh/configure.ac
/dflybsd-src/crypto/openssh/contrib/ssh-copy-id
/dflybsd-src/crypto/openssh/contrib/ssh-copy-id.1
/dflybsd-src/crypto/openssh/crypto_api.h
/dflybsd-src/crypto/openssh/digest-libc.c
/dflybsd-src/crypto/openssh/dispatch.c
/dflybsd-src/crypto/openssh/dns.c
/dflybsd-src/crypto/openssh/dns.h
/dflybsd-src/crypto/openssh/ed25519.c
/dflybsd-src/crypto/openssh/ed25519.sh
/dflybsd-src/crypto/openssh/entropy.c
/dflybsd-src/crypto/openssh/gss-genr.c
/dflybsd-src/crypto/openssh/gss-serv-krb5.c
/dflybsd-src/crypto/openssh/gss-serv.c
/dflybsd-src/crypto/openssh/hostfile.c
/dflybsd-src/crypto/openssh/install-sh
/dflybsd-src/crypto/openssh/kex-names.c
/dflybsd-src/crypto/openssh/kex.c
/dflybsd-src/crypto/openssh/kex.h
/dflybsd-src/crypto/openssh/kexgexs.c
/dflybsd-src/crypto/openssh/krl.c
/dflybsd-src/crypto/openssh/krl.h
/dflybsd-src/crypto/openssh/log.c
/dflybsd-src/crypto/openssh/log.h
/dflybsd-src/crypto/openssh/loginrec.c
/dflybsd-src/crypto/openssh/match.c
/dflybsd-src/crypto/openssh/misc.c
/dflybsd-src/crypto/openssh/misc.h
/dflybsd-src/crypto/openssh/moduli
/dflybsd-src/crypto/openssh/moduli.c
/dflybsd-src/crypto/openssh/monitor.c
/dflybsd-src/crypto/openssh/monitor.h
/dflybsd-src/crypto/openssh/monitor_wrap.c
/dflybsd-src/crypto/openssh/monitor_wrap.h
/dflybsd-src/crypto/openssh/msg.c
/dflybsd-src/crypto/openssh/mux.c
/dflybsd-src/crypto/openssh/nchan.c
/dflybsd-src/crypto/openssh/packet.c
/dflybsd-src/crypto/openssh/packet.h
/dflybsd-src/crypto/openssh/pathnames.h
/dflybsd-src/crypto/openssh/platform-listen.c
/dflybsd-src/crypto/openssh/platform-pledge.c
/dflybsd-src/crypto/openssh/platform-tracing.c
/dflybsd-src/crypto/openssh/platform.c
/dflybsd-src/crypto/openssh/platform.h
/dflybsd-src/crypto/openssh/poly1305.c
/dflybsd-src/crypto/openssh/progressmeter.c
/dflybsd-src/crypto/openssh/readconf.c
/dflybsd-src/crypto/openssh/readconf.h
/dflybsd-src/crypto/openssh/readpass.c
/dflybsd-src/crypto/openssh/rijndael.c
/dflybsd-src/crypto/openssh/sandbox-capsicum.c
/dflybsd-src/crypto/openssh/sandbox-darwin.c
/dflybsd-src/crypto/openssh/sandbox-null.c
/dflybsd-src/crypto/openssh/sandbox-pledge.c
/dflybsd-src/crypto/openssh/sandbox-seccomp-filter.c
/dflybsd-src/crypto/openssh/sandbox-solaris.c
/dflybsd-src/crypto/openssh/sandbox-systrace.c
/dflybsd-src/crypto/openssh/scp.1
/dflybsd-src/crypto/openssh/scp.c
/dflybsd-src/crypto/openssh/servconf.c
/dflybsd-src/crypto/openssh/servconf.h
/dflybsd-src/crypto/openssh/serverloop.c
/dflybsd-src/crypto/openssh/session.c
/dflybsd-src/crypto/openssh/session.h
/dflybsd-src/crypto/openssh/sftp-client.c
/dflybsd-src/crypto/openssh/sftp-client.h
/dflybsd-src/crypto/openssh/sftp-common.c
/dflybsd-src/crypto/openssh/sftp-glob.c
/dflybsd-src/crypto/openssh/sftp-server.c
/dflybsd-src/crypto/openssh/sftp-usergroup.c
/dflybsd-src/crypto/openssh/sftp.1
/dflybsd-src/crypto/openssh/sftp.c
/dflybsd-src/crypto/openssh/sntrup761.c
/dflybsd-src/crypto/openssh/srclimit.c
/dflybsd-src/crypto/openssh/srclimit.h
/dflybsd-src/crypto/openssh/ssh-add.1
/dflybsd-src/crypto/openssh/ssh-add.c
/dflybsd-src/crypto/openssh/ssh-agent.1
/dflybsd-src/crypto/openssh/ssh-agent.c
/dflybsd-src/crypto/openssh/ssh-dss.c
/dflybsd-src/crypto/openssh/ssh-ecdsa-sk.c
/dflybsd-src/crypto/openssh/ssh-ecdsa.c
/dflybsd-src/crypto/openssh/ssh-ed25519-sk.c
/dflybsd-src/crypto/openssh/ssh-ed25519.c
/dflybsd-src/crypto/openssh/ssh-keygen.1
/dflybsd-src/crypto/openssh/ssh-keygen.c
/dflybsd-src/crypto/openssh/ssh-keyscan.1
/dflybsd-src/crypto/openssh/ssh-keyscan.c
/dflybsd-src/crypto/openssh/ssh-keysign.8
/dflybsd-src/crypto/openssh/ssh-keysign.c
/dflybsd-src/crypto/openssh/ssh-pkcs11-client.c
/dflybsd-src/crypto/openssh/ssh-pkcs11-helper.0
/dflybsd-src/crypto/openssh/ssh-pkcs11.c
/dflybsd-src/crypto/openssh/ssh-pkcs11.h
/dflybsd-src/crypto/openssh/ssh-rsa.c
/dflybsd-src/crypto/openssh/ssh-xmss.c
/dflybsd-src/crypto/openssh/ssh.1
/dflybsd-src/crypto/openssh/ssh.c
/dflybsd-src/crypto/openssh/ssh2.h
/dflybsd-src/crypto/openssh/ssh_api.c
/dflybsd-src/crypto/openssh/ssh_config
/dflybsd-src/crypto/openssh/ssh_config.5
/dflybsd-src/crypto/openssh/sshbuf-getput-crypto.c
/dflybsd-src/crypto/openssh/sshbuf.c
/dflybsd-src/crypto/openssh/sshbuf.h
/dflybsd-src/crypto/openssh/sshconnect.c
/dflybsd-src/crypto/openssh/sshconnect.h
/dflybsd-src/crypto/openssh/sshconnect2.c
/dflybsd-src/crypto/openssh/sshd-session.c
/dflybsd-src/crypto/openssh/sshd.8
/dflybsd-src/crypto/openssh/sshd.c
/dflybsd-src/crypto/openssh/sshd_config
/dflybsd-src/crypto/openssh/sshd_config.5
/dflybsd-src/crypto/openssh/sshkey-xmss.c
/dflybsd-src/crypto/openssh/sshkey-xmss.h
/dflybsd-src/crypto/openssh/sshkey.c
/dflybsd-src/crypto/openssh/sshkey.h
/dflybsd-src/crypto/openssh/sshsig.c
/dflybsd-src/crypto/openssh/umac.c
/dflybsd-src/crypto/openssh/version.h
/dflybsd-src/crypto/openssh/xmss_commons.c
/dflybsd-src/crypto/openssh/xmss_commons.h
/dflybsd-src/crypto/openssh/xmss_fast.c
/dflybsd-src/crypto/openssh/xmss_hash.c
/dflybsd-src/crypto/openssh/xmss_hash.h
/dflybsd-src/crypto/openssh/xmss_hash_address.c
/dflybsd-src/crypto/openssh/xmss_hash_address.h
/dflybsd-src/crypto/openssh/xmss_wots.c
/dflybsd-src/crypto/openssh/xmss_wots.h
/dflybsd-src/etc/defaults/rc.conf
/dflybsd-src/lib/libssh/Makefile
/dflybsd-src/libexec/Makefile
/dflybsd-src/libexec/sshd-session/Makefile
/dflybsd-src/libexec/sshd-session/Makefile.etc
/dflybsd-src/libexec/sshd-session/auth-passwd-custom.c
/dflybsd-src/libexec/sshd-session/sshd_config_expect
/dflybsd-src/share/man/man4/acpi.4
/dflybsd-src/share/man/man5/rc.conf.5
/dflybsd-src/share/man/man5/wg.conf.5
/dflybsd-src/sys/bus/u4b/input/ums.c
/dflybsd-src/sys/dev/acpica/acpi.c
/dflybsd-src/sys/dev/acpica/acpi_resource.c
/dflybsd-src/sys/dev/acpica/acpivar.h
sys_generic.c
/dflybsd-src/sys/net/tap/if_tap.c
/dflybsd-src/sys/net/tun/if_tun.c
/dflybsd-src/sys/netinet6/in6.c
/dflybsd-src/sys/netinet6/in6_proto.c
/dflybsd-src/sys/netinet6/in6_var.h
/dflybsd-src/sys/netinet6/nd6.c
/dflybsd-src/sys/netinet6/nd6_nbr.c
/dflybsd-src/sys/vfs/procfs/procfs_ctl.c
/dflybsd-src/sys/vfs/procfs/procfs_mem.c
/dflybsd-src/sys/vfs/procfs/procfs_status.c
/dflybsd-src/sys/vfs/procfs/procfs_subr.c
/dflybsd-src/sys/vfs/procfs/procfs_vfsops.c
/dflybsd-src/sys/vfs/procfs/procfs_vnops.c
/dflybsd-src/usr.bin/less/Makefile
/dflybsd-src/usr.bin/less/defines.h
/dflybsd-src/usr.bin/ssh-add/Makefile
/dflybsd-src/usr.bin/ssh-agent/Makefile
/dflybsd-src/usr.bin/ssh-keygen/Makefile
/dflybsd-src/usr.bin/ssh-keyscan/Makefile
/dflybsd-src/usr.bin/ssh/Makefile
/dflybsd-src/usr.sbin/sshd/Makefile
c7c7187026-Jun-2024 Matthew Dillon <dillon@apollo.backplane.com>

Fix UTIME_OMIT handling

* Fix UTIME_OMIT handling for the case where both timestamps are set
to UTIME_OMIT.

Reported-by: Kir Kolyshkin <kolyshkin@gmail.com>

0c4dbac111-May-2024 Dan Cross <cross@gajendra.net>

pps_fetch: introduce a helper to handle timeouts

Introduce a helper function that handles providing a timeout so that
we can wait for an event, and call it from the PPS_IOC_FETCH ioctl case.
Modeled

pps_fetch: introduce a helper to handle timeouts

Introduce a helper function that handles providing a timeout so that
we can wait for an event, and call it from the PPS_IOC_FETCH ioctl case.
Modeled after the same code in FreeBSD.

Signed-off-by: Dan Cross <cross@gajendra.net>

show more ...

bbf175be11-May-2024 Dan Cross <cross@gajendra.net>

trivial: Clean up white space at ends of lines.

Fix some trivial lints in preparation for more invasive changes.

Signed-off-by: Dan Cross <cross@gajendra.net>

a162a73806-Apr-2024 Michael Neumann <mneumann@ntecs.de>

Sync psm/evdev/atkbd with FreeBSD

Partially sync psm, evdev and atkbd drivers with FreeBSD HEAD as of now.

The result should be much better input device support (Touchpad etc.) on
some Laptops.

Te

Sync psm/evdev/atkbd with FreeBSD

Partially sync psm, evdev and atkbd drivers with FreeBSD HEAD as of now.

The result should be much better input device support (Touchpad etc.) on
some Laptops.

Tested on following hardware:

* Panasonic CF-SV (myself)
* Tuxedo InfinityBook 14 (myself)
* Lenovo Thinkpad T480 (Antonio)
* Lenovo Thinkpad T490 (Peeter)

As for the Panasonic CF-SV and Tuxedo InfinityBook 14, it works so much
better than before. Without this commit, the touchpad was either not
recognized (missing active AUX port multiplexing) or barely useable.

Credits go as well to the authors of Bug report #3206 (htse, daftaupe)
who did similar work in parallel.

To summarize some of the changes:

* psm, evdev (w/o uinput) and to some degree the atkbd driver is synced
with FreeBSD.

* As for atkbd, mainly the parts related to support active AUX port
multiplexer code is synced from FreeBSD. Active AUX port MUX is
required to detect for example my synaptics touchpad on the Pansonic
CF-SV, otherwise the touchpad is only recognized as standard PS/2 mouse.
Other laptops use the same "method" to attach "multiple" mice to the AUX
port.

* This patch also includes the patch given in Bug report #3206:
https://bugs.dragonflybsd.org/issues/3206

* Adds kern.features sysctl. Xorg uses e.g. kern.features.evdev
and kern.features.evdev_support to detect if evdev is available.

* Tested with a Synaptics Touchpad using both moused/sysmouse and
libinput under X11. Both work reliably.

* This patch enables hw.psm.{synaptics,trackpoint,elantech}_support
by default. This should give a better user-experience by default.

* Set hw.psm.mux_disabled=1 if your keyboard no longer works due
to the AUX MUX code (I haven't synced the quirks code yet).

* atkbd - periodic polling is disabled. Can be turned on by setting
loader tunable hw.atkbd.hz to 1 or 10 (as it was before).

How to use this with Xorg? Set:

sysctl kern.evdev.rcpt_mask=6

Then, either add moused_enable=YES to /etc/rc.conf. Then you can
use this with the default xorg.conf.

To use this with libinput, which I do, I had to add the following to
/etc/X11/xorg.conf:

Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

and in $HOME/.xinitrc:

xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Tapping Enabled' 1

to enable tapping. Not needed if sysmouse is used (requires running
moused). Scrolling feels better with libinput, but that is likely just
a better default setting.

---

In the following, each commit message is listed:

psm - Fix choosing wrong mode for synaptic device + trackpoint

With guest trackpoint present trackpoint probing switched synaptics
device to absolute mode with different protocol instead of keeping it
in relative mode.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/dcc414b888bd855d3ad30bea0e20fb35733097cb

psm - Fix calculation for clickpad softbuttons at the top

On laptops like the ThinkPad X240, ClickPad buttons are located at the
top. The hw.psm.synaptics.softbuttons_y sysctl was supposed to allow this
by setting the value to a negative one (e.g. -1700). However, the
condition was wrong (double negative), and doing that placed the buttons
in an unreachable area.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/f3bae0ea25e2f2b76f5dcd8a6a800344803a900f

psm - Fix triple-finger taps reported as double-finger for Elan hw v.4 touchpads

Wait for all advertised head packets after status packet have been received.
This fixes rare but quite annoying issue in Elan hw v.4 touchpads support
when triple-finger taps are reported as double-finger taps under several
circumstances.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/933ef2d3b285966c604d21848963afc9e9a07a0b

psm - Reduce default tap_min_queue size for Elan touchpads

Elan hw v.4 touchpads often sends touchpad release packet right after
touchpad touch one. Most probably this happens due to PS/2 limited bandwith.
Reducing of tap_min_queue size to 1 makes multifinger tap detection
more reliable in this case.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/51de77dd3d64846b8ed8462b366f83f4cfabc1b7

psm - Adjust Elantech palm width threshold to nearly match synaptics defaults

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/8a98c8c412d0c7171054423dced8874f62cd6082

psm - reduce cursor jumping on palm detection

This is done with discarding pointer movements rather then mouse packets

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/848714bcb443af01596a455cad58beda33caf98b

psm - Enable palm detection on two finger touches for multitouch trackpads

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/eb65854355fe829af8c9b0d5c5a2c324a220ed10

psm - Report 3-rd and 4-th fingers as first finger for Elan hw v.2/v.3

as Linux does. It should not affect gesture processing in current state
as it ignores finger coords on 3-finger tap detection but it should make
evdev reports looking more Linux-alike.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/6c85d7cb3230313a90ae2f5fb4fe943d5ad686f0

psm - Set predefined logical touchpad sizes for several ancient Elan hw v.2 models

This change is based on Linux driver. Determine logical trace size. It
used for calculation of touch sizes in surface units for MT-protocol
type B evdev reports.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/21cb8f6288d49b2a274db0fa531306a25220abd8

psm - Reduce synaptics touch sensitivity

Increase hw.psm.synaptics.min_pressure default value from 16 to 32
to nearly match Linux driver (30-35 hysteresis loop).
This makes libinput tap detection more reliable.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/ae3b1e4a342724a1ac2151f2526cd8b8f69c60b5

psm - Add sanity checks to Synaptics touchpad driver resolution parser

This fixes "Kernel has only x or y resolution, not both" libinput error.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/8352f326c3db80e16d43d5b29a9cf55d914becdd

psm - Skip sync check when `PSM_CONFIG_NOCHECKSYNC` is set

In psmprobe(), we set the initial `syncmask` to the vendor default value
if the `PSM_CONFIG_NOCHECKSYNC` bit is unset. However, we currently only
set it for the Elantech touchpad later in psmattach(), thus `syncmask`
is always configured.

Now, we check `PSM_CONFIG_NOCHECKSYNC` and skip sync check if it is set.
This fixes Elantech touchpad support for units which have `hascrc` set.

To clarify that, when we log the `syncmask` and `syncbits` fields, also
mention if they are actually used.

Finally, when we set `PSM_CONFIG_NOCHECKSYNC`, clear `PSM_NEED_SYNCBITS`
flag.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/9402bd96df8000c2ac5d9c239ff746919af0dd66

psm - Don't try to detect trackpoint packets if the Elantech device has none

This fixes a panic when `EVDEV_SUPPORT` is enabled: if a trackpoint
packet was detected but there was no trackpoint, we still tried to emit an
evdev event even though the associated relative evdev device (`evdev_r`)
was not initialized.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/b9b766ae4708627ab5f62377c30ec070b6dd103d

psm - Log syncmask[1], not syncmask[0] twice

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/90b0eb9b4a7b94c81f4183937210371c02fc3f58

psm - Add support for HP EliteBook 1040 ForcePads.

ForcePads do not have any physical buttons, instead they detect click
based on finger pressure. Forcepads erroneously report button click
if there are 2 or more fingers on the touchpad breaking multifinger
gestures. To workaround this start reporting a click only after
4 consecutive single touch packets has been received. Skip these packets
in case more contacts appear.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/7d1460a4b1a0e5cd9fbed912b7d4480d0f769d4a

psm - Reduce psm watchdog verbosity

Modern touchpads do not issue interrupts on inactivity so "lost interrupt"
message became annoying spam nowadays. This change quiets the message
if debug.psm.loglevel=5 (or less) is set in /boot/loader.conf

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/f451e00544de30a6ce00b15bf056bedb880e882f

psm - Fix panic occuring soon after PS/2 packet has been rejected by synaptics or elantech sanity checker

This patch has already been partially applied in commit 906090f3.

After packet has been rejected contents of packet buffer is not cleared
with setting of inputbytes counter to 0. So when this packet buffer is
filled again being an element of circular queue, new data appends to old
data rather than overwrites it. This leads to packet buffer overflow
after 10 rounds.

Fix it with setting of packet's inputbytes counter to 0 after rejection.

While here add extra logging of rejected packets.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/74a53bd1315341bc33f9dd0dc589d0397080f270

psm - Always initialize used values in debug print

'status' array passed to get_mouse_status() is usually uninitialized by
callers.

Fully populating it with values in get_mouse_status() can fail due to
read_aux_data().

Additionally, nothing in API constrains 'len' to be >= 3. In practice,
every caller passes three, so perhaps that argument should just be removed.
Refactoring is a larger change, though.

Remove use of potentially uninitialized values by:
1. Only printing 3 debug statuses if the passed array was at least
'len' >= 3;
2. Populating 'status' array up to first three elements, if read_aux_data()
failed.

No functional change intended.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/893daee680dcb62886ce0c3d74457834a1c2ead9

psm - Initialize variables before use

dxp/dyp could have been used uninitialized in the subsequent debugging log
invocation.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/015ab098439452cb798dbea5dd2d4fe57c72808c

psm - Add minimal support for active AUX port multiplexers

Active PS/2 multiplexing is a method for attaching up to four PS/2
pointing devices to a computer. Enabling of multiplexed mode allows
commands to be directed to individual devices using routing prefixes.
Multiplexed mode reports input with each byte tagged to identify
its source. This method differs from one currently supported by psm(4)
where so called guest device (trackpoint) is attached to special
interface located on the host device (touchpad) and latter performs
guest protocol conversion to special encapsulation packet format.

At present time active PS/2 multiplexing is used in some models of
HP laptops e.g. EliteBook 8560w, 9470m. Enabling of absolute operation
mode on such touchpads is connected with following problems:
1. Touchpad's port priority is lower than trackpoint's. That blocks
information queries thus prevents touchpad detection and configuration.
2. Touchpad and trackpoint have different protocol packet sizes and
sync bytes.

As PS/2 usage is on decline only minimal possible set of changes to
support Synaptics touchpad and generic mouses is implemented.
Active multiplexing mode is enabled only at probe stage to scan through
attached PS/2 devices to query and configure Synaptics touchpad.
After touchpad has been configured, mux is switched back to legacy
(hidden multiplexing) mode to perform normal interrupt-driven input
data processing. Overflow bit values rather than tags are used to
separate packets produced by different devices. Switching back to
legacy mode allows to avoid psm(4) and atkbd(4) rework to support
4 instances of mouse driver.

Note: While in hidden multiplexing mode KBC does some editing of the
packet stream. It remembers the button bits from the last packet
received from each device, and replaces the button bits of every
packet with the logical OR of all devices’ most recent button bits.
This sort of button crosstalk results in spurious button events
which are inhibitted with various tricks. E.g. trackpoint middle
button events are suppressed while trackpad surface is touched and
touchpad left and right button events are suppressed if corresponding
trackpoint buttons are pressed.

Not applied is a section related to EVDEV support.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/80203ccefd77badf5dc58a63047a1da2d303472c

psm - do not process gestures when palm is present

Ignoring of gesture processing when the palm is detected helps to reduce
some of the erratic pointer behavior.

This fixes regression introduced in FreeBSD r317814.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/51319286ed34e70b00a709ac36a1120c26d95a5d

psm - respect tap_disabled configuration with enabled Extended support

This fixes a bug where, even when hw.psm.tap_enabled=0, touchpad taps
were processed.
tap_enabled has three states: unconfigured, disabled, and enabled (-1, 0, 1).
To respect PR kern/139272, taps are ignored only when explicity disabled.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/0c8a908463dd601a860c6ec9e52742684df3e63b

psm - give names to synaptics commands

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/bf33f20d962c1b4443324af205170a35acce63f7

psm - Add natural scrolling support to sysmouse protocol

This change enables natural scrolling with two finger scroll enabled
and when user is using a trackpad (mouse and trackpoint are not affected).
Depending on trackpad model it can be activated with setting of
hw.psm.synaptics.natural_scroll or hw.psm.elantech.natural_scroll sysctl
values to 1.

Evdev protocol is not affected by this change too. Tune userland client
e.g. libinput to enable natural scrolling in that case.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/3b11e3b6e195d08f6ca6e32464f49b7495697045

psm - Fix Elantech trackpoint support.

Sign bits for X and Y motion data were taken from wrong places.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/8fa46200391063bd5c15a25d9f9b06354fcd4147

psm - Add extra sanity checks to Elantech trackpoint packet parser

Not included are parts related to evedev.

Add strict checks for unused bit states in Elantech trackpoint packet
parser to filter out spurious events produces by some hardware which
are detected as trackpoint packets. See comment on r328191 for example.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/6c53fea7d62edeeb7d1e0d2d1da922a3a67c0bce

psm - Enable touchpads and trackpads by default

Enable synaptics and elantech touchpads, as well as IBM/Lenovo TrackPoints
by default, instead of having users find and toggle a loader tunable.
This makes things like two finger scroll and other modern features work out
of the box with X. By enabling these settings by default, we get a better
desktop experience in X, since xserver and evdev can make use of the more
advanced synaptics and elantech features.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/2dd9a967d299a1c0c1363e82a1e3f0c19b4b9846

psm - Add macOS-like three finger drag trackpad gesture

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/5a037b11974c8c74c7df22378633caca71456a53

psm - properly check for atkbdc_open failure

atkbdc_open can return NULL if the unit's out of bounds or the softc isn't
setup. Check it to be safe.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/6d3c9beedb7f100922a61f1e089254be24e48547

psm - Do not disable trackpoint when hw.psm.elantech.touchpad_off is enabled

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/8137fb2e38f7b88d2cce9c29a2f00cda33a89d1c

psm - Workaround active PS/2 multiplexor hang

which happens on some laptops after returning to legacy multiplexing mode
at initialization stage.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/ec45be6c36dcb373103014e16a3623e0c182a5bb

psm - Always initialize Synaptics touchpad report range with defaults

Otherwise libinput refuses to recoginize some Synaptics touchpads with
"kernel bug: device has min == max on ABS_X" message in Xorg.log.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/2ac1c1927258e649e3ca3269aea40fb4c63e2296

psm - Probe Synaptics touchpad with active multiplexing mode enabled

if it is only multiplexed device. Also enable syncbit checks for them.
This fixes touchpad recognition on Panasonic Toughbook CF-MX4 laptop.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/f5998d20ed80fdc1cb3ba0c245cae5f179e22fe2

psm - Disable KVM switch "jitter" clamping for absolute touchpads

FreeBSD commit r123442 [1] introduced solution for clamping of PS/2
mice jitter when using a KVM. Solution is to buffer mouse packets for
0.050ms if mouse activity has not been seen for more than 0.5 seconds.
Then flush that data to driver if no validation errors found or drop the
entire queue otherwise.

While it works well with relative devices it has issues with absolute ones
Depending on history buffering may results in delaying of the touch front
edge for 0.050ms that affects gesture processing (tap detection).

As absolute touchpads usually are built-in devices we can safely disable
bufferization and KVM jitter clamping to avoid such a delays.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/bedf31ad7e15c7d3e3ff9e5295bfd5454fbb42fa

[1]: https://svnweb.freebsd.org/base?view=revision&revision=123442

atkbd - Reduce polling rate from 10Hz to ~1Hz

In my understanding this is only needed to workaround lost interrupts.
I was thinking to remove it completely, but the comment about edge-
triggered interrupt may be true and needs deeper investigation. ~1Hz
should be often enough to handle the supposedly rare loss cases, but
rare enough to not appear in top. Add sysctl hw.atkbd.hz to tune it.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/9e007a88d65ba0d23e73c3c052d474a78260d503

psm - Remove write-only variables

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/9b0eb55048e6294c00db70f8ebecf18c1c3c1dbe

psm - Swap the unit member in the softc for a device_t

This also adds a device_log() function to subr_bus.c.

This entails various changes to make this driver more "modern"
(new-bus vs pre-new-bus) using device_log() and device_printf() rather
than psm%d.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/a6c09f20e8e00bec7d9eb088b4f32dd38bf7f490

psm - Fix typo in comment

s/diable/disable/

Taken-from: FreeBSD

psm - recognize post-IBM trackpoints on Thinkpads

Newer Thinkpads (e.g. X1 Carbon 7th Gen) come with trackpoints from
different vendors. They are mostly compatible with the original one.
Not sure all features are going to work, but at least this fixes resume
operation.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/2bcef59d428a672a9144c574b4b4f42f5f0e5b2a

psm/atkbd - Sync with FreeBSD (partially)

Drop MOUSE_GETVARS and MOUSE_SETVARS ioctls support

These ioctls are not documented and only stubbed in a few drivers:
psm(4) and syscon's sysmouse(4). The only exception is MOUSE_GETVARS
implemented in psm(4)

Given the fact that they were introduced 20 years ago and implementation
has never been completed, remove any related code.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/67580198b70aa58d572a2602a02d1a70d9971350

evdev/psm - update evdev, add evdev-support to psm(4)

* Partially update evdev from FreeBSD and add evdev-support to psm

* Touches ums(4)

atkbd - Disable periodic polling by default

If this cause keyboard/mouse freezes on some hardware, please set
loader tunable hw.atkbd.hz=1 as workaround and report the issue.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/ce881170088c4c98c036fe561f8ee8413c2e2585

psm - use evdev_register_mtx()

This uses psm_softc->lock for evdev operations

evdev - Hide "kern.evdev.rcpt_mask" sysctl if kernel compiled w/o EVDEV_SUPPORT

Now presence of this sysctl can be used for discovery if evdev support
for hybrid devices is compiled into kernel or not.
Hide "kern.evdev.sysmouse_t_axis" sysctl for the same reason.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/233e10741a791bfa570a69804ae40f9fffcdcd43

evdev - Take driver's lock in cdev write handler if necessary

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/f3f8069493a5a9db77a5f660f4f9e613742fdc42

evdev - Disable value normalization and state filtering for SND events

Some events can take sound pitch as a value so can not be represented
as binary on/off events. Tracking for on/off state is left in place
as it is a part of the evdev API.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/c6e809423fde2f5ce02b9fef5910c34e434e7c36

evdev - Do not start/stop softrepeat callout if no clients attached

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/37ff33454873d8639d10dc5c72d76fb3a1eb540f

evdev - Fix evdev codes for slash and asterisk numpad keys of AT-keyboards

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/b12ac17ef1928858ed236a9a5851c30f465f8d26

evdev - Fix pause key release event in AT keyboard set 1 to evdev xlat-or

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/a0e9218c019b30a68fe137f8540a8c8da947480b

evdev - export event device properties through sysctl interface

A big security advantage of Wayland is not allowing applications to read
input devices all the time. Having /dev/input/* accessible to the user
account subverts this advantage.

libudev-devd was opening the evdev devices to detect their types (mouse,
keyboard, touchpad, etc). This don't work if /dev/input/* is inaccessible.
With the kernel exposing this information as sysctls (kern.evdev.input.*),
we can work w/o /dev/input/* access, preserving the Wayland security model.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/f99e7b1aed7ea65ca0dbe5b182f2b9cbfdfe54db
FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/dd3a67a0781261c1fdd670456f492ecb695b8fe5

evdev - return error rather than zero-length data on blocked read()

if blocked process has been woken up by evdev device destruction.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/006eb44926d6949e0b60b21920f1ea93f03efd2f

evdev - Use proper mutex reference in autorepeat callout initialization

This fixes panic occuring when evdev key autorepeat is enabled by driver
which initializes evdev with external mutex.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/68cc053763eec2f2afef8de8a12f6786805c9e24

evdev - Use LIST_FOREACH_MUTABLE

instead of LIST_FOREACH as we are removing elements in the middle.

This fixes a panic when detaching USB mouse.

Note that LIST_FOREACH_SAFE in FreeBSD corresponds to our
LIST_FOREACH_MUTABLE.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/5396856ee0e158a1505dce733aad4f9b42afafbb

evdev - Add AT translated set1 scancodes for F-unlocked F1-12 keys

"F lock" is a switch between two sets of scancodes for function keys F1-F12
found on some Logitech and Microsoft PS/2 keyboards [1]. When "F lock" is
pressed, then F1-F12 act as function keys and produce usual keyscans for
these keys. When "F lock" is depressed, F1-F12 produced the same keyscans
but prefixed with E0.
Some laptops use [2] E0-prefixed F1-F12 scancodes for non-standard keys.

[1] https://www.win.tue.nl/~aeb/linux/kbd/scancodes-6.html
[2] https://reviews.freebsd.org/D21565

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/8701adbeb0d4e29c9aae68b493317fb581ae520e

evdev - Sync event codes with Linux kernel 5.6

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/d316504953cf0890433ac2cb75d10c6fcf0c0263

evdev - Add AT translated set1 scancodes for 'Eisu' & 'Kana' keys

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/94811094f8357824108a57169d1f5b1e2ffb56ca

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.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/54cca285fc3d32e0be4028d17c055424b49f4f7d

evdev - Implement fuzz

Fuzz is used to filter noise from the event stream.
Upcoming gamepad drivers use it.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/3b2175fdb62c7f872e78ce732952f2ac2ff99c8d

evdev - Linux evdev does not terminate truncated strings with 0

It seems that DragonFly ioctl(2) cannot return the actual length of
copyouted data as only error=0 is treated as "no-error".

Based-on-FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/7a810290b8f6c6885fdb9917cf590d46fa270a61

Revert "evdev - Linux evdev does not terminate truncated strings with 0"

This reverts commit 12ac6b7825fba8f53f9cbfe3a6aaed27983c1848.

I think it's safer to properly 0-terminate the strings. The only reason
why this commit landed in FreeBSD was to support a Linux binary Imprivata,
which we can't run anyways.

evdev - Do not check maximal contact number for MT initialization

This allows singletouch devices which use multitouch protocols to work.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/e40fec4ec9a7a6625b3e332d4f856eb1d05f0def

evdev - Multitouch code style changes

1. Move touch count reporting helpers to utils. They are not multitouch.
2. Use evdev_mt prefix for private multitouch support routines.
3. Use int instead of int32_t where fixed size is not required.
4. Export some internal functions.

This change should be no-op.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/98a7606b85e05132f328a2498dccab78df31cb7e

evdev - Use bitsets to track active touches and slots changed in current report

Obtained from: OpenBSD

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/2dc7188e532f0147b36a44ce5c033d9f59cbd9f4

evdev - Send first active rather than 0-th slot state as ST report

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/fbe17f9017e785dd564ce7fc5553a9136d3a0b03

kern - Add kern.features sysctl and FEATURE macro

Similar to FreeBSD.

xorg-server checks e.g. for kern.features.evdev or
kern.features.evdev_support.

Add evdev_support feature

evdev - force no fuzz for autogenerated single touch compat events

As fuzz has already been applied on multitouch event processing.
This allows to remove existing workaround for double fuzz procesing.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/314913ed7c6e6e1b7c80a1063620f478961419b7

evdev - Normalize width and pressure of single touch compat events

to match Synaptics touchpad reporting range.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/127e54deb6d8899e1dc1bc6251d512e19f21b0f1

evdev - Give short aliases to items of evdev_mt_slot array

with using of unioned anonymous structure.

Access to the same data by using different members of union generally
works despite it is not supported by C specs.

Also add helper function to report entire slot state.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/059360287e3344f48f5a7839e2d6d54016b18b19

evdev - Make MT tracking IDs monotonically increasing sequence

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/66bd52f5e241bd2548015f847f12cdff69176c40

evdev - Import support for touch-tracking

Touch tracking is a process of assignment of unique trackingID to each
initiated contact on the surface. Keeping the trackingIDs persistent
across multitouch reports requires solving of so called Euclidian
Bipartite Matching problem.

This commit imports EBM-solver implementation based on Dinitz-Kronrod
algorithm to find minimum cost matching between contacts listed in two
consecutive reports.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/4c0a134e32a7f4dec556fea15c8de22f69864492
Obtained-from: OpenBSD

evdev - Add implicit mode for touch tracking

In implicit mode assignment of slot number and tracking id is performed
automatically on each synchronization requested by device driver.

This is done with creation of intermediate buffer for multitouch events.
This buffer holds untracked events until synchronization is requested by
device driver. It is needed as touch assigment requires
knowledges of all touch positions pushed in current and previous reports.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/f76051c7dabe952b75127a8031d87d78b603be20

evdev - Add support for automatic MT protocol type A to type B conversion

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/d056693d7bc6c1b5f2c1612e5b34807f173e21c7

evdev - Do not export multitouch functions which are unused outside evdev

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/35bc295b30ef91f1835a0ee0225e8d957a9ebddd

evdev - Fix a typo in a commit

- s/prefered/preferred/

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/efd8749fe5cccb6c3d6b5f3c3515bf89ad306bcc

evdev - Fix "hancha" and "han/yong" korean keys handling

The Korean keyboard has two keys, the Korean/Chinese and the
Korean/English toggles, that generate scancodes 0xF1 and 0xF2
(respectively) when pressed, and nothing when released. They do not
repeat.
As Hanyong/Hancha keys are generally greater than 0x80, which is
generally considered a release key, add extra preceding press key event
to generate press/release pair.
Swap Hanyong/Hancha key codes to match reality.

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/6a26c99f827ffa9da5e23d466eeb17131fc75238

evdev - Sync event codes with Linux kernel 6.5

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/87a53bef41fe769920f925e74fedddafd5187b93

Fix commit "Import support for touch tracking" (afa7dd1f)

- Fix maybe-uninitialized warning
- use bitcount32
- bring in bit_foreach_at from FreeBSD
- reorder "static"

evdev - Sync our copy of freebsd-bitstring.h with FreeBSD

- Mostly using proper functions returning the result
instead of assigning it to a pointer.

- Specify bit positions using size_t instead of int.

evdev - Conditionalize kern.features.evdev_support

evdev - Sync with FreeBSD

atkbdc: use proper pointer type for KBDC

FreeBSD-commit: https://github.com/freebsd/freebsd-src/commit/e9305818c1ba2762ec0ac40294cde0a4b96806c7

atkbdc - add quirks from FreeBSD

atkbd - sync with FreeBSD

atkbd - Incoorperate patch from bugreport #3206

https://bugs.dragonflybsd.org/issues/3206

show more ...


/dflybsd-src/contrib/less/LICENSE
/dflybsd-src/contrib/less/NEWS
/dflybsd-src/contrib/less/README
/dflybsd-src/contrib/less/README.DELETED
/dflybsd-src/contrib/less/README.DRAGONFLY
/dflybsd-src/contrib/less/brac.c
/dflybsd-src/contrib/less/ch.c
/dflybsd-src/contrib/less/charset.c
/dflybsd-src/contrib/less/charset.h
/dflybsd-src/contrib/less/cmd.h
/dflybsd-src/contrib/less/cmdbuf.c
/dflybsd-src/contrib/less/command.c
/dflybsd-src/contrib/less/compose.uni
/dflybsd-src/contrib/less/cvt.c
/dflybsd-src/contrib/less/decode.c
/dflybsd-src/contrib/less/edit.c
/dflybsd-src/contrib/less/filename.c
/dflybsd-src/contrib/less/fmt.uni
/dflybsd-src/contrib/less/forwback.c
/dflybsd-src/contrib/less/funcs.h
/dflybsd-src/contrib/less/help.c
/dflybsd-src/contrib/less/ifile.c
/dflybsd-src/contrib/less/input.c
/dflybsd-src/contrib/less/jump.c
/dflybsd-src/contrib/less/less.h
/dflybsd-src/contrib/less/less.nro
/dflybsd-src/contrib/less/lessecho.c
/dflybsd-src/contrib/less/lessecho.nro
/dflybsd-src/contrib/less/lesskey.c
/dflybsd-src/contrib/less/lesskey.h
/dflybsd-src/contrib/less/lesskey.nro
/dflybsd-src/contrib/less/lesskey_parse.c
/dflybsd-src/contrib/less/lglob.h
/dflybsd-src/contrib/less/line.c
/dflybsd-src/contrib/less/linenum.c
/dflybsd-src/contrib/less/lsystem.c
/dflybsd-src/contrib/less/main.c
/dflybsd-src/contrib/less/mark.c
/dflybsd-src/contrib/less/optfunc.c
/dflybsd-src/contrib/less/option.c
/dflybsd-src/contrib/less/option.h
/dflybsd-src/contrib/less/opttbl.c
/dflybsd-src/contrib/less/os.c
/dflybsd-src/contrib/less/output.c
/dflybsd-src/contrib/less/pattern.c
/dflybsd-src/contrib/less/pattern.h
/dflybsd-src/contrib/less/pckeys.h
/dflybsd-src/contrib/less/position.c
/dflybsd-src/contrib/less/position.h
/dflybsd-src/contrib/less/prompt.c
/dflybsd-src/contrib/less/screen.c
/dflybsd-src/contrib/less/search.c
/dflybsd-src/contrib/less/signal.c
/dflybsd-src/contrib/less/tags.c
/dflybsd-src/contrib/less/ttyin.c
/dflybsd-src/contrib/less/ubin.uni
/dflybsd-src/contrib/less/version.c
/dflybsd-src/contrib/less/wide.uni
/dflybsd-src/contrib/less/xbuf.c
/dflybsd-src/contrib/less/xbuf.h
/dflybsd-src/etc/rc.d/wg
/dflybsd-src/include/ifaddrs.h
/dflybsd-src/lib/libc/net/Makefile.inc
/dflybsd-src/sbin/md5/Makefile
/dflybsd-src/sbin/md5/md5.c
/dflybsd-src/sbin/mount_cd9660/mount_cd9660.8
/dflybsd-src/sbin/mount_cd9660/mount_cd9660.c
/dflybsd-src/sbin/ping/ping.8
/dflybsd-src/sbin/ping/ping.c
/dflybsd-src/sbin/umount/umount.8
/dflybsd-src/sbin/umount/umount.c
/dflybsd-src/share/man/man4/inet6.4
/dflybsd-src/share/man/man5/procfs.5
/dflybsd-src/sys/bus/u4b/input/ums.c
/dflybsd-src/sys/conf/files
/dflybsd-src/sys/dev/misc/evdev/cdev.c
/dflybsd-src/sys/dev/misc/evdev/evdev.c
/dflybsd-src/sys/dev/misc/evdev/evdev.h
/dflybsd-src/sys/dev/misc/evdev/evdev_mt.c
/dflybsd-src/sys/dev/misc/evdev/evdev_private.h
/dflybsd-src/sys/dev/misc/evdev/evdev_utils.c
/dflybsd-src/sys/dev/misc/evdev/freebsd-bitstring.h
/dflybsd-src/sys/dev/misc/evdev/input-event-codes.h
/dflybsd-src/sys/dev/misc/evdev/input.h
/dflybsd-src/sys/dev/misc/kbd/atkbd.c
/dflybsd-src/sys/dev/misc/kbd/atkbdc.c
/dflybsd-src/sys/dev/misc/kbd/atkbdcreg.h
/dflybsd-src/sys/dev/misc/kbd/atkbdreg.h
/dflybsd-src/sys/dev/misc/kbd/kbd.c
/dflybsd-src/sys/dev/misc/kbd/kbdreg.h
/dflybsd-src/sys/dev/misc/psm/psm.c
/dflybsd-src/sys/dev/misc/syscons/sysmouse.c
/dflybsd-src/sys/dev/netif/iwm/fw/iwm9000/Makefile
/dflybsd-src/sys/dev/netif/iwm/fw/iwm9260/Makefile
/dflybsd-src/sys/dev/netif/iwm/if_iwm.c
/dflybsd-src/sys/dev/netif/iwm/if_iwm_binding.c
/dflybsd-src/sys/dev/netif/iwm/if_iwm_binding.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_config.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_constants.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_debug.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_fw.c
/dflybsd-src/sys/dev/netif/iwm/if_iwm_fw.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_led.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_mac_ctxt.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_notif_wait.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_pcie_trans.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_phy_ctxt.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_phy_db.c
/dflybsd-src/sys/dev/netif/iwm/if_iwm_phy_db.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_power.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_scan.c
/dflybsd-src/sys/dev/netif/iwm/if_iwm_scan.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_sf.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_sta.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_time_event.c
/dflybsd-src/sys/dev/netif/iwm/if_iwm_time_event.h
/dflybsd-src/sys/dev/netif/iwm/if_iwm_util.h
/dflybsd-src/sys/dev/netif/iwm/if_iwmreg.h
/dflybsd-src/sys/dev/netif/iwm/if_iwmvar.h
kern_mib.c
subr_bus.c
/dflybsd-src/sys/net/if.c
/dflybsd-src/sys/net/if.h
/dflybsd-src/sys/net/if_ethersubr.c
/dflybsd-src/sys/net/if_var.h
/dflybsd-src/sys/net/route.c
/dflybsd-src/sys/net/route.h
/dflybsd-src/sys/net/rtsock.c
/dflybsd-src/sys/net/stf/if_stf.c
/dflybsd-src/sys/net/wg/if_wg.c
/dflybsd-src/sys/netinet/if_ether.c
/dflybsd-src/sys/netinet/in.c
/dflybsd-src/sys/netinet/in_rmx.c
/dflybsd-src/sys/netinet/in_var.h
/dflybsd-src/sys/netinet/ip_output.c
/dflybsd-src/sys/netinet6/icmp6.c
/dflybsd-src/sys/netinet6/in6.c
/dflybsd-src/sys/netinet6/in6_ifattach.c
/dflybsd-src/sys/netinet6/in6_proto.c
/dflybsd-src/sys/netinet6/ip6_var.h
/dflybsd-src/sys/netinet6/nd6.c
/dflybsd-src/sys/netinet6/nd6.h
/dflybsd-src/sys/netinet6/nd6_nbr.c
/dflybsd-src/sys/netinet6/nd6_rtr.c
/dflybsd-src/sys/netproto/802_11/ieee80211_dragonfly.h
/dflybsd-src/sys/netproto/802_11/wlan/ieee80211_input.c
/dflybsd-src/sys/sys/bus.h
/dflybsd-src/sys/sys/mbuf.h
/dflybsd-src/sys/sys/mouse.h
/dflybsd-src/sys/sys/param.h
/dflybsd-src/sys/sys/sysctl.h
/dflybsd-src/sys/sys/taskqueue.h
/dflybsd-src/sys/vfs/Makefile
/dflybsd-src/sys/vfs/fuse/Makefile
/dflybsd-src/sys/vfs/fuse/fuse.h
/dflybsd-src/sys/vfs/fuse/fuse_device.c
/dflybsd-src/sys/vfs/fuse/fuse_io.c
/dflybsd-src/sys/vfs/fuse/fuse_ipc.c
/dflybsd-src/sys/vfs/fuse/fuse_node.c
/dflybsd-src/sys/vfs/fuse/fuse_util.c
/dflybsd-src/sys/vfs/fuse/fuse_vfsops.c
/dflybsd-src/sys/vfs/fuse/fuse_vnops.c
/dflybsd-src/sys/vfs/isofs/cd9660/cd9660_mount.h
/dflybsd-src/sys/vfs/isofs/cd9660/cd9660_vfsops.c
/dflybsd-src/sys/vfs/isofs/cd9660/cd9660_vnops.c
/dflybsd-src/sys/vfs/isofs/cd9660/iso.h
/dflybsd-src/sys/vfs/procfs/procfs_vnops.c
/dflybsd-src/usr.bin/gzip/gzip.c
/dflybsd-src/usr.bin/hexdump/display.c
/dflybsd-src/usr.bin/less/Makefile
/dflybsd-src/usr.bin/less/defines.h
/dflybsd-src/usr.bin/lessecho/Makefile
/dflybsd-src/usr.bin/lesskey/Makefile
/dflybsd-src/usr.bin/monitor/monitor.c
/dflybsd-src/usr.bin/netstat/if.c
/dflybsd-src/usr.bin/netstat/route.c
/dflybsd-src/usr.bin/sockstat/sockstat.c
/dflybsd-src/usr.bin/wc/wc.c
/dflybsd-src/usr.sbin/makefs/msdos.c
/dflybsd-src/usr.sbin/ndp/ndp.8
/dflybsd-src/usr.sbin/ndp/ndp.c
/dflybsd-src/usr.sbin/vnconfig/vnconfig.c
b44c913f28-Feb-2024 Aaron LI <aly@aaronly.me>

net: Reimplement packet loop detection based on mbuf tags

The original naive implementation based on mbuf 'm_pkthdr.loop_cnt' was
flawed:

* There were likely some code paths that allocated mbufs fa

net: Reimplement packet loop detection based on mbuf tags

The original naive implementation based on mbuf 'm_pkthdr.loop_cnt' was
flawed:

* There were likely some code paths that allocated mbufs failed to
initialize the 'loop_cnt' to be zero. This caused unwanted packet
drops in gif(4), as reported by Kyle Butt (iteratee).

* The 'loop_cnt' was system-wide and thus cannot distinguish between the
nesting of specific drivers. For example, it would break an actually
valid setup that makes use of both gif(4) and gre(4).

As a result, follow the FreeBSD's way and reimplement the packet loop
detection based on mbuf tags. Each driver is allocated a unique mbuf
tag cookie, and thus a unique mbuf tag will be created to track the
nesting level of each driver.

The if_tunnel_check_nesting() was derived from FreeBSD but I changed it
to use only one mbuf tag for each cookie (i.e., driver). Although it
can no longer directly detect that a packet loops through the same
interface, it would still be prevented as that would lead to infinite
recursions.

Update gif(4), gre(4) and wg(4) to use the new loop detection facility.

Bump __DragonFly_version as well.

Reported-by: Kyle Butt (iteratee)

show more ...


/dflybsd-src/COPYRIGHT
/dflybsd-src/contrib/awk/FIXES
/dflybsd-src/contrib/awk/FIXES.1e
/dflybsd-src/contrib/awk/LICENSE
/dflybsd-src/contrib/awk/README.DELETED
/dflybsd-src/contrib/awk/README.md
/dflybsd-src/contrib/awk/awk.1
/dflybsd-src/contrib/awk/awk.h
/dflybsd-src/contrib/awk/awkgram.y
/dflybsd-src/contrib/awk/b.c
/dflybsd-src/contrib/awk/lex.c
/dflybsd-src/contrib/awk/lib.c
/dflybsd-src/contrib/awk/main.c
/dflybsd-src/contrib/awk/maketab.c
/dflybsd-src/contrib/awk/parse.c
/dflybsd-src/contrib/awk/proto.h
/dflybsd-src/contrib/awk/run.c
/dflybsd-src/contrib/awk/tran.c
/dflybsd-src/etc/defaults/rc.conf
/dflybsd-src/etc/mtree/BSD.include.dist
/dflybsd-src/etc/mtree/BSD.root.dist
/dflybsd-src/etc/rc.d/DAEMON
/dflybsd-src/etc/rc.d/FILESYSTEMS
/dflybsd-src/etc/rc.d/LOGIN
/dflybsd-src/etc/rc.d/Makefile
/dflybsd-src/etc/rc.d/NETWORKING
/dflybsd-src/etc/rc.d/SERVERS
/dflybsd-src/etc/rc.d/addswap
/dflybsd-src/etc/rc.d/adjkerntz
/dflybsd-src/etc/rc.d/automount
/dflybsd-src/etc/rc.d/automountd
/dflybsd-src/etc/rc.d/autounmountd
/dflybsd-src/etc/rc.d/bootconf
/dflybsd-src/etc/rc.d/bootparams
/dflybsd-src/etc/rc.d/cleanvar
/dflybsd-src/etc/rc.d/cleartmp
/dflybsd-src/etc/rc.d/cryptdisks
/dflybsd-src/etc/rc.d/devd
/dflybsd-src/etc/rc.d/devfs
/dflybsd-src/etc/rc.d/dhclient
/dflybsd-src/etc/rc.d/dhcp_client
/dflybsd-src/etc/rc.d/dhcpcd
/dflybsd-src/etc/rc.d/diskless
/dflybsd-src/etc/rc.d/dmesg
/dflybsd-src/etc/rc.d/dntpd
/dflybsd-src/etc/rc.d/dumpon
/dflybsd-src/etc/rc.d/fixbootfile
/dflybsd-src/etc/rc.d/ftpd
/dflybsd-src/etc/rc.d/hostname
/dflybsd-src/etc/rc.d/hotplugd
/dflybsd-src/etc/rc.d/inetd
/dflybsd-src/etc/rc.d/initdiskless
/dflybsd-src/etc/rc.d/ip6addrctl
/dflybsd-src/etc/rc.d/ip6fw
/dflybsd-src/etc/rc.d/ipfw
/dflybsd-src/etc/rc.d/ipfw3
/dflybsd-src/etc/rc.d/keyserv
/dflybsd-src/etc/rc.d/ldconfig
/dflybsd-src/etc/rc.d/lockd
/dflybsd-src/etc/rc.d/lvm
/dflybsd-src/etc/rc.d/mixer
/dflybsd-src/etc/rc.d/modules
/dflybsd-src/etc/rc.d/motd
/dflybsd-src/etc/rc.d/mountcritlocal
/dflybsd-src/etc/rc.d/mountcritremote
/dflybsd-src/etc/rc.d/mountd
/dflybsd-src/etc/rc.d/mounttmpfs
/dflybsd-src/etc/rc.d/netif
/dflybsd-src/etc/rc.d/netoptions
/dflybsd-src/etc/rc.d/network_ipv6
/dflybsd-src/etc/rc.d/newsyslog
/dflybsd-src/etc/rc.d/nfsclient
/dflybsd-src/etc/rc.d/nfsd
/dflybsd-src/etc/rc.d/nfsserver
/dflybsd-src/etc/rc.d/nisdomain
/dflybsd-src/etc/rc.d/nsswitch
/dflybsd-src/etc/rc.d/pf
/dflybsd-src/etc/rc.d/pflog
/dflybsd-src/etc/rc.d/powerd
/dflybsd-src/etc/rc.d/pppoed
/dflybsd-src/etc/rc.d/pwcheck
/dflybsd-src/etc/rc.d/quota
/dflybsd-src/etc/rc.d/random
/dflybsd-src/etc/rc.d/rcconf
/dflybsd-src/etc/rc.d/resident
/dflybsd-src/etc/rc.d/rndcontrol
/dflybsd-src/etc/rc.d/route6d
/dflybsd-src/etc/rc.d/routed
/dflybsd-src/etc/rc.d/routing
/dflybsd-src/etc/rc.d/rpcbind
/dflybsd-src/etc/rc.d/rtadvd
/dflybsd-src/etc/rc.d/rtsold
/dflybsd-src/etc/rc.d/savecore
/dflybsd-src/etc/rc.d/securelevel
/dflybsd-src/etc/rc.d/sendmail
/dflybsd-src/etc/rc.d/sensorsd
/dflybsd-src/etc/rc.d/serial
/dflybsd-src/etc/rc.d/sppp
/dflybsd-src/etc/rc.d/statd
/dflybsd-src/etc/rc.d/swap1
/dflybsd-src/etc/rc.d/syscons
/dflybsd-src/etc/rc.d/sysctl
/dflybsd-src/etc/rc.d/sysdb
/dflybsd-src/etc/rc.d/syslogd
/dflybsd-src/etc/rc.d/ttys
/dflybsd-src/etc/rc.d/udevd
/dflybsd-src/etc/rc.d/udevd_early
/dflybsd-src/etc/rc.d/vfs_quota
/dflybsd-src/etc/rc.d/virecover
/dflybsd-src/etc/rc.d/vkernel
/dflybsd-src/etc/rc.d/vknetd
/dflybsd-src/etc/rc.d/wg
/dflybsd-src/etc/rc.d/wpa_supplicant
/dflybsd-src/etc/rc.d/ypbind
/dflybsd-src/etc/rc.d/yppasswdd
/dflybsd-src/etc/rc.d/ypserv
/dflybsd-src/etc/rc.d/ypset
/dflybsd-src/etc/rc.d/ypupdated
/dflybsd-src/etc/rc.d/ypxfrd
/dflybsd-src/include/Makefile
/dflybsd-src/sbin/ifconfig/Makefile
/dflybsd-src/sbin/ifconfig/af_inet6.c
/dflybsd-src/sbin/ifconfig/ifclone.c
/dflybsd-src/sbin/ifconfig/ifconfig.8
/dflybsd-src/sbin/ifconfig/ifconfig.c
/dflybsd-src/sbin/ifconfig/ifconfig.h
/dflybsd-src/sbin/ifconfig/ifieee80211.c
/dflybsd-src/sbin/ifconfig/ifwg.c
/dflybsd-src/sbin/route/route.8
/dflybsd-src/share/man/man4/Makefile
/dflybsd-src/share/man/man4/lo.4
/dflybsd-src/share/man/man4/wg.4
/dflybsd-src/share/man/man5/Makefile
/dflybsd-src/share/man/man5/rc.conf.5
/dflybsd-src/share/man/man5/wg.conf.5
/dflybsd-src/share/man/man8/rc.8
/dflybsd-src/sys/bus/pci/pcidevs
/dflybsd-src/sys/conf/files
/dflybsd-src/sys/config/LINT64
/dflybsd-src/sys/crypto/blake2/blake2s.c
/dflybsd-src/sys/crypto/blake2/blake2s.h
/dflybsd-src/sys/crypto/chachapoly.c
/dflybsd-src/sys/dev/netif/re/if_re.c
/dflybsd-src/sys/dev/netif/re/re.h
uipc_mbuf.c
/dflybsd-src/sys/net/Makefile
/dflybsd-src/sys/net/gif/if_gif.c
/dflybsd-src/sys/net/gre/if_gre.c
/dflybsd-src/sys/net/gre/if_gre.h
/dflybsd-src/sys/net/if.c
/dflybsd-src/sys/net/if_types.h
/dflybsd-src/sys/net/if_var.h
/dflybsd-src/sys/net/wg/Makefile
/dflybsd-src/sys/net/wg/if_wg.c
/dflybsd-src/sys/net/wg/if_wg.h
/dflybsd-src/sys/net/wg/selftest/allowedips.c
/dflybsd-src/sys/net/wg/selftest/cookie.c
/dflybsd-src/sys/net/wg/selftest/counter.c
/dflybsd-src/sys/net/wg/wg_cookie.c
/dflybsd-src/sys/net/wg/wg_cookie.h
/dflybsd-src/sys/net/wg/wg_noise.c
/dflybsd-src/sys/net/wg/wg_noise.h
/dflybsd-src/sys/sys/copyright.h
/dflybsd-src/sys/sys/param.h
/dflybsd-src/usr.bin/awk/maketab/Makefile
038b596b04-Feb-2024 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix improper error on certain O_EXCL open() operations

* O_EXCL|O_CREAT open()s were converting EACCES to EEXIST without
determining whether the error was due to an interemdiate directory

kernel - Fix improper error on certain O_EXCL open() operations

* O_EXCL|O_CREAT open()s were converting EACCES to EEXIST without
determining whether the error was due to an interemdiate directory
component. In fact it needs to return the error caused by the
intermediate directory component.

EACCES is only converted to EEXIST by an O_EXCL|O_CREAT open()
when the error is caused by the last component of the path.
Because in that case the last component does in fact exist and
it is not relevant whether it is accessible or not.

* Fix by specifying whether the error came from an intermediate
directory check using a previously unused field in struct
nlookupdata. A bit messy bit this was the easiest way since
we've run out of NLC flag bits.

Reported-by: tuxillo

show more ...

b272101a30-Oct-2023 Aaron LI <aly@aaronly.me>

Various minor whitespace cleanups

Accumulated along the way.


/dflybsd-src/include/Makefile
/dflybsd-src/sbin/ipfw/ipfw2.c
/dflybsd-src/share/man/man4/gif.4
/dflybsd-src/share/man/man9/lock.9
/dflybsd-src/share/man/man9/objcache.9
/dflybsd-src/sys/bus/firewire/fwohci.c
/dflybsd-src/sys/bus/u4b/net/if_cdce.c
/dflybsd-src/sys/cpu/x86_64/include/atomic.h
/dflybsd-src/sys/crypto/chacha20/chacha.c
/dflybsd-src/sys/dev/netif/mn/if_mn.c
/dflybsd-src/sys/dev/netif/rl/if_rl.c
/dflybsd-src/sys/dev/netif/sln/if_sln.c
/dflybsd-src/sys/dev/netif/wi/if_wi.c
/dflybsd-src/sys/dev/virtual/nvmm/Makefile
kern_nrandom.c
kern_objcache.c
subr_param.c
subr_taskqueue.c
uipc_mbuf2.c
uipc_sockbuf.c
uipc_socket.c
uipc_syscalls.c
uipc_usrreq.c
vfs_subr.c
/dflybsd-src/sys/net/Makefile
/dflybsd-src/sys/net/bridge/if_bridge.c
/dflybsd-src/sys/net/disc/if_disc.c
/dflybsd-src/sys/net/gif/if_gif.c
/dflybsd-src/sys/net/if_loop.c
/dflybsd-src/sys/net/ip_mroute/ip_mroute.c
/dflybsd-src/sys/net/ipfw/ip_fw2.c
/dflybsd-src/sys/net/ipfw3_basic/ip_fw3_table.c
/dflybsd-src/sys/net/ipfw3_basic/ip_fw3_table.h
/dflybsd-src/sys/net/pf/if_pfsync.c
/dflybsd-src/sys/net/pf/pf.c
/dflybsd-src/sys/net/pf/pf_ioctl.c
/dflybsd-src/sys/net/pf/pf_norm.c
/dflybsd-src/sys/net/pf/pf_table.c
/dflybsd-src/sys/net/rtsock.c
/dflybsd-src/sys/net/stf/if_stf.c
/dflybsd-src/sys/net/tun/if_tun.c
/dflybsd-src/sys/netbt/hci_unit.c
/dflybsd-src/sys/netgraph/iface/ng_iface.c
/dflybsd-src/sys/netgraph/socket/ng_socket.c
/dflybsd-src/sys/netgraph7/bluetooth/drivers/h4/ng_h4.c
/dflybsd-src/sys/netgraph7/bluetooth/socket/ng_btsocket_hci_raw.c
/dflybsd-src/sys/netinet/ip_input.c
/dflybsd-src/sys/netinet/tcp_output.c
/dflybsd-src/sys/netinet/udp_usrreq.c
/dflybsd-src/sys/netinet6/icmp6.c
/dflybsd-src/sys/netinet6/ip6_forward.c
/dflybsd-src/sys/netinet6/ip6_input.c
/dflybsd-src/sys/netinet6/ip6_mroute.c
/dflybsd-src/sys/netinet6/ip6_output.c
/dflybsd-src/sys/netinet6/raw_ip6.c
/dflybsd-src/sys/netproto/smb/smb_trantcp.c
/dflybsd-src/sys/opencrypto/cryptodev.h
/dflybsd-src/sys/sys/lock.h
/dflybsd-src/sys/sys/mbuf.h
/dflybsd-src/sys/sys/objcache.h
/dflybsd-src/sys/sys/socketvar.h
/dflybsd-src/sys/vfs/nfs/krpc_subr.c
/dflybsd-src/sys/vfs/nfs/nfs_mountrpc.c
/dflybsd-src/sys/vfs/nfs/nfs_socket.c
/dflybsd-src/sys/vfs/nfs/nfs_syscalls.c
/dflybsd-src/usr.bin/netstat/if.c
1d7290e513-Jan-2024 Aaron LI <aly@aaronly.me>

mbuf(9): Add 'm_pkthdr.loop_cnt' for loop detection

Extend the 'm_pkthdr' struct to provide the 'loop_cnt' member by using
currently unused space. Therefore, drivers (e.g., gif, gre, wg) can
make u

mbuf(9): Add 'm_pkthdr.loop_cnt' for loop detection

Extend the 'm_pkthdr' struct to provide the 'loop_cnt' member by using
currently unused space. Therefore, drivers (e.g., gif, gre, wg) can
make use of this new member to easily implement loop detection.

Bump __DragonFly_version.

Discussed-with: dillon
Referred-to: OpenBSD

show more ...

5c69467831-Oct-2023 Aaron LI <aly@aaronly.me>

socket: Implement the SO_USER_COOKIE option

This socket option allows to attach an arbitrary uint32_t value to a
socket as the user-defined cookie/metadata, and then the cookie can be
used in the ke

socket: Implement the SO_USER_COOKIE option

This socket option allows to attach an arbitrary uint32_t value to a
socket as the user-defined cookie/metadata, and then the cookie can be
used in the kernel help manipulate the traffic of the socket.

For example, this socket option can be set by WireGuard and then matched
in IPFW to help control the WireGuard traffic.

This commit is mostly derived from FreeBSD, but I decided to also
support this option in getsockopt().

Note that the support of this option in IPFW (and PF and others) is
still need to be implemented. I'd like to do it in the future but it
may take quite some efforts. This commit alone doesn't achieve much
benefits, but it helps port the WireGuard code from FreeBSD, so commit
it first.

Bump __DragonFly_version.

Credit: https://github.com/freebsd/freebsd-src/commit/d5e8d236f4009fc2611f996c317e94b2c8649cf5

show more ...

0d47c59423-Jan-2024 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix long-standing bug in kqueue backend for *poll*()

* The poll() family of system calls passes an fds[] array with a
series of descriptors and event requests. Our kernel implementation

kernel - Fix long-standing bug in kqueue backend for *poll*()

* The poll() family of system calls passes an fds[] array with a
series of descriptors and event requests. Our kernel implementation
uses kqueue but a long standing bug breaks situations where
more than one fds[] entry for the poll corresponds to the same
{ ident, filter } for kqueue, causing only the last such entry
to be registered with kqueue and breaking poll().

* Added feature to kqueue to supply further distinctions between
knotes beyond the nominal { kq, filter, ident } tuple, allowing
us to fix poll().

* Added a FreeBSD feature where poll() implements an implied POLLHUP
when events = 0. This is used by X11 and (perhaps mistakenly) also
by sshd. Our poll previous ignored fds[] entries with events = 0.

* Note that sshd can generate poll fds[] arrays with both an events = 0
and an events = POLLIN for the same descriptor, which broke sshd
when I initially added the events = 0 support due to the first bug.

Now with that fixed, sshd works properly. However it is unclear whether
the authors of sshd intended events = 0 to detect POLLHUP or not.

Reported-by: servik (missing events = 0 poll feature)
Testing: servik, dillon

show more ...

8a7a751022-Dec-2023 Aaron LI <aly@aaronly.me>

objcache(9): Remove the unused ocflag arg from objcache_reclaimlist()

0704bacf12-Jan-2024 Aaron LI <aly@aaronly.me>

sockbuf: Improve sbcreatecontrol() parameter types to save casts

- Change 'caddr_t p' to 'const void *p' to save casts for the callers.
The 'const' qualifier is also added meanwhile.
- Change 'int

sockbuf: Improve sbcreatecontrol() parameter types to save casts

- Change 'caddr_t p' to 'const void *p' to save casts for the callers.
The 'const' qualifier is also added meanwhile.
- Change 'int size' to 'size_t size', given that callers generally pass
this parameter as sizeof().
- Update all relevant callers.

For the reference, OpenBSD also did this for sbcreatecontrol().

show more ...

58618f2712-Jan-2024 Aaron LI <aly@aaronly.me>

mbuf(9): Add assertions of off/len parameters for _m_copyback2()

Similar to the similar assertions in several other functions.

4e4d812d03-Jan-2024 Aaron LI <aly@aaronly.me>

mbuf(9): Add assertion of 'offset == 0' for m_devget()

As commented above the m_devget() function, the 'offset' argument is
ill-defined and unused; all callers should specify 0 for it. So add an
as

mbuf(9): Add assertion of 'offset == 0' for m_devget()

As commented above the m_devget() function, the 'offset' argument is
ill-defined and unused; all callers should specify 0 for it. So add an
assertion for that.

Meanwhile, fix two callers that didn't satisfy this.

show more ...

279c625b03-Jan-2024 Aaron LI <aly@aaronly.me>

mbuf(9): Tweak a wrongly wrapped conditional in m_free()

2a074a6d03-Jan-2024 Aaron LI <aly@aaronly.me>

mbuf(9): Fix a serious bug: remove extra pointer to caddr_t/c_caddr_t

The 'caddr_t' and 'c_caddr_t' types are already *pointer* to 'char' and
'const char', respectively, so no need and can't add one

mbuf(9): Fix a serious bug: remove extra pointer to caddr_t/c_caddr_t

The 'caddr_t' and 'c_caddr_t' types are already *pointer* to 'char' and
'const char', respectively, so no need and can't add one more pointer to
them.

This bug was my mistake in commit
ef09a3ed3479755d29ff48a4e81912847e96139a.
It broke the pointer arithmetic and caused some weird issues (e.g.,
system panic, SSH connection lost when transferring lots of data).

show more ...

05d02a3828-Dec-2023 Aaron LI <aly@aaronly.me>

kernel: Remove unnecessary casts for updated mbuf(9) functions


/dflybsd-src/sys/bus/firewire/fwohci.c
/dflybsd-src/sys/bus/u4b/net/if_cdce.c
/dflybsd-src/sys/bus/u4b/wlan/if_run.c
/dflybsd-src/sys/bus/u4b/wlan/if_urtwn.c
/dflybsd-src/sys/dev/netif/ae/if_ae.c
/dflybsd-src/sys/dev/netif/ale/if_ale.c
/dflybsd-src/sys/dev/netif/iwi/if_iwi.c
/dflybsd-src/sys/dev/netif/my/if_my.c
/dflybsd-src/sys/dev/netif/sbsh/if_sbsh.c
/dflybsd-src/sys/dev/netif/sln/if_sln.c
/dflybsd-src/sys/dev/netif/ste/if_ste.c
/dflybsd-src/sys/dev/netif/tl/if_tl.c
/dflybsd-src/sys/dev/netif/tx/if_tx.c
/dflybsd-src/sys/dev/netif/txp/if_txp.c
/dflybsd-src/sys/dev/netif/wb/if_wb.c
/dflybsd-src/sys/dev/netif/wi/if_wi.c
uipc_mbuf2.c
/dflybsd-src/sys/net/bridge/if_bridge.c
/dflybsd-src/sys/net/gif/if_gif.c
/dflybsd-src/sys/net/pf/pf.c
/dflybsd-src/sys/net/pf/pf_norm.c
/dflybsd-src/sys/net/rtsock.c
/dflybsd-src/sys/net/stf/if_stf.c
/dflybsd-src/sys/netbt/hci_event.c
/dflybsd-src/sys/netbt/hci_link.c
/dflybsd-src/sys/netbt/hci_socket.c
/dflybsd-src/sys/netbt/l2cap_lower.c
/dflybsd-src/sys/netbt/l2cap_signal.c
/dflybsd-src/sys/netbt/rfcomm_session.c
/dflybsd-src/sys/netgraph/async/ng_async.c
/dflybsd-src/sys/netgraph/bpf/ng_bpf.c
/dflybsd-src/sys/netgraph/cisco/ng_cisco.c
/dflybsd-src/sys/netgraph/mppc/ng_mppc.c
/dflybsd-src/sys/netgraph/socket/ng_socket.c
/dflybsd-src/sys/netgraph7/async/ng_async.c
/dflybsd-src/sys/netgraph7/bluetooth/hci/ng_hci_cmds.c
/dflybsd-src/sys/netgraph7/bluetooth/hci/ng_hci_evnt.c
/dflybsd-src/sys/netgraph7/bluetooth/l2cap/ng_l2cap_evnt.c
/dflybsd-src/sys/netgraph7/bpf/ng_bpf.c
/dflybsd-src/sys/netgraph7/cisco/ng_cisco.c
/dflybsd-src/sys/netgraph7/deflate/ng_deflate.c
/dflybsd-src/sys/netgraph7/mppc/ng_mppc.c
/dflybsd-src/sys/netgraph7/ng_pred1.c
/dflybsd-src/sys/netgraph7/socket/ng_socket.c
/dflybsd-src/sys/netinet/in_gif.c
/dflybsd-src/sys/netinet/ip_icmp.c
/dflybsd-src/sys/netinet/ip_input.c
/dflybsd-src/sys/netinet/tcp_subr.c
/dflybsd-src/sys/netinet6/icmp6.c
/dflybsd-src/sys/netinet6/in6_gif.c
/dflybsd-src/sys/netinet6/ip6_input.c
/dflybsd-src/sys/netinet6/udp6_usrreq.c
/dflybsd-src/sys/netproto/802_11/wlan/ieee80211_dragonfly.c
/dflybsd-src/sys/netproto/802_11/wlan/ieee80211_output.c
/dflybsd-src/sys/netproto/802_11/wlan/ieee80211_superg.c
e843874b28-Dec-2023 Aaron LI <aly@aaronly.me>

mbuf(9): Various minor updates and style cleanups

- Fix the comment that MSIZE/MCLBYTES is defined in <sys/param.h>
instead of <machine/param.h>; update the man page accordingly.
- Adjust some typ

mbuf(9): Various minor updates and style cleanups

- Fix the comment that MSIZE/MCLBYTES is defined in <sys/param.h>
instead of <machine/param.h>; update the man page accordingly.
- Adjust some type casts in mtod() to be more consistent.
- Add the '__unused' attribute to actually unused parameters.
- Remove unused NCL_INIT/NMB_INIT macros from 'uipc_mbuf.c'.
- Use '__func__' instead of hard-coding function names.
- Fix several typos.
- Various style cleanups, mainly whitesapce adjustments.

show more ...

ef09a3ed28-Dec-2023 Aaron LI <aly@aaronly.me>

mbuf(9): Use 'void *' in several public APIs to save casts in callers

Update the following public APIs to use 'void *' or 'const void *'
instead of 'caddr_t'/'c_caddr_t'/'char *', so that callers no

mbuf(9): Use 'void *' in several public APIs to save casts in callers

Update the following public APIs to use 'void *' or 'const void *'
instead of 'caddr_t'/'c_caddr_t'/'char *', so that callers no longer
need to do explicit casts:

- m_append()
- m_copyback()
- m_copyback2()
- m_copydata()
- m_devget()
- m_extadd()

show more ...

89ac0fe922-Dec-2023 Aaron LI <aly@aaronly.me>

mbuf(9): Use 'c_caddr_t' (const) for m_copyback()/m_copyback2()

12345678910>>...189