Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (29m)  netbsd-10 (4d)  netbsd-9 (4d)  netbsd-8 (9d) 

2024-05-20 16:34:40 UTC Now

2022-06-03 21:43:37 UTC MAIN commitmail json YAML

ipf(8): document all -l options

References to "none", "state", and "nat" were missing in places.
Addresses PR bin/36763 from Wolfgang Stukenbrock.

(gutteridge)

2022-06-03 19:59:59 UTC MAIN commitmail json YAML

optimize. reduce 2 instructions.

(ryo)

2022-06-03 17:04:54 UTC MAIN commitmail json YAML

remove reference to gatekeeper.dec.com ftp.

(andvar)

2022-06-03 15:36:36 UTC MAIN commitmail json YAML

some srm firmware (including legacy platforms) still available at hp ftp.
not sure if HPE selling firmware CDs, but it is definitely not Compaq anymore.

(andvar)

2022-06-03 14:02:48 UTC MAIN commitmail json YAML

fix link to pkgsrc.tar.gz file in postinstall section.

(andvar)

2022-06-03 13:50:32 UTC MAIN commitmail json YAML

fix the title of the boot tape creation section.

(andvar)

2022-06-03 12:10:51 UTC MAIN commitmail json YAML

2022-06-03 10:42:17 UTC MAIN commitmail json YAML

