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:35:41 UTC Now

2021-12-13 00:09:07 UTC MAIN commitmail json YAML

make: fix memory leak in IncludeFile

Previously, each .include leaked a copy of the file name.

(rillig)

2021-12-12 23:47:22 UTC MAIN commitmail json YAML

make: in Arch_ParseArchive, rename libName to lib

For symmetry with mem.

No binary change.

(rillig)

2021-12-12 23:39:34 UTC MAIN commitmail json YAML

make: remove unused type MFStr

The only binary change is the line number of the assertion in
Substring_Sub.

(rillig)

2021-12-12 23:32:04 UTC MAIN commitmail json YAML

make: in Arch_ParseArchive, replace MFStr with FStr

This was the only use of the type MFStr, which produced the same code as
FStr.

No binary change.

(rillig)

2021-12-12 22:58:36 UTC MAIN commitmail json YAML

Add a bunch of missing food items.

(dholland)

2021-12-12 22:41:47 UTC MAIN commitmail json YAML

make: use simpler memory management for parsing archive members

No functional change.

(rillig)

2021-12-12 22:20:53 UTC MAIN commitmail json YAML

2021-12-12 22:16:49 UTC MAIN commitmail json YAML

2021-12-12 20:45:48 UTC MAIN commitmail json YAML

Add .SUFFIXES as read-only variable.

References to ${.SUFFIXES} are handled dynamically in
ParseVarnameLong by calling Suff_NamesStr.

The variable cannot be set normally.

Reviewed by: rillig

(sjg)

2021-12-12 20:33:22 UTC MAIN commitmail json YAML

2021-12-12 16:41:39 UTC MAIN commitmail json YAML

ParseVarnameLong: minimize calls to LazyBuf_Get

Reviewed by: rillig

(sjg)

2021-12-12 15:44:41 UTC MAIN commitmail json YAML

make: rename Parse_SetInput to Parse_PushInput

The word 'set' sounded too much like it would replace the current file,
but instead the file is pushed to the stack, and the previous file is
continued later.

No functional change.

(rillig)

2021-12-12 15:36:52 UTC MAIN commitmail json YAML

make: remove unused loadedfile.path

(rillig)

2021-12-12 14:33:13 UTC MAIN commitmail json YAML

Fix copypasto in comment.

(nia)

2021-12-12 14:27:48 UTC MAIN commitmail json YAML

make: rename ForLoop.sub_next to nextItem

This matches the naming style of the other ForLoop members.

No functional change.

(rillig)

2021-12-12 13:43:47 UTC MAIN commitmail json YAML

make: fix memory leak in LazyBuf

This affects many operations on variable expressions.  Those using
LazyBuf_Done are affected, those using LazyBuf_DoneGet aren't.

$ cat <<'EOF' > lazybuf-memleak.mk
.for i in ${:U:range=5}
.  for j in ${:U:range=1000}
.    for k in ${:U:range=1000}
.      if 0 && ${VAR:Dpattern\: that needs unescaping}
.      endif
.    endfor
.  endfor
.endfor

all:
@ps -o vsz -p ${.MAKE.PID} | sed 1d
EOF

Before using LazyBuf for the modifier ':D':

    $ make-2021.04.14.16.12.26 -r -f lazybuf-memleak.mk
        VSZ    RSZ
    1357136 1336432

Using LazyBuf for the modifier ':D':

    $ make-2021.04.14.16.59.34 -r -f lazybuf-memleak.mk
        VSZ    RSZ
    1590864 1574164

This commit alone allocates around 150 MB more data, which matches
5_000_000 strings * 30 bytes/string.

It looks very wrong that the above simple makefile uses 1.3 GB of RAM at
all, and it had already done this in 2017, long before LazyBuf was
introduced.  Before 2017.01.30.02.46.20, the above test makefile reports
way smaller numbers, but that's because the modifier ':range' did not
exist back then.

(rillig)

2021-12-12 13:05:14 UTC MAIN commitmail json YAML

2021-12-12 11:18:46 UTC MAIN commitmail json YAML

s/Miscelaneous/Miscellaneous/ and s/slahes/slashes/ in comments.

(andvar)

2021-12-12 11:10:04 UTC MAIN commitmail json YAML

2021-12-12 11:02:23 UTC MAIN commitmail json YAML

make: remove enum.o from Makefile.boot

On 2021-11-18, enum.h and enum.c have been removed.

(rillig)

2021-12-12 10:53:37 UTC MAIN commitmail json YAML

make: do not report '?' for fully covered header files

(rillig)

2021-12-12 10:33:03 UTC MAIN commitmail json YAML

make: only define target report-coverage if USE_COVERAGE is yes

Without USE_COVERAGE, GCOV was undefined, the '2>&1' passed all error
messages to GCOV_PERL, when then discarded them.  If the error messages
had been left on stderr, the error message 'sh: arch.o.gcda: not found'
would have been a clear indicator of the actual cause of an empty
coverage report.

(rillig)

2021-12-12 09:49:09 UTC MAIN commitmail json YAML

tests/make: add tests for irrelevant function calls

(rillig)

2021-12-12 09:36:00 UTC MAIN commitmail json YAML

2021-12-12 09:00:07 UTC MAIN commitmail json YAML

2021-12-12 08:55:29 UTC MAIN commitmail json YAML

2021-12-12 08:49:58 UTC MAIN commitmail json YAML

2021-12-12 08:42:29 UTC MAIN commitmail json YAML

make: merge duplicate code in CondParser_FuncCall

No functional change.

(rillig)

2021-12-12 08:36:21 UTC MAIN commitmail json YAML

make: generate more specific error message on malformed conditional

(rillig)

2021-12-11 23:47:53 UTC MAIN commitmail json YAML

crashme(9): Touch up man page markup.

Better consistency with sysctl(7), less random widthing and
offsetting.

(riastradh)

2021-12-11 20:42:49 UTC MAIN commitmail json YAML

2021-12-11 19:24:22 UTC MAIN commitmail json YAML

2021-12-11 19:16:48 UTC MAIN commitmail json YAML

Update crashme(9) man page for recent additions.  Reorganize slightly.

(riastradh)

2021-12-11 17:05:50 UTC MAIN commitmail json YAML

2021-12-11 11:13:30 UTC MAIN commitmail json YAML

make: remove dead code in CondParser_FuncCall

The return value (size_t)-1 was only used by the function 'empty', which
moved to CondParser_FuncCallEmpty.

No functional change.

(rillig)

2021-12-11 10:57:10 UTC MAIN commitmail json YAML

make: remove unused function parameter in conditional handling

No functional change.

(rillig)

2021-12-11 10:51:03 UTC MAIN commitmail json YAML

make: clean up CondParser_FuncCallEmpty

No functional change.

(rillig)

2021-12-11 10:41:31 UTC MAIN commitmail json YAML

make: inline ParseEmptyArg into CondParser_FuncCallEmpty

No functional change.

(rillig)

2021-12-11 10:28:59 UTC MAIN commitmail json YAML

make: simplify evaluation of function 'empty'

No functional change.

(rillig)

2021-12-11 10:21:02 UTC MAIN commitmail json YAML

make: merge duplicate code in ParseEmptyArg

No functional change.

(rillig)

2021-12-11 10:14:33 UTC MAIN commitmail json YAML

make: use proper return type for ParseEmptyArg

