Commit Graph

19689 Commits

Author SHA1 Message Date
martin da67ab4db2 Pull up following revision(s) (requested by ozaki-r in ticket #1816):
lib/libc/gen/getcap.c: revision 1.58

Fix memory leak in getent()

Memory was not freed if record was not found
2024-03-11 20:02:12 +00:00
martin 3f54da42ef Pull up following revision(s) (requested by riastradh in ticket #1808):
lib/libc/net/getnameinfo.3: revision 1.43

Document the NI_NUMERICSCOPE flag.
PR lib/57832
2024-03-10 18:44:37 +00:00
martin 1e213087fc Pull up following revision(s) (requested by riastradh in ticket #1806):
lib/libc/net/getnameinfo.c: revision 1.60

PR/57609: Carl Engvall: Add salen checks but accept larger sizes
(upto sockaddr_storage)
2024-03-10 13:46:04 +00:00
martin 3a26b36102 Sync external/mit/libuv and apply patch, requested by christos in ticket #1805:
external/mit/libuv/dist/.github/workflows/CI-sample.yml up to 1.1.1.1
	external/mit/libuv/dist/.github/workflows/CI-unix.yml up to 1.1.1.1
	external/mit/libuv/dist/.github/workflows/CI-win.yml up to 1.1.1.1
	external/mit/libuv/dist/.github/workflows/sanitizer.yml up to 1.1.1.1
	external/mit/libuv/dist/.github/ISSUE_TEMPLATE.md up to 1.1.1.2
	external/mit/libuv/dist/.github/stale.yml       up to 1.1.1.2
	external/mit/libuv/dist/.mailmap                up to 1.1.1.2
	external/mit/libuv/dist/AUTHORS                 up to 1.1.1.2
	external/mit/libuv/dist/CMakeLists.txt          up to 1.1.1.2
	external/mit/libuv/dist/CONTRIBUTING.md         up to 1.1.1.2
	external/mit/libuv/dist/ChangeLog               up to 1.1.1.2
	external/mit/libuv/dist/LICENSE                 up to 1.1.1.2
	external/mit/libuv/dist/LICENSE-docs            up to 1.1.1.1
	external/mit/libuv/dist/MAINTAINERS.md          up to 1.1.1.2
	external/mit/libuv/dist/Makefile.am             up to 1.1.1.2
	external/mit/libuv/dist/README.md               up to 1.1.1.2
	external/mit/libuv/dist/SUPPORTED_PLATFORMS.md  up to 1.1.1.2
	external/mit/libuv/dist/autogen.sh              up to 1.1.1.2
	external/mit/libuv/dist/configure.ac            up to 1.1.1.2
	external/mit/libuv/dist/libuv.pc.in             up to 1.1.1.1
	external/mit/libuv/dist/uv_win_longpath.manifest up to 1.1.1.1
	external/mit/libuv/dist/docs/code/cgi/main.c    up to 1.1.1.2
	external/mit/libuv/dist/docs/code/cgi/tick.c    up to 1.1.1.1
	external/mit/libuv/dist/docs/code/detach/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/dns/main.c    up to 1.1.1.2
	external/mit/libuv/dist/docs/code/helloworld/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/idle-basic/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/idle-compute/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/interfaces/main.c up to 1.1.1.2
	external/mit/libuv/dist/docs/code/locks/main.c  up to 1.1.1.1
	external/mit/libuv/dist/docs/code/multi-echo-server/hammer.js up to 1.1.1.1
	external/mit/libuv/dist/docs/code/multi-echo-server/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/multi-echo-server/worker.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/onchange/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/pipe-echo-server/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/plugin/hello.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/plugin/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/plugin/plugin.h up to 1.1.1.1
	external/mit/libuv/dist/docs/code/proc-streams/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/proc-streams/test.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/progress/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/queue-cancel/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/queue-work/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/ref-timer/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/signal/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/spawn/main.c  up to 1.1.1.1
	external/mit/libuv/dist/docs/code/tcp-echo-server/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/thread-create/main.c up to 1.1.1.2
	external/mit/libuv/dist/docs/code/tty/main.c    up to 1.1.1.1
	external/mit/libuv/dist/docs/code/tty-gravity/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/udp-dhcp/main.c up to 1.1.1.2
	external/mit/libuv/dist/docs/code/uvcat/main.c  up to 1.1.1.2
	external/mit/libuv/dist/docs/code/uvstop/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/uvtee/main.c  up to 1.1.1.2
	external/mit/libuv/dist/docs/code/uvwget/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/default-loop/main.c up to 1.1.1.1
	external/mit/libuv/dist/docs/code/CMakeLists.txt up to 1.1.1.1
	external/mit/libuv/dist/docs/code/Makefile      up to 1.1.1.1
	external/mit/libuv/dist/docs/Makefile           up to 1.1.1.1
	external/mit/libuv/dist/docs/make.bat           up to 1.1.1.1
	external/mit/libuv/dist/docs/src/guide/about.rst up to 1.1.1.1
	external/mit/libuv/dist/docs/src/guide/basics.rst up to 1.1.1.2
	external/mit/libuv/dist/docs/src/guide/eventloops.rst up to 1.1.1.2
	external/mit/libuv/dist/docs/src/guide/filesystem.rst up to 1.1.1.2
	external/mit/libuv/dist/docs/src/guide/introduction.rst up to 1.1.1.2
	external/mit/libuv/dist/docs/src/guide/networking.rst up to 1.1.1.2
	external/mit/libuv/dist/docs/src/guide/processes.rst up to 1.1.1.2
	external/mit/libuv/dist/docs/src/guide/threads.rst up to 1.1.1.2
	external/mit/libuv/dist/docs/src/guide/utilities.rst up to 1.1.1.2
	external/mit/libuv/dist/docs/src/api.rst        up to 1.1.1.2
	external/mit/libuv/dist/docs/src/async.rst      up to 1.1.1.2
	external/mit/libuv/dist/docs/src/check.rst      up to 1.1.1.1
	external/mit/libuv/dist/docs/src/conf.py        up to 1.1.1.1
	external/mit/libuv/dist/docs/src/design.rst     up to 1.1.1.2
	external/mit/libuv/dist/docs/src/dll.rst        up to 1.1.1.1
	external/mit/libuv/dist/docs/src/dns.rst        up to 1.1.1.1
	external/mit/libuv/dist/docs/src/errors.rst     up to 1.1.1.2
	external/mit/libuv/dist/docs/src/fs.rst         up to 1.1.1.2
	external/mit/libuv/dist/docs/src/fs_event.rst   up to 1.1.1.1
	external/mit/libuv/dist/docs/src/fs_poll.rst    up to 1.1.1.1
	external/mit/libuv/dist/docs/src/guide.rst      up to 1.1.1.1
	external/mit/libuv/dist/docs/src/handle.rst     up to 1.1.1.2
	external/mit/libuv/dist/docs/src/idle.rst       up to 1.1.1.1
	external/mit/libuv/dist/docs/src/index.rst      up to 1.1.1.2
	external/mit/libuv/dist/docs/src/loop.rst       up to 1.1.1.2
	external/mit/libuv/dist/docs/src/migration_010_100.rst up to 1.1.1.1
	external/mit/libuv/dist/docs/src/misc.rst       up to 1.1.1.2
	external/mit/libuv/dist/docs/src/pipe.rst       up to 1.1.1.2
	external/mit/libuv/dist/docs/src/poll.rst       up to 1.1.1.2
	external/mit/libuv/dist/docs/src/prepare.rst    up to 1.1.1.1
	external/mit/libuv/dist/docs/src/process.rst    up to 1.1.1.2
	external/mit/libuv/dist/docs/src/tcp.rst        up to 1.1.1.2
	external/mit/libuv/dist/docs/src/request.rst    up to 1.1.1.2
	external/mit/libuv/dist/docs/src/signal.rst     up to 1.1.1.1
	external/mit/libuv/dist/docs/src/stream.rst     up to 1.1.1.2
	external/mit/libuv/dist/docs/src/threading.rst  up to 1.1.1.1
	external/mit/libuv/dist/docs/src/threadpool.rst up to 1.1.1.1
	external/mit/libuv/dist/docs/src/timer.rst      up to 1.1.1.2
	external/mit/libuv/dist/docs/src/tty.rst        up to 1.1.1.2
	external/mit/libuv/dist/docs/src/udp.rst        up to 1.1.1.2
	external/mit/libuv/dist/docs/src/upgrading.rst  up to 1.1.1.1
	external/mit/libuv/dist/docs/src/version.rst    up to 1.1.1.1
	external/mit/libuv/dist/docs/src/sphinx-plugins/manpage.py up to 1.1.1.2
	external/mit/libuv/dist/docs/src/static/diagrams.key/Data/st0-311.jpg up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/diagrams.key/Data/st1-475.jpg up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/diagrams.key/Index.zip up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/diagrams.key/preview-micro.jpg up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/diagrams.key/preview-web.jpg up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/diagrams.key/preview.jpg up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/diagrams.key/Metadata/BuildVersionHistory.plist up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/diagrams.key/Metadata/DocumentIdentifier up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/diagrams.key/Metadata/Properties.plist up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/architecture.png up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/favicon.ico up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/logo.png up to 1.1.1.1
	external/mit/libuv/dist/docs/src/static/loop_iteration.png up to 1.1.1.1
	external/mit/libuv/dist/docs/src/metrics.rst    up to 1.1.1.1
	external/mit/libuv/dist/docs/requirements.txt   up to 1.1.1.1
	external/mit/libuv/dist/img/banner.png          up to 1.1.1.1
	external/mit/libuv/dist/img/logos.svg           up to 1.1.1.1
	external/mit/libuv/dist/include/uv/darwin.h     up to 1.1.1.1
	external/mit/libuv/dist/include/uv/aix.h        up to 1.1.1.1
	external/mit/libuv/dist/include/uv/bsd.h        up to 1.1.1.1
	external/mit/libuv/dist/include/uv/errno.h      up to 1.1.1.2
	external/mit/libuv/dist/include/uv/linux.h      up to 1.1.1.1
	external/mit/libuv/dist/include/uv/os390.h      up to 1.1.1.1
	external/mit/libuv/dist/include/uv/posix.h      up to 1.1.1.1
	external/mit/libuv/dist/include/uv/stdint-msvc2008.h up to 1.1.1.1
	external/mit/libuv/dist/include/uv/sunos.h      up to 1.1.1.1
	external/mit/libuv/dist/include/uv/threadpool.h up to 1.1.1.1
	external/mit/libuv/dist/include/uv/tree.h       up to 1.1.1.2
	external/mit/libuv/dist/include/uv/unix.h       up to 1.1.1.2
	external/mit/libuv/dist/include/uv/version.h    up to 1.1.1.2
	external/mit/libuv/dist/include/uv/win.h        up to 1.1.1.2
	external/mit/libuv/dist/include/uv.h            up to 1.1.1.2
	external/mit/libuv/dist/m4/as_case.m4           up to 1.1.1.1
	external/mit/libuv/dist/m4/ax_pthread.m4        up to 1.1.1.1
	external/mit/libuv/dist/m4/libuv-check-flags.m4 up to 1.1.1.2
	external/mit/libuv/dist/m4/libuv-check-versions.m4 up to 1.1.1.1
	external/mit/libuv/dist/src/unix/aix-common.c   up to 1.1.1.2
	external/mit/libuv/dist/src/unix/aix.c          up to 1.1.1.2
	external/mit/libuv/dist/src/unix/async.c        up to 1.1.1.2
	external/mit/libuv/dist/src/unix/atomic-ops.h   up to 1.1.1.2
	external/mit/libuv/dist/src/unix/bsd-ifaddrs.c  up to 1.1.1.2
	external/mit/libuv/dist/src/unix/bsd-proctitle.c up to 1.1.1.2
	external/mit/libuv/dist/src/unix/core.c         up to 1.1.1.2
	external/mit/libuv/dist/src/unix/cygwin.c       up to 1.1.1.1
	external/mit/libuv/dist/src/unix/darwin-proctitle.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/darwin-stub.h  up to 1.1.1.2
	external/mit/libuv/dist/src/unix/darwin.c       up to 1.1.1.2
	external/mit/libuv/dist/src/unix/dl.c           up to 1.1.1.2
	external/mit/libuv/dist/src/unix/freebsd.c      up to 1.1.1.2
	external/mit/libuv/dist/src/unix/fs.c           up to 1.1.1.2
	external/mit/libuv/dist/src/unix/fsevents.c     up to 1.1.1.2
	external/mit/libuv/dist/src/unix/getaddrinfo.c  up to 1.1.1.2
	external/mit/libuv/dist/src/unix/getnameinfo.c  up to 1.1.1.1
	external/mit/libuv/dist/src/unix/haiku.c        up to 1.1.1.1
	external/mit/libuv/dist/src/unix/ibmi.c         up to 1.1.1.2
	external/mit/libuv/dist/src/unix/internal.h     up to 1.1.1.2
	external/mit/libuv/dist/src/unix/loop.c         up to 1.1.1.2
	external/mit/libuv/dist/src/unix/kqueue.c       up to 1.1.1.2
	external/mit/libuv/dist/src/unix/linux-core.c   up to 1.1.1.2
	external/mit/libuv/dist/src/unix/linux-inotify.c up to 1.1.1.2
	external/mit/libuv/dist/src/unix/linux-syscalls.c up to 1.1.1.2
	external/mit/libuv/dist/src/unix/linux-syscalls.h up to 1.1.1.2
	external/mit/libuv/dist/src/unix/loop-watcher.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/netbsd.c       up to 1.1.1.1
	external/mit/libuv/dist/src/unix/no-fsevents.c  up to 1.1.1.1
	external/mit/libuv/dist/src/unix/no-proctitle.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/openbsd.c      up to 1.1.1.1
	external/mit/libuv/dist/src/unix/os390-syscalls.c up to 1.1.1.2
	external/mit/libuv/dist/src/unix/os390-syscalls.h up to 1.1.1.2
	external/mit/libuv/dist/src/unix/os390.c        up to 1.1.1.2
	external/mit/libuv/dist/src/unix/pipe.c         up to 1.1.1.2
	external/mit/libuv/dist/src/unix/poll.c         up to 1.1.1.2
	external/mit/libuv/dist/src/unix/posix-hrtime.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/posix-poll.c   up to 1.1.1.2
	external/mit/libuv/dist/src/unix/process.c      up to 1.1.1.2
	external/mit/libuv/dist/src/unix/procfs-exepath.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/proctitle.c    up to 1.1.1.2
	external/mit/libuv/dist/src/unix/pthread-fixes.c up to 1.1.1.2
	external/mit/libuv/dist/src/unix/random-devurandom.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/signal.c       up to 1.1.1.2
	external/mit/libuv/dist/src/unix/random-getentropy.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/random-getrandom.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/random-sysctl-linux.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/spinlock.h     up to 1.1.1.1
	external/mit/libuv/dist/src/unix/stream.c       up to 1.1.1.2
	external/mit/libuv/dist/src/unix/sunos.c        up to 1.1.1.2
	external/mit/libuv/dist/src/unix/sysinfo-loadavg.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/sysinfo-memory.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/tcp.c          up to 1.1.1.2
	external/mit/libuv/dist/src/unix/thread.c       up to 1.1.1.2
	external/mit/libuv/dist/src/unix/tty.c          up to 1.1.1.2
	external/mit/libuv/dist/src/unix/udp.c          up to 1.1.1.2
	external/mit/libuv/dist/src/unix/epoll.c        up to 1.1.1.1
	external/mit/libuv/dist/src/unix/hurd.c         up to 1.1.1.1
	external/mit/libuv/dist/src/unix/os390-proctitle.c up to 1.1.1.1
	external/mit/libuv/dist/src/unix/qnx.c          up to 1.1.1.1
	external/mit/libuv/dist/src/fs-poll.c           up to 1.1.1.2
	external/mit/libuv/dist/src/heap-inl.h          up to 1.1.1.1
	external/mit/libuv/dist/src/idna.c              up to 1.1.1.2
	external/mit/libuv/dist/src/idna.h              up to 1.1.1.1
	external/mit/libuv/dist/src/inet.c              up to 1.1.1.2
	external/mit/libuv/dist/src/queue.h             up to 1.1.1.1
	external/mit/libuv/dist/src/random.c            up to 1.1.1.2
	external/mit/libuv/dist/src/strscpy.c           up to 1.1.1.2
	external/mit/libuv/dist/src/strscpy.h           up to 1.1.1.2
	external/mit/libuv/dist/src/threadpool.c        up to 1.1.1.2
	external/mit/libuv/dist/src/timer.c             up to 1.1.1.2
	external/mit/libuv/dist/src/uv-common.c         up to 1.1.1.2
	external/mit/libuv/dist/src/uv-common.h         up to 1.1.1.2
	external/mit/libuv/dist/src/uv-data-getter-setters.c up to 1.1.1.2
	external/mit/libuv/dist/src/version.c           up to 1.1.1.1
	external/mit/libuv/dist/src/win/async.c         up to 1.1.1.2
	external/mit/libuv/dist/src/win/atomicops-inl.h up to 1.1.1.2
	external/mit/libuv/dist/src/win/core.c          up to 1.1.1.2
	external/mit/libuv/dist/src/win/detect-wakeup.c up to 1.1.1.2
	external/mit/libuv/dist/src/win/dl.c            up to 1.1.1.1
	external/mit/libuv/dist/src/win/error.c         up to 1.1.1.2
	external/mit/libuv/dist/src/win/fs-event.c      up to 1.1.1.2
	external/mit/libuv/dist/src/win/fs-fd-hash-inl.h up to 1.1.1.2
	external/mit/libuv/dist/src/win/fs.c            up to 1.1.1.2
	external/mit/libuv/dist/src/win/getaddrinfo.c   up to 1.1.1.1
	external/mit/libuv/dist/src/win/getnameinfo.c   up to 1.1.1.1
	external/mit/libuv/dist/src/win/handle-inl.h    up to 1.1.1.2
	external/mit/libuv/dist/src/win/handle.c        up to 1.1.1.2
	external/mit/libuv/dist/src/win/internal.h      up to 1.1.1.2
	external/mit/libuv/dist/src/win/loop-watcher.c  up to 1.1.1.2
	external/mit/libuv/dist/src/win/pipe.c          up to 1.1.1.2
	external/mit/libuv/dist/src/win/poll.c          up to 1.1.1.2
	external/mit/libuv/dist/src/win/process-stdio.c up to 1.1.1.2
	external/mit/libuv/dist/src/win/process.c       up to 1.1.1.2
	external/mit/libuv/dist/src/win/req-inl.h       up to 1.1.1.2
	external/mit/libuv/dist/src/win/signal.c        up to 1.1.1.2
	external/mit/libuv/dist/src/win/snprintf.c      up to 1.1.1.1
	external/mit/libuv/dist/src/win/stream-inl.h    up to 1.1.1.2
	external/mit/libuv/dist/src/win/stream.c        up to 1.1.1.2
	external/mit/libuv/dist/src/win/tcp.c           up to 1.1.1.2
	external/mit/libuv/dist/src/win/thread.c        up to 1.1.1.2
	external/mit/libuv/dist/src/win/tty.c           up to 1.1.1.2
	external/mit/libuv/dist/src/win/udp.c           up to 1.1.1.2
	external/mit/libuv/dist/src/win/util.c          up to 1.1.1.2
	external/mit/libuv/dist/src/win/winapi.c        up to 1.1.1.2
	external/mit/libuv/dist/src/win/winapi.h        up to 1.1.1.2
	external/mit/libuv/dist/src/win/winsock.c       up to 1.1.1.2
	external/mit/libuv/dist/src/win/winsock.h       up to 1.1.1.1
	external/mit/libuv/dist/src/strtok.c            up to 1.1.1.1
	external/mit/libuv/dist/src/strtok.h            up to 1.1.1.1
	external/mit/libuv/dist/test/fixtures/empty_file up to 1.1.1.1
	external/mit/libuv/dist/test/fixtures/load_error.node up to 1.1.1.1
	external/mit/libuv/dist/test/fixtures/lorem_ipsum.txt up to 1.1.1.1
	external/mit/libuv/dist/test/benchmark-async-pummel.c up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-async.c  up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-fs-stat.c up to 1.1.1.1
	external/mit/libuv/dist/test/benchmark-getaddrinfo.c up to 1.1.1.1
	external/mit/libuv/dist/test/benchmark-list.h   up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-loop-count.c up to 1.1.1.1
	external/mit/libuv/dist/test/benchmark-million-async.c up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-million-timers.c up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-multi-accept.c up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-ping-pongs.c up to 1.1.1.1
	external/mit/libuv/dist/test/benchmark-ping-udp.c up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-pound.c  up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-pump.c   up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-sizes.c  up to 1.1.1.1
	external/mit/libuv/dist/test/task.h             up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-spawn.c  up to 1.1.1.1
	external/mit/libuv/dist/test/benchmark-tcp-write-batch.c up to 1.1.1.2
	external/mit/libuv/dist/test/benchmark-thread.c up to 1.1.1.1
	external/mit/libuv/dist/test/benchmark-udp-pummel.c up to 1.1.1.2
	external/mit/libuv/dist/test/blackhole-server.c up to 1.1.1.2
	external/mit/libuv/dist/test/echo-server.c      up to 1.1.1.2
	external/mit/libuv/dist/test/run-benchmarks.c   up to 1.1.1.2
	external/mit/libuv/dist/test/run-tests.c        up to 1.1.1.2
	external/mit/libuv/dist/test/runner-unix.c      up to 1.1.1.2
	external/mit/libuv/dist/test/runner-unix.h      up to 1.1.1.1
	external/mit/libuv/dist/test/runner-win.c       up to 1.1.1.1
	external/mit/libuv/dist/test/runner-win.h       up to 1.1.1.1
	external/mit/libuv/dist/test/runner.c           up to 1.1.1.2
	external/mit/libuv/dist/test/runner.h           up to 1.1.1.1
	external/mit/libuv/dist/test/test-active.c      up to 1.1.1.2
	external/mit/libuv/dist/test/test-async-null-cb.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-async.c       up to 1.1.1.2
	external/mit/libuv/dist/test/test-barrier.c     up to 1.1.1.1
	external/mit/libuv/dist/test/test-close-fd.c    up to 1.1.1.2
	external/mit/libuv/dist/test/test-ip-name.c     up to 1.1.1.1
	external/mit/libuv/dist/test/test-callback-stack.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-close-order.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-condvar.c     up to 1.1.1.1
	external/mit/libuv/dist/test/test-connect-unspecified.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-connection-fail.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-cwd-and-chdir.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-default-loop-close.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-delayed-accept.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-dlerror.c     up to 1.1.1.2
	external/mit/libuv/dist/test/test-eintr-handling.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-embed.c       up to 1.1.1.2
	external/mit/libuv/dist/test/test-emfile.c      up to 1.1.1.1
	external/mit/libuv/dist/test/test-env-vars.c    up to 1.1.1.1
	external/mit/libuv/dist/test/test-error.c       up to 1.1.1.2
	external/mit/libuv/dist/test/test-fail-always.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-fork.c        up to 1.1.1.1
	external/mit/libuv/dist/test/test-fs-copyfile.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-fs-event.c    up to 1.1.1.2
	external/mit/libuv/dist/test/test-fs-fd-hash.c  up to 1.1.1.1
	external/mit/libuv/dist/test/test-fs-open-flags.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-fs-poll.c     up to 1.1.1.2
	external/mit/libuv/dist/test/test-fs-readdir.c  up to 1.1.1.2
	external/mit/libuv/dist/test/test-fs.c          up to 1.1.1.2
	external/mit/libuv/dist/test/test-get-currentexe.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-get-loadavg.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-get-memory.c  up to 1.1.1.1
	external/mit/libuv/dist/test/test-get-passwd.c  up to 1.1.1.2
	external/mit/libuv/dist/test/test-getaddrinfo.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-gethostname.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-getnameinfo.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-getsockname.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-getters-setters.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-gettimeofday.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-handle-fileno.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-homedir.c     up to 1.1.1.1
	external/mit/libuv/dist/test/test-hrtime.c      up to 1.1.1.1
	external/mit/libuv/dist/test/test-idle.c        up to 1.1.1.2
	external/mit/libuv/dist/test/test-idna.c        up to 1.1.1.2
	external/mit/libuv/dist/test/test-ip4-addr.c    up to 1.1.1.1
	external/mit/libuv/dist/test/test-ip6-addr.c    up to 1.1.1.2
	external/mit/libuv/dist/test/test-ipc-heavy-traffic-deadlock-bug.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-ipc-send-recv.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-ipc.c         up to 1.1.1.2
	external/mit/libuv/dist/test/test-list.h        up to 1.1.1.2
	external/mit/libuv/dist/test/test-loop-alive.c  up to 1.1.1.1
	external/mit/libuv/dist/test/test-loop-close.c  up to 1.1.1.1
	external/mit/libuv/dist/test/test-loop-configure.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-loop-handles.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-loop-stop.c   up to 1.1.1.1
	external/mit/libuv/dist/test/test-loop-time.c   up to 1.1.1.2
	external/mit/libuv/dist/test/test-multiple-listen.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-mutexes.c     up to 1.1.1.1
	external/mit/libuv/dist/test/test-osx-select.c  up to 1.1.1.1
	external/mit/libuv/dist/test/test-poll-oob.c    up to 1.1.1.1
	external/mit/libuv/dist/test/test-pass-always.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-ping-pong.c   up to 1.1.1.2
	external/mit/libuv/dist/test/test-pipe-bind-error.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-pipe-close-stdout-read-stdin.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-pipe-connect-error.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-pipe-connect-multiple.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-pipe-connect-prepare.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-pipe-getsockname.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-pipe-pending-instances.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-pipe-sendmsg.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-pipe-server-close.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-pipe-set-fchmod.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-pipe-set-non-blocking.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-platform-output.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-poll-close.c  up to 1.1.1.1
	external/mit/libuv/dist/test/test-poll-close-doesnt-corrupt-stack.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-poll-closesocket.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-poll.c        up to 1.1.1.2
	external/mit/libuv/dist/test/test-process-priority.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-process-title-threadsafe.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-process-title.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-queue-foreach-delete.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-random.c      up to 1.1.1.1
	external/mit/libuv/dist/test/test-ref.c         up to 1.1.1.2
	external/mit/libuv/dist/test/test-run-nowait.c  up to 1.1.1.1
	external/mit/libuv/dist/test/test-run-once.c    up to 1.1.1.1
	external/mit/libuv/dist/test/test-semaphore.c   up to 1.1.1.1
	external/mit/libuv/dist/test/test-shutdown-close.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-shutdown-eof.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-shutdown-twice.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-signal.c      up to 1.1.1.1
	external/mit/libuv/dist/test/test-spawn.c       up to 1.1.1.2
	external/mit/libuv/dist/test/test-signal-multiple-loops.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-signal-pending-on-close.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-socket-buffer-size.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-stdio-over-pipes.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-strscpy.c     up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-alloc-cb-fail.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-bind-error.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-bind6-error.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-close-accept.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-close-reset.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-close-while-connecting.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-close.c   up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-connect-error-after-write.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-flags.c   up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-oob.c     up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-connect-error.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-connect-timeout.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-connect6-error.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-create-socket-early.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-open.c    up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-read-stop.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-shutdown-after-write.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-try-write-error.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-try-write.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-unexpected-read.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-write-after-connect.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-write-fail.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-write-queue-order.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-thread-equal.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-thread.c      up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-write-to-half-open-connection.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tcp-writealot.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-threadpool-cancel.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-threadpool.c  up to 1.1.1.1
	external/mit/libuv/dist/test/test-timer-again.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-timer-from-check.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-timer.c       up to 1.1.1.2
	external/mit/libuv/dist/test/test-tmpdir.c      up to 1.1.1.1
	external/mit/libuv/dist/test/test-tty-duplicate-key.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tty-escape-sequence-processing.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-tty.c         up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-alloc-cb-fail.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-bind.c    up to 1.1.1.1
	external/mit/libuv/dist/test/test-udp-connect.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-create-socket-early.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-udp-ipv6.c    up to 1.1.1.1
	external/mit/libuv/dist/test/test-udp-dgram-too-big.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-udp-multicast-interface.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-multicast-interface6.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-multicast-join.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-multicast-join6.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-multicast-ttl.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-open.c    up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-options.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-udp-send-and-recv.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-send-hang-loop.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-send-immediate.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-send-unreachable.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-udp-try-send.c up to 1.1.1.2
	external/mit/libuv/dist/test/test-uname.c       up to 1.1.1.1
	external/mit/libuv/dist/test/test-walk-handles.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-watcher-cross-stop.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-metrics.c     up to 1.1.1.1
	external/mit/libuv/dist/test/benchmark-queue-work.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-not-readable-nor-writable-on-read-error.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-not-writable-after-shutdown.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-poll-multiple-handles.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-readable-on-eof.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-shutdown-simultaneous.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-strtok.c      up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-close-after-read-timeout.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-read-stop-start.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-tcp-rst.c     up to 1.1.1.1
	external/mit/libuv/dist/test/test-test-macros.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-udp-connect6.c up to 1.1.1.1
	external/mit/libuv/dist/test/test-udp-mmsg.c    up to 1.1.1.1
	external/mit/libuv/dist/test/test-udp-sendmmsg-error.c up to 1.1.1.1
	external/mit/libuv/dist/tools/make_dist_html.py up to 1.1.1.2
	external/mit/libuv/dist/tools/vswhere_usability_wrapper.cmd up to 1.1.1.1
	external/mit/libuv/dist/LINKS.md                up to 1.1.1.1
	external/mit/libuv/dist/.readthedocs.yaml       up to 1.1.1.1
	external/mit/libuv/dist/libuv-static.pc.in      up to 1.1.1.1
	external/mit/libuv/Makefile                     up to 1.1
	external/mit/libuv/mkpc                         up to 1.1
	external/mit/libuv/pkgconfig.mk                 up to 1.1
	external/mit/libuv/lib/Makefile                 up to 1.6
	external/mit/libuv/lib/libuv.3                  up to 1.1
	etc/mtree/NetBSD.dist.base			(apply patch)
	external/bsd/nsd/include/config.h		(apply patch)
	external/bsd/unbound/include/config.h		(apply patch)
	external/mpl/bind/Makefile			(apply patch)
	external/mpl/bind/Makefile.inc			(apply patch)
	external/mpl/bind/dist/lib/ns/pfilter.c		(apply patch)
	external/mpl/bind/include/config.h		(apply patch)
	external/mpl/bind/lib/libdns/Makefile		(apply patch)
	external/mpl/bind/lib/libisc/Makefile		(apply patch)
	lib/Makefile					(apply patch)
	share/mk/bsd.lib.mk				1.383 (adapted),1.391 via patch
	doc/3RDPARTY					(manually edited)

Import libuv 1.44.2.
Adjust nsd, unbound and bind to the netbsd-9 branch.
2024-03-01 11:43:29 +00:00
martin 95c762f12c Pull up following revision(s) (requested by riastradh in ticket #1801):
tests/lib/libm/t_fenv.c: revision 1.14
	tests/lib/libm/t_fenv.c: revision 1.15
	lib/libm/arch/x86_64/fenv.c: revision 1.11

fenv(3): Add test for PR port-amd64/57949.

fenv(3): Fix fetestexcept to avoid side effects on trap state.

PR port-amd64/57949
2024-02-23 18:13:54 +00:00
martin 5277d4a5b4 Pull up following revision(s) (requested by riastradh in ticket #1788):
lib/libc/inet/inet.3: revision 1.7

inet(3): Fix typo in description of size argument.

This is the size of dst, not of src.  The size of src is determined
by the address family.

Fix markup while here: .Fa for function arguments, not .Ar which is
for command arguments.
2024-01-14 15:28:27 +00:00
martin 311db6848f Pull up the following, requested by kim in ticket #1780:
crypto/external/bsd/openssh/Makefile.inc        up to 1.15 (+patch)
	crypto/external/bsd/openssh/bin/Makefile.inc    up to 1.4
	crypto/external/bsd/openssh/bin/scp/Makefile    up to 1.6
	crypto/external/bsd/openssh/bin/sftp/Makefile   up to 1.11
	crypto/external/bsd/openssh/bin/sftp-server/Makefile up to 1.4
	crypto/external/bsd/openssh/bin/ssh/Makefile    up to 1.20
	crypto/external/bsd/openssh/bin/ssh-add/Makefile up to 1.3
	crypto/external/bsd/openssh/bin/ssh-agent/Makefile up to 1.7
	crypto/external/bsd/openssh/bin/ssh-keygen/Makefile up to 1.10
	crypto/external/bsd/openssh/bin/ssh-keyscan/Makefile up to 1.6
	crypto/external/bsd/openssh/bin/ssh-pkcs11-helper/Makefile up to 1.4
	crypto/external/bsd/openssh/bin/sshd/Makefile   up to 1.27 (+patch)
	crypto/external/bsd/openssh/dist/PROTOCOL.sshsig up to 1.1.1.2
	crypto/external/bsd/openssh/dist/srclimit.c     up to 1.3
	crypto/external/bsd/openssh/dist/sftp-realpath.c up to 1.3
	crypto/external/bsd/openssh/dist/sntrup761.c    up to 1.3
	crypto/external/bsd/openssh/dist/sntrup761.sh   up to 1.1.1.2
	crypto/external/bsd/openssh/dist/sshsig.c       up to 1.12
	crypto/external/bsd/openssh/dist/sshsig.h       up to 1.1.1.5
	crypto/external/bsd/openssh/dist/addr.c         up to 1.6
	crypto/external/bsd/openssh/dist/PROTOCOL.u2f   up to 1.1.1.3
	crypto/external/bsd/openssh/dist/sk-api.h       up to 1.1.1.6
	crypto/external/bsd/openssh/dist/sk-usbhid.c    up to 1.9
	crypto/external/bsd/openssh/dist/ssh-ecdsa-sk.c up to 1.4
	crypto/external/bsd/openssh/dist/ssh-ed25519-sk.c up to 1.5
	crypto/external/bsd/openssh/dist/ssh-sk-client.c up to 1.6
	crypto/external/bsd/openssh/dist/ssh-sk-helper.8 up to 1.1.1.2
	crypto/external/bsd/openssh/dist/ssh-sk-helper.c up to 1.7
	crypto/external/bsd/openssh/dist/ssh-sk.c       up to 1.8
	crypto/external/bsd/openssh/dist/ssh-sk.h       up to 1.1.1.2
	crypto/external/bsd/openssh/dist/sshbuf-io.c    up to 1.2
	crypto/external/bsd/openssh/dist/addr.h         up to 1.1.1.2
	crypto/external/bsd/openssh/dist/kexsntrup761x25519.c up to 1.3
	crypto/external/bsd/openssh/dist/cipher-chachapoly-libcrypto.c up to 1.3
	crypto/external/bsd/openssh/dist/srclimit.h     up to 1.1.1.1
	crypto/external/bsd/openssh/dist/auth2-pubkeyfile.c up to 1.3
	crypto/external/bsd/openssh/dist/sftp-usergroup.c up to 1.3
	crypto/external/bsd/openssh/dist/sftp-usergroup.h up to 1.1.1.1
	crypto/external/bsd/openssh/dist/ed25519.sh     up to 1.1.1.1
	crypto/external/bsd/openssh/dist/crc32.c        delete
	crypto/external/bsd/openssh/dist/crc32.h        delete
	crypto/external/bsd/openssh/dist/fe25519.c      delete
	crypto/external/bsd/openssh/dist/fe25519.h      delete
	crypto/external/bsd/openssh/dist/ge25519.c      delete
	crypto/external/bsd/openssh/dist/ge25519.h      delete
	crypto/external/bsd/openssh/dist/ge25519_base.data delete
	crypto/external/bsd/openssh/dist/kexsntrup4591761x25519.c delete
	crypto/external/bsd/openssh/dist/sc25519.c      delete
	crypto/external/bsd/openssh/dist/sc25519.h      delete
	crypto/external/bsd/openssh/dist/sntrup4591761.c delete
	crypto/external/bsd/openssh/dist/sntrup4591761.sh delete
	crypto/external/bsd/openssh/dist/uuencode.c     delete
	crypto/external/bsd/openssh/dist/uuencode.h     delete
	crypto/external/bsd/openssh/dist/verify.c       delete
	crypto/external/bsd/openssh/dist/LICENCE        up to 1.7
	crypto/external/bsd/openssh/dist/PROTOCOL       up to 1.23
	crypto/external/bsd/openssh/dist/PROTOCOL.agent up to 1.15
	crypto/external/bsd/openssh/dist/PROTOCOL.certkeys up to 1.13
	crypto/external/bsd/openssh/dist/PROTOCOL.chacha20poly1305 up to 1.1.1.4
	crypto/external/bsd/openssh/dist/PROTOCOL.key   up to 1.1.1.3
	crypto/external/bsd/openssh/dist/PROTOCOL.krl   up to 1.1.1.5
	crypto/external/bsd/openssh/dist/PROTOCOL.mux   up to 1.12
	crypto/external/bsd/openssh/dist/addrmatch.c    up to 1.15
	crypto/external/bsd/openssh/dist/auth-krb5.c    up to 1.16
	crypto/external/bsd/openssh/dist/auth-options.c up to 1.29
	crypto/external/bsd/openssh/dist/auth-options.h up to 1.15
	crypto/external/bsd/openssh/dist/auth-pam.c     up to 1.21
	crypto/external/bsd/openssh/dist/auth-passwd.c  up to 1.13
	crypto/external/bsd/openssh/dist/auth-rhosts.c  up to 1.16
	crypto/external/bsd/openssh/dist/auth.c         up to 1.34
	crypto/external/bsd/openssh/dist/auth.h         up to 1.23
	crypto/external/bsd/openssh/dist/auth2-chall.c  up to 1.19
	crypto/external/bsd/openssh/dist/auth2-gss.c    up to 1.17
	crypto/external/bsd/openssh/dist/auth2-hostbased.c up to 1.23
	crypto/external/bsd/openssh/dist/auth2-kbdint.c up to 1.15
	crypto/external/bsd/openssh/dist/auth2-krb5.c   up to 1.10
	crypto/external/bsd/openssh/dist/auth2-none.c   up to 1.14
	crypto/external/bsd/openssh/dist/auth2-passwd.c up to 1.16
	crypto/external/bsd/openssh/dist/auth2-pubkey.c up to 1.34
	crypto/external/bsd/openssh/dist/auth2.c        up to 1.29
	crypto/external/bsd/openssh/dist/authfd.c       up to 1.27
	crypto/external/bsd/openssh/dist/authfd.h       up to 1.17
	crypto/external/bsd/openssh/dist/authfile.c     up to 1.28
	crypto/external/bsd/openssh/dist/authfile.h     up to 1.10
	crypto/external/bsd/openssh/dist/canohost.c     up to 1.16
	crypto/external/bsd/openssh/dist/chacha.c       up to 1.6
	crypto/external/bsd/openssh/dist/chacha.h       up to 1.3
	crypto/external/bsd/openssh/dist/channels.c     up to 1.42
	crypto/external/bsd/openssh/dist/channels.h     up to 1.26
	crypto/external/bsd/openssh/dist/cipher-chachapoly.c up to 1.7
	crypto/external/bsd/openssh/dist/cipher-chachapoly.h up to 1.3
	crypto/external/bsd/openssh/dist/cipher.c       up to 1.21
	crypto/external/bsd/openssh/dist/cipher.h       up to 1.17
	crypto/external/bsd/openssh/dist/clientloop.c   up to 1.39
	crypto/external/bsd/openssh/dist/clientloop.h   up to 1.18
	crypto/external/bsd/openssh/dist/compat.c       up to 1.26
	crypto/external/bsd/openssh/dist/compat.h       up to 1.18
	crypto/external/bsd/openssh/dist/crypto_api.h   up to 1.5
	crypto/external/bsd/openssh/dist/dh.c           up to 1.20
	crypto/external/bsd/openssh/dist/dh.h           up to 1.13
	crypto/external/bsd/openssh/dist/digest-libc.c  up to 1.8
	crypto/external/bsd/openssh/dist/digest-openssl.c up to 1.9
	crypto/external/bsd/openssh/dist/dispatch.c     up to 1.11
	crypto/external/bsd/openssh/dist/dns.c          up to 1.23
	crypto/external/bsd/openssh/dist/dns.h          up to 1.13
	crypto/external/bsd/openssh/dist/ed25519.c      up to 1.6
	crypto/external/bsd/openssh/dist/fatal.c        up to 1.7
	crypto/external/bsd/openssh/dist/getrrsetbyname.c up to 1.6
	crypto/external/bsd/openssh/dist/gss-genr.c     up to 1.11
	crypto/external/bsd/openssh/dist/gss-serv.c     up to 1.15
	crypto/external/bsd/openssh/dist/hash.c         up to 1.7
	crypto/external/bsd/openssh/dist/hmac.c         up to 1.8
	crypto/external/bsd/openssh/dist/hostfile.c     up to 1.23
	crypto/external/bsd/openssh/dist/hostfile.h     up to 1.11
	crypto/external/bsd/openssh/dist/includes.h     up to 1.9
	crypto/external/bsd/openssh/dist/kex.c          up to 1.34
	crypto/external/bsd/openssh/dist/kex.h          up to 1.24
	crypto/external/bsd/openssh/dist/kexdh.c        up to 1.10
	crypto/external/bsd/openssh/dist/kexgen.c       up to 1.7
	crypto/external/bsd/openssh/dist/kexgexc.c      up to 1.17
	crypto/external/bsd/openssh/dist/kexgexs.c      up to 1.23
	crypto/external/bsd/openssh/dist/krl.c          up to 1.23
	crypto/external/bsd/openssh/dist/krl.h          up to 1.6
	crypto/external/bsd/openssh/dist/ldapauth.c     up to 1.8
	crypto/external/bsd/openssh/dist/ldapauth.h     up to 1.6
	crypto/external/bsd/openssh/dist/log.c          up to 1.27
	crypto/external/bsd/openssh/dist/log.h          up to 1.17
	crypto/external/bsd/openssh/dist/mac.c          up to 1.16
	crypto/external/bsd/openssh/dist/match.c        up to 1.16
	crypto/external/bsd/openssh/dist/match.h        up to 1.11
	crypto/external/bsd/openssh/dist/misc.c         up to 1.35
	crypto/external/bsd/openssh/dist/misc.h         up to 1.27
	crypto/external/bsd/openssh/dist/moduli         up to 1.10
	crypto/external/bsd/openssh/dist/moduli.c       up to 1.17
	crypto/external/bsd/openssh/dist/monitor.c      up to 1.43
	crypto/external/bsd/openssh/dist/monitor.h      up to 1.13
	crypto/external/bsd/openssh/dist/monitor_fdpass.c up to 1.9
	crypto/external/bsd/openssh/dist/monitor_wrap.c up to 1.34
	crypto/external/bsd/openssh/dist/monitor_wrap.h up to 1.23
	crypto/external/bsd/openssh/dist/msg.c          up to 1.11
	crypto/external/bsd/openssh/dist/mux.c          up to 1.35
	crypto/external/bsd/openssh/dist/myproposal.h   up to 1.24
	crypto/external/bsd/openssh/dist/namespace.h    up to 1.10
	crypto/external/bsd/openssh/dist/nchan.c        up to 1.14
	crypto/external/bsd/openssh/dist/packet.c       up to 1.50
	crypto/external/bsd/openssh/dist/packet.h       up to 1.26
	crypto/external/bsd/openssh/dist/pathnames.h    up to 1.15
	crypto/external/bsd/openssh/dist/pfilter.c      up to 1.8 (+patch)
	crypto/external/bsd/openssh/dist/poly1305.c     up to 1.6
	crypto/external/bsd/openssh/dist/progressmeter.c up to 1.15
	crypto/external/bsd/openssh/dist/readconf.c     up to 1.44
	crypto/external/bsd/openssh/dist/readconf.h     up to 1.34
	crypto/external/bsd/openssh/dist/readpass.c     up to 1.18
	crypto/external/bsd/openssh/dist/rijndael.h     up to 1.3
	crypto/external/bsd/openssh/dist/sandbox-pledge.c up to 1.3
	crypto/external/bsd/openssh/dist/sandbox-rlimit.c up to 1.7
	crypto/external/bsd/openssh/dist/scp.1          up to 1.31
	crypto/external/bsd/openssh/dist/scp.c          up to 1.41
	crypto/external/bsd/openssh/dist/servconf.c     up to 1.44
	crypto/external/bsd/openssh/dist/servconf.h     up to 1.30
	crypto/external/bsd/openssh/dist/serverloop.c   up to 1.35
	crypto/external/bsd/openssh/dist/session.c      up to 1.38
	crypto/external/bsd/openssh/dist/session.h      up to 1.10
	crypto/external/bsd/openssh/dist/sftp-client.c  up to 1.35
	crypto/external/bsd/openssh/dist/sftp-client.h  up to 1.18
	crypto/external/bsd/openssh/dist/sftp-common.c  up to 1.14
	crypto/external/bsd/openssh/dist/sftp-common.h  up to 1.8
	crypto/external/bsd/openssh/dist/sftp-glob.c    up to 1.15
	crypto/external/bsd/openssh/dist/sftp-server-main.c up to 1.8
	crypto/external/bsd/openssh/dist/sftp-server.8  up to 1.14
	crypto/external/bsd/openssh/dist/sftp-server.c  up to 1.30
	crypto/external/bsd/openssh/dist/sftp.1         up to 1.30
	crypto/external/bsd/openssh/dist/sftp.c         up to 1.39
	crypto/external/bsd/openssh/dist/ssh-add.1      up to 1.18
	crypto/external/bsd/openssh/dist/ssh-add.c      up to 1.30
	crypto/external/bsd/openssh/dist/ssh-agent.1    up to 1.19
	crypto/external/bsd/openssh/dist/ssh-agent.c    up to 1.37
	crypto/external/bsd/openssh/dist/ssh-dss.c      up to 1.18
	crypto/external/bsd/openssh/dist/ssh-ecdsa.c    up to 1.15
	crypto/external/bsd/openssh/dist/ssh-ed25519.c  up to 1.10
	crypto/external/bsd/openssh/dist/ssh-gss.h      up to 1.10
	crypto/external/bsd/openssh/dist/ssh-keygen.1   up to 1.34
	crypto/external/bsd/openssh/dist/ssh-keygen.c   up to 1.46
	crypto/external/bsd/openssh/dist/ssh-keyscan.1  up to 1.18
	crypto/external/bsd/openssh/dist/ssh-keyscan.c  up to 1.32
	crypto/external/bsd/openssh/dist/ssh-keysign.8  up to 1.14
	crypto/external/bsd/openssh/dist/ssh-keysign.c  up to 1.24
	crypto/external/bsd/openssh/dist/ssh-pkcs11-client.c up to 1.19
	crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.8 up to 1.12
	crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.c up to 1.22
	crypto/external/bsd/openssh/dist/ssh-pkcs11.c   up to 1.26
	crypto/external/bsd/openssh/dist/ssh-pkcs11.h   up to 1.9
	crypto/external/bsd/openssh/dist/ssh-rsa.c      up to 1.19
	crypto/external/bsd/openssh/dist/ssh-xmss.c     up to 1.6
	crypto/external/bsd/openssh/dist/ssh.1          up to 1.39
	crypto/external/bsd/openssh/dist/ssh.c          up to 1.45
	crypto/external/bsd/openssh/dist/ssh.h          up to 1.13
	crypto/external/bsd/openssh/dist/ssh2.h         up to 1.15
	crypto/external/bsd/openssh/dist/ssh_api.c      up to 1.15
	crypto/external/bsd/openssh/dist/ssh_config     up to 1.16
	crypto/external/bsd/openssh/dist/ssh_config.5   up to 1.40
	crypto/external/bsd/openssh/dist/sshbuf-getput-basic.c up to 1.12
	crypto/external/bsd/openssh/dist/sshbuf-getput-crypto.c up to 1.11
	crypto/external/bsd/openssh/dist/sshbuf-misc.c  up to 1.14
	crypto/external/bsd/openssh/dist/sshbuf.c       up to 1.14
	crypto/external/bsd/openssh/dist/sshbuf.h       up to 1.19
	crypto/external/bsd/openssh/dist/sshconnect.c   up to 1.37
	crypto/external/bsd/openssh/dist/sshconnect.h   up to 1.17
	crypto/external/bsd/openssh/dist/sshconnect2.c  up to 1.46
	crypto/external/bsd/openssh/dist/sshd.8         up to 1.31
	crypto/external/bsd/openssh/dist/sshd.c         up to 1.50
	crypto/external/bsd/openssh/dist/sshd_config    up to 1.28
	crypto/external/bsd/openssh/dist/sshd_config.5  up to 1.42
	crypto/external/bsd/openssh/dist/ssherr.c       up to 1.10
	crypto/external/bsd/openssh/dist/ssherr.h       up to 1.4
	crypto/external/bsd/openssh/dist/sshkey-xmss.c  up to 1.10
	crypto/external/bsd/openssh/dist/sshkey-xmss.h  up to 1.5
	crypto/external/bsd/openssh/dist/sshkey.c       up to 1.32
	crypto/external/bsd/openssh/dist/sshkey.h       up to 1.19
	crypto/external/bsd/openssh/dist/sshlogin.c     up to 1.13
	crypto/external/bsd/openssh/dist/sshpty.c       up to 1.8
	crypto/external/bsd/openssh/dist/ttymodes.c     up to 1.12
	crypto/external/bsd/openssh/dist/uidswap.c      up to 1.10
	crypto/external/bsd/openssh/dist/umac.c         up to 1.22
	crypto/external/bsd/openssh/dist/umac.h         up to 1.10
	crypto/external/bsd/openssh/dist/utf8.c         up to 1.9
	crypto/external/bsd/openssh/dist/utf8.h         up to 1.5
	crypto/external/bsd/openssh/dist/version.h      up to 1.44
	crypto/external/bsd/openssh/dist/xmalloc.c      up to 1.13
	crypto/external/bsd/openssh/dist/xmalloc.h      up to 1.16
	crypto/external/bsd/openssh/dist/xmss_hash.c    up to 1.3
	crypto/external/bsd/openssh/dist/moduli-gen/Makefile up to 1.3
	crypto/external/bsd/openssh/dist/moduli-gen/moduli-gen.sh up to 1.1.1.3
	crypto/external/bsd/openssh/dist/moduli-gen/moduli.2048 up to 1.16
	crypto/external/bsd/openssh/dist/moduli-gen/moduli.3072 up to 1.18
	crypto/external/bsd/openssh/dist/moduli-gen/moduli.4096 up to 1.18
	crypto/external/bsd/openssh/dist/moduli-gen/moduli.6144 up to 1.18
	crypto/external/bsd/openssh/dist/moduli-gen/moduli.7680 up to 1.18
	crypto/external/bsd/openssh/dist/moduli-gen/moduli.8192 up to 1.18
	crypto/external/bsd/openssh/lib/Makefile        up to 1.38
	crypto/external/bsd/openssh/lib/shlib_version   up to 1.36
	crypto/external/bsd/openssh/openssh2netbsd      up to 1.4
	lib/libpam/modules/pam_ssh/Makefile             up to 1.13
	lib/libpam/modules/pam_ssh/pam_ssh.c            up to 1.30
	distrib/sets/lists/base/shl.mi			(apply patch)
	distrib/sets/lists/debug/shl.mi			(apply patch)
	doc/3RDPARTY					(apply patch)

Update OpenSSH to 9.6.
2023-12-25 12:30:59 +00:00
martin 721cb2ae24 Pull up following revision(s) (requested by kre in ticket #1776):
lib/libc/net/sethostent.c: revision 1.21

Fix a couple of (not very likely) memory leaks, reported by enh@google.com
who attributed them:

  the malloc one was reported to Android (as
  https://android-review.googlesource.com/c/platform/bionic/+/2856549)
  by wuhaitao3 <wuhaitao3@xiaomi.corp-partner.google.com>; Chris Ferris
  <cferris@google.com> then spotted the goto nospc one.
2023-12-10 13:09:58 +00:00
martin 6ef5f9dd31 Pull up following revision(s) (requested by riastradh in ticket #1775):
tests/lib/libpthread/Makefile: revision 1.16
	lib/libpthread/pthread.c: revision 1.184
	distrib/sets/lists/debug/mi: revision 1.424
	distrib/sets/lists/tests/mi: revision 1.1297
	tests/lib/libpthread/t_stack.c: revision 1.1
	tests/lib/libpthread/t_stack.c: revision 1.2
	tests/lib/libpthread/t_stack.c: revision 1.3
	tests/lib/libpthread/t_stack.c: revision 1.4
	tests/lib/libpthread/t_stack.c: revision 1.5
	tests/lib/libpthread/t_stack.c: revision 1.6

pthread: Add tests for pthread user stack allocation.
PR lib/57721

libpthread/t_stack: Make this more robust to the guard size bug.
Make sure to allocate enough space for the thread's stack for a guard
even though there shouldn't be one, so that when we run the thread,
it doesn't start with the stack pointer pointing into someone else's
allocation (like malloc) causing stack frames to trash another data
structure -- or causing the user of that data structure to trash the
stack frames.
PR lib/57721

libpthread/t_stack: Omit needless cast in previous.
Arose from an earlier draft of the change.
PR lib/57721

libpthread/t_stack: Appease gcc12 maybe-uninitialized warning.
The jmp_buf is not, in fact, uninitialized at the point of use, but
it doesn't hurt to narrow the scope a bit to between when the jmp_buf
is initialized by setjmp, and when the signal handler might be called
after sigaction.
Noted by prlw1.
PR lib/57721

libpthread/t_stack: Fix format string for size_t.
Tested this on i386 since that had been crashing before, but i386
doesn't see %zu for unsigned int as a problem.
PR lib/57721

pthread: Don't adjust user-allocated stack addresses by guardsize.
PR lib/57721
2023-12-09 13:24:23 +00:00
martin ac07dec820 Pull up following revision(s) (requested by riastradh in ticket #1774):
lib/libc/gen/vis.c: revision 1.75-1.86
	tests/lib/libc/gen/t_vis.c: revision 1.10-1.14

PR 56260: fix out-of-bounds stack read.

vis(3): Avoid nonportable MIN in portable code.

vis(3) tests: Add xfail test for encoding overflow.

From Kyle Evans <kevans%FreeBSD.org@localhost>.
PR lib/57573

vis(3) tests: Expand tests and diagnostic outputs on failure.
PR lib/57573

vis(3) tests: Test another overflow edge case.
Related to PR lib/57573.

vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.
Part of PR lib/57573.

vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.
Obviates need to worry about mblength > SSIZE_MAX.
Prompted by PR lib/57573.

vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

vis(3): Call wcslen(start) only once.
It had better not change between these two times!
Prompted by PR lib/57573.

vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.
Prompted by PR lib/57573.

vis(3): Fix main part of PR lib/57573.
From Kyle Evans <kevans%FreeBSD.org@localhost>.

vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

vis(3): Sort includes.  No functional change intended.
Prompted by PR lib/57573.

vis(3): Need <stdint.h> for SIZE_MAX, per C standard.
From Kyle Evans <kevans%FreeBSD.org@localhost>.
Followup to PR lib/57573.

vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.
2023-12-09 13:09:03 +00:00
martin 13a586366f Pull up following revision(s) (requested by he in ticket #1747):
lib/libm/Makefile: revision 1.222
	distrib/evbmips/instkernel/ramdisk/Makefile: revision 1.19

libm Makefile: add fma() functions for mips.

This pushed the ramdisk size, so that needed to be bumped as well.
Otherwise, there were no build issues for either 32 or 64 bit mips.
Sort-of OK'ed by simonb@.
2023-10-08 18:49:54 +00:00
martin a62f994390 Pull up following revision(s) (requested by riastradh in ticket #1734):
lib/libpam/modules/pam_krb5/pam_krb5.c: revision 1.32

pam_krb5: Fix PR lib/57631.

Loose ends in the fix for NetBSD-SA2023-006 that weren't caught by
review or, somehow, by my own testing.  Evidently we need automatic
tests for this pam business.
2023-10-02 13:07:12 +00:00
martin 74ca980e2a Pull up following revision(s) (requested by riastradh in ticket #1728):
lib/libpam/modules/pam_ksu/pam_ksu.c: revision 1.11

pam_ksu(8): Allow homedir access during kuserok.

Otherwise, the default kuserok logic to look at ~targetuser/.k5login
would be blocked by the security measure to thwart NetBSD-SA2023-005.

(There are other ways, e.g. setting SYSTEM-K5LOGIN in /etc/krb5.conf
so the file is /etc/k5login.d/user instead of ~user/.k5login, but
that's not the default configuration and there are plenty of
deployments that rely on ~user/.k5login today.)

I reviewed libkrb5 for homedir access checks.  There are three:
1. krb5_config_parse_file_multi, called only by:
   - verify_krb5_conf -- not relevant
   - krb5_config_parse_file -- not used here as far as I can tell,
     only by libhdb ldap logic and test code in heimdal
   - krb5_set_config_files -- used here only via krb5_init_context,
     which is done at this point
2. plugin_get_hosts in krbhst.c, used to look up hosts for KDC I/O,
   which shouldn't be happening at this point, so this is almost
   certainly unreachable; also it only appears to control whether
   some old plugin API can be used, long after we have read the krb5
   config controlling which plugins are available, so this is
   probably harmless
3. krb5_kuserok, which is the one we want to allow

Note: This will have to be updated again in the next Heimdal update,
which eliminates the global homedir access flag in favour of making
the default per-context homedir access flag conditional on !issuid.
2023-09-08 09:08:13 +00:00
martin 5bf4700506 Pull up following revision(s) (requested by riastradh in ticket #1700):
lib/libpthread/arch/x86_64/pthread_md.h: revision 1.13
	lib/libpthread/pthread_int.h: revision 1.110
	lib/libpthread/pthread_int.h: revision 1.111
	lib/libpthread/arch/i386/pthread_md.h: revision 1.21
	lib/libpthread/arch/arm/pthread_md.h: revision 1.12
	lib/libpthread/arch/arm/pthread_md.h: revision 1.13
	lib/libpthread/pthread_spin.c: revision 1.11
	lib/libpthread/arch/aarch64/pthread_md.h: revision 1.2

libpthread: Use __nothing, not /* nothing */, for empty macros.

No functional change intended -- just safer to do it this way in case
the macros are used in if branches or comma expressions.
PR port-arm/57437 (pthread__smt_pause/wake issue)

libpthread: New pthread__smt_wait to put CPU in low power for spin.

This is now distinct from pthread__smt_pause, which is for spin lock
backoff with no paired wakeup.

On Arm, there is a single-bit event register per CPU, and there are two
instructions to manage it:
- wfe, wait for event -- if event register is clear, enter low power
  mode and wait until event register is set; then exit low power mode
  and clear event register
- sev, signal event -- sets event register on all CPUs (other
  circumstances like interrupts also set the event register and cause
  wfe to wake)

These can be used to reduce the power consumption of spinning for a
lock, but only if they are actually paired -- if there's no sev, wfe
might hang indefinitely.  Currently only pthread_spin(3) actually
pairs them; the other lock primitives (internal lock, mutex, rwlock)
do not -- they have spin lock backoff loops, but no corresponding
wakeup to cancel a wfe.

It may be worthwhile to teach the other lock primitives to pair
wfe/sev, but that requires some performance measurement to verify
it's actually worthwhile.  So for now, we just make sure not to use
wfe when there's no sev, and keep everything else the same -- this
should fix severe performance degredation in libpthread on Arm
without hurting anything else.

No change in the generated code on amd64 and i386.  No change in the
generated code for pthread_spin.c on arm and aarch64 -- changes only
the generated code for pthread_lock.c, pthread_mutex.c, and
pthread_rwlock.c, as intended.
PR port-arm/57437
2023-08-04 13:04:03 +00:00
martin 0bdfa91080 Pull up following revision(s) (requested by riastradh in ticket #1683):
lib/libc/sys/mremap.2: revision 1.8

mremap(2): Fix example to use MAP_PRIVATE.

It is a historical accident that MAP_PRIVATE is assumed when neither
it nor MAP_SHARED is specified.
2023-07-31 15:54:14 +00:00
martin ddd365c9c2 Pull up following revision(s) (requested by rin in ticket #1675):
lib/csu/arch/vax/crtbegin.S: revision 1.8
	lib/csu/arch/vax/crtbegin.S: revision 1.9

vax/csu: __do_global_ctors_aux: Save actually-used r8, instead of r11

Thanks Kalvis Duckmanton for report and patch on tech-toolchain:
https://mail-index.netbsd.org/tech-toolchain/2023/07/28/msg004321.html

vax/csu: Use register name provided by asm.h. No binary changes.
2023-07-30 11:52:02 +00:00
martin 2a7c409ff5 Pull up following revision(s) (requested by riastradh in ticket #1662):
lib/libc/dlfcn/dlfcn_elf.c: revision 1.17

libc: Fix missing membar_consumer in dl_iterate_phdr.

Pairs with the existing membar_producer.
2023-07-05 16:14:03 +00:00
martin ef688f33a1 Pull up following revision(s) (requested by riastradh in ticket #1653):
lib/libpam/modules/pam_ksu/pam_ksu.c: revision 1.10

pam_ksu: No need for homedir access.
2023-06-21 22:07:06 +00:00
martin 9166276092 Pull up following revision(s) (requested by riastradh in ticket #1652):
lib/libpam/modules/pam_krb5/pam_krb5.c: revision 1.31
	lib/libpam/modules/pam_krb5/pam_krb5.8: revision 1.13

pam_krb5: Refuse to operate without a key to verify tickets.

New allow_kdc_spoof overrides this to restore previous behaviour
which was vulnerable to KDC spoofing, because without a host or
service key, pam_krb5 can't distinguish the legitimate KDC from a
spoofed one.

This way, having pam_krb5 enabled isn't dangerous even if you create
an empty /etc/krb5.conf to use client SSO without any host services.

Perhaps this should use krb5_verify_init_creds(3) instead, and
thereby respect the rather obscurely named krb5.conf option
verify_ap_req_nofail like the Linux pam_krb5 does, but:
- verify_ap_req_nofail is default-off (i.e., vulnerable by default),
- changing verify_ap_req_nofail to default-on would probably affect
  more things and therefore be riskier,
- allow_kdc_spoof is a much clearer way to spell the idea,
- this patch is a smaller semantic change and thus less risky, and
- a security change with compatibility issues shouldn't have a
  workaround that might introduce potentially worse security issues
  or more compatibility issues.

Perhaps this should use krb5_verify_user(3) with secure=1 instead,
for simplicity, but it's not clear how to do that without first
prompting for the password -- which we shouldn't do at all if we
later decide we won't be able to use it anyway -- and without
repeating a bunch of the logic here anyway to pick the service name.

References about verify_ap_req_nofail:
- mit-krb5 discussion about verify_ap_req_nofail:
  https://mailman.mit.edu/pipermail/krbdev/2011-January/009778.html
- Oracle has the default-secure setting in their krb5 system:
  https://docs.oracle.com/cd/E26505_01/html/E27224/setup-148.html
  https://docs.oracle.com/cd/E26505_01/html/816-5174/krb5.conf-4.html#REFMAN4krb5.conf-4
  https://docs.oracle.com/cd/E19253-01/816-4557/gihyu/
- Heimdal issue on verify_ap_req_nofail default:
  https://github.com/heimdal/heimdal/issues/1129
2023-06-21 22:00:57 +00:00
martin 8b8a48ecc8 Pull up following revision(s) (requested by mlelstv in ticket #1630):
lib/libc/locale/newlocale.c: revision 1.4

Fix parsing a locale string with multiple components.
Also check for truncation of a long locale string.
2023-05-02 17:24:55 +00:00
martin d7363146ee Pull up following revision(s) (requested by riastradh in ticket #1601):
tests/lib/libc/string/t_swab.c: revision 1.3
	lib/libc/string/swab.c: revision 1.20

swab(3): Rewrite this to be understandable.

And make the tests work, and exercise all lengths up to 100.
Evidently the previous definition, presumably tightly optimized for
1980s-era compilers and CPUs, was too hard to understand, because it
was incorrectly tested for two decades and broken for years.

PR lib/57141
2023-02-22 18:49:17 +00:00
martin 15ad984ba1 Pull up following revision(s) (requested by uwe in ticket #1584):
lib/libc/thread-stub/thread-stub.c: revision 1.31

change libc sched_yield() stub to actually still call the syscall
instead of doing nothing when app is not linked with pthread; this matches
other systems

suggested by Mateusz Guzik in:
http://mail-index.netbsd.org/tech-kern/2020/07/19/msg026620.html
2023-02-04 16:19:20 +00:00
martin f5170af09b Pull up following revision(s) (requested by uwe in ticket #1583):
lib/libc/thread-stub/thread-stub.c: revision 1.30

Adjust the error return value of pthread_sigmask for !libpthread usage

Instead of returning -1, return errno on error.
Catch up after the fix in libpthread by Andrew Doran in 2008
in lib/libpthread/pthread_misc.c r.1.9.

It's an open question whether this function shall be used without linked
in the POSIX thread library.

Detected by Bruno Haible (GNU) and documented in gnulib in commit
"pthread_sigmask: Avoid test failure on NetBSD 8.0. " r. 4d16a83b0c1fcb6c.
2023-02-04 14:41:39 +00:00
martin 225140883f Pull up following revision(s) (requested by kre in ticket #1563):
lib/libc/gen/err.3: revision 1.23

Add errc() and verrc() to the list of functions which do not return,
but exit() instead.

This was omitted when the *c() set of functions were added in 2014.
2023-01-06 13:46:21 +00:00
martin 4482c9e216 Pull up following revision(s) (requested by nia in ticket #1561):
lib/libc/locale/setlocale.3: revision 1.22
	lib/libc/locale/setlocale.3: revision 1.23

setlocale.3: minor updates to reflect the current implementation

Reflect a couple of amendments noted by John Marino on tech-userlevel:
https://mail-index.netbsd.org/tech-userlevel/2021/10/19/msg013091.html

setlocale.3: Reflect state of NetBSD locale support in the 21st century

Don't use LC_COLLATE in a real code example, since a real call to set
LC_COLLATE will fail. Mention this.

Inconsistencies noticed by khw on IRC.
2023-01-03 18:28:06 +00:00
martin 982b8c8263 Apply patch, requested by riastradh in ticket #1498:
lib/libpthread/pthread.c		1.181 (via patch)

libpthread(3): Fix a marvellous interaction with rtld.

Patch from chs@.  Comment explaining the story by me.  This patch may
not be optimal -- maybe it would be better in pthread__init, or
better for rtld to call _lwp_unpark after _lwp_park in the contened
case -- but we've tested this version and it's annoying to reproduce,
so let's take this version and worry about testing improvements
later.
2022-08-08 17:16:53 +00:00
martin 036dd73a6b Pull up following revision(s) (requested by wiz in ticket #1484):
lib/libc/sys/clone.2: revision 1.14
	lib/libc/sys/clone.2: revision 1.15
	include/sched.h: revision 1.13
	include/sched.h: revision 1.14
	include/sched.h: revision 1.15

Remove mentions of CLONE_PID and CLONE_STOPPED

CLONE_PID was removed in Linux 2.5.15 and recycled for
CLONE_PIDFD since Linux 5.2.
CLONE_STOPPED was removed in Linux 2.6.38 and recycled
for CLONE_NEWCGROUP since Linux 4.6.

sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.
Ok martin@

clone(2): document that _GNU_SOURCE must be defined for the prototypes
sched.h: format comment to follow KNF
requested by thorpej@
sched.h: keep __clone() visible under _NETBSD_SOURCE
2022-08-03 10:42:02 +00:00
martin e8e6dc4f79 Pull up following revision(s) (requested by skrll in ticket #1464):
lib/libc/arch/hppa/sys/ptrace.S: revision 1.8

Save and restore %r19 the "linkage table pointer register" across the call
to __cerror so if the ptrace syscall fails we can call __cerror again with
the correct %r19 value.

Do this even though the call of __cerror doesn't go via the PLT because
__cerror calls __errno which does.

Analysis and fix from Tom Lane in
PR port-hppa/56864: hppa: ptrace(2) dumps core when returning an error

I changed the location of where %r19 is stored on the stack to follow the
ABI.
2022-06-06 11:31:13 +00:00
martin 4902d0e29a Pull up following revision(s) (requested by hannken in ticket #1440):
usr.sbin/quotaon/quotaon.c: revision 1.31
	lib/libquota/quota_oldfiles.c: revision 1.10
	sys/ufs/ufs/ufs_quota1.c: revision 1.25

Fix default quota file names, both user and group quota used the
same default name "QUOTAFILENAME, names[USRQUOTA])" resulting in
diagnostic assertion and possibly corrupted quota data.

Keep flag "UFS_QUOTA" set until the last quota is closed.
Prevents a live lock when dqrele() finds a struct with "dq_cnt == 1"
and flag "DQ_MOD" and cannot sync as flag UFS_QUOTA is unset.

As the quota type comes from the kernel and is only valid when
quota is on get the type before quota_off and after quota_on.
2022-04-27 16:53:32 +00:00
martin 5a8799f12f Pull up following revision(s) (requested by nia in ticket #1370):
lib/libcrypt/crypt-sha1.c: revision 1.10

libcrypt: Fix a floating point exception when a low number of HMAC-SHA1
iterations are specified.
2021-10-31 14:47:04 +00:00
martin 18cf7f7ac9 Pull up following revision(s) (requested by skrll in ticket #1358):
lib/libc/arch/aarch64/gen/setjmp.S: revision 1.4
	lib/libc/arch/aarch64/gen/_setjmp.S: revision 1.5

Fix the lib/libc/setjmp/t_setjmp:{,_}longjmp_zero test cases
2021-10-13 16:03:07 +00:00
martin 6c16cf9010 Pull up following revision(s) (requested by christos in ticket #1356):
lib/libc/resolv/res_init.c: revision 1.32
	lib/libc/resolv/res_private.h: revision 1.4

kqueue(2) file descriptors are not inherited across fork(2). A
process that that calls getaddrinfo(3) will end up cacheing the
kqueue(2) file descriptor in its res_state structure. If that
process fork(2)s and calls getaddrinfo(3) again might end up closing
that cached file descriptor which can end up pointing to a different
file object than the kqueue(2) original one. To fix this, associate
the kqueue(2) file descriptor with the process id that created it,
and don't close(2) it if it is being closed from a different process.

An alternative fix would be to attach the resolver to a fork(2) hook
to cleanup the res_state, but handling it internally in the resolver
is less intrusive. This was discovered by Dima Veselov when using
the FreeRADIUS package.
2021-10-05 11:06:58 +00:00
martin 0ef4344993 Pull up following revision(s) (requested by christos in ticket #1355):
lib/libpthread/pthread_cancelstub.c: revision 1.39
	lib/libc/sys/Makefile.inc: revision 1.247
	lib/libpthread/pthread_cancelstub.c: revision 1.40

PR/56424: Clay Mayers: recvfrom() is not a cancelation point as documented
in pthread_setcanceltype.3

remove parameter names from decls.
2021-10-05 11:02:18 +00:00
martin a163257afc Pull up following revision(s) (requested by manu in ticket #1343):
share/man/man7/sysctl.7: revision 1.153
	sys/kern/vfs_lockf.c: revision 1.74
	lib/libc/sys/fcntl.2: revision 1.46
	lib/libc/sys/flock.2: revision 1.23

Tie the maximum file lock per unprivilegied uid to kern.maxfiles

This makes the limit simple to raise at run time. While there, document
that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.
2021-09-07 17:12:21 +00:00
martin d4934bafff Pull up following revision(s) (requested by skrll in ticket #1329):
lib/libc/arch/arm/gen/swapcontext.S: revision 1.18
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S: revision 1.3
	lib/libc/arch/arm/sys/__clone.S: revision 1.10
	lib/libc/arch/arm/sys/__clone.S: revision 1.11
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S: revision 1.2
	lib/libc/arch/arm/sys/__clone.S: revision 1.12
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S: revision 1.3
	lib/libc/arch/arm/sys/__clone.S: revision 1.13
	lib/libc/arch/arm/sys/__clone.S: revision 1.14
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S: revision 1.3
	lib/libc/arch/arm/gen/swapcontext.S: revision 1.16
	lib/libc/arch/arm/gen/swapcontext.S: revision 1.17

Align sp to 8-byte boundary as required by EABI.

This is especially important for non-leaf functions; GCC optimizes codes
based on assumption that sp is aligned properly.

Mostly fix broken earmv5 userland compiled by GCC10 due to alignment
faults in ld.elf_so, where {ld,st}rd are used for [sp, #8x].

No regression for ATF is observed for earmv[67]{,hf}{,eb}.

Align sp to 8-byte boundary as required by EABI.
IIUC, this change only affects libc compiled for ``Thumb-mode userland'',
which we've not officially supported yet.

Fix previous. For Thumb-1:
- sp cannot be manipulated directly
- {add,sub}s should be used instead of {add,sub}

Trailing whitespace

The _INVOKE_CERROR macro deals with thumb so simplify the code (at the
expense of a couple more instructions).

Do previous differently by pushing even number of registers and remove
strange r7 usage.

Do previous differtly by pushing two registers in the same way as the
_INVOKE_CERROR macro
2021-08-08 10:22:04 +00:00
martin 06d10a9f43 Pull up following revision(s) (requested by skrll in ticket #1328):
sys/external/bsd/compiler_rt/dist/lib/builtins/negsf2.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/muldf3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfhf2.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/negsf2.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/muldf3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfhf2.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c: revision 1.4
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c: revision 1.5
	sys/external/bsd/compiler_rt/dist/lib/builtins/divdf3.c: revision 1.2
	sys/external/bsd/compiler_rt/abi.mk: revision 1.1
	sys/external/bsd/compiler_rt/dist/lib/builtins/divdf3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsisf.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/comparesf2.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsisf.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/comparesf2.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.4
	sys/external/bsd/compiler_rt/dist/lib/builtins/ashrdi3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/ashldi3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfsf2.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/subdf3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.5
	sys/external/bsd/compiler_rt/dist/lib/builtins/ashrdi3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/ashldi3.c: revision 1.3
	sys/lib/libkern/Makefile.compiler-rt: revision 1.13
	sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfsf2.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/subdf3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.6
	sys/external/bsd/compiler_rt/dist/lib/builtins/lshrdi3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatsisf.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/extendhfsf2.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/lshrdi3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatsisf.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/extendhfsf2.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsidf.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsidf.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfsi.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfsi.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_frsub.c: revision 1.2
	lib/libm/compiler_rt/Makefile.inc: revision 1.11
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfsi.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatsidf.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfsi.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/divsi3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatsidf.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/divsi3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_div0.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/mulsf3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/mulsf3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfdi.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfdi.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/divsf3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/negdf2.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfdi.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/divsf3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/negdf2.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfdi.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/extendsfdf2.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/subsf3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/extendsfdf2.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/subsf3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/comparedf2.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/comparedf2.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatundisf.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatundisf.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfsi.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_drsub.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfsi.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/muldi3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfsi.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/muldi3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfsi.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatdisf.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatdisf.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/addsf3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/addsf3.c: revision 1.3
	lib/libc/compiler_rt/Makefile.inc: revision 1.40
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfdi.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfdi.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/udivsi3.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/truncsfhf2.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfdi.c: revision 1.2
	sys/external/bsd/compiler_rt/dist/lib/builtins/udivsi3.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/truncsfhf2.c: revision 1.3
	sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c: revision 1.4
	sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfdi.c: revision 1.3

PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 266891:
28e1b977d4 (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[PATCH] builtins: remove use of __attribute__((pcs("aapcs"))) on
  Windows
Windows does not honour the __attribute__((pcs)) on ARM.  Although this will
result in ABI mismatches, compiler-rt should largely be unneeded for resolving
dependencies as we generate MS ABI compliant library calls now for the most
part.
llvm-svn: 266891
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 298974 for lib/builtins/int_lib.h.
d8ca74176e (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[Builtin] Unxfail tests for armhf
Summary:
Originally, a few tests fail for armhf target due to:
1) COMPILER_RT_ARMHF_TARGET was not set when building the lib
2) COMPILER_RT_ABI should not be defined as `__attribute__((pcs("aapcs")))` for armhf when building for both lib and tests
This addresshttps://bugs.llvm.org//show_bug.cgi?id=32261
mulsc3_test.c is a newly exposed issue, which will be addressed separately.
Reviewers: rengolin, compnerd
Reviewed By: compnerd
Subscribers: aemerson, llvm-commits, mgorny
Differential Revision:https://reviews.llvm.org/D31448
llvm-svn: 298974
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 303138:
44c45717b9 (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[PATCH] builtins: use reserved spelling (NFC)
llvm-svn: 303138
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 303188:
36ac5ddff7 (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[PATCH] builtins: expand out the AEABI function stubs
These actually may change calling conventions.  We cannot simply provide
function aliases as the aliased function may have a different calling
convention.  Provide a forwarding function instead to permit the
compiler to synthesize the calling convention adjustment thunk.
Remove the `ARM_EABI_FNALIAS` macro as that is not safe to use.
Resolves PR33030!
llvm-svn: 303188
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 303207:
4a45838d10 (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[PATCH] builtins: fix guard __AEABI__ -> __ARM_EABI__
llvm-svn: 303207
PR port-arm/55897
Cherry-pick upstream commit llvm-svn: 314851:
0d586d06a7 (diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007)
----
[PATCH] [compiler-rt] Add back ARM EABI aliases where legal.
r303188 removed all the uses of aliases for EABI functions from
compiler-rt, because some of them had mismatched calling conventions.
Obviously, we can't use aliases for functions which don't have the same
calling convention, but that's only an issue for floating-point
functions with the hardfloat ABI.  In other cases, the stubs increase
size and reduce performance for no benefit.
This patch adds back the aliases, with appropriate checks to make sure
they're only used in cases where the calling convention matches.
llvm-svn: 314851
PR port-arm/55897
Fix ABI mismatch for armhf runtime routines for floating-point arithmetics;
For hard-float arm variants, provide
(1) generic runtime routines with correct calling convention, and
(2) EABI runtime routines at the same time.
I've confirmed that no binary changes for kernels.
LGTM by skrll
2021-08-08 10:11:39 +00:00
martin 2737a899cd Pull up following revision(s) (requested by riastradh in ticket #1298):
lib/libc/gen/setjmp.3: revision 1.18

Clarify what happens when you longjmp(..., 0).

Derived from C99 7.13.2.1 `The longjmp function'.
2021-06-21 16:04:57 +00:00
martin 72d331ef12 Pull up the following (all via patch), requested by mrg in ticket #1221:
lib/lua/bozohttpd/Makefile			(apply patch)
	libexec/httpd/Makefile				1.30-1.31
	libexec/httpd/Makefile.boot			1.7-1.9
	libexec/httpd/auth-bozo.c			1.25-1.26
	libexec/httpd/bozohttpd.8			1.80-1.87
	libexec/httpd/bozohttpd.c			1.114-1.123,1.125-1.128
	libexec/httpd/bozohttpd.h			1.61-1.68
	libexec/httpd/cgi-bozo.c			1.49-1.53
	libexec/httpd/content-bozo.c			1.17-1.20
	libexec/httpd/daemon-bozo.c			1-.22
	libexec/httpd/dir-index-bozo.c			1.33-1.34
	libexec/httpd/main.c				1.23-1.27
	libexec/httpd/printenv.lua			1.4-1.5
	libexec/httpd/ssl-bozo.c			1.27-1.29
	libexec/httpd/libbozohttpd/libbozohttpd.3	1.5-1.6
	libexec/httpd/small/Makefile			1.4
	libexec/httpd/testsuite/Makefile		1.14
	libexec/httpd/testsuite/t16.in			1.1
	libexec/httpd/testsuite/t16.out			1.1
	libexec/httpd/testsuite/t17.in			1.1
	libexec/httpd/testsuite/t17.out			1.1
	libexec/httpd/testsuite/t18.in			1.1
	libexec/httpd/testsuite/t18.out			1.1


Update to bozohttpd 20210227.
Apply lua build fix (no blocklist support on this branch).

changes in bozohttpd 20210227:
	o  new support for content types: .tar.bz2, .tar.xz, .tar.lz,
	   .tar.zst, .tbz2, .txz, .tlz, .zipx, .xz, .zst, .sz, .lz, .lzma,
	   .lzo, .7z, .lzo, .cab, .dmg, .jar, and .rar.  should fix
	   netbsd PR#56026:
	   MIME type of .tar.xz file on ny{cdn,ftp}.NetBSD.org is invalid

changes in bozohttpd 20210211:
	o  fix various NULL derefs from malformed headers.  mostly from
	   <emily@ingalls.rocks>.
	o  fix memory leaks in library interface: add bozo_cleanup().

changes in bozohttpd 20201014:
	o  also set -D_GNU_SOURCE in Makefile.boot.  from
	   hadrien.lacour@posteo.net.
	o  fix array size botch (assertion, not exploitable.)  from
	   martin@netbsd.org.
	o  also match %2F as well as %2f.  from leah@vuxu.org.
	o  many manual and help fixes.  clean ups for higher lint levels,
	   consistency/style clean ups.  various option fixes including made
	   -f imply -b.  from <henrik@gulbra.net> for freebsd.

changes in bozohttpd 20200912:
	o  add .m4a and .m4v file extensions.

changes in bozohttpd 20200820:
	o  make this work on sun2 by reducing mmap window there.
	o  fix SSL shutdown sequence.  from spz@netbsd.org.
	o  add readme support to directory indexing.  from jmcneill@netbsd.org
	o  add blocklist(8) support.  from jruoho@netbsd.org.
2021-03-05 13:34:19 +00:00
martin bbb138e1ad Pull up following revision(s) (requested by jdolecek in ticket #1198):
lib/libc/stdio/fread.c: revision 1.24 (via patch)

for unbuffered I/O arrange for the destination buffer to be filled in one
go, instead of triggering long series of 1 byte read(2)s; this speeds up
fread() several order of magnitudes for this case, directly proportional
to the size of the supplied buffer
change adapted from OpenBSD rev. 1.19

fixes PR lib/55808 by Roland Illig
2021-02-07 17:41:02 +00:00
martin a2f936cbc0 Pull up following revision(s) (requested by simonb in ticket #1199):
lib/libc/arch/mips/sys/cerror.S: revision 1.20

For mips n32/n64 explicitly save the GP reg on the stack, and
restore it _after_ the call to __errno().  Fixes sending the
__errno() call off to nowhereland when this code is included
in another library (eg __posix_cerror() in libposix).  Failure
picked up by the ATF lib/libposix/posix1/t_rename test.
2021-02-06 15:30:14 +00:00
martin 85cf1d8c85 Pull up following revision(s) (requested by is in ticket #1135):
lib/libc/net/getaddrinfo.c: revision 1.120
	lib/libc/net/gethnamaddr.c: revision 1.93
	include/arpa/nameser_compat.h: revision 1.8

Don't complain about additional DNAME records received when resolving A or
AAAA (like already done for SIG/KEY and CNAME).
2020-11-29 11:25:31 +00:00
martin 83fb3e3fb7 Pull up following revision(s) (requested by riastradh in ticket #1082):
share/man/man9/atomic_loadstore.9: revision 1.6
	share/man/man9/ipi.9: revision 1.5
	lib/libc/atomic/membar_ops.3: revision 1.6

Spell out acronyms in title for clarity.

Update membar_ops(3) man page with examples and relation to C11.

Add exhortation to always always always document how membars come in
pairs for synchronization between two CPUs when you use them.

atomic_load/store_* appeared in NetBSD 9, not 10.

Pullup preceded release of 9.0.
2020-09-13 12:20:22 +00:00
martin 518fcb3c7b Pull up following revision(s) (requested by riastradh in ticket #1050):
sys/ufs/lfs/lfs_subr.c: revision 1.101
	sys/ufs/lfs/lfs_subr.c: revision 1.102
	sys/ufs/lfs/lfs_inode.c: revision 1.158
	sys/ufs/lfs/lfs_inode.h: revision 1.25
	sys/ufs/lfs/lfs_balloc.c: revision 1.95
	sys/ufs/lfs/lfs_pages.c: revision 1.21
	sys/ufs/lfs/lfs_vnops.c: revision 1.330
	sys/ufs/lfs/lfs_alloc.c: revision 1.140 (patch)
	sys/ufs/lfs/lfs_alloc.c: revision 1.141 (patch)
	lib/libp2k/p2k.c: revision 1.72
	sys/ufs/lfs/lfs.h: revision 1.205
	sys/ufs/lfs/lfs.h: revision 1.206
	sys/ufs/lfs/lfs_segment.c: revision 1.284
	sys/ufs/lfs/lfs.h: revision 1.207
	sys/ufs/lfs/lfs_segment.c: revision 1.285
	sys/ufs/lfs/lfs_debug.c: revision 1.55
	sys/ufs/lfs/lfs_rename.c: revision 1.23
	usr.sbin/dumplfs/dumplfs.c: revision 1.65
	sys/ufs/lfs/lfs_vfsops.c: revision 1.371
	sys/arch/i386/stand/efiboot/bootx64/Makefile: revision 1.3
	sys/ufs/lfs/lfs_vfsops.c: revision 1.372
	sys/ufs/lfs/lfs_vfsops.c: revision 1.373
	sbin/fsck_lfs/pass1.c: revision 1.46
	sys/ufs/lfs/lfs_vnops.c: revision 1.326
	sys/ufs/lfs/lfs_vnops.c: revision 1.327
	sys/ufs/lfs/lfs_vfsops.c: revision 1.375 (patch)
	sys/ufs/lfs/lfs_vnops.c: revision 1.328
	sys/ufs/lfs/lfs_subr.c: revision 1.98
	sys/ufs/lfs/lfs_extern.h: revision 1.116
	sys/ufs/lfs/lfs_vnops.c: revision 1.329
	sys/ufs/lfs/lfs_subr.c: revision 1.99
	sys/ufs/lfs/lfs_extern.h: revision 1.117
	sys/ufs/lfs/lfs_accessors.h: revision 1.49
	sys/ufs/lfs/lfs_extern.h: revision 1.118
	sys/rump/fs/lib/liblfs/Makefile: revision 1.15
	sys/ufs/lfs/lfs_bio.c: revision 1.146 (patch)
	sys/ufs/lfs/lfs_bio.c: revision 1.147
	sys/ufs/lfs/lfs_subr.c: revision 1.100

Fix kassert in lfs by initializing vp first.

Use a marker node to iterate lfs_dchainhd / i_lfs_dchain.

I believe elements can be removed while the lock is dropped,
including the next node we're hanging on to.

Just use VOP_BWRITE for lfs_bwrite_log.
Hope this doesn't cause trouble with vfs_suspend.

Teach lfs to transition ro<->rw.

Prevent new dirops while we issue lfs_flush_dirops.

lfs_flush_dirops assumes (by KASSERT((ip->i_state & IN_ADIROP) == 0))
that vnodes on the dchain will not become involved in active dirops
even while holding no other locks (lfs_lock, v_interlock), so we must
set lfs_writer here.  All other callers already set lfs_writer.

We set fs->lfs_writer++ without explicitly doing lfs_writer_enter
because
(a) we already waited for the dirops to drain, and
(b) we hold lfs_lock and cannot drop it before setting lfs_writer.

Assert lfs_writer where I think we can now prove it.

Serialize access to the splay tree with lfs_lock.

Change some cheap KDASSERT into KASSERT.

Take a reference and fix assertions in lfs_flush_dirops.
Fixes panic:
KASSERT((ip->i_state & IN_ADIROP) == 0) at lfs_vnops.c:1670
lfs_flush_dirops
lfs_check
lfs_setattr
VOP_SETATTR
change_mode
sys_fchmod
syscall

This assertion -- and the assertion that vp->v_uflag has VU_DIROP set
-- is valid only until we release lfs_lock, because we may race with
lfs_unmark_dirop which will remove the nodes and change the flags.

Further, vp itself is valid only as long as it is referenced, which it
is as long as it's on the dchain, but lfs_unmark_dirop drops the
dchain's reference.

Don't lfs_writer_enter while holding v_interlock.

There's no need to lfs_writer_enter at all here, as far as I can see.
lfs_flush_fs will do it for us.

Break deadlock in PR kern/52301.

The lock order is lfs_writer -> lfs_seglock.  The problem in 52301 is
that lfs_segwrite violates this lock order by sometimes doing
lfs_seglock -> lfs_writer, either (a) when doing a checkpoint or (b),
opportunistically, when there are no dirops pending.  Both cases can
deadlock, because dirops sometimes take the seglock (lfs_truncate,
lfs_valloc, lfs_vfree):
(a) There may be dirops pending, and they may be waiting for the
seglock, so we can't wait for them to complete while holding the
seglock.
(b) The test for fs->lfs_dirops == 0 happens unlocked, and the state
may change by the time lfs_writer_enter acquires lfs_lock.

To resolve this in each case:
(a) Do lfs_writer_enter before lfs_seglock, since we will need it
unconditionally anyway.  The worst performance impact of this should
be that some dirops get delayed a little bit.
(b) Create a new lfs_writer_tryenter to use at this point so that the
test for fs->lfs_dirops == 0 and the acquisition of lfs_writer happen
atomically under lfs_lock.

Initialize/destroy lfs_allclean_wakeup in modcmd, not lfs_mountfs.

Fixes reloading lfs.kmod.

In lfs_update, hold lfs_writer around lfs_vflush.

Otherwise, we might do
lfs_vflush
-> lfs_seglock
-> lfs_segwait(SEGM_CKP)
   -> lfs_writer_enter
which is the reverse of the lfs_writer -> lfs_seglock ordering.

Call lfs_orphan in lfs_rename while we're still in the dirop.
lfs_writer_enter can't fail; keep it simple and don't pretend it can.

Assert that mtsleep can't fail either -- it doesn't catch signals and
there's no timeout.

Teach LFS_ORPHAN_NEXTFREE about lfs64.

Dust off the orphan detection code and try to make it work.

Fix !DIAGNOSTIC compile

Fix userland references to LFS_ORPHAN_NEXTFREE.

Forgot to grep for these or do a full distribution build, oops!

Fix missing <sys/evcnt.h> by removing the evcnts instead.

Just wanted to confirm that a race might happen, and indeed it did.
These serve little diagnostic value otherwise.

OR into bp->b_cflags; don't overwrite.

CTASSERT lfs on-disk structure sizes.

Avoid misaligned access to lfs64 on-disk records in memory.
lfs64 directory entries are only 32-bit aligned in order to conserve
space in directory blocks, and we had a hack to stuff a 64-bit inode
in them.  This replaces the hack by __aligned(4) __packed, and goes
further:

1. It's not clear that all the other lfs64 data structures are 64-bit
   aligned on disk to begin with.  We can go through these later and
   upgrade them from
        struct foo64 {
                ...
        } __aligned(4) __packed;
        union foo {
                struct foo64 f64;
                ...
        };
   to
        struct foo64 {
                ...
        };
        union foo {
                struct foo64 f64 __aligned(8);
                ...
        } __aligned(4) __packed;
   if we really want to take advantage of 64-bit memory accesses.
   However, the __aligned(4) __packed must remain on the union
   because:
2. We access even the lfs32 data structures via a union that has
   lfs64 members, and it turns out that compilers will assume access
   through a union with 64-bit aligned members implies the whole
   union has 64-bit alignment, even if we're only accessing a 32-bit
   aligned member.

Fix clang build after packed lfs64 accessor change.

Suppress spurious address-of-packed error in rump lfs too.
2020-08-17 10:30:22 +00:00
martin d89c03511a Pull up following revision(s) (requested by uwe in ticket #1004):
lib/libcurses/newwin.c: revision 1.58

newwin - fix crash with negative ncols.

When support for negative nrows/ncols was added, one s/ncols/maxx/ was
missed so we ended up passing negative (i.e. huge unsigned) length
when hashing the line contents.

Reported by Naman Jain in PR lib/55484
2020-07-14 13:37:18 +00:00
martin 2f28bf8ecc Pull up following revision(s) (requested by uwe in ticket #987):
lib/libcurses/get_wch.c: revision 1.24
	lib/libcurses/getch.c: revision 1.75

Pads are not to be automatically refreshed on input.

X/Open Curses says in the documentation for newpad():
  Automatic refreshes of pads (e.g., from scrolling or echoing of
  input) do not occur.

And in the documentation for get*():
  If the current or specified window is not a pad, and it has been
  moved or modified since the last refresh operation, then it will be
  refreshed before another character is read.

From Michael Forney in PR lib/55457
2020-07-07 12:51:18 +00:00
martin 20b342a151 Pull up following revision(s) (requested by uwe in ticket #986):
lib/libcurses/insch.c: revision 1.26
	lib/libcurses/ins_wch.c: revision 1.15
	lib/libcurses/ins_wstr.c: revision 1.15
	lib/libcurses/insstr.c: revision 1.8

mvwins*(WINDOW *win, ...) functions - call wins* on win, not stdscr.
From Naman Jain in PR lib/55460.
2020-07-07 12:43:51 +00:00
martin 7f9639a260 Pull up following revision(s) (requested by rmind in ticket #956):
usr.sbin/npf/npf-params.7: revision 1.4
	sys/net/npf/npf_worker.c: revision 1.9
	usr.sbin/npf/npftest/npftest.h: revision 1.17
	usr.sbin/npf/npfctl/npf_bpf_comp.c: revision 1.16
	usr.sbin/npf/npf-params.7: revision 1.5
	sys/net/npf/npf_state_tcp.c: revision 1.21
	usr.sbin/npf/npfctl/npf_build.c: revision 1.55
	usr.sbin/npf/npf-params.7: revision 1.6
	sys/net/npf/npfkern.h: revision 1.5
	lib/libnpf/npf.c: revision 1.49
	usr.sbin/npf/npf-params.7: revision 1.7
	sys/net/npf/npf_impl.h: revision 1.81
	sys/net/npf/npf_ext_log.c: revision 1.17
	usr.sbin/npf/npfctl/npfctl.h: revision 1.53
	usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.11
	sys/net/npf/npf_nat.c: revision 1.50
	sys/net/npf/npf_mbuf.c: revision 1.24
	sys/net/npf/npf_alg.c: revision 1.22
	usr.sbin/npf/npftest/libnpftest/npf_nat_test.c: revision 1.14
	usr.sbin/npf/npftest/libnpftest/npf_conn_test.c: file removal
	usr.sbin/npf/npftest/libnpftest/npf_state_test.c: revision 1.10
	sys/net/npf/npf.h: revision 1.63
	usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.21
	usr.sbin/npf/npfctl/npf_var.c: revision 1.13
	sys/net/npf/files.npf: revision 1.23
	usr.sbin/npf/npfctl/npf_show.c: revision 1.32
	usr.sbin/npf/npfctl/npf.conf.5: revision 1.91
	sys/net/npf/npf_os.c: revision 1.18
	sys/net/npf/npf_connkey.c: revision 1.2
	sys/net/npf/npf_conf.c: revision 1.17
	lib/libnpf/libnpf.3: revision 1.12
	usr.sbin/npf/npftest/npftest.c: revision 1.25
	usr.sbin/npf/npftest/libnpftest/npf_gc_test.c: revision 1.1
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.51
	sys/net/npf/npf_tableset.c: revision 1.35
	usr.sbin/npf/npftest/npftest.conf: revision 1.9
	sys/net/npf/npf_sendpkt.c: revision 1.22
	usr.sbin/npf/npfctl/npf_var.h: revision 1.10
	sys/net/npf/npf_state.c: revision 1.23
	sys/net/npf/npf_conn.h: revision 1.20
	usr.sbin/npf/npfctl/npfctl.c: revision 1.64
	usr.sbin/npf/npfctl/npf_cmd.c: revision 1.1
	sys/net/npf/npf_portmap.c: revision 1.5
	sys/net/npf/npf_params.c: revision 1.3
	usr.sbin/npf/npfctl/npf_scan.l: revision 1.32
	tests/net/npf/t_npf.sh: revision 1.4
	sys/net/npf/npf_ext_rndblock.c: revision 1.9
	lib/libnpf/npf.h: revision 1.39
	sys/net/npf/npf_ruleset.c: revision 1.51
	sys/net/npf/npf_alg_icmp.c: revision 1.33
	sys/net/npf/npf.c: revision 1.43
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.17
	usr.sbin/npf/npfctl/npfctl.8: revision 1.25
	sys/net/npf/npf_ctl.c: revision 1.60
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.18
	usr.sbin/npf/npftest/libnpftest/Makefile: revision 1.11
	sys/net/npf/npf_handler.c: revision 1.49
	sys/net/npf/npf_inet.c: revision 1.57
	sys/net/npf/npf_ifaddr.c: revision 1.7
	sys/net/npf/npf_conndb.c: revision 1.9
	sys/net/npf/npf_if.c: revision 1.13
	usr.sbin/npf/npfctl/Makefile: revision 1.15
	sys/net/npf/npf_conn.c: revision 1.32
	sys/net/npf/npf_ext_normalize.c: revision 1.10
	sys/net/npf/npf_rproc.c: revision 1.20
	sys/net/npf/npf_worker.c: revision 1.8

Major NPF improvements (merge from upstream):
- Switch to the C11-style atomic primitives using atomic_loadstore(9).
- npfkern: introduce the 'state.key.interface' and 'state.key.direction'
  settings.  Users can now choose whether the connection state should be
  strictly per-interface or global at the configuration level.  Keep NAT
  logic to be always per-interface, though.
- npfkern: rewrite the G/C worker logic and make it self-tuning.
- npfkern and libnpf: multiple bug fixes; add param exporting; introduce
  more parameters.  Remove npf_nvlist_{copyin,copyout}() functions and
  refactor npfctl_load_nvlist() with others; add npfctl_run_op() to have
  a single entry point for operations.  Introduce npf_flow_t and clean up
  some code.
- npfctl: lots of fixes for the 'npfctl show' logic; make 'npfctl list'
  more informative; misc usability improvements and more user-friendly
  error messages.
- Amend and improve the manual pages.

npf_worker_sys{init,fini}: initialize/destroy the exit_cv condvar.

npftest -- npf_test_init(): add a workaround for NetBSD.

npf-params(7): fix the state.key defaults.

npf-params.7: s/filer/filter/

Adjust to "npfctl debug" command line changes, from rmind@.

Use more markup.
2020-06-20 15:46:47 +00:00
martin f5501c22a9 Pull up following revision(s) (requested by roy in ticket #936):
lib/libterminfo/curterm.c: revision 1.14

terminfo: test strlcpy result against space free, not string length

riastradh@ yep, looks good.
2020-05-31 10:41:39 +00:00
martin 9be71d503e Pull up following revision(s) (requested by riastradh in ticket #920):
lib/libc/compat/gen/compat_ldexp_ieee754.c: revision 1.8

Teach libc's compat ldexp stub to raise fp exceptions.

This ldexp stub will shadow the ldexp weak alias for scalbn in libm,
which is unfortunate but hard to fix properly without chasing the
mythical libc bump beast.  With the change here, we should raise all
the same exceptions that libm's scalbn does -- overflow, underflow,
inexact-result, and (for signalling NaN only) invalid-operation.

This in turn should correct the missing overflow/underflow exceptions
of our portable C fma, and perhaps other routines.

XXX pullup
2020-05-25 15:26:05 +00:00
martin 6d72761350 Pull up following revision(s) (requested by chs in ticket #907):
libexec/ld.elf_so/rtld.c: revision 1.205
	libexec/ld.elf_so/rtld.h: revision 1.140
	libexec/ld.elf_so/symbols.map: revision 1.3
	libexec/ld.elf_so/symbols.map: revision 1.4
	lib/libc/gen/pthread_atfork.c: revision 1.13
	lib/libc/gen/pthread_atfork.c: revision 1.14
	libexec/ld.elf_so/rtld.h: revision 1.139
	libexec/ld.elf_so/rtld.c: revision 1.204

Introduce intermediate locking for fork, so that the dynamic linker is
in a consistent state. This most importantly avoids races between dlopen
and friends and fork, potentially resulting in dead locks in the child
when it itself tries to acquire locks.

Rename __atomic_fork to __locked_fork and give it &errno as argument.
rtld and libc use different storage, so the initial version would
incorrectly report the failure reason for fork().

There is still a small race condition inside ld.elf_so as it doesn't use
thread-safe errno internally, but that's a more contained internal
issue.
2020-05-13 18:08:38 +00:00