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 (30m)  netbsd-8 (6d)  netbsd-10 (6d)  netbsd-9 (12d)  thorpej-ifq (176d)  thorpej-altq-separation (178d) 

2024-05-10 20:00:04 UTC Now

2021-01-08 13:02:57 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by simonb in ticket #1646):

external/bsd/ipf/Makefile.inc: revision 1.6
compat/exec.mk: revision 1.5

Use the compat machinery to build "native" IPF binaries as ipfilter
doesn't use compat32 64-bit alignment/size safe structures.

Fixes IPF on at least mips64.

(martin)

2021-01-08 13:01:54 UTC netbsd-9 commitmail json YAML

2021-01-08 13:00:50 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by simonb in ticket #1183):

external/bsd/ipf/Makefile.inc: revision 1.6
compat/exec.mk: revision 1.5

Use the compat machinery to build "native" IPF binaries as ipfilter
doesn't use compat32 64-bit alignment/size safe structures.

Fixes IPF on at least mips64.

(martin)

2021-01-08 09:41:24 UTC MAIN commitmail json YAML

Rename man-util-* to comp-c-*

(uki)

2021-01-08 04:36:45 UTC MAIN commitmail json YAML

Set wantToken when none available.

PR: 53285
Reviewed by: gson

(sjg)

2021-01-08 02:11:45 UTC MAIN commitmail json YAML

lint: fix function as controlling expression (since 2020-12-31)

It's perfectly valid to directly use a function name as the controlling
expression of an if statement.  That function name is converted
implicitly to a pointer to that function, and that is a scalar value
then.

Spotted by christos in lib/libpthread/pthread.c:634.

(rillig)

2021-01-08 01:40:03 UTC MAIN commitmail json YAML

lint: demonstrate wrong message 204 (since 2020-12-31)

In func.c 1.39 from 2020-12-31 18:51:28, the check that controlling
expressions are indeed scalar was extended from while and for loops to
if statements as well.  It just seemed to have been an oversight.

This revealed a bug in lint, which didn't accept the following valid
code snippet from lib/libpthread/pthread.c:634:

void _malloc_thread_cleanup(void) __weak;
...
if (_malloc_thread_cleanup)
_malloc_thread_cleanup();

Testing a function (instead of a function pointer) for truthiness is
probably rare since most functions are defined unconditionally.  For
weak functions it comes in handy though.

Clang-Tidy suggests to prefix the function with '&' to silence its
warning.  Doing that revealed a non-obvious behavior in build_ampersand,
which does not add the AMPER node to the expression even though it is
clearly mentioned in the code.  That is left for further research.

Once the original bug is fixed, it probably doesn't matter whether the
AMPER is discarded or retained since check_controlling_expression would
add it back.  There's probably a reason though to sometimes discard the
AMPER and sometimes retain it.

(rillig)

2021-01-08 01:17:55 UTC MAIN commitmail json YAML

bc(1): Consistently use "parentheses" in plural.

(uwe)

2021-01-08 01:17:03 UTC MAIN commitmail json YAML

bc(1): Prettify PostScript output some more.

Don't set BNF in all bold .Ic, instead use .Ar for "expr" and "var" so
that only the literal stuff that is being defined is bold.  Arrange
for subscripts to actually be subscripted in PostScript.  Make sure
meta-syntactic [] are set differently than literal (). Etc...

(uwe)

2021-01-08 00:13:21 UTC MAIN commitmail json YAML

shut up a clang warning about snprintf() called with a variable as format
string
NFCI

(macallan)

2021-01-07 23:57:25 UTC MAIN commitmail json YAML

bc(1): Replace one last missed \f with semantic markup.

(uwe)

2021-01-07 21:21:35 UTC MAIN commitmail json YAML

bc(1): Use more .Ql, misc related fixes.

(uwe)

2021-01-07 20:37:33 UTC MAIN commitmail json YAML

bc(1): Use .Fn and .Fa for functions and their arguments.

(uwe)

2021-01-07 20:22:34 UTC MAIN commitmail json YAML

bc(1): Indent displays with code examples.

(uwe)

2021-01-07 20:12:59 UTC MAIN commitmail json YAML

bc(1): Misc fixes in the DIFFERENCES section.

Make "last" an item, as intended.
Make operators literal.

(uwe)

2021-01-07 19:49:13 UTC MAIN commitmail json YAML

bc(1): small mdoc fixes to improve PostScript output.

The length/scale example at the beginning is not all literal.
Fix remaining "quoted" words to use .Dq
Fix a few small inline code snippets to be literal.

(uwe)

2021-01-07 19:11:58 UTC MAIN commitmail json YAML

lint: revert test for message 11

That test only produced other messages, but not message 11.

(rillig)

2021-01-07 18:37:41 UTC MAIN commitmail json YAML

2021-01-07 18:11:23 UTC MAIN commitmail json YAML

Remove .MAKE from nested target which is not a sub-make

This does not fix the issue, just makes the unit-test more accurate.

PR: 55578
Reviewed by: rillig

(sjg)

2021-01-07 17:28:20 UTC MAIN commitmail json YAML

Fix build for non-_MIPS_NEED_BUS_DMA_BOUNCE platforms

(skrll)

2021-01-07 16:03:08 UTC MAIN commitmail json YAML

Optimize nbperf

- add fudge mode which gives a slightly slower hash function, but works
  almost always in the first iteration by avoiding degenerate edges
- avoid keeping incidence lists around reducing the memory foot print by
  30%
- split edge processing from hashing as in the non-fudge case it is a
  reasonable costly part that often gets thrown away
- merge graph2 and graph3 routines now that they are mostly the same

(joerg)

2021-01-07 14:41:50 UTC MAIN commitmail json YAML

Optimize CPU and memory use of cdbw(3)

Reduce memory footprint and processing time by dropping the vertex parts
of the edges kept during the peeling. Hook up the
division-by-multiplication logic to help older platforms.

(joerg)

