Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (2h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 06:09:40 UTC Now

2021-02-25 03:43:00 UTC MAIN commitmail json YAML

Adjust for amiga/boot ver 3.1.

(rin)

2021-02-25 03:42:15 UTC MAIN commitmail json YAML

2021-02-25 03:40:27 UTC MAIN commitmail json YAML

For upcoming FFSv2 support for boot.amiga, dynamically scale its size,
instead of fixing to 32KB.

Old 32KB limit comes from

(1) all R_68K_PC16 symbols get relocated, and

(2) all values in our relocation table for R_68K_32 symbols fit within
    16-bit integer.

(1) is already checked in the code. Assertion for (2) is added, but this
limit is satisfied with sufficient margin at the moment. If it is not the
case in the future, we may need to change format for relocation table.

(rin)

2021-02-25 01:07:43 UTC MAIN commitmail json YAML

tests/libcurses: add test for '\b' in addch

Just to ensure that addch and addstr behave the same, after the recent
fix for handling '\t'.

(rillig)

2021-02-25 00:50:10 UTC MAIN commitmail json YAML

tests/libcurses: use common style for parse error messages

(rillig)

2021-02-25 00:42:00 UTC MAIN commitmail json YAML

tests/libcurses: use common syntax for accessing array elements

Writing *(p+1) is needlessly confusing, even though it adds a little
symmetry between *p and *(p+1).  Still, one of these expressions has
parentheses, the other doesn't, which breaks the symmetry.

Wrap overly long code line.

It's confusing to refer to the digits after the backslash once with
index 0 to 2, and the other time with index 1 to 3.

(rillig)

2021-02-25 00:32:44 UTC MAIN commitmail json YAML

tests/libcurses: reduce indentation

No functional change.

(rillig)

2021-02-25 00:26:57 UTC MAIN commitmail json YAML

libcurses: ensure that '\b' in handled correctly in addstr

Just to ensure that the recent fix for '\t' handling in addstr/addch
didn't introduce another bug.

(rillig)

2021-02-25 00:25:31 UTC MAIN commitmail json YAML

libcurses: prevent unknown escpae sequences in tests

Before, '\b' was interpreted as a simple 'b', which is confusing for C
programmers.  Same for '\a'.  There is absolutely no reason to escape
letters, so fail early in these cases.

The '\h' in the test addchstr was obviously a typo that was easy to
detect, if only the compiler had been strict enough from the very
beginning.

The code is wider than 80 characters, same as the code that parses octal
escape sequences a few lines above it.  This code will be refactored to
use less indentation in a follow-up commit.

(rillig)

2021-02-24 18:18:53 UTC MAIN commitmail json YAML

2021-02-24 18:13:21 UTC MAIN commitmail json YAML

2021-02-24 17:35:40 UTC MAIN commitmail json YAML

- Fix a comment.
- rename ofwsrsave to clsrsave; we're saving / restoring the client's
  (i.e. kernel's) SRs there, not the firmware's.

(thorpej)

2021-02-24 16:53:00 UTC MAIN commitmail json YAML

Don't save the firmware's copy of SPRG[0-3], and don't fiddle with
SPRG[0-3] in the firmware trampoline.  Section 7.1 of the OpenFirmware
PowerPC CPU bindings says that firmware "client interface shall not modify"
when in virtual-mode, and "client interface shall preserve" in real-mode.

This is important because in vritual-mode, DSI exceptions will land in
the kernel's DSI exception handler, and that handler depends on the
kernel's SPRG0 value (it contains the pointer to the cpu_info for that
CPU).

Additionally, in the firmware trampoline, point curcpu at an empty
ofw_battable.  This ensures that the DSI exception handler won't
load a BAT register with a kernel block translation that clobbers
a segment translation owned by the firmware.  Eventually, this ofw_battable
might contain some of the larger translations owned by the firmware.

(thorpej)

2021-02-24 16:42:38 UTC MAIN commitmail json YAML

Add a provision for a per-cpu battable.  Each CPU starts with the global
one, but this allows CPUs to temporarily switch to an alternate battable
if needed.

(thorpej)

2021-02-24 09:10:12 UTC MAIN commitmail json YAML

2021-02-24 08:08:44 UTC netbsd-9 commitmail json YAML

2021-02-24 08:05:08 UTC netbsd-9 commitmail json YAML

Apply patch, requested by jdolecek in ticket 1213:

Do not panic Dom0 when hypervisor grant_table_op(GNTTABOP_copy) fails
in xennet(4) backend driver, that can be triggered by malicious or buggy
DomU via bad grant reference.

Part of fixes for XSA-362.

(martin)

2021-02-24 06:11:38 UTC MAIN commitmail json YAML

Add comments for the PR_WANTED and PR_PHINPAGE flags, remove unused
PR_LOGGING flag.

(simonb)

2021-02-24 05:36:02 UTC MAIN commitmail json YAML

skip redzone on pools with the allocation (including all overhead)
on anything greater than half the pool pagesize.

this stops 4KiB being used per allocation from the kmem-02048 pool,
and 64KiB per allocation from the buf32k pool.

we're still wasting 1/4 of space for overhead on eg, the buf1k or
kmem-01024 pools.  however, including overhead costs, the amount of
useless space (not used by consumer or overhead) reduces from 47%
to 18%, so this is far less bad overall.

there are a couple of ideas on solving this less ugly:

- pool redzones are enabled with DIAGNOSTIC kernels, which is
  defined as being "fast, cheap".  this is not cheap (though it
  is relatively fast if you don't run out of memory) so it does
  not really belong here as is, but DEBUG or a special option
  would work for it.

- if we increase the "pool page" size for these pools, such that
  the overhead over pool page is reduced to 5% or less, we can
  have redzones for more allocations without using more space.

also, see this thread:

https://mail-index.netbsd.org/tech-kern/2021/02/23/msg027130.html

(mrg)

2021-02-24 02:33:56 UTC MAIN commitmail json YAML

minimal fix to match the library code (really make the constants unsigned
instead)

(christos)

2021-02-24 01:46:57 UTC MAIN commitmail json YAML

fix sparc build:  db_expr_t is larger than a pointer.

(mrg)

2021-02-23 22:14:59 UTC MAIN commitmail json YAML

2021-02-23 21:59:31 UTC MAIN commitmail json YAML

make: document the history of bugs in "cmdline overrides global"

For performance reasons, the implementation of the simple rule "cmdline
overrides global" grew into code that is much more complicated than a
straight-forward implementation.  This added complexity made it easy for
bugs to sneak in.

(rillig)

2021-02-23 21:59:04 UTC MAIN commitmail json YAML

update the list of prefixes/regions/towns in ireland.  from:

  https://en.wikipedia.org/wiki/Telephone_numbers_in_the_Republic_of_Ireland

(i got a call from letterkenny!)

(mrg)

2021-02-23 21:09:15 UTC MAIN commitmail json YAML

Will be fixed with regex update

(christos)

2021-02-23 20:34:54 UTC MAIN commitmail json YAML

2021-02-23 20:26:50 UTC MAIN commitmail json YAML

fix wrong target register size of "ldrsh"

"ldrsh Xt, [Xn, Xm]" was being output as "ldrsh Wt, [Xn, Xm]"

(ryo)

2021-02-23 20:15:04 UTC MAIN commitmail json YAML

make more system registers are disassemblable

(ryo)

2021-02-23 18:57:36 UTC netbsd-8 commitmail json YAML

2021-02-23 18:56:12 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by christos in ticket #1658):

bin/ksh/siglist.sh: revision 1.13

PR/56007: Greg A. Woods: ksh unable to execute ERR traps
(probably since 2016/03/17 - i.e. 8.x and 9.x)

(martin)

2021-02-23 18:55:29 UTC netbsd-9 commitmail json YAML

2021-02-23 18:53:31 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by christos in ticket #1212):

bin/ksh/siglist.sh: revision 1.13

PR/56007: Greg A. Woods: ksh unable to execute ERR traps
(probably since 2016/03/17 - i.e. 8.x and 9.x)

(martin)

2021-02-23 18:50:21 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by jdolecek in ticket #1211):

sys/arch/xen/xen/xennetback_xenbus.c: revision 1.92 (via patch)

remove support for legacy rx-flip mode for xennet(4)/xvif(4), making
rx-copy (first shipped in NetBSD 6.0 in 2012) the only supported
mode

this is mostly to simplify maintenance and future development
rx-flip is not supported by Linux Dom0/DomU, and NetBSD Dom0/DomU
defaults to rx-copy for over 8 years now too, so there is little
need to keep the support for compatibility

besides compatibility there is no other reason to keep rx-flip -
page transfer is generally slower than copy due to necessary MMU/TLB
manipulation, especially on MP systems

(martin)

2021-02-23 17:48:46 UTC MAIN commitmail json YAML

The immediate offset of "ldtrb", "ldtrh", "sttrb", and "sttrh" was always output as unsigned.
Correctly, it is 9bit signed.

(ryo)

2021-02-23 17:30:56 UTC MAIN commitmail json YAML

The register operand size for "smnegl" and "smsubl' was wrong.
not "smsubl Xd, Xn, Xm, Xa", but "smsubl Xd, Wn, Wm, Xa".

(ryo)

2021-02-23 17:14:42 UTC MAIN commitmail json YAML

- Replace REG_ENOSYS (unused) with REG_ILLSEQ.
- Add REG_GNU

(christos)

2021-02-23 17:13:44 UTC MAIN commitmail json YAML

2021-02-23 16:54:17 UTC MAIN commitmail json YAML

Plug kernel stack leaks in reenter_syscall() for setcontext(2).

This fixes long standing kernel crashes (MMU fault, address error,
and silent freeze by a double bus fault etc. seen for ~10 years)
caused by kernel stack overflow, especially on x68k and sun3 running
Xorg based servers.  See PR/55990 for more details.

"This change seems perfectly reasonable" from thorpej@ and
jklos@ also reported this also solved freeze of his mac68k system
with 10 megabyes of memory.

Should be pulled up to netbsd-9 and netbsd-8.

(tsutsui)

2021-02-23 16:47:04 UTC MAIN commitmail json YAML

timeradd.3: declare timespeccmp parameters as const

Comparison is implemented as a read-only operation.

(rillig)

2021-02-23 16:29:52 UTC MAIN commitmail json YAML

make: reduce indentation in Var_Parse

The extra condition had been necessary before FStr made memory
management simpler.

The Coverity annotation got out-of-date when the parameter was converted
to FStr since that type is not allocated on the heap, only its inner
members are.

No functional change.

(rillig)

2021-02-23 16:14:11 UTC MAIN commitmail json YAML

make: restructure code in ParseVarname to target human readers

Breaking the loop once for depth == 0 and once for depth == 1 was
unnecessarily confusing, as was the nested 'if'.  Start counting with 0
since there is no reason to start at 1.

Evaluating the common subexpression '*p == endc' is left as an exercise
to the compiler.

No functional change.

(rillig)

2021-02-23 16:07:14 UTC MAIN commitmail json YAML

2021-02-23 16:04:16 UTC MAIN commitmail json YAML

make: add test for confusing error message for bad modifier

In the expression ${:U}, the variable name is empty.  Since these
expressions are generated by .for loops, the error messages for them
must not end with a trailing space.  Putting the variable name in quotes
helps against that.

(rillig)

2021-02-23 16:03:01 UTC MAIN commitmail json YAML

Fix copy-paste error for heapsort(3), so that it is declared appropriately.

(rin)

2021-02-23 16:00:37 UTC MAIN commitmail json YAML

Add support for ENOSYS (was never set)

(christos)

2021-02-23 15:56:30 UTC MAIN commitmail json YAML

make: improve error message for unclosed modifier

Replace "variable specification" with the more modern "variable
expression", reduce the number of parentheses, output more than a single
character for modifiers, make it obvious that in expressions such as
${:Serror}, the "" means a variable name.

(rillig)

2021-02-23 15:19:41 UTC MAIN commitmail json YAML

make: improve error message for unknown modifier

Back in 1995, the modifiers were all single-character, and it made sense
to print only the first character.  Nowadays, with ':S', ':@var@...@',
'::=' and several others, a little more context is useful to see where
the exact error is.  The actual modifier is still guessed, and the guess
may be wrong as soon as backslashes get involved, but it is still better
than before.

(rillig)

2021-02-23 15:16:43 UTC MAIN commitmail json YAML

Don't hard-code LLVM version, but pick it up from build glue.

(joerg)

2021-02-23 15:09:27 UTC MAIN commitmail json YAML

Redo the aarch64 support in libunwind. This included a number of bugs
starting from returning the wrong value from the constructor to
completely bogus offset computations. Drop the ELR support for now.

(joerg)

2021-02-23 15:07:59 UTC MAIN commitmail json YAML

make: remove redundant parameter of ApplySingleModifier

(rillig)

2021-02-23 15:07:32 UTC MAIN commitmail json YAML

The return address register entry is the DWARF register. On PowerPC,
this is not the same as the internal encoding, since the Link Register
is deliberately non-continous from the other general purpose register
values. To handle this, always translate the value into the internal
format.

(joerg)

2021-02-23 15:05:09 UTC MAIN commitmail json YAML

Make use of packed member addreses non-fatal for clang, too

(joerg)

2021-02-23 15:03:56 UTC MAIN commitmail json YAML

make: explain non-obvious code around indirect variable modifiers

No functional change.

(rillig)

2021-02-23 15:00:01 UTC MAIN commitmail json YAML

Add REG_POSIX, and make compile on linux where we don't have a lot of the
internal flags.

(christos)

2021-02-23 14:59:09 UTC MAIN commitmail json YAML

Delete category stuff that has changed with the new regex; make compile
on linux and with TRE

(christos)

2021-02-23 14:57:16 UTC MAIN commitmail json YAML

2021-02-23 14:50:33 UTC MAIN commitmail json YAML

Just a few optimizations.

- in cpu_idle(), ci_intr_depth is always 0, so there is no need to fetch for increment or conditional branch.
- curcpu() is immutable in idle lwp, there is no need to consider KPREEMPT. Therefore, get curcpu() first and keep using it.
- add more comment.

(ryo)

2021-02-23 14:27:27 UTC MAIN commitmail json YAML

make: comment on possible inconsistency in handling modifier ':sh'

(rillig)

2021-02-23 14:21:45 UTC MAIN commitmail json YAML

make: note inconsistent parsing behavior in modifier ':_='

(rillig)

2021-02-23 14:17:21 UTC MAIN commitmail json YAML

make: demonstrate how to undefine variables during evaluation

For a very long time now, I had thought that it would be impossible to
undefine global variables during the evaluation of variable expressions.
This is something that the memory management in Var_Parse relies upon,
see the comment 'the value of the variable must not change'.

After several unsuccessful attempts at referring to an already freed
previous value of a variable, today I discovered how to unset a global
variable while evaluating an expression, which has the same effect.  To
demonstrate that this use-after-free can reliably crash make, it would
need a memory allocator with a debug mode that never re-allocates the
same memory block after it has been used once.  This is something that
jemalloc cannot do at the moment.  Valgrind would be another idea, but
that has not been ported to NetBSD.

Undefining a global variable while evaluating an expression is made
possible by an implementation detail of the modifier ':@'.  That
modifier undefines the loop variable, without restoring its previous
value, see ApplyModifier_Loop.

By the very old conventions of ODE Make, these loop variables are named
'.V.' and thus do not conflict with variables from other naming
conventions.  In NetBSD and pkgsrc, these loop variables are typically
called 'var', sometimes '_var' with a leading underscore, which also
doesn't conflict with the typical form 'VAR' of variables in the global
namespace.  Therefore, in practice these loop variables don't interfere
with other variables.

One case that can practically arise is when an outer variable has a
modifier ':@word@${VAR.${word}}@' and one of the referenced variables
uses the same variable name in the modifier, see varmod-loop.mk 1.10
line 91 for a detailed explanation.

By using the ${:@VAR@@} modifier in a place that is evaluated with
cmdline scope, it is not only possible to undefine global variables, it
is possible to undefine cmdline variables as well.  When evaluated in a
specific make target, the expression ${:@\@@@} can even be used to
undefine the variable '.TARGET', which will probably crash make with an
assertion failure.

(rillig)

2021-02-23 11:31:52 UTC MAIN commitmail json YAML

Install a default irq handler that panics when no interrupt controller
driver is installed.

(jmcneill)

2021-02-23 11:02:12 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by jdolecek in ticket #1210):

sys/arch/xen/x86/xen_shm_machdep.c: revision 1.17 (via patch)

in xen_shm_map(), make sure to unmap any successfully mapped pages
before returning failure if there is partial failure
fix detection of partial failure - GNTTABOP_map_grant_ref can actually re=
turn

zero for partial failure, so we need to always check all the entries
to detect it

previously, kernel triggered panic() for partial failure, leading to
Dom0 page fault later; since the mapping failure can be triggered by
malicious DomU via bad grant reference, it's important to expect
the calls to fail, and handle it gracefully without crashing Dom0

part of fixes for XSA-362

(martin)

2021-02-23 10:03:05 UTC MAIN commitmail json YAML

If we are committing a deferred splhigh() to hardware, no need to continue.

(jmcneill)

2021-02-23 09:28:00 UTC MAIN commitmail json YAML

Fix timespeccmp declaration.

>From Kouichi Hashikawa in PR 56010.

(wiz)

2021-02-23 08:51:36 UTC MAIN commitmail json YAML

fix the formating for 'show usbxferlist'.

(mrg)

2021-02-23 07:17:58 UTC MAIN commitmail json YAML

Whitespace (mostly trailing)

(skrll)

2021-02-23 07:15:41 UTC MAIN commitmail json YAML

Fix Fl argument.

>From Kouichi Hashikawa in PR 56009.

(wiz)

2021-02-23 07:15:30 UTC MAIN commitmail json YAML

Use the PCI_MAPREG_TYPE macro.  No binary change.

(skrll)

2021-02-23 07:13:53 UTC MAIN commitmail json YAML

2021-02-23 01:31:30 UTC MAIN commitmail json YAML

PR/56007: Greg A. Woods: ksh unable to execute ERR traps
(probably since 2016/03/17 - i.e. 8.x and 9.x)

(christos)

2021-02-23 00:27:48 UTC MAIN commitmail json YAML

make: quote ':S' in error message about missing delimiter

(rillig)

2021-02-23 00:25:06 UTC MAIN commitmail json YAML

make: extract ParseModifier_Match into separate function

No functional change.

(rillig)

2021-02-23 00:15:22 UTC MAIN commitmail json YAML

make: add context information to error message about ':range' modifier

(rillig)

2021-02-23 00:11:07 UTC MAIN commitmail json YAML

make: fix local variable name for parsing arguments

The variable name 'arg' was misleading since after a successful
TryParseTime, it would no longer point to the argument of the variable
modifier, but to the _end_ of the argument.  To reduce confusion, use p
instead, like everywhere else.  This name is less specific, which is
still better than a wrong name.

(rillig)

2021-02-23 00:04:48 UTC MAIN commitmail json YAML

2021-02-22 23:59:43 UTC MAIN commitmail json YAML

make: add test for confusing double space in error message

(rillig)

2021-02-22 23:46:03 UTC MAIN commitmail json YAML

make: reorder code in ModifyWords

No functional change.

(rillig)

2021-02-22 23:42:29 UTC MAIN commitmail json YAML

make: use more common parameter order for VarSelectWords

No functional change.

(rillig)

2021-02-22 23:39:24 UTC MAIN commitmail json YAML

make: make ModifyWord_Subst a little easier to understand

Addition is easier than subtraction, and the expression 'word + wordLen'
obviously means 'the end of the word', which was not as easy to spot
before.

No functional change.

(rillig)

2021-02-22 23:21:33 UTC MAIN commitmail json YAML

make: remove freestanding freeIt variables

These variables all belong to a string variable.  Connect them using
FStr, which reduces the number of variables to keep track of.

No functional change.

(rillig)

2021-02-22 22:55:43 UTC MAIN commitmail json YAML

make: remove boolean parameter and return type from VarFreeEnv

There was only a single case where this parameter was false.  Inline
that case.  That was the only case that needed the return value, so
remove that as well.

(rillig)

2021-02-22 22:34:04 UTC MAIN commitmail json YAML

make: add a few open questions to Var_SetWithFlags

(rillig)

2021-02-22 22:26:50 UTC MAIN commitmail json YAML

make: do not expand variable name from the command line twice in a row

When

1.  there is a global variable containing a dollar in its expanded name
    (very unlikely since there are lots of undocumented edge cases that
    make variable names containing dollar signs fragile), and

2.  after that (unlikely since that requires .MAKEFLAGS instead of a
    normal command line)

3.  there is a command line variable of the same name (again very
    unlikely since that variable name would contain a dollar sign as
    well in the expanded form),

the global variable would not be undefined as promised by the comments
since its name was expanded once more than intended.

Because of the two 'very unlikely' above, this edge case hopefully does
not affect any practical use cases.

Note that this is not about VAR.${param} (which has a dollar sign in its
unexpanded form), but about the case where param itself would expand to
a dollar sign, such as after param=$$.

(rillig)

2021-02-22 22:04:28 UTC MAIN commitmail json YAML

make: add test for cmdline variables overriding global variables

(rillig)

2021-02-22 21:43:57 UTC MAIN commitmail json YAML

make: extract ExistsInCmdline from Var_SetWithFlags

No functional change.

(rillig)

2021-02-22 21:30:33 UTC MAIN commitmail json YAML

make: save a hash map lookup when defining a cmdline variable

This is a preparation to extract the code for exporting a cmdline
variable.  That code differs in several details from the other code in
ExportVar.

No functional change.

(rillig)

2021-02-22 21:16:25 UTC MAIN commitmail json YAML

Make the splx fast path smaller.

(jmcneill)

2021-02-22 21:14:15 UTC MAIN commitmail json YAML

make: document interaction between cmdline and global variables

Make prevents global variables from being or becoming visible when a
command line variable of the same name is already defined.

There is a double safety net here.  Even if the call to Var_DeleteExpand
were removed, there would be no noticeable effect, other than one less
line in the debug log.

No functional change.

(rillig)

2021-02-22 20:45:46 UTC MAIN commitmail json YAML

make: fix report-coverage

On NetBSD 8.0 it still worked.  Maybe gcov doesn't support .c files as
arguments anymore.  Using the .gcda files works and is more reliable
anyway since it covers the inline functions in the headers as well.

(rillig)

2021-02-22 20:45:29 UTC MAIN commitmail json YAML

fix formatting and db_usb_command_table[] static.  idea from rillig@.

(mrg)

2021-02-22 20:38:55 UTC MAIN commitmail json YAML

2021-02-22 19:34:07 UTC MAIN commitmail json YAML

cgram: fix assertion when substituting at the end of the longest line

Reported by Weitian LI via GitHub.

Contrary to the patch suggested in [1], still allow the cursor to be
placed to the very right of the text in a line since that is the usual
behavior of text editors.

Split the function substitute() into two parts:  one that handles the
curses-specific part of checking whether a substitution is possible at
the current cursor position, and one that performs the actual
substitution.  Only the latter is kept in the code section for the
string manipulation functions, the other is moved to the section for
curses code.  Having all the curses code in one place reduces the places
that call beep().  Previously, as well as now, there is a single beep
per invalid key before, but that was not obvious from the previous code.

[1]: https://github.com/DragonFlyBSD/DragonFlyBSD/commit/18d09f18cf4c

(rillig)

2021-02-22 17:36:42 UTC MAIN commitmail json YAML

cgram: add advanced cursor movement with tab, shift+tab, return

(rillig)

2021-02-22 16:28:20 UTC MAIN commitmail json YAML

cgram: properly handle input errors

On both NetBSD and Cygwin, a missing /usr/bin/fortune would previously
continue since popen does not return an error (as /bin/sh is found and
can be executed), so the next chance to catch an error is pclose.  At
that point, the shell has already printed an informative error message
about what happened (or what didn't happen), so that cgram does not need
to print an error by itself.

(rillig)

2021-02-22 15:09:50 UTC MAIN commitmail json YAML

2021-02-22 15:01:03 UTC MAIN commitmail json YAML

2021-02-22 11:38:13 UTC MAIN commitmail json YAML

Adjust description of compact list view output.

(jmcneill)

2021-02-22 11:33:34 UTC MAIN commitmail json YAML

In compact view, show the CPUs as a range (0-n) instead of a list
(0, 1, 2, ...) when the interrupt is assigned to all CPUs in the system.

(jmcneill)

2021-02-22 10:30:57 UTC MAIN commitmail json YAML

sun4v: update current status of sun4v

(palle)

2021-02-22 09:56:42 UTC MAIN commitmail json YAML

sun4v: handle spill normal user traps properly when current trap level is 1 - registers are spilled to the PA of the stack to avoid further mmu-related traps, since sun4v only has 2 trap levels

(palle)

2021-02-22 09:29:38 UTC MAIN commitmail json YAML

PR/56002: aarch64 has a true 64bit CPU cycle counter, we will use it.

This fix solves PR/56002 on aarch64, but this problems can occur on
all other architectures where cpu_counter() is 32bit.

(ryo)

2021-02-22 06:21:35 UTC MAIN commitmail json YAML

It is more appropriate to use clk_get_rate() rather than sc->sc_freq_target * 1000000.
ci_data.cpu_cc_freq should be set to a higher precision value.

In addition, when cpufreq_dt_init(), or while throttling, sc->sc_freq_target should not
be referenced by cpufreq_dt_change_cb() because it does not have the correct value.

(ryo)

2021-02-22 05:23:37 UTC MAIN commitmail json YAML

Elucidate why synchronous transfer is disabled for AV Macs.

Sync negotiation times out when drive advertises that capability:

----
sd1 at scsibus0 target 1 lun 0: <codesrc, SCSI2SD, 6.0> disk fixed
sd1: 16384 MB, 2088 cyl, 255 head, 63 sec, 512 bytes/sect x 33554432 sectors
sd1: sync (160.00ns offset 15), 8-bit (6.250MB/s) transfers
...
sd1(esp0:0:1:0): esp0: timed out [ecb 0x9f7fc4 (flags 0x1, dleft 8, stat 0)], <state 5, nexus 0x9f7fc4, phase(l 1, c 1, p 1), resid 8, msg(q 0,o 80) DMA active>
sd1(esp0:0:1:0): sync negotiation disabled
sd1(esp0:0:1:0): esp0: timed out [ecb 0x9f7fc4 (flags 0x41, dleft 8, stat 0)], <state 5, nexus 0x9f7fc4, phase(l 1, c 1, p 1), resid 8, msg(q 20,o 80) DMA active> AGAIN
sd1: async, 8-bit transfers
----

This is observed for real SCSI drives as well as SCSI2SD (rev 6.0).

Note that this is not a fallout from DMA patch for AV Macs; timeout
takes place even if ``avdma'' code is forcibly disabled.

No binary changes.

(rin)

2021-02-22 04:24:42 UTC MAIN commitmail json YAML

- Add missing \n's to printf(9).
- Whitespace fixes.

(rin)

2021-02-22 02:18:33 UTC MAIN commitmail json YAML

2021-02-22 01:31:52 UTC MAIN commitmail json YAML

Locking protocol changed again, adjust.

(christos)

2021-02-21 23:37:10 UTC MAIN commitmail json YAML

When waking from cpu_idle(), only call dosoftints if ci_intr_depth == 0

(jmcneill)

2021-02-21 23:06:39 UTC MAIN commitmail json YAML

add ddb commands to inspect usb xfer and xferlist structures.

(mrg)

2021-02-21 23:06:13 UTC MAIN commitmail json YAML

replace printf "ERROR<n>" with device_printf() and useful messages.

(mrg)

2021-02-21 22:21:56 UTC MAIN commitmail json YAML

cgram: allow navigation with KEY_PPAGE and KEY_NPAGE

(rillig)

2021-02-21 21:26:26 UTC MAIN commitmail json YAML

indent: add test demonstrating that indent cannot handle C99

indent cannot handle line-end comments.

The indent test suite requires each test file to have both a NetBSD and
a FreeBSD RCS ID.  If the FreeBSD RCS ID is missing, the test will
silently pass since in that case, an empty file is compared with an
empty file.  See the /start/,/end/ operator in t_indent.sh.

(rillig)

2021-02-21 20:33:43 UTC MAIN commitmail json YAML

cgram: rewrite completely, fixing bugs and style

Fixed bugs:

Do not consider the puzzle solved if all letters in the visible area are
substituted correctly.  To be properly solved, the whole puzzle must be
solved, even those parts that are currently off-screen.

Never place the cursor at the very right edge of the screen since that
does not work well with some terminals.  The maximum valid x coordinate
is COLS - 1.

Add horizontal scrolling.  Make all coordinate handling symmetric in
regard to the horizontal and vertical axes.  Previously, lines longer
than 80 characters could not be seen on the screen.

Improvements:

Remove the arbitrary limit of 128 characters per line.  Even if
fortune(6) may never generate such long lines, the code is easy enough
to adapt to other sources.

Properly clean up the allocated memory.  Previously, only the string
arrays were freed but not the strings themselves.

Stylistic:

Add RCS ID.

Fix ctype functions in lint's strict bool mode.

Avoid excessive calls to strlen whenever the cursor moves.  Given that
the whole screen is redrawn every time a key is pressed, this is an
unnecessary optimization, but the code smelled nevertheless.

(rillig)

2021-02-21 20:11:59 UTC MAIN commitmail json YAML

in xen_shm_map(), make sure to unmap any successfully mapped pages
before returning failure if there is partial failure

fix detection of partial failure - GNTTABOP_map_grant_ref can actually return
zero for partial failure, so we need to always check all the entries
to detect it

previously, DIAGNOSTIC kernel triggered panic() for partial failure,
and non-DIAGNOSTIC kernel did not detect it at all, leading to Dom0 page
fault later; since the mapping failure can be triggered by malicious
DomU via bad grant reference, it's important to expect the calls
to fail, and handle it gracefully without crashing Dom0

part of fixes for XSA-362

(jdolecek)

2021-02-21 20:02:25 UTC MAIN commitmail json YAML

reset xio_xv before calling xbdback_io_error() so it won't try to unmap
the non-initialized handles when xen_shm_map() fails

remove the ratechecked error printf for shm error - xbdback_io_error() prints
the error too

part of fixes for XSA-362

(jdolecek)

2021-02-21 17:16:00 UTC MAIN commitmail json YAML

cgram: WARNS=6, use int for all coordinates

Eliminate some frequently occurring subexpressions during substitution.

No functional change, assuming that fortune(6) always spits out less
than 2 gigacharacters of text.

(rillig)

2021-02-21 17:07:45 UTC MAIN commitmail json YAML

Inline pic_set_priority and use cpu_dosoftints_ci when available.

(jmcneill)

2021-02-21 17:07:06 UTC MAIN commitmail json YAML

Add cpu_dosoftints_ci(). Like cpu_dosoftints(), but takes a cpu_info ptr
so we can avoid the extra tpidr_el1 access if cpu_info is already known.

(jmcneill)

2021-02-21 16:50:58 UTC MAIN commitmail json YAML

cgram: consistently use char for characters

Having to convert back and forth between char, unsigned char and int is
confusing.  Just stay with char, until the support for wide characters
is added.

No functional change.

(rillig)

2021-02-21 16:37:26 UTC MAIN commitmail json YAML

cgram: fix undefined behavior when pressing function keys

The key codes for function keys are outside of the "range representable
by an unsigned char".  This resulted in parts of the screen being
cleaned.

(rillig)

2021-02-21 16:33:23 UTC MAIN commitmail json YAML

isascii.3: fix typo

(rillig)

2021-02-21 16:07:43 UTC MAIN commitmail json YAML

Align descriptors to 64 bytes instead of CACHE_LINE_SIZE (128) as all known
Allwinner SoCs with this part use 64-byte cache lines.

(jmcneill)

2021-02-21 16:05:44 UTC MAIN commitmail json YAML

cgram: adjust style to survive lint's strict bool mode

The biggest change is the return type of substitute().  Before, 0 meant
success, now false means failure.

No functional change.

(rillig)

2021-02-21 15:45:30 UTC MAIN commitmail json YAML

Apply PMR optimizations from gicv3

(jmcneill)

2021-02-21 15:42:21 UTC MAIN commitmail json YAML

cgram: sort includes

(rillig)

2021-02-21 15:41:04 UTC MAIN commitmail json YAML

cgram: indent

With manual corrections afterwards:

- indent removes empty lines between statement and declaration.  This
  had been a syntax error in C90, since C99 this is common style and
  should be accepted by indent.

- indent didn't format the first line of main for whatever reason, did
  that manually.

- indent removed the empty line above the '/////' separators.  It should
  have left these empty lines as-is.

(rillig)

2021-02-21 15:02:16 UTC MAIN commitmail json YAML

lint: extract check_non_constant_initializer from init_using_expr

No functional change.

(rillig)

2021-02-21 15:00:05 UTC MAIN commitmail json YAML

Keep current hardware priority value in struct cpu_info and use it instead
of reading icc_pmr_el1 in gicv3_set_priority.

(jmcneill)

2021-02-21 14:57:25 UTC MAIN commitmail json YAML

lint: extract check_bit_field_init from init_using_expr

No functional change.

(rillig)

2021-02-21 14:49:23 UTC MAIN commitmail json YAML

lint: add test for bit-field initialisation in traditional C

(rillig)

2021-02-21 14:19:27 UTC MAIN commitmail json YAML

lint: add debug logging for initializing an array of unknown size

It is possible that the type name 'array[unknown_size]' may spill into
the user-visible diagnostics.  The current test suite does not cover
such a case.  Anyway, saying 'array[unknown_size]' is still better than
saying 'array[0]', which would be misleading.

(rillig)

2021-02-21 14:02:36 UTC MAIN commitmail json YAML

lint: rename and condense initstack_check_too_many

No functional change.

(rillig)

2021-02-21 13:52:21 UTC MAIN commitmail json YAML

lint: remove redundant debug logging

In initstack_pop_nobrace, if anything happens to the initstack, it will
be logged by initstack_pop_item.

In init_using_expr, the address of the node is irrelevant, the node's
contents has already been logged above.

(rillig)

2021-02-21 13:35:37 UTC MAIN commitmail json YAML

cgram: fix Home key for cursor navigation

Reported by liweitianux via GitHub.

(rillig)

2021-02-21 13:27:22 UTC MAIN commitmail json YAML

lint: clean up comments in mem1.c

The comment for tgetblk had been misplaced.

(rillig)

2021-02-21 13:13:15 UTC MAIN commitmail json YAML

lint: document i_brace, add comments, rename initstack_string

No functional change outside debug mode.

(rillig)

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

lint: add test for initializing a character array using a string

The previous attempt took another code path than expected.  The
initialization of static_duration actually calls initstack_string.

(rillig)

2021-02-21 12:49:05 UTC MAIN commitmail json YAML

2021-02-21 12:36:39 UTC MAIN commitmail json YAML

Add a bunch of USB loader devices for Freescale SoC that should not
attach as HID devices.

(martin)

2021-02-21 11:23:33 UTC MAIN commitmail json YAML

lint: always initialize return values of constant_addr

Before, the caller was responsible for initializing the return values
from the function.  This was an unexpected burden.

Ensure that in each branch that returns true, both return values are
properly set.

Strangely, the only caller of that function, init_using_expr, uses
neither of the return values.  It just tests whether the expression is
constant or not.

No functional change.

(rillig)

2021-02-21 10:28:33 UTC MAIN commitmail json YAML

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

lint: add test for enum mismatch in initialization

This warning is currently not user-friendly because it omits any type
information, but that information is crucial.

(rillig)

2021-02-21 10:03:35 UTC MAIN commitmail json YAML

lint: clean up debug logging in initstack_pop_item

The debug logging contained much redundant information and was
misleading in a few places.  For example, "pop" did not actually pop an
item, plus there are several things that could be popped, so that didn't
help either.

Sprinkle some comments in places where the code needs to become clearer.

No functional change outside debug mode.  The condition
'istk->i_remaining >= 0' was redundant due to the assertion directly
above it.

(rillig)

2021-02-21 09:24:32 UTC MAIN commitmail json YAML

lint: rename istk to initstack_element

The longer name is more expressive and more correct.  The previous name
called each stack element a stack itself, which was unnecessarily
confusing.

No functional change.

(rillig)

2021-02-21 09:19:53 UTC MAIN commitmail json YAML

2021-02-21 09:17:56 UTC MAIN commitmail json YAML

lint: fix wrong warning about main falling off the bottom in C99 mode

This gets lint a small step closer to implementing C99.

(rillig)

2021-02-21 09:07:58 UTC MAIN commitmail json YAML

lint: force each test to declare the expected diagnostics

By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.

(rillig)

2021-02-21 08:47:13 UTC MAIN commitmail json YAML

2021-02-21 08:46:28 UTC MAIN commitmail json YAML

Some preemption updates - still not being used (yet)

(skrll)

2021-02-21 08:31:36 UTC MAIN commitmail json YAML

Fixup with __HAVE_PREEMPTION code which is currently unused

(skrll)

2021-02-21 08:27:41 UTC MAIN commitmail json YAML

lint: reduce amount of debug output during initialization

(rillig)

2021-02-21 08:05:51 UTC MAIN commitmail json YAML

2021-02-21 08:01:14 UTC MAIN commitmail json YAML

lint: rename members of struct istk to be more expressive

No functional change outside debug mode.

(rillig)

2021-02-21 07:59:17 UTC MAIN commitmail json YAML

lint: fix definition of debug_node in non-debug mode

(rillig)

2021-02-21 07:23:41 UTC MAIN commitmail json YAML

Consistently use motorola style.  No binary changes.

Seems missed in rev 1.3:
https://mail-index.netbsd.org/source-changes/2013/08/01/msg046378.html

(tsutsui)

2021-02-21 07:21:57 UTC MAIN commitmail json YAML

2021-02-21 02:29:57 UTC MAIN commitmail json YAML

2021-02-21 00:36:06 UTC MAIN commitmail json YAML

set explicit_file_name when we use getopt.

(christos)

2021-02-20 22:59:37 UTC MAIN commitmail json YAML

2021-02-20 22:57:57 UTC MAIN commitmail json YAML

2021-02-20 22:53:31 UTC MAIN commitmail json YAML

Only disable/enable interrupts if processing pending interrupts, and
inline pic_set_pending_psw.

(jmcneill)

2021-02-20 22:31:20 UTC MAIN commitmail json YAML

lint: clean up some of the C99 tests

Several C99 tests do not actually test C99 features but instead GCC
features.  All these tests should be double-checked again.

In some other tests, split the initializers into more lines, which makes
it easier to read the debug log corresponding to these tests.  This will
be necessary for reworking the initializer code to actually conform to
C99.

(rillig)

2021-02-20 22:18:32 UTC MAIN commitmail json YAML

lint: ensure that '# line' directives in tests are correct

It's too easy to forget one of them when adding or removing some lines.
This would make it more difficult to locate the lines referenced in the
error messages.

(rillig)

2021-02-20 19:56:44 UTC MAIN commitmail json YAML

lint: fix lint warning 'expression has null effect'

(rillig)

2021-02-20 19:35:07 UTC MAIN commitmail json YAML

Adjust ci_intr_depth when processing pending ints

(jmcneill)

2021-02-20 19:30:46 UTC MAIN commitmail json YAML

Inline "pic_do_pending_ints" in splx and check ci_pending_ipls to optimize
the common case (hw priority, no cascaded interrupts pending).

This also removes the need for the "pic_pending_used" flag, and should fix
booting on Raspberry Pi 3.

(jmcneill)

2021-02-20 19:27:35 UTC MAIN commitmail json YAML

daif_disable: since we read bits before setting them, if the current state
matches the desired state we can skip the daif write

(jmcneill)

2021-02-20 19:10:38 UTC MAIN commitmail json YAML

2021-02-20 18:55:10 UTC MAIN commitmail json YAML

2021-02-20 18:52:58 UTC MAIN commitmail json YAML

lint: add test for 'do { ... } while (false)' in strict bool mode

Right now, this variant of the popular macro pattern is flagged as
needing a /*CONSTCOND*/ annotation.  As with 'do { ... } while (0)',
there is nothing wrong with this pattern, therefore there should be no
warning.

(rillig)

2021-02-20 18:49:27 UTC MAIN commitmail json YAML

lint: enable heuristics in test for strict bool mode

This is a preparation for allowing 'do { ... } while (false)', in
addition to the commonly used 'do { ... } while (0)', without declaring
the controlling expression /*CONSTCOND*/.

(rillig)

2021-02-20 18:18:53 UTC MAIN commitmail json YAML

remove "pic_do_pending_int() prototype; no matching function

(jmcneill)

2021-02-20 18:10:23 UTC MAIN commitmail json YAML

lint: document how to compile lint1 in debug mode

(rillig)

2021-02-20 18:04:20 UTC MAIN commitmail json YAML

Replace magic numbers with proper macros prepared in assym.h.

No binary changes.
Note this is a preparation for a possible fix of PR port-m68k/55990.

(tsutsui)

2021-02-20 18:02:58 UTC MAIN commitmail json YAML

2021-02-20 17:44:39 UTC MAIN commitmail json YAML

lint: in debug mode, print the initialization stack

This is the central data structure of the initializations, it keeps
track of the objects that still need to be initialized.  Seeing its
contents in debug mode helps in finding and understanding the still
incomplete C99 support.

(rillig)

2021-02-20 17:24:37 UTC MAIN commitmail json YAML

lint: define debug_named_member only in debug mode

In non-debug mode it was an expensive no-op.

(rillig)

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

lint: document an assumption that has turned wrong with C99

(rillig)

2021-02-20 16:55:32 UTC MAIN commitmail json YAML

lint: add machine-readable expectations to test for initializer

(rillig)

2021-02-20 16:51:18 UTC MAIN commitmail json YAML

lint: fix typo in test for pop_member

The leader of a city should rather be a mayor than a major.

(rillig)

2021-02-20 16:34:57 UTC MAIN commitmail json YAML

lint: extend debugging for initializing objects

No functional change outside debug mode.

(rillig)

2021-02-20 16:03:56 UTC MAIN commitmail json YAML

lint: rename mkinit to init_using_expr

No functional change outside debug mode.

(rillig)

2021-02-20 15:23:07 UTC MAIN commitmail json YAML

lint: add hierarchical debug logging for initializations

No functional change for default mode.

(rillig)

2021-02-20 14:51:07 UTC MAIN commitmail json YAML

Move 'struct pic_pending' from percpu to struct cpu_info. Saves a few
instructions in splx.

(jmcneill)

2021-02-20 14:48:07 UTC MAIN commitmail json YAML

Reapply the following change - Simon's first attempt had a missing ';'

release builds done for cobalt and evbmips64-eb

Provide an __eprol symbol in TEXT_START_SYMBOLS.  MIPS overrides
TEXT_START_SYMBOLS so it misses out on the default definition of
this that does provide an __eprol symbol.  Fixes linking of profiled
binaries.

(skrll)

2021-02-20 13:31:35 UTC MAIN commitmail json YAML

Sync with OpenBSD r1.99:

  move the rearming of the cq after the refill of the rq.

  this is the only real diff we have left outstanding on a box that
  experienced rx lockups. since adding this change it's been happy
  for the last 4 weeks and counting so far.

(jmcneill)

2021-02-20 11:06:56 UTC MAIN commitmail json YAML

lint: make parsing of GCC line directives stricter

The previous code accepted '# 123 "file.c" 23' as specifying a system
header, just because that number ends with '3'.  The original intention
was to compare the complete word, not its suffix.  Fix that.

No practical change since the only flags that are used by GCC are all
single-digit.

(rillig)

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

lint: reduce duplicate code in check for getopt

This also changes the conditions to their positive form, which is easier
to read.

No functional change.  The resulting binary would have been the same as
before, were it not for the changed line numbers in the lint_assert
calls further down in the code.

(rillig)

2021-02-20 10:01:27 UTC MAIN commitmail json YAML

lint: clean up check for getopt

The original options string is not needed during the check.  Having only
the unhandled options suffices.

No functional change.

(rillig)

2021-02-20 09:57:02 UTC MAIN commitmail json YAML

lint: fix crash from ckgetopt.c 1.2 and document the data structures

(rillig)

2021-02-20 09:51:20 UTC MAIN commitmail json YAML

Misc style fixes. No binary changes.

- Use uint{32,8}_t instead of unsigned {int, char}.
- Sort headers.
- KNF

(rin)

2021-02-20 09:40:43 UTC MAIN commitmail json YAML

lint: reproduce the crash from ckgetopt.c 1.2

The intention of the getopt check was to analyze only those while loops
whose condition consists of the usual getopt call.  For all other while
loops, ck.while_level was intended to stay at 0.

This was not the case in ckgetopt.c 1.2 and has been fixed in ckgetopt.c
1.3.  The code did not document the intended invariants though, which it
should have done.  This will be done in a follow-up commit.

(rillig)

2021-02-20 09:36:31 UTC MAIN commitmail json YAML

2021-02-20 09:31:51 UTC MAIN commitmail json YAML

2021-02-20 09:17:13 UTC MAIN commitmail json YAML

patch(1): use PATH_MAX for the size of rejname

via freebsd, openbsd

(nia)

2021-02-20 08:59:24 UTC MAIN commitmail json YAML

patch(1): add test cases for various backup file formats

(nia)

2021-02-20 03:25:36 UTC MAIN commitmail json YAML

2021-02-20 03:22:14 UTC MAIN commitmail json YAML

2021-02-20 02:47:21 UTC MAIN commitmail json YAML

Revert the MIPS __eprol change.  Unintended fallout that doesn't appear
easy to fix so far.

(simonb)

2021-02-20 01:57:54 UTC MAIN commitmail json YAML

Query real-mode? at startup and cache the result.

(thorpej)

2021-02-20 01:43:04 UTC MAIN commitmail json YAML

libisc needs libssl now

(christos)