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

2024-05-10 02:30:29 UTC Now

2022-06-11 09:15:49 UTC MAIN commitmail json YAML

2022-06-11 08:06:32 UTC MAIN commitmail json YAML

make: condense Str_Match

The test for '\\' followed by '\0' was redundant since at that point,
*str is guaranteed to be not '\0', which takes the next 'return false'.

No functional change.

(rillig)

2022-06-11 07:54:25 UTC MAIN commitmail json YAML

tests/make: demonstrate another pathological pattern match

(rillig)

2022-06-11 04:57:57 UTC MAIN commitmail json YAML

Specify -fno-unwind-tables to shrink binaries.

(tsutsui)

2022-06-10 22:42:47 UTC MAIN commitmail json YAML

make: rename loadfile to LoadFile

It was the only function in parse.c that had a lowercase name.

No functional change.

(rillig)

2022-06-10 22:35:05 UTC MAIN commitmail json YAML

make: split IncludeFile into separate functions

No functional change.

(rillig)

2022-06-10 22:23:19 UTC MAIN commitmail json YAML

make: extract half of IncludeFile into a separate function

No functional change.

(rillig)

2022-06-10 22:04:49 UTC MAIN commitmail json YAML

make: condense code for searching a file in the paths

No functional change.

(rillig)

2022-06-10 21:43:30 UTC MAIN commitmail json YAML

Mention about luna68k psgpam(4) audio.

(tsutsui)

2022-06-10 21:42:24 UTC MAIN commitmail json YAML

luna68k: add psgpam(4) audio for LUNA, using YM2149 PSG/SSG sound chip.

"PSG PAM" is a audio driver using "Pulse Amplitude Modulation" with the
YM2149 PSG/SSG chip connected to the I/O processor HD647180X on LUNA.
The driver plays up to 30 kHz PCM audio by manipulating PSG channel volumes
at extremely high speed with 6.144 MHz HD647180X, a Z80 compatible sub CPU.
https://www.youtube.com/watch?v=fR7PqaLpijQ
https://www.youtube.com/watch?v=kCDZCgkwgBA

Compatibilities with the existing XPIOCDOWNLD ioctl(2) to download and
exec user programs (PSG sound driver player ported from PC-6001 etc.)
on the HD647180X is still provided.
https://twitter.com/tsutsuii/status/1533247362965315584

This psgpam(4) driver for NetBSD/luna68k was written by @moveccr
during isaki-audio2 branch developments, and it was also demonstrated
at Open Source Conference 2018 Kyoto:
https://github.com/isaki68k/netbsd-src/tree/audio2
https://mail-index.netbsd.org/netbsd-advocacy/2018/08/07/msg000781.html
https://twitter.com/tsutsuii/status/1025504875625365505

Note specifications of interrupts from the HD647180X to the host LUNA
was confirmed by Kenji Aoyama on his LUNA-88K2 running OpenBSD/luna88k.

I would like to thank all people still working on ancient LUNA machines!

(tsutsui)

2022-06-10 21:28:50 UTC MAIN commitmail json YAML

tests/make: reword comment in Makefile to be more specific

(rillig)

2022-06-10 18:58:07 UTC MAIN commitmail json YAML

tests/make: demonstrate spaces and '#' in command line arguments

(rillig)

2022-06-10 18:29:01 UTC MAIN commitmail json YAML

tests/lint: fix test for loss of accuracy on ILP32 platforms

The test had been wrong since msg_132.c 1.14 from 2022-05-30.

Using 'unsigned long' in a test that was intended to behave the same on
ILP32 and LP64 was an accident.  Use 'unsigned long long' instead, which
is 64-bits wide on all platforms supported by lint.

Move the test about conversion from 'long' to 'int' to the
platform-specific test files.

Noticed by martin@ on powerpc.

(rillig)

2022-06-10 17:47:20 UTC MAIN commitmail json YAML

Enable crypto, swcrypto and cgd.

(martin)