Now that ParseEmptyArg is no longer bound to have the same prototype as
ParseFuncArg, it can use a more appropriate return type instead of
encoding everything in a size_t.

Since ParseEmptyArg never returned 0, that code path was unused.  It was
only used for all other functions.

No functional change.

(rillig)

2021-12-11 10:07:31 UTC MAIN commitmail json YAML

make: remove unused arguments from CondParser_FuncCallEmpty

No functional change.

(rillig)

2021-12-11 10:01:16 UTC MAIN commitmail json YAML

make: separate handling of 'empty' and the other functions

No functional change.

(rillig)

2021-12-11 09:53:53 UTC MAIN commitmail json YAML

tests/make: proofread and clean up comments for function 'empty'

This prepares a refactoring for handling the function 'empty' in
conditionals like '.if'.

The function 'empty' is fundamentally different from all other functions
since it is parsed differently and passes its result on different path
than the other functions.  Splitting up these code paths will untangle
the control flow of parsing a condition like 'empty(VARNAME)'.  It will
also remove several ARGSUSED and MAKE_ATTR_UNUSED that make the current
code smell.

(rillig)

2021-12-10 23:56:17 UTC MAIN commitmail json YAML

make: merge duplicate code in parsing conditions

No functional change.

(rillig)

2021-12-10 23:33:05 UTC MAIN commitmail json YAML

make: remove recursion from CondParser_And

No functional change intended.  Before cond.c 1.286 from today, there
would have been the functional change that in malformed conditions, the
extra expression would not be evaluated.  Now that CondParser_Token is
always called with doEval == false, there is no change in behavior to be
expected.

(rillig)

2021-12-10 23:19:59 UTC MAIN commitmail json YAML

make: do not expand operator token in CondParser_Or

At the point where CondParser_Or calls CondParser_Token, there was a
previous call to CondParser_And.  Due to this, the next token is already
stored in par->curr, and the parameter doEval is ignored.

Changing the argument from doEval to false makes the code similar to the
corresponding code in CondParser_And.

No functional change.

(rillig)

2021-12-10 23:12:44 UTC MAIN commitmail json YAML

make: do not evaluate misplaced expressions in malformed conditions

This change only affects the behavior for parse errors.  Syntactically
well-formed conditions work exactly as before.

(rillig)

2021-12-10 21:57:13 UTC MAIN commitmail json YAML

break down large, unaligned copies into chunks that CG14Copy8_short_*()
can handle, make sure destinations are aligned whenever possible
now we only fall back to byte-wise access for really small copies, which
we probably shouldn't bother throwing at SX in the first place

(macallan)

2021-12-10 20:36:05 UTC MAIN commitmail json YAML

2021-12-10 20:22:54 UTC MAIN commitmail json YAML

tests/make: extend test for parse errors in conditions

(rillig)

2021-12-10 20:06:29 UTC MAIN commitmail json YAML

useradd(8): Recognize Argon2 passwords as "valid" when they are given
on the command line.

Reported by Robert Nestor on current-users@.

(nia)

2021-12-10 19:47:20 UTC MAIN commitmail json YAML

make: simplify parsing of '||' in conditions

Previously, the grammar said 'Or -> Or || And', while the code looked
more like 'Or -> And || Or'.  Make the code look like the grammar and
keep track of the resulting value of the condition explicitly.

No functional change intended.

(rillig)

2021-12-10 19:42:07 UTC MAIN commitmail json YAML

skip reading destination fb if we're going to overwrite it, only read words
we need to partially write
while there write mask registers only if we're actually going to need them
another 20% speedup

(macallan)

2021-12-10 19:30:05 UTC MAIN commitmail json YAML

2021-12-10 19:14:35 UTC MAIN commitmail json YAML

2021-12-10 19:09:56 UTC MAIN commitmail json YAML

CG14Copy8_short_rop(): skip the funnel shifter if source and destination are
aligned. Small but measurable speedup.

(macallan)

2021-12-10 18:25:44 UTC MAIN commitmail json YAML

add another Copy8() variant:
- supports unaligned source and destination
- uses all 32bit accesses
- supports copies up to 124 pixels wide so an entire line fits into registers
  and we can ignore x direction
... mostly an exercise in learning how to use the funnel shifter
TODO:
- skip the funnel shifter if source and destination are aligned
- skip fb reads where possible, like straight GXcopy

(macallan)

2021-12-10 11:39:49 UTC MAIN commitmail json YAML

Move PF mailbox initialization from ixgbe_attach() to ixgbe_init_iov().

  From FreeBSD ix-3.3.18. No functional change.

(msaitoh)

2021-12-10 11:33:12 UTC MAIN commitmail json YAML

No functional change.

  - Sync with FreeBSD ix-3.3.18.
    - Rename ixgbe_get_advertise() to ixgbe_get_default_advertise.
    - Sort lines, modify comment and whitespace to reduce diff against FreeBSD.

(msaitoh)

2021-12-10 11:31:22 UTC MAIN commitmail json YAML

2021-12-10 11:30:10 UTC MAIN commitmail json YAML

Add some unused macros. Sync with FreeBSD ix-3.3.14.

(msaitoh)

2021-12-10 11:28:40 UTC MAIN commitmail json YAML

Move increments after evaluations.

  FreeBSD: dc11ba4eb3fe5cce615f361de83e85e07005ca24 or ix-3.3.14
  DPDK:    390445ec30b4c52a3d2887c3d2a202d9cf37ea8e

    The retry variable was being incremented before it was evaluated by the
    subsequent conditional against the maximum retries to figure out which
    message to print.  So we'll move the increment op to the end.

(msaitoh)

2021-12-10 11:27:17 UTC MAIN commitmail json YAML

ifdef D(ebug)? From FreeBSD ix-3.3.14.

(msaitoh)

2021-12-10 11:25:22 UTC MAIN commitmail json YAML

Fix infinite recursion on PCIe link down.

  - FreeBSD: 8270b7174c48417a4d5f3effa4a4f4588205e687 or ix-3.3.14
  - DPDK:    2d04b9e856125197ec8e967471426d56ab7efcf0

    In some corner cases the functions ixgbe_clear_rar_generic and
    ixgbe_clear_vmdq_generic may call one another leading to infinite
    recursion.

    When ixgbe_clear_vmdq_generic is called with IXGBE_CLEAR_VMDQ_ALL
    flag, it's going to clear MPSAR registers, and proceed to call
    ixgbe_clear_rar_generic, which in turn will clear the RAR registers,
    and recursively call back ixgbe_clear_vmdq_generic. Normally, the
    latter would detect that MPSAR registers have already been cleared
    and terminate the recursion.

    However, when PCIe link is down, and before the driver has had the
    opportunity to shut itself down, all register reads return 0xFFFFFFFF,
    and all register writes fail silently. In such case, because
    ixgbe_clear_vmdq_generic blindly assumes that clearing MPSAR registers
    succeeded, it's going to always call ixgbe_clear_rar_generic, which
    in turn will always call back ixgbe_clear_vmdq_generic, creating
    infinite recursion.

    This patch re-reads MPSAR register values after they had been cleared.
    In case of PCIe link failure, the values read will be non-zero, which
    will terminate the recursion. On the other hand, under normal
    circumstances the value read from MPSAR registers is going to be equal
    to the value previously written, so this patch is expected not to cause
    any regressions.

  - Note that NetBSD doesn't support VMDQ.