2021-01-07 13:25:51 UTC MAIN commitmail json YAML

More converstion from usbd_status to int for function error reporting.
This time it's the turn of usb_allocmem.

(missed in previous commit)

(skrll)

2021-01-07 12:02:52 UTC MAIN commitmail json YAML

progress: handle EINTR in writes. PR/55914

(lukem)

2021-01-07 07:40:39 UTC MAIN commitmail json YAML

The "available" property requires a variable length buffer, so
leave free(9) until prom_getprop is changed to use kmem_alloc(9)
instead of malloc(9).

(nakayama)

2021-01-07 00:38:46 UTC MAIN commitmail json YAML

2021-01-06 20:38:09 UTC MAIN commitmail json YAML

df: bump man page date

(ginsbach)

2021-01-06 20:04:30 UTC MAIN commitmail json YAML

psycho: explicit allocation of memory using kmem(9) instead of using the buffer indirectly allocted in the prom_getprop() function (which is still using malloc(9) for memory allocation

(palle)

2021-01-06 18:05:58 UTC MAIN commitmail json YAML

Simplify macro usage.

(wiz)

2021-01-06 17:22:36 UTC MAIN commitmail json YAML

Grammar fix for the grammer fix.  Plural subject needs plural verb.  :)

(pgoyette)

2021-01-06 17:13:23 UTC MAIN commitmail json YAML

Minor grammar fix, more markup, and update date (Dd).

(kre)

2021-01-06 14:07:43 UTC MAIN commitmail json YAML

Add some paragraph breaks.

(wiz)

2021-01-06 13:00:51 UTC MAIN commitmail json YAML

Implement the WSDISPLAYIO_GET_FBINFO ioctl, needed by X wsfb driver.

(jandberg)

2021-01-06 10:19:27 UTC MAIN commitmail json YAML

Markup improvements and typo fixes.

(wiz)

2021-01-06 09:23:05 UTC MAIN commitmail json YAML

lint: fix test for message 324 on i386

i386 is an ILP32 platform (arch/i386/targparam.h).  On these platforms,
int and long have the same size, and even with the -p option for
portability checks, INT_RSIZE in inittyp.c is defined to 4, not 3.

Because of this, in check_integer_conversion, psize(nt) was not greater
than psize(ot), and the warning was not issued.

To make the test behave the same on all platforms, changed the long
variables to long long, since long long is 64-bit on all platforms, and
int is 32-bit.

(rillig)

2021-01-06 09:15:59 UTC MAIN commitmail json YAML

ftp(1): fix description of "debug"

"debug" command and documentation got accidentally renamed
to "ftp_debug" 13 years ago, and was only partially fixed.

(lukem)

2021-01-06 08:17:46 UTC MAIN commitmail json YAML

2021-01-06 08:14:35 UTC MAIN commitmail json YAML

Switch DDB for powerpc/booke into SOFTWARE_SSTEP.

SR_SINGLESTEP aka PSL_SE bit in MSR is only available for oea, and HW
debug facilities for booke are significantly different from oea.

(rin)

2021-01-06 08:07:36 UTC MAIN commitmail json YAML

Sort headers. No functional changes intended.

(rin)

2021-01-06 08:04:58 UTC MAIN commitmail json YAML

Sort headers. Also, use <ddb/ddb.h> instead of db_interface.h and
db_machdep.h in order not to be bothered by subtle include order.

No functional changes intended.

(rin)

2021-01-06 07:56:20 UTC MAIN commitmail json YAML

Fix pmap_procwr() for powerpc/booke:

- Use PAGE_MASK, not PAGE_SIZE, to calculate page offset.
- Do not drop page offset of target address.

(rin)

2021-01-06 04:43:14 UTC MAIN commitmail json YAML

ftp: don't use restartable signals

Refactor to not rely upon restartable signals (SA_RESTART),
possibly fixing intermittent failures with -q QUITTIME.

ftp transfers: handle EINTR/EAGAIN in copy_bytes(),
instead of relying upon restartable signals.

http/https transfers: Explicitly print an error similar to
progressmeter() when timing-out for -Q QUITTIME in fetch_wait(),
and set errno to ETIMEDOUT so that the warn() in fetch_url()
prints a more accurate error message.

PR/55857

(lukem)

2021-01-05 23:50:29 UTC MAIN commitmail json YAML

lint: clean up generation of the operator tables

Instead of running a shell program that runs an AWK program that
generates the two files ops.c and ops.h, just define the operator tables
once in ops.def and use these definitions flexibly in ops.c and op.h.

(rillig)

2021-01-05 23:20:54 UTC MAIN commitmail json YAML

lint: remove redundant symbolic operator names

These symbolic names for INCBEF, INCAFT, DECBEF and DECAFT were
non-standard and thus confusing.  All other operators were as expected.
Now that the operator names from ops.def are very similar, there is no
need to keep to almost identical lists around.

No change to the user-visible messages since the only place where these
operator names were used was in 324, and that message was restricted to
PLUS, MINUS, MULT and SHL.

(rillig)

2021-01-05 23:07:49 UTC MAIN commitmail json YAML

lint: clean up symbolic operator names that are used in the messages

Including the "p" in the symbolic operator names was questionable, for
several reasons:

1.  The "p" could be taken to mean an actual variable name, which is
    confusing if the function doesn't have such a variable, or even more
    so if the line contains an unrelated variable called "p".

2.  For the binary operators, having the "p" mentioned on both sides of
    the operator (such as in "p + p") wrongly suggested that both
    operands of the expression were the same.

3.  The name "p" often stands for a pointer.  Most of the operators
    don't accept pointers, therefore the name was misleading.

For these reasons, the "p" was removed from the symbolic name of all
operators.  This makes several pairs of operators indistinguishable:

    INCBEF == INCAFT
    DECBEF == DECAFT
    UPLUS == PLUS
    UMINUS == MINUS
    STAR == MULT
    AMPER == AND