Restore (again) support for grant tables v1: pvshim doesn't support
v2 (it doesn't even support GNTTABOP_set_version) some setups will
likely require pvshim in the future.

(bouyer)

2022-06-03 00:21:44 UTC MAIN commitmail json YAML

2022-06-02 17:20:21 UTC MAIN commitmail json YAML

Modify comment. ixgbe_enable_queue() can be used on both MSI-X and legacy intr.

(msaitoh)

2022-06-02 16:56:22 UTC MAIN commitmail json YAML

KNF. Modify comment. No functional change.

(msaitoh)

2022-06-02 16:22:27 UTC MAIN commitmail json YAML

check platform-do-*-mute properties to find out the resp. GPIO's polarity
now this works properly on pmac7,3

(macallan)

2022-06-02 15:36:08 UTC MAIN commitmail json YAML

If we get the disk description via device properties, the strings may
have arbitrary length - make sure the "available disks" menu fits
on the current screen.

(martin)

2022-06-02 07:34:40 UTC MAIN commitmail json YAML

Increase the resource limit so these tests pass on hppa.

LGTM from Roland

(skrll)

2022-06-02 07:31:35 UTC MAIN commitmail json YAML

2022-06-02 06:51:48 UTC MAIN commitmail json YAML

add timeout period to timeout message.

seen on radeon 5450 on an asrock m/b with ryzen 5600g cpu.

(mrg)

2022-06-02 06:50:04 UTC MAIN commitmail json YAML

2022-06-02 06:49:22 UTC MAIN commitmail json YAML

add some AMD zen2/3 devices.

(mrg)

2022-06-02 05:09:01 UTC MAIN commitmail json YAML

tidy up backtrace from crash(9) on aarch64

- fix to dump trapframe when backtracing from crash(8).
- use db_read_bytes() when reading kernel memory.

(ryo)

2022-06-02 01:57:27 UTC MAIN commitmail json YAML

2022-06-02 00:32:14 UTC MAIN commitmail json YAML

As a tiny optimization, rearrange cases as follows:

(1) load/store of format D (base + disp)
(2) load/store of format X (base + index)
(3) lmw and stmw

For clang-compiled userland (*), their frequencies are roughly,
(1) > (2) >> (3) ~ 0.

Improvement should be minor; we are already trapped in the alignment
fault handler.

(*) clang unconditionally emits unaligned memory access for powerpc.
    Undocumented -disable-ppc-unaligned option does not work...

(rin)

2022-06-02 00:12:20 UTC MAIN commitmail json YAML

Localize one more variable to NPCI > 0 block. Fix ia64 build.

(rin)

2022-06-01 21:01:44 UTC MAIN commitmail json YAML

tmux 3.3 out.

(wiz)

2022-06-01 15:44:37 UTC MAIN commitmail json YAML

cprng(9): cprng_fast is no longer used from interrupt context.

Rip out logic to defer reseeding to softint.

(riastradh)

2022-06-01 15:40:15 UTC MAIN commitmail json YAML

mvxpsec(4): Fix missing change to freesession return type.

Not sure how this didn't get committed before -- it was supposed to be
part of this change:

https://mail-index.netbsd.org/source-changes/2022/05/22/msg138764.html

(riastradh)

2022-06-01 08:42:38 UTC MAIN commitmail json YAML

tmpfs_read: respect MNT_NOATIME.

(hannken)

2022-06-01 06:18:04 UTC MAIN commitmail json YAML

delay slot indentation

(skrll)

2022-06-01 06:05:47 UTC MAIN commitmail json YAML

Revert previous, the mask is intented to be like sc_output_mask, a bitmask
of active ports.

(martin)

2022-06-01 05:47:37 UTC MAIN commitmail json YAML

In SNAPPER_OUTPUT_SELECT the "mask" is a bitmap of muted outputs, not
active outputs.

(martin)

2022-06-01 05:42:52 UTC MAIN commitmail json YAML

Recognize the OF labels used for line output and headphone output on a
G5 powermac 7,3.

(martin)

2022-06-01 05:06:45 UTC MAIN commitmail json YAML

Correctly enter the recovery mode. Not tested.

(msaitoh)

2022-06-01 04:15:41 UTC MAIN commitmail json YAML

Correctly re-enable queue interrupt in ixgbe_legacy_irq().

- Don't enable queue 1-15 interrupt.
- Don't enable queue 0 interrupt when the queue work is being scheduled.
- OK'd by knakahara.

(msaitoh)

2022-06-01 02:07:24 UTC MAIN commitmail json YAML

Simplify ixgbe_msix_que(). No functional change.

(msaitoh)

2022-06-01 00:50:24 UTC MAIN commitmail json YAML

add now required pci.h / NPCI.  (the ia64 version builds with PCI
enabled, but i guess it won't be usable.)

XXX:  enable this on evbarm*?  it is x86/ia64 only currently.

(mrg)

2022-05-31 20:53:35 UTC MAIN commitmail json YAML

reorganise most of the NetBSD portion of nvkm_mem_dtor().

when nvkm_mem_new_host() is called via the in-kernel ioctl method,
we copy the supplied dmamap, use it's dm_nsegs value for allocation
of "mem->dma", and assume it remains valid until we're done.

when this path is taken "mem->mem" remains NULL so all the code in
nvkm_mem_dtor() is ignored, and the "mem->dma" is leaked.  this is
one leak seen in PR#56826.  as "dmamap->dm_nsegs" can become invalid
before the dtor call, store the value in "mem->nseg" for use in the
dtor, and convert the dtor to free "mem->dma" if "mem->dma" is set.
additionally, "mem->pages" should end up being the same value as
"nseg" here, ASSERT() this.

while here properly mark NetBSD specific code in nvkm_mem_new_host().

additionally, destroy the dmamap created in the non-ioctl path of
nvkm_mem_new_host().  this is another leak seen in PR#56826.

with both of these fixes my "kmem-04096" pool does not grow rapidly
while using "mpv -vo gpu".  infact, once i loaded the relevant file
into memory, this pool remains stable after at least one minute of
video playback.

ok riastradh@

(mrg)

2022-05-31 20:28:57 UTC MAIN commitmail json YAML

2022-05-31 19:14:10 UTC MAIN commitmail json YAML

document gomoku

(christos)

2022-05-31 19:11:58 UTC MAIN commitmail json YAML

Elide vax breakage

(christos)

2022-05-31 18:04:11 UTC MAIN commitmail json YAML

For some reason on my system, the guest starts with a pending event in
the shared structure. On i386, this cause hypervisor_callback to be
entered before cpu_info_primary is fully initialised, especially on i386
ci_intrstack is still NULL, which cause a crash when we try to use it.
Work around by recycling the boot's tmp stack for this until cpu_attach()
is called.

(bouyer)

2022-05-31 18:01:22 UTC MAIN commitmail json YAML

When we have pending events in stipending(), evt_set_pending() has to set
the ih_pending flag for each handler too. Xen/i386 should be stable again.

(bouyer)

2022-05-31 17:52:35 UTC MAIN commitmail json YAML

2022-05-31 15:24:59 UTC MAIN commitmail json YAML

Restore NULL pointer checks lost in rev 1.16.

Fixes PR port-atari/56859, ok'ed mlelstv@, and confirmed on TT030.
Should be pulled up to netbsd-9 and netbsd-8.

(tsutsui)

2022-05-31 14:23:39 UTC MAIN commitmail json YAML

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

Patch from chs@.  Comment explaining the story by me.  This patch may
not be optimal -- maybe it would be better in pthread__init, or
better for rtld to call _lwp_unpark after _lwp_park in the contened
case -- but we've tested this version and it's annoying to reproduce,
so let's take this version and worry about testing improvements
later.

(riastradh)

2022-05-31 14:21:44 UTC MAIN commitmail json YAML

Revert previous; evt_set_pending() will set ret to 1 if needed to this was
not our bug.

(bouyer)

2022-05-31 14:13:31 UTC MAIN commitmail json YAML

vnd(4): Work around deadlock in VNDIOCCLR.

Since the changes this year to eliminate a host of races and
deadlocks in open, close, revoke, attach, and detach, closing the
last instance of a device special node has the side effect of waiting
for all concurrent I/O operations (read, write, ioctl, strategy, &c.)
on the device to complete.

Unfortunately, while this works for physical devices which revoke
open device nodes in their autoconf detach functions, as invoked by
some hardware interrupt indicating that the device is no longer
present, pseudo-devices like vnd(4) work differently -- or, work by
luck, or don't work any more.

VNDIOCCLR acts kind of like an autoconf detach function in that it
revokes open device nodes, which closes the last instance.  But
VNDIOCCLR is itself called via ioctl, which is an I/O operation that
close waits for.  So we end up with a deadlock, spec_io_drain waiting
for spec_close lower down in the call stack:

> spec_io_drain() at netbsd:spec_io_drain+0x84
> spec_close() at netbsd:spec_close+0x1c6
> VOP_CLOSE() at netbsd:VOP_CLOSE+0x38
> spec_node_revoke() at netbsd:spec_node_revoke+0x14d
> vcache_reclaim() at netbsd:vcache_reclaim+0x4e7
> vgone() at netbsd:vgone+0xcd
> vrevoke() at netbsd:vrevoke+0xfa
> genfs_revoke() at netbsd:genfs_revoke+0x13
> VOP_REVOKE() at netbsd:VOP_REVOKE+0x35
> vdevgone() at netbsd:vdevgone+0x64
> vnddoclear.part.0() at netbsd:vnddoclear.part.0+0xaa
> vndioctl() at netbsd:vndioctl+0x78c
> bdev_ioctl() at netbsd:bdev_ioctl+0x91
> spec_ioctl() at netbsd:spec_ioctl+0xa5
> VOP_IOCTL() at netbsd:VOP_IOCTL+0x41
> vn_ioctl() at netbsd:vn_ioctl+0xb3
> sys_ioctl() at netbsd:sys_ioctl+0x555

In the past, there was a workaround for what was presumably a crash
instead of a deadlock here: don't issue revoke (vdevgone) on the open
character devices for the minor number in use by the ioctl.  If you
use, e.g., `vnconfig -u vnd0', and vnconfig(8) picks /dev/rvnd0c or
/dev/rvnd0d, that special case kicks in.  But if you use `vnconfig -u
/dev/vnd0d', the ioctl will be issued on the block device instead, so
the special case doesn't kick in, so the operation deadlocks.

It is actually probably safe not to revoke the block device if what
the ioctl caller holds open is that, because specfs(9) forbids more
than one open of a block device, so nothing else can have it open
anyway.

Unclear what the consequences of failing to revoke the character
device are -- but this is what vnd(4) has done all along.  cgd(4) and
ccd(4) also don't bother to revoke.  We don't have a notion of
`revoke every file descriptor _except_ this one'; only a vnode as a
whole can be revoked, including all references to it.

This is a stop-gap measure to avoid a deadlock we are definitely
hitting on some users.  A slightly better measure would be to revoke
the block or character device according to which one is being used,
but that requires a little more work with two different d_ioctl
functions -- and wouldn't address isues with the character device.  A
proper solution requires identifying the appropriate protocol for all
of these pseudo-device disk drivers and using it uniformly for them.

Reported on current-users:
https://mail-index.netbsd.org/current-users/2022/05/27/msg042437.html

(riastradh)

2022-05-31 13:42:59 UTC MAIN commitmail json YAML

libc: Reintroduce getentropy.

This was introduced two years ago when the getrandom/getentropy API
question was still open, and removed because the discussion was
ongoing.  Now getentropy is more widely adopted and soon to be in
POSIX.  So reintroduce the symbol into libc since we'll be keeping it
anyway.  Discussion of details of the semantics, as interpreted by
NetBSD, is ongoing, but the symbol needs to get in before the
netbsd-10 branch.  The draft POSIX text is
(https://www.opengroup.org/austin/docs/austin_1110.pdf):

    SYNOPSIS
        #include <unistd.h>

        int getentropy(void *buffer, size_t length);

    DESCRIPTION
        The getentropy() function shall write length bytes of data
        starting at the location pointed to by buffer. The output
        shall be unpredictable high quality random data, generated by
        a cryptographically secure pseudo-random number
        generator. The maximum permitted value for the length
        argument is given by the {GETENTROPY_MAX} symbolic constant
        defined in <limits.h>.

    RETURN VALUES
        Upon successful completion, getentropy() shall return 0;
        otherwise, -1 shall be retunred and errno set to indicate the
        error.

    ERRORS
        The getentropy() function shall fail if:

        [EINVAL]        The value of length is greater than
                        {GETENTROPY_MAX}.

        The getentropy() function may fail if:

        [ENOSYS]        The system does not provide the necessary
                        source of entropy.

    RATIONALE
        The getentropy() function is not a cancellation point.

Minor changes from the previous introduction of getentropy into libc:

- Return EINVAL, not EIO, on buflen > 256.
- Define GETENTROPY_MAX in limits.h.

The declaration of getentropy in unistd.h and definition of
GETENTROPY_MAX in limits.h are currently conditional on
_NETBSD_SOURCE.  When the next revision of POSIX is finalized, we can
expose them also under _POSIX_C_SOURCE > 20yymmL as usual -- and this
can be done as a pullup without breaking existing compiled programs.

(riastradh)

2022-05-31 12:59:00 UTC MAIN commitmail json YAML

s/longeset/longest/ and s/collsion/collision/ in comments.

(andvar)

2022-05-31 12:52:59 UTC MAIN commitmail json YAML

stipending(): if we're going to process some interrupts don't return 0.
Hopefully fixes random hang seen in i386 Xen PV.

The bug has been there ~forever but was masked by the fact that spllower()
did call event handlers much more often.

(bouyer)

2022-05-31 11:22:34 UTC MAIN commitmail json YAML

2022-05-31 08:43:17 UTC MAIN commitmail json YAML

2022-05-31 07:40:25 UTC MAIN commitmail json YAML

make a frame pointer to show a backtrace correctly.

(ryo)

2022-05-31 07:12:15 UTC MAIN commitmail json YAML

2022-05-31 07:10:50 UTC MAIN commitmail json YAML

whitespace including space before delay slot instruction.

(skrll)

2022-05-31 06:34:33 UTC MAIN commitmail json YAML

add .mobi / application/x-mobipocket-ebook.

(mrg)

2022-05-31 00:35:18 UTC MAIN commitmail json YAML

lint: fix null pointer dereference after syntax error

Found by afl, starting with the malformed input '/**/f=({;/**/};}' that
no longer crashes.  This input led to 'f=({L:;}', which is at least a
syntactically valid prefix of a translation unit, containing a GCC
statement expression with an unused label.  The error message for this
unused label assumed that it would always be inside a function
definition.

While here, document incomplete recovery after syntax errors, in
msg_249.c.

(rillig)

2022-05-31 00:17:10 UTC MAIN commitmail json YAML

nouveau(4): Fix error branches in nouveau_gem_new.

PR kern/56804

(riastradh)

2022-05-31 00:01:35 UTC MAIN commitmail json YAML

lint: prevent assertion failure after parse error from grammar

Instead of running into an assertion failure, the malformed input
'f=({;};}' now generates:

malformed.c(1): error: syntax error ';' [249]
malformed.c(1): warning: ({ }) is a GCC extension [320]
malformed.c(1): warning: ({ }) is a GCC extension [320]
malformed.c(1): error: cannot recover from previous errors [224]

(rillig)

2022-05-30 23:36:26 UTC MAIN commitmail json YAML

re-do previous - it likely broke kmem cache init.

use {0} for zero sentinel.

(mrg)

2022-05-30 23:27:45 UTC MAIN commitmail json YAML

2022-05-30 23:02:02 UTC MAIN commitmail json YAML

lint: clean up usage messages

The two synopsis forms differed in the spelling of 'file ...'.

The options string for getopt does not start with ':', which led to a
duplicate message 'unknown option -- ?' followed by 'Unknown flag ?'.

Be more specific when calling 'lint file.c -u'; the message 'Unknown
argument' was not helpful as it didn't pinpoint that there are two
different phases for parsing options.  In the second phase, only the
options '-L' and '-l' are recognized.

In the manual page, mention the difference between the two synopsis
forms as early as possible.  The two synopsis forms are very similar and
both have far to many options to see the difference at a glance.

(rillig)

2022-05-30 21:42:02 UTC MAIN commitmail json YAML

apply some missing #ifn?def KDTRACE_HOOKS from the previous.

(mrg)

2022-05-30 21:18:37 UTC MAIN commitmail json YAML

Use the ABI value for 'R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC'.

(jkoshy)

2022-05-30 20:28:30 UTC MAIN commitmail json YAML

kmem(9): Create dtrace sdt probes for each kmem cache size.

The names of the probes correspond to the names shown in vmstat -m.
This should make it much easier to track down who's allocating memory
when there's a leak, e.g. by getting a histogram of stack traces for
the matching kmem cache pool:

  # vmstat -m
  Memory resource pool statistics
  Name        Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
  ...
  kmem-00128  256    62242    0        0  3891    0  3891  3891    0  inf    0
  ...
  # dtrace -n 'sdt:kmem:*:kmem-00128 { @[probefunc, stack()] = count() }'
  ^C

When there's no leak, the allocs and frees (probefunc) will be roughly
matched; when there's a leak, the allocs will far outnumber the frees.

(riastradh)

2022-05-30 20:28:18 UTC MAIN commitmail json YAML

virtio at pci: Provide attribution in debug message.

Also make it only happen in the error case so success doesn't clutter
up the console output.

(riastradh)

2022-05-30 17:06:34 UTC MAIN commitmail json YAML

Set DP early so that any binary functions that override others get the
right value if they're called before _start.  This is true of bash where
it provides its own getenv.

Part of port-hppa/56118: sporadic app crashes in HPPA -current

(skrll)

2022-05-30 15:22:44 UTC MAIN commitmail json YAML

Fix dates for previous; it is still 20220530 for UTC ;)

(rin)

2022-05-30 15:18:32 UTC MAIN commitmail json YAML

Remove comment-outed garbage.

(rin)

2022-05-30 15:13:25 UTC MAIN commitmail json YAML

lint: report proper file name in assertion failures

When given the (obviously malformed) translation unit 'f=({;};}', lint
runs into an assertion failure.  It reported this as occurring near
':1'.  This location was missing a filename since the input didn't
contain a GCC line number directive such as '# 2 "input.c"'.  In GCC mode,
the GCC builtins are loaded first, in which case the reported location
was ':9'.

Fix this by providing proper location information, even for input that
does not come from the GCC C preprocessor.

(rillig)

2022-05-30 15:11:45 UTC MAIN commitmail json YAML

Document changes for powerpc:
- Fix userland unaligned memory access for 403.
- Unify libc binaries among all 32-bit ppc ports.

(rin)

2022-05-30 15:06:55 UTC MAIN commitmail json YAML

Introduce libc_aligned.so for evbppc-powerpc32, which provides
strictly-aligned versions of memcmp(3), bcopy(3), memcpy(3), and
memmove(3).

This is used for 403 by ld.so.conf with machdep.no_unaligned variable.

With this library, unaligned memory accesses are significantly reduced
for 403 (from several hundreds to few tens per sec under heavy load);
only ld.elf_so (typically few times per fork) and statically-linked
binaries do such access.

(rin)

2022-05-30 14:48:09 UTC MAIN commitmail json YAML

Export CPU capability of unaligned memory access to userland
as machdep.no_unaligned sysctl(7) variable.

This will be used for ld.so.conf in order to provide strictly-
aligned versions of libc routines.

(rin)

2022-05-30 14:43:37 UTC MAIN commitmail json YAML

Obsolete hack for evbppc to replace memcmp(9), memcpy(9), and memmove(9)
with strictly-aligned versions.

Now all 32-bit powerpc ports share the same libc binary.

This change together with the preceding similar change in libkern slightly
improve performance for DHT (ibm4xx/405GP) and RB800 (MPC8533E).

See changes in bytebench scores:

- DHT https://gist.github.com/rokuyama/301063355de9733bea515b84ef574c0a
- RB800 https://gist.github.com/rokuyama/60ad665d367d6d110b79ec44707f39ff

Improvements may be negligible, but this does not cause performance
regressions at least.

This hack was for 403, but unaligned memory access is now emulated by
kernel. This should result in serious performance regression for 403.
We will provide strictly-aligned versions by ld.so.conf.

(rin)

2022-05-30 14:28:31 UTC MAIN commitmail json YAML

More factoring of common code.  NFCI

(pgoyette)

2022-05-30 14:18:10 UTC MAIN commitmail json YAML

Restrict strictly-aligned versions of memcmp(9), memcpy(9), and
memmove(9) to 403, instead of all evbppc machines.

Introduce strict-align LIBKERN_MD_FLAGS for this purpose.

(rin)

2022-05-30 14:13:59 UTC MAIN commitmail json YAML

Introduce LIBKERN_MD_FLAGS to pass some MD flags for libkern.

This is necessary since libkern is built by coprocess, and
threfore subsets of make(1) variables are passed.

(rin)

2022-05-30 14:09:01 UTC MAIN commitmail json YAML

For IBM_PPC403, emulate unaligned memory access for userland process.

(rin)

2022-05-30 14:05:36 UTC MAIN commitmail json YAML

Introduce PPC_NO_UNALIGNED flag to indicate that CPU cannot handle
unaligned memory access, and emulation should be provided to userland.

(rin)

2022-05-30 13:58:51 UTC MAIN commitmail json YAML

Add routines to fix unaligned memory access for userland process.

Mainly intended for 403, which cannot handle unaligned memory access
at all (not only ones across page boundaries like 601).

For more details, see comments in fix_unaligned.c.

(rin)

2022-05-30 09:56:04 UTC MAIN commitmail json YAML

2022-05-30 08:51:08 UTC MAIN commitmail json YAML

tests/lint: explain how lint represents pointer addition

(rillig)

2022-05-30 08:14:53 UTC MAIN commitmail json YAML

lint: revert 'do not pre-multiply pointer expressions' from 2022-05-26

In tree.c 1.448, removing the pre-multiplication generated wrong
warnings about out-of-bounds array access.

(rillig)

2022-05-30 08:04:00 UTC MAIN commitmail json YAML

tests/lint: demonstrate wrong warning 'array subscript cannot be'

Since tree.c 1.448 from 2022-05-26.

(rillig)

2022-05-30 07:19:28 UTC MAIN commitmail json YAML

lint: fix assertion failure in '(unsigned long)(ptr) >> 12'

Since tree.c 1.449 from 2022-05-26.

(rillig)

2022-05-30 05:08:17 UTC MAIN commitmail json YAML

2022-05-30 05:07:38 UTC MAIN commitmail json YAML

Fix a bug that the legacy interrupt doesn't work when MSI-X allocation failed.
Fixes PR kern/56857.

(msaitoh)

2022-05-30 03:33:07 UTC MAIN commitmail json YAML

Update test so all four combinations of update_{upper, lower} x
monitor_{upper, lower}} can be verified.  Currently update_upper
is expected to fail regardless of which file is being monitored.

PR kern/56713

(pgoyette)

2022-05-29 23:43:50 UTC MAIN commitmail json YAML

Display the trap type of trapframe when backtracing.

(ryo)

2022-05-29 23:39:59 UTC MAIN commitmail json YAML

ESR_EL1 and FAR_EL1 are not required in interrupt trapframe and their values are meaningless.
To identify it as an interrupt trap frame, store -1 and 0.

(ryo)

2022-05-29 23:24:09 UTC MAIN commitmail json YAML

2022-05-29 23:09:43 UTC MAIN commitmail json YAML

tests/lint: demonstrate wrong errors 'size/alignment of bit-field'

Since tree.c 1.444 from 2022-05-26, which added range and bit checks for
integer expressions, not taking into account that querying for the size
of a bit-field type triggers an error message.

(rillig)

2022-05-29 22:26:21 UTC MAIN commitmail json YAML

Apply extra delay quirk for

- Intel 7 Series (mobile) SATA Controller (AHCI):
  rev. 0x04 sometimes fails to probe Seagate ST500LT012.

Reported by RVP. Thanks!

(rin)

2022-05-29 22:03:29 UTC MAIN commitmail json YAML

gomoku: clean up variable names, add empty lines

No binary change.

(rillig)

2022-05-29 21:47:12 UTC MAIN commitmail json YAML

gomoku: clean up color handling in 'pickmove'

Instead of searching for the best black and white moves, search instead
for our and their best moves. This makes the code simpler and more
uniform, as the strategy is the same for Black and White.

No functional change.

(rillig)

2022-05-29 21:38:36 UTC MAIN commitmail json YAML

gomoku: clean up 'pickmove' stylistically

No functional change.

(rillig)

2022-05-29 21:02:37 UTC MAIN commitmail json YAML

gomoku: migrate remaining functions to type player_color

No functional change.

(rillig)

2022-05-29 20:21:29 UTC MAIN commitmail json YAML

gomoku: make parsing of the debug command 'o' robust

Previously, the (invalid) debug command 'o,' succeeded to parse and led
to out-of-bounds memory access. Add proper parsing for the arguments of
that debug command. Add a short usage for that debug command, as
guessing the usage from the previous code was time-consuming due to the
large amount of ad-hoc low-level parsing code.

When leaving debug mode, clear the debug prompt.

(rillig)

2022-05-29 18:25:39 UTC MAIN commitmail json YAML

gomoku: clean up overlap info in 'checkframes'

In 2009, GCC had complained that the overlap_info might only be
partially filled. All possible code paths are sane though, so that was
probably a bug in GCC.

Remove the comment and the unnecessary initialization, rename the
variable since it doesn't match its behavior anymore. Sync nearby
comments with reality; there is no array anywhere near.

No functional change.

(rillig)

2022-05-29 18:05:25 UTC MAIN commitmail json YAML

gomoku: do not scan the upper border for combos

Adding the '+ 1' to the row coordinate added an offset of 20, while the
intended offset was 1.

No functional change, just a bit faster.

(rillig)

2022-05-29 17:01:42 UTC MAIN commitmail json YAML

gomoku: refine the type of some functions and variables

Assisted by WARNS=6. At that level, there are several warnings about
type conversion between small integer types that would only clutter the
code, therefore stay at WARNS=5. Same for lint's -aa option.

No functional change.

(rillig)

2022-05-29 16:45:00 UTC MAIN commitmail json YAML

- Display "cpu[<CPUINDEX>]" instead of "cpu[<CPUID>]".
- Also add cpu_info->ci_onproc to display.

(ryo)

2022-05-29 16:39:22 UTC MAIN commitmail json YAML

Use the PAR register to check for accessibility in db_(read|write)_bytes().

db_(read|write)_bytes() uses the TTBR[01] at that time, so it must check
if it is accessible in context at that time, not pmap_extract()
which uses the struct pmap of the process.

- It also checks if the address is writable.
- db_write_bytes() also requires ARMV81_PAN control.

(ryo)

2022-05-29 16:30:44 UTC MAIN commitmail json YAML

gomoku: when starting a new game, start in the middle of the board

Previously, when starting a new game, the user coordinate was kept at
the previously selected spot. Since playing in the center is common
sense, reset the coordinate.

(rillig)

2022-05-29 16:19:52 UTC MAIN commitmail json YAML

gomoku: after accepting a spot via the mouse, clear current coordinate

(rillig)

2022-05-29 16:14:42 UTC MAIN commitmail json YAML

fix build without options DDB

(ryo)

2022-05-29 16:13:41 UTC MAIN commitmail json YAML

Simplified termination conditions for ddb backtrace.

Exit backtrace when the user trapframe is invalid. (Mainly in kernel threads).

(ryo)

2022-05-29 15:31:12 UTC MAIN commitmail json YAML

2022-05-29 15:23:21 UTC MAIN commitmail json YAML

2022-05-29 15:16:11 UTC MAIN commitmail json YAML

gomoku: use unsigned integers for bit sets

As all access to the bit sets happens through the unsigned spot_index
type, drop the type casts in the macros.

No functional change on 2s complement machines.

(rillig)

2022-05-29 14:50:37 UTC MAIN commitmail json YAML

gomoku: provide a more gentle introduction to the code

No binary change.

(rillig)

2022-05-29 14:37:44 UTC MAIN commitmail json YAML

2022-05-29 14:01:58 UTC MAIN commitmail json YAML

gomoku: consistently name the offset of a spot in a frame 'off'

Leave 'i' for general purpose loops.

No functional change.

(rillig)

2022-05-29 13:49:10 UTC MAIN commitmail json YAML

gomoku: add data type for one of the 4 directions of a frame

No functional change.

(rillig)

2022-05-29 12:44:17 UTC MAIN commitmail json YAML

gomoku: clean up four_in_a_row

No functional change.

(rillig)

2022-05-29 12:40:36 UTC MAIN commitmail json YAML

Expand and escape comments. One minor change to variable expansion
as requested by uwe.

(nia)

2022-05-29 12:20:07 UTC MAIN commitmail json YAML

gomoku: extract quick_check from scanframes

No functional change.

(rillig)

2022-05-29 12:15:00 UTC MAIN commitmail json YAML

Make it compile again

(martin)

2022-05-29 11:55:05 UTC MAIN commitmail json YAML

Fix insn field definitions for MD and MDS formats.

No one uses these yet.

(rin)

2022-05-29 11:36:12 UTC MAIN commitmail json YAML

gomoku: use proper types when indexing 'board' and 'frames'

No functional change.

(rillig)

2022-05-29 11:18:33 UTC MAIN commitmail json YAML

Apply extra delay quirk for followings:

- Intel Braswell AHCI: rev. 0x35 fails for Seagate ST2000LX001.

- Intel 8 Series (desktop) SATA Controller (AHCI): rev. 0x04 fails for
  Seagate ST1000LX015 and WD WD10JPVX, whereas it works without the
  quirk for some SSD models...

Reported by Matthias Petermann. Thanks!

(rin)

2022-05-29 10:58:09 UTC MAIN commitmail json YAML

Avoid null SEGV if libargon passed string with too few $

Seen on netbsd-9 built xscreensaver running on a current system.
Whatever triggered this should also be fixed, but in the meantime
we can improve the behaviour from "Segmentation Fault"

(abs)

2022-05-29 10:51:42 UTC MAIN commitmail json YAML

2022-05-29 10:51:41 UTC MAIN commitmail json YAML

Free strdup'd value in libargon decode_option error paths

If its worth freeing in the success path, its worth freeing in the
error path... (given we don't _exit or similar)

(abs)

2022-05-29 10:47:40 UTC MAIN commitmail json YAML

2022-05-29 10:45:05 UTC MAIN commitmail json YAML

2022-05-29 10:43:46 UTC MAIN commitmail json YAML

Audit unload/unmap v.s. free against DMA buffer for sys/dev;
make sure that bus_dmamap_unload(9) [or bus_dmamap_destroy(9)] or
bus_dmamem_unmap(9) are preceding to freeing DMA buffer, if it is
loaded or mapped, respectively.

This is mandatory for some archs. See, e.g.:

http://www.nerv.org/netbsd/?q=id:20210511T013030Z.013443cc790088147e4beed43f53dedabeaf9312
http://www.nerv.org/netbsd/?q=id:20220511T172220Z.561179f0b6fcc5b9cd73e274f69d74e2ce9e4c93

For some drivers, resource leaks for error paths are fixed at
the same time.

XXX XXX XXX
Compile test only (at least one arch per driver).

(rin)

2022-05-29 10:43:19 UTC MAIN commitmail json YAML

2022-05-29 10:37:21 UTC MAIN commitmail json YAML

gomoku: turn spotstr.s_frame into a frame index

Most calculations are done on the frame index, not the pointer. This
avoids dealing with ptrdiff_t conversion to int.

Changing the type of s_frame changes the size of struct spotstr, it is
now 56 bytes on LP64 and 48 bytes on ILP32, neither of which is a power
of two. Remove the dummy padding since compilers no longer generate
division instructions for divisions by small integer constants, so that
optimization is no longer necessary.

No functional change.

(rillig)

2022-05-29 10:06:43 UTC MAIN commitmail json YAML

gomoku: document where to fix the unnecessarily long thinking time

(rillig)

2022-05-29 08:15:47 UTC MAIN commitmail json YAML

2022-05-29 08:11:15 UTC MAIN commitmail json YAML

One more typo; this is called _atomic_swap_64, not _8.

(rin)

2022-05-29 08:10:00 UTC MAIN commitmail json YAML

2022-05-29 08:09:19 UTC MAIN commitmail json YAML

Fix typo; this is "and", not "add".

(rin)

2022-05-29 08:06:40 UTC MAIN commitmail json YAML

Add missing Hyper-V devices from GENERIC.

(rin)

2022-05-29 06:06:14 UTC MAIN commitmail json YAML

2022-05-29 05:53:02 UTC MAIN commitmail json YAML

2022-05-29 01:45:56 UTC MAIN commitmail json YAML

CHANGES: minor grammar fixes

(gutteridge)

2022-05-29 01:34:49 UTC MAIN commitmail json YAML

gomoku: migrate 'makemove' to using spot_index instead of pointer

No functional change.

(rillig)

2022-05-29 01:17:55 UTC MAIN commitmail json YAML

gomoku: migrate pickmove to use spot_index instead of pointers

Using spot_index instead of pointers leads to simpler code since there
is no need to deal with conversion from ptrdiff_t to spot_index.

No functional change.

(rillig)

2022-05-29 00:38:26 UTC MAIN commitmail json YAML

gomoku: migrate spot_index from int to unsigned short

This matches the type of 'intersect'.

No functional change.

(rillig)

2022-05-29 00:12:11 UTC MAIN commitmail json YAML

gomoku: use consistent variable names

Previously, the name 's' was used for the index of a spot on the board,
as well as for the value of a combo, and for a few other purposes. Use
different names and mark the spot indexes using a custom type.

No binary change.

(rillig)

2022-05-28 23:05:45 UTC MAIN commitmail json YAML

gomoku: use custom magic value for end of file input

This allows the type for a spot index to be changed to an unsigned type.

No functional change.

(rillig)

2022-05-28 22:33:42 UTC MAIN commitmail json YAML

s/heigth/height/ in a function argument name.

(andvar)

2022-05-28 22:16:44 UTC MAIN commitmail json YAML

2022-05-28 22:08:47 UTC MAIN commitmail json YAML

2022-05-28 22:00:56 UTC MAIN commitmail json YAML

2022-05-28 21:57:39 UTC MAIN commitmail json YAML

2022-05-28 21:54:56 UTC MAIN commitmail json YAML

2022-05-28 21:48:21 UTC MAIN commitmail json YAML

gomoku: use unsigned arithmetic for bitboard

No functional change.

(rillig)

2022-05-28 21:31:41 UTC MAIN commitmail json YAML

gomoku: document that 'whatsup' is called on ^C as well

(rillig)

2022-05-28 21:14:58 UTC MAIN commitmail json YAML

2022-05-28 20:57:26 UTC MAIN commitmail json YAML

gomoku: allow saving a finished game without pressing Shift

(rillig)

2022-05-28 20:54:31 UTC MAIN commitmail json YAML

gomoku: remove redundant parentheses, braces, newlines, clean up get_key

No functional change.

(rillig)

2022-05-28 19:47:24 UTC MAIN commitmail json YAML

gomoku: clean up initialization of overlap information

Fix variable names 'ia' and 'ib', which I forgot in the previous commit.

Move the documentation in the right places.

Split off another part of init_overlap, to make each function fit on a
single screen. Reducing the number of nested 'for' loops allows the
indentation to follow the NetBSD style.

No functional change.

(rillig)

2022-05-28 18:55:16 UTC MAIN commitmail json YAML

gomoku: clean up local variable names in init_overlap

By clearly associating each variable to either frame A or frame B,
suddenly the code becomes understandable. For the benefit of future
readers, explain the naming scheme.

No functional change.

(rillig)

2022-05-28 17:51:27 UTC MAIN commitmail json YAML

gomoku: split initialization of the board into smaller functions

The comments about the "top border" and "bottom border" had been wrong
all the time. Mention the corners in the comments, to remove the magic
from the various '+ 1' in the code.

No functional change.

(rillig)

2022-05-28 15:57:18 UTC MAIN commitmail json YAML

fixed typo with another typo in my last commit. fixing it again.

(andvar)

2022-05-28 14:31:12 UTC MAIN commitmail json YAML

2022-05-28 12:36:56 UTC MAIN commitmail json YAML

Fix typo. Hopefully this didn't break anyone's build, sorry.

(nia)

2022-05-28 11:17:36 UTC MAIN commitmail json YAML

2022-05-28 10:36:24 UTC MAIN commitmail json YAML

2022-05-28 09:41:51 UTC MAIN commitmail json YAML

doc/CHANGES: summarize latest changes to gomoku

(rillig)

2022-05-28 08:32:56 UTC MAIN commitmail json YAML

2022-05-28 08:19:19 UTC MAIN commitmail json YAML

2022-05-28 08:09:22 UTC MAIN commitmail json YAML

gomoku: split makemove into smaller functions

No functional change.

(rillig)

2022-05-28 07:58:36 UTC MAIN commitmail json YAML

gomoku: announce tie as early as possible

(rillig)

2022-05-28 06:25:35 UTC MAIN commitmail json YAML

gomoku: extract update_overlap_different_direction

No functional change.

(rillig)

2022-05-28 05:44:41 UTC MAIN commitmail json YAML

gomoku: extract separate function update_overlap_same_direction

No functional change.

(rillig)

2022-05-28 05:14:34 UTC MAIN commitmail json YAML

gomoku: reduce number of variables in update_overlap

No functional change.

(rillig)

2022-05-28 04:52:23 UTC MAIN commitmail json YAML

gomoku: reduce scope of local variable

No functional change.

(rillig)

2022-05-28 01:07:47 UTC MAIN commitmail json YAML

2022-05-28 00:53:41 UTC MAIN commitmail json YAML

Document hw.wmX.txex_workqueue sysctl

(manu)

2022-05-27 23:29:16 UTC MAIN commitmail json YAML

gomoku: reduce variable reuse, make code more uniform

No functional change.

(rillig)

2022-05-27 23:10:54 UTC MAIN commitmail json YAML

gomoku: reduce scope of local variables

No binary change.

(rillig)

2022-05-27 21:43:26 UTC MAIN commitmail json YAML

gcc 9.5.0 out.

(wiz)

2022-05-27 21:02:27 UTC MAIN commitmail json YAML

i915: Fix missing newlines in custom warning message macros.

(riastradh)

2022-05-27 20:48:43 UTC MAIN commitmail json YAML

gomoku: allow Black to win the game in the very last move

(rillig)

2022-05-27 20:35:58 UTC MAIN commitmail json YAML

gomoku: fix off-by-one error when deciding that the game is a tie

(rillig)

2022-05-27 19:59:56 UTC MAIN commitmail json YAML

gomoku: replace 1-based movenum with 0-based nmoves

No functional change, not even the TIE that is wrongly announced when
the very last spot on the board is yet to be filled by Black.  Even
without this off-by-one error, it could be that filling the very last
spot completes a frame, so that code has been wrong all the time.

In practical terms, this situation only arises when the human player is
unconcentrated or the computer player has a bad strategy.  The latter
may well be, as the computer moves in the (boring) endgame are not
directed towards winning -- they fill irrelevant spots before relevant
ones.

(rillig)

2022-05-27 19:30:56 UTC MAIN commitmail json YAML

gomoku: split local variable into separate variables

No binary change.

(rillig)

2022-05-27 19:05:29 UTC MAIN commitmail json YAML

Only set dpi when necessary to avoid divide by zero on very small screens

(nia)

2022-05-27 18:35:38 UTC MAIN commitmail json YAML

xenevt_setipending(): also increase xenevt_ih->ih_pending, so that
the handler will be called when the IPL is lowered.

(bouyer)

2022-05-27 17:58:54 UTC MAIN commitmail json YAML

More DPI magic... allow most modern GTK and Qt apps to automatically scale

(nia)

2022-05-27 17:04:16 UTC MAIN commitmail json YAML

ctwmrc: Use a slightly more muted orange color.

(nia)

2022-05-27 16:59:19 UTC MAIN commitmail json YAML

2022-05-27 14:23:23 UTC MAIN commitmail json YAML

In xterm, use TrueType fonts rather than Spleen at higher DPIs.

Requested by jmcneill.

(nia)

2022-05-27 09:25:39 UTC MAIN commitmail json YAML

... and more MKLFS here

(nia)

2022-05-27 09:25:08 UTC MAIN commitmail json YAML

2022-05-27 07:28:22 UTC MAIN commitmail json YAML

2022-05-26 20:17:40 UTC MAIN commitmail json YAML

lint: do not warn about 'uint32_t = uint64_t >> 32'

If all possible values fit into the destination type, there is no
possibility of losing accuracy.

Enhances PR 36668.

(rillig)

2022-05-26 19:55:57 UTC MAIN commitmail json YAML

tests/lint: demonstrate wrong warnings about loss of accuracy

(rillig)

2022-05-26 18:08:33 UTC MAIN commitmail json YAML

lint: do not pre-multiply pointer expressions 'ptr + int'

In the AST, it is confusing to see that 'stderr == __sF + 304', it
should rather be 'stderr == __sF + 2'.

No functional change.

(rillig)

2022-05-26 17:23:09 UTC MAIN commitmail json YAML

lint: improve local variable and function names

No functional change.

(rillig)

2022-05-26 17:11:05 UTC MAIN commitmail json YAML

In ddb, fixed "trace/u" and user process memory read/write to work correctly.

In the softint context, curlwp points the kernel lwp, so to get the pmap
of a user process, we had to use curcpu()->ci_onproc->l_proc instead of
curproc (curlwp->l_proc). Adviced by ad@.

(ryo)

2022-05-26 16:52:30 UTC MAIN commitmail json YAML

lint: reduce scope of local variables in build_plus_minus

No functional change.

(rillig)

2022-05-26 16:45:25 UTC MAIN commitmail json YAML

lint: fix spacing and line breaks in debug logging

The spacing between function arguments in a declaration info was too
big, it was the indentation level instead of a single space.

The function debug_sym is used for two purposes: own-line and in-line,
which coincidentally are distinguished by whether the suffix string is
"\n".

(rillig)

2022-05-26 15:23:33 UTC MAIN commitmail json YAML

libc/ptree: remove CONSTCOND comments

Since 2021-01-31, lint does not need them anymore.

(rillig)

2022-05-26 15:05:11 UTC MAIN commitmail json YAML

Remove duplicated function declarations.

(tsutsui)

2022-05-26 14:39:30 UTC MAIN commitmail json YAML

altq.9: remove CONSTCOND comment from example code

Since 2021-01-31, lint no longer needs CONSTCOND in a do-while loop.

(rillig)

2022-05-26 14:33:29 UTC MAIN commitmail json YAML

2022-05-26 14:30:36 UTC MAIN commitmail json YAML