Re: CVS commit: src/sys/kern

2021-01-21 Thread Tom Spindler (moof)
I believe it's this change that's made my vbox image panic at the drop of
a hat; while it occasionally panics before it even hits single user, it
also consistently panics when starting syslogd (even from single-user):

panic: kqueue_scan,1491: kq=0xc779aeff6dc0 kq->kq_count(1) != count(0), 
nmarker=1

and the call chain is syscall -> sys___kevent50 -> kevent1 -> kqueue_check

it also causes a panic while trying to dump more than half the time,
but I have managed to get an image or two. ("panic: atastart: channel 0
busy, xfer not possible", if you're curious.)

On Wed, Jan 20, 2021 at 09:39:09PM +, Jaromir Dolecek wrote:
> Module Name:  src
> Committed By: jdolecek
> Date: Wed Jan 20 21:39:09 UTC 2021
>
> Modified Files:
>   src/sys/kern: kern_event.c
>
> Log Message:
> fix a race in kqueue_scan() - when multiple threads check the same
> kqueue, it could happen other thread seen empty kqueue while kevent
> was being checked for re-firing and re-queued
>
> make sure to keep retrying if there are outstanding kevents even
> if no kevent is found on first pass through the queue, and only
> drop the KN_QUEUED flag and kq_count when actually completely done
> with the kevent
>
> change is inspired by the FreeBSD in-flux handling, but without
> introducing the reference counting
>
> PR kern/50094 by Christof Meerwald
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.110 -r1.111 src/sys/kern/kern_event.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/external/bsd/acpica/dist

2020-08-03 Thread Tom Spindler (moof)
On Mon, Aug 03, 2020 at 10:59:04PM +0200, Herbert J. Skuhra wrote:
> This breaks the build (amd64) on FreeBSD and GNU/Linux:
> 
> aslcompilerlex.l: In function 'AslCompilerlex':
> aslcompilerlex.l:589:22: error: 'PARSEOP_REGIONSPACE_PRM' undeclared (first 
> use in this function); did you mean 'PARSEOP_REGIONSPACE_PCC'?
>  "FFixedHW"  { count (0); return 
> (PARSEOP_REGIONSPACE_FFIXEDHW); }
>   ^~~
>   PARSEOP_REGIONSPACE_PCC
> aslcompilerlex.l:589:22: note: each undeclared identifier is reported only 
> once for each function it appears in
> *** [aslcompilerlex.o] Error code 1

It failed for me in the same way on NetBSD until I cleared out my
/src/external/bsd/acpica/ obj directory; try that.



Re: CVS commit: src/bin/sleep

2019-01-27 Thread Tom Spindler (moof)
On Mon, Jan 28, 2019 at 07:52:22AM +0700, Robert Elz wrote:
> That PR needed to be fixed, even before it was filed, as stray
> characters after the numeric value are more likely to be something
> attempting linux "sleep 2m" (ie: sleep 120) raher than someone
> attempting to sleep for a currency value.   And that does need
> to be detected as an error, unlike "sleep 1,2" (or even sleep 0,2)
> which does no real harm, even if it was an accident (we're
> talking about a sleep of some extra fraction of a second...)

I'd argue that "300ms" or "120us" or "15ns" are all pretty unambiguous,
and that an exactly two char suffix would be rather unlikely to be line
noise.



Re: CVS commit: [netbsd-8] src/sys/compat

2019-01-02 Thread Tom Spindler (moof)
This breaks the netbsd-8 build:

dependall ===> lib/libc
#   compile  libc/compat___msgctl13.o
/usr/obj/8tools/bin/x86_64--netbsd-gcc -O2   -std=gnu99-Wall 
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  
-Wsystem-headers   -Wno-traditional   -Wa,--fatal-warnings  -Wreturn-type 
-Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter 
-Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2  
-Wno-format-zero-length  -Werror   -fPIE -fstack-protector -Wstack-protector   
--param ssp-buffer-size=1   --sysroot=/usr/obj/8dd -D_LIBC -DLIBC_SCCS 
-DSYSLIBC_SCCS -D_REENTRANT -DHESIOD -DINET6 -DNLS -DYP 
-I/src/nb8src/lib/libc/include -I/src/nb8src/lib/libc -I/src/nb8src/sys 
-I/src/nb8src/lib/libc/compat/../locale -I/src/nb8src/lib/libc/compat/stdlib 
-I/src/nb8src/lib/libc/compat/../stdlib -D__BUILD_LEGACY 
-I/src/nb8src/lib/libc/../../common/lib/libc/quad 
-I/src/nb8src/lib/libc/../../common/lib/libc/string 
-I/src/nb8src/lib/libc/../../common/lib/libc/arch/x86_64/string 
-D__DBINTERFACE_PRIVATE -I/src/nb8src/libexec/ld.elf_so 
-I/src/nb8src/lib/libc/dlfcn -I/src/nb8src/lib/libc/gdtoa 
-I/src/nb8src/lib/libc/locale -DNO_FENV_H 
-I/src/nb8src/lib/libc/arch/x86_64/gdtoa -DWITH_RUNE -I/src/nb8src/lib/libc 
-DPOSIX_MISTAKE -DCOMPAT__RES -DUSE_POLL -DPORTMAP -DWIDE_DOUBLE -DALL_STATE 
-DUSG_COMPAT  -D_FORTIFY_SOURCE=2 -c
/src/nb8src/lib/libc/compat/sys/compat___msgctl13.c -o compat___msgctl13.o
In file included from /src/nb8src/lib/libc/compat/sys/compat___msgctl13.c:48:0:
/src/nb8src/sys/compat/sys/msg.h: In function '__native_to_msqid_ds13':
/src/nb8src/sys/compat/sys/msg.h:111:2: error: implicit declaration of function 
'memset' [-Werror=implicit-function-declaration]
  memset(omsqbuf, 0, sizeof(*omsqbuf));
  ^
/src/nb8src/sys/compat/sys/msg.h:111:2: error: incompatible implicit 
declaration of built-in function 'memset' [-Werror]
/src/nb8src/sys/compat/sys/msg.h:111:2: note: include '' or provide a 
declaration of 'memset'
/src/nb8src/sys/compat/sys/msg.h: In function '__native_to_msqid_ds14':
/src/nb8src/sys/compat/sys/msg.h:153:2: error: incompatible implicit 
declaration of built-in function 'memset' [-Werror]
  memset(omsqbuf, 0, sizeof(*omsqbuf));
  ^
/src/nb8src/sys/compat/sys/msg.h:153:2: note: include '' or provide a 
declaration of 'memset'

On Wed, Jan 02, 2019 at 03:51:31PM +, Martin Husemann wrote:
> Module Name:  src
> Committed By: martin
> Date: Wed Jan  2 15:51:31 UTC 2019
>
> Modified Files:
>   src/sys/compat/netbsd32 [netbsd-8]: netbsd32_compat_14.c
>   netbsd32_conv.h
>   src/sys/compat/sys [netbsd-8]: msg.h
>
> Log Message:
> Pull up following revision(s) (requested by maxv in ticket #1151):
>
>   sys/compat/netbsd32/netbsd32_conv.h: revision 1.37
>   sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.27
>   sys/compat/sys/msg.h: revision 1.5
>
> Fix kernel info leaks.
>
>   + Possible info leak: [len=80, leaked=10]
>   | #0 0x80bad7a7 in kleak_copyout
>   | #1 0x8048e71b in netbsd32___msgctl50
>   | #2 0x8022fb5b in netbsd32_syscall
>   | #3 0x802096dd in handle_syscall
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.26 -r1.26.10.1 src/sys/compat/netbsd32/netbsd32_compat_14.c
> cvs rdiff -u -r1.31.8.1 -r1.31.8.2 src/sys/compat/netbsd32/netbsd32_conv.h
> cvs rdiff -u -r1.4 -r1.4.58.1 src/sys/compat/sys/msg.h
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>



Re: CVS commit: src/sys/nfs

2018-01-25 Thread Tom Spindler (moof)
> > Log Message:
> > Use a random opaque cookie, not kva pointer, for nfssvc(2).
> > 
> > (What were they smoking?!)

It looks like most of the code is from the 4.4-Lite merge from mycroft
circa 1994 (!!); I leave it up to the reader to determine what was
being smoked when at Berkeley.

> > I suspect most of this is actually dead code that wasn't properly
> > amputated along with the rest of the gangrene of NFSKERB a decade
> > ago, but I'm out of time to investigate further.  If someone else
> > wants to kill NFSSVC_AUTHIN/NFSSVC_AUTHINFAIL and the rest of the
> > tentacular kerberosity, be my guest.

Alas, I don't remember what moved me to kill the NFSKERB bits in
../usr.sbin/nfsd, but given that the current source still has e.g.

#ifdef NFSKERB
XXX
#else
(void)ktvin.tv_sec;
#endif

in nfs_socket.c, I think it's completely safe and worthwhile to
utterly nuke everything related to the nfs-with-kerb4 code.



Re: CVS commit: src/sys/dev/ic

2016-05-16 Thread Tom Spindler
Don't know if it's your change, but for the alpha...

/usr/src/netbsd/sys/dev/ic/sl811hs.c: In function 'slhci_root_start':
/usr/src/netbsd/sys/dev/ic/sl811hs.c:989:21: error: variable 'spipe' set but 
not used [-Werror=unused-but-set-variable]
  struct slhci_pipe *spipe;
 ^
cc1: all warnings being treated as errors
*** [sl811hs.o] Error code 1

nbmake[2]: stopped in 
/obj/nbobj/alfobj/usr/src/netbsd/sys/arch/alpha/compile/GENERIC.MP

On Mon, May 16, 2016 at 03:09:29PM +, Nick Hudson wrote:
> Module Name:  src
> Committed By: skrll
> Date: Mon May 16 15:09:29 UTC 2016
> 
> Modified Files:
>   src/sys/dev/ic: sl811hs.c
> 
> Log Message:
> Simplify and fixup roothub interrupt transfers to work as well as before
> nick-nhusb.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.74 -r1.75 src/sys/dev/ic/sl811hs.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/ic/sl811hs.c
> diff -u src/sys/dev/ic/sl811hs.c:1.74 src/sys/dev/ic/sl811hs.c:1.75
> --- src/sys/dev/ic/sl811hs.c:1.74 Mon May 16 08:00:25 2016
> +++ src/sys/dev/ic/sl811hs.c  Mon May 16 15:09:29 2016
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: sl811hs.c,v 1.74 2016/05/16 08:00:25 skrll Exp $   */
> +/*   $NetBSD: sl811hs.c,v 1.75 2016/05/16 15:09:29 skrll Exp $   */
>  
>  /*
>   * Not (c) 2007 Matthew Orgass
> @@ -68,7 +68,7 @@
>   */
>  
>  #include 
> -__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.74 2016/05/16 08:00:25 skrll Exp 
> $");
> +__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.75 2016/05/16 15:09:29 skrll Exp 
> $");
>  
>  #include "opt_slhci.h"
>  
> @@ -524,8 +524,6 @@ static void slhci_insert(struct slhci_so
>  static usbd_status slhci_clear_feature(struct slhci_softc *, unsigned int);
>  static usbd_status slhci_set_feature(struct slhci_softc *, unsigned int);
>  static void slhci_get_status(struct slhci_softc *, usb_port_status_t *);
> -static usbd_status slhci_root(struct slhci_softc *, struct slhci_pipe *,
> -struct usbd_xfer *);
>  
>  #define  SLHCIHIST_FUNC()USBHIST_FUNC()
>  #define  SLHCIHIST_CALLED()  USBHIST_CALLED(slhcidebug)
> @@ -993,7 +991,20 @@ slhci_root_start(struct usbd_xfer *xfer)
>   spipe = SLHCI_PIPE2SPIPE(xfer->ux_pipe);
>   sc = SLHCI_XFER2SC(xfer);
>  
> - return slhci_lock_call(sc, _root, spipe, xfer);
> + struct slhci_transfers *t = >sc_transfers;
> +
> + LK_SLASSERT(spipe != NULL && xfer != NULL, sc, spipe, xfer, return
> + USBD_CANCELLED);
> +
> + DLOG(D_TRACE, "%s start", pnames(SLHCI_XFER_TYPE(xfer)), 0,0,0);
> +
> + KASSERT(spipe->ptype == PT_ROOT_INTR);
> +
> + mutex_enter(>sc_intr_lock);
> + t->rootintr = xfer;
> + mutex_exit(>sc_intr_lock);
> +
> + return USBD_IN_PROGRESS;
>  }
>  
>  usbd_status
> @@ -3080,32 +3091,6 @@ slhci_get_status(struct slhci_softc *sc,
>   DLOG(D_ROOT, "status=%#.4x, change=%#.4x", status, change, 0,0);
>  }
>  
> -static usbd_status
> -slhci_root(struct slhci_softc *sc, struct slhci_pipe *spipe,
> -struct usbd_xfer *xfer)
> -{
> - SLHCIHIST_FUNC(); SLHCIHIST_CALLED();
> - struct slhci_transfers *t;
> -
> - t = >sc_transfers;
> -
> - LK_SLASSERT(spipe != NULL && xfer != NULL, sc, spipe, xfer, return
> - USBD_CANCELLED);
> -
> - DLOG(D_TRACE, "%s start", pnames(SLHCI_XFER_TYPE(xfer)), 0,0,0);
> - KASSERT(mutex_owned(>sc_intr_lock));
> -
> - KASSERT(spipe->ptype == PT_ROOT_INTR);
> -#if 0
> - LK_SLASSERT(t->rootintr == NULL, sc, spipe, xfer, return
> - USBD_CANCELLED);
> -#endif
> - t->rootintr = xfer;
> - if (t->flags & F_CHANGE)
> - t->flags |= F_ROOTINTR;
> - return USBD_IN_PROGRESS;
> -}
> -
>  static int
>  slhci_roothub_ctrl(struct usbd_bus *bus, usb_device_request_t *req,
>  void *buf, int buflen)
> 



Re: CVS commit: src/tools/host-mkdep

2013-03-14 Thread Tom Spindler (moof)
   Log Message:
   Revert 1.25 and 1.26: Breaks build on !NetBSD
   
   Can you explain how? The shell does not work?
  
  E.g. util.h not found in binstall and a lot of other header issues.
  
  On what os?
 
 I've seen it on OSX ( 10.5 PowerPC if it matters ).

And I've seen it on Debian.



Re: CVS commit: src/sys/dev/sdmmc

2010-09-20 Thread Tom Spindler
 Modified Files:
   src/sys/dev/sdmmc: sdmmc_mem.c

Did you miss committing a header file and/or further sets of patches?

/usr/src/sys/dev/sdmmc/sdmmc_mem.c: In function 'sdmmc_mem_init':
/usr/src/sys/dev/sdmmc/sdmmc_mem.c:476: error: 'SMC_CAPS_8BIT_MODE' undeclared 
(first use in this function)
/usr/src/sys/dev/sdmmc/sdmmc_mem.c:476: error: (Each undeclared identifier is 
reported only once
/usr/src/sys/dev/sdmmc/sdmmc_mem.c:476: error: for each function it appears in.)
/usr/src/sys/dev/sdmmc/sdmmc_mem.c:477: error: 'width' undeclared (first use in 
this function)
/usr/src/sys/dev/sdmmc/sdmmc_mem.c:478: error: 'value' undeclared (first use in 
this function)



Re: CVS commit: src

2010-08-31 Thread Tom Spindler
   src/sys/sys: exec_elf.h
 
 Log Message:
 Replace the current usage of Elf64_Half with Elf64_Word and rename
 NetBSD specific Elf64_Quarter to Elf64_Half. This restores compatibility
 with the common ELF specifications.

I believe this change is what's causing alpha to blow up:

/src/nbsrc/external/bsd/libdwarf/dist/dwarf_dump.c:884: warning: format '%u' 
expects type 'unsigned int', but argument 2 has type 'Elf64_Word'
/src/nbsrc/external/bsd/libdwarf/dist/dwarf_dump.c:886: warning: format '%u' 
expects type 'unsigned int', but argument 3 has type 'Elf64_Word'

There's (still) a ton of lint warnings in libdwarf, but they don't seem to
have changed for i386, at least.



Re: CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-07-26 Thread Tom Spindler
 Modified Files:
   src/crypto/external/bsd/netpgp/dist/src/lib: keyring.h packet-print.c
 Added Files:
   src/crypto/external/bsd/netpgp/dist/src/lib: mj.c mj.h
 
 Log Message:
 add a minimalist JSON implementation, and add a new function to access the
 data, and serialise it using JSON.

Alas, this fails to build on pretty much all 64-bit arches:

/src/nbsrc/crypto/external/bsd/netpgp/lib/../dist/src/lib/mj.c: In function 
'mj_parse':
/src/nbsrc/crypto/external/bsd/netpgp/lib/../dist/src/lib/mj.c:278: warning: 
cast from pointer to integer of different size



Re: CVS commit: src/distrib/sets/lists

2010-07-02 Thread Tom Spindler
On Fri, Jul 02, 2010 at 07:43:36AM +, matthew green wrote:
 Module Name:  src
 Committed By: mrg
 Date: Fri Jul  2 07:43:36 UTC 2010
 
 Modified Files:
   src/distrib/sets/lists/comp: shl.mi
   src/distrib/sets/lists/xbase: shl.mi
 Removed Files:
   src/distrib/sets/lists/comp: shl.elf stl.elf
   src/distrib/sets/lists/xbase: shl.elf
 
 Log Message:
 move the *.elf contents into the *mi* contents.  we're not going to have
 non-elf platforms at any thing in the near future, and these extra files
 are only making sets handling even worse than necessary.

It looks like the files in stl.elf didn't get merged in anywhere; pretty
much all arches now fail the build for me in the checkflist phase:

Files in DESTDIR but missing from flist.
File is obsolete or flist is out of date ?
--
./usr/lib/crtbegin.o
./usr/lib/crtend.o
./usr/lib/crti.o
./usr/lib/crtn.o



Re: CVS commit: src/usr.bin/make

2010-04-22 Thread Tom Spindler
 Modified Files:
   src/usr.bin/make: job.c main.c make.h
 
 Log Message:
 Just because $TMPDIR is set does not mean it is valid.
 Add a central function for creating temp files so we have one place to
 audit.

This breaks build.sh when bootstrapping nbmake on linux:

cc  -O -o nbmake *.o  
main.o: In function `mkTempFile':
main.c:(.text+0x618): undefined reference to `strlcpy'
collect2: ld returned 1 exit status

ERROR: Build of nbmake failed
*** BUILD ABORTED ***



Re: CVS commit: src/distrib

2010-04-22 Thread Tom Spindler
 Log Message:
 Change use of ${CP} and ${CHMOD} to ${INSTALL_FILE}, so that if the
 target is made un-writeable, the build won't bomb out during an
 UPDATE build.  OK'ed by mar...@.

on i386, when I try building, I now get:
/usr/local/locdisk/locobj/tools/bin/nbmtree -CSM -k all -N /src/nbsrc/etc 
/usr/local/locdisk/locobj/i386/src/nbsrc/destdir.i386/METALOG  
/usr/local/locdisk/locobj/i386/src/nbsrc/destdir.i386/METALOG.new
nbmtree: ./cdrom: missing directory in specification
nbmtree: failed at line 34934 of the specification
*** [/usr/local/locdisk/locobj/i386/src/nbsrc/destdir.i386/METALOG.sanitised] 
Error code 1
1 error

nbmake: stopped in /src/nbsrc/distrib/sets

For some reason, sparc64 does build successfully, however.



Re: CVS commit: src/share/man/man4

2010-02-09 Thread Tom Spindler
IMHO, especially for formats that end up in plain text more often
than not, it's better to use oxford commas to explicitly delineate
what conditions are; in this particular case, I think one could easily
parse the text with (critover or invalid) as a single value.

IMVHO, the title should be changed to voltage, temperature, and fan
sensor to be consistent in the use of commas.



Re: CVS commit: src/sys/uvm

2009-08-11 Thread Tom Spindler
/src/current/sys/uvm/uvm_page.c:120: error: conflicting types for 'physmem'
/src/current/sys/sys/systm.h:82: error: previous declaration of 'physmem' was 
here

I can't see why the first part of the diff (adding `uintptr_t physmem;`)
was even added in the first place.