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 (13m)  netbsd-8 (5d)  netbsd-10 (6d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 12:37:36 UTC Now

2022-05-22 11:40:38 UTC MAIN commitmail json YAML

opencrypto: Prune dead code now that crypto_dispatch never fails.

(riastradh)

2022-05-22 11:40:29 UTC MAIN commitmail json YAML

2022-05-22 11:40:15 UTC MAIN commitmail json YAML

opencrypto: Assert driver process routine returns 0 or ERESTART.

No other errors are allowed -- other errors must be transmitted by
crypto_done.  All drivers in tree (sun8i_crypto, glxsb, via_padlock,
mvcesa, mvxpsec, hifn, qat, ubsec, cryptosoft) have been audited for
this.

(riastradh)

2022-05-22 11:40:04 UTC MAIN commitmail json YAML

opencrypto: Rip out EAGAIN logic when unregistering crypto drivers.

I'm pretty sure this never worked reliably based on code inspection,
and it's unlikely to have ever been tested because it only applies
when unregistering a driver -- but we have no crypto drivers for
removable devices, so it would only apply if we went out of our way
to trigger detach with drvctl.

Instead, just make the operation fail with ENODEV, and remove all the
callback logic to resubmit the request on EAGAIN.  (Maybe this should
be ENXIO, but crypto_kdispatch already does ENODEV.)

(riastradh)

2022-05-22 11:39:54 UTC MAIN commitmail json YAML

opencrypto: Assert nonnull callback up front in crypto_dispatch.

Same with crypto_kdispatch.

Convert some dead branches downstream to assertions too.

(riastradh)

2022-05-22 11:39:46 UTC MAIN commitmail json YAML

crypto(4): Nix dead code now that crypto_freesession never fails.

(riastradh)

2022-05-22 11:39:37 UTC MAIN commitmail json YAML

2022-05-22 11:39:27 UTC MAIN commitmail json YAML

2022-05-22 11:39:17 UTC MAIN commitmail json YAML

crypto(4): crypto_freesession should never fail here.

It can only fail if we pass it an invalid sid, which the logic to
maintain the user sessions should not do.  So kassert error=0 here.

(riastradh)

2022-05-22 11:39:08 UTC MAIN commitmail json YAML

2022-05-22 11:38:59 UTC MAIN commitmail json YAML

cryptosoft(4): Prune dead branches.  Assert session id validity.

(riastradh)

2022-05-22 11:38:51 UTC MAIN commitmail json YAML

mvxpsec(4): Prune dead branches.  Assert session id validity.

(riastradh)

2022-05-22 11:38:43 UTC MAIN commitmail json YAML

ubsec(4): Prune dead branches.  Assert session id validity.

(riastradh)

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

hifn(4): Prune dead branches.  Assert session id validity.

(riastradh)

2022-05-22 11:38:26 UTC MAIN commitmail json YAML

mvcesa(4): Prune dead branches.  Assert session id validity.

(riastradh)

2022-05-22 11:38:19 UTC MAIN commitmail json YAML

padlock(4): Prune dead branches.  Assert session id validity.

(riastradh)

2022-05-22 11:38:12 UTC MAIN commitmail json YAML

glxsb(4): Prune dead branches.  Assert session id validity.

(riastradh)

2022-05-22 11:38:03 UTC MAIN commitmail json YAML

padlock(4): Return zero, not error, if we've issued crypto_done.

(riastradh)

2022-05-22 11:35:21 UTC MAIN commitmail json YAML

glxsb(4): Return zero, not error, if we've issued crypto_done.

(riastradh)

2022-05-22 11:35:14 UTC MAIN commitmail json YAML

ubsec(4): Tidy up error branches of ubsec_process.

Make sure to return zero, not error, when we've already done
crypto_done and set crp_etype.

(riastradh)

2022-05-22 11:35:05 UTC MAIN commitmail json YAML

ubsec(4): Assert crp_sid is valid.

If opencrypto passes a bad sid in, that's a bug in opencrypto that
needs to be fixed, not a user-triggered invalid input that we need to
fail gracefully on.

(riastradh)

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

hifn(4): Make ERESTART return more obvious.

(riastradh)

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

hifn(4): Nix dead code.  crp and callback are guaranteed nonnull.

(riastradh)

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

opencrypto: Assert crp_desc and crp_buf are nonnull.

- crypto_getreq ensures crp_desc is nonnull.
- Caller is responsible for setting crp_buf.

(riastradh)

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

crypto(4): Refuse crypto operations with nothing in them earlier.

This way we avoid passing 0 to crypto_getreq -- makes it easier to
reason about everything downstream.

(riastradh)

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

opencrypto: Assert num>0 in crypto_getreq, num=1 in crypto_kgetreq.

- For crypto_getreq this makes downstream reasoning easier: on
  success, crp_desc is guaranteed to be nonnull.

- For crypto_kgetreq, this was already assumed, just silently
  ignored and not checked by anything.

(riastradh)

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

hifn(4): hifn_compression always returns zero.  Prune dead branches.

(riastradh)

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

hifn(4): Fix error branches to do crypto_done, not return error.

(riastradh)

2022-05-22 11:30:58 UTC MAIN commitmail json YAML

ubsec(4): ubsec_kprocess always returns zero.  Prune dead branches.

(riastradh)

2022-05-22 11:30:49 UTC MAIN commitmail json YAML

ubsec(4): Fix error branch: call crypto_kdone, don't return error.

(riastradh)

2022-05-22 11:30:41 UTC MAIN commitmail json YAML

opencrypto: Make crp_callback, krp_callback return void.

Nothing uses the return values inside opencrypto, so let's stop
making users return them.

(riastradh)

2022-05-22 11:30:05 UTC MAIN commitmail json YAML

opencrypto: Nix CRYPTO_F_DONE.

Nothing uses it any more.

(riastradh)

2022-05-22 11:29:54 UTC MAIN commitmail json YAML

crypto(4): Fix possible use-after-free in race around detach.

This is extremely unlikely because I don't think we have any drivers
for removable crypto decelerators^Waccelerators...but if we were to
sprout one, and someone ran crypto_dispatch concurrently with
crypto_unregister, cryptodev_cb/mcb would enter with crp->crp_etype =
EAGAIN and with CRYPTO_F_DONE set in crp->crp_flags.  In this case,
cryptodev_cb/mcb would issue crypto_dispatch but -- since nothing
clears CRYPTO_F_DONE -- it would _also_ consider the request done and
notify the ioctl thread of that.

With this change, we return early if crypto_dispatch succeeds.  No
need to consult CRYPTO_F_DONE: if the callback is invoked it's done,
and if we try to redispatch it on EAGAIN but crypto_dispatch fails,
it's done.  (Soon we'll get rid of the possibility of crypto_dispatch
failing synchronously, but not just yet.)