(msaitoh)

2021-12-10 11:22:41 UTC MAIN commitmail json YAML

Remove debug error message.

(msaitoh)

2021-12-10 11:21:44 UTC MAIN commitmail json YAML

Change argument. No functional change. This file is not used in NetBSD.

(msaitoh)

2021-12-10 11:20:13 UTC MAIN commitmail json YAML

Remove unnecessary return value check.

  FreeBSD: 3a89005394bc5d82ce9b6baa9e7f8dee362354ae
  DPDK:    4b0ee6529b7897c2a08dd56669f07ac1f46a8474

(msaitoh)

2021-12-10 11:18:30 UTC MAIN commitmail json YAML

Remove unused argument. Note that this file is not used in NetBSD.

(msaitoh)

2021-12-10 11:16:54 UTC MAIN commitmail json YAML

Add typecast for type mismatch.

  FreeBSD: 994dd6328c66fc277438ad51ed074f3c52096147
  DPDK:    d8e52b2cf771c31b523b46852fd86225b5a2c721

(msaitoh)

2021-12-10 11:14:18 UTC MAIN commitmail json YAML

Initialize data field in struct buffer.

  FreeBSD: b3ebe337ffa06b0f1f460bf8f1e42fb55db77d0b or ix-3.3.14
  DPDK:    40543be5376ca415b2a7e196315d0555725b8bdf

    While sending request using ixgbe_hic_unlocked() the data field in
    buffer struct is not used. It is set when the struct is overwritten by
    FW to deliver the response. To not pass random data to FW the whole
    structure should be zeroed before use.

(msaitoh)

2021-12-10 11:09:52 UTC MAIN commitmail json YAML

s/OCCURED/OCCURRED/ in a debug message.

(msaitoh)

2021-12-10 11:08:46 UTC MAIN commitmail json YAML

s/premissions/permissions/

(msaitoh)

2021-12-10 09:20:38 UTC MAIN commitmail json YAML

Fix previous, don't copy up if the underlying node is unreadable.

(hannken)

2021-12-10 05:55:07 UTC MAIN commitmail json YAML

Simplify.  Same code before and after.

(skrll)

2021-12-10 05:39:22 UTC MAIN commitmail json YAML

Trailing whitespace

(skrll)

2021-12-10 01:18:29 UTC MAIN commitmail json YAML

Add comment to clarify.

(msaitoh)

2021-12-09 23:57:19 UTC MAIN commitmail json YAML

tests/make: prevent the bug from cond.c 1.283 from happening again

(rillig)

2021-12-09 23:02:46 UTC MAIN commitmail json YAML

make: revert previous commit to CondParser_Or

Even though the unit tests for make cover a lot of cases, they don't
cover all cases.  After the previous commit, the NetBSD build failed
with:

bsd.sys.mk line 247: \
    Malformed conditional (!defined(NOPIE) && \
    (!defined(LDSTATIC) || ${LDSTATIC} != "-static"))

(rillig)

2021-12-09 22:25:58 UTC MAIN commitmail json YAML

make: avoid recursion in CondParser_Or

Previously, a long chain of '1 || 1 || 1 || 1 || ...' led to a deep
recursion.  Furhermore, the code didn't match the grammar on superficial
reading: the grammar said "or || and", the code said "and || or".

No functional change.

(rillig)

2021-12-09 21:14:50 UTC MAIN commitmail json YAML

s/refernce/reference/

(andvar)

2021-12-09 21:13:18 UTC MAIN commitmail json YAML

Few typos slipped in the last review, fixing them.

(andvar)

2021-12-09 20:49:26 UTC MAIN commitmail json YAML

s/atached/attached/ and removing double s in state.

(andvar)

2021-12-09 20:47:33 UTC MAIN commitmail json YAML

make: add back support for jemalloc 100

The ports sun2 and vax default to jemalloc 100, as opposed to the rest
of the ports, which use jemalloc 510.  Some developers choose to use
jemalloc 100, so let them run the tests with memory debugging as well.

Suggested by mrg on source-changes-d.

(rillig)

2021-12-09 20:27:01 UTC MAIN commitmail json YAML

make: in parse errors, mark whitespace more clearly

This prevents any trailing whitespace from going unnoticed.  It also
marks leading whitespace more clearly, as in the examples with the time
value " 1".

(rillig)

2021-12-09 20:13:10 UTC MAIN commitmail json YAML

2021-12-09 17:29:14 UTC MAIN commitmail json YAML

2021-12-09 14:33:19 UTC MAIN commitmail json YAML

Print TLB message consistently to improve readability.

Example:
cpu0: L2 cache: 256KB 64B/line 4-way
cpu0: L3 cache: 4MB 64B/line 16-way
cpu0: 64B prefetching
-cpu0: ITLB: 64 4KB entries 8-way, 2M/4M: 8 entries
+cpu0: ITLB: 64 4KB entries 8-way, 8 2M/4M entries
cpu0: DTLB: 64 4KB entries 4-way, 4 1GB entries 4-way
cpu0: L2 STLB: 1536 4KB entries 6-way
cpu0: Initial APIC ID 0

(msaitoh)

2021-12-09 14:23:06 UTC MAIN commitmail json YAML

Print 1GB TLB entry at the same leve's line.

Example:
  before:
    cpu0: ITLB: 128 4KB entries 8-way, 2M/4M: 8 entries
    cpu0: DTLB: 64 4KB entries 4-way
    cpu0: L2 STLB: 4K/2M: 1024 entries
    cpu0: L1 1GB page DTLB: 4 1GB entries 4-way

  after:
    cpu0: ITLB: 128 4KB entries 8-way, 2M/4M: 8 entries
    cpu0: DTLB: 64 4KB entries 4-way, 4 1GB entries 4-way
    cpu0: L2 STLB: 4K/2M: 1024 entries

(msaitoh)

2021-12-09 07:33:24 UTC MAIN commitmail json YAML

PR misc/56541 ctwm complains about TitleFocus line in system.ctwmrc

TitleFocus is the default so it's likely safe to remove, it being
kept here was only left over from us previously having NoTitleFocus.

(nia)

2021-12-09 06:38:23 UTC MAIN commitmail json YAML

tests/t_magic_symlinks: remove duplicate word in test description

(rillig)

2021-12-09 04:18:00 UTC MAIN commitmail json YAML

2021-12-09 04:15:26 UTC MAIN commitmail json YAML

Elex - an embeddable regexp-based lexer
=======================================

I have found myself fairly often needing a lexer utility to tokenise
input (for configuration files, for various file-scanning utilities,
and for other applciations), but using full-blown lex(1) program to do
this is overkill, or designed for a separate process, which doesn't fit
well with the design - syntax-coloring editors, for example.

This utility, elex, is a regexp-based tokenizer, an embedded lexer,
which can be used for various uses.  It usually takes a lexer file
(similar to lex input files), although the API allows lexers to be
built on the fly by just issuing the calls to make new rules.

Implementation
==============

Normal lex(1) is implemented (usually) as a conglomeration of all the
regular expressions for a start state - if multiple matches are found,
the largest match is the one used.  I've found that, in practice, this
constrains the way a number of things are done.  So I've implemented
elex, using a multiple, prioritised multiple regexp matching scheme.
This supercedes the usual way of distinguishing reserved words and
identifiers in the lexer - recognising all "words" first, and
searching for each word through a number of tables; if a match is not
found, then the word recognized is an identifier.  elex works around
this by using a regexp to match reserved words first, and then to
recognise the word as an identifier after that.  Since normal regular
expressions usually progress through the input trying to find a match,
the regular expressions used in elex are constrained by anchoring the
search, not allowing progression through the input.  In practice, this
makes for more efficient matching.

