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

2024-05-10 06:28:42 UTC Now

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

awk(1): Another echo(1) example that demonstrates field assignment

(uwe)

2022-07-05 16:59:41 UTC MAIN commitmail json YAML

awk(1): Use .It Xo Fo trick to format optional arguments correctly

(uwe)

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

awk(1): Document /dev/stdin &c magic names (NB: unrelated to fd(4))

(uwe)

2022-07-05 15:56:42 UTC MAIN commitmail json YAML

awk(1): Factor out output redirection for print and printf.

This makes the description way less cluttered and explicitly shows
"| expr" (that was mentioned, but not written out) and ">> file" (that
was not even mentioned at all).  Adapted from the POSIX wording, but
doesn't bring over all the detailed verbiage.

(uwe)

2022-07-05 15:37:13 UTC MAIN commitmail json YAML

2022-07-05 15:35:53 UTC MAIN commitmail json YAML

awk(1): A few more formatting tweaks to inlibe code bits and pieces

(uwe)

2022-07-05 15:32:45 UTC MAIN commitmail json YAML

Remove unnecessary and incorrect mulitple inclusion protection.

(tsutsui)

2022-07-05 15:28:02 UTC MAIN commitmail json YAML

awk(1): Fix editing accident in one of the previous commits.

(uwe)

2022-07-05 15:27:14 UTC MAIN commitmail json YAML

awk(1): Drop whitespace between initials

P.J. requires thin space, for other - V and W has enough natural space
near the bottom (the intervening dot prevents kerning).

(uwe)

2022-07-05 15:21:39 UTC MAIN commitmail json YAML

awk(1): more formatting nits

(uwe)

2022-07-05 14:36:33 UTC MAIN commitmail json YAML

awk(1): drop POSIX prescriptive "shall" from the otherwise descriptive passage

(uwe)

2022-07-05 14:10:09 UTC MAIN commitmail json YAML

awk(1): Fix mark up of inline code, the easy cases for now.

(uwe)

2022-07-05 13:48:07 UTC MAIN commitmail json YAML

awk(1): mark up $<n> properly - '$' is an unary op, not part of the name

(uwe)

2022-07-05 13:29:18 UTC MAIN commitmail json YAML

awk(1): document programs that only has BEGIN and/or END pattern-actions.

Copied from POSIX, except "getline" is a statement, not a function, so
call it that.

(uwe)

2022-07-05 13:21:38 UTC MAIN commitmail json YAML

awk(1): document what assigning to $0 and $<n> does

(uwe)

2022-07-05 13:05:20 UTC MAIN commitmail json YAML

awk(1): mark up var=value properly

(uwe)

2022-07-05 12:59:01 UTC MAIN commitmail json YAML

awk(1): Fix -width.

"indent" (or misspelings thereof) is not a magic value for -width.

(uwe)

2022-07-05 12:46:48 UTC MAIN commitmail json YAML

awk(1): g/c extraneous space in an example

(uwe)

2022-07-05 00:47:33 UTC MAIN commitmail json YAML

awk(1): use official echo example from POSIX

(uwe)

2022-07-04 18:25:45 UTC MAIN commitmail json YAML

2022-07-04 18:07:41 UTC MAIN commitmail json YAML

awk.1: revert changes to example 'echo' program

I had removed the exit statement in the strong belief that POSIX had
specified that an AWK program consisting of only a BEGIN block would
implicitly exit after the BEGIN block.  This assumption was wrong.
There are several implementations that implement this special case
though.

https://mail-index.netbsd.org/source-changes-d/2022/07/03/msg013718.html

(rillig)

2022-07-04 15:09:12 UTC MAIN commitmail json YAML

Be less tautological and more explanatory in a comment.

(skrll)

2022-07-03 21:17:24 UTC MAIN commitmail json YAML

lint: do not treat message IDs as arithmetic numbers

No functional change.

(rillig)

2022-07-03 20:05:46 UTC MAIN commitmail json YAML

lint: remove unused code in consistency checker

(rillig)

2022-07-03 19:58:42 UTC MAIN commitmail json YAML

2022-07-03 19:47:34 UTC MAIN commitmail json YAML

lint: extend implementation documentation

(rillig)

2022-07-03 16:48:03 UTC MAIN commitmail json YAML

Use __func__ to print function names.

(tsutsui)

2022-07-03 16:40:29 UTC MAIN commitmail json YAML

Use proper TAILQ(3) macro as other bus_dma(9) implementation.

No binary change.

(tsutsui)

2022-07-03 16:33:31 UTC MAIN commitmail json YAML

Misc KNF.  No binary change.

(tsutsui)

2022-07-03 16:16:50 UTC MAIN commitmail json YAML

2022-07-03 16:03:08 UTC MAIN commitmail json YAML

Move the iomem extent stuff managed by bus_space(9) and make them static.

Inspired by MD bus_space(9) implemantation of arc.
Briefly tested on TT030.

(tsutsui)

2022-07-03 15:25:54 UTC MAIN commitmail json YAML

Make local cdevsw functions static.

XXX: there is no config file that has leo(4) (though it still compiles)

(tsutsui)

2022-07-03 14:35:55 UTC MAIN commitmail json YAML

2022-07-03 14:15:38 UTC MAIN commitmail json YAML

2022-07-03 14:09:22 UTC MAIN commitmail json YAML

libXaw: suppress lint warnings about pointer casts

Typical example:

TextAction.c(373): warning:
    pointer cast from 'pointer to struct _WidgetRec'
    to 'pointer to struct _TextRec' may be troublesome [247]

(rillig)

2022-07-03 13:29:29 UTC MAIN commitmail json YAML

2022-07-03 13:25:18 UTC MAIN commitmail json YAML

2022-07-03 13:21:28 UTC MAIN commitmail json YAML

Perform a BUS_DMASYNC_POSTREAD on the bge_status_block before reading from
it as required by bus_dma(9).

(skrll)

2022-07-03 11:30:48 UTC MAIN commitmail json YAML

2022-07-03 10:56:22 UTC MAIN commitmail json YAML

awk.1: remove trailing space in output of 'echo' example program