XXX This path could really use some testing!

(riastradh)

2022-05-22 11:29:25 UTC MAIN commitmail json YAML

cryptosoft(4): Rip out nonsense to quietly ignore sid=0.

This is no longer necessary because crypto_freesession no longer
calls into the driver for session ids that were never allocated in
the first place.

(riastradh)

2022-05-22 11:27:37 UTC MAIN commitmail json YAML

2022-05-22 11:25:14 UTC MAIN commitmail json YAML

opencrypto: Make sid=0 always invalid, but OK to free.

Previously, crypto_newsession could sometimes return 0 as the
driver-specific part of the session id, and 0 as the hid, for sid=0.
But netipsec assumes that it is always safe to free sid=0 from
zero-initialized memory even if crypto_newsession has never
succeeded.  So it was up to every driver in tree to gracefully handle
sid=0, if it happened to get assigned hid=0.  And, as long as the
freesession callback was expected to just return an error code when
given a bogus session id, that worked out fine...because nothing ever
used the error code.

That was a terrible fragile system that should never have been
invented.  Instead, let's just ensure that valid session ids are
nonzero, and make crypto_freesession with sid=0 be a no-op.

(riastradh)

2022-05-22 10:45:02 UTC MAIN commitmail json YAML

gomoku: document a missed immediate win

No binary change.

(rillig)

2022-05-22 09:57:58 UTC MAIN commitmail json YAML

Note that binutils 2.38 has been released in February.

While there, switch home page to HTTPS.

(fcambus)

2022-05-22 09:17:15 UTC MAIN commitmail json YAML

gomoku: extract main_game_loop from main

No functional change.

(rillig)

2022-05-22 08:59:34 UTC MAIN commitmail json YAML

Use PRIxBUSADDR for bus_addr_t in debug printf.

Kernel i386/ALL compiles again.

(hannken)

2022-05-22 08:58:31 UTC MAIN commitmail json YAML

gomoku: turn comments for testing mode into actual code

No functional change.

(rillig)

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

gomoku: extract read_color from main

No functional change.

(rillig)

2022-05-22 08:36:15 UTC MAIN commitmail json YAML

gomoku: extract declare_winner from main

(rillig)

2022-05-22 08:31:12 UTC MAIN commitmail json YAML

gomoku: extract ask_user_color from main

No functional change.

(rillig)

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

gomoku: extract read_move from main

No functional change.

(rillig)

2022-05-22 08:22:43 UTC MAIN commitmail json YAML

gomoku: extract set_input_sources from main

No functional change.

(rillig)

2022-05-22 08:18:49 UTC MAIN commitmail json YAML

gomoku: extract parse_args from main

No functional change.

(rillig)

2022-05-22 08:12:15 UTC MAIN commitmail json YAML

gomoku: extract save_game from main

No functional change.

(rillig)

2022-05-22 05:33:46 UTC MAIN commitmail json YAML

usbhid.3: hid_parse_usage_in_page() actually returns int

(charlotte)

2022-05-22 00:54:08 UTC MAIN commitmail json YAML

2022-05-22 00:47:00 UTC MAIN commitmail json YAML

usbdevs: Add Wacom "One" CTL-671 tablet

(charlotte)

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

rename CONFIG_AARCH64 to CONFIG_ARM64 which is what upstream code expects

(tnn)

2022-05-21 23:42:13 UTC MAIN commitmail json YAML

drm_cache.h: fix a merge error

this reverts revision 1.3 which should have been reverted when it got
introduced by upstream through revision 1.5.

(tnn)

2022-05-21 23:11:03 UTC MAIN commitmail json YAML

crypto(4): Fix set-but-unused variable warning.

This deliberately ignores the error code returned by crypto_dispatch,
but that error code is fundamentally incoherent and the issue will be
mooted by subsequent changes to make it return void and always pass
the error through the callback, as well as subsequent changes to rip
out the EAGAIN logic anyway.

(riastradh)

2022-05-21 20:38:34 UTC MAIN commitmail json YAML

tests/crypto/opencrypto: Wait a bit for async results.

These may not be ready immediately.

(riastradh)

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

crypto(4): Don't signal the condvar for multi-operation completion.

The condvar may be destroyed by the time we got here, and nothing
waits on it anyway -- instead the caller is expected to select/poll
for completion in userland.

The bug was already here, but the recent change to eliminate
CRYPTO_F_CBIMM made it happen more often by causing the callback to
_always_ be run asynchronously instead of sometimes being run
synchronously.

(riastradh)

2022-05-21 19:57:06 UTC MAIN commitmail json YAML