another side effect is the ability to use more modern regexp features,
such as perl escapes, UTF-8 matching, in-subexpression ignore case, etc.

elex implements start states, similar to flex.  These are useful for
recognising multiline comments (almost any language), or multi-line
strings (perl, python, lua etc).

elex dynamically sizes the regmatch arrays used to accommodate the
largest regexp in the input, and matching subexpressions can be
returned to the caller.  The 0'th subexpression is the whole matching
expression, and is the same as "yytext".

And so on to an elex definition which recognises C and some C++:

# start state
%state COMMENT

# the types we define
%type IDENT 0xdb8ea4d
%type PUNCT 0xe454e3a
%type NUMBER 0xca1edaec
%type COMMENT 0xee5ae423
%type CONSTANT 0xd497741f
%type PREPROC 0xdcf9b98d
%type RESWORD1 0xb5ac6a6a
%type RESWORD2 0xb5ac6a6b

# and finally... the rules

<INITIAL>(auto|char|class|const|double|enum|extern|float|friend|inline|int|long|mutable|namespace|new|private|protected|public|register|requires|short|signed|static|this|struct|this|typedef|union|unsigned|void|volatile)\></> { return RESWORD1; }
<INITIAL>(asm|break|case|catch|continue|default|do|else|for|goto|if|return|switch|throw|try|while)\></> { return RESWORD2; }
<INITIAL>[a-zA-Z_][0-9a-zA-Z_]*</> { return IDENT; }

<INITIAL>([1-9][0-9]*|0x[0-9a-f]|0X[0-9A-F]+|0[0-7]*|'(\\.|[^'])*')</> { return NUMBER; }
<INITIAL>[ \t\n\r]+</> { return PUNCT; }

<INITIAL>/\*</> { BEGIN(COMMENT); return COMMENT; }
<COMMENT>[^\n]*\*/</> { BEGIN(INITIAL); return COMMENT; }
<COMMENT>\n|[^\n]+</> { return COMMENT; }

<INITIAL>//[^\n]*</> { return COMMENT; }

<INITIAL>"(\\.|[^"])*"</> { return CONSTANT; }

<INITIAL>(==|[-]>|!=|<=|>=|~=|%=|&=|[*]=|[-]=|[+]=|[|]=|(<<|>>)=?)</> { return PUNCT; }
<INITIAL>[\u005b;(){}\u005d*<>,+/%~!\u005e&=|.?:\u002d]</> { return PUNCT; }

<INITIAL>#[ \t]*(define|el(se|if)|endif|error|if|ifn?def|include|line|pragma|undef)[^\n]*</> { return PREPROC; }

Start states are explicitly used for rules, since it is easier to read
in practice.  Elex comments are eol-style comments, beginning '#' and
ending with '\n'.  Types can be defined using the "%type" directive,
and the unsigned 32bit value they take will be returned.  This is more
work than using magic constants, but much more readable in practice -
see the example calling program below.

A rule is of the form:

<startstate>regexp</> { BEGIN(newstate); return TYPE; }

(the BEGIN() is optional.  </> terminates the regexp - it's clearer
than wrapping everything in double quotes or some other normal
character which would then have to be escaped.  The return is also
optional, but is usually present in practice.)

Hex codepoints can be used to specify wildcard characters in character
classes - the ones enclosed in [] above).

Start states can be defined using the %state (or %x) directive, and
transitioned to using the BEGIN() action, in the same way as standard
lex(1).

Elex provides bookmarks, which are numbered numerically from 0.
Assuming a mark has already been successfully created using
"set-mark", the bookmark offset can be retrieved by using its index
using "get-mark", and the user can then seek to that offset.  This
makes it possible to set up, and re-visit sync points, in case there
was ever a programming language or other input devised which was
ambiguous to some degree.

A heavier-weight alternative to bookmarks is to simply clone the elex
structure at the point of possible divergence, and perform the
alternatives on the clones.  A deep copy is made during the clone
operation.

elex is called from a C (or other language) program in much the same
way as lex is:

int
main(int argc, char **argv)
{
uint64_t len;
elex_t *elex;
size_t size;
char *lexfile;
char *input;
char *text;
char *s;
int graphic;
int type;
int i;

input = lexfile = NULL;
s = NULL;
size = 0;
graphic = 0;
while ((i = getopt(argc, argv, "Vf:gi:")) != -1) {
switch(i) {
case 'V':
printf("elex version " ELEX_VERSION_S(ELEX_VERSION_NUM) "\n");
exit(EXIT_SUCCESS);
case 'f':
lexfile = optarg;
break;
case 'g':
graphic = 1;
break;
case 'i':
input = optarg;
break;
}
}
if ((elex = elex_new()) == NULL) {
errx(EXIT_FAILURE, "can't create new elex structure");
}
if (!elex_exec(elex, "read-defs-file", lexfile, 0)) {
errx(EXIT_FAILURE, "can't read defs file '%s'", lexfile);
}
if (input == NULL) {
input = argv[optind];
}
if ((s = readfile(input, &size)) == NULL || size == 0) {
errx(EXIT_FAILURE, "can't read input file '%s'", input);
}
if (!elex_exec(elex, "insert", s, size)) {
errx(EXIT_FAILURE, "can't set input");
}
while (elex_exec(elex, "next-token", NULL, 0) != 0) {
type = elex_exec(elex, "get-yytype", NULL, 0);
text = elex_exec_str(elex, "get-yytext", 0, &len);
if (graphic) {
switch(type) {
case /* "IDENT" */ 0xdb8ea4d:
case /* "PUNCT" */ 0xe454e3a:
case 1:
/* no color, standard */
printf("%.*s", (int)len, text);
break;
case /* "NUMBER" */ 0xca1edaec:
case 2:
p(CYAN, len, text);
break;
case /* "COMMENT" */ 0xee5ae423:
case 3:
p(BRIGHT_RED, len, text);
break;
case /* "CONSTANT" */ 0xd497741f:
case 4:
p(MAGENTA, len, text);
break;
case /* "PREPROC" */ 0xdcf9b98d:
case 5:
p(GREEN, len, text);
break;
case /* "RESWORD1" */ 0xb5ac6a6a:
case 6:
p(BRIGHT_GREEN, len, text);
break;
case /* "RESWORD2" */ 0xb5ac6a6b:
case 7:
p(BRIGHT_YELLOW, len, text);
break;
default:
printf("%.*s", (int)len, text);
break;
}
} else {
printf("[%d] %d '%s'\n", type, (int)len, text);
}
free(text);
}
elex_dispose(&elex);
exit(EXIT_SUCCESS);
}

This program, when invoked with -g, and using the elex definition above,
will perform the same syntax coloring on C programs as is performed in
my editor.

All access to elex is through an opaque elex_t structure pointer.

There are 5 functions in the API:

/* create and destroy */
elex_t *elex_new(void);
int elex_dispose(elex_t **/*elex*/);