(rillig)

2022-07-03 07:33:09 UTC MAIN commitmail json YAML

lint: verify that comment above warning_at matches the message

No binary change.

(rillig)

2022-07-03 06:30:31 UTC MAIN commitmail json YAML

Fix core dump caused by
ksh -c '(i=10; echo $((++-+++i)))'
reported by Steffen Nurpmeso (not on a NetBSD list or PR).

Seems pointless to fix just one of the bugs in this thing, but this one was
easy enough (and stupid enough).  (The "i=10" part is unimportant, as is the sub-shell).

(kre)

2022-07-02 20:50:26 UTC MAIN commitmail json YAML

Cosmetic tweak.  No functional change.

(ad)

2022-07-02 16:30:13 UTC MAIN commitmail json YAML

2022-07-02 16:28:39 UTC MAIN commitmail json YAML

s/tempurature/temperature/

(andvar)

2022-07-02 14:29:04 UTC MAIN commitmail json YAML

Use aprint_*(9) for attach messages and misc KNF.

(tsutsui)

2022-07-02 13:47:53 UTC MAIN commitmail json YAML

Use aprint_normal(9) for attach messages.

(tsutsui)

2022-07-02 11:17:54 UTC MAIN commitmail json YAML

lint: allow message IDs to be only specified in decimal

The message IDs are communicated in decimal everywhere, there's no point
in passing '-X 0x00000084' instead of the clearer '-X 132'.

(rillig)

2022-07-02 10:47:29 UTC MAIN commitmail json YAML

lint: prevent undefined behavior when folding '<<' or '>>'

(rillig)

2022-07-02 10:41:13 UTC MAIN commitmail json YAML

lint: document usage of 'convert'

No functional change.

(rillig)

2022-07-02 10:23:38 UTC MAIN commitmail json YAML

lint: only convert the right operand of '<<' or '>>' in traditional C

Traditional C says: "Then the right operand is converted to int".

C90 dropped that sentence, probably because it didn't have any effect on
the result or the conditions for undefined behavior.

To stick to the wording of the specification, also convert UINT to INT.

While here, fix the call to 'convert'.  The first argument being 'CVT'
means that the conversion comes from a cast-expression instead of an
implicit conversion.  This prevents warnings for 'uint64_t << uint64_t'.
Keeping this unnecessary conversion in C90 or later would have generated
warnings for the functions at the bottom of msg_132.c.

(rillig)

2022-07-02 09:48:18 UTC MAIN commitmail json YAML

tests/lint: test bit shift with large integer types

build_bit_shift converts the right-hand operand to INT or UINT, even
though C11 6.5.7 doesn't say anything about narrowing conversions.

Traditional C says that the operators '<<' and '>>' perform the usual
arithmetic conversions.  This has been dropped in C90.

What lint actually does is something completely different.  In the
operators table in ops.def, the operators '<<' and '>>' are not marked
as performing the usual arithmetic conversions (column 'balance').  This
leaves all conversions to 'build_bit_shift', which converts the
right-hand side to INT or UINT.  There is no obvious reason for this
conversion, as the bounds checks need to be performed no matter whether
the type is INT or UINT128.

(rillig)

2022-07-02 08:43:28 UTC MAIN commitmail json YAML

Misc KNF. No binary change.

(tsutsui)

2022-07-02 08:39:48 UTC MAIN commitmail json YAML

KNF. Remove brackets around return values.

(skrll)

2022-07-02 08:35:50 UTC MAIN commitmail json YAML

2022-07-02 08:33:26 UTC MAIN commitmail json YAML

One timeout message (the write one) in bge_miibus_writereg is enough.

(skrll)

2022-07-02 08:31:43 UTC MAIN commitmail json YAML

Modernise bge_update_all_threshes.  Same code before and after.

(skrll)

2022-07-02 08:25:21 UTC MAIN commitmail json YAML

Misc cleanup.

- make local variables static
- use __func__ to print function names
- KNF

(tsutsui)

2022-07-02 08:11:47 UTC MAIN commitmail json YAML

Use queue(3) macro as hp300 etc.  No binary change.

(tsutsui)

2022-07-02 07:32:16 UTC MAIN commitmail json YAML

Simplification.  Same code before and after.

(skrll)

2022-07-02 07:26:54 UTC MAIN commitmail json YAML

Use C99 types.  same code before and after.

(skrll)

2022-07-02 07:22:41 UTC MAIN commitmail json YAML

Sprinkle some BITS(3).  Same code before and after.

(skrll)

2022-07-02 07:19:36 UTC MAIN commitmail json YAML

Use BUS_ADDR_{LO,HI}32. NFCI.

(skrll)

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

More const. Remove strange ifp assignments in bge_init.

(skrll)

2022-07-02 06:10:29 UTC MAIN commitmail json YAML

Use PRIxBIT instead of casts

(skrll)

2022-07-02 06:09:37 UTC MAIN commitmail json YAML

wm_tick: Add missing splx(s) when not WM_MPSAFE

(skrll)

2022-07-02 05:04:36 UTC MAIN commitmail json YAML

2022-07-02 05:03:37 UTC MAIN commitmail json YAML

Make this compile again.

(skrll)

2022-07-02 04:37:15 UTC MAIN commitmail json YAML

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

drm: Rewrite drm_gem_cma_helper.h from scratch.

The header file was originally part of drm with no licence text,
which I took to mean BSD-licensed like the rest of the Linux drm code
base is by default -- everything in Linux under include/drm and
drivers/gpu/drm not otherwise marked.

In 2017, a tree-wide automated change was applied to Linux which
caused an SPDX GPL header to appear in drm_gem_cma_helper.h.  When I
asked the drm developers about this in drm files, they explained that
it was an automated process and many of the SPDX headers were wrong,
so when excluding GPL files in drm updates, I heeded the actual GPL
vs BSD/MIT licence text and revision history rather than the SPDX
headers.

I excluded drm_gem_cma_helper.c because it was clearly originally GPL
as an exception to the default BSD licence under Linux's
drivers/gpu/drm, and Jared reimplemented the API for ues by some
(NetBSD, BSD-licensed) Arm display drivers.