This is not expected to create any confusion since C programmers are
expected to know these double meanings.

The symbolic names for SHLASS and SHRASS were missing the '=' before.
This was added since omitting it was probably an oversight.

(rillig)

2021-01-05 22:38:51 UTC MAIN commitmail json YAML

lint: add test for "suggest cast" [324]

This warning is the only one that calls print_tnode, which in turn uses
the redundant operator names in str_op_t.

There is another list of operator names in ops.c, but those names
include more clutter, for example "p + p" instead of a simple "+".
Using those operator names would therefore rather be confusing. These
two lists should be merged, to remove unnecessary redundancy.

(rillig)

2021-01-05 22:17:40 UTC MAIN commitmail json YAML

Explain wedge auto discovery.

(mlelstv)

2021-01-05 21:40:42 UTC MAIN commitmail json YAML

lint: swap columns 1 and 2 in ops.def

List the ID of a record first, followed by the describing fields.

(rillig)

2021-01-05 21:32:47 UTC MAIN commitmail json YAML

lint: make generating the operators table simpler

The generated files are exactly the same as before.

(rillig)

2021-01-05 18:00:21 UTC MAIN commitmail json YAML

More converstion from usbd_status to int for function error reporting.
This time it's the turn of usb_allocmem.

(skrll)

2021-01-05 17:37:57 UTC MAIN commitmail json YAML

lint: make check_precedence_confusion simpler

In C, only binary operators have possibly confusing precedence.  All
binary operators have lower precedence than an explicit cast.  When an
expression is parsed, the parentheses are associated with the innermost
possible node.  This means that as soon as a cast operator is
parenthesized, its contained expression can no longer have confusing
precedence.

This allows the code to be written more succinct since the local
variables are no longer necessary.

(rillig)

2021-01-05 17:13:44 UTC MAIN commitmail json YAML

lint: in debug mode, log every newline

This helps to quickly see where in the source file the parser currently
is.  Previously, the parsing position was only printed after each
declaration, as part of "clear flags".

(rillig)

2021-01-05 16:34:37 UTC MAIN commitmail json YAML

lint: fix inconsistent whitespace in ops.def

(rillig)

2021-01-05 16:30:37 UTC MAIN commitmail json YAML

2021-01-05 16:15:09 UTC MAIN commitmail json YAML

Replace home grown #ifdef DIAGNOSTIC check with ASSERT_SLEEPABLE

(skrll)

2021-01-05 11:08:00 UTC MAIN commitmail json YAML

Use the compat machinery to build "native" IPF binaries as ipfilter
doesn't use compat32 64-bit alignment/size safe structures.

Fixes IPF on at least mips64.

(simonb)

2021-01-05 07:37:41 UTC MAIN commitmail json YAML

lint: add missing strings for operators

It's difficult to keep these lists in sync when they are spread over
several files.  The lists had been inconsistent since 2008-04-26.  The
inconsistency didn't lead to undefined behavior though since the
operator names are only used in 2 places:

1. check_integer_conversion in message 324 only calls that function with
a few selected operators, all of which are above the missing ones.

2. mkinit prints the node including its operator, but only in debug
mode.  Furthermore I'm not sure whether any of the broken operator names
could ever be accessed at this place since mkinit is only called for
expressions, and the node types are INIT, CASE, FARG, which are all
special.

(rillig)

2021-01-05 00:22:05 UTC MAIN commitmail json YAML

lint: clean up comments

(rillig)

2021-01-05 00:17:21 UTC MAIN commitmail json YAML

lint: extract code for determining possible precedence confusion

The function check_precedence_confusion was pretty long, and right in
the middle of that function was the complicated part of determining
which of the operand combinations are confusing and which aren't.

Extract this part into a separate function to document on which
information this decision is based.  This makes it easier to understand
the code since there are fewer local variables around.

As a left-over from a previous commit, rop and rparn don't need to be
initialized twice, now that the assertion for a binary operator is in
place.

Remove the large and useless switch statement over all operator types.
This list was completely unsorted, for no apparent reason.  To see the
list of operators, better look them up in ops.def, there was no need to
have this list duplicated here.

(rillig)

2021-01-05 00:02:52 UTC MAIN commitmail json YAML

lint: remove unused TBUILTIN_SIZEOF from the C grammar

This token is not generated by the lexer, and it was misspelled anyway.
All other token names start with "T_", this one was missing the
underscore.

(rillig)

2021-01-04 23:58:19 UTC MAIN commitmail json YAML

lint: precedence confusion is only possible with binary operators

No functional change.

The operator table in ops.def states that every operator that has
possibly confusing precedence is also a binary operator, so assert that
instead of having two different code paths.

(rillig)

2021-01-04 23:50:47 UTC MAIN commitmail json YAML

lint: fix bug in "precedence confusion possible [169]"

(rillig)

2021-01-04 23:47:27 UTC MAIN commitmail json YAML

lint: document and demonstrate the bug in check_precedence_confusion

It took quite a while to get to the correct interpretation of this small
piece of code and to draw the right conclusions from it.  Now the bug is
finally ready to be fixed, as already announced in the test.

(rillig)

2021-01-04 23:17:04 UTC MAIN commitmail json YAML

lint: add more rationale for removing effect-less code

(rillig)

2021-01-04 22:41:56 UTC MAIN commitmail json YAML

lint: finish the comments in check_precedence_confusion

(rillig)

2021-01-04 22:33:47 UTC MAIN commitmail json YAML

lint: replace LERROR with lint_assert in check_expr_misc

This reduces the visual clutter.  There is no reason for anyone to
modify the code around the CALL operator, therefore the assertion is not
expected to fail anytime soon.

(rillig)

2021-01-04 22:29:01 UTC MAIN commitmail json YAML

lint: reduce comment for xgetblk to the actually interesting part

(rillig)

2021-01-04 22:26:51 UTC MAIN commitmail json YAML

2021-01-04 22:09:35 UTC MAIN commitmail json YAML