/* these functions do ALL the work */
int64_t elex_exec(elex_t */*elex*/, const char */*info*/, const char */*s*/, int64_t /*n*/);
void *elex_exec_str(elex_t */*elex*/, const char */*info*/, uint64_t /*n*/, uint64_t */*size*/);

/* with one exeception - deal with states */
int elex_make_new_rule(elex_t */*elex*/, const char */*startstate*/,
const char */*pat*/, const char */*newstate*/, int /*ret*/);

An editable input buffer is held in the elex structure.  This can be
set, additional input inserted, and bytes deleted from it.  Callers
can seek within the input buffer, although it is the caller's
responsibility to set the start states correctly after any seeking.

Usually a single file is used (which can be re-used by other programs),
although new start states, types and rules can be done manually.

Note that the type returned on EOF is 0, as in lex, so it is best to
start your types at 1; an alternative is to use stringswitch methods
by returning a hash value of the state name. See the elex file above.

There are 2 main accessor functions:  elex_exec(), which executes an
action and returns a numeric result, and elex_exec_str() which
executes an action and returns a string (allocated using calloc(1),
and it is the caller's responsibility to free this storage).  Within
each of these functions, the second, string argument gives the action
to be performed.  These actions are:

elex_exec:
"delete" - delete n chars from the input
"get-input-length" - return the length of the input buffer
"get-mark" - return bookmark number n (see set-mark)
"get-yyleng" - get the length of the pattern matched
"get-yyline" - get the current line number in the input buffer
"get-yytype" - return the type of the pattern matched
"hash" - return djbhash value for a string
"insert" - insert bytes into the input buffer
"new-state" - make a new start state
"new-type" - make a new type
"next-token" - perform the equivalent of yylex(). Return the type of
the pattern matched.  If no pattern is matched, print the
current byte on stdout and advance 1 byte.
"read-defs" - read the elex definitions from memory
"read-defs-file" - read the elex definitions from a file
"seek" - move to an ofset in the input buffer. It is the caller's
responsibility to set the start state after using this action
"tell" - return the current offset in the input buffer
"set-mark" - set a bookmark at the current offset, and return the index of
the mark
"set-start-state" - set the current start state

elex_exec_str:
"clone" - make a deep copy of the elex struct
"get-rule" - return the full rule for the n'th rule
"get-subexpr" - for the current match, get the n'th matching subexpression in allocated space
"get-yyrule-pat" - get the input pattern for the matching regexp in
allocated space
"get-yystate" - get the name of the current state in allocated space
"get-yytext" - get the full text of the current match in allocated space

There is also a function to add a new rule, elex_make_new_rule. In future,
this will be extended to allow changing rules on the fly (an example use
of this would be to use a regexp to recognise identifiers in the language).

Designing elex definition files
===============================

Firstly, any start states are defined. Start states are states in elex
which are different from the initial state, aka INITIAL. They are generally
used for complex recognition, like multi-line strings or comments - they
work more effectively, and the definitions are clearer.

After start states, the next section to be defined is the types
section.  This allows us to define the return types that elex will
return to the calling program.  Since a 0 type usually denotes end of
input, it is advised to define return types starting at 1.
Historically, in lex definitions, the user-defined types started at
256, and it was common to return ASCII values for single characters up
to 256.  Since this is no longer acceptable in a world with multibyte
characters, and because we tend to tokenise based on types of input
tokens, hopefully this practice will never be used again.

Current start states are specified at the start of the rule.

<INITIAL>/\*</> { BEGIN(COMMENT); return COMMENT; }
<COMMENT>[^\n]*\*/</> { BEGIN(INITIAL); return COMMENT; }
<COMMENT>\n|[^\n]+</> { return COMMENT; }

To use the start state above as an example, if we are in the initial state, and
get a "/*" pattern in the input, we transition to the COMMENT state using the
"BEGIN" action, and return the COMMENT type.

Once we are in the COMMENT state, if we receive any text terminated by
a "*/" pattern, we transition to the INITIAL state, and return a
COMMENT type.  Having specified the termination of the COMMENT state,
if we receive any other text, we simply return a COMMENT at the end of
each line.

It is also possible just to specify a COMMENT action as

<INITIAL>/\*.*\*/</>

but any special actions to be taken on a newline character would be missed
in this.

Usually, when tokenising programming language, there would be a number
of definitions for reserved words, and standard identifiers. There would
also be definitions for punctuation, and numeric and string constants.
Some languages have definitions for multiline strings.

Alistair Croooks
Thu Nov 18 16:57:44 PST 2021

(agc)

2021-12-08 23:38:51 UTC MAIN commitmail json YAML

fix typo, pointed out by Andras Farkas

(snj)

2021-12-08 20:50:03 UTC MAIN commitmail json YAML

2021-12-08 20:21:10 UTC MAIN commitmail json YAML

2021-12-08 20:11:54 UTC MAIN commitmail json YAML

2021-12-08 20:03:26 UTC MAIN commitmail json YAML

s/speficication/specification/

(andvar)

2021-12-08 19:28:30 UTC MAIN commitmail json YAML

s/recomended/recommended/ and s/unknonwn/unknown/

(andvar)

2021-12-08 17:03:38 UTC MAIN commitmail json YAML

be more consistent with underscores in instruction names

(macallan)

2021-12-08 16:40:14 UTC MAIN commitmail json YAML

add SX_ROPB instruction

(macallan)

2021-12-08 15:58:11 UTC netbsd-8 commitmail json YAML

2021-12-08 15:56:18 UTC netbsd-8 commitmail json YAML

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

sys/arch/x86/include/specialreg.h 1.146, 1.171,
1.173-1.178 via patch
sys/arch/x86/x86/identcpu.c 1.106, 1.117,
1.122 via patch
sys/arch/x86/x86/pmap.c patch
sys/external/bsd/drm2/drm/drm_cache.c 1.14
usr.sbin/cpuctl/arch/i386.c 1.114-1.117

- Add PT, PKRU, HDC, LA57, PKE, PKS, CET, CET_U, CET_S, HWP, KL,
  AVX512_BF16, TME_EN and PCONFIG.
- Rename some macros to match the x86 specification and the other OSes.
- Print CPUID 0x8000008 %ebx on Intel, too.
- Print CPUID leaf 7 subleaf 1.
- Identify Tiger Lake, 3rd gen Xeon Scalable (Ice Lake), Elkhart Lake
  and Jasper Lake.
- Remove a few unused MSRs.
- Add comment.
- KNF. Whitespace fix.

(martin)

2021-12-08 15:51:53 UTC netbsd-9 commitmail json YAML

2021-12-08 15:50:13 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by hauke in ticket #1392):

sys/dev/ipmi.c: revision 1.6
sys/dev/ipmi.c: revision 1.7
sys/dev/ipmi.c: revision 1.8
sys/dev/ipmi.c: revision 1.9

Fail open when ipmi device was found.
Clear sc_envsys on failure to prevent double-free.

ipmi(4): Use config_pending_incr/decr.
Don't abuse autoconf's private (and incoherent) dv_flags.

ipmi(4): Notify config_pending_decr when ready, not when dying.
Should fix hang at boot.

ipmi(4): Tidy up ipmi_thread a little.
- Join on detach -- don't free anything until thread has exited; thread
  may still be using stuff.
- Nix dead error branch -- malloc(M_WAITOK) cannot fail.
- x = malloc(sizeof(x[0]) * n), not x = malloc(sizeof(type_t) * n)

(martin)

2021-12-08 15:44:17 UTC netbsd-9 commitmail json YAML

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

sys/arch/x86/include/specialreg.h 1.171, 1.173-1.178
sys/arch/x86/x86/identcpu.c 1.106, 1.117,
1.122 via patch
sys/dev/nvmm/x86/nvmm_x86.c 1.18
sys/external/bsd/drm2/drm/drm_cache.c 1.14
sys/external/bsd/drm2/include/asm/cpufeature.h 1.5
usr.sbin/cpuctl/arch/i386.c 1.114-1.117

- Add LA57, PKE, PKS, CET, CET_U, CET_S, HWP, KL, AVX512_BF16, TME_EN
  and PCONFIG.
- Rename some macros to match the x86 specification and the other OSes.
- Print CPUID 0x8000008 %ebx on Intel, too.
- Print CPUID leaf 7 subleaf 1.
- Identify Tiger Lake, 3rd gen Xeon Scalable (Ice Lake), Elkhart Lake
  and Jasper Lake.
- Add comment.
- KNF. Whitespace fix.

(martin)

2021-12-08 13:06:44 UTC MAIN commitmail json YAML

Make .Nx \*V happy for current builds.

I'm not sure why mdoc complains here (not the technical reason, but
the pragmatic purpose).  My best guess is that it wants to catch
mistakes like .Fx 1.6.1 (instead of .Nx 1.6.1).  I'm not entirely
convinced this doesn't create more problems that it solves.