argon2: Silence -Wmissing-noreturn in thread.c on clang.

Saves the trouble of patching it away in external code.

(riastradh)

2022-05-21 19:07:23 UTC MAIN commitmail json YAML

2022-05-21 19:02:15 UTC MAIN commitmail json YAML

gomoku: fix error handling when reading moves from a file

The columns of the board are labeled from A to H and J to T, which makes
I5 or i5 an invalid coordinate.  Previously, reading this invalid
coordinate from a file resulted in the string "<6" appearing in the move
log.

The 'i' was converted into the nonexistent column 20, and PT(20, 5) got
an out-of-bounds argument, resulting in spot 120.  Converting this spot
back into coordinates resulted in PT(0, 6).  The '<' comes from
'letters[0]'.

(rillig)

2022-05-21 17:50:21 UTC MAIN commitmail json YAML

2022-05-21 17:19:11 UTC MAIN commitmail json YAML

2022-05-21 16:39:14 UTC MAIN commitmail json YAML

2022-05-21 15:21:40 UTC MAIN commitmail json YAML

gomoku: move comments closer to their corresponding entities

No binary change.

(rillig)

2022-05-21 15:11:24 UTC MAIN commitmail json YAML

gomoku: inline macro MAXCOMBO

The name of the macro was not descriptive enough, the other constants in
bdinit also don't have names.

No binary change.

(rillig)

2022-05-21 15:03:08 UTC MAIN commitmail json YAML

doc/CHANGES: Expand notes on vether(4) and tap(4).

(riastradh)

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

doc/CHANGES: Nix trailing whitespace.

(riastradh)

2022-05-21 14:55:26 UTC MAIN commitmail json YAML

gomoku: convert input source constants to an enum

I also tried converting other macros, but s_occ would use more memory
and the return values for makemove are special values, besides the usual
coordinates in the form PT(x, y), so turning the special values into an
enum would be confusing.

No functional change.

(rillig)

2022-05-21 14:23:10 UTC MAIN commitmail json YAML

gomoku: shorten code, error out on too many arguments

(rillig)

2022-05-21 13:31:29 UTC MAIN commitmail json YAML

opencrypto/h_ioctl: Print error messages with warn.

Might help track down what's going on when this fails.

(riastradh)

2022-05-21 12:34:45 UTC MAIN commitmail json YAML

curses_input.3: wtimeout() returns void too

(uwe)

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

2022-05-21 12:16:54 UTC MAIN commitmail json YAML

gomoku: do not accept overly long lines from the input

Typing beyond the screen and then pressing and holding backspace still
removes the prompt, just as before.

(rillig)

2022-05-21 12:08:06 UTC MAIN commitmail json YAML

gomoku: fix deleting a character when reading a line

(rillig)

2022-05-21 10:33:05 UTC MAIN commitmail json YAML

Correct byte-order for bufsize field of RX descriptor.

XXX
This bug affected only armeb. Unfortunately, the systems including
armel still lock up eventually with NFS root on mvgbe(4)...

(rin)

2022-05-21 10:27:30 UTC MAIN commitmail json YAML

m_freem() *after* bus_dmamap_sync() and bus_dmamap_load() for
that mbuf. This is mandatory for some archs.

(rin)

2022-05-21 10:24:50 UTC MAIN commitmail json YAML

Add DPRINTF() to catch failure of m_defrag() in mvgbe_encap().

(rin)

2022-05-21 10:22:27 UTC MAIN commitmail json YAML

Raise threshold of debug level to 3 for DPRINTF() in non-error path of
mvgbe_encap(). Without this change, debug level 2 is almost unusable...

(rin)

2022-05-21 10:01:49 UTC MAIN commitmail json YAML

gomoku: prevent thinking for too long

At search depth 9, picking a move takes about a minute on modern
hardware, which is enough for casual game play.  Even then, gomoku does
not always find the perfect move, so investing that much time seems
questionable.  Limiting the search depth also puts an upper bound on the
memory usage, which is quite high with 150 MB.

(rillig)

2022-05-21 09:57:54 UTC MAIN commitmail json YAML

gomoku: in debug mode, after pressing 'd', allow another debug command

While here, remove the sleeping, as there is no obvious reason for it.

(rillig)

2022-05-21 09:25:51 UTC MAIN commitmail json YAML

gomoku: make drawing the player's names simpler

No functional change.

(rillig)

2022-05-21 06:22:49 UTC MAIN commitmail json YAML

curses_input.3: timeout() actually returns void

(charlotte)

2022-05-21 01:38:14 UTC MAIN commitmail json YAML

fix typo in sigaction(2)

(dholland)

2022-05-20 21:31:24 UTC MAIN commitmail json YAML

2022-05-20 21:18:55 UTC MAIN commitmail json YAML

2022-05-20 21:03:04 UTC MAIN commitmail json YAML

2022-05-20 19:34:23 UTC MAIN commitmail json YAML

2022-05-20 19:30:17 UTC MAIN commitmail json YAML

gomoku: fix spelling and grammar in comments

(rillig)

2022-05-20 16:12:34 UTC MAIN commitmail json YAML

Build OPENBLOCKS_A6 kernel for evbarmv5-e[bl].

It works --- except for:

- mvsata(4) problems (already reported repeatedly)
- NFS root with mvgbe(4) is weird; the system eventually locks up

Yes, we need to fix them...

(rin)

2022-05-20 15:11:07 UTC MAIN commitmail json YAML

Hmm, fix typo in comments again...

(rin)

2022-05-20 15:09:15 UTC MAIN commitmail json YAML

Fix typo for the previous. No binary changes.

(rin)

2022-05-20 15:04:15 UTC MAIN commitmail json YAML

Initial support for armv5eb on Sheeva.