2022-06-10 17:40:40 UTC netbsd-9 commitmail json YAML

2022-06-10 17:39:10 UTC netbsd-9 commitmail json YAML

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

libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.49
libexec/ld.elf_so/arch/hppa/rtld_start.S: revision 1.14

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

(martin)

2022-06-10 17:34:22 UTC netbsd-9 commitmail json YAML

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

sys/arch/hppa/hppa/trap.c: revision 1.120
sys/arch/hppa/include/ptrace.h: revision 1.11-1.12 (via patch)

Define a PTRACE_ILLEGAL_ASM

Match up PTRACE_BREAKPOINT_ASM with PTRACE_BREAKPOINT which is the
gdb breakpoint instruction.

Only report the SSBREAKPOINT break instruction as SIGTRAP/TRAP_TRACE. All
other break instructions will be reported as SIGTRAP/TRAP_BRKPT
This fixes a mistake I made back in 2008.

PR/56866: hppa: kernel gets confused between actual breakpoints and
single-step breakpoints

(martin)

2022-06-10 17:16:54 UTC netbsd-9 commitmail json YAML

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

sys/arch/hppa/include/pmap.h: revision 1.41
sys/arch/hppa/hppa/pmap.c: revision 1.117

port-hppa/56849: Wacko kernel memory accounting in current/hppa

Two fixes:
- Don't include direct mapped memory in pmap statistics
- Decrement pmap statistics counts in pmap_kremove

(martin)

2022-06-10 16:28:16 UTC netbsd-9 commitmail json YAML

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

sys/arch/hppa/hppa/trap.c: revision 1.119

Handle 'NA' (non-access) traps for the lpa and probe instructions.  The
change is inspired by OpenBSD with a bunch of my own, mainly stylistic,
changes.

Thanks to Tom Lane for the analysis.

PR/56118: sporadic app crashes in HPPA -current

(martin)

2022-06-10 09:54:54 UTC MAIN commitmail json YAML

"inp_hash" is not used now.

(knakahara)

2022-06-10 09:51:11 UTC MAIN commitmail json YAML

Use LIST_FOREACH macro.

(knakahara)

2022-06-10 06:06:00 UTC MAIN commitmail json YAML

PR 56874: avoid using uninitialized memory, patch from Tom Lane.

(martin)

2022-06-10 05:59:12 UTC MAIN commitmail json YAML

PR 56875: Bump timeout for the bignumber test to 2h, as suggested
by Tom Lane to give slower architectures a chance to complete it.

(martin)

2022-06-09 18:26:06 UTC MAIN commitmail json YAML

2022-06-09 17:39:21 UTC MAIN commitmail json YAML

There are two hard problems in computer science cache invalidation, naming
and off-by-one errors.

Fix a naming and off-by-one bug... Thanks to Tom Lane for spotting my typo.

(skrll)

2022-06-09 16:45:38 UTC MAIN commitmail json YAML

Only report the SSBREAKPOINT break instruction as SIGTRAP/TRAP_TRACE. All
other break instructions will be reported as SIGTRAP/TRAP_BRKPT

This fixes a mistake I made back in 2008.

PR/56866: hppa: kernel gets confused between actual breakpoints and single-step breakpoints

(skrll)

2022-06-09 16:41:25 UTC MAIN commitmail json YAML

Oops... revert commit mistake

(skrll)

2022-06-09 16:38:23 UTC MAIN commitmail json YAML

Handle 'NA' (non-access) traps for the lpa and probe instructions.  The
change is inspired by OpenBSD with a bunch of my own, mainly stylistic,
changes.

Thanks to Tom Lane for the analysis.

PR/56118: sporadic app crashes in HPPA -current

(skrll)

2022-06-09 14:02:30 UTC MAIN commitmail json YAML

fix typo in comment: white spae -> whitespace.

(andvar)

2022-06-09 07:01:28 UTC MAIN commitmail json YAML