During an update after that, the header file was lost in the merge
shuffle and I copied it back in without noticing the SPDX header
file.  In retrospect, I see now that it's not clear what the intent
was: the .c file was obviously GPL, and maybe the .h file was
supposed to be too but it wasn't carved out as an exception among the
drm code.

To keep our story simpler, I just drafted a new .h file that provides
a compatible subset of the interface we use, derived from the .c file
Jared wrote, written according to several deterministic rules based
on KNF that yield a non-creative specification of the compatible
interface:

1. $NetBSD$ RCS id
2. standard TNF copyright statement
3. header guard derived from #include file name
4. minimal #includes, grouped and sorted according to KNF
5. forward declaration of structs, sorted lexicographically
6. definitions of structs, members sorted lexicographically by name
7. downcasting macros, written in KNF and sorted lexicographically
8. minimal extern variable declarations, sorted lexicographically
9. minimal, function prototypes, written in KNF and sorted
  lexicographically

`Minimal' means added one by one, according to the errors issued by
the compiler (and in the case of #includes, according to the correct
header file for the missing types or function prototypes being used),
until the compiler is formally satisfied.

Any changes to this will, unless otherwise marked, be covered by the
standard TNF licence now on the file.

(riastradh)

2022-07-01 22:30:51 UTC MAIN commitmail json YAML

sendto(2), recvfrom(2): Scrub internal struct msghdr on stack.

Otherwise this is kernel stack disclosure via ktrace.

Reported-by: syzbot+1d40303b310063778194@syzkaller.appspotmail.com

(riastradh)

2022-07-01 21:48:05 UTC MAIN commitmail json YAML

lint: clean up suppression of warnings and errors

Since lint1.h 1.11 from 2001-12-13, lint1 had been a memory hog.  While
it used a bit set for keeping track of the message IDs of the suppressed
messages, it only used the lower 4 bits of each 32-bit word, due to a
missing CHAR_BIT in __NERRBITS.

As a quick hack, the bit set had 1024 entries, much more than the number
of actual messages, which is currently at 350.  This meant 674 bytes of
wasted memory, plus the code size for the bit manipulations.

The only functional change is that the option '-X' now only accepts
actually valid message IDs.  Previously it had accepted all numbers from
0 to 1023.

(rillig)

2022-07-01 21:25:39 UTC MAIN commitmail json YAML

2022-07-01 21:22:44 UTC MAIN commitmail json YAML

kern: KNF in kern_time.c: Omit needless return parentheses.

Also nix trailing whitespace while here.

No functional change intended.

(riastradh)

2022-07-01 21:22:23 UTC MAIN commitmail json YAML

route(4): Use m_copydata, not misaligned mtod struct access.

XXX Maybe this should check rtm_len too like route_output does.

Reported-by: syzbot+d37eaf0a26097572bbbc@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=3cdfefd8b7938c9606ed68b4191e97fabdbd7b08

(riastradh)

2022-07-01 20:53:14 UTC MAIN commitmail json YAML

lint: add quotes around operator in message 138, remove message 240

Message 138 doesn't occur in practice, it was the last one that was
missing the quotes around the placeholder.

Message 240 was also missing the quotes, but it was not reachable. There
was also no apparent benefit in warning about 'assignment of different
structures' when the message about 'assignment type mismatch' serves the
same purpose.

(rillig)

2022-07-01 20:35:18 UTC MAIN commitmail json YAML

tests/lint: add tests for accessing incomplete types

(rillig)

2022-07-01 19:52:41 UTC MAIN commitmail json YAML

lint: restructure 'convert'

The conditions are now grouped by target type, highlighting that
conversions between integer and floating point types are not checked by
this function, in fact, they are not checked at all.

No functional change.

(rillig)

2022-07-01 17:48:50 UTC MAIN commitmail json YAML

lint: rename functions for value conversion

No functional change.

(rillig)

2022-07-01 16:58:02 UTC MAIN commitmail json YAML

Fix At argument and remove superfluous Pp.

(wiz)

2022-07-01 16:45:13 UTC MAIN commitmail json YAML

Bring shutdown(8) into the 21st century.

I found this juxtaposition in the shutdown man page kind of
interesting:

    time  Time is the time at which shutdown will bring the system down
  and may be the word now or a future time in one of two formats:
  ... [2nd format:] [[[[[cc]yy]mm]dd]hh]mm,  ...
  If the century [cc] is not specified, it defaults to 1900 for
  years [yy] between 69 and 99, ...

In that, all the "[text]" except the one "[[[[["(etc) sequence are my
interjections, The ellipses ("...") represent where I omitted irrelevant
(for here) text.

Interesting yes, bizarre also.  Requiring a future time, and then
defaulting to the (long gone) 20th century (for any random year)
makes no sense at all.    So I fixed it.

In another hundred years or so, anytime from 2100 onwards, but best
left at least a decade into the new century, it will need altering again.
[One could write the code to automate this adjustment, but the man
page would still need updating.]  More significant changes will be
needed as the 101st century approaches (years 10000 and beyond), as
then a 2 digit century will no longer be adequate.  Call me then, and
if I'm able, I'll fix it.

If someone really has a need to schedule a shutdown for sometime
between 1969 and 1999 that can still be done by explicitly giving
the "19" cc value.  It is just no longer ever the default.

Otherwise, now, years 20..90 mean the 21st century (2020..2099)
(the first 2 of those are already unusable, but, IMO, that's OK)
and years 00..19 mean the 22nd century (2100..2119) (except that
00, 2100, is still technically the final year of the 21st century).

This is advance planning for near the end of the 21st century when
someone wants to schedule a shutdown for early in the following
century, and can't be bothered typing the 2 century digits.

(kre)

2022-07-01 09:54:36 UTC MAIN commitmail json YAML

Uglify code to fix build.

(prlw1)

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

umidi(4): Clarify loops.  No functional change intended.

(riastradh)

2022-07-01 01:07:57 UTC MAIN commitmail json YAML

ktrace(9): Zero-initialize padding for ktr_psig records.

Reported-by: syzbot+03fbfa20e6c7a3919a06@syzkaller.appspotmail.com

(riastradh)

2022-07-01 01:07:32 UTC MAIN commitmail json YAML

upgt(4): Make upgt_free_cmd match upgt_alloc_cmd.

Reported-by: syzbot+365e26863f286c6677b7@syzkaller.appspotmail.com

(riastradh)

2022-07-01 01:06:51 UTC MAIN commitmail json YAML

uvideo(4): Make alloc logic match free logic.

Reported-by: syzbot+57cdc1be653327f78b6f@syzkaller.appspotmail.com

PR kern/53734

(riastradh)

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

kern: Omit stale locking comment in proc_crmod_leave.

(riastradh)

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

uvideo(4): Assert number of units can't overflow.

Not sure if this is true, but at least we'll trap instead of silently
undercount this way.

(riastradh)

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

kern: Fix comment about precondition of lwp_update_creds.

(riastradh)

2022-07-01 01:05:31 UTC MAIN commitmail json YAML

posix_spawn(2): Plug leak in proc_alloc error branch.

(riastradh)

2022-07-01 01:05:21 UTC MAIN commitmail json YAML

fork(2): Plug leaks in proc_alloc error branch.

(riastradh)

2022-07-01 01:04:59 UTC MAIN commitmail json YAML

sequencer(4): Fix lock leak in ioctl(FIOASYNC).

Reported-by: syzbot+0bfe9054ab0e70ab02e6@syzkaller.appspotmail.com
Reported-by: syzbot+f2c5459483e60dd2c877@syzkaller.appspotmail.com
Reported-by: syzbot+d932ddf0ec7e30784ca8@syzkaller.appspotmail.com

Note: The evidence from
https://syzkaller.appspot.com/bug?id=19e1c8779bb0e020188ca80a586e470b59d7525d
suggests in the stack trace that the syscall was 16, which is chown.
This is not accurate; it happens because the x86 syscall logic sets
rax in the trapframe to the return value (in this case, 16 is EBUSY)
_before_ calling userret which does the lockdebug checks, and ddb
uses the trapframe's rax to show what the syscall number was when
printing its stack trace:

[ 104.0605877] Mutex error: lwp_exit,1084: sleep lock held
[ 104.0605877] lock address : 0xffffd9801269e050 type    :    sleep/adaptive
...
[ 104.5005727] syscall() at netbsd:syscall+0x323 sys/arch/x86/x86/syscall.c:92
[ 104.5115909] --- syscall (number 16) ---

XXX Maybe we should record the syscall number elsewhere so this is
not so confusing -- second time in 24h I've been bitten by this, and
in a different way.

(riastradh)

2022-07-01 01:04:01 UTC MAIN commitmail json YAML

vfs(9): Avoid arithmetic overflow in lf_advlock.

syzbot+897abbbe59467cbf6e98@syzkaller.appspotmail.com

(riastradh)

2022-06-30 19:06:35 UTC MAIN commitmail json YAML

KNF some comments

(skrll)

2022-06-30 16:49:55 UTC MAIN commitmail json YAML

Remove strange (duplicate) assignment.

(skrll)

2022-06-30 16:36:11 UTC MAIN commitmail json YAML

2022-06-30 11:03:07 UTC MAIN commitmail json YAML

doc: Various changes in the past week from various developers

(nia)

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

Fix rump build failure after sleepq.h:r1.35.

(knakahara)

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

a driver for Wacom Intuos drawing tablets, from Yorick Hardy
this has been sitting in my tree long enough and works fine with the hardware
I have access to

(macallan)

2022-06-30 01:52:29 UTC MAIN commitmail json YAML

2022-06-29 23:15:08 UTC MAIN commitmail json YAML

route(4): Avoid unaligned access to struct rt_msghdr, take two.

Can't even take the address of the misaligned struct member for
memcpy.  Just copy the header out into a stack variable instead.

Reported-by: syzbot+083d9be5cb3c2e78ed1c@syzkaller.appspotmail.com

(riastradh)

2022-06-29 22:27:12 UTC MAIN commitmail json YAML

recvmmsg(2): More timespec validation.

Reported-by: syzbot+004ed2f264534bd27312@syzkaller.appspotmail.com
Reported-by: syzbot+6f9014c842c4e78df7bc@syzkaller.appspotmail.com

(riastradh)

2022-06-29 22:27:01 UTC MAIN commitmail json YAML

sleepq(9): Pass syncobj through to sleepq_block.

Previously the usage pattern was:

sleepq_enter(sq, l, lock);              // locks l
...
sleepq_enqueue(sq, ..., sobj, ...);    // assumes l locked, sets l_syncobj
... (*)
sleepq_block(...); // unlocks l

As long as l remains locked from sleepq_enter to sleepq_block,
l_syncobj is stable, and sleepq_block uses it via ktrcsw to determine
whether the sleep is on a mutex in order to avoid creating ktrace
context-switch records (which involves allocation which is forbidden
in softint context, while taking and even sleeping for a mutex is
allowed).

However, in turnstile_block, the logic at (*) also involves
turnstile_lendpri, which sometimes unlocks and relocks l.  At that
point, another thread can swoop in and sleepq_remove l, which sets
l_syncobj to sched_syncobj.  If that happens, ktrcsw does what is
forbidden -- tries to allocate a ktrace record for the context
switch.

As an optimization, sleepq_block or turnstile_block could stop early
if it detects that l_syncobj doesn't match -- we've already been
requested to wake up at this point so there's no need to mi_switch.
(And then it would be unnecessary to pass the syncobj through
sleepq_block, because l_syncobj would remain stable.)  But I'll leave
that to another change.

Reported-by: syzbot+8b9d7b066c32dbcdc63b@syzkaller.appspotmail.com

(riastradh)

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

ktrace(9): Fix mutex detection in ktrcsw.

On _entry_ to sleepq_block, l->l_syncobj is set so that ktrcsw
(ktr_csw) has the opportunity to detect whether it's a mutex or
rwlock.  It is critical to avoid ktealloc when we're sleeping on a
mutex because we may be in softint context where ktealloc is
forbidden.

But after mi_switch, on _exit_ from sleepq_block, l->l_syncobj may
have been changed back to &sched_syncobj or something by
sleepq_remove, and so ktrcsw can no longer rely on l->l_syncobj to
determine whether we _were_ sleeping on a mutex or not.

Instead, save the syncobj in sleepq_block and pass it through as an
argument to ktrcsw.

Reported-by: syzbot+414edba9d161b7502658@syzkaller.appspotmail.com
Reported-by: syzbot+4425c97ac717b12495a2@syzkaller.appspotmail.com
Reported-by: syzbot+5812565b926ee8eb5cf3@syzkaller.appspotmail.com
Reported-by: syzbot+8b9d7b066c32dbcdc63b@syzkaller.appspotmail.com
Reported-by: syzbot+909a8e743c967d97f433@syzkaller.appspotmail.com
Reported-by: syzbot+e2a34bb5509bea0bba11@syzkaller.appspotmail.com
Reported-by: syzbot+faaea3aad6c9d0829f76@syzkaller.appspotmail.com

(riastradh)

2022-06-29 19:43:46 UTC MAIN commitmail json YAML

2022-06-29 19:43:04 UTC MAIN commitmail json YAML

add some Wacom devices

(macallan)

2022-06-29 17:59:40 UTC MAIN commitmail json YAML

Use old limit of 32 + 32 bytes to keep combining buffer on stack.
There are no devices on this platform that need more and for larger
values, the driver should be better rewritten.

(mlelstv)

2022-06-29 16:33:09 UTC MAIN commitmail json YAML

Synchronize SYS_SYSCALL() with other syscall implementations and
call trace_exit() even if trace_enter() returned an error.

PR kern/52166 "syscallemu does not work on sparc (32-bit)"
PR toolchain/56117 "New test failures on amd64 since switch to gcc10"

(hannken)

2022-06-29 15:58:12 UTC MAIN commitmail json YAML

2022-06-29 15:56:58 UTC MAIN commitmail json YAML

2022-06-29 15:37:25 UTC MAIN commitmail json YAML

Unmap device registers only when successfully mapped.

(mlelstv)

2022-06-29 15:34:15 UTC MAIN commitmail json YAML

Bump max transaction size from 32 Bytes to 4kB.

(mlelstv)

2022-06-29 15:33:45 UTC MAIN commitmail json YAML

Allocate data buffer instead of using the stack.

(mlelstv)

2022-06-29 13:03:20 UTC MAIN commitmail json YAML

2022-06-29 12:45:25 UTC MAIN commitmail json YAML

Fix Swedish keymap of HIL keyboard map.

The problem was reported by Anders Gustafsson and
fix provieded by Miod Vallat on port-hp300@.

(tsutsui)

2022-06-28 20:24:08 UTC MAIN commitmail json YAML

bind.2: add references to specific protocol families

Referring the reader to "the manual entries in section 4" was too
unspecific to be useful, as that section contains device drivers as
well.

(rillig)

2022-06-28 20:12:52 UTC MAIN commitmail json YAML

2022-06-28 15:58:59 UTC MAIN commitmail json YAML

Note that GCC 10.4 has been released today.

(fcambus)

2022-06-28 13:25:36 UTC MAIN commitmail json YAML

remove KASSERT() checking for t_oproc at open since assigning this line
discipline to a pty may not have that set. Instead do a runtime check to
ensure that the function exists before calling it, as ttstart() handles it.

Same code in btuart.c, bcsp.c and bth5.c

Reported-by: syzbot+766981eef92a3cd0352a@syzkaller.appspotmail.com

(plunky)

2022-06-28 11:41:32 UTC MAIN commitmail json YAML

recvmmsg(2): Avoid arithmetic overflow in timeout calculations.

XXX This is not right -- it doesn't actually do anything to time
out...

Reported-by: syzbot+784209d76a94fcc6417b@syzkaller.appspotmail.com

(riastradh)

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

appleintc: update ci_cpl in pic_set_priority callback

(jmcneill)

2022-06-28 08:03:49 UTC MAIN commitmail json YAML

Note that src/games/robots now nees a clean rebuild.

(martin)

2022-06-28 06:24:00 UTC MAIN commitmail json YAML

Sprinkle some const. Same code before and after.

(skrll)

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

Fix a null-deref

lgtm from mlelstv.

Reported-by: syzbot+ec264ed7faf603906b93@syzkaller.appspotmail.com

(skrll)

2022-06-28 05:19:03 UTC MAIN commitmail json YAML

2022-06-28 03:13:27 UTC MAIN commitmail json YAML

RAIDframe must be initialized for the RAIDFRAME_FAIL_DISK80 ioctl.

Reported-by: syzbot+048387fcc9a1a3682638@syzkaller.appspotmail.com
Reported-by: syzbot+037d1813186571cb2d38@syzkaller.appspotmail.com

(oster)

2022-06-28 02:04:51 UTC MAIN commitmail json YAML

kern: Avoid arithmetic overflow in gettimeleft.

Sprinkle assertions in to verify we're monotonically counting the
time left down to zero.

Reported-by: syzbot+5f6a6329d139810dfe3c@syzkaller.appspotmail.com

(riastradh)

2022-06-28 01:44:19 UTC MAIN commitmail json YAML

tcp(4): Bail early on sendoob if not connected.

XXX Not sure if testing tp->t_template is the right way to discern
this -- I just reached for it because the downstream crash is a panic
on tp->t_template == NULL in tcp_output.

XXX In principle this could try connecting to the address, except
it's not passed down from the logic in uipc_socket.c to tcp_sendoob.

Reported-by: syzbot+a01f4cfec72790855ce2@syzkaller.appspotmail.com

(riastradh)

2022-06-28 00:13:48 UTC MAIN commitmail json YAML

fstrans(9): KASSERT(a && b) => KASSERT(a); KASSERT(b)

No functional change intended except better diagnostics in case of
crash.

(riastradh)

2022-06-27 23:36:48 UTC MAIN commitmail json YAML

amd64: Handle __syscall trap frames specially too.

(riastradh)

2022-06-27 22:41:29 UTC MAIN commitmail json YAML

2022-06-27 20:28:31 UTC MAIN commitmail json YAML

s/loobpack/loopback/ in comment.

(andvar)

2022-06-27 18:56:56 UTC MAIN commitmail json YAML

umidi(4): Fix fencepost in error branch.

Reported-by: syzbot+0bbf3d81c15fd1354759@syzkaller.appspotmail.com

(riastradh)

2022-06-27 18:48:49 UTC MAIN commitmail json YAML

Enable FANCY mode for debugging purposes:
  - To enable stand still mode (robot is not moving but waiting in place),
    specify a scorefile on the command line called <directory>/stand_still
  - To enable pattern roll mode (robot is changing which move to look first)
    specify a scorefile on the command line called <directory>/pattern_roll

(christos)

2022-06-27 16:44:58 UTC MAIN commitmail json YAML

downgrade from LOG_ERR to LOG_DEBUG, requested by uwe@

(christos)

2022-06-27 15:55:11 UTC MAIN commitmail json YAML

KNF a little. No functional change.

(msaitoh)

2022-06-27 15:38:19 UTC MAIN commitmail json YAML

Add some MegaRAID devices (except Aero series). Not tested.

(msaitoh)

2022-06-27 15:35:59 UTC MAIN commitmail json YAML

2022-06-27 15:35:23 UTC MAIN commitmail json YAML

Add some MegaRAID devices.

(msaitoh)

2022-06-27 15:32:30 UTC MAIN commitmail json YAML

Add comment. Sort entries. No functional change.

(msaitoh)

2022-06-27 06:45:15 UTC MAIN commitmail json YAML

Fix editing mishap, should fix the build

(martin)

2022-06-27 04:06:48 UTC MAIN commitmail json YAML

sendmsg(2): Avoid buffer overrun in ktrace of invalid cmsghdr.

Reported-by: syzbot+efded148140b23425f5c@syzkaller.appspotmail.com

(riastradh)

2022-06-27 03:56:37 UTC MAIN commitmail json YAML

ktrace(9): Make sure ktrkuser initializes the full ktr_id member.

strlcpy does not; strncpy does.  However, the member must be
NUL-terminated, because kdump uses it, e.g., with printf("%s"), so
expicitly set the last byte to NUL.

Possible fix for a host of sanitizer complaints in syzkaller.

(riastradh)

2022-06-27 01:29:51 UTC MAIN commitmail json YAML

Remove confusable comment.

The comment was added in tcp_subr.c:r1.124 (2002/03/15).
tcp_drain() is called from softint context only, now.

(knakahara)

2022-06-27 00:34:24 UTC MAIN commitmail json YAML

setitimer(2): Avoid arithmetic overflow in periodic bookkeeping.

Reported-by: syzbot+93cef6090844ec304cde@syzkaller.appspotmail.com

(riastradh)

2022-06-26 22:52:30 UTC MAIN commitmail json YAML

opencrypto(9): Fix missing initialization in error branch.

Reported-by: syzbot+8c519140cac567be1ee1@syzkaller.appspotmail.com

(riastradh)

2022-06-26 22:49:09 UTC MAIN commitmail json YAML

emdtv(4): More attach/detach bugs.

Reported-by: syzbot+9bbfb743349929e2c8c3@syzkaller.appspotmail.com

(riastradh)

2022-06-26 22:31:58 UTC MAIN commitmail json YAML

setitimer(2): Guard against overflow in arithmetic.

Reported-by: syzbot+6036bc8b6d2b963e3ba6@syzkaller.appspotmail.com

(riastradh)

2022-06-26 22:31:47 UTC MAIN commitmail json YAML

kern: Use timespecsubok in ts2timo.

Should fix arithmetic overflow.

Reported-by: syzbot+4393a753a7c787abe6e2@syzkaller.appspotmail.com

(riastradh)

2022-06-26 22:31:38 UTC MAIN commitmail json YAML

kern: New functions timespecaddok, timespecsubok.

Return false if timespecadd or timespecsub with the same arguments
would overflow (possibly in an intermediate calculation), true if OK.

Typical usage:

sys_wotsit(...)
{
...
if (!timespecsubok(x, y))
return EINVAL;
timespecub(x, y, xydelta);
...
}

(riastradh)

2022-06-26 22:31:12 UTC MAIN commitmail json YAML

amd64: Print effective syscall number for SYS_syscall stack traces.

This time with compile-testing, at least.

(riastradh)

2022-06-26 22:29:28 UTC MAIN commitmail json YAML

Revert "amd64: Print effective syscall number for SYS_syscall stack traces."

Built the wrong kernel (arm64 is not amd64), oops.  Will redo.

(riastradh)

2022-06-26 22:18:30 UTC MAIN commitmail json YAML

amd64: Print effective syscall number for SYS_syscall stack traces.

(riastradh)

2022-06-26 21:42:20 UTC MAIN commitmail json YAML

route(4): Avoid unaligned access to struct rt_msghdr.

Reported-by: syzbot+e0048186a5cc97b1c5a6@syzkaller.appspotmail.com

(riastradh)

2022-06-26 21:35:53 UTC MAIN commitmail json YAML

umcs(4): Reject invalid interrupt endpoints.

Reported-by: syzbot+cd1e60e112e840e40d0a@syzkaller.appspotmail.com

(riastradh)

2022-06-26 21:00:28 UTC MAIN commitmail json YAML

s/Ramdom/Random/ in comments.

(andvar)

2022-06-26 18:46:14 UTC MAIN commitmail json YAML

2022-06-26 17:55:38 UTC MAIN commitmail json YAML

2022-06-26 17:55:24 UTC MAIN commitmail json YAML

lagg(4): Safely handle misaligned mbufs.

Optimizing for non-strict-alignment architectures -- without falling
afoul of alignment sanitizers or overeager compilers -- is left as an
exercise for the reader.

PR kern/56894

(riastradh)

2022-06-26 17:53:06 UTC MAIN commitmail json YAML

drm/ttm: Fix potential leak in error branch.

Not likely but let's not leave a rake to trip on.

(riastradh)

2022-06-26 17:52:54 UTC MAIN commitmail json YAML

arm/aes_neon: Fix formatting of self-test failure message.

Discovered by code inspection.  Remarkably, a combination of errors
made this fail to be a stack buffer overrun.  Verified by booting
with ARMv8.0-AES disabled and with the self-test artificially made to
fail.

(riastradh)

2022-06-26 14:37:13 UTC MAIN commitmail json YAML

Decorate the HPPA signal trampoline with the appropriate .cfi
directives to allow exception unwind / backtrace across a signal
handler.

(skrll)

2022-06-26 14:31:34 UTC MAIN commitmail json YAML

Teach the LLVM-derived unwinder about the DWARF pseudo-registers defined
by GCC for HPPA to hold the return address where the signal trampoline
will resume.  XXX Same treatment is needed for HPPA64, but not done as
part of this commit.

Thanks to thorpej for help with this. (ages ago)

(skrll)

2022-06-26 14:14:47 UTC MAIN commitmail json YAML

2022-06-26 14:08:15 UTC MAIN commitmail json YAML

Consistently use "NetBSD/atari", not "NetBSD/Atari" on tertiary boot.

(tsutsui)

2022-06-26 11:14:36 UTC MAIN commitmail json YAML

2022-06-26 09:29:59 UTC MAIN commitmail json YAML

Add SIGINFO support. Mostly stolen from scan_ffs(8).

(rin)

2022-06-26 09:23:32 UTC MAIN commitmail json YAML

cpu_reboot: use cpu_halt_others() instead of a (simple) open coded
version of it.

(martin)

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

gcc is not smart enough to track the equivalence of conditions used
here and warns about an unused value - initialize "code" always.

(martin)

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

2022-06-26 08:28:07 UTC MAIN commitmail json YAML

PR toolchain/56268

For NetBSD/m68k, program header is erroneously readable from core dump,
although a page containing it is missing. This spoils relocation for
the main executable, and debugging with core dumps becomes impossible,
as described in the PR.

In order to avoid this failure, add consistency check for program header;
for NetBSD, 1st entry of program header refers program header itself. If
this is not the case, we should be reading random garbage from core dump.

Yes, this is a kind of the hackest hack. But, unable to debug with core
dump is critical. Therefore, I commit this workaround temporarily until
the real cause is found and fixed.

Note that this is not a recent regression for GDB nor kernel, as
mentioned in the PR. These from netbsd-8 and -9 fail in the same way
without this hack.

(rin)

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

2022-06-26 06:02:28 UTC MAIN commitmail json YAML

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

PR port-powerpc/56899

Disable 128-bit long double for NetBSD/powerpc.

(rin)

2022-06-26 05:52:44 UTC MAIN commitmail json YAML

PR port-powerpc/56899

In addition to ``powerpc'', register NetBSD OS ABI also for ``rs6000'',
which is default target for powerpc.

(rin)

2022-06-26 05:48:17 UTC MAIN commitmail json YAML

src/external/gpl3/gdb/lib/libbfd/arch/aarch64/bfd_stdint.h@1.4 / diff / nxr@1.4
src/external/gpl3/gdb/lib/libbfd/arch/aarch64eb/bfd_stdint.h@1.2 / diff / nxr@1.2
src/external/gpl3/gdb/lib/libbfd/arch/alpha/bfd_stdint.h@1.11 / diff / nxr@1.11
src/external/gpl3/gdb/lib/libbfd/arch/arm/bfd-in3.h@1.10 / diff / nxr@1.10
src/external/gpl3/gdb/lib/libbfd/arch/arm/bfd.h@1.10 / diff / nxr@1.10
src/external/gpl3/gdb/lib/libbfd/arch/arm/bfd_stdint.h@1.13 / diff / nxr@1.13
src/external/gpl3/gdb/lib/libbfd/arch/arm/config.h@1.11 / diff / nxr@1.11
src/external/gpl3/gdb/lib/libbfd/arch/arm/defs.mk@1.8 / diff / nxr@1.8
src/external/gpl3/gdb/lib/libbfd/arch/arm/targmatch.h@1.13 / diff / nxr@1.13
src/external/gpl3/gdb/lib/libbfd/arch/armeb/bfd_stdint.h@1.13 / diff / nxr@1.13
src/external/gpl3/gdb/lib/libbfd/arch/hppa/bfd_stdint.h@1.11 / diff / nxr@1.11
src/external/gpl3/gdb/lib/libbfd/arch/i386/bfd_stdint.h@1.10 / diff / nxr@1.10
src/external/gpl3/gdb/lib/libbfd/arch/i386/targmatch.h@1.12 / diff / nxr@1.12
src/external/gpl3/gdb/lib/libbfd/arch/m68000/bfd_stdint.h@1.8 / diff / nxr@1.8
src/external/gpl3/gdb/lib/libbfd/arch/m68k/bfd_stdint.h@1.9 / diff / nxr@1.9
src/external/gpl3/gdb/lib/libbfd/arch/mips64eb/bfd_stdint.h@1.10 / diff / nxr@1.10
src/external/gpl3/gdb/lib/libbfd/arch/mips64el/bfd_stdint.h@1.9 / diff / nxr@1.9
src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd_stdint.h@1.8 / diff / nxr@1.8
src/external/gpl3/gdb/lib/libbfd/arch/mipsel/bfd_stdint.h@1.11 / diff / nxr@1.11
src/external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd_stdint.h@1.11 / diff / nxr@1.11
      :
(more 119 files)
Regen for everyone, except for coldfire, for which toolchain does
no longer build...

> Part of PR port-powerpc/56899
>
> Set default OS ABI to NetBSD when target is *-*-netbsd*.
>
> This fixes default behaviors of GDB when no executable is loaded
> (== OS ABI is not determined yet).

(rin)

2022-06-26 05:44:28 UTC MAIN commitmail json YAML

Part of PR port-powerpc/56899

Set default OS ABI to NetBSD when target is *-*-netbsd*.

This fixes default behaviors of GDB when no executable is loaded
(== OS ABI is not determined yet).

(rin)

2022-06-26 05:16:22 UTC MAIN commitmail json YAML

Misc cleanup.

- use a local variable static
- use aprint_*(9) for attach messages
- KNF

(tsutsui)

2022-06-26 05:11:54 UTC MAIN commitmail json YAML

Misc cleanup.

- make local functions static
- use aprint_normal(9) for attach message
- KNF

(tsutsui)

2022-06-26 04:51:17 UTC MAIN commitmail json YAML

Misc cleanup.

- KNF and TAB/space
- make local function static
- make readonly values const
- remove ancient "hide" and "integrate" macro
  (just use static for modern compliers that perform inline properly)
- remove (probably) an old gcc's warning hack
- use __func__ to print function names properly
- fix attach messages in an error path
- use proper integer types

(tsutsui)

2022-06-26 04:45:31 UTC MAIN commitmail json YAML

Restore redundant register accesses as the original implementation did.

It looks my refactored one for entropy sometimes returns unexpected
values and they cause "kbd: Unknown packet 0xfd" errors and missing
keyboard release events.

(tsutsui)

2022-06-25 22:38:43 UTC MAIN commitmail json YAML

No need to print errors via aprint_error(9) in probe/match function.

Note aprint_error(9) triggers "WARNING: 1 error while detecting hardware"
message after device configuration, so it's a bit confusing for users.
Also check all possible variants even if bus_space_map(9) fails
(though now it shouldn't fail).

(tsutsui)

2022-06-25 22:31:09 UTC MAIN commitmail json YAML

Fix a long-standing "leprobe: cannot map memory-area" error during probe.

PAM and ROTHRON VME LANCE seem to have 64KB RAM, but the register
address region are overwrapped, so we cannot map both of them via
bus_space_map(9) that checks regions using extent(9).
To work around this, just use only 32KB RAM for buffers.
XXX: not sure if anyone tried these VME LANCE variants

(tsutsui)

2022-06-25 18:05:09 UTC MAIN commitmail json YAML

gicv3: Treat all IPLs below IPL_VM as IPL_NONE for hwpl mappings

(jmcneill)

2022-06-25 17:46:05 UTC MAIN commitmail json YAML

Cherry-picking two upstream commits[1,2] to fix tools build under gcc 12
if MKCROSSGDB is set.  Without these, gcc 12 correctly points out that
certain checkr for pointers being NULL are always false and errors out
due to -Werror=nonnull-compare/-Werror=address (implicitly set by -Wall).

Build failure reported by Piyush Sachdeva.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=fb6262e8534e0148a4a424e9e5138159af19faf1;hp=f681e5867de63f1c8ca692023cf86e4c884fdae7
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=da7ee7f9ce2fc8c278a46e0b360d44319a5a1e7a;hp=cb2e519a5e41052a4dd55be4f1c4d818d2e8af9d

(hgutch)

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

Add rnd(9) entropy source from keyboard and mouse.

(tsutsui)

2022-06-25 15:36:33 UTC MAIN commitmail json YAML

Use aprint_*(9) for device attach messages.

(tsutsui)

2022-06-25 15:10:26 UTC MAIN commitmail json YAML

Rename and reformat softc stuff for readablity, and misc more cleanups.

No binary change.

(tsutsui)

2022-06-25 14:39:19 UTC MAIN commitmail json YAML

2022-06-25 14:27:43 UTC MAIN commitmail json YAML

Misc cleanup.  No functional changes, no regression on TT030.

- KNF and TAB/space
- make local functions static
- avoid unnesessary __USE()
- use proper integer types
- remove a register keyword

(tsutsui)

2022-06-25 13:24:35 UTC MAIN commitmail json YAML

2022-06-25 13:20:30 UTC MAIN commitmail json YAML

2022-06-25 13:17:04 UTC MAIN commitmail json YAML

Allocalte enough reserved ST-RAM to make the old Xserver work by default.

Instead, check ST-RAM size and TT-RAM size on startup and restrict
size of reserved ST memory on lower RAM machines.
Closes PR port-atari/41002 from David Ross.

While here, make options ST_POOL_SIZE defparam'ed to make sure to
reflect config(5) changes on each build.

(tsutsui)

2022-06-25 12:41:56 UTC MAIN commitmail json YAML

pic: Update ci_cpl in pic_set_priority callback.

Not all ICs need interrupts disabled to update the priority. DAIF accesses
are not cheap, so push the update of ci_cpl from pic_set_priority to the
IC's pic_set_priority callback, and let the IC driver determine whether
or not it needs interrupts disabled.

(jmcneill)

2022-06-25 12:39:46 UTC MAIN commitmail json YAML

pic: splx performance improvement

Skip disabling interrupts and check for pending hard interrupts if old
ipl was < IPL_VM.

(jmcneill)

2022-06-25 08:19:01 UTC MAIN commitmail json YAML

Fix build without EXTENDED_MEMORY.

(isaki)

2022-06-25 06:51:37 UTC MAIN commitmail json YAML

Decode function descriptors (aka plabels) on hppa to fix backtrace.

PR/56881: hppa: backtrace_symbols() delivers bogus results for some dynloaded functions

(skrll)

2022-06-25 05:01:31 UTC MAIN commitmail json YAML

Fix more unintended diffs from a wrong branch.

(tsutsui)

2022-06-25 03:57:18 UTC MAIN commitmail json YAML

Restore EUC-JP support broken since rev 1.16.

I committed a wrong branch in the previous and it included wip version:
https://mail-index.netbsd.org/source-changes-d/2022/06/25/msg013708.html
This version is based on a fix from isaki@ and also confirmed me.

(tsutsui)

2022-06-25 03:33:29 UTC MAIN commitmail json YAML

Add a minimum DEC special graphics character support for atari ite(4).

This closes PR port-atari/46647 (Menu borders in sysinst appear as
characters with diacritical marks instead of graphics characters).

Switching encoding support by "ESC ( <F>" sequence for vt220 was
pulled from x68k ite(4) (that already supports ISO-2022-JP and EUC-JP).
Note atari's fonts already include DEC special graphics characters.
ET4000 on Hades is untested due to long-term lack of hardware.
Discussed on port-atari@ etc.

(tsutsui)