Disable L2 cache for Sheeva before switch to big-endian mode.

Note that we need to encode this code sequence in little endian,
as u-boot starts kernel in little-endian mode.

XXX
At the moment, this code is unconditionally enabled if CPU_SHEEVA
option is enabled; it does not work for older CPUs.

It would be better to determine CPU type automatically as done for
little-endian variant, but it is too ugly to hand-assemble for
the opposite byte-order.

It may be nice if we have tools something like:

$ nbarm-elf-bswap -s marvell_start -e Lswitch_endian_done netbsd

Tested for OPENBLOCKS_A6 (for CPU_SHEEVA), as well as KUROBOX_PRO
(for !CPU_SHEEVA).

(rin)

2022-05-20 14:42:01 UTC MAIN commitmail json YAML

Comment out most of USB devices. Fix boot failure since netbsd-8.

There is an upper limit of kernel size for u-boot, somewhere at ~6MB.
If kernel exceeds this limit, work area of u-boot gets broken.

(rin)

2022-05-20 13:55:17 UTC MAIN commitmail json YAML

Improve Hyper-V support.

vmbus(4):
- Added support for multichannel.

hvn(4):
- Added support for multichannel.
- Added support for change MTU.
- Added support for TX aggregation.
- Improve VLAN support.
- Improve checksum offload support.

(nonaka)

2022-05-20 07:47:17 UTC MAIN commitmail json YAML

fix some misspellings and remove trailing whitespaces.

(andvar)

2022-05-20 06:59:02 UTC MAIN commitmail json YAML

Add the character read in as part of imxuart_common_putc into the
readahead buffer

port-arm/45354: no character is put in the read-ahead buffer in a console code of arch/arm/imx/imxuart.c

(skrll)

2022-05-20 06:56:59 UTC MAIN commitmail json YAML

Use a macro.  Part of

port-arm/45354: no character is put in the read-ahead buffer in a console code of arch/arm/imx/imxuart.c

(skrll)

2022-05-19 23:12:40 UTC MAIN commitmail json YAML

gomoku: remove unused function 'list_eq'

(rillig)

2022-05-19 22:49:05 UTC MAIN commitmail json YAML

gomoku: use combined curses functions

To save some screen space in the source code and some bytes in the
generated binary.

No functional change.

(rillig)

2022-05-19 22:29:36 UTC MAIN commitmail json YAML

gomoku: use NULL instead of more verbose null pointer

No binary change.

(rillig)

2022-05-19 22:24:54 UTC MAIN commitmail json YAML

gomoku: clean up coordinate for the currently selected spot

There is no need to make this coordinate dependent on the board size.

No binary change.

(rillig)

2022-05-19 22:19:18 UTC MAIN commitmail json YAML

gomoku: clean up version control sections

Lint can handle these definitions, and the '#if 0' is redundant.

No functional change.

(rillig)

2022-05-19 20:51:59 UTC MAIN commitmail json YAML

opencrypto: Assert !cpu_intr_p() on dispatch and invoke.

These should only ever have been potentially called from hard
interrupt context by CRYPTO_F_CBIMM callbacks (CBIMM = call back
immediately).  CRYPTO_F_CBIMM is no more, so there is no more need to
allow this case of call from hard interrupt context.

(riastradh)

2022-05-19 20:51:46 UTC MAIN commitmail json YAML

opencrypto: Nix CRYPTO_F_USER, CRYPTO_F_CBIMM, CRYPTO_F_CBIFSYNC.

CRYPTO_F_USER is no longer needed.  It was introduced in 2008 by
darran@ in crypto.c 1.30, cryptodev.c 1.45 in an attempt to avoid
double-free between the issuing thread and asynchronous callback.
But the `fix' didn't work.  In 2017, knakahara@ fixed it properly in
cryptodev.c 1.87 by distinguishing `the crypto operation has
completed' (CRYPTO_F_DONE) from `the callback is done touching the
crp object' (CRYPTO_F_DQRETQ, now renamed to CRYPTODEV_F_RET).

CRYPTO_F_CBIMM formerly served to invoke the callback synchronously
from the driver's interrupt completion routine, to reduce contention
on what was once a single cryptoret thread.  Now, there is a per-CPU
queue and softint for much cheaper processing, so there is less
motivation for this in the first place.  So let's remove the
complicated logic.  This means the callbacks never run in hard
interrupt context, which means we don't need to worry about recursion
into crypto_dispatch in hard interrupt context.

(riastradh)

2022-05-19 20:09:46 UTC MAIN commitmail json YAML

gomoku: remove unreachable code at the end of main

In C99 mode, lint accepts when control gets to the end of main without
returning a value.  It does not know anything about __dead though.

No binary change.

(rillig)

2022-05-19 19:52:56 UTC MAIN commitmail json YAML

gomoku: replace magic numbers with proper coordinate calculation

(rillig)

2022-05-19 19:18:03 UTC MAIN commitmail json YAML

PR/56840: Andrew Cagney: use the proper polarity hton/ntoh macros (no
functional change).
Factor out spi retrieving code into a function.

(christos)

2022-05-19 19:16:38 UTC MAIN commitmail json YAML

gomoku: properly center the player's names

(rillig)

2022-05-19 18:58:59 UTC MAIN commitmail json YAML

gomoku: de-obfuscate screen coordinate calculation

Modern compilers optimize linear integer arithmetic, so there is no
reason to use strange or misleading formulas.

Replace several magic numbers with proper formulas.

No binary change.

(rillig)

2022-05-19 17:24:14 UTC MAIN commitmail json YAML

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument.  On the other hand, the constant TRUE = 1
could not be passed in the same way.  Remove this inconsistency.

(rillig)