Rename tsl256x.c -> tsllux.c.  No other changes are made by this commit.

(thorpej)

2021-01-04 21:59:49 UTC MAIN commitmail json YAML

Tweak register bit names, in preparation for supporting younger siblings
of this chip.

(thorpej)

2021-01-04 21:30:07 UTC MAIN commitmail json YAML

lint: fix bugs in dprint_node in debug mode (since today)

The node was dereferenced before the null check.  GCC 5.5 didn't warn
about this obvious bug, not even with -Wall -Wextra -O2.  Such a case
didn't occur though in the few tests that this function was used in.

The indentation for the nested nodes only needs to be set for a few
lines of code, make this region as small as possible.

There are nodes that use both tn_left and tn_right, even though they are
not defined as binary operators.  An example is CALL, for which tn_left
is the address of the function name and tn_right, which are the
arguments, linked via PUSH nodes.  CALL is not a binary operator since
it doesn't do any calculations with its arguments.

(rillig)

2021-01-04 21:17:31 UTC MAIN commitmail json YAML

lint: move dprint_node to the top of the file

It now resides right below dumpnode, which implements the same idea but
uses a fixed-size output buffer and prints everything in a single line,
which quickly gets hard to read.  Maybe that's the reason why it had
been commented out since it got added in 2014.

(rillig)

2021-01-04 18:27:47 UTC MAIN commitmail json YAML

2021-01-04 18:27:00 UTC MAIN commitmail json YAML

dev/ic/tpm: Take advantage of entropy source if available.

If the tpm is deactivated, though, detach the entropy source so we
don't continue to try polling it -- it can't be activated without a
reboot anyway.

(riastradh)

2021-01-04 18:26:08 UTC MAIN commitmail json YAML

dev/ic/tpm: Add missing line break in attach output.

(riastradh)

2021-01-04 18:23:10 UTC MAIN commitmail json YAML

2021-01-04 18:22:19 UTC MAIN commitmail json YAML

dev/ic/tpm: Tidy up headers.

- Add include guards.
- Add necessary includes.
- Sort includes.
- Use _BYTE_ORDER, not BYTE_ORDER, for public header.

(riastradh)

2021-01-04 18:19:53 UTC MAIN commitmail json YAML

2021-01-04 18:14:38 UTC MAIN commitmail json YAML

2021-01-04 18:11:26 UTC MAIN commitmail json YAML

2021-01-04 18:09:01 UTC MAIN commitmail json YAML

2021-01-04 17:42:29 UTC MAIN commitmail json YAML

2021-01-04 17:35:12 UTC MAIN commitmail json YAML

2021-01-04 17:22:59 UTC MAIN commitmail json YAML

2021-01-04 17:06:21 UTC MAIN commitmail json YAML

lint: in debug mode, print node tree for precedence

>From the code alone, it is too difficult to see how the various internal
operators are combined and what properties they have.  A simple tree
visualization helps to see all the details.

This is used to track down the typo in check_precedence_confusion, to
see whether it could have possibly had any influence at all.

(rillig)

2021-01-04 16:17:26 UTC MAIN commitmail json YAML

Fix calculation of cylinder count from medium size.
Pullups needed.

(mlelstv)

2021-01-04 15:56:24 UTC MAIN commitmail json YAML

2021-01-04 15:52:51 UTC MAIN commitmail json YAML

2021-01-04 15:36:22 UTC MAIN commitmail json YAML

Use sel{record,remove}_knote().

(thorpej)

2021-01-04 15:29:34 UTC MAIN commitmail json YAML

Use sel{record,remove}_knote().

(thorpej)

2021-01-04 15:14:32 UTC MAIN commitmail json YAML

2021-01-04 15:13:50 UTC MAIN commitmail json YAML

2021-01-04 15:13:06 UTC MAIN commitmail json YAML

2021-01-04 14:48:52 UTC MAIN commitmail json YAML

2021-01-04 05:35:15 UTC MAIN commitmail json YAML

sync cpuids[] of sys/arch/aarch64/aarch64/cpu.c r1.43

(ryo)

2021-01-04 01:12:20 UTC MAIN commitmail json YAML

2021-01-04 01:11:01 UTC MAIN commitmail json YAML

2021-01-03 21:33:50 UTC MAIN commitmail json YAML

lint: use consistent indentation for C grammar

(rillig)

2021-01-03 21:12:03 UTC MAIN commitmail json YAML

make(1): remove anonymous union from struct ListNode

Anonymous structs and unions have been introduced in C11.  The code of
make is supposed to be compatible with C90 though.

The additional members were intended to be used during an interactive
debugging session only and were thus not relevant to running the actual
code.

(rillig)

2021-01-03 20:44:55 UTC MAIN commitmail json YAML

lint: fix code generation from err.c

That file does not need to be in the current directory.

(rillig)

2021-01-03 20:38:26 UTC MAIN commitmail json YAML

lint: rename funcarg and funccall to longer names

>From the previous short names, it was no obvious that these functions
create a new tree node.

The function named funccall in lint2 has been left as-is, since it has a
completely different prototype.

(rillig)

2021-01-03 20:31:09 UTC MAIN commitmail json YAML

2021-01-03 20:20:01 UTC MAIN commitmail json YAML

lint: add test for 265 "c89 C does not support 'long long'"

(rillig)

2021-01-03 20:14:38 UTC MAIN commitmail json YAML

2021-01-03 20:04:09 UTC MAIN commitmail json YAML

lint: rename cstk to cstmt

Most of the code that deals with control statements is only interested
in the innermost control statement, and not if that is a stack or not.
Therefore, emphasize that part in the variable name.

The member c_next was confusing since the "direction" of this "next
element" was ambiguous.  In a sequence of if statements, the "next"
element could have equally been the following one, not the surrounding
one.

(rillig)

2021-01-03 19:15:36 UTC MAIN commitmail json YAML