No objections in the 15 years since this was proposed netbsd-docs.

(uwe)

2021-12-08 12:54:15 UTC MAIN commitmail json YAML

Punctuation in macro invocation must be a separate argument.

(uwe)

2021-12-07 23:56:06 UTC MAIN commitmail json YAML

make: document that the input buffer is not null-terminated

(rillig)

2021-12-07 23:20:09 UTC MAIN commitmail json YAML

make: inline common subexpression in ParseRawLine

There is no need to load the buf_end from memory each time a character
from a makefile is processed.  The end of the buffer only changes when
the file changes, not while reading a single line.

No functional change.

(rillig)

2021-12-07 22:40:52 UTC MAIN commitmail json YAML

bsd.clean.mk: fix typo in comment

(rillig)

2021-12-07 22:13:56 UTC MAIN commitmail json YAML

2021-12-07 22:09:59 UTC MAIN commitmail json YAML

s/listner/listener/

(andvar)

2021-12-07 21:58:01 UTC MAIN commitmail json YAML

make: inline HashIter_Init

It is only used in non-critical code paths, but the generated code gets
smaller by inlining.

No functional change.

(rillig)

2021-12-07 21:47:21 UTC MAIN commitmail json YAML

make: merge branches for modifiers ':D' and ':U'

These branches have the exact same code, without involving any macros,
nevertheless GCC 10 doesn't merge them.  Further, GCC thinks that the
function ApplyModifier_Defined were called from two different places,
thus creating an actual function definition.  Merging the case labels
inlines the function, saving a few instructions and a few hundred bytes
in the binary.

No functional change.

(rillig)

2021-12-07 21:45:31 UTC MAIN commitmail json YAML

2021-12-07 21:37:37 UTC MAIN commitmail json YAML

2021-12-07 21:30:11 UTC MAIN commitmail json YAML

make: extract common code into Expr_Words

No functional change.

(rillig)

2021-12-07 20:41:04 UTC MAIN commitmail json YAML

m4 manual - bring over the rest of the tmac.sU bits.

All tmac.sU does is sets wider text and defines the .MH abbreviation
for "Murray Hill" (.MH was brought over in the previous commit).

(uwe)

2021-12-07 20:26:20 UTC MAIN commitmail json YAML

m4 manual - adapt to current -ms

Comment out macros related to the Bell Labs memorandum style.
Bring over .MH (abbreviation for "Murray Hill") from tmac.sU.

(uwe)

2021-12-07 20:24:08 UTC MAIN commitmail json YAML

m4: fix typo in error message

To trigger the error message, compile m4 with -DREAL_FREEZE, then run
'./m4 -R /dev/null'.

(rillig)

2021-12-07 20:04:00 UTC MAIN commitmail json YAML

m4 - bring back the m4 manual.

This is the version from the csrg-final tree by way of OpenBSD.
FreeBSD version is identical modulo slightly different license text
formatting and a few macro fixes.

(uwe)

2021-12-07 19:45:05 UTC MAIN commitmail json YAML

G/C pckbc_attach_args

(skrll)

2021-12-07 19:28:19 UTC MAIN commitmail json YAML

m4: remove PSD.doc

make: don't know how to make m4.ms. Stop

(rillig)

2021-12-07 19:14:05 UTC MAIN commitmail json YAML

libgmp: remove trailing whitespace

(rillig)

2021-12-07 19:12:54 UTC MAIN commitmail json YAML

libgmp: suppress lint warnings about int/size_t mismatch

The cases where numbers have 4 GB of precision are probably rare.

(rillig)

2021-12-07 19:04:27 UTC MAIN commitmail json YAML

libgmp: clean up LINTFLAGS

Now that gmp-impl.h includes <stdlib.h>, defining alloca is no longer
necessary.

(rillig)

2021-12-07 18:38:50 UTC MAIN commitmail json YAML

what: use numeric exit status, as indicated by the comment

ok christos

(rillig)

2021-12-07 17:50:27 UTC MAIN commitmail json YAML

2021-12-07 17:39:55 UTC MAIN commitmail json YAML

A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip.  The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus.  One can interface with the SCMD using tty uart commands, SPI or
I2C.  The driver in this commit adds a kernel driver for the I2C and
SPI interfaces.  The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.

(brad)

2021-12-07 14:31:13 UTC MAIN commitmail json YAML

remove impossible test.

(christos)

2021-12-07 12:43:14 UTC netbsd-9 commitmail json YAML

2021-12-07 12:42:23 UTC netbsd-8 commitmail json YAML

2021-12-07 12:40:57 UTC netbsd-8 commitmail json YAML

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

sys/arch/x86/x86/identcpu.c: revision 1.121

make a numeric literal unsigned as it is bit-negated.

(martin)

2021-12-07 12:39:24 UTC netbsd-9 commitmail json YAML

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

sys/arch/x86/x86/identcpu.c: revision 1.121

make a numeric literal unsigned as it is bit-negated.

(martin)

2021-12-07 12:37:04 UTC netbsd-8 commitmail json YAML

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

sys/arch/x86/x86/identcpu.c: revision 1.103
sys/arch/x86/x86/identcpu.c: revision 1.104
sys/arch/x86/x86/identcpu.c: revision 1.105

Add EX2 for Vortex86 SoCs (Andrius V)

use __arraycount, and fix comparison

flip the comparison again

(martin)

2021-12-07 12:35:27 UTC netbsd-9 commitmail json YAML

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

sys/arch/x86/x86/identcpu.c: revision 1.103
sys/arch/x86/x86/identcpu.c: revision 1.104
sys/arch/x86/x86/identcpu.c: revision 1.105

Add EX2 for Vortex86 SoCs (Andrius V)

use __arraycount, and fix comparison

flip the comparison again

(martin)

2021-12-07 11:29:57 UTC netbsd-8 commitmail json YAML

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

sys/dev/i2c/spdmem_i2c.c 1.23-1.25 via patch