2022-05-19 17:10:50 UTC MAIN commitmail json YAML

tests/lint: extend tests for type mismatch in strict bool mode

Seen in games/gomoku when calling curses functions.

(rillig)

2022-05-19 17:02:51 UTC MAIN commitmail json YAML

gomoku: fix error message for small screen

- gomoku: Screen too small (need 8018d)
+ gomoku: Screen too small (need 80x24)

(rillig)

2022-05-19 16:58:39 UTC MAIN commitmail json YAML

gomoku: fix type mismatch in call to curses function

Not yet detected by lint, as lint is more permissive for type mismatches
if the value is a constant 0.  Being permissive doesn't make sense in
this case.  Now the calls to 'keypad' and 'leaveok' are consistent.

No binary change.

(rillig)

2022-05-19 16:25:11 UTC netbsd-9 commitmail json YAML

2022-05-19 16:24:20 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by buhrow in ticket #1456):

sys/dev/pci/if_bge.c: revision 1.353

For chips which contain an ASF/IPMI firmware, instruct the chip to shut
the host ASF firmware down when attaching the device so the IPMI BMC
can use the same physical port even when NetBSD doesn't have a
network configuration on the device.
By contrast, when the device gets a network configuration assigned to
it and bge_init() is called, the host ASF firmware is brought up so
both NetBSD and the IPMI BMc can use the same physical port.

This now matches FreeBSD behavior, as well as  behavior from NetBSD-5.2.

Tested on a Sunfire X2200-M2 system with the following chip:

bge1 at pci7 dev 4 function 1: Broadcom BCM5715 Gigabit Ethernet
bge1: interrupting at ioapic0 pin 11
bge1: HW config 000000d4, 00000014, 00000000, 00000000 00000000
bge1: ASIC BCM5715 A3 (0x9003), Ethernet address 00:1e:68:XX:XX:XX
bge1: setting short Tx thresholds
brgphy1 at bge1 phy 1: BCM5714 1000BASE-T/X media interface, rev. 0
brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto

(martin)

2022-05-19 13:57:03 UTC MAIN commitmail json YAML

Bump some column widths for "vmstat -mW".

(simonb)

2022-05-19 09:54:27 UTC MAIN commitmail json YAML

Restore de EOI mechanism for pirq, using the newer hypervisor interface.
It is needed.
Hopefully fixes kern/56291, kern/56793, kern/55667

(bouyer)

2022-05-19 07:41:26 UTC MAIN commitmail json YAML

Set the last change pointer after adding a character at the bottom right
of a window.  This fixes the character missing in the LR of a window.
Thanks to uwe@ for pointing this out.

(blymn)

2022-05-19 07:10:15 UTC MAIN commitmail json YAML

Use RAS_{START,END}_ASM_HIDDEN

(skrll)

2022-05-19 06:41:45 UTC MAIN commitmail json YAML

port-hppa/56837: RAS support is slightly incorrect within hppa kernel, too

While there isn't a bug here (the tf_iioq_tail handling is correct) apply
the change to make the conditional / ras symbols consistent with hppa_ras

(skrll)

2022-05-19 04:43:43 UTC MAIN commitmail json YAML

For chips which contain an ASF/IPMI firmware, instruct the chip to shut the host ASF firmware
down when attaching the device so the IPMI BMC can use the same physical port even when NetBSD
doesn't have a network configuration on the device.  By contrast, when the device gets a
network configuration assigned to it and bge_init() is called, the host ASF firmware is brought
up so both NetBSD and the IPMI BMc can use the same
physical port.

This now matches FreeBSD behavior, as well as  behavior from NetBSD-5.2.

Tested on a Sunfire X2200-M2 system with the following chip:

bge1 at pci7 dev 4 function 1: Broadcom BCM5715 Gigabit Ethernet
bge1: interrupting at ioapic0 pin 11
bge1: HW config 000000d4, 00000014, 00000000, 00000000 00000000
bge1: ASIC BCM5715 A3 (0x9003), Ethernet address 00:1e:68:XX:XX:XX
bge1: setting short Tx thresholds
brgphy1 at bge1 phy 1: BCM5714 1000BASE-T/X media interface, rev. 0
brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto

(buhrow)

2022-05-19 04:08:03 UTC MAIN commitmail json YAML

apropos(1): improve error handling in edge cases

Patch from RVP on NetBSD-Users, with an additional comment tweak by me.
Summary from RVP:

1. Ignore SIGPIPE so that we're not killed in the middle of some
  DB operation by a botched $PAGER:

$ env PAGER=/non-existent apropos -p ...

2. Return proper exit status in case of write errors:

$ apropos ... >/dev/full || echo fail

(gutteridge)

2022-05-19 03:58:13 UTC MAIN commitmail json YAML

2022-05-19 03:42:51 UTC MAIN commitmail json YAML

2022-05-19 03:42:12 UTC MAIN commitmail json YAML

usbdevs: Add Xbox 360 controller

(charlotte)

2022-05-19 02:23:59 UTC MAIN commitmail json YAML

Don't set the more flag when there is no packet to process.

Move the location of the loop limit check next to the DD bit test. This
change prevent from scheduling the next txrx_work that does nothing.

(msaitoh)

2022-05-19 02:22:59 UTC MAIN commitmail json YAML

Call wm_xxeof() only when limit > 0.

It's not required to call wm_xxeof() when limit == 0. It means that
all xxeof processing will be done by softint or workqueue. Currently,
wm_xxeof() returns quickly before checking the descriptor head when
limit == 0 and return with ture to set the more flag.

(msaitoh)

2022-05-18 22:35:13 UTC MAIN commitmail json YAML

gomoku: reduce scope of local variables

No binary change.

(rillig)

