CVS commit: src/external/bsd/less/dist
Module Name:src Committed By: simonb Date: Fri Oct 6 05:49:49 UTC 2023 Modified Files: src/external/bsd/less/dist: brac.c ch.c charset.c charset.h cmd.h cmdbuf.c command.c cvt.c decode.c edit.c filename.c forwback.c funcs.h help.c ifile.c input.c jump.c less.h lessecho.c lesskey.c lesskey.h lesskey_parse.c lglob.h line.c linenum.c lsystem.c main.c mark.c optfunc.c option.c option.h opttbl.c os.c output.c pattern.c pattern.h pckeys.h position.c position.h prompt.c regexp.c regexp.h screen.c scrsize.c search.c signal.c tags.c ttyin.c version.c Removed Files: src/external/bsd/less/dist: defines.h Log Message: Resolve conflicts from less-643 import. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/less/dist/brac.c \ src/external/bsd/less/dist/ch.c src/external/bsd/less/dist/charset.c \ src/external/bsd/less/dist/cmdbuf.c src/external/bsd/less/dist/decode.c \ src/external/bsd/less/dist/edit.c src/external/bsd/less/dist/filename.c \ src/external/bsd/less/dist/forwback.c src/external/bsd/less/dist/funcs.h \ src/external/bsd/less/dist/help.c src/external/bsd/less/dist/ifile.c \ src/external/bsd/less/dist/jump.c src/external/bsd/less/dist/less.h \ src/external/bsd/less/dist/lessecho.c \ src/external/bsd/less/dist/lesskey.c src/external/bsd/less/dist/lglob.h \ src/external/bsd/less/dist/line.c src/external/bsd/less/dist/linenum.c \ src/external/bsd/less/dist/lsystem.c src/external/bsd/less/dist/main.c \ src/external/bsd/less/dist/option.c src/external/bsd/less/dist/option.h \ src/external/bsd/less/dist/opttbl.c src/external/bsd/less/dist/os.c \ src/external/bsd/less/dist/output.c src/external/bsd/less/dist/pattern.h \ src/external/bsd/less/dist/position.c src/external/bsd/less/dist/prompt.c \ src/external/bsd/less/dist/screen.c src/external/bsd/less/dist/search.c \ src/external/bsd/less/dist/signal.c src/external/bsd/less/dist/tags.c cvs rdiff -u -r1.3 -r1.4 src/external/bsd/less/dist/charset.h \ src/external/bsd/less/dist/cmd.h src/external/bsd/less/dist/cvt.c \ src/external/bsd/less/dist/input.c src/external/bsd/less/dist/lesskey.h \ src/external/bsd/less/dist/mark.c src/external/bsd/less/dist/optfunc.c \ src/external/bsd/less/dist/pattern.c src/external/bsd/less/dist/pckeys.h \ src/external/bsd/less/dist/position.h src/external/bsd/less/dist/regexp.c \ src/external/bsd/less/dist/regexp.h src/external/bsd/less/dist/scrsize.c \ src/external/bsd/less/dist/ttyin.c src/external/bsd/less/dist/version.c cvs rdiff -u -r1.5 -r1.6 src/external/bsd/less/dist/command.c cvs rdiff -u -r1.3 -r0 src/external/bsd/less/dist/defines.h cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/less/dist/lesskey_parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/external/bsd/less/dist
Module Name:src Committed By: simonb Date: Fri Oct 6 04:32:56 UTC 2023 Update of /cvsroot/src/external/bsd/less/dist In directory ivanova.netbsd.org:/tmp/cvs-serv9334 Log Message: Import less-643. Way to many changes and bugfixes over the last ten years to list. Look at src/external/bsd/less/dist/version.c for a complete list of changes. Status: Vendor Tag: GREENWOODSOFTWARE Release Tags: LESS-643 U src/external/bsd/less/dist/defines.o9 N src/external/bsd/less/dist/lesskey_parse.c C src/external/bsd/less/dist/ifile.c U src/external/bsd/less/dist/INSTALL U src/external/bsd/less/dist/defines.wn U src/external/bsd/less/dist/configure C src/external/bsd/less/dist/brac.c C src/external/bsd/less/dist/pattern.c C src/external/bsd/less/dist/position.c U src/external/bsd/less/dist/Makefile.dsb C src/external/bsd/less/dist/opttbl.c U src/external/bsd/less/dist/Makefile.wnb C src/external/bsd/less/dist/option.h C src/external/bsd/less/dist/charset.c C src/external/bsd/less/dist/ch.c C src/external/bsd/less/dist/jump.c N src/external/bsd/less/dist/mkhelp.pl C src/external/bsd/less/dist/tags.c U src/external/bsd/less/dist/Makefile.aut C src/external/bsd/less/dist/help.c C src/external/bsd/less/dist/linenum.c C src/external/bsd/less/dist/command.c N src/external/bsd/less/dist/xbuf.h U src/external/bsd/less/dist/Makefile.o9u C src/external/bsd/less/dist/less.h C src/external/bsd/less/dist/prompt.c C src/external/bsd/less/dist/lglob.h C src/external/bsd/less/dist/pckeys.h C src/external/bsd/less/dist/os.c U src/external/bsd/less/dist/Makefile.dsu N src/external/bsd/less/dist/fmt.uni C src/external/bsd/less/dist/regexp.c C src/external/bsd/less/dist/cvt.c U src/external/bsd/less/dist/Makefile.in U src/external/bsd/less/dist/mkinstalldirs U src/external/bsd/less/dist/LICENSE N src/external/bsd/less/dist/mkutable C src/external/bsd/less/dist/lesskey.c C src/external/bsd/less/dist/charset.h N src/external/bsd/less/dist/lesskey.man N src/external/bsd/less/dist/lessecho.nro C src/external/bsd/less/dist/main.c C src/external/bsd/less/dist/optfunc.c U src/external/bsd/less/dist/less.hlp C src/external/bsd/less/dist/filename.c U src/external/bsd/less/dist/defines.ds N src/external/bsd/less/dist/mkhelp.py C src/external/bsd/less/dist/cmd.h C src/external/bsd/less/dist/decode.c U src/external/bsd/less/dist/configure.ac C src/external/bsd/less/dist/lessecho.c C src/external/bsd/less/dist/version.c C src/external/bsd/less/dist/scrsize.c C src/external/bsd/less/dist/option.c N src/external/bsd/less/dist/ubin.uni U src/external/bsd/less/dist/NEWS C src/external/bsd/less/dist/pattern.h C src/external/bsd/less/dist/position.h N src/external/bsd/less/dist/lesskey.nro N src/external/bsd/less/dist/lessecho.man C src/external/bsd/less/dist/screen.c C src/external/bsd/less/dist/lsystem.c C src/external/bsd/less/dist/forwback.c N src/external/bsd/less/dist/wide.uni U src/external/bsd/less/dist/defines.o2 U src/external/bsd/less/dist/install.sh U src/external/bsd/less/dist/COPYING U src/external/bsd/less/dist/Makefile.o9c C src/external/bsd/less/dist/mark.c C src/external/bsd/less/dist/ttyin.c N src/external/bsd/less/dist/less.man C src/external/bsd/less/dist/funcs.h C src/external/bsd/less/dist/line.c C src/external/bsd/less/dist/output.c C src/external/bsd/less/dist/lesskey.h C src/external/bsd/less/dist/edit.c U src/external/bsd/less/dist/Makefile.dsg C src/external/bsd/less/dist/input.c U src/external/bsd/less/dist/README C src/external/bsd/less/dist/regexp.h U src/external/bsd/less/dist/Makefile.o2e N src/external/bsd/less/dist/Makefile.wng U src/external/bsd/less/dist/Makefile.wnm N src/external/bsd/less/dist/less.nro C src/external/bsd/less/dist/cmdbuf.c U src/external/bsd/less/dist/defines.h.in C src/external/bsd/less/dist/search.c C src/external/bsd/less/dist/signal.c N src/external/bsd/less/dist/xbuf.c N src/external/bsd/less/dist/compose.uni N src/external/bsd/less/dist/lesstest/wchar.h N src/external/bsd/less/dist/lesstest/lt_screen.c N src/external/bsd/less/dist/lesstest/env.c N src/external/bsd/less/dist/lesstest/lesstest.h N src/external/bsd/less/dist/lesstest/maketest N src/external/bsd/less/dist/lesstest/lt_types.h N src/external/bsd/less/dist/lesstest/pipeline.c N src/external/bsd/less/dist/lesstest/display.c N src/external/bsd/less/dist/lesstest/lesstest.c N src/external/bsd/less/dist/lesstest/wchar.c N src/external/bsd/less/dist/lesstest/term.c N src/external/bsd/less/dist/lesstest/run.c N src/external/bsd/less/dist/lesstest/Makefile N src/external/bsd/less/dist/lesstest/log.c N src/external/bsd/less/dist/lesstest/parse.c N src/external/bsd/less/dist/lesstest/unicode.c N src/external/bsd/less/dist/lesstest/runtest N src/external/bsd/less/dist/lesstest/lt/subsearch.lt N src/external/bsd/less/dist/lesstest/lt/seq200.lt N src/external/bsd/less/dist/lesstest/lt/github216.lt N src/external/bsd/less/dist/lesstest/lt/github329.lt N src/external/bsd/less/dist/lesstest/lt/chinese1.lt N
CVS import: src/external/bsd/less/dist
Module Name:src Committed By: simonb Date: Fri Oct 6 04:32:56 UTC 2023 Update of /cvsroot/src/external/bsd/less/dist In directory ivanova.netbsd.org:/tmp/cvs-serv9334 Log Message: Import less-643. Way to many changes and bugfixes over the last ten years to list. Look at src/external/bsd/less/dist/version.c for a complete list of changes. Status: Vendor Tag: GREENWOODSOFTWARE Release Tags: LESS-643 U src/external/bsd/less/dist/defines.o9 N src/external/bsd/less/dist/lesskey_parse.c C src/external/bsd/less/dist/ifile.c U src/external/bsd/less/dist/INSTALL U src/external/bsd/less/dist/defines.wn U src/external/bsd/less/dist/configure C src/external/bsd/less/dist/brac.c C src/external/bsd/less/dist/pattern.c C src/external/bsd/less/dist/position.c U src/external/bsd/less/dist/Makefile.dsb C src/external/bsd/less/dist/opttbl.c U src/external/bsd/less/dist/Makefile.wnb C src/external/bsd/less/dist/option.h C src/external/bsd/less/dist/charset.c C src/external/bsd/less/dist/ch.c C src/external/bsd/less/dist/jump.c N src/external/bsd/less/dist/mkhelp.pl C src/external/bsd/less/dist/tags.c U src/external/bsd/less/dist/Makefile.aut C src/external/bsd/less/dist/help.c C src/external/bsd/less/dist/linenum.c C src/external/bsd/less/dist/command.c N src/external/bsd/less/dist/xbuf.h U src/external/bsd/less/dist/Makefile.o9u C src/external/bsd/less/dist/less.h C src/external/bsd/less/dist/prompt.c C src/external/bsd/less/dist/lglob.h C src/external/bsd/less/dist/pckeys.h C src/external/bsd/less/dist/os.c U src/external/bsd/less/dist/Makefile.dsu N src/external/bsd/less/dist/fmt.uni C src/external/bsd/less/dist/regexp.c C src/external/bsd/less/dist/cvt.c U src/external/bsd/less/dist/Makefile.in U src/external/bsd/less/dist/mkinstalldirs U src/external/bsd/less/dist/LICENSE N src/external/bsd/less/dist/mkutable C src/external/bsd/less/dist/lesskey.c C src/external/bsd/less/dist/charset.h N src/external/bsd/less/dist/lesskey.man N src/external/bsd/less/dist/lessecho.nro C src/external/bsd/less/dist/main.c C src/external/bsd/less/dist/optfunc.c U src/external/bsd/less/dist/less.hlp C src/external/bsd/less/dist/filename.c U src/external/bsd/less/dist/defines.ds N src/external/bsd/less/dist/mkhelp.py C src/external/bsd/less/dist/cmd.h C src/external/bsd/less/dist/decode.c U src/external/bsd/less/dist/configure.ac C src/external/bsd/less/dist/lessecho.c C src/external/bsd/less/dist/version.c C src/external/bsd/less/dist/scrsize.c C src/external/bsd/less/dist/option.c N src/external/bsd/less/dist/ubin.uni U src/external/bsd/less/dist/NEWS C src/external/bsd/less/dist/pattern.h C src/external/bsd/less/dist/position.h N src/external/bsd/less/dist/lesskey.nro N src/external/bsd/less/dist/lessecho.man C src/external/bsd/less/dist/screen.c C src/external/bsd/less/dist/lsystem.c C src/external/bsd/less/dist/forwback.c N src/external/bsd/less/dist/wide.uni U src/external/bsd/less/dist/defines.o2 U src/external/bsd/less/dist/install.sh U src/external/bsd/less/dist/COPYING U src/external/bsd/less/dist/Makefile.o9c C src/external/bsd/less/dist/mark.c C src/external/bsd/less/dist/ttyin.c N src/external/bsd/less/dist/less.man C src/external/bsd/less/dist/funcs.h C src/external/bsd/less/dist/line.c C src/external/bsd/less/dist/output.c C src/external/bsd/less/dist/lesskey.h C src/external/bsd/less/dist/edit.c U src/external/bsd/less/dist/Makefile.dsg C src/external/bsd/less/dist/input.c U src/external/bsd/less/dist/README C src/external/bsd/less/dist/regexp.h U src/external/bsd/less/dist/Makefile.o2e N src/external/bsd/less/dist/Makefile.wng U src/external/bsd/less/dist/Makefile.wnm N src/external/bsd/less/dist/less.nro C src/external/bsd/less/dist/cmdbuf.c U src/external/bsd/less/dist/defines.h.in C src/external/bsd/less/dist/search.c C src/external/bsd/less/dist/signal.c N src/external/bsd/less/dist/xbuf.c N src/external/bsd/less/dist/compose.uni N src/external/bsd/less/dist/lesstest/wchar.h N src/external/bsd/less/dist/lesstest/lt_screen.c N src/external/bsd/less/dist/lesstest/env.c N src/external/bsd/less/dist/lesstest/lesstest.h N src/external/bsd/less/dist/lesstest/maketest N src/external/bsd/less/dist/lesstest/lt_types.h N src/external/bsd/less/dist/lesstest/pipeline.c N src/external/bsd/less/dist/lesstest/display.c N src/external/bsd/less/dist/lesstest/lesstest.c N src/external/bsd/less/dist/lesstest/wchar.c N src/external/bsd/less/dist/lesstest/term.c N src/external/bsd/less/dist/lesstest/run.c N src/external/bsd/less/dist/lesstest/Makefile N src/external/bsd/less/dist/lesstest/log.c N src/external/bsd/less/dist/lesstest/parse.c N src/external/bsd/less/dist/lesstest/unicode.c N src/external/bsd/less/dist/lesstest/runtest N src/external/bsd/less/dist/lesstest/lt/subsearch.lt N src/external/bsd/less/dist/lesstest/lt/seq200.lt N src/external/bsd/less/dist/lesstest/lt/github216.lt N src/external/bsd/less/dist/lesstest/lt/github329.lt N src/external/bsd/less/dist/lesstest/lt/chinese1.lt N
CVS import: src/external/bsd/less/dist
Module Name:src Committed By: simonb Date: Fri Oct 6 04:29:27 UTC 2023 Update of /cvsroot/src/external/bsd/less/dist In directory ivanova.netbsd.org:/tmp/cvs-serv3509 Log Message: Import less-643. Way to many changes and bugfixes over the last ten years to list. Look at src/external/bsd/less/dist/version.c for a complete list of changes. Status: Vendor Tag: GREENWOODSOFTWARE Release Tags: LESS-643 N src/external/bsd/less/dist/less-643/lesskey.c N src/external/bsd/less/dist/less-643/funcs.h N src/external/bsd/less/dist/less-643/os.c N src/external/bsd/less/dist/less-643/README N src/external/bsd/less/dist/less-643/output.c N src/external/bsd/less/dist/less-643/ttyin.c N src/external/bsd/less/dist/less-643/edit.c N src/external/bsd/less/dist/less-643/line.c N src/external/bsd/less/dist/less-643/Makefile.dsb N src/external/bsd/less/dist/less-643/regexp.h N src/external/bsd/less/dist/less-643/input.c N src/external/bsd/less/dist/less-643/mark.c N src/external/bsd/less/dist/less-643/xbuf.c N src/external/bsd/less/dist/less-643/Makefile.wnb N src/external/bsd/less/dist/less-643/cmdbuf.c N src/external/bsd/less/dist/less-643/signal.c N src/external/bsd/less/dist/less-643/command.c N src/external/bsd/less/dist/less-643/search.c N src/external/bsd/less/dist/less-643/linenum.c N src/external/bsd/less/dist/less-643/filename.c N src/external/bsd/less/dist/less-643/Makefile.o9u N src/external/bsd/less/dist/less-643/defines.ds N src/external/bsd/less/dist/less-643/mkhelp.pl N src/external/bsd/less/dist/less-643/charset.c N src/external/bsd/less/dist/less-643/less.hlp N src/external/bsd/less/dist/less-643/mkinstalldirs N src/external/bsd/less/dist/less-643/Makefile.aut N src/external/bsd/less/dist/less-643/lessecho.c N src/external/bsd/less/dist/less-643/Makefile.in N src/external/bsd/less/dist/less-643/decode.c N src/external/bsd/less/dist/less-643/cmd.h N src/external/bsd/less/dist/less-643/Makefile.dsu N src/external/bsd/less/dist/less-643/main.c N src/external/bsd/less/dist/less-643/option.c N src/external/bsd/less/dist/less-643/ubin.uni N src/external/bsd/less/dist/less-643/position.h N src/external/bsd/less/dist/less-643/pattern.c N src/external/bsd/less/dist/less-643/ch.c N src/external/bsd/less/dist/less-643/configure N src/external/bsd/less/dist/less-643/screen.c N src/external/bsd/less/dist/less-643/wide.uni N src/external/bsd/less/dist/less-643/install.sh N src/external/bsd/less/dist/less-643/COPYING N src/external/bsd/less/dist/less-643/forwback.c N src/external/bsd/less/dist/less-643/defines.o2 N src/external/bsd/less/dist/less-643/lesskey_parse.c N src/external/bsd/less/dist/less-643/less.h N src/external/bsd/less/dist/less-643/pckeys.h N src/external/bsd/less/dist/less-643/prompt.c N src/external/bsd/less/dist/less-643/xbuf.h N src/external/bsd/less/dist/less-643/help.c N src/external/bsd/less/dist/less-643/lglob.h N src/external/bsd/less/dist/less-643/tags.c N src/external/bsd/less/dist/less-643/configure.ac N src/external/bsd/less/dist/less-643/regexp.c N src/external/bsd/less/dist/less-643/fmt.uni N src/external/bsd/less/dist/less-643/mkutable N src/external/bsd/less/dist/less-643/lesskey.h N src/external/bsd/less/dist/less-643/cvt.c N src/external/bsd/less/dist/less-643/Makefile.o9c N src/external/bsd/less/dist/less-643/LICENSE N src/external/bsd/less/dist/less-643/lessecho.1 N src/external/bsd/less/dist/less-643/ifile.c N src/external/bsd/less/dist/less-643/INSTALL N src/external/bsd/less/dist/less-643/NEWS N src/external/bsd/less/dist/less-643/brac.c N src/external/bsd/less/dist/less-643/defines.o9 N src/external/bsd/less/dist/less-643/position.c N src/external/bsd/less/dist/less-643/lsystem.c N src/external/bsd/less/dist/less-643/less.1 N src/external/bsd/less/dist/less-643/Makefile.o2e N src/external/bsd/less/dist/less-643/pattern.h N src/external/bsd/less/dist/less-643/defines.wn N src/external/bsd/less/dist/less-643/Makefile.dsg N src/external/bsd/less/dist/less-643/compose.uni N src/external/bsd/less/dist/less-643/opttbl.c N src/external/bsd/less/dist/less-643/version.c N src/external/bsd/less/dist/less-643/scrsize.c N src/external/bsd/less/dist/less-643/defines.h.in N src/external/bsd/less/dist/less-643/jump.c N src/external/bsd/less/dist/less-643/option.h N src/external/bsd/less/dist/less-643/Makefile.wnm N src/external/bsd/less/dist/less-643/lesskey.1 N src/external/bsd/less/dist/less-643/Makefile.wng N src/external/bsd/less/dist/less-643/mkhelp.py N src/external/bsd/less/dist/less-643/optfunc.c N src/external/bsd/less/dist/less-643/charset.h N src/external/bsd/less/dist/src/external/bsd/less/dist/defines.o9 N src/external/bsd/less/dist/src/external/bsd/less/dist/lesskey_parse.c N src/external/bsd/less/dist/src/external/bsd/less/dist/ifile.c N src/external/bsd/less/dist/src/external/bsd/less/dist/INSTALL N src/external/bsd/less/dist/src/external/bsd/less/dist/defines.wn N src/external/bsd/less/dist/src/external/bsd/less/dist/configure N
CVS import: src/external/bsd/less/dist
Module Name:src Committed By: simonb Date: Fri Oct 6 04:29:27 UTC 2023 Update of /cvsroot/src/external/bsd/less/dist In directory ivanova.netbsd.org:/tmp/cvs-serv3509 Log Message: Import less-643. Way to many changes and bugfixes over the last ten years to list. Look at src/external/bsd/less/dist/version.c for a complete list of changes. Status: Vendor Tag: GREENWOODSOFTWARE Release Tags: LESS-643 N src/external/bsd/less/dist/less-643/lesskey.c N src/external/bsd/less/dist/less-643/funcs.h N src/external/bsd/less/dist/less-643/os.c N src/external/bsd/less/dist/less-643/README N src/external/bsd/less/dist/less-643/output.c N src/external/bsd/less/dist/less-643/ttyin.c N src/external/bsd/less/dist/less-643/edit.c N src/external/bsd/less/dist/less-643/line.c N src/external/bsd/less/dist/less-643/Makefile.dsb N src/external/bsd/less/dist/less-643/regexp.h N src/external/bsd/less/dist/less-643/input.c N src/external/bsd/less/dist/less-643/mark.c N src/external/bsd/less/dist/less-643/xbuf.c N src/external/bsd/less/dist/less-643/Makefile.wnb N src/external/bsd/less/dist/less-643/cmdbuf.c N src/external/bsd/less/dist/less-643/signal.c N src/external/bsd/less/dist/less-643/command.c N src/external/bsd/less/dist/less-643/search.c N src/external/bsd/less/dist/less-643/linenum.c N src/external/bsd/less/dist/less-643/filename.c N src/external/bsd/less/dist/less-643/Makefile.o9u N src/external/bsd/less/dist/less-643/defines.ds N src/external/bsd/less/dist/less-643/mkhelp.pl N src/external/bsd/less/dist/less-643/charset.c N src/external/bsd/less/dist/less-643/less.hlp N src/external/bsd/less/dist/less-643/mkinstalldirs N src/external/bsd/less/dist/less-643/Makefile.aut N src/external/bsd/less/dist/less-643/lessecho.c N src/external/bsd/less/dist/less-643/Makefile.in N src/external/bsd/less/dist/less-643/decode.c N src/external/bsd/less/dist/less-643/cmd.h N src/external/bsd/less/dist/less-643/Makefile.dsu N src/external/bsd/less/dist/less-643/main.c N src/external/bsd/less/dist/less-643/option.c N src/external/bsd/less/dist/less-643/ubin.uni N src/external/bsd/less/dist/less-643/position.h N src/external/bsd/less/dist/less-643/pattern.c N src/external/bsd/less/dist/less-643/ch.c N src/external/bsd/less/dist/less-643/configure N src/external/bsd/less/dist/less-643/screen.c N src/external/bsd/less/dist/less-643/wide.uni N src/external/bsd/less/dist/less-643/install.sh N src/external/bsd/less/dist/less-643/COPYING N src/external/bsd/less/dist/less-643/forwback.c N src/external/bsd/less/dist/less-643/defines.o2 N src/external/bsd/less/dist/less-643/lesskey_parse.c N src/external/bsd/less/dist/less-643/less.h N src/external/bsd/less/dist/less-643/pckeys.h N src/external/bsd/less/dist/less-643/prompt.c N src/external/bsd/less/dist/less-643/xbuf.h N src/external/bsd/less/dist/less-643/help.c N src/external/bsd/less/dist/less-643/lglob.h N src/external/bsd/less/dist/less-643/tags.c N src/external/bsd/less/dist/less-643/configure.ac N src/external/bsd/less/dist/less-643/regexp.c N src/external/bsd/less/dist/less-643/fmt.uni N src/external/bsd/less/dist/less-643/mkutable N src/external/bsd/less/dist/less-643/lesskey.h N src/external/bsd/less/dist/less-643/cvt.c N src/external/bsd/less/dist/less-643/Makefile.o9c N src/external/bsd/less/dist/less-643/LICENSE N src/external/bsd/less/dist/less-643/lessecho.1 N src/external/bsd/less/dist/less-643/ifile.c N src/external/bsd/less/dist/less-643/INSTALL N src/external/bsd/less/dist/less-643/NEWS N src/external/bsd/less/dist/less-643/brac.c N src/external/bsd/less/dist/less-643/defines.o9 N src/external/bsd/less/dist/less-643/position.c N src/external/bsd/less/dist/less-643/lsystem.c N src/external/bsd/less/dist/less-643/less.1 N src/external/bsd/less/dist/less-643/Makefile.o2e N src/external/bsd/less/dist/less-643/pattern.h N src/external/bsd/less/dist/less-643/defines.wn N src/external/bsd/less/dist/less-643/Makefile.dsg N src/external/bsd/less/dist/less-643/compose.uni N src/external/bsd/less/dist/less-643/opttbl.c N src/external/bsd/less/dist/less-643/version.c N src/external/bsd/less/dist/less-643/scrsize.c N src/external/bsd/less/dist/less-643/defines.h.in N src/external/bsd/less/dist/less-643/jump.c N src/external/bsd/less/dist/less-643/option.h N src/external/bsd/less/dist/less-643/Makefile.wnm N src/external/bsd/less/dist/less-643/lesskey.1 N src/external/bsd/less/dist/less-643/Makefile.wng N src/external/bsd/less/dist/less-643/mkhelp.py N src/external/bsd/less/dist/less-643/optfunc.c N src/external/bsd/less/dist/less-643/charset.h N src/external/bsd/less/dist/src/external/bsd/less/dist/defines.o9 N src/external/bsd/less/dist/src/external/bsd/less/dist/lesskey_parse.c N src/external/bsd/less/dist/src/external/bsd/less/dist/ifile.c N src/external/bsd/less/dist/src/external/bsd/less/dist/INSTALL N src/external/bsd/less/dist/src/external/bsd/less/dist/defines.wn N src/external/bsd/less/dist/src/external/bsd/less/dist/configure N
CVS commit: src/sys/dev/pci
Module Name:src Committed By: mrg Date: Thu Oct 5 21:43:02 UTC 2023 Modified Files: src/sys/dev/pci: if_rge.c Log Message: rge(4): check for all errors in rx buffer allocation should fix a crash seen by by Chavdar Ivanov reported on current-users. move the rx and tx list clean up into their own functions, and call the rx clean up function from the init function if something fails. this should fix a potential leak in this case, and generally frees up memory that won't be used without a successful init phase again. slight application of 'static', much more could be done. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/if_rge.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/dev/pci/if_rge.c diff -u src/sys/dev/pci/if_rge.c:1.25 src/sys/dev/pci/if_rge.c:1.26 --- src/sys/dev/pci/if_rge.c:1.25 Wed Dec 21 05:19:15 2022 +++ src/sys/dev/pci/if_rge.c Thu Oct 5 21:43:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_rge.c,v 1.25 2022/12/21 05:19:15 nonaka Exp $ */ +/* $NetBSD: if_rge.c,v 1.26 2023/10/05 21:43:02 mrg Exp $ */ /* $OpenBSD: if_rge.c,v 1.9 2020/12/12 11:48:53 jan Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.25 2022/12/21 05:19:15 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.26 2023/10/05 21:43:02 mrg Exp $"); #include @@ -107,8 +107,10 @@ void rge_ifmedia_sts(struct ifnet *, st int rge_allocmem(struct rge_softc *); int rge_newbuf(struct rge_softc *, int); void rge_discard_rxbuf(struct rge_softc *, int); -int rge_rx_list_init(struct rge_softc *); -void rge_tx_list_init(struct rge_softc *); +static int rge_rx_list_init(struct rge_softc *); +static void rge_rx_list_fini(struct rge_softc *); +static void rge_tx_list_init(struct rge_softc *); +static void rge_tx_list_fini(struct rge_softc *); int rge_rxeof(struct rge_softc *); int rge_txeof(struct rge_softc *); void rge_reset(struct rge_softc *); @@ -650,7 +652,7 @@ rge_init(struct ifnet *ifp) { struct rge_softc *sc = ifp->if_softc; uint32_t val; - int i; + unsigned i; rge_stop(ifp, 0); @@ -661,11 +663,12 @@ rge_init(struct ifnet *ifp) RGE_WRITE_2(sc, RGE_RXMAXSIZE, RGE_JUMBO_FRAMELEN); /* Initialize RX descriptors list. */ - if (rge_rx_list_init(sc) == ENOBUFS) { + int error = rge_rx_list_init(sc); + if (error != 0) { device_printf(sc->sc_dev, "init failed: no memory for RX buffers\n"); rge_stop(ifp, 1); - return (ENOBUFS); + return error; } /* Initialize TX descriptors. */ @@ -836,7 +839,6 @@ void rge_stop(struct ifnet *ifp, int disable) { struct rge_softc *sc = ifp->if_softc; - int i; if (disable) { callout_halt(>sc_timeout, NULL); @@ -870,25 +872,8 @@ rge_stop(struct ifnet *ifp, int disable) sc->rge_head = sc->rge_tail = NULL; } - /* Free the TX list buffers. */ - for (i = 0; i < RGE_TX_LIST_CNT; i++) { - if (sc->rge_ldata.rge_txq[i].txq_mbuf != NULL) { - bus_dmamap_unload(sc->sc_dmat, - sc->rge_ldata.rge_txq[i].txq_dmamap); - m_freem(sc->rge_ldata.rge_txq[i].txq_mbuf); - sc->rge_ldata.rge_txq[i].txq_mbuf = NULL; - } - } - - /* Free the RX list buffers. */ - for (i = 0; i < RGE_RX_LIST_CNT; i++) { - if (sc->rge_ldata.rge_rxq[i].rxq_mbuf != NULL) { - bus_dmamap_unload(sc->sc_dmat, - sc->rge_ldata.rge_rxq[i].rxq_dmamap); - m_freem(sc->rge_ldata.rge_rxq[i].rxq_mbuf); - sc->rge_ldata.rge_rxq[i].rxq_mbuf = NULL; - } - } + rge_tx_list_fini(sc); + rge_rx_list_fini(sc); } /* @@ -1172,17 +1157,19 @@ rge_discard_rxbuf(struct rge_softc *sc, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } -int +static int rge_rx_list_init(struct rge_softc *sc) { - int i; + unsigned i; memset(sc->rge_ldata.rge_rx_list, 0, RGE_RX_LIST_SZ); for (i = 0; i < RGE_RX_LIST_CNT; i++) { sc->rge_ldata.rge_rxq[i].rxq_mbuf = NULL; - if (rge_newbuf(sc, i) == ENOBUFS) + if (rge_newbuf(sc, i) != 0) { + rge_rx_list_fini(sc); return (ENOBUFS); + } } sc->rge_ldata.rge_rxq_prodidx = sc->rge_ldata.rge_rxq_considx = 0; @@ -1191,10 +1178,26 @@ rge_rx_list_init(struct rge_softc *sc) return (0); } -void +static void +rge_rx_list_fini(struct rge_softc *sc) +{ + unsigned i; + + /* Free the RX list buffers. */ + for (i = 0; i < RGE_RX_LIST_CNT; i++) { + if (sc->rge_ldata.rge_rxq[i].rxq_mbuf != NULL) { + bus_dmamap_unload(sc->sc_dmat, + sc->rge_ldata.rge_rxq[i].rxq_dmamap); + m_freem(sc->rge_ldata.rge_rxq[i].rxq_mbuf); + sc->rge_ldata.rge_rxq[i].rxq_mbuf = NULL; + } + } +} + +static void rge_tx_list_init(struct rge_softc *sc) { - int i; + unsigned i; memset(sc->rge_ldata.rge_tx_list, 0, RGE_TX_LIST_SZ); @@ -1208,6 +1211,22 @@ rge_tx_list_init(struct rge_softc *sc) sc->rge_ldata.rge_txq_prodidx = sc->rge_ldata.rge_txq_considx = 0; } +static void +rge_tx_list_fini(struct rge_softc *sc) +{ + unsigned i; + + /* Free the TX list
CVS commit: src/sys/dev/pci
Module Name:src Committed By: mrg Date: Thu Oct 5 21:43:02 UTC 2023 Modified Files: src/sys/dev/pci: if_rge.c Log Message: rge(4): check for all errors in rx buffer allocation should fix a crash seen by by Chavdar Ivanov reported on current-users. move the rx and tx list clean up into their own functions, and call the rx clean up function from the init function if something fails. this should fix a potential leak in this case, and generally frees up memory that won't be used without a successful init phase again. slight application of 'static', much more could be done. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/if_rge.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Thu Oct 5 21:41:00 UTC 2023 Modified Files: src/sys/dev/pci: mfii.c Log Message: provide a separate pointer that points to the drive sensors (Edgar Fuss) To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/mfii.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Thu Oct 5 21:41:00 UTC 2023 Modified Files: src/sys/dev/pci: mfii.c Log Message: provide a separate pointer that points to the drive sensors (Edgar Fuss) To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/mfii.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/dev/pci/mfii.c diff -u src/sys/dev/pci/mfii.c:1.30 src/sys/dev/pci/mfii.c:1.31 --- src/sys/dev/pci/mfii.c:1.30 Sat Sep 23 09:01:16 2023 +++ src/sys/dev/pci/mfii.c Thu Oct 5 17:41:00 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: mfii.c,v 1.30 2023/09/23 13:01:16 christos Exp $ */ +/* $NetBSD: mfii.c,v 1.31 2023/10/05 21:41:00 christos Exp $ */ /* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.30 2023/09/23 13:01:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.31 2023/10/05 21:41:00 christos Exp $"); #include "bio.h" @@ -375,6 +375,7 @@ struct mfii_softc { /* sensors */ struct sysmon_envsys *sc_sme; envsys_data_t *sc_sensors; + envsys_data_t *sc_ld_sensors; bool sc_bbuok; device_t sc_child; @@ -1429,7 +1430,7 @@ static void mfii_aen_ld_update(struct mfii_softc *sc) { union mfi_mbox mbox; - int i, j, target, old, nld; + int i, target, old, nld; int newlds[MFII_MAX_LD_EXT]; memset(, 0, sizeof(mbox)); @@ -1466,9 +1467,8 @@ mfii_aen_ld_update(struct mfii_softc *sc // XXX scsi_probe_target(sc->sc_scsibus, i); - j = i + MFI_BBU_SENSORS; - mfii_init_ld_sensor(sc, >sc_sensors[j], i); - mfii_attach_sensor(sc, >sc_sensors[j]); + mfii_init_ld_sensor(sc, >sc_ld_sensors[i], i); + mfii_attach_sensor(sc, >sc_ld_sensors[i]); } else if (nld == -1 && old != -1) { printf("%s: logical drive %d removed (target %d)\n", DEVNAME(sc), i, old); @@ -1476,7 +1476,7 @@ mfii_aen_ld_update(struct mfii_softc *sc scsipi_target_detach(>sc_chan, i, 0, DETACH_FORCE); sysmon_envsys_sensor_detach(sc->sc_sme, - >sc_sensors[i + MFI_BBU_SENSORS]); + >sc_ld_sensors[i]); } } @@ -3936,7 +3936,7 @@ mfii_attach_sensor(struct mfii_softc *sc static int mfii_create_sensors(struct mfii_softc *sc) { - int i, j, rv; + int i, rv; const int nsensors = MFI_BBU_SENSORS + MFII_MAX_LD_EXT; sc->sc_sme = sysmon_envsys_create(); @@ -3956,6 +3956,7 @@ mfii_create_sensors(struct mfii_softc *s sc->sc_sensors[3].units = ENVSYS_STEMP; sc->sc_sensors[3].state = ENVSYS_SINVALID; sc->sc_sensors[3].value_cur = 0; + sc->sc_ld_sensors = sc->sc_sensors + MFI_BBU_SENSORS; if (ISSET(le32toh(sc->sc_info.mci_hw_present), MFI_INFO_HW_BBU)) { sc->sc_bbuok = true; @@ -3974,9 +3975,8 @@ mfii_create_sensors(struct mfii_softc *s } for (i = 0; i < sc->sc_ld_list.mll_no_ld; i++) { - j = i + MFI_BBU_SENSORS; - mfii_init_ld_sensor(sc, >sc_sensors[j], i); - mfii_attach_sensor(sc, >sc_sensors[j]); + mfii_init_ld_sensor(sc, >sc_ld_sensors[i], i); + mfii_attach_sensor(sc, >sc_ld_sensors[i]); } sc->sc_sme->sme_name = DEVNAME(sc);
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Thu Oct 5 20:33:31 UTC 2023 Modified Files: src/bin/sh: miscbltin.c Log Message: If the read builtin is told to read into IFS, we must avoid doing that until all current uses of IFS are complete (as we have IFS's value cached in ifs - if IFS alters, ifs might point anywhere). Handle this by deferring assignments to IFS until everything is done. This makes us appear to comply with the (currently) proposed requirement for read by POSIX that field splitting complete before vars are assigned. (Other shells, like dash, ksh93, yash, bosh behave like this) That might end up being unspecified though, as other shells (bosh, mksh) assign each field to its var as it is delimited (though bosh appears to have bugs). If we wanted to go that route, the issue here could have been handled by re-doing the init of ifs after every setvar() that is performed here (except the last, after which it is no longer needed). XXX pullup -10 To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/bin/sh/miscbltin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Thu Oct 5 20:33:31 UTC 2023 Modified Files: src/bin/sh: miscbltin.c Log Message: If the read builtin is told to read into IFS, we must avoid doing that until all current uses of IFS are complete (as we have IFS's value cached in ifs - if IFS alters, ifs might point anywhere). Handle this by deferring assignments to IFS until everything is done. This makes us appear to comply with the (currently) proposed requirement for read by POSIX that field splitting complete before vars are assigned. (Other shells, like dash, ksh93, yash, bosh behave like this) That might end up being unspecified though, as other shells (bosh, mksh) assign each field to its var as it is delimited (though bosh appears to have bugs). If we wanted to go that route, the issue here could have been handled by re-doing the init of ifs after every setvar() that is performed here (except the last, after which it is no longer needed). XXX pullup -10 To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/bin/sh/miscbltin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/miscbltin.c diff -u src/bin/sh/miscbltin.c:1.53 src/bin/sh/miscbltin.c:1.54 --- src/bin/sh/miscbltin.c:1.53 Sun Dec 11 08:23:10 2022 +++ src/bin/sh/miscbltin.c Thu Oct 5 20:33:31 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: miscbltin.c,v 1.53 2022/12/11 08:23:10 kre Exp $ */ +/* $NetBSD: miscbltin.c,v 1.54 2023/10/05 20:33:31 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: miscbltin.c,v 1.53 2022/12/11 08:23:10 kre Exp $"); +__RCSID("$NetBSD: miscbltin.c,v 1.54 2023/10/05 20:33:31 kre Exp $"); #endif #endif /* not lint */ @@ -102,6 +102,8 @@ readcmd(int argc, char **argv) int is_ifs; int saveall = 0; ptrdiff_t wordlen = 0; + char *newifs = NULL; + struct stackmark mk; end = '\n';/* record delimiter */ rflag = 0; @@ -132,6 +134,7 @@ readcmd(int argc, char **argv) if ((ifs = bltinlookup("IFS", 1)) == NULL) ifs = " \t\n"; + setstackmark(); status = 0; startword = 2; STARTSTACKSTR(p); @@ -198,8 +201,22 @@ readcmd(int argc, char **argv) continue; } - STACKSTRNUL(p); - setvar(*ap, stackblock(), 0); + if (equal(*ap, "IFS")) { + /* + * we must not alter the value of IFS, as our + * local "ifs" var is (perhaps) pointing at it, + * at best we would be using data after free() + * the next time we reference ifs - but that mem + * may have been reused for something different. + * + * note that this might occur several times + */ + STPUTC('\0', p); + newifs = grabstackstr(p); + } else { + STACKSTRNUL(p); + setvar(*ap, stackblock(), 0); + } ap++; STARTSTACKSTR(p); wordlen = 0; @@ -217,11 +234,25 @@ readcmd(int argc, char **argv) /* Don't remove non-whitespace unless it was naked */ break; } + + /* + * If IFS was one of the variables named, we can finally set it now + * (no further references to ifs will be made) + */ + if (newifs != NULL) + setvar("IFS", newifs, 0); + + /* + * Now we can assign to the final variable (which might + * also be IFS, hence the ordering here) + */ setvar(*ap, stackblock(), 0); /* Set any remaining args to "" */ while (*++ap != NULL) setvar(*ap, nullstr, 0); + + popstackmark(); return status; }
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Thu Oct 5 19:44:26 UTC 2023 Modified Files: src/sys/kern: sys_pipe.c Log Message: Update comments to match reality To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/sys/kern/sys_pipe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Thu Oct 5 19:44:26 UTC 2023 Modified Files: src/sys/kern: sys_pipe.c Log Message: Update comments to match reality To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/sys/kern/sys_pipe.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/kern/sys_pipe.c diff -u src/sys/kern/sys_pipe.c:1.163 src/sys/kern/sys_pipe.c:1.164 --- src/sys/kern/sys_pipe.c:1.163 Wed Oct 4 22:41:56 2023 +++ src/sys/kern/sys_pipe.c Thu Oct 5 19:44:26 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_pipe.c,v 1.163 2023/10/04 22:41:56 ad Exp $ */ +/* $NetBSD: sys_pipe.c,v 1.164 2023/10/05 19:44:26 ad Exp $ */ /*- * Copyright (c) 2003, 2007, 2008, 2009, 2023 The NetBSD Foundation, Inc. @@ -52,23 +52,10 @@ * This file contains a high-performance replacement for the socket-based * pipes scheme originally used. It does not support all features of * sockets, but does do everything that pipes normally do. - * - * This code has two modes of operation, a small write mode and a large - * write mode. The small write mode acts like conventional pipes with - * a kernel buffer. If the buffer is less than PIPE_MINDIRECT, then the - * "normal" pipe buffering is done. If the buffer is between PIPE_MINDIRECT - * and PIPE_SIZE in size it is mapped read-only into the kernel address space - * using the UVM page loan facility from where the receiving process can copy - * the data directly from the pages in the sending process. - * - * The constant PIPE_MINDIRECT is chosen to make sure that buffering will - * happen for small transfers so that the system will not spend all of - * its time context switching. PIPE_SIZE is constrained by the - * amount of kernel virtual memory. */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.163 2023/10/04 22:41:56 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.164 2023/10/05 19:44:26 ad Exp $"); #include #include @@ -746,8 +733,6 @@ pipe_write(file_t *fp, off_t *offset, st /* * We have something to offer, wake up select/poll. - * wmap->cnt is always 0 in this point (direct write - * is only done synchronously), so check only wpipe->pipe_buffer.cnt */ if (bp->cnt) pipeselwakeup(wpipe, wpipe, POLL_IN);
CVS commit: src/sys
Module Name:src Committed By: ad Date: Thu Oct 5 19:41:07 UTC 2023 Modified Files: src/sys/arch/aarch64/aarch64: aarch32_syscall.c syscall.c src/sys/arch/alpha/alpha: linux_syscall.c syscall.c trap.c src/sys/arch/amd64/amd64: linux32_syscall.c linux_syscall.c netbsd32_syscall.c trap.c src/sys/arch/amiga/amiga: trap.c src/sys/arch/arm/arm: syscall.c undefined.c src/sys/arch/arm/arm32: fault.c src/sys/arch/atari/atari: trap.c src/sys/arch/cesfic/cesfic: trap.c src/sys/arch/hp300/hp300: trap.c src/sys/arch/hppa/hppa: trap.c src/sys/arch/i386/i386: linux_syscall.c trap.c src/sys/arch/ia64/ia64: trap.c src/sys/arch/luna68k/luna68k: trap.c src/sys/arch/m68k/m68k: m68k_syscall.c src/sys/arch/mac68k/mac68k: trap.c src/sys/arch/mips/mips: syscall.c trap.c src/sys/arch/mvme68k/mvme68k: trap.c src/sys/arch/news68k/news68k: trap.c src/sys/arch/next68k/next68k: trap.c src/sys/arch/powerpc/ibm4xx: trap.c src/sys/arch/powerpc/powerpc: syscall.c trap.c src/sys/arch/riscv/riscv: syscall.c src/sys/arch/sh3/sh3: exception.c src/sys/arch/sparc/sparc: syscall.c trap.c src/sys/arch/sparc64/sparc64: syscall.c trap.c src/sys/arch/sun2/sun2: trap.c src/sys/arch/sun3/sun3: trap.c src/sys/arch/usermode/usermode: syscall.c src/sys/arch/vax/vax: syscall.c trap.c src/sys/arch/x68k/x68k: trap.c src/sys/arch/x86/x86: syscall.c src/sys/compat/freebsd: freebsd_syscall.c src/sys/kern: kern_lwp.c kern_proc.c src/sys/rump/librump/rumpkern: lwproc.c rump.c scheduler.c src/sys/sys: lwp.h Log Message: Arrange to update cached LWP credentials in userret() rather than during syscall/trap entry, eliminating a test+branch on every syscall/trap. This wasn't possible in the 3.99.x timeframe when l->l_cred came about because there wasn't a reliable/timely way to force an ONPROC LWP running on a remote CPU into the kernel (which is just about the only new thing in this scheme). To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/aarch32_syscall.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/aarch64/syscall.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/alpha/alpha/linux_syscall.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/alpha/alpha/syscall.c cvs rdiff -u -r1.138 -r1.139 src/sys/arch/alpha/alpha/trap.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amd64/amd64/linux32_syscall.c \ src/sys/arch/amd64/amd64/linux_syscall.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amd64/amd64/netbsd32_syscall.c cvs rdiff -u -r1.128 -r1.129 src/sys/arch/amd64/amd64/trap.c cvs rdiff -u -r1.139 -r1.140 src/sys/arch/amiga/amiga/trap.c cvs rdiff -u -r1.68 -r1.69 src/sys/arch/arm/arm/syscall.c cvs rdiff -u -r1.74 -r1.75 src/sys/arch/arm/arm/undefined.c cvs rdiff -u -r1.116 -r1.117 src/sys/arch/arm/arm32/fault.c cvs rdiff -u -r1.118 -r1.119 src/sys/arch/atari/atari/trap.c cvs rdiff -u -r1.61 -r1.62 src/sys/arch/cesfic/cesfic/trap.c cvs rdiff -u -r1.157 -r1.158 src/sys/arch/hp300/hp300/trap.c cvs rdiff -u -r1.122 -r1.123 src/sys/arch/hppa/hppa/trap.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/i386/i386/linux_syscall.c cvs rdiff -u -r1.308 -r1.309 src/sys/arch/i386/i386/trap.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/ia64/ia64/trap.c cvs rdiff -u -r1.77 -r1.78 src/sys/arch/luna68k/luna68k/trap.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/m68k/m68k/m68k_syscall.c cvs rdiff -u -r1.152 -r1.153 src/sys/arch/mac68k/mac68k/trap.c cvs rdiff -u -r1.50 -r1.51 src/sys/arch/mips/mips/syscall.c cvs rdiff -u -r1.263 -r1.264 src/sys/arch/mips/mips/trap.c cvs rdiff -u -r1.113 -r1.114 src/sys/arch/mvme68k/mvme68k/trap.c cvs rdiff -u -r1.75 -r1.76 src/sys/arch/news68k/news68k/trap.c cvs rdiff -u -r1.93 -r1.94 src/sys/arch/next68k/next68k/trap.c cvs rdiff -u -r1.101 -r1.102 src/sys/arch/powerpc/ibm4xx/trap.c cvs rdiff -u -r1.57 -r1.58 src/sys/arch/powerpc/powerpc/syscall.c cvs rdiff -u -r1.163 -r1.164 src/sys/arch/powerpc/powerpc/trap.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/riscv/syscall.c cvs rdiff -u -r1.74 -r1.75 src/sys/arch/sh3/sh3/exception.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sparc/sparc/syscall.c cvs rdiff -u -r1.200 -r1.201 src/sys/arch/sparc/sparc/trap.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/sparc64/sparc64/syscall.c cvs rdiff -u -r1.194 -r1.195 src/sys/arch/sparc64/sparc64/trap.c cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sun2/sun2/trap.c cvs rdiff -u -r1.147 -r1.148 src/sys/arch/sun3/sun3/trap.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/usermode/usermode/syscall.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/vax/vax/syscall.c cvs rdiff -u -r1.137 -r1.138 src/sys/arch/vax/vax/trap.c cvs rdiff -u -r1.111 -r1.112 src/sys/arch/x68k/x68k/trap.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/x86/syscall.c cvs rdiff -u -r1.6 -r1.7
CVS commit: src/sys
Module Name:src Committed By: ad Date: Thu Oct 5 19:41:07 UTC 2023 Modified Files: src/sys/arch/aarch64/aarch64: aarch32_syscall.c syscall.c src/sys/arch/alpha/alpha: linux_syscall.c syscall.c trap.c src/sys/arch/amd64/amd64: linux32_syscall.c linux_syscall.c netbsd32_syscall.c trap.c src/sys/arch/amiga/amiga: trap.c src/sys/arch/arm/arm: syscall.c undefined.c src/sys/arch/arm/arm32: fault.c src/sys/arch/atari/atari: trap.c src/sys/arch/cesfic/cesfic: trap.c src/sys/arch/hp300/hp300: trap.c src/sys/arch/hppa/hppa: trap.c src/sys/arch/i386/i386: linux_syscall.c trap.c src/sys/arch/ia64/ia64: trap.c src/sys/arch/luna68k/luna68k: trap.c src/sys/arch/m68k/m68k: m68k_syscall.c src/sys/arch/mac68k/mac68k: trap.c src/sys/arch/mips/mips: syscall.c trap.c src/sys/arch/mvme68k/mvme68k: trap.c src/sys/arch/news68k/news68k: trap.c src/sys/arch/next68k/next68k: trap.c src/sys/arch/powerpc/ibm4xx: trap.c src/sys/arch/powerpc/powerpc: syscall.c trap.c src/sys/arch/riscv/riscv: syscall.c src/sys/arch/sh3/sh3: exception.c src/sys/arch/sparc/sparc: syscall.c trap.c src/sys/arch/sparc64/sparc64: syscall.c trap.c src/sys/arch/sun2/sun2: trap.c src/sys/arch/sun3/sun3: trap.c src/sys/arch/usermode/usermode: syscall.c src/sys/arch/vax/vax: syscall.c trap.c src/sys/arch/x68k/x68k: trap.c src/sys/arch/x86/x86: syscall.c src/sys/compat/freebsd: freebsd_syscall.c src/sys/kern: kern_lwp.c kern_proc.c src/sys/rump/librump/rumpkern: lwproc.c rump.c scheduler.c src/sys/sys: lwp.h Log Message: Arrange to update cached LWP credentials in userret() rather than during syscall/trap entry, eliminating a test+branch on every syscall/trap. This wasn't possible in the 3.99.x timeframe when l->l_cred came about because there wasn't a reliable/timely way to force an ONPROC LWP running on a remote CPU into the kernel (which is just about the only new thing in this scheme). To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/aarch32_syscall.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/aarch64/syscall.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/alpha/alpha/linux_syscall.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/alpha/alpha/syscall.c cvs rdiff -u -r1.138 -r1.139 src/sys/arch/alpha/alpha/trap.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amd64/amd64/linux32_syscall.c \ src/sys/arch/amd64/amd64/linux_syscall.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amd64/amd64/netbsd32_syscall.c cvs rdiff -u -r1.128 -r1.129 src/sys/arch/amd64/amd64/trap.c cvs rdiff -u -r1.139 -r1.140 src/sys/arch/amiga/amiga/trap.c cvs rdiff -u -r1.68 -r1.69 src/sys/arch/arm/arm/syscall.c cvs rdiff -u -r1.74 -r1.75 src/sys/arch/arm/arm/undefined.c cvs rdiff -u -r1.116 -r1.117 src/sys/arch/arm/arm32/fault.c cvs rdiff -u -r1.118 -r1.119 src/sys/arch/atari/atari/trap.c cvs rdiff -u -r1.61 -r1.62 src/sys/arch/cesfic/cesfic/trap.c cvs rdiff -u -r1.157 -r1.158 src/sys/arch/hp300/hp300/trap.c cvs rdiff -u -r1.122 -r1.123 src/sys/arch/hppa/hppa/trap.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/i386/i386/linux_syscall.c cvs rdiff -u -r1.308 -r1.309 src/sys/arch/i386/i386/trap.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/ia64/ia64/trap.c cvs rdiff -u -r1.77 -r1.78 src/sys/arch/luna68k/luna68k/trap.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/m68k/m68k/m68k_syscall.c cvs rdiff -u -r1.152 -r1.153 src/sys/arch/mac68k/mac68k/trap.c cvs rdiff -u -r1.50 -r1.51 src/sys/arch/mips/mips/syscall.c cvs rdiff -u -r1.263 -r1.264 src/sys/arch/mips/mips/trap.c cvs rdiff -u -r1.113 -r1.114 src/sys/arch/mvme68k/mvme68k/trap.c cvs rdiff -u -r1.75 -r1.76 src/sys/arch/news68k/news68k/trap.c cvs rdiff -u -r1.93 -r1.94 src/sys/arch/next68k/next68k/trap.c cvs rdiff -u -r1.101 -r1.102 src/sys/arch/powerpc/ibm4xx/trap.c cvs rdiff -u -r1.57 -r1.58 src/sys/arch/powerpc/powerpc/syscall.c cvs rdiff -u -r1.163 -r1.164 src/sys/arch/powerpc/powerpc/trap.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/riscv/syscall.c cvs rdiff -u -r1.74 -r1.75 src/sys/arch/sh3/sh3/exception.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sparc/sparc/syscall.c cvs rdiff -u -r1.200 -r1.201 src/sys/arch/sparc/sparc/trap.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/sparc64/sparc64/syscall.c cvs rdiff -u -r1.194 -r1.195 src/sys/arch/sparc64/sparc64/trap.c cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sun2/sun2/trap.c cvs rdiff -u -r1.147 -r1.148 src/sys/arch/sun3/sun3/trap.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/usermode/usermode/syscall.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/vax/vax/syscall.c cvs rdiff -u -r1.137 -r1.138 src/sys/arch/vax/vax/trap.c cvs rdiff -u -r1.111 -r1.112 src/sys/arch/x68k/x68k/trap.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/x86/syscall.c cvs rdiff -u -r1.6 -r1.7
Re: CVS commit: src/sys
On Thu, Oct 05, 2023 at 12:15:23PM +0200, Martin Husemann wrote: > On Thu, Oct 05, 2023 at 09:59:49AM +, Andrew Doran wrote: > > Yes that makes sense and is what I plan to do after work today if nobody > > beats me to it. MULTIPROCESSOR is long overdue removal from the MI kernel, > > IMO. > > Hey, this is a tiny landisk kernel, do not bloat it :-) And I thought I had more of a reputation for tearing things out of the OS.. > Unfortunately it is not trivial to make that zeroing happen in the > macros that we have now (gcc is pretty picky with warnings, would love > to have c++ templates here). I rearranged things so it shouldn't be necessary.. At least a pmax kernel builds for me now. Sorry about the interruption. Andrew
CVS commit: src/sys
Module Name:src Committed By: ad Date: Thu Oct 5 19:28:30 UTC 2023 Modified Files: src/sys/kern: kern_sleepq.c kern_synch.c src/sys/rump/librump/rumpkern: sleepq.c Log Message: Resolve !MULTIPROCESSOR build problem with the nasty kernel lock macros. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/kern/kern_sleepq.c cvs rdiff -u -r1.362 -r1.363 src/sys/kern/kern_synch.c cvs rdiff -u -r1.25 -r1.26 src/sys/rump/librump/rumpkern/sleepq.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/kern/kern_sleepq.c diff -u src/sys/kern/kern_sleepq.c:1.77 src/sys/kern/kern_sleepq.c:1.78 --- src/sys/kern/kern_sleepq.c:1.77 Wed Oct 4 20:29:18 2023 +++ src/sys/kern/kern_sleepq.c Thu Oct 5 19:28:30 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sleepq.c,v 1.77 2023/10/04 20:29:18 ad Exp $ */ +/* $NetBSD: kern_sleepq.c,v 1.78 2023/10/05 19:28:30 ad Exp $ */ /*- * Copyright (c) 2006, 2007, 2008, 2009, 2019, 2020, 2023 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.77 2023/10/04 20:29:18 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.78 2023/10/05 19:28:30 ad Exp $"); #include #include @@ -222,13 +222,19 @@ sleepq_enter(sleepq_t *sq, lwp_t *l, kmu { int nlocks; + KASSERT((sq != NULL) == (mp != NULL)); + /* * Acquire the per-LWP mutex and lend it our sleep queue lock. * Once interlocked, we can release the kernel lock. */ lwp_lock(l); - lwp_unlock_to(l, mp); - KERNEL_UNLOCK_ALL(NULL, ); + if (mp != NULL) { + lwp_unlock_to(l, mp); + } + if (__predict_false((nlocks = l->l_blcnt) != 0)) { + KERNEL_UNLOCK_ALL(NULL, NULL); + } return nlocks; } Index: src/sys/kern/kern_synch.c diff -u src/sys/kern/kern_synch.c:1.362 src/sys/kern/kern_synch.c:1.363 --- src/sys/kern/kern_synch.c:1.362 Wed Oct 4 20:29:18 2023 +++ src/sys/kern/kern_synch.c Thu Oct 5 19:28:30 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_synch.c,v 1.362 2023/10/04 20:29:18 ad Exp $ */ +/* $NetBSD: kern_synch.c,v 1.363 2023/10/05 19:28:30 ad Exp $ */ /*- * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009, 2019, 2020, 2023 @@ -69,7 +69,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.362 2023/10/04 20:29:18 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.363 2023/10/05 19:28:30 ad Exp $"); #include "opt_kstack.h" #include "opt_ddb.h" @@ -251,8 +251,7 @@ kpause(const char *wmesg, bool intr, int if (mtx != NULL) mutex_exit(mtx); - lwp_lock(l); - KERNEL_UNLOCK_ALL(NULL, ); + nlocks = sleepq_enter(NULL, l, NULL); sleepq_enqueue(NULL, l, wmesg, _syncobj, intr); error = sleepq_block(timo, intr, _syncobj, nlocks); if (mtx != NULL) Index: src/sys/rump/librump/rumpkern/sleepq.c diff -u src/sys/rump/librump/rumpkern/sleepq.c:1.25 src/sys/rump/librump/rumpkern/sleepq.c:1.26 --- src/sys/rump/librump/rumpkern/sleepq.c:1.25 Wed Oct 4 20:29:18 2023 +++ src/sys/rump/librump/rumpkern/sleepq.c Thu Oct 5 19:28:30 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sleepq.c,v 1.25 2023/10/04 20:29:18 ad Exp $ */ +/* $NetBSD: sleepq.c,v 1.26 2023/10/05 19:28:30 ad Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.25 2023/10/04 20:29:18 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.26 2023/10/05 19:28:30 ad Exp $"); #include #include @@ -62,8 +62,12 @@ sleepq_enter(sleepq_t *sq, lwp_t *l, kmu int nlocks; lwp_lock(l); - lwp_unlock_to(l, mp); - KERNEL_UNLOCK_ALL(NULL, ); + if (mp != NULL) { + lwp_unlock_to(l, mp); + } + if ((nlocks = l->l_blcnt) != 0) { + KERNEL_UNLOCK_ALL(NULL, NULL); + } return nlocks; }
CVS commit: src/sys
Module Name:src Committed By: ad Date: Thu Oct 5 19:28:30 UTC 2023 Modified Files: src/sys/kern: kern_sleepq.c kern_synch.c src/sys/rump/librump/rumpkern: sleepq.c Log Message: Resolve !MULTIPROCESSOR build problem with the nasty kernel lock macros. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/kern/kern_sleepq.c cvs rdiff -u -r1.362 -r1.363 src/sys/kern/kern_synch.c cvs rdiff -u -r1.25 -r1.26 src/sys/rump/librump/rumpkern/sleepq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Thu Oct 5 19:10:18 UTC 2023 Modified Files: src/sys/kern: kern_idle.c Log Message: The idle LWP doesn't need to care about kernel_lock. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/kern/kern_idle.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/kern/kern_idle.c diff -u src/sys/kern/kern_idle.c:1.34 src/sys/kern/kern_idle.c:1.35 --- src/sys/kern/kern_idle.c:1.34 Sat Sep 5 16:30:12 2020 +++ src/sys/kern/kern_idle.c Thu Oct 5 19:10:18 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_idle.c,v 1.34 2020/09/05 16:30:12 riastradh Exp $ */ +/* $NetBSD: kern_idle.c,v 1.35 2023/10/05 19:10:18 ad Exp $ */ /*- * Copyright (c)2002, 2006, 2007 YAMAMOTO Takashi, @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: kern_idle.c,v 1.34 2020/09/05 16:30:12 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_idle.c,v 1.35 2023/10/05 19:10:18 ad Exp $"); #include #include @@ -48,6 +48,8 @@ idle_loop(void *dummy) struct schedstate_percpu *spc; struct lwp *l = curlwp; + KASSERT(l->l_blcnt == 0); + lwp_lock(l); spc = >ci_schedstate; KASSERT(lwp_locked(l, spc->spc_lwplock)); @@ -65,7 +67,6 @@ idle_loop(void *dummy) * in which case we took an odd route to get here. */ spl0(); - KERNEL_UNLOCK_ALL(l, NULL); for (;;) { LOCKDEBUG_BARRIER(NULL, 0);
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Thu Oct 5 19:10:18 UTC 2023 Modified Files: src/sys/kern: kern_idle.c Log Message: The idle LWP doesn't need to care about kernel_lock. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/kern/kern_idle.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Thu Oct 5 19:06:30 UTC 2023 Modified Files: src/sys/kern: kern_sig.c Log Message: kern_sig.c: remove problematic kernel_lock handling which is unneeded in 2023. To generate a diff of this commit: cvs rdiff -u -r1.407 -r1.408 src/sys/kern/kern_sig.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/kern/kern_sig.c diff -u src/sys/kern/kern_sig.c:1.407 src/sys/kern/kern_sig.c:1.408 --- src/sys/kern/kern_sig.c:1.407 Wed Oct 4 20:42:38 2023 +++ src/sys/kern/kern_sig.c Thu Oct 5 19:06:30 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig.c,v 1.407 2023/10/04 20:42:38 ad Exp $ */ +/* $NetBSD: kern_sig.c,v 1.408 2023/10/05 19:06:30 ad Exp $ */ /*- * Copyright (c) 2006, 2007, 2008, 2019, 2023 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.407 2023/10/04 20:42:38 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.408 2023/10/05 19:06:30 ad Exp $"); #include "opt_execfmt.h" #include "opt_ptrace.h" @@ -1776,7 +1776,6 @@ static void sigswitch_unlock_and_switch_away(struct lwp *l) { struct proc *p; - int nlocks; p = l->l_proc; @@ -1785,9 +1784,8 @@ sigswitch_unlock_and_switch_away(struct KASSERT(l->l_stat == LSONPROC); KASSERT(p->p_nrlwps > 0); + KASSERT(l->l_blcnt == 0); - /* XXXAD in 2023 kernel_lock should not be held here, audit it... */ - KERNEL_UNLOCK_ALL(l, ); if (p->p_stat == SSTOP || (p->p_sflag & PS_STOPPING) != 0) { p->p_nrlwps--; lwp_lock(l); @@ -1800,7 +1798,6 @@ sigswitch_unlock_and_switch_away(struct lwp_lock(l); spc_lock(l->l_cpu); mi_switch(l); - KERNEL_LOCK(nlocks, l); } /* @@ -2255,7 +2252,7 @@ sigexit(struct lwp *l, int signo) p = l->l_proc; KASSERT(mutex_owned(p->p_lock)); - KERNEL_UNLOCK_ALL(l, NULL); + KASSERT(l->l_blcnt == 0); /* * Don't permit coredump() multiple times in the same process.
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Thu Oct 5 19:06:30 UTC 2023 Modified Files: src/sys/kern: kern_sig.c Log Message: kern_sig.c: remove problematic kernel_lock handling which is unneeded in 2023. To generate a diff of this commit: cvs rdiff -u -r1.407 -r1.408 src/sys/kern/kern_sig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Oct 5 13:05:18 UTC 2023 Modified Files: src/sys/kern: kern_lwp.c Log Message: lwp_pctr(9): Make this a little more robust. No substantive change to machine code on aarch64. (Instructions and registers got reordered a little but not in a way that matters.) To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/sys/kern/kern_lwp.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/kern/kern_lwp.c diff -u src/sys/kern/kern_lwp.c:1.263 src/sys/kern/kern_lwp.c:1.264 --- src/sys/kern/kern_lwp.c:1.263 Wed Oct 4 22:17:09 2023 +++ src/sys/kern/kern_lwp.c Thu Oct 5 13:05:18 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lwp.c,v 1.263 2023/10/04 22:17:09 ad Exp $ */ +/* $NetBSD: kern_lwp.c,v 1.264 2023/10/05 13:05:18 riastradh Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020, 2023 @@ -217,7 +217,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.263 2023/10/04 22:17:09 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.264 2023/10/05 13:05:18 riastradh Exp $"); #include "opt_ddb.h" #include "opt_lockdebug.h" @@ -2144,12 +2144,23 @@ lwp_ctl_exit(void) * Return the current LWP's "preemption counter". Used to detect * preemption across operations that can tolerate preemption without * crashing, but which may generate incorrect results if preempted. + * + * We do arithmetic in unsigned long to avoid undefined behaviour in + * the event of arithmetic overflow on LP32, and issue __insn_barrier() + * on both sides so this can safely be used to detect changes to the + * preemption counter in loops around other memory accesses even in the + * event of whole-program optimization (e.g., gcc -flto). */ long lwp_pctr(void) { + unsigned long pctr; - return curlwp->l_ru.ru_nvcsw + curlwp->l_ru.ru_nivcsw; + __insn_barrier(); + pctr = curlwp->l_ru.ru_nvcsw; + pctr += curlwp->l_ru.ru_nivcsw; + __insn_barrier(); + return pctr; } /*
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Oct 5 13:05:18 UTC 2023 Modified Files: src/sys/kern: kern_lwp.c Log Message: lwp_pctr(9): Make this a little more robust. No substantive change to machine code on aarch64. (Instructions and registers got reordered a little but not in a way that matters.) To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/sys/kern/kern_lwp.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/arm/cortex
Module Name:src Committed By: riastradh Date: Thu Oct 5 12:30:59 UTC 2023 Modified Files: src/sys/arch/arm/cortex: gic.c Log Message: arm/gic: Check l_blcnt, not l_biglocks. l_biglocks is a now-defunct temporary storage used only when sleeping; l_blcnt is the number of kernel locks held by the lwp when not sleeping. Should fix arm builds. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/arm/cortex/gic.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/arm/cortex
Module Name:src Committed By: riastradh Date: Thu Oct 5 12:30:59 UTC 2023 Modified Files: src/sys/arch/arm/cortex: gic.c Log Message: arm/gic: Check l_blcnt, not l_biglocks. l_biglocks is a now-defunct temporary storage used only when sleeping; l_blcnt is the number of kernel locks held by the lwp when not sleeping. Should fix arm builds. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/arm/cortex/gic.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/arm/cortex/gic.c diff -u src/sys/arch/arm/cortex/gic.c:1.56 src/sys/arch/arm/cortex/gic.c:1.57 --- src/sys/arch/arm/cortex/gic.c:1.56 Sun Jun 26 11:14:36 2022 +++ src/sys/arch/arm/cortex/gic.c Thu Oct 5 12:30:59 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: gic.c,v 1.56 2022/06/26 11:14:36 jmcneill Exp $ */ +/* $NetBSD: gic.c,v 1.57 2023/10/05 12:30:59 riastradh Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,7 +34,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.56 2022/06/26 11:14:36 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.57 2023/10/05 12:30:59 riastradh Exp $"); #include #include @@ -320,7 +320,7 @@ armgic_irq_handler(void *tf) struct armgic_softc * const sc = _softc; const int old_ipl = ci->ci_cpl; const int old_mtx_count = ci->ci_mtx_count; - const int old_l_biglocks = ci->ci_curlwp->l_biglocks; + const int old_l_blcnt = ci->ci_curlwp->l_blcnt; #ifdef DEBUG size_t n = 0; #endif @@ -407,7 +407,7 @@ armgic_irq_handler(void *tf) pic_do_pending_ints(I32_bit, old_ipl, tf); KASSERTMSG(ci->ci_cpl == old_ipl, "ci_cpl %d old_ipl %d", ci->ci_cpl, old_ipl); KASSERT(old_mtx_count == ci->ci_mtx_count); - KASSERT(old_l_biglocks == ci->ci_curlwp->l_biglocks); + KASSERT(old_l_blcnt == ci->ci_curlwp->l_blcnt); } void
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Oct 5 12:05:59 UTC 2023 Modified Files: src/sys/kern: kern_cctr.c Log Message: kern_cctr.c: Fix broken indentation. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/kern/kern_cctr.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/kern/kern_cctr.c diff -u src/sys/kern/kern_cctr.c:1.13 src/sys/kern/kern_cctr.c:1.14 --- src/sys/kern/kern_cctr.c:1.13 Wed Oct 4 20:28:06 2023 +++ src/sys/kern/kern_cctr.c Thu Oct 5 12:05:59 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_cctr.c,v 1.13 2023/10/04 20:28:06 ad Exp $ */ +/* $NetBSD: kern_cctr.c,v 1.14 2023/10/05 12:05:59 riastradh Exp $ */ /*- * Copyright (c) 2020 Jason R. Thorpe @@ -75,7 +75,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_cctr.c,v 1.13 2023/10/04 20:28:06 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_cctr.c,v 1.14 2023/10/05 12:05:59 riastradh Exp $"); #include #include @@ -188,7 +188,7 @@ cc_get_timecount(struct timecounter *tc) long pctr; do { - pctr = lwp_pctr(); + pctr = lwp_pctr(); /* N.B. the delta is always 0 on the primary. */ rcc = cpu_counter32() - curcpu()->ci_cc.cc_delta; } while (pctr != lwp_pctr());
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Oct 5 12:05:59 UTC 2023 Modified Files: src/sys/kern: kern_cctr.c Log Message: kern_cctr.c: Fix broken indentation. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/kern/kern_cctr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys
On Thu, Oct 05, 2023 at 09:59:49AM +, Andrew Doran wrote: > Yes that makes sense and is what I plan to do after work today if nobody > beats me to it. MULTIPROCESSOR is long overdue removal from the MI kernel, > IMO. Hey, this is a tiny landisk kernel, do not bloat it :-) Unfortunately it is not trivial to make that zeroing happen in the macros that we have now (gcc is pretty picky with warnings, would love to have c++ templates here). Martin
Re: CVS commit: src/sys
Martin, On Thu, Oct 05, 2023 at 11:42:03AM +0200, Martin Husemann wrote: > On Thu, Oct 05, 2023 at 11:36:23AM +0200, Martin Husemann wrote: > > No, I was confused by the #ifdef maze - it breaks the build for > > non-MULTIPROCESSOR kernels only, and I am not actually sure what "use" > > gcc sees for the "nlocks" variable at all in that case. > > Scratch that too, I'll get coffee. > > Andrew, should we make the non-MULTIPROCESSOR variant of > > KERNEL_UNLOCK(all, lwp, ptr) > > set *(ptr) = 0 ? Yes that makes sense and is what I plan to do after work today if nobody beats me to it. MULTIPROCESSOR is long overdue removal from the MI kernel, IMO. Andrew
Re: CVS commit: src/sys
On Thu, Oct 05, 2023 at 11:36:23AM +0200, Martin Husemann wrote: > No, I was confused by the #ifdef maze - it breaks the build for > non-MULTIPROCESSOR kernels only, and I am not actually sure what "use" > gcc sees for the "nlocks" variable at all in that case. Scratch that too, I'll get coffee. Andrew, should we make the non-MULTIPROCESSOR variant of KERNEL_UNLOCK(all, lwp, ptr) set *(ptr) = 0 ? Martin
Re: CVS commit: src/sys
On Thu, Oct 05, 2023 at 11:28:49AM +0200, Martin Husemann wrote: > This breaks the build: > > ../../../../kern/kern_synch.c: In function 'kpause': > ../../../../kern/kern_synch.c:257:10: error: 'nlocks' may be used > uninitialized in this function [-Werror=maybe-uninitialized] > 257 | error = sleepq_block(timo, intr, _syncobj, nlocks); > | ^ > cc1: all warnings being treated as errors > > > and it looks like gcc is totally correct here: KERNEL_UNLOCK_ALL() > does not set nlocks but KERNEL_LOCK() later KASSERTS it is > 0. No, I was confused by the #ifdef maze - it breaks the build for non-MULTIPROCESSOR kernels only, and I am not actually sure what "use" gcc sees for the "nlocks" variable at all in that case. Martin
Re: CVS commit: src/sys
On Wed, Oct 04, 2023 at 08:29:18PM +, Andrew Doran wrote: > Module Name: src > Committed By: ad > Date: Wed Oct 4 20:29:18 UTC 2023 > > Modified Files: > src/sys/kern: kern_condvar.c kern_exec.c kern_exit.c kern_sig.c > kern_sleepq.c kern_synch.c kern_timeout.c kern_turnstile.c > sys_lwp.c sys_select.c > src/sys/rump/librump/rumpkern: lwproc.c sleepq.c > src/sys/sys: lwp.h sleepq.h > > Log Message: > Eliminate l->l_biglocks. Originally I think it had a use but these days a > local variable will do. This breaks the build: ../../../../kern/kern_synch.c: In function 'kpause': ../../../../kern/kern_synch.c:257:10: error: 'nlocks' may be used uninitialized in this function [-Werror=maybe-uninitialized] 257 | error = sleepq_block(timo, intr, _syncobj, nlocks); | ^ cc1: all warnings being treated as errors and it looks like gcc is totally correct here: KERNEL_UNLOCK_ALL() does not set nlocks but KERNEL_LOCK() later KASSERTS it is > 0. Martin
CVS commit: src/etc
Module Name:src Committed By: abs Date: Thu Oct 5 08:19:27 UTC 2023 Modified Files: src/etc/defaults: rc.conf src/etc/rc.d: npf Log Message: Add support to npf_rules to rc.conf - Allows overriding default from /etc/npf.conf - Indicate rules file used in output - Drop check for file presence in script - rely on npf exiting with error To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 src/etc/defaults/rc.conf cvs rdiff -u -r1.7 -r1.8 src/etc/rc.d/npf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: abs Date: Thu Oct 5 08:19:27 UTC 2023 Modified Files: src/etc/defaults: rc.conf src/etc/rc.d: npf Log Message: Add support to npf_rules to rc.conf - Allows overriding default from /etc/npf.conf - Indicate rules file used in output - Drop check for file presence in script - rely on npf exiting with error To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 src/etc/defaults/rc.conf cvs rdiff -u -r1.7 -r1.8 src/etc/rc.d/npf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/defaults/rc.conf diff -u src/etc/defaults/rc.conf:1.166 src/etc/defaults/rc.conf:1.167 --- src/etc/defaults/rc.conf:1.166 Wed Sep 27 01:27:32 2023 +++ src/etc/defaults/rc.conf Thu Oct 5 08:19:27 2023 @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.166 2023/09/27 01:27:32 riastradh Exp $ +# $NetBSD: rc.conf,v 1.167 2023/10/05 08:19:27 abs Exp $ # # /etc/defaults/rc.conf -- # default configuration of /etc/rc.conf @@ -181,7 +181,7 @@ securelevel="" # securelevel to set ifconfig_wait_dad_flags="-w 15 -W 5" mdnsd=NO -npf=NO +npf=NO npf_rules="/etc/npf.conf" npfd=NO npfd_flags="" ipfilter=NO ipfilter_flags="" # uses /etc/ipf.conf ipnat=NO # uses /etc/ipnat.conf Index: src/etc/rc.d/npf diff -u src/etc/rc.d/npf:1.7 src/etc/rc.d/npf:1.8 --- src/etc/rc.d/npf:1.7 Tue Sep 8 12:52:18 2020 +++ src/etc/rc.d/npf Thu Oct 5 08:19:27 2023 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: npf,v 1.7 2020/09/08 12:52:18 martin Exp $ +# $NetBSD: npf,v 1.8 2023/10/05 08:19:27 abs Exp $ # # Public Domain. # @@ -14,8 +14,6 @@ $_rc_subr_loaded . /etc/rc.subr name="npf" rcvar=$name -config="/etc/npf.conf" - start_cmd="npf_start" stop_cmd="npf_stop" @@ -23,19 +21,11 @@ reload_cmd="npf_reload" status_cmd="npf_status" extra_commands="reload status" -npf_cfg_check() -{ - if [ ! -f ${config} ]; then - warn "${config} is not readable; failed." - exit 1 - fi -} npf_start() { - echo "Enabling NPF." - npf_cfg_check - /sbin/npfctl reload + echo "Enabling NPF $npf_rules" + /sbin/npfctl reload "$npf_rules" # The npf_boot script has enabled npf already. if [ "$autoboot" != "yes" ]; then @@ -52,9 +42,8 @@ npf_stop() npf_reload() { - echo "Reloading NPF ruleset." - npf_cfg_check - /sbin/npfctl reload + echo "Reloading NPF ruleset $npf_rules" + /sbin/npfctl reload "$npf_rules" } npf_status()
CVS commit: src/tests/lib/libcurses/check_files
Module Name:src Committed By: blymn Date: Thu Oct 5 06:15:58 UTC 2023 Modified Files: src/tests/lib/libcurses/check_files: addstr3.chk waddstr2.chk Log Message: Update check files affected by a fix to addbyte.c in libcurses. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/check_files/addstr3.chk cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/check_files/waddstr2.chk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libcurses/check_files
Module Name:src Committed By: blymn Date: Thu Oct 5 06:15:58 UTC 2023 Modified Files: src/tests/lib/libcurses/check_files: addstr3.chk waddstr2.chk Log Message: Update check files affected by a fix to addbyte.c in libcurses. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/check_files/addstr3.chk cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/check_files/waddstr2.chk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libcurses/check_files/addstr3.chk diff -u src/tests/lib/libcurses/check_files/addstr3.chk:1.4 src/tests/lib/libcurses/check_files/addstr3.chk:1.5 --- src/tests/lib/libcurses/check_files/addstr3.chk:1.4 Fri Nov 4 06:17:58 2022 +++ src/tests/lib/libcurses/check_files/addstr3.chk Thu Oct 5 06:15:58 2023 @@ -1,2 +1,2 @@ -0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*cup24;1X()cup24;76Xel()clearcup23;76Xa +0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*cup24;1X()cup24;76Xel()clearcup23;76Xa hello \ No newline at end of file Index: src/tests/lib/libcurses/check_files/waddstr2.chk diff -u src/tests/lib/libcurses/check_files/waddstr2.chk:1.1 src/tests/lib/libcurses/check_files/waddstr2.chk:1.2 --- src/tests/lib/libcurses/check_files/waddstr2.chk:1.1 Thu Nov 10 06:13:29 2022 +++ src/tests/lib/libcurses/check_files/waddstr2.chk Thu Oct 5 06:15:58 2023 @@ -1,3 +1,6 @@ -012345cup5;6X6cup6;8Xel + 8el + 012345 + 012345 + 6 el 8el el \ No newline at end of file
CVS commit: src/lib/libcurses
Module Name:src Committed By: blymn Date: Thu Oct 5 06:15:04 UTC 2023 Modified Files: src/lib/libcurses: addbytes.c Log Message: Fix for install/56467 Set x to 0 before calling scroll based on a proposed fix by RVP (thanks!) To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/lib/libcurses/addbytes.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/addbytes.c diff -u src/lib/libcurses/addbytes.c:1.68 src/lib/libcurses/addbytes.c:1.69 --- src/lib/libcurses/addbytes.c:1.68 Tue Dec 20 04:57:01 2022 +++ src/lib/libcurses/addbytes.c Thu Oct 5 06:15:03 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: addbytes.c,v 1.68 2022/12/20 04:57:01 blymn Exp $ */ +/* $NetBSD: addbytes.c,v 1.69 2023/10/05 06:15:03 blymn Exp $ */ /* * Copyright (c) 1987, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: addbytes.c,v 1.68 2022/12/20 04:57:01 blymn Exp $"); +__RCSID("$NetBSD: addbytes.c,v 1.69 2023/10/05 06:15:03 blymn Exp $"); #endif #endif/* not lint */ @@ -584,6 +584,8 @@ _cursesi_addwchar(WINDOW *win, __LINE ** return ERR; __CTRACE(__CTRACE_INPUT, "_cursesi_addwchar: do a scroll\n"); + if (!__NONL) +*x = 0; scroll(win); } newx = win->maxx - 1 + win->ch_off;
CVS commit: src/lib/libcurses
Module Name:src Committed By: blymn Date: Thu Oct 5 06:15:04 UTC 2023 Modified Files: src/lib/libcurses: addbytes.c Log Message: Fix for install/56467 Set x to 0 before calling scroll based on a proposed fix by RVP (thanks!) To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/lib/libcurses/addbytes.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.