refactor: use TAILQ_FOREACH instead of TAILQ_FOREACH_SAFE about inpt_queue.

They don't use "ninph" pointer and don't remove elements.

(knakahara)

2022-06-08 23:12:27 UTC MAIN commitmail json YAML

2022-06-08 22:38:29 UTC MAIN commitmail json YAML

wsfontload(8): Mention .wsf font files.  Fix formatting.

(uwe)

2022-06-08 21:55:51 UTC MAIN commitmail json YAML

2022-06-08 21:43:45 UTC MAIN commitmail json YAML

Do not use default entry's parameters for for plain "boot" command

Go back to the "menu" instead of you want that.

Patch from RVP in PR 56862, ok uwe@

(wiz)

2022-06-08 19:47:11 UTC MAIN commitmail json YAML

wsfont.c: use __arraycount instead of defining it locally

(uwe)

2022-06-08 19:27:37 UTC MAIN commitmail json YAML

2022-06-08 19:19:42 UTC MAIN commitmail json YAML

bdfload: Teach it to write wsf font files.

wsfontload(8) now groks simple "wsf" file format - that is basically a
header of kinda struct wsdisplay_font but with string fields embedded
and numeric fields in little-endian and font data afterwards.

Teach bdfload to write out such files if -o file.wsf argument is
specified.

While here fix a couple of bugs too (sorry, should have been separate
commits).  Fix an off by one in numchars calculations.  Fix the type
of buflen.

(uwe)

2022-06-08 16:55:00 UTC MAIN commitmail json YAML

initialize a variable to appease clang

(macallan)

2022-06-08 13:08:44 UTC MAIN commitmail json YAML

This kernel has no midi, so comment out pseudo-device sequencer

(martin)

2022-06-08 12:01:00 UTC MAIN commitmail json YAML

Terminus Font: Regen after fixing an off-by-one in bdfload.

A bug in bdfload caused numchars parameter to be one less than
reality, so the last glyph was lost.  It was not immediately
noticeable b/c in IBM (cp437) encoded fonts the last glyph is a
(non-breaking) space.

While here, change the font names to have -CP437 suffix.

(uwe)

2022-06-08 10:12:42 UTC MAIN commitmail json YAML