2022-05-18 22:30:19 UTC MAIN commitmail json YAML

2022-05-18 21:45:40 UTC MAIN commitmail json YAML

gomoku: rename local variable

Not every array of "characters" is a string.  In this case, it's rather
an array of bool.

No binary change.

(rillig)

2022-05-18 20:10:11 UTC MAIN commitmail json YAML

2022-05-18 20:03:58 UTC MAIN commitmail json YAML

crypto(4): Simplify error test in cryptodev_op.

No functional change intended.

(riastradh)

2022-05-18 20:03:45 UTC MAIN commitmail json YAML

crypto(4): Narrow scope of cryptodev_mtx to cover wait.

No functional change intended -- this only removes an unnecessary
lock/unlock cycle in the error case.

(riastradh)

2022-05-18 20:03:32 UTC MAIN commitmail json YAML

crypto(4): Nix long-dead code and comments.

(riastradh)

2022-05-18 20:02:49 UTC MAIN commitmail json YAML

crypto(4): Use IPL_NONE, not IPL_NET, for /dev/crypto pools.

These are used (pool_get/put) only from thread context, never from
interrupt or even soft interrupt context.

(riastradh)

2022-05-18 20:01:21 UTC MAIN commitmail json YAML

lint: reduce negations in typeok_point, document check_expr_misc

No functional change.

(rillig)

2022-05-18 19:29:00 UTC MAIN commitmail json YAML

gomoku: call setprogname, for portability

No functional change on NetBSD, but the games are distributed to other
platforms as well.

(rillig)

2022-05-18 19:25:12 UTC MAIN commitmail json YAML

tests/lint: add more examples for warning in comma expression

(rillig)

2022-05-18 16:39:03 UTC MAIN commitmail json YAML

2022-05-18 15:20:18 UTC MAIN commitmail json YAML

PR/56841: Andrew Cagney: debug-log IPcomp CPI lookups:
    - debug-logs why an SPI is rejected
    - adds missing __VA_OPT__(,) to some printf macros
    - debug-log SPI+proto when adding/updating entry

(christos)

2022-05-18 13:56:32 UTC MAIN commitmail json YAML

2022-05-18 13:38:47 UTC MAIN commitmail json YAML

2022-05-18 13:37:52 UTC MAIN commitmail json YAML

2022-05-18 12:48:50 UTC MAIN commitmail json YAML

ubsec(4): Nix dead code.

No functional change intended.

(riastradh)

2022-05-18 00:37:11 UTC MAIN commitmail json YAML

2022-05-17 18:56:30 UTC MAIN commitmail json YAML

Use the Makefile.inc from libargon2 (fixes the vax build that requires
a compiler hack).

(christos)

2022-05-17 18:55:41 UTC MAIN commitmail json YAML

2022-05-17 15:00:05 UTC MAIN commitmail json YAML

cprng(9): Note ipl must be at most IPL_SOFTSERIAL now.

(riastradh)

2022-05-17 13:49:43 UTC netbsd-9 commitmail json YAML

2022-05-17 13:48:45 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by skrll in ticket #1453):

common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.5

Fix the copy&paste botch from previous.  Spotted by Tom Lane.

(martin)

2022-05-17 12:12:38 UTC netbsd-8 commitmail json YAML

2022-05-17 12:12:15 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by kre in ticket #1743):
libexec/mail.local/mail.local.c: revision 1.29
fix local privilege escalation due to a race condition
NetBSD-SA2016-006 included an incomplete fix for CVE-2016-6253,
a local privilege escalation vulnerability in mail.local(8).
mail.local(8) attempts to open(2) a user's existing mailbox file
to append to it.  If that call fails, mail.local(8) will then issue
a second open(2) call to create the file (O_CREAT).
An attacker had the opportunity to create the file in question (as
a symlink, or link to some other file) in between these two open(2) calls.
Fix this by using O_EXCL in the 2nd open call, if the file exists when
that one happens, something is going wrong, so just abort.  Also, only
attempt that 2nd open if the reason the first failed was that the file
did not exist (this doesn't fix the issue, but it potentially saves
some cycles).
Thanks to Jan Schaumann for bringing this to our attention.

(bouyer)

2022-05-17 12:11:08 UTC netbsd-9 commitmail json YAML

2022-05-17 12:10:25 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by kre in ticket #1455):
libexec/mail.local/mail.local.c: revision 1.29
fix local privilege escalation due to a race condition
NetBSD-SA2016-006 included an incomplete fix for CVE-2016-6253,
a local privilege escalation vulnerability in mail.local(8).
mail.local(8) attempts to open(2) a user's existing mailbox file
to append to it.  If that call fails, mail.local(8) will then issue
a second open(2) call to create the file (O_CREAT).
An attacker had the opportunity to create the file in question (as
a symlink, or link to some other file) in between these two open(2) calls.
Fix this by using O_EXCL in the 2nd open call, if the file exists when
that one happens, something is going wrong, so just abort.  Also, only
attempt that 2nd open if the reason the first failed was that the file
did not exist (this doesn't fix the issue, but it potentially saves
some cycles).
Thanks to Jan Schaumann for bringing this to our attention.

(bouyer)

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

MAKEDEV.tmpl: make /dev/wsfont world-readable

Now that we have WSDISPLAYIO_LISTFONTS we want users to be able to use it.

NB: older kernels didn't check that WSDISPLAYIO_LDFONT was performed
on wsfont(4) device opened for writing and relied on its restrictive
root-only permissions to restrict who can load fonts.

(uwe)

2022-05-17 11:37:54 UTC MAIN commitmail json YAML

apropos(1): Use the official spelling for "SQLite".

While here, use .Bx to refer to 3BSD.

(uwe)