lint: rename t_ispacked to t_packed and d_ispacked to d_packed

It's shorter, and the other flags of the type or declaration also don't
have "is" in their names.  Except for t_isenum, but that's because there
is a macro named t_enum that would interfere with that name.

(rillig)

2021-01-03 19:10:47 UTC MAIN commitmail json YAML

2021-01-03 18:48:37 UTC MAIN commitmail json YAML

lint: in DEBUG mode, verify printf parameters for messages

Since several years GCC validates printf-style strings, and there is no
reason not to let GCC do that work.  This prevents bugs like the
segmentation fault that was fixed in tree.c 1.109 from 2021-01-01.

By default, lint is compiled with DEBUG off, but it's easy enough to
compile it in debug mode once in a while.

(rillig)

2021-01-03 18:35:51 UTC MAIN commitmail json YAML

lint: remove redundant include of externs1.h

It is already included by lint1.h.

(rillig)

2021-01-03 17:42:45 UTC MAIN commitmail json YAML

lint: let gnuism and c99ism return void instead of int

The return value was only used in a single case.  Duplicating the
condition for printing a message is ok in that case, since it makes all
other places in the code simpler.

The occasional "(void)" or "msg = " before the function call had hidden
the calls from check-msgs.lua, which didn't check the message texts in
such cases.

(rillig)

2021-01-03 17:42:10 UTC MAIN commitmail json YAML

2021-01-03 17:28:33 UTC MAIN commitmail json YAML

Use sel{record,remove}_knote().

(thorpej)

2021-01-03 17:11:19 UTC MAIN commitmail json YAML

lint: separate error and warning for 27 and 58

Even though this results in more lines of code, the benefit is that the
message text in the comment is verified by check-msgs.lua.  The code is
also easier to read, the parentheses and asterisk were not needed.

(rillig)

2021-01-03 16:59:59 UTC MAIN commitmail json YAML

2021-01-03 16:49:32 UTC thorpej-futex commitmail json YAML

2021-01-03 16:35:05 UTC thorpej-futex commitmail json YAML

2021-01-03 16:14:04 UTC thorpej-futex commitmail json YAML

2021-01-03 16:13:07 UTC thorpej-futex commitmail json YAML

2021-01-03 16:12:44 UTC thorpej-futex commitmail json YAML

2021-01-03 15:55:18 UTC MAIN commitmail json YAML

lint: add detailed type information for functions

(rillig)

2021-01-03 15:51:16 UTC MAIN commitmail json YAML

2021-01-03 15:44:36 UTC MAIN commitmail json YAML

lint: add test for message 124 "illegal pointer combination"

The message may be correct, but it is not helpful in any way.  There are
just too many function pointers that may differ in a very small detail.

Before tyname.c 1.20 from 2021-01-02, the string representation of type
names was often limited to only 63 characters.  Because of this, it made
sense to omit any detail that could need more space than this.  Now that
this limitation is gone, it's reasonable to add more detail to the type
information, especially since that information is readily available.

(rillig)

2021-01-03 15:35:01 UTC MAIN commitmail json YAML

2021-01-03 15:33:05 UTC MAIN commitmail json YAML

ntp: respect user's wishes to disable interface scanning

While here, disable periodic scanning by default on NetBSD as it's
no longer needed.
The user can still enable it though with a positive number to the -U
option.

kardel@ So far I see no other issues from the pitfalls I know of

(roy)

2021-01-03 12:52:54 UTC netbsd-9 commitmail json YAML

2021-01-03 12:51:33 UTC netbsd-9 commitmail json YAML

Apply patch, requested by khorben in ticket #1177 (issue solved differently
in -current):

sys/kern/init_main.c (apply patch)

PR kern/55906: create the aiodone workqueue before running mountroothooks.

(martin)

2021-01-03 10:31:37 UTC MAIN commitmail json YAML

2021-01-03 01:43:13 UTC MAIN commitmail json YAML

df: add grand total option

Add a grand total option, -c, similar to the du(1) -c option. Adapted from
the same option (-c) in FreeBSD df(1).

(ginsbach)

2021-01-02 22:02:27 UTC MAIN commitmail json YAML

route(8): group RTF_GATEWAY and ~RTF_GATEWAY (-iface).

While here, tweak RTF_GATEWAY description.  Passive voice elsewhere in
this table is used to talk about the routes themselves, while here
it's about packets.

(uwe)

2021-01-02 20:36:02 UTC MAIN commitmail json YAML

route(8): be consistent about capitalization.

(uwe)

2021-01-02 20:09:06 UTC MAIN commitmail json YAML

make(1): add a few remarks to JobOutput

That function is not used in practice.  Still, there are a lot of subtle
details that can get wrong in that code.

(rillig)

2021-01-02 19:50:42 UTC MAIN commitmail json YAML

route(8): don't split -blackhole and -noblackhole.

(uwe)

2021-01-02 19:22:42 UTC MAIN commitmail json YAML

lint: fix integration test

The body of an ATF test must never return 1 but instead report failure
via atf_fail.  Otherwise the following error message appears:

    Failed: Test case body returned a non-ok exit code, but this is
    not allowed

The test program t_integration intentionally bypasses the official ATF
API for performance reasons.  But even then, it should stick to the API
as close as possible.

(rillig)

2021-01-02 18:44:58 UTC MAIN commitmail json YAML

lint: convert bitfieldtype_ok from int to bool

No functional change intended, except for the output in debug mode.

(rillig)

2021-01-02 18:26:44 UTC MAIN commitmail json YAML

2021-01-02 18:06:01 UTC MAIN commitmail json YAML

2021-01-02 17:17:00 UTC MAIN commitmail json YAML

lint: fix message 308 "Invalid type for _Complex"

Previously, lint aborted since it didn't expect tspec_name to be called
with NOTSPEC, which at that point was the only possible value of
dcs->d_cmod.

(rillig)

2021-01-02 16:55:45 UTC MAIN commitmail json YAML

