CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 05:56:23 UTC 2023 Modified Files: othersrc/libexec/tnftpd: todo Log Message: todo: portability issues, libnetbsd updates To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 othersrc/libexec/tnftpd/todo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/todo diff -u othersrc/libexec/tnftpd/todo:1.23 othersrc/libexec/tnftpd/todo:1.24 --- othersrc/libexec/tnftpd/todo:1.23 Sat Sep 23 04:28:51 2023 +++ othersrc/libexec/tnftpd/todo Sun Oct 1 05:56:23 2023 @@ -1,16 +1,24 @@ -$NetBSD: todo,v 1.23 2023/09/23 04:28:51 lukem Exp $ +$NetBSD: todo,v 1.24 2023/10/01 05:56:23 lukem Exp $ + +General todo + check for pidfile returning void (old netbsd such as 1.6) ? fix detection of largefile support: - solaris: lfcompile(5) +macos 13 issues: + - daemon() deprecated + - vfork() deprecated + - getgrouplist() uses int not gid_t + cygwin missing: - SA_NOCLDWAIT enable LOGIN_CAP (with autoconf portability) -consider updating: ls/* [s-u]* +consider updating: ls/* provide replacement for pidfile @@ -33,3 +41,28 @@ autoconf check for FNM_NORES for detecti less like to be a problem since it's only parsed from ftpd.conf tools/compat/configure.ac BROKEN_FPARSELN + + +libnetbsd +- + +getaddrinfo.c +- very out of date compared to lib/libc/net/getaddrinfo.c + +getnameinfo.c +- very out of date compared to lib/libc/net/getnameinfo.c + +getusershell.c +- check NetBSD: getusershell.c,v 1.21 2000/07/07 08:03:37 itohy Exp + +mkstemp.c: +- upstream implementation changed to lib/libc/stdio/gettemp.c + +snprintf.c: +- tools/compat/snprintf.c looks different + +strtoll.c: +- upstream changed to common/lib/libc/stdlib/_strtol.h + +user_from_uid.c: +- I enhanced upstream with pwcache_userdb() which tnftpd doesn't need
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 05:56:23 UTC 2023 Modified Files: othersrc/libexec/tnftpd: todo Log Message: todo: portability issues, libnetbsd updates To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 othersrc/libexec/tnftpd/todo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 03:11:30 UTC 2023 Modified Files: othersrc/libexec/tnftpd: configure othersrc/libexec/tnftpd/src: Makefile.in Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 othersrc/libexec/tnftpd/configure cvs rdiff -u -r1.17 -r1.18 othersrc/libexec/tnftpd/src/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/configure diff -u othersrc/libexec/tnftpd/configure:1.55 othersrc/libexec/tnftpd/configure:1.56 --- othersrc/libexec/tnftpd/configure:1.55 Sat Sep 30 08:29:13 2023 +++ othersrc/libexec/tnftpd/configure Sun Oct 1 03:11:29 2023 @@ -18618,6 +18618,10 @@ $as_echo "$as_me: CPPFLAGS $as_echo "$as_me: LDFLAGS$LDFLAGS" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS $LIBS" >&5 $as_echo "$as_me: LIBS $LIBS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: YACC $YACC" >&5 +$as_echo "$as_me: YACC $YACC" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: YFLAGS $YFLAGS" >&5 +$as_echo "$as_me: YFLAGS $YFLAGS" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: --enable-builtinls $opt_builtinls" >&5 $as_echo "$as_me: --enable-builtinls $opt_builtinls" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: --enable-ipv6 $opt_ipv6" >&5 Index: othersrc/libexec/tnftpd/src/Makefile.in diff -u othersrc/libexec/tnftpd/src/Makefile.in:1.17 othersrc/libexec/tnftpd/src/Makefile.in:1.18 --- othersrc/libexec/tnftpd/src/Makefile.in:1.17 Sat Sep 23 03:32:41 2023 +++ othersrc/libexec/tnftpd/src/Makefile.in Sun Oct 1 03:11:30 2023 @@ -110,8 +110,9 @@ am__installdirs = "$(DESTDIR)$(libexecdi "$(DESTDIR)$(man8dir)" PROGRAMS = $(libexec_PROGRAMS) am_tnftpd_OBJECTS = cmds.$(OBJEXT) conf.$(OBJEXT) ftpd.$(OBJEXT) \ - ftpcmd.$(OBJEXT) pfilter.$(OBJEXT) popen.$(OBJEXT) -tnftpd_OBJECTS = $(am_tnftpd_OBJECTS) + pfilter.$(OBJEXT) popen.$(OBJEXT) +nodist_tnftpd_OBJECTS = ftpcmd.$(OBJEXT) +tnftpd_OBJECTS = $(am_tnftpd_OBJECTS) $(nodist_tnftpd_OBJECTS) tnftpd_DEPENDENCIES = ../libnetbsd/libnetbsd.la ../ls/libls.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -154,18 +155,7 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD" $@; am__v_CCLD_1 = -@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || -am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ - -e s/c++$$/h++/ -e s/c$$/h/ -YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) -LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) -AM_V_YACC = $(am__v_YACC_@AM_V@) -am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) -am__v_YACC_0 = @echo " YACC" $@; -am__v_YACC_1 = -YLWRAP = $(top_srcdir)/buildaux/ylwrap -SOURCES = $(tnftpd_SOURCES) +SOURCES = $(tnftpd_SOURCES) $(nodist_tnftpd_SOURCES) DIST_SOURCES = $(tnftpd_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -223,8 +213,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/buildaux/depcomp \ - $(top_srcdir)/buildaux/ylwrap ftpcmd.c +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/buildaux/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -349,7 +338,6 @@ tnftpd_SOURCES = \ cmds.c \ conf.c \ ftpd.c \ - ftpcmd.y \ pfilter.c \ popen.c @@ -378,27 +366,32 @@ man5_MANS = \ man8_MANS = \ tnftpd.man -CLEANFILES = \ - ftpcmd.c \ - ftpd.conf.man \ - ftpusers.man \ - tnftpd.man - +CLEANFILES = ftpd.conf.man ftpusers.man tnftpd.man ftpcmd.c seddotin = \ sed -e 's|@datadir[@]|${datadir}|g' \ -e 's|@sysconfdir[@]|${sysconfdir}|g' -EXTRA_DIST = \ - ftpd.conf.manin \ - ftpusers.manin \ - logutmp.c \ - logwtmp.c \ - tnftpd.manin +EXTRA_DIST = ftpd.conf.manin ftpusers.manin logutmp.c logwtmp.c \ + tnftpd.manin ftpcmd.y -all: all-am +# Custom yacc rules to always yacc ftpcmd.y, +# even without --enable-maintainer-mode. +nodist_tnftpd_SOURCES = \ + ftpcmd.c + +BUILT_SOURCES = \ + ftpcmd.c + +AUTOMAKE_OPTIONS = -Wno-portability-recursive +TNFTPD_V_YACC = $(TNFTPD__V_YACC_$(V)) +TNFTPD__V_YACC_ = $(TNFTPD__V_YACC_$(AM_DEFAULT_VERBOSITY)) +TNFTPD__V_YACC_0 = @echo " YACC" $@; +TNFTPD__V_YACC_1 = +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .c .lo .man .manin .o .obj .y +.SUFFIXES: .c .lo .man .manin .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -522,9 +515,6 @@ am--depfiles: $(am__depfiles_remade)
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 03:11:30 UTC 2023 Modified Files: othersrc/libexec/tnftpd: configure othersrc/libexec/tnftpd/src: Makefile.in Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 othersrc/libexec/tnftpd/configure cvs rdiff -u -r1.17 -r1.18 othersrc/libexec/tnftpd/src/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 03:10:51 UTC 2023 Modified Files: othersrc/libexec/tnftpd: ChangeLog configure.ac othersrc/libexec/tnftpd/src: Makefile.am Log Message: always use $YACC even without --enable-maintainer-mode Provide custom rules to create ftpcmd.c from $(YACC) ftpcmd.y, instead of relying upon automake's default rules, so that we always use $(YACC) even without --enable-maintainer-mode, and we ship ftpcmd.y not ftpcmd.c. (There should be an easier way in automake to do this.) Display YACC and YFLAGS at end of configure. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 othersrc/libexec/tnftpd/ChangeLog cvs rdiff -u -r1.54 -r1.55 othersrc/libexec/tnftpd/configure.ac cvs rdiff -u -r1.5 -r1.6 othersrc/libexec/tnftpd/src/Makefile.am Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/ChangeLog diff -u othersrc/libexec/tnftpd/ChangeLog:1.66 othersrc/libexec/tnftpd/ChangeLog:1.67 --- othersrc/libexec/tnftpd/ChangeLog:1.66 Sun Oct 1 02:09:12 2023 +++ othersrc/libexec/tnftpd/ChangeLog Sun Oct 1 03:10:51 2023 @@ -1,7 +1,9 @@ -$NetBSD: ChangeLog,v 1.66 2023/10/01 02:09:12 lukem Exp $ +$NetBSD: ChangeLog,v 1.67 2023/10/01 03:10:51 lukem Exp $ Sun Oct 1 01:49:23 UTC 2023 lu...@netbsd.org + * Always use $YACC even without --enable-maintainer-mode. + * Update to NetBSD-ftpd 20230930: * Fix uninitialized memory usage in count_users(). * Fix pam_set_item() call with proper struct passed as Index: othersrc/libexec/tnftpd/configure.ac diff -u othersrc/libexec/tnftpd/configure.ac:1.54 othersrc/libexec/tnftpd/configure.ac:1.55 --- othersrc/libexec/tnftpd/configure.ac:1.54 Sun Sep 24 04:54:13 2023 +++ othersrc/libexec/tnftpd/configure.ac Sun Oct 1 03:10:51 2023 @@ -1,4 +1,4 @@ -# $NetBSD: configure.ac,v 1.54 2023/09/24 04:54:13 lukem Exp $ +# $NetBSD: configure.ac,v 1.55 2023/10/01 03:10:51 lukem Exp $ # # Process this file with autoconf to produce a configure script. @@ -536,6 +536,8 @@ AC_MSG_NOTICE([CFLAGS $C AC_MSG_NOTICE([CPPFLAGS $CPPFLAGS]) AC_MSG_NOTICE([LDFLAGS$LDFLAGS]) AC_MSG_NOTICE([LIBS $LIBS]) +AC_MSG_NOTICE([YACC $YACC]) +AC_MSG_NOTICE([YFLAGS $YFLAGS]) AC_MSG_NOTICE([--enable-builtinls $opt_builtinls]) AC_MSG_NOTICE([--enable-ipv6 $opt_ipv6]) AC_MSG_NOTICE([--with-blocklist $with_blocklist]) Index: othersrc/libexec/tnftpd/src/Makefile.am diff -u othersrc/libexec/tnftpd/src/Makefile.am:1.5 othersrc/libexec/tnftpd/src/Makefile.am:1.6 --- othersrc/libexec/tnftpd/src/Makefile.am:1.5 Tue Jan 29 12:51:38 2019 +++ othersrc/libexec/tnftpd/src/Makefile.am Sun Oct 1 03:10:51 2023 @@ -1,4 +1,4 @@ -## $NetBSD: Makefile.am,v 1.5 2019/01/29 12:51:38 lukem Exp $ +## $NetBSD: Makefile.am,v 1.6 2023/10/01 03:10:51 lukem Exp $ libexec_PROGRAMS = tnftpd @@ -6,7 +6,6 @@ tnftpd_SOURCES = \ cmds.c \ conf.c \ ftpd.c \ - ftpcmd.y \ pfilter.c \ popen.c @@ -36,7 +35,6 @@ man8_MANS = \ tnftpd.man CLEANFILES = \ - ftpcmd.c \ ftpd.conf.man \ ftpusers.man \ tnftpd.man @@ -46,7 +44,7 @@ seddotin = \ -e 's|@sysconfdir[@]|${sysconfdir}|g' .manin.man: - ${seddotin} $< > $@ + $(seddotin) $< > $@ EXTRA_DIST = \ ftpd.conf.manin \ @@ -54,3 +52,29 @@ EXTRA_DIST = \ logutmp.c \ logwtmp.c \ tnftpd.manin + + +# Custom yacc rules to always yacc ftpcmd.y, +# even without --enable-maintainer-mode. + +nodist_tnftpd_SOURCES = \ + ftpcmd.c + +BUILT_SOURCES = \ + ftpcmd.c + +CLEANFILES += \ + ftpcmd.c + +EXTRA_DIST += \ + ftpcmd.y + +AUTOMAKE_OPTIONS = -Wno-portability-recursive + +TNFTPD_V_YACC = $(TNFTPD__V_YACC_$(V)) +TNFTPD__V_YACC_ = $(TNFTPD__V_YACC_$(AM_DEFAULT_VERBOSITY)) +TNFTPD__V_YACC_0 = @echo " YACC" $@; +TNFTPD__V_YACC_1 = + +ftpcmd.c: $(srcdir)/ftpcmd.y + $(TNFTPD_V_YACC)$(YACC) $(YFLAGS) -o $@ $?
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 03:10:51 UTC 2023 Modified Files: othersrc/libexec/tnftpd: ChangeLog configure.ac othersrc/libexec/tnftpd/src: Makefile.am Log Message: always use $YACC even without --enable-maintainer-mode Provide custom rules to create ftpcmd.c from $(YACC) ftpcmd.y, instead of relying upon automake's default rules, so that we always use $(YACC) even without --enable-maintainer-mode, and we ship ftpcmd.y not ftpcmd.c. (There should be an easier way in automake to do this.) Display YACC and YFLAGS at end of configure. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 othersrc/libexec/tnftpd/ChangeLog cvs rdiff -u -r1.54 -r1.55 othersrc/libexec/tnftpd/configure.ac cvs rdiff -u -r1.5 -r1.6 othersrc/libexec/tnftpd/src/Makefile.am Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 02:09:12 UTC 2023 Modified Files: othersrc/libexec/tnftpd: ChangeLog NEWS THANKS Log Message: docs for NetBSD-20230930 import To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 othersrc/libexec/tnftpd/ChangeLog cvs rdiff -u -r1.16 -r1.17 othersrc/libexec/tnftpd/NEWS cvs rdiff -u -r1.5 -r1.6 othersrc/libexec/tnftpd/THANKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/ChangeLog diff -u othersrc/libexec/tnftpd/ChangeLog:1.65 othersrc/libexec/tnftpd/ChangeLog:1.66 --- othersrc/libexec/tnftpd/ChangeLog:1.65 Sun Sep 24 01:23:17 2023 +++ othersrc/libexec/tnftpd/ChangeLog Sun Oct 1 02:09:12 2023 @@ -1,4 +1,16 @@ -$NetBSD: ChangeLog,v 1.65 2023/09/24 01:23:17 lukem Exp $ +$NetBSD: ChangeLog,v 1.66 2023/10/01 02:09:12 lukem Exp $ + +Sun Oct 1 01:49:23 UTC 2023 lu...@netbsd.org + + * Update to NetBSD-ftpd 20230930: + * Fix uninitialized memory usage in count_users(). + * Fix pam_set_item() call with proper struct passed as + PAM_SOCKADDR. + + * Build fixes: + * Check for inet_net_pton() in -lresolv (for glibc). + * Improve configure's display of make variables. + * Remove deprecated autoconf macros. Sat Sep 23 05:39:49 UTC 2023 lu...@netbsd.org Index: othersrc/libexec/tnftpd/NEWS diff -u othersrc/libexec/tnftpd/NEWS:1.16 othersrc/libexec/tnftpd/NEWS:1.17 --- othersrc/libexec/tnftpd/NEWS:1.16 Sun Sep 24 01:23:17 2023 +++ othersrc/libexec/tnftpd/NEWS Sun Oct 1 02:09:12 2023 @@ -1,4 +1,4 @@ -$NetBSD: NEWS,v 1.16 2023/09/24 01:23:17 lukem Exp $ +$NetBSD: NEWS,v 1.17 2023/10/01 02:09:12 lukem Exp $ This is tnftpd version 20200704. @@ -7,6 +7,9 @@ Changes in tnftpd from 20200704 to unrel Security fixes to improve error handling when switching UID/GID, and to prevent MLSD and MLST before authentication succeeds. + Fix buffer overflows when counting users and when authenticating + using PAM. + Changes in tnftpd from 20190602 to 20200704: Adapt to NetBSD blocklistd(8) service rename. Index: othersrc/libexec/tnftpd/THANKS diff -u othersrc/libexec/tnftpd/THANKS:1.5 othersrc/libexec/tnftpd/THANKS:1.6 --- othersrc/libexec/tnftpd/THANKS:1.5 Thu Mar 21 07:44:03 2013 +++ othersrc/libexec/tnftpd/THANKS Sun Oct 1 02:09:12 2023 @@ -9,6 +9,7 @@ Johnny Billquist Jun-ichiro itojun Hagino Luke Mewburn Maksymilian Arciemowicz +Mateusz Kocielski Matthew R. Green Moritz Jodeit Paul Janzen
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 02:09:12 UTC 2023 Modified Files: othersrc/libexec/tnftpd: ChangeLog NEWS THANKS Log Message: docs for NetBSD-20230930 import To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 othersrc/libexec/tnftpd/ChangeLog cvs rdiff -u -r1.16 -r1.17 othersrc/libexec/tnftpd/NEWS cvs rdiff -u -r1.5 -r1.6 othersrc/libexec/tnftpd/THANKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/libexec/tnftpd/src
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 01:48:50 UTC 2023 Modified Files: othersrc/libexec/tnftpd/src: conf.c ftpd.c version.h Log Message: merge conflicts between NetBSD-20230922 and NetBSD-20230930 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 othersrc/libexec/tnftpd/src/conf.c \ othersrc/libexec/tnftpd/src/version.h cvs rdiff -u -r1.39 -r1.40 othersrc/libexec/tnftpd/src/ftpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/src/conf.c diff -u othersrc/libexec/tnftpd/src/conf.c:1.11 othersrc/libexec/tnftpd/src/conf.c:1.12 --- othersrc/libexec/tnftpd/src/conf.c:1.11 Thu Mar 21 01:01:56 2013 +++ othersrc/libexec/tnftpd/src/conf.c Sun Oct 1 01:48:50 2023 @@ -1,5 +1,5 @@ -/* $NetBSD: conf.c,v 1.11 2013/03/21 01:01:56 lukem Exp $ */ -/* from NetBSD: conf.c,v 1.64 2012/11/04 20:46:46 christos Exp */ +/* $NetBSD: conf.c,v 1.12 2023/10/01 01:48:50 lukem Exp $ */ +/* from NetBSD: conf.c,v 1.65 2023/09/29 14:49:03 shm Exp */ /*- * Copyright (c) 1997-2009 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include #ifndef lint -__RCSID(" NetBSD: conf.c,v 1.64 2012/11/04 20:46:46 christos Exp "); +__RCSID(" NetBSD: conf.c,v 1.65 2023/09/29 14:49:03 shm Exp "); #endif /* not lint */ #include @@ -916,7 +916,7 @@ count_users(void) goto cleanup_count; if (fstat(fd, ) == -1) goto cleanup_count; - if ((pids = malloc(sb.st_size + sizeof(pid_t))) == NULL) + if ((pids = calloc(sb.st_size + sizeof(pid_t), 1)) == NULL) goto cleanup_count; /* XXX: implement a better read loop */ scount = read(fd, pids, sb.st_size); Index: othersrc/libexec/tnftpd/src/version.h diff -u othersrc/libexec/tnftpd/src/version.h:1.11 othersrc/libexec/tnftpd/src/version.h:1.12 --- othersrc/libexec/tnftpd/src/version.h:1.11 Sat Sep 23 05:30:36 2023 +++ othersrc/libexec/tnftpd/src/version.h Sun Oct 1 01:48:50 2023 @@ -1,5 +1,5 @@ -/* $NetBSD: version.h,v 1.11 2023/09/23 05:30:36 lukem Exp $ */ -/* from NetBSD: version.h,v 1.79 2023/09/22 21:57:55 lukem Exp */ +/* $NetBSD: version.h,v 1.12 2023/10/01 01:48:50 lukem Exp $ */ +/* from NetBSD: version.h,v 1.80 2023/09/30 18:10:55 shm Exp */ /*- * Copyright (c) 1999-2023 The NetBSD Foundation, Inc. * All rights reserved. @@ -30,5 +30,5 @@ */ #ifndef FTPD_VERSION -#define FTPD_VERSION "NetBSD-ftpd 20230922" +#define FTPD_VERSION "NetBSD-ftpd 20230930" #endif Index: othersrc/libexec/tnftpd/src/ftpd.c diff -u othersrc/libexec/tnftpd/src/ftpd.c:1.39 othersrc/libexec/tnftpd/src/ftpd.c:1.40 --- othersrc/libexec/tnftpd/src/ftpd.c:1.39 Sat Sep 23 05:30:36 2023 +++ othersrc/libexec/tnftpd/src/ftpd.c Sun Oct 1 01:48:50 2023 @@ -1,5 +1,5 @@ -/* $NetBSD: ftpd.c,v 1.39 2023/09/23 05:30:36 lukem Exp $ */ -/* from NetBSD: ftpd.c,v 1.207 2023/09/02 12:16:29 lukem Exp */ +/* $NetBSD: ftpd.c,v 1.40 2023/10/01 01:48:50 lukem Exp $ */ +/* from NetBSD: ftpd.c,v 1.208 2023/09/30 18:06:24 shm Exp */ /* * Copyright (c) 1997-2023 The NetBSD Foundation, Inc. @@ -108,7 +108,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 19 #if 0 static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95"; #else -__RCSID(" NetBSD: ftpd.c,v 1.207 2023/09/02 12:16:29 lukem Exp "); +__RCSID(" NetBSD: ftpd.c,v 1.208 2023/09/30 18:06:24 shm Exp "); #endif #endif /* not lint */ @@ -4058,6 +4058,7 @@ auth_pam(void) int e; ftpd_cred_t auth_cred = { curname, 0 }; struct pam_conv conv = { _conv, _cred }; + struct sockaddr_storage ss; e = pam_start("ftpd", curname, , ); if (e != PAM_SUCCESS) { @@ -4081,7 +4082,9 @@ auth_pam(void) } #if defined(PAM_SOCKADDR) - e = pam_set_item(pamh, PAM_SOCKADDR, _addr); + memset(, 0, sizeof(ss)); + memcpy(, _addr.si_su, his_addr.su_len); + e = pam_set_item(pamh, PAM_SOCKADDR, ); if (e != PAM_SUCCESS) { syslog(LOG_ERR, "pam_set_item(PAM_SOCKADDR): %s", pam_strerror(pamh, e));
CVS commit: othersrc/libexec/tnftpd/src
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 01:48:50 UTC 2023 Modified Files: othersrc/libexec/tnftpd/src: conf.c ftpd.c version.h Log Message: merge conflicts between NetBSD-20230922 and NetBSD-20230930 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 othersrc/libexec/tnftpd/src/conf.c \ othersrc/libexec/tnftpd/src/version.h cvs rdiff -u -r1.39 -r1.40 othersrc/libexec/tnftpd/src/ftpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: othersrc/libexec/tnftpd/src
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 01:45:03 UTC 2023 Update of /cvsroot/othersrc/libexec/tnftpd/src In directory ivanova.netbsd.org:/tmp/cvs-serv7335 Log Message: Import NetBSD-ftpd 20230930 Notable changes since import tag NetBSD-20230922 - Fix uninitialized memory usage in count_users() - Fix pam_set_item() call with proper struct passed as PAM_SOCKADDR Status: Vendor Tag: TNF Release Tags: NetBSD-20230930 U othersrc/libexec/tnftpd/src/ftpcmd.y U othersrc/libexec/tnftpd/src/ftpusers.5 U othersrc/libexec/tnftpd/src/pfilter.h U othersrc/libexec/tnftpd/src/ftpd.8 U othersrc/libexec/tnftpd/src/Makefile U othersrc/libexec/tnftpd/src/pathnames.h C othersrc/libexec/tnftpd/src/version.h U othersrc/libexec/tnftpd/src/cmds.c U othersrc/libexec/tnftpd/src/logwtmp.c C othersrc/libexec/tnftpd/src/conf.c U othersrc/libexec/tnftpd/src/extern.h U othersrc/libexec/tnftpd/src/ftpd.conf.5 U othersrc/libexec/tnftpd/src/popen.c U othersrc/libexec/tnftpd/src/logutmp.c U othersrc/libexec/tnftpd/src/pfilter.c C othersrc/libexec/tnftpd/src/ftpd.c 3 conflicts created by this import. Use the following command to help the merge: cvs checkout -jTNF:yesterday -jTNF othersrc/libexec/tnftpd/src
CVS import: othersrc/libexec/tnftpd/src
Module Name:othersrc Committed By: lukem Date: Sun Oct 1 01:45:03 UTC 2023 Update of /cvsroot/othersrc/libexec/tnftpd/src In directory ivanova.netbsd.org:/tmp/cvs-serv7335 Log Message: Import NetBSD-ftpd 20230930 Notable changes since import tag NetBSD-20230922 - Fix uninitialized memory usage in count_users() - Fix pam_set_item() call with proper struct passed as PAM_SOCKADDR Status: Vendor Tag: TNF Release Tags: NetBSD-20230930 U othersrc/libexec/tnftpd/src/ftpcmd.y U othersrc/libexec/tnftpd/src/ftpusers.5 U othersrc/libexec/tnftpd/src/pfilter.h U othersrc/libexec/tnftpd/src/ftpd.8 U othersrc/libexec/tnftpd/src/Makefile U othersrc/libexec/tnftpd/src/pathnames.h C othersrc/libexec/tnftpd/src/version.h U othersrc/libexec/tnftpd/src/cmds.c U othersrc/libexec/tnftpd/src/logwtmp.c C othersrc/libexec/tnftpd/src/conf.c U othersrc/libexec/tnftpd/src/extern.h U othersrc/libexec/tnftpd/src/ftpd.conf.5 U othersrc/libexec/tnftpd/src/popen.c U othersrc/libexec/tnftpd/src/logutmp.c U othersrc/libexec/tnftpd/src/pfilter.c C othersrc/libexec/tnftpd/src/ftpd.c 3 conflicts created by this import. Use the following command to help the merge: cvs checkout -jTNF:yesterday -jTNF othersrc/libexec/tnftpd/src
CVS commit: src/sys/arch/mvme68k
Module Name:src Committed By: andvar Date: Sat Sep 30 21:00:43 UTC 2023 Modified Files: src/sys/arch/mvme68k/conf: files.mvme68k src/sys/arch/mvme68k/mvme68k: trap.c Log Message: Improve kgdb build for mvme68k: * include sys/kgdb.h in mvme68k/trap.c for missing definitions. * cast second kgdb_trap argument to (db_regs_t *). * build m68k/kgdb_machdep.c in kgdb enable build for kgdb_trap() implementation. KGDB build still fails, apparently due to missing zs_kgdb.c implementation. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/mvme68k/conf/files.mvme68k cvs rdiff -u -r1.112 -r1.113 src/sys/arch/mvme68k/mvme68k/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mvme68k
Module Name:src Committed By: andvar Date: Sat Sep 30 21:00:43 UTC 2023 Modified Files: src/sys/arch/mvme68k/conf: files.mvme68k src/sys/arch/mvme68k/mvme68k: trap.c Log Message: Improve kgdb build for mvme68k: * include sys/kgdb.h in mvme68k/trap.c for missing definitions. * cast second kgdb_trap argument to (db_regs_t *). * build m68k/kgdb_machdep.c in kgdb enable build for kgdb_trap() implementation. KGDB build still fails, apparently due to missing zs_kgdb.c implementation. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/mvme68k/conf/files.mvme68k cvs rdiff -u -r1.112 -r1.113 src/sys/arch/mvme68k/mvme68k/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mvme68k/conf/files.mvme68k diff -u src/sys/arch/mvme68k/conf/files.mvme68k:1.64 src/sys/arch/mvme68k/conf/files.mvme68k:1.65 --- src/sys/arch/mvme68k/conf/files.mvme68k:1.64 Mon Feb 18 01:12:23 2019 +++ src/sys/arch/mvme68k/conf/files.mvme68k Sat Sep 30 21:00:43 2023 @@ -1,4 +1,4 @@ -# $NetBSD: files.mvme68k,v 1.64 2019/02/18 01:12:23 thorpej Exp $ +# $NetBSD: files.mvme68k,v 1.65 2023/09/30 21:00:43 andvar Exp $ # config file for mvme68k @@ -97,6 +97,7 @@ file arch/mvme68k/mvme68k/pmap_bootstrap file arch/mvme68k/mvme68k/trap.c file arch/m68k/m68k/cacheops.c file arch/m68k/m68k/db_memrw.c ddb | kgdb +file arch/m68k/m68k/kgdb_machdep.c kgdb file arch/m68k/m68k/m68k_trap.c file arch/m68k/m68k/pmap_motorola.c file arch/m68k/m68k/procfs_machdep.c procfs Index: src/sys/arch/mvme68k/mvme68k/trap.c diff -u src/sys/arch/mvme68k/mvme68k/trap.c:1.112 src/sys/arch/mvme68k/mvme68k/trap.c:1.113 --- src/sys/arch/mvme68k/mvme68k/trap.c:1.112 Sat Sep 25 19:16:31 2021 +++ src/sys/arch/mvme68k/mvme68k/trap.c Sat Sep 30 21:00:43 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.112 2021/09/25 19:16:31 tsutsui Exp $ */ +/* $NetBSD: trap.c,v 1.113 2023/09/30 21:00:43 andvar Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.112 2021/09/25 19:16:31 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.113 2023/09/30 21:00:43 andvar Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -57,6 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.1 #include #include #include +#include #ifdef DEBUG #include @@ -313,7 +314,7 @@ trap(struct frame *fp, int type, unsigne (type & T_USER) ? "user" : "kernel", fp->f_pc); #ifdef KGDB /* If connected, step or cont returns 1 */ - if (kgdb_trap(type, fp)) + if (kgdb_trap(type, (db_regs_t *)fp)) goto kgdb_cont; #endif #ifdef DDB
CVS commit: src/sys/arch/mvme68k/docs
Module Name:src Committed By: andvar Date: Sat Sep 30 20:15:55 UTC 2023 Modified Files: src/sys/arch/mvme68k/docs: VMEbus-RAM Log Message: s/resonably/reasonably/. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mvme68k/docs/VMEbus-RAM Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mvme68k/docs/VMEbus-RAM diff -u src/sys/arch/mvme68k/docs/VMEbus-RAM:1.4 src/sys/arch/mvme68k/docs/VMEbus-RAM:1.5 --- src/sys/arch/mvme68k/docs/VMEbus-RAM:1.4 Sun Dec 11 12:18:17 2005 +++ src/sys/arch/mvme68k/docs/VMEbus-RAM Sat Sep 30 20:15:54 2023 @@ -1,4 +1,4 @@ - $NetBSD: VMEbus-RAM,v 1.4 2005/12/11 12:18:17 christos Exp $ + $NetBSD: VMEbus-RAM,v 1.5 2023/09/30 20:15:54 andvar Exp $ NetBSD/mvme68k: VMEbus RAM card configuration ~ @@ -31,7 +31,7 @@ then you'll have to locate it elsewhere. responds to A24D16 only, in which case the CPU-relative address you need to specify below will be in the 16MB region starting at 0x. -For A32D32, choose an address which is resonably close to the end of the +For A32D32, choose an address which is reasonably close to the end of the MVME board's RAM. That is, if you have 32MB of onboard RAM, set the VMEbus RAM board to appear at A32:0200.
CVS commit: src/sys/arch/mvme68k/docs
Module Name:src Committed By: andvar Date: Sat Sep 30 20:15:55 UTC 2023 Modified Files: src/sys/arch/mvme68k/docs: VMEbus-RAM Log Message: s/resonably/reasonably/. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mvme68k/docs/VMEbus-RAM Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/libexec/ftpd
Module Name:src Committed By: shm Date: Sat Sep 30 18:10:55 UTC 2023 Modified Files: src/libexec/ftpd: version.h Log Message: NetBSD-ftpd 20230930 Update version to "NetBSD-ftpd 20230930" for changes: - fix uninitialized memory usage in count_users() - fix pam_set_item call with proper struct passed as PAM_SOCKADDR To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/libexec/ftpd/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ftpd/version.h diff -u src/libexec/ftpd/version.h:1.79 src/libexec/ftpd/version.h:1.80 --- src/libexec/ftpd/version.h:1.79 Fri Sep 22 21:57:55 2023 +++ src/libexec/ftpd/version.h Sat Sep 30 18:10:55 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.79 2023/09/22 21:57:55 lukem Exp $ */ +/* $NetBSD: version.h,v 1.80 2023/09/30 18:10:55 shm Exp $ */ /*- * Copyright (c) 1999-2023 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,5 +29,5 @@ */ #ifndef FTPD_VERSION -#define FTPD_VERSION "NetBSD-ftpd 20230922" +#define FTPD_VERSION "NetBSD-ftpd 20230930" #endif
CVS commit: src/libexec/ftpd
Module Name:src Committed By: shm Date: Sat Sep 30 18:10:55 UTC 2023 Modified Files: src/libexec/ftpd: version.h Log Message: NetBSD-ftpd 20230930 Update version to "NetBSD-ftpd 20230930" for changes: - fix uninitialized memory usage in count_users() - fix pam_set_item call with proper struct passed as PAM_SOCKADDR To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/libexec/ftpd/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/libexec/ftpd
Module Name:src Committed By: shm Date: Sat Sep 30 18:06:24 UTC 2023 Modified Files: src/libexec/ftpd: ftpd.c Log Message: pam_set_item PAM_SOCKADDR expects sockaddr_storage structure Instead, internal struct sockinet was used. Because it's length is shorter than sockaddr_storage, libpam was copying also memory outside of sockinet struct. To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/libexec/ftpd/ftpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ftpd/ftpd.c diff -u src/libexec/ftpd/ftpd.c:1.207 src/libexec/ftpd/ftpd.c:1.208 --- src/libexec/ftpd/ftpd.c:1.207 Sat Sep 2 12:16:29 2023 +++ src/libexec/ftpd/ftpd.c Sat Sep 30 18:06:24 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.207 2023/09/02 12:16:29 lukem Exp $ */ +/* $NetBSD: ftpd.c,v 1.208 2023/09/30 18:06:24 shm Exp $ */ /* * Copyright (c) 1997-2023 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 19 #if 0 static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: ftpd.c,v 1.207 2023/09/02 12:16:29 lukem Exp $"); +__RCSID("$NetBSD: ftpd.c,v 1.208 2023/09/30 18:06:24 shm Exp $"); #endif #endif /* not lint */ @@ -3896,6 +3896,7 @@ auth_pam(void) int e; ftpd_cred_t auth_cred = { curname, 0 }; struct pam_conv conv = { _conv, _cred }; + struct sockaddr_storage ss; e = pam_start("ftpd", curname, , ); if (e != PAM_SUCCESS) { @@ -3918,7 +3919,9 @@ auth_pam(void) return -1; } - e = pam_set_item(pamh, PAM_SOCKADDR, _addr); + memset(, 0, sizeof(ss)); + memcpy(, _addr.si_su, his_addr.su_len); + e = pam_set_item(pamh, PAM_SOCKADDR, ); if (e != PAM_SUCCESS) { syslog(LOG_ERR, "pam_set_item(PAM_SOCKADDR): %s", pam_strerror(pamh, e));
CVS commit: src/libexec/ftpd
Module Name:src Committed By: shm Date: Sat Sep 30 18:06:24 UTC 2023 Modified Files: src/libexec/ftpd: ftpd.c Log Message: pam_set_item PAM_SOCKADDR expects sockaddr_storage structure Instead, internal struct sockinet was used. Because it's length is shorter than sockaddr_storage, libpam was copying also memory outside of sockinet struct. To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/libexec/ftpd/ftpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: riastradh Date: Sat Sep 30 13:26:31 UTC 2023 Modified Files: src/share/misc: acronyms.comp Log Message: acronyms.comp: Add various CPU- and barrier-related acronyms. CET, DMB, DSB, HLE, IBT, ISB, MDS, SSB, SSBB, SSBD, TAA, TSX PR misc/57636 To generate a diff of this commit: cvs rdiff -u -r1.369 -r1.370 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: mrg Date: Sat Sep 30 10:46:46 UTC 2023 Modified Files: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_cik.c amdgpu_device.c amdgpu_si.c amdgpu_vi.c src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci: nouveau_nvkm_subdev_pci_pcie.c src/sys/external/bsd/drm2/dist/drm/radeon: radeon_ci_dpm.c radeon_cik.c radeon_evergreen.c radeon_r600.c radeon_rv770.c radeon_si.c radeon_si_dpm.c src/sys/external/bsd/drm2/include/linux: pci.h src/sys/external/bsd/drm2/linux: linux_pci.c Log Message: drm: enable almost all PCIe functionality linux_pci.c revisions 1.24 and 1.25 implemented most of the remaining missing PCIe backends, but only enabled them for some amdgpu portions. this enables all code marked with "XXX amdgpu pcie", "XXX radeon pcie", and "XXX pcie speed". for most of it, simply removing #ifndefs __NetBSD__ to enable compliation was required, once the new "bus->max_bus_speed" member was added to struct pci_bus. add an "always fails" backend for pci_enable_atomic_ops_to_root() which seems to only be necessary for virtual GPU functionality (and could be implemented if needed.) tested on radeon 5450, 7750, R7 240 [radeon], and RX 550 [amdgpu], and nvidia 750 and 1030 [nouveau]. this still does not quite work on nvidia cards. there are two problems that remain: - the call to set the link speed is skipped because the speed is set to the default value of "-1". nvkm_pcie_set_link() will actually determine the right value for this and for some cards, calling this function if the current speed is -1 helps set the link speed. it may be that on linux other paths we don't have enabled properly would set this (there's one via debugfs, and a jetson specific one, though perhaps setting either AC or DC speed values as boot options (after hooking up these for netbsd) would currently work. - worse, cards newer than kepler - geforce 900, 1000, and newer, are all lacking the backing support to set pcie link speed. the GT 1030 card i have been testing with remains at pcie 1.0. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cik.c cvs rdiff -u -r1.19 -r1.20 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_si.c cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vi.c cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_r600.c cvs rdiff -u -r1.7 -r1.8 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_cik.c cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_evergreen.c \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_si.c cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_rv770.c cvs rdiff -u -r1.8 -r1.9 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_si_dpm.c cvs rdiff -u -r1.56 -r1.57 src/sys/external/bsd/drm2/include/linux/pci.h cvs rdiff -u -r1.26 -r1.27 src/sys/external/bsd/drm2/linux/linux_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: mrg Date: Sat Sep 30 10:46:46 UTC 2023 Modified Files: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_cik.c amdgpu_device.c amdgpu_si.c amdgpu_vi.c src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci: nouveau_nvkm_subdev_pci_pcie.c src/sys/external/bsd/drm2/dist/drm/radeon: radeon_ci_dpm.c radeon_cik.c radeon_evergreen.c radeon_r600.c radeon_rv770.c radeon_si.c radeon_si_dpm.c src/sys/external/bsd/drm2/include/linux: pci.h src/sys/external/bsd/drm2/linux: linux_pci.c Log Message: drm: enable almost all PCIe functionality linux_pci.c revisions 1.24 and 1.25 implemented most of the remaining missing PCIe backends, but only enabled them for some amdgpu portions. this enables all code marked with "XXX amdgpu pcie", "XXX radeon pcie", and "XXX pcie speed". for most of it, simply removing #ifndefs __NetBSD__ to enable compliation was required, once the new "bus->max_bus_speed" member was added to struct pci_bus. add an "always fails" backend for pci_enable_atomic_ops_to_root() which seems to only be necessary for virtual GPU functionality (and could be implemented if needed.) tested on radeon 5450, 7750, R7 240 [radeon], and RX 550 [amdgpu], and nvidia 750 and 1030 [nouveau]. this still does not quite work on nvidia cards. there are two problems that remain: - the call to set the link speed is skipped because the speed is set to the default value of "-1". nvkm_pcie_set_link() will actually determine the right value for this and for some cards, calling this function if the current speed is -1 helps set the link speed. it may be that on linux other paths we don't have enabled properly would set this (there's one via debugfs, and a jetson specific one, though perhaps setting either AC or DC speed values as boot options (after hooking up these for netbsd) would currently work. - worse, cards newer than kepler - geforce 900, 1000, and newer, are all lacking the backing support to set pcie link speed. the GT 1030 card i have been testing with remains at pcie 1.0. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cik.c cvs rdiff -u -r1.19 -r1.20 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_si.c cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vi.c cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_r600.c cvs rdiff -u -r1.7 -r1.8 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_cik.c cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_evergreen.c \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_si.c cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_rv770.c cvs rdiff -u -r1.8 -r1.9 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_si_dpm.c cvs rdiff -u -r1.56 -r1.57 src/sys/external/bsd/drm2/include/linux/pci.h cvs rdiff -u -r1.26 -r1.27 src/sys/external/bsd/drm2/linux/linux_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cik.c diff -u src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cik.c:1.6 src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cik.c:1.7 --- src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cik.c:1.6 Mon Oct 17 03:05:32 2022 +++ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cik.c Sat Sep 30 10:46:45 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: amdgpu_cik.c,v 1.6 2022/10/17 03:05:32 mrg Exp $ */ +/* $NetBSD: amdgpu_cik.c,v 1.7 2023/09/30 10:46:45 mrg Exp $ */ /* * Copyright 2012 Advanced Micro Devices, Inc. @@ -24,7 +24,7 @@ * Authors: Alex Deucher */ #include -__KERNEL_RCSID(0, "$NetBSD: amdgpu_cik.c,v 1.6 2022/10/17 03:05:32 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amdgpu_cik.c,v 1.7 2023/09/30 10:46:45 mrg Exp $"); #include #include @@ -1733,9 +1733,6 @@ static void cik_program_aspm(struct amdg WREG32_PCIE(ixPCIE_LC_LINK_WIDTH_CNTL, data); if (!disable_clkreq) { -#ifdef __NetBSD__ /* XXX amdgpu pcie */ -clk_req_support = false; -#else struct pci_dev *root = adev->pdev->bus->self; u32 lnkcap; @@ -1743,7 +1740,6 @@ static void cik_program_aspm(struct amdg pcie_capability_read_dword(root, PCI_EXP_LNKCAP, ); if (lnkcap & PCI_EXP_LNKCAP_CLKPM) clk_req_support = true; -#endif } else { clk_req_support = false; } Index: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c diff -u
CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci
Module Name:src Committed By: mrg Date: Sat Sep 30 10:38:31 UTC 2023 Modified Files: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci: nouveau_nvkm_subdev_pci_pcie.c Log Message: avoid an unlikely array bounds issue picked up by GCC 12. nvkm_pcie_speed() can return -1, which is then used as an array index, so make this default return PCIe 1.0 speeds. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c:1.3 src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c:1.3 Sun Dec 19 10:51:58 2021 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c Sat Sep 30 10:38:31 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_nvkm_subdev_pci_pcie.c,v 1.3 2021/12/19 10:51:58 riastradh Exp $ */ +/* $NetBSD: nouveau_nvkm_subdev_pci_pcie.c,v 1.4 2023/09/30 10:38:31 mrg Exp $ */ /* * Copyright 2015 Karol Herbst @@ -24,7 +24,7 @@ * Authors: Karol Herbst */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_pci_pcie.c,v 1.3 2021/12/19 10:51:58 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_pci_pcie.c,v 1.4 2023/09/30 10:38:31 mrg Exp $"); #include "priv.h" @@ -48,7 +48,7 @@ nvkm_pcie_speed(enum pci_bus_speed speed /* XXX 0x16 is 8_0, assume 0x17 will be 16_0 for now */ if (speed == 0x17) return NVKM_PCIE_SPEED_8_0; - return -1; + return NVKM_PCIE_SPEED_2_5; } }
CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci
Module Name:src Committed By: mrg Date: Sat Sep 30 10:38:31 UTC 2023 Modified Files: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci: nouveau_nvkm_subdev_pci_pcie.c Log Message: avoid an unlikely array bounds issue picked up by GCC 12. nvkm_pcie_speed() can return -1, which is then used as an array index, so make this default return PCIe 1.0 speeds. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sat Sep 30 08:29:13 UTC 2023 Modified Files: othersrc/libexec/tnftpd: configure tnftpd_config.h.in Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 othersrc/libexec/tnftpd/configure cvs rdiff -u -r1.8 -r1.9 othersrc/libexec/tnftpd/tnftpd_config.h.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/configure diff -u othersrc/libexec/tnftpd/configure:1.54 othersrc/libexec/tnftpd/configure:1.55 --- othersrc/libexec/tnftpd/configure:1.54 Sat Sep 23 04:50:41 2023 +++ othersrc/libexec/tnftpd/configure Sat Sep 30 08:29:13 2023 @@ -13431,123 +13431,128 @@ rm -f core conftest.err conftest.$ac_obj esac # -# Checks for libraries. +# Checks for header files. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5 -$as_echo_n "checking for library containing crypt... " >&6; } -if ${ac_cv_search_crypt+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +accheck_includes=' +#include +#if defined(HAVE_SYS_TYPES_H) +# include #endif -char crypt (); -int -main () -{ -return crypt (); - ; - return 0; -} +#if defined(HAVE_SYS_STAT_H) +# include +#endif +#if defined(STDC_HEADERS) +# include +# include +# include +#endif +#if defined(HAVE_PWD_H) +# include +#endif +#if defined(HAVE_FNMATCH_H) +# include +#endif +#if defined(HAVE_UNISTD_H) +# include +#endif +#if defined(HAVE_POLL_H) +# include +#elif defined(HAVE_SYS_POLL_H) +# include +#endif +#if defined(HAVE_SYS_SOCKET_H) +# include +#endif +#if defined(HAVE_NETINET_IN_H) +# include +#endif +#if defined(HAVE_NETINET_IN_SYSTM_H) +# include +#endif +#if defined(HAVE_NETDB_H) +# include +#endif +#if defined(HAVE_ARPA_INET_H) +# include +#endif +#if defined(HAVE_DIRENT_H) +# include +#else +# define dirent direct +# if defined(HAVE_SYS_NDIR_H) +# include +# endif +# if defined(HAVE_SYS_DIR_H) +# include +# endif +# if defined(HAVE_NDIR_H) +# include +# endif +#endif +' # accheck_includes + +for ac_header in sys/types.h sys/ioctl.h sys/mman.h sys/param.h \ + sys/stat.h sys/socket.h sys/syslimits.h \ + sys/sysmacros.h sys/time.h sys/wait.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$accheck_includes +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -for ac_lib in '' crypt; do - if test -z "$ac_lib"; then -ac_res="none required" - else -ac_res=-l$ac_lib -LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_crypt=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ -conftest$ac_exeext - if ${ac_cv_search_crypt+:} false; then : - break -fi -done -if ${ac_cv_search_crypt+:} false; then : -else - ac_cv_search_crypt=no fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5 -$as_echo "$ac_cv_search_crypt" >&6; } -ac_res=$ac_cv_search_crypt -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -fi +done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pidfile" >&5 -$as_echo_n "checking for library containing pidfile... " >&6; } -if ${ac_cv_search_pidfile+:} false; then : +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include <$ac_hdr> -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pidfile (); int main () { -return pidfile (); +if ((DIR *) 0) +return 0; ; return 0; } _ACEOF -for ac_lib in '' util; do - if test -z "$ac_lib"; then -ac_res="none required" - else -ac_res=-l$ac_lib -LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sat Sep 30 08:29:13 UTC 2023 Modified Files: othersrc/libexec/tnftpd: configure tnftpd_config.h.in Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 othersrc/libexec/tnftpd/configure cvs rdiff -u -r1.8 -r1.9 othersrc/libexec/tnftpd/tnftpd_config.h.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.