2022-05-17 11:31:14 UTC MAIN commitmail json YAML

apropos(1): Tweak the description of -1, ... -9, and -s

-s is not for compatibility only, because section names can be
anything.  E.g. we have 3lua and 9lua in base.  We have rudiments of
3f (for FORTRAN libs).  Some packages in pkgsrc also use suffixed 1
and 3 sections.

(uwe)

2022-05-17 11:18:58 UTC MAIN commitmail json YAML

fix local privilege escalation due to a race condition

NetBSD-SA2016-006 included an incomplete fix for CVE-2016-6253,
a local privilege escalation vulnerability in mail.local(8).

mail.local(8) attempts to open(2) a user's existing mailbox file
to append to it.  If that call fails, mail.local(8) will then issue
a second open(2) call to create the file (O_CREAT).

An attacker had the opportunity to create the file in question (as
a symlink, or link to some other file) in between these two open(2) calls.

Fix this by using O_EXCL in the 2nd open call, if the file exists when
that one happens, something is going wrong, so just abort.  Also, only
attempt that 2nd open if the reason the first failed was that the file
did not exist (this doesn't fix the issue, but it potentially saves
some cycles).

Thanks to Jan Schaumann for bringing this to our attention.

(kre)

2022-05-17 10:35:22 UTC netbsd-8 commitmail json YAML