- Carefully access to the I2C bus in the match function.
- Improve bank reset code for DDR4.

(martin)

2021-12-07 11:25:12 UTC netbsd-9 commitmail json YAML

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

sys/dev/i2c/spdmem_i2c.c 1.23-1.25 via patch

- Carefully access to the I2C bus in the match function.
- Improve bank reset code for DDR4.

(martin)

2021-12-07 10:39:33 UTC MAIN commitmail json YAML

In unix_parse(), always allocate memory for the entire struct sockaddr_un
and not just the part used by the present pathname, because the entire
struct will be passed to bind() and an EFAULT can result if not all of
it is a valid allocation.  Fixes PR kern/56533.

(gson)

2021-12-07 08:04:10 UTC MAIN commitmail json YAML

Match variable names to register names. Same binary before and after.

(skrll)

2021-12-07 07:58:20 UTC MAIN commitmail json YAML

More usb_status_t -> int

(skrll)

2021-12-07 07:54:32 UTC MAIN commitmail json YAML

Code consistency.  NFCI.

(skrll)

2021-12-07 07:09:13 UTC MAIN commitmail json YAML

tests/lint: make error handling simpler

The previous form was better suited for integrated unit tests (as in
distrib/sets/fmt-list).  These small validation programs are easy enough
to be tested from the command line though.

(rillig)

2021-12-07 06:55:44 UTC MAIN commitmail json YAML

tests/libcurses: fix grammar in comment (since yesterday)

(rillig)

2021-12-07 06:53:57 UTC MAIN commitmail json YAML

what: fix typo in warning

(rillig)

2021-12-07 06:49:15 UTC MAIN commitmail json YAML

Make this compile again.

(skrll)

2021-12-07 02:22:37 UTC MAIN commitmail json YAML

fix alloca for NetBSD lint

(christos)

2021-12-06 23:26:28 UTC MAIN commitmail json YAML

2021-12-06 23:20:26 UTC MAIN commitmail json YAML

2021-12-06 23:07:49 UTC MAIN commitmail json YAML

libgmp: fix unwarranted ignored error on 'make clean'

rmdir: dummy: No such file or directory
*** Error code 1 (ignored)

(rillig)

2021-12-06 23:05:36 UTC MAIN commitmail json YAML

libgmp: suppress a few lint warnings

Instead of erroring out due to the unknown function alloca, lint now
warns about a pointer/integer mismatch since it wrongly assumes that all
__builtin functions return int. The warning is still better than a
failing build though.

(rillig)

2021-12-06 22:45:42 UTC MAIN commitmail json YAML

2021-12-06 22:35:20 UTC MAIN commitmail json YAML

tests/make: clean up after testing the option '-T'

(rillig)

2021-12-06 22:13:56 UTC MAIN commitmail json YAML

Add a missing : specified by TOG (Andras Farkas)
While here, simplify and use warn.

(christos)

2021-12-06 22:07:53 UTC MAIN commitmail json YAML

make: move low-level implementation details out of Var_Parse

No functional change.

(rillig)

2021-12-06 21:24:07 UTC MAIN commitmail json YAML

make: extract common code into Expr_Str

This change turns Expr into a more abstract data type.

No functional change.

(rillig)

2021-12-06 19:34:29 UTC netbsd-8 commitmail json YAML

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

sys/dev/i2c/sdtemp.c: revision 1.41

Use aprint_debug instead of aprint_error for expected failure.

(martin)

2021-12-06 19:33:07 UTC netbsd-9 commitmail json YAML

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

sys/dev/i2c/sdtemp.c: revision 1.41

Use aprint_debug instead of aprint_error for expected failure.

(martin)

2021-12-06 19:28:58 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1386):

sys/dev/usb/ehci.c: revision 1.287

ehci: Replace bogus polling during suspend by taking bus lock.

The system is not at high IPL or limited to a single CPU at this
point; it is running essentially normally, just with some devices
suspended.  Other threads might be trying to touch EHCI registers,
which might have bad outcomes while we're suspending stuff.  Enabling
polling only makes sense if there is a single thread and single CPU
running, such as when we enter ddb on crash.

(martin)

2021-12-06 17:52:00 UTC MAIN commitmail json YAML

2021-12-06 17:43:50 UTC MAIN commitmail json YAML

Add WSDISPLAYIO_GET_FBINFO support to sfbplus TURBOchannel framebuffer

Missed in previous change to cfb, mfb, sfb, tfb and xcfb

(abs)

2021-12-06 16:24:57 UTC MAIN commitmail json YAML

Check the return value correctly. Pointed out by pgoyette@.

(msaitoh)

2021-12-06 16:00:07 UTC MAIN commitmail json YAML

Add WSDISPLAYIO_GET_FBINFO support to most TURBOchannel framebuffers

This adds WSDISPLAYIO_GET_FBINFO to cfb, mfb, sfb, tfb and xcfb
TURBOchannel framebuffers as used by pmax and alpha

It does not add support to px and pxg (they handle ioctls in common
code in stic.c and more careful wiring is required)

These changes allow an Xswfb X server to use the framebuffer
directly, albeit without any special acceleration

A subsequent change will re-enable X server building on pmax, and
also hopefully switch alpha from Xorg 1.10 to 1.20

(abs)

2021-12-06 08:13:48 UTC MAIN commitmail json YAML

src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd_stdint.h@1.7 / diff / nxr@1.7
src/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd_stdint.h@1.3 / diff / nxr@1.3
src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd_stdint.h@1.9 / diff / nxr@1.9
src/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd_stdint.h@1.7 / diff / nxr@1.7
src/external/gpl3/binutils/lib/libbfd/arch/i386/bfd_stdint.h@1.9 / diff / nxr@1.9
src/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd_stdint.h@1.6 / diff / nxr@1.6
src/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd_stdint.h@1.7 / diff / nxr@1.7
src/external/gpl3/binutils/lib/libbfd/arch/m68k/bfd_stdint.h@1.8 / diff / nxr@1.8
src/external/gpl3/binutils/lib/libbfd/arch/mips64eb/bfd_stdint.h@1.10 / diff / nxr@1.10
src/external/gpl3/binutils/lib/libbfd/arch/mips64el/bfd_stdint.h@1.8 / diff / nxr@1.8
src/external/gpl3/binutils/lib/libbfd/arch/mipseb/bfd_stdint.h@1.8 / diff / nxr@1.8
src/external/gpl3/binutils/lib/libbfd/arch/mipsel/bfd_stdint.h@1.9 / diff / nxr@1.9
src/external/gpl3/binutils/lib/libbfd/arch/powerpc/bfd_stdint.h@1.9 / diff / nxr@1.9
src/external/gpl3/binutils/lib/libbfd/arch/powerpc64/bfd_stdint.h@1.8 / diff / nxr@1.8
src/external/gpl3/binutils/lib/libbfd/arch/riscv32/bfd_stdint.h@1.6 / diff / nxr@1.6
src/external/gpl3/binutils/lib/libbfd/arch/riscv64/bfd_stdint.h@1.6 / diff / nxr@1.6
src/external/gpl3/binutils/lib/libbfd/arch/sh3eb/bfd_stdint.h@1.8 / diff / nxr@1.8
src/external/gpl3/binutils/lib/libbfd/arch/sh3el/bfd_stdint.h@1.7 / diff / nxr@1.7
src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd_stdint.h@1.9 / diff / nxr@1.9
src/external/gpl3/binutils/lib/libbfd/arch/sparc64/bfd_stdint.h@1.8 / diff / nxr@1.8
      :