lint: add test for message 308 "Invalid type %s for _Complex"

(rillig)

2021-01-02 16:33:39 UTC MAIN commitmail json YAML

2021-01-02 16:12:39 UTC MAIN commitmail json YAML

lint: fix and document test for illegal bit-fields

The _Complex bit-field should have been commented out.

(rillig)

2021-01-02 15:55:54 UTC MAIN commitmail json YAML

lint: add test for message 35: illegal bit-field type

Bug: _Bool is not accepted as a bit-field, but it should be.

Bug: lint aborts in a controlled manner with message "common/tyname.c,
190: tspec_name(0)" when it sees a declaration of a _Complex bit-field.
(Not that a _Complex bit-field would make any sense.)

(rillig)

2021-01-02 12:39:33 UTC MAIN commitmail json YAML

Use USBMALLOC_ZERO to ensure that all DMA memory is zero initialized.

(jmcneill)

2021-01-02 12:39:03 UTC MAIN commitmail json YAML

Add USBMALLOC_ZERO flag for requesting zero initialized DMA memory.

(jmcneill)

2021-01-02 12:12:26 UTC MAIN commitmail json YAML

set the cursor to invisible

(jmcneill)

2021-01-02 12:10:17 UTC MAIN commitmail json YAML

trailing whitespace

(jmcneill)

2021-01-02 11:36:36 UTC MAIN commitmail json YAML

2021-01-02 11:12:34 UTC MAIN commitmail json YAML

lint: demonstrate that -t mode is practically unusable

Since main1.c from 2014-04-18, running lint in -t mode produces strange
warnings in lines 1 to 3 of no file at all.

This is caused by the builtins that are parsed in main().  These
builtins are incompatible with traditional mode because they use long
double, which had not been known at that time.

(rillig)

2021-01-02 10:24:42 UTC netbsd-9 commitmail json YAML

Ammend ticket #1173 for additional pullups

(martin)

2021-01-02 10:23:46 UTC netbsd-9 commitmail json YAML