2022-05-17 10:33:46 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) via patch (requested by msaitoh in ticket #1454):
sys/dev/ic/mfi.c: revisions 1.63, 1.66-77
sys/dev/ic/mfireg.h: revisions 1.11-1.20 via patch
sys/dev/pci/mfi_pci.c: revision 1.21
sys/dev/pci/mfii.c: revisions 1.6-1.7, 1.10-1.15
share/man/man4/mfi.4: revision 1.13

Improve mfi(4) and mfii(4):
- Set 'ld_sync' to NULL as part of 'again', to prevent use-after-free.
- Add some code for the SKINNY variant to make Dell PERC H310 work.
- Print the percentage correctly when the background initialization is
  running.
- Clear mailbox to not to pass garbage data.
- Use union mbox instead of unit8_t xxx[] to avoid unaligned access.
- Set stripe size for BIOCVOL to show the size correctly in bioctl.
- Add support for iBBU-09 to show BBU voltage, current and temperature
  correctly.
- Fix typos in comments.
- Sprinkle static.
- Improve debug printf()s.
- KNF. Remove extra semicolon. Whitespace fixes.

(bouyer)

2022-05-17 10:32:58 UTC MAIN commitmail json YAML

opencrypto: Factor setting CRYPTO_F_DONE out of branches.

This had been done in 1.30 when the locking was different.  No need
any more.  No functional change intended.

(riastradh)

2022-05-17 10:30:22 UTC netbsd-9 commitmail json YAML

2022-05-17 10:29:47 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) via patch (requested by msaitoh in ticket #1454):
sys/dev/ic/mfi.c: revisions 1.63, 1.66-77
sys/dev/ic/mfireg.h: revisions 1.11-1.20 via patch
sys/dev/pci/mfi_pci.c: revision 1.21
sys/dev/pci/mfii.c: revisions 1.6-1.7, 1.10-1.15
share/man/man4/mfi.4: revision 1.13

Improve mfi(4) and mfii(4):
- Set 'ld_sync' to NULL as part of 'again', to prevent use-after-free.
- Add some code for the SKINNY variant to make Dell PERC H310 work.
- Print the percentage correctly when the background initialization is
  running.
- Clear mailbox to not to pass garbage data.
- Use union mbox instead of unit8_t xxx[] to avoid unaligned access.
- Set stripe size for BIOCVOL to show the size correctly in bioctl.
- Add support for iBBU-09 to show BBU voltage, current and temperature
  correctly.
- Fix typos in comments.
- Sprinkle static.
- Improve debug printf()s.
- KNF. Remove extra semicolon. Whitespace fixes.

(bouyer)

2022-05-17 10:28:08 UTC MAIN commitmail json YAML

pfil(9): Assert pfil lists are not run in interrupt context.

All the paths leading to this should have been dispensed with by now.
The network stack runs in thread or softint context these days; hard
interrupt context is used only to put packets on queues deferred to
softint.

(riastradh)

2022-05-17 10:27:37 UTC MAIN commitmail json YAML

pfil(9): Assert sleepable when editing pfil lists.

These might sleep to wait for users to drain.

(riastradh)

2022-05-17 10:23:18 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by tnn in ticket #1452):
external/gpl2/dtc/dist/dtc-lexer.l: revision 1.5
Satisfy -fno-common

(bouyer)

2022-05-17 09:53:09 UTC MAIN commitmail json YAML

opencrypto(9): Omit needless casts around callbacks.

Just declare the right types to begin with.  No functional change
intended.

(riastradh)

2022-05-17 08:39:58 UTC MAIN commitmail json YAML

apropos(1): use proper -width for the list of options too

(uwe)

2022-05-17 08:35:46 UTC MAIN commitmail json YAML

apropos(1): use proper -width

(uwe)

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

2022-05-17 01:39:57 UTC MAIN commitmail json YAML

rnd(9): Note that rndsource callbacks are never run in hardint.

But they may be run in softint at IPL_SOFTSERIAL.

(riastradh)

2022-05-17 01:22:14 UTC MAIN commitmail json YAML

apropos.1: document the PAGER environment variable

(gutteridge)

2022-05-17 00:21:22 UTC MAIN commitmail json YAML

apropos.c: fix pager functionality

Issue reported by Rocky Hotas on NetBSD-Users, patch input from RVP on
same, adjustments by me.

(gutteridge)

2022-05-17 00:02:57 UTC MAIN commitmail json YAML

Call m_freem(m) only if m0 == NULL.

(msaitoh)

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

gomoku: highlight the last played move

(rillig)

2022-05-16 21:53:41 UTC MAIN commitmail json YAML

gomoku: add usage

(rillig)

2022-05-16 21:48:46 UTC MAIN commitmail json YAML

2022-05-16 21:38:46 UTC MAIN commitmail json YAML

gomoku: fix remaining lint warnings in -DDEBUG mode

The generated code changes since the calculations are now performed with
int precision.  No functional change since no overflow occurs.

(rillig)

2022-05-16 21:35:39 UTC MAIN commitmail json YAML

gomoku: fix most lint warnings in -DDEBUG mode

No binary change.

(rillig)

2022-05-16 21:28:06 UTC MAIN commitmail json YAML

try to handle ultrasparc III* "fast ecc error" traps.

i had a sunblade 2500 reset with this trap recently, and the
manual says it should have been recoverable.  in particular,
the US IIIv2 manual says in section 12.4.4.2 that the i-cache
won't see this data ever (so nothing needed there), and that
the d-cache needs to be disabled, and all the entries flushed,
and then re-enabled.

tested with a "trap 0x70" from kernel space, that trap.c
converted the "0x170" back to "0x70" (with an ADVANCE).  this
code not commited.

(mrg)

2022-05-16 21:02:18 UTC MAIN commitmail json YAML

2022-05-16 20:57:01 UTC MAIN commitmail json YAML

2022-05-16 20:09:13 UTC MAIN commitmail json YAML

curses_input.3: fix argument type for keypad, notimeout, nodelay

There is no type named 'boolf', there's only 'bool'.

(rillig)

2022-05-16 19:55:58 UTC MAIN commitmail json YAML

gomoku: fix lint warnings

Most warnings were about implicit conversions from ptrdiff_t to int; add
explicit cast for them, as they are far from overflowing int.

The casts from one pointer type to 'struct combostr **' were indeed
suspicious.  In these cases, a single region of memory is allocated to
store two objects of different type, without declaring a struct type for
their combination.  The second object is an array of variable size.

No binary change.

(rillig)

2022-05-16 19:20:25 UTC MAIN commitmail json YAML

gomoku: condense code to decide which spot is better

The comments in the conditions only serve to align the expressions, to
allow humans to check that they correspond.

No functional change.

(rillig)

2022-05-16 18:44:39 UTC MAIN commitmail json YAML

Split the available disks (that may be partitioned) from the
preconfigured wedges (that can be install target, but can not be
partitioned). The latter are only usefull in special setups
and clobber the list of available disks for the usual setup cases.

(martin)

2022-05-16 17:13:28 UTC MAIN commitmail json YAML

sun4v/vdsk: add handling of SCSI_REPORT_LUNS

(palle)

2022-05-16 14:57:44 UTC MAIN commitmail json YAML

make things behave just like before the libcrypt symbol renaming:
The normal cgdconfig binary is built with threads and the crunched one
in rescue without.

(christos)

2022-05-16 14:55:56 UTC MAIN commitmail json YAML

remove threads; size constraints and behavioral change

(christos)

2022-05-16 10:53:14 UTC MAIN commitmail json YAML

Alter error messages so they no longer claim that bad input is illegal.

(kre)

2022-05-16 10:52:09 UTC MAIN commitmail json YAML

Add -lpthread for the benefit or argon2 in cgdconfig

(christos)

2022-05-16 10:44:06 UTC MAIN commitmail json YAML

Re-enable threads; apparently we get different results depending if we are
threaded or not... This tastes like a bug.

(christos)

2022-05-16 10:03:23 UTC MAIN commitmail json YAML

sdmmc: ld: Include the card type (SD card, MMC) in the disk description.

(jmcneill)

2022-05-16 09:42:32 UTC MAIN commitmail json YAML

2022-05-16 07:07:17 UTC MAIN commitmail json YAML

port-arm/50635: arm11_setup() cpuctrlmask value causes CPU_CONTROL_VECRELOC bit to toggle

Fix slightly differently to as suggested in the PR.  Annotate arm10_setup
while I'm here.

(skrll)

2022-05-16 06:07:23 UTC MAIN commitmail json YAML

Fix the copy&paste botch from previous.  Spotted by Tom Lane.

(skrll)

2022-05-16 04:52:11 UTC MAIN commitmail json YAML

ctwmrc: Turn off sysinst menu item for now, it requires root for most
functions and users likely aren't running X as root.  Also turn off
the xman menu item until a custom greeter screen can be imported
(also note apropos is broken)...

(nia)

2022-05-15 22:56:20 UTC MAIN commitmail json YAML

gomoku: inline macros BSZ1, BSZ2, BSZ3, BSZ4

These macro names didn't convey any meaning, so replace them with their
replacement text, to have fewer identifiers to worry about.

No binary change.

(rillig)

2022-05-15 22:41:51 UTC MAIN commitmail json YAML

gomoku: remove write-only members from overlap_info

Since overlap_info is only used in pickmove.c, move it there.

No functional change.  In particular, in the middle of a game, gomoku
still tends to fall into analysis paralysis, thinking about the best
move for more than 3 minutes on modern hardware.  Since the algorithm is
basically unchanged since the 1990s, it must have been a long waiting
time back then, probably an hour per move.

(rillig)

2022-05-15 22:18:36 UTC MAIN commitmail json YAML

gomoku: remove column macros

Of the 19 macros, only 3 were actually used.  Replace their uses with
expressions based on the board size.  It's a small step to making the
board size adjustable.  There are still other places using hard-coded
numbers.

No binary change.

(rillig)

2022-05-15 22:08:05 UTC MAIN commitmail json YAML