(more 59 files)
mknative-binutils for all targets.

fixes 'const' vs 'iconv', yytext pointer, and initfini.

(mrg)

2021-12-06 05:50:39 UTC MAIN commitmail json YAML

decrease the MTU of vlan(4)
only when ETHERCAP_VLAN_MTU of the parent interface is enabled

This fixed the bug that the MTU of a vlan interface is decreased
when the parent interface already has another vlan interface.
pointed out by tnn@n.o, thanks.

(yamaguchi)

2021-12-06 04:25:36 UTC MAIN commitmail json YAML

Carefully access to the I2C bus in the match function.

(msaitoh)

2021-12-05 22:59:32 UTC MAIN commitmail json YAML

xorg-server: Enable wscons-based autoconfiguration.

This gets us features like automatic configuration of touchscreens,
and X's default keyboard layout matching the console's.

(nia)

2021-12-05 22:37:58 UTC MAIN commitmail json YAML

tests/make: replace ':U' with ':L' in test for ':u'

In expressions using ':L', the value of the variable is delimited by
'{', which makes it easier to recognize it visually, as opposed to being
delimited by 'U'.

(rillig)

2021-12-05 22:31:58 UTC MAIN commitmail json YAML

tests/make: split test cases for ':R' into separate tests

This allows to comment or explain individual test cases.

Remove duplicates.

(rillig)

2021-12-05 21:14:13 UTC MAIN commitmail json YAML

Follow the error path if asprintf fails, not if it succeeds.

(nia)

2021-12-05 19:43:30 UTC MAIN commitmail json YAML

2021-12-05 18:06:24 UTC MAIN commitmail json YAML

PR/56538: coypu: For compat ctime and friends (when time_t was 32 bits)
we want to load the timezone data using the same structs they were saved as.
Introduce __time_t which is always 64 bits and make the minimal changes for
this to work. Yes, it is ugly.

(christos)

2021-12-05 17:00:02 UTC MAIN commitmail json YAML

make: fix types for modifier ':O' (since today)

In var.c 1.962 from 2021-12-05, the type of the array to be sorted
changed from 'const char *' to 'Substring'.  The code still worked since
the first member of Substring is 'const char *start', but that was pure
luck.

Fix the type assumptions in the comparison functions.

Add an assertion that the words must be null-terminated since the
comparison functions currently assume this.

This kind of inconsistency may be possible to detect using static
analysis, but NetBSD's lint is currently too limited for that.  To
detect this, it would have to analyze each possible comparison function
and remember the assumed type.  This type could then be compared to the
argument type of a function call to qsort or bsearch.

No functional change.

(rillig)

2021-12-05 16:16:58 UTC MAIN commitmail json YAML

In union_access() copy up regular files before checking permissions.

Unionfs is meant to provide a writable layer above a read-only layer
and should not fail here just because the lower layer is mounted
read-only.

(hannken)

2021-12-05 15:51:33 UTC MAIN commitmail json YAML

tests/make: document use-after-free in ':@' more precisely

The commit message from the previous commit was misleading.  This bug
had not been introduced in 2016.02.27.16.20.06 (which was entirely
unrelated) but rather in 2016.02.18.23.33.25.

The commit 2016.02.27.16.20.06 just happened to be the first one from my
make-archive that triggered the bug.  That's because I had only checked
out the last commit from each month, to save some disk space.

(rillig)

2021-12-05 15:25:56 UTC MAIN commitmail json YAML

Fix typo again... s/Comparision/Comparison/

(msaitoh)

2021-12-05 15:22:37 UTC MAIN commitmail json YAML

Fix typo again... s/Expilcitly/Explicitly/

(msaitoh)

2021-12-05 15:20:13 UTC MAIN commitmail json YAML

make: fix use-after-free in modifier ':@'

Without memory allocator debugging, the newly added test doesn't show
any obvious failure.

With memory allocator debugging enabled, all make versions since
2016.02.27.16.20.06 crash with a segmentation fault.

(rillig)

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

2021-12-05 14:57:36 UTC MAIN commitmail json YAML

tests/make: migrate to jemalloc > 100

When I started working on usr.bin/make in 2020, I used NetBSD 8, which
used jemalloc 100.

After updating to NetBSD 8 to 9.99.x, the debugging options for jemalloc
stopped working since MALLOC_OPTIONS had been replaced with MALLOC_CONF
in 2019.

Enable malloc debugging again, to reliably reproduce the use-after-free
for the variable modifier ':@'.

(rillig)

2021-12-05 14:25:04 UTC MAIN commitmail json YAML

jemalloc.3: fix malformed CVS Id

(rillig)

2021-12-05 13:10:43 UTC MAIN commitmail json YAML

isp: fix typo in comment

(rillig)

2021-12-05 12:17:50 UTC MAIN commitmail json YAML

make: save a memory allocation in each modifier ':O' and ':u'

No functional change.

(rillig)

2021-12-05 12:10:28 UTC MAIN commitmail json YAML

make: save a memory allocation in the modifier ':[...]'

No functional change.

(rillig)

2021-12-05 12:06:23 UTC MAIN commitmail json YAML

make: save a memory allocation in the modifier ':[...]'

No functional change.

(rillig)

2021-12-05 11:57:19 UTC MAIN commitmail json YAML

make: in UnexportVars, replace Str_Words with Substring_Words

This skips an allocation and a bit of memory copying.

No functional change.

(rillig)

2021-12-05 11:40:03 UTC MAIN commitmail json YAML

make: inline Str_Words into .for loop handling

This saves one memory allocation and a bit of copying, per .for loop.

No functional change.

(rillig)

2021-12-05 11:05:37 UTC MAIN commitmail json YAML

ehci: Replace bogus polling during suspend by taking bus lock.

The system is not at high IPL or limited to a single CPU at this
point; it is running essentially normally, just with some devices
suspended.  Other threads might be trying to touch EHCI registers,
which might have bad outcomes while we're suspending stuff.  Enabling
polling only makes sense if there is a single thread and single CPU
running, such as when we enter ddb on crash.

(riastradh)

2021-12-05 10:13:44 UTC MAIN commitmail json YAML

tests/make: make test for '::=' easier to read, fix comments

(rillig)

2021-12-05 10:11:31 UTC MAIN commitmail json YAML

2021-12-05 10:02:52 UTC MAIN commitmail json YAML

tests/make: fix documentation of .MAKE.SAVE_DOLLARS

(rillig)

2021-12-05 09:53:15 UTC MAIN commitmail json YAML

dab: fix typo in comment

(rillig)

2021-12-05 09:46:05 UTC MAIN commitmail json YAML

dab.6: fix URL reference to the book

(rillig)

2021-12-05 09:22:45 UTC MAIN commitmail json YAML

2021-12-05 08:19:57 UTC MAIN commitmail json YAML

2021-12-05 08:18:18 UTC MAIN commitmail json YAML

s/trival/trivial/ in comment.

(msaitoh)

2021-12-05 08:17:21 UTC MAIN commitmail json YAML

s/transcat/transact/ in comment.

(msaitoh)

2021-12-05 08:16:10 UTC MAIN commitmail json YAML

2021-12-05 08:13:12 UTC MAIN commitmail json YAML