Do not warn for ELF note for FDO packaging metadata
(https://systemd.io/COREDUMP_PACKAGE_METADATA/),
found in userland binaries of Fedora 36.

(rin)

2022-06-07 23:55:25 UTC MAIN commitmail json YAML

Functionalize frame pointer backtrace.

(ryo)

2022-06-07 18:50:28 UTC MAIN commitmail json YAML

This kernel has no midi, so comment out pseudo-device sequencer

(martin)

2022-06-07 18:33:41 UTC MAIN commitmail json YAML

This kernels have no midi configured, so comment out pseudo-device sequencer

(martin)

2022-06-07 18:30:49 UTC MAIN commitmail json YAML

This kernel has no midi configured, so comment out pseudo-device sequencer

(martin)

2022-06-07 16:27:24 UTC MAIN commitmail json YAML

Add method to initialize errinfo so that npfctl does not print random strings.

(christos)

2022-06-07 08:08:31 UTC MAIN commitmail json YAML

On aarch64, ddb backtrace can be performed without framepointer by specifying
the /s modifier to the ddb trace command (trace/s, bt/s).
The default is trace with framepointer (same as before).

This allows backtracing even on kernels compiled with -fomit-frame-pointer.

(ryo)

2022-06-07 06:06:47 UTC MAIN commitmail json YAML

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

PR/56865: hppa: t_ptrace_core_wait test doesn't know it must advance PC after breakpoint

Add __hppa__ to the list of architectures that need to advance to the instruction
after the breakpoint

Thanks to Tom Lane for the fix.

(skrll)

2022-06-07 04:12:10 UTC MAIN commitmail json YAML

2022-06-06 13:28:55 UTC MAIN commitmail json YAML

revert bits and pieces I accidentally included in my last commit

from hannken

(nia)

2022-06-06 11:36:16 UTC netbsd-9 commitmail json YAML

2022-06-06 11:34:12 UTC netbsd-9 commitmail json YAML

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

usr.sbin/makemandb/makemandb.c: revision 1.63

Don't index outside the mdocs array of function pointers.  Analysis and
suggested fixes from Tom Lane.  I played it safe and went with (my
variation of) the minimal fix.

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

(martin)

2022-06-06 11:31:13 UTC netbsd-9 commitmail json YAML

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

lib/libc/arch/hppa/sys/ptrace.S: revision 1.8

Save and restore %r19 the "linkage table pointer register" across the call
to __cerror so if the ptrace syscall fails we can call __cerror again with
the correct %r19 value.

Do this even though the call of __cerror doesn't go via the PLT because
__cerror calls __errno which does.

Analysis and fix from Tom Lane in
PR port-hppa/56864: hppa: ptrace(2) dumps core when returning an error

I changed the location of where %r19 is stored on the stack to follow the
ABI.

(martin)

2022-06-06 11:10:24 UTC netbsd-8 commitmail json YAML

2022-06-06 11:09:16 UTC netbsd-8 commitmail json YAML

Apply patch, requested by msaitoh in ticket #1746:

sys/dev/pci/ixgbe/ixgbe.c (apply patch)

Fix the location of "break" statement. No functional change intended.

(martin)

2022-06-06 10:57:05 UTC MAIN commitmail json YAML

Remove accidentally committed merge conflict line.

(nia)

2022-06-06 10:56:30 UTC MAIN commitmail json YAML

2022-06-06 07:41:23 UTC MAIN commitmail json YAML

Don't index outside the mdocs array of function pointers.  Analysis and
suggested fixes from Tom Lane.  I played it safe and went with (my
variation of) the minimal fix.

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

(skrll)

2022-06-06 07:22:31 UTC MAIN commitmail json YAML

Match up PTRACE_BREAKPOINT_ASM with PTRACE_BREAKPOINT which is the
gdb breakpoint instruction.

(skrll)

2022-06-06 07:00:02 UTC MAIN commitmail json YAML

PR kern/51254
uvm_map_findspace(): Output current value of "entry" when KASSERT fires.

(rin)

2022-06-06 06:41:44 UTC MAIN commitmail json YAML

Define a PTRACE_ILLEGAL_ASM

(skrll)

2022-06-06 06:32:44 UTC MAIN commitmail json YAML

Save and restore %r19 the "linkage table pointer register" across the call
to __cerror so if the ptrace syscall fails we can call __cerror again with
the correct %r19 value.

Do this even though the call of __cerror doesn't go via the PLT because
__cerror calls __errno which does.

Analysis and fix from Tom Lane in

port-hppa/56864: hppa: ptrace(2) dumps core when returning an error

I changed the location of where %r19 is stored on the stack to follow the
ABI.

(skrll)

2022-06-06 03:08:35 UTC netbsd-9 commitmail json YAML

2022-06-06 03:07:03 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by martin in ticket #1463):

crypto/external/bsd/openssh/dist/sshkey-xmss.c patch
crypto/external/bsd/openssh/dist/version.h patch

Apply upstream fix for CVE-2019-16905.
Call this NetBSD_Secure_Shell-20220604.

(msaitoh)

2022-06-06 02:16:37 UTC MAIN commitmail json YAML

2022-06-05 13:45:28 UTC MAIN commitmail json YAML

uvm(9): Sprinkle assertions into uvm_map_findspace.

May help to diagnose PR kern/51254.

(riastradh)

2022-06-05 13:35:52 UTC MAIN commitmail json YAML

bwfm(4) uses firmload.

(rjs)

2022-06-05 08:42:25 UTC MAIN commitmail json YAML

Match explicit section names and not .{text,data}.* for example.

This test now passes on hppa.

(skrll)

2022-06-05 05:16:57 UTC MAIN commitmail json YAML

gcc 9 is no longer relevant here.

(may be in gcc.old, but soon after netbsd-10 branch we'll both
obsolete it on the branch and likely upgrade -current gcc.)

(mrg)

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

uvm(9): Don't duplicate vm_map_min/max in `show map' output.

Didn't notice these were already there, oops!

(riastradh)

2022-06-04 23:26:06 UTC MAIN commitmail json YAML

uvm(9): Sprinkle more info into hint/orig_hint assertions.

May help to diagnose PR kern/51254.

(riastradh)

2022-06-04 23:09:57 UTC MAIN commitmail json YAML

uvm(9): Print min/max address and first_free entry in ddb `show map'.

May help to diagnose PR kern/51254.

(riastradh)

2022-06-04 23:09:18 UTC MAIN commitmail json YAML

tests/lib/libc: Test mmap(2) with bad hints.

(riastradh)

2022-06-04 22:32:21 UTC MAIN commitmail json YAML

- Use register prefix (%r).
- Remove workaround for old gas(1) bug.

No binary changes.

(rin)

2022-06-04 20:54:53 UTC MAIN commitmail json YAML

uvm(9): Fix mmap optimization for topdown case.

PR kern/51393

(riastradh)

2022-06-04 20:54:24 UTC MAIN commitmail json YAML

uvm(9): Fix 19-year-old bug in assertion about mmap hint.

Previously this would _first_ remember the original hint, and _then_
clamp the hint to the VM map's range:

orig_hint = hint;
if (hint < vm_map_min(map)) { /* check ranges ... */
if (flags & UVM_FLAG_FIXED) {
UVMHIST_LOG(maphist,"<- VA below map range",0,0,0,0);
return (NULL);
}
hint = vm_map_min(map);
...
KASSERTMSG(!topdown || hint <= orig_hint, "hint: %#jx, orig_hint: %#jx",
    (uintmax_t)hint, (uintmax_t)orig_hint);

Even if nothing else happens in the ellipsis, taking the branch
guarantees the assertion will fail in the topdown case.

(riastradh)

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

mmap(2): If we fail with a hint, try again without it.

`Hint' here means nonzero addr, but no MAP_FIXED or MAP_TRYFIXED.

This is suboptimal -- we could teach uvm_mmap to do a fancier search
using the address as a hint.  But this should do for now.

Candidate fix for PR kern/55533.

(riastradh)

2022-06-04 20:32:49 UTC MAIN commitmail json YAML

2022-06-04 20:12:10 UTC MAIN commitmail json YAML

Include sequencer code conditionally.  Fixes build for sparc and sparc64
(and anything else that has a midi but no sequencer).

(pgoyette)

2022-06-04 12:41:39 UTC netbsd-8 commitmail json YAML

2022-06-04 12:40:28 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by tsutsui in ticket #1747):

sys/arch/atari/atari/stalloc.c: revision 1.17

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.

(martin)

2022-06-04 12:39:48 UTC netbsd-9 commitmail json YAML

2022-06-04 12:38:34 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by tsutsui in ticket #1462):

sys/arch/atari/atari/stalloc.c: revision 1.17

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.

(martin)

2022-06-04 03:32:04 UTC MAIN commitmail json YAML

Add sets-lists entries for the new combined midi_seq module

(pgoyette)

2022-06-04 03:31:10 UTC MAIN commitmail json YAML

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:33:11 UTC netbsd-8 commitmail json YAML

2022-06-03 12:31:10 UTC netbsd-8 commitmail json YAML

Pull up the following revisions, requestes by msaitoh in ticket #1746:

sys/dev/pci/ixgbe/ix_txrx.c 1.95
sys/dev/pci/ixgbe/ixgbe.c 1.261,1.263,
1.265-1.268,1.273,
1.275-1.277,1.305,
1.312,
1.316-1.321 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.85 via patch
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.19
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.15-1.16
sys/dev/pci/ixgbe/ixgbe_type.h 1.46-1.47
sys/dev/pci/ixgbe/ixgbe_x550.c 1.26
sys/dev/pci/ixgbe/ixv.c 1.178,1.182 via patch

- Reduce code duplication between ixgbe_msix_admin() and
  ixgbe_legacy_irq().
  - Add missing code which was not in ixgbe_msix_admin() from
    ixgbe_legacy_irq() and vice versa.
  - Reorder code.
- Disable/enable the OTHER interrupts correctly.
- Don't return in the middle of ixgbe_msix_admin() when an flow
  director reinit failed. NetBSD currently doesn't support flow
  director, so this is not a real bug.
- Print ECC, PHY and temp error log using with ratecheck().
- Correctly re-enable queue interrupt in ixgbe_legacy_irq().
- Correctly enter the recovery mode.
- No functional change:
  - Add some debug printf()s.
  - Don't use "more" flag for simplify.
  - Use macro.
  - Fix typos in comment.
  - KNF.

(martin)

2022-06-03 12:26:17 UTC netbsd-9 commitmail json YAML

2022-06-03 12:25:14 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by gutteridge in ticket #1461):

usr.sbin/makemandb/apropos.1: revision 1.19
usr.sbin/makemandb/apropos.c: revision 1.25
usr.sbin/makemandb/apropos.c: revision 1.26
usr.sbin/makemandb/apropos.1: revision 1.20
usr.sbin/makemandb/apropos.1: revision 1.21
usr.sbin/makemandb/apropos.1: revision 1.22
usr.sbin/makemandb/apropos.1: revision 1.23
usr.sbin/makemandb/apropos-utils.c: revision 1.46
usr.sbin/makemandb/apropos-utils.c: revision 1.47
usr.sbin/makemandb/apropos-utils.c: revision 1.49

PR/54343: Prevent NULL pointers in callback strings; use "*?*" for now to
identify them.

PR bin/54343:  We want the callback_args.machine to be NULL if it is not
present in the DB.

The previous commit fixed the problem of allowing apropos to not crash and
produce output even if the database is missing values for certain mandatory
fields, such as name, section etc. Normally we don't expect those values
to be missing in the database but in case of parsing errors it can happen.

However, the machine architecture is an optional field since not all man pages
are hardware specific so that should be allowed to be set to NULL if not
present in the database.

apropos.c: fix pager functionality

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

apropos.1: document the PAGER environment variable

apropos(1): use proper -width

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

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.

apropos(1): Use the official spelling for "SQLite".
While here, use .Bx to refer to 3BSD.

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=3D/non-existent apropos -p ...
2. Return proper exit status in case of write errors:
$ apropos ... >/dev/full || echo fail

(martin)

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 04:01:38 UTC netbsd-9 commitmail json YAML

2022-06-03 04:00:49 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #1460):
sys/dev/pci/ixgbe/ixgbe.c: patch
Fix previous to re-enable legacy interrupt correctly. It's a part of
ixgbe.c rev. 1.273.

(snj)

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 10:47:50 UTC netbsd-9 commitmail json YAML

2022-06-02 10:45:12 UTC netbsd-9 commitmail json YAML

Pull up the following revisions, all via patch, requested by msaitoh
in ticket #1459:

sys/dev/pci/ixgbe/ixgbe.c 1.261,1.265-1.268,1.273,1.275-1.277,
1.312,1.316-1.319 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.85 via patch
sys/dev/pci/ixgbe/ixgbe_type.h 1.46-1.47
sys/dev/pci/ixgbe/ixgbe_x550.c 1.26
sys/dev/pci/ixgbe/ixv.c 1.182

- Reduce code duplication between ixgbe_msix_admin() and
  ixgbe_legacy_irq().
  - Add missing code which was not in ixgbe_msix_admin() from
    ixgbe_legacy_irq() and vice versa.
  - Reorder code.
- Disable/enable the OTHER interrupts correctly.
- Don't return in the middle of ixgbe_msix_admin() when an flow
  director reinit failed. NetBSD currently doesn't support flow
  director, so this is not a real bug.
- Print ECC, PHY and temp error log using with ratecheck().
- Correctly re-enable queue interrupt in ixgbe_legacy_irq().
- Correctly enter the recovery mode.
- No functional change:
  - Add some debug printf()s.
  - Don't use "more" flag for simplify.
  - Fix typos in comment.
  - KNF.

(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 14:08:47 UTC netbsd-8 commitmail json YAML

2022-05-31 14:07:52 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #1745):

sys/dev/pci/ixgbe/ix_txrx.c: revision 1.98
sys/dev/pci/ixgbe/ixv.c: revision 1.181
sys/dev/pci/ixgbe/ixgbe.c: revision 1.315
sys/dev/pci/ixgbe/ixgbe.h: revision 1.86

bus_dmamem_unmap() before bus_dmamem_free(), otherwise we may give back meomry
which is still (and will stay) mapped.

Fixes one instance of "panic: HYPERVISOR_mmu_update failed" on Xen.
There may be others.

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

Remove unused adapter->msix_mem.

(martin)

2022-05-31 14:04:24 UTC netbsd-9 commitmail json YAML

2022-05-31 14:03:27 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #1458):

sys/dev/pci/ixgbe/ixv.c: revision 1.181
sys/dev/pci/ixgbe/ixgbe.c: revision 1.315
sys/dev/pci/ixgbe/ixgbe.h: revision 1.86

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

Remove unused adapter->msix_mem.

(martin)

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:08:06 UTC netbsd-8 commitmail json YAML

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 17:05:52 UTC netbsd-8 commitmail json YAML

Pull up the following revisions, requested by msaitoh in ticket #1744:

sys/dev/pci/ixgbe/ixgbe.c 1.270,1.280,1.307-1.311,
1.313-1.314 via patch
sys/dev/pci/ixgbe/ix_txrx.c 1.96-1.97
sys/dev/pci/ixgbe/ixv.c 1.179-1.180 via patch

- ixg(4): Print Printed Board Assembly (PBA) number.
- ixg(4): Add IFF_RUNNING check in ixgbe_legacy_irq() again. this might
  fix small race but it's not so dangerous.
- Add value check for {tx,rx}_process_limit sysctl to avoid setting
  wrong value.
- Add missing num_tx_desc sysctl.
- No functional change:
  - KNF a bit.
  - Simplify setting of EIAC register.
  - Move the definition of eicr_mask variable.
  - Enclose flow director stuff in ixgbe_intr_admin_common() with
    IXGBE_FIR which is not defined in NetBSD.
  - Modify comment for consistency.
  - Use cached rx_copy_len in ixgbe_rxeof().

(martin)

2022-05-30 17:03:55 UTC netbsd-9 commitmail json YAML

2022-05-30 17:01:06 UTC netbsd-9 commitmail json YAML

Pull up the following revisions, requested by msaitoh:

sys/dev/pci/ixgbe/ixgbe.c 1.270,1.280,1.307-1.311,
1.313-1.314 via patch
sys/dev/pci/ixgbe/ix_txrx.c 1.96-1.97
sys/dev/pci/ixgbe/ixv.c 1.158,1.179-1.180 via patch

- ixg(4): Print Printed Board Assembly (PBA) number.
- ixg(4): Add IFF_RUNNING check in ixgbe_legacy_irq() again. this might
  fix small race but it's not so dangerous.
- Add value check for {tx,rx}_process_limit sysctl to avoid setting
  wrong value.
- Add missing num_tx_desc sysctl.
- No functional change:
  - KNF a bit.
  - Simplify setting of EIAC register.
  - Move the definition of eicr_mask variable.
  - Enclose flow director stuff in ixgbe_intr_admin_common() with
    IXGBE_FIR which is not defined in NetBSD.
  - Modify comment for consistency.
  - Use cached rx_copy_len in ixgbe_rxeof().

(martin)

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)