Additionally pull up following revision(s) (requested by rin in ticket #1173):

sys/kern/core_elf32.c: revision 1.67

Use <compat/netbsd32/netbsd32.h> instead of <machine/netbsd32_machdep.h>,
which is not intended for standalone use.

Compile tested for all ports with their own COMPAT_NETBSD32 codes:
aarch64, amd64, arm, mips64, sparc64, and algor64.

Should fix build failure for mips64 in netbsd-9, where netbsd32.h is not
included by other header files.

(martin)

2021-01-02 10:22:44 UTC MAIN commitmail json YAML

lint: add a test for each message produced by lint1

Having a test for each message ensures that upcoming refactorings don't
break the basic functionality.  Adding the tests will also discover
previously unknown bugs in lint.

The tests ensure that every lint message can actually be triggered, and
they demonstrate how to do so.  Having a separate file for each test
leaves enough space for documenting historical anecdotes, rationale or
edge cases, keeping them away from the source code.

The interesting details of this commit are in Makefile and
t_integration.sh.  All other files are just auto-generated.

When running the tests as part of ATF, they are packed together as a
single test case.  Conceptually, it would have been better to have each
test as a separate test case, but ATF quickly becomes very slow as soon
as a test program defines too many test cases, and 50 is already too
many.  The time complexity is O(n^2), not O(n) as one would expect.
It's the same problem as in tests/usr.bin/make, which has over 300 test
cases as well.

(rillig)

2021-01-02 08:55:51 UTC MAIN commitmail json YAML

Markup/typo fixes.

(wiz)

2021-01-02 08:38:56 UTC MAIN commitmail json YAML

2021-01-02 03:49:26 UTC MAIN commitmail json YAML

lint: fix buffer truncation for type names

Previously, most type names had been cut off after 63 significant
characters.  In some cases, 127 characters survived, or 255.  And for
the debugging messages, sometimes even 1023.  This inconsistency was
useless.

It was wrong in the first place to make the caller of the function
tyname responsible for handling the buffer.  That's not something a
caller of such a simple function should do.  These callers have better
things to do.

The API of the new function type_name is as simple as possible.

In the implementation, the name of the type is generated anew each time.
I just didn't know whether the type details could change, once the type
is initialized, and I didn't want to find out.  To be on the safe side,
the resulting type name is cached, independently of the type it was
generated for.  Using a trivial, unbalanced binary tree should be good
enough for now.

All this work is necessary to support adding new debug logging, without
being distracted by irrelevant implementation details such as these
buffer sizes.  Adding new debug messages should be fun and easy; up to
now, it was overly bureaucratic.

(rillig)

2021-01-02 03:41:07 UTC MAIN commitmail json YAML

Update the debug set for testpat(6).

(nat)

2021-01-02 03:24:02 UTC MAIN commitmail json YAML

Add testpat(6) to the games set.

(nat)

2021-01-02 03:21:39 UTC MAIN commitmail json YAML

Add testpat(6) to games.

Testpat displays a test pattern in curses(3).

(nat)

2021-01-02 03:00:56 UTC MAIN commitmail json YAML

be more careful when optimizing stretches of blanks into erasecols()
now testpat's output is redrawn properly

(macallan)

2021-01-02 02:13:42 UTC MAIN commitmail json YAML

Use <compat/netbsd32/netbsd32.h> instead of <machine/netbsd32_machdep.h>,
which is not intended for standalone use.

Compile tested for all ports with their own COMPAT_NETBSD32 codes:
aarch64, amd64, arm, mips64, sparc64, and algor64.

Should fix build failure for mips64 in netbsd-9, where netbsd32.h is not
included by other header files.

(rin)

2021-01-02 01:36:28 UTC MAIN commitmail json YAML

lint: order tspec_name in the same way as the enum

(rillig)

2021-01-02 01:12:39 UTC MAIN commitmail json YAML

lint: fix typo in check-msgs tool

(rillig)

2021-01-02 01:06:15 UTC MAIN commitmail json YAML

2021-01-01 23:24:31 UTC MAIN commitmail json YAML

libunbound: Enforce that mini_event isn't used by include/config.h

As I tire of fixing it to use libevent.

(roy)

2021-01-01 23:17:15 UTC MAIN commitmail json YAML

Revert prior

With the correct #defines mini_event.c and winsock_event.c are
compiled but practically unused.

What is exposed is not part of the public API, but appease the
peanut gallery.

(roy)

2021-01-01 23:07:49 UTC MAIN commitmail json YAML

var-op-expand needs MAKE.SAVE_DOLLARS=yes

(sjg)

2021-01-01 20:38:36 UTC MAIN commitmail json YAML

libunbound: Now we use libevent, don't build mini_event or winsock_event.

(roy)

2021-01-01 20:16:16 UTC MAIN commitmail json YAML

libunbound: actually use libevent as we link to it

Would appreciate if people modify this file to actually test what
polling mechanism unbound uses as select(2) is pretty poor.

(roy)

2021-01-01 20:02:56 UTC MAIN commitmail json YAML

lint: add debug logging for initialization using named members

(rillig)

2021-01-01 19:28:51 UTC MAIN commitmail json YAML

lint: document that C99-style initialization is necessarily buggy

(rillig)

2021-01-01 19:15:58 UTC MAIN commitmail json YAML

2021-01-01 19:11:20 UTC MAIN commitmail json YAML

lint: fix wrong warning about bitfield in C99 structure initialization

The variable namemem is supposed to be a circular list, which is
"documented" implicitly in push_member.

The implementation was buggy though.  In pop_member, the circular list
was destroyed though.  Given the list (capital, major, favorite_color,
green), removing capital made major point to itself in the forward
direction, even though it should not have been modified at all.

In the test, I had been too optimistic to quickly understand the code
around variable initialization.  I was wrong though, so I had to adjust
the comments there to reality.

(rillig)

2021-01-01 17:21:47 UTC MAIN commitmail json YAML

ntpd: In the event of route(4) overflow, update the interfaces

(roy)

2021-01-01 16:50:47 UTC MAIN commitmail json YAML

2021-01-01 14:57:14 UTC MAIN commitmail json YAML

wpa: If route socket overflows, sync drivers to system interfaces

Messages such as RTM_IFNFO or RTM_IFANNOUNCE could have been lost.
As such, sync the state of our internal driver to the state of the
system interfaces as reported by getifaddrs(2).

This change requires the routing socket be placed in non-blocking
mode. While here, set the routing and inet sockets to close on exec.

(roy)

2021-01-01 14:51:44 UTC MAIN commitmail json YAML

lint: remove custom LINTFLAGS

These flags are missing the options -g (GNUisms) and -S (C9X mode).
Without these flags, NetBSD's system headers cannot be compiled as they
make heavy use of __inline and __attribute__.

(rillig)

2021-01-01 14:11:20 UTC MAIN commitmail json YAML

lint: combine duplicate case branches in popdecl

This works around GCC 9, which didn't see that the following statement
cannot terminate normally, even though 0 is obviously a constant expression
and assert_failed is marked as __attribute__((__noreturn__)).

do {
if (!(0))
assert_failed(...);
} while (0)

(rillig)

2021-01-01 14:08:33 UTC MAIN commitmail json YAML

Use printf, not printf_nolog, in lockdebug dumps.

Otherwise we get no diagnostic information in crash dumps or dmesg,
which really puts a damper on the utility of lockdebug.

(If there's a reason for printf_nolog instead of printf, it should be
documented in comments here, and it had better be a pretty good
reason for destroying the diagnostic information that is half the
point of lockdebug.)

(riastradh)

2021-01-01 14:04:17 UTC MAIN commitmail json YAML

Nix trailing whitespace.

(riastradh)

2021-01-01 13:43:34 UTC MAIN commitmail json YAML

Build breakage fix (hopefully) - brain dead gcc.  NFCI.

(kre)

2021-01-01 13:21:11 UTC netbsd-8 commitmail json YAML

2021-01-01 13:19:58 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by nia in ticket #1645):

sys/ufs/ufs/ufs_quota1.c: revision 1.23

Avoid potentially accessing an array with an index out of range.

(martin)

2021-01-01 13:19:03 UTC netbsd-9 commitmail json YAML

2021-01-01 13:17:08 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by nia in ticket #1176):

sys/ufs/ufs/ufs_quota1.c: revision 1.23

Avoid potentially accessing an array with an index out of range.

(martin)

2021-01-01 13:14:29 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by rin in ticket #1175):

sys/arch/aarch64/aarch64/trap.c: revision 1.28,1.31,1.32 (patch)

- add support conditionally execution for A32 instruction emulation
- separated the processing of ARM and THUMB emul clearly. do not confuse the Thumb-32bit instruction with the ARM instruction.
- use far_el1 instead of tf_pc to return correct fault address when instruction emulation

(martin)

2021-01-01 13:06:39 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by rin in ticket #1174):

sys/arch/aarch64/aarch64/vm_machdep.c: revision 1.9 (patch)

Fix clone(2) for COMPAT_NETBSD32.
(1) Set r13 (sp for arm32 processes) appropriately when stack is
    specified to fork1().
(2) For arm32 processes, align stack to 8-byte boundary, instead of
    16-byte for native aarch64 processes, to match our 32-bit ABI:
https://nxr.netbsd.org/xref/src/sys/arch/arm/arm32/vm_machdep.c#150

Note that sp alignment checking is disabled in aarch32 mode, and
this works fine with AARCH64_EL0_STACK_ALIGNMENT_CHECK option.

OK ryo

(martin)

2021-01-01 13:04:08 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by rin in ticket #1173):

sys/kern/core_elf32.c: revision 1.65 (patch)

Use correct note types for register storage in 32-bit core files for
architecture on which 64- and 32-bit ABIs use different values for
PT_GET{,FP}REGS, i.e., aarch64{,eb}.

Now, 32-bit GDB works fine for core files generated by aarch64{,eb}
kernel.

Should be no functional changes for ports other than aarch64{,eb}.

(martin)

2021-01-01 12:58:36 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by rin in ticket #1172):

sys/arch/aarch64/aarch64/trap.c: revision 1.30
sys/arch/aarch64/include/ptrace.h: revision 1.10
sys/arch/aarch64/include/netbsd32_machdep.h: revision 1.4 (patch)
sys/arch/aarch64/aarch64/netbsd32_machdep.c: revision 1.14
sys/arch/aarch64/aarch64/netbsd32_machdep.c: revision 1.15

Add support of ptrace(2) for COMPAT_NETBSD32.

Now, GDB for arm32 is usable for debugging 32bit applications.
OK ryo@

For rev 1.14 and before, netbsd32_process_write_regs() returns EINVAL
if non-modifiable bits are set in CPSR.
Instead, mask out non-modifiable bits and make this function success
regardless of value in CPSR. New behavior matches that of arm:
https://nxr.netbsd.org/xref/src/sys/arch/arm/arm/process_machdep.c#187

This fixes lib/libc/sys/t_ptrace_wait*:access_regs6 tests, in which
register contents retrieved by PT_GETREGS are set back by PT_SETREGS.

No new regression is observed in full ATF run.

OK ryo

(martin)

2021-01-01 12:54:08 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by rin in ticket #1171):

sys/arch/aarch64/aarch64/pmap.c: revision 1.82
sys/arch/aarch64/aarch64/pmap.c: revision 1.83

pmap_procwr(): sync icache even if p != curproc. This fixes applications
like GDB for arm32, that rewrite text of other process.

Thanks to ryo@ for discussion.

Use tlen for temporary length variable instead of l, which is usually
used for struct lwp *.
No binary changes.

(martin)

2021-01-01 12:38:50 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by rin in ticket #1170):

sys/arch/aarch64/aarch64/cpufunc.c: revision 1.22 (patch)
sys/arch/aarch64/aarch64/cpufunc.c: revision 1.23 (patch)
sys/arch/aarch64/aarch64/pmap.c: revision 1.81

Set uvmexp.ncolors appropriately, which is required for some CPU
models with VIPT icache.

Otherwise, alias in virtual address results in inconsistent results,
at least for applications that rewrite text of other process, e.g.,
GDB for arm32.

Also, this hopefully fixes other unexpected failures due to alias.
Confirmed that there's no observable regression in performance;
difference in ``time make -j8'' for GENERIC64 kernel on BCM2837
with and without setting uvmexp.ncolors is within 0.1%.

Thanks to ryo@ for discussion.

Fix uvmexp.ncolors for some big.LITTLE configuration; it is uncertain
which CPU is used as primary, and as a result, secondary CPUs can
require larger number of colors.

In order to solve this problem, update uvmexp.ncolors via
uvm_page_recolor(9) when secondary CPUs are attached, as done for
other ports like x86.

Pointed out by jmcneill@, and discussed on port-arm@:
http://mail-index.netbsd.org/port-arm/2020/07/03/msg006837.html
Tested and OK'd by ryo@.

Fix previous; add missing <uvm/uvm.h> include.

(martin)

2021-01-01 12:31:19 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by rin in ticket #1169):

sys/arch/aarch64/aarch64/trap.c: revision 1.21
sys/arch/aarch64/aarch64/trap.c: revision 1.26

PR port-arm/54702
Add support for earmv6hf binaries on COMPAT_NETBSD32 for aarch64:
- Emulate ARMv6 instructions with cache operations register (c7), that
  are deprecated since ARMv7, and disabled on ARMv8 with LP64 kernel.

Many thanks to ryo@ for helping me to add support of Thumb-mode,
as well as providing exhaustive test cases:
  https://github.com/ryo/mcr_test/

We've confirmed:
- Emulation works in Thumb-mode.
- T32 16-bit length illegal instruction results in SIGILL, even if
  it is located nearby a boundary b/w mapped and unmapped pages.
- T32 32-bit instruction results in SIGSEGV if it is located across
  a boundary b/w mapped and unmapped pages.

When emulating obsoleted arm32 instructions, use ufetch(9) rather than
dereference tf_pc directly to retrieve an instruction.
Even if tf_pc is valid when processor decodes the instruction, someone
can unmap its page before tf_pc is read in the exception handler.
Now, SIGSEGV is delivered correctly to the process in this case, rather
than kernel panic.

Pointed out by maxv.

Discussed with ryo and skrll.

(martin)

2021-01-01 11:58:21 UTC MAIN commitmail json YAML

Use symbolic names for hwtype values.

(jmcneill)

2021-01-01 11:58:03 UTC MAIN commitmail json YAML

2021-01-01 11:51:47 UTC MAIN commitmail json YAML

2021-01-01 11:51:15 UTC MAIN commitmail json YAML

lint: remove NTSPEC from enum tspec_t

The number of elements in an enumeration is not a valid enum constant of
that enumeration itself.

(rillig)

2021-01-01 11:44:41 UTC MAIN commitmail json YAML

2021-01-01 11:41:01 UTC MAIN commitmail json YAML

2021-01-01 11:14:06 UTC MAIN commitmail json YAML

lint: complete message 203 for case labels

(rillig)

2021-01-01 11:09:41 UTC MAIN commitmail json YAML

2021-01-01 11:01:03 UTC MAIN commitmail json YAML

lint: extract main part of case_label into separate function

(rillig)

2021-01-01 10:55:28 UTC MAIN commitmail json YAML

lint: split label handling into separate functions

The only thing these cases have in common is the name "label" and the
"reached = 1" assignment.  That's not reason enough to combine
completely unrelated functions.

(rillig)

2021-01-01 10:12:25 UTC MAIN commitmail json YAML

evbarm: Add support for Amlogic G12 family SoCs

(ryo)