Commit Graph

280689 Commits

Author SHA1 Message Date
kim
6f0846e992 Add optional release info in /etc/motd
My personal preferencese for /etc/rc.conf:

    update_motd_release=YES
    motd_release_tag='Binaries: '

This provides an explanation to users about the second version in motd.
2020-09-11 09:59:35 +00:00
kardel
c0252f50ee PR/kern 55567
fix the data-only fast path. RCV.UP and SND.WL1 could be left behind
on long sequences of data only packets. pull them along to avoid relative
sequence wraps.

consistent with FreeBSD

addresses second failure mode of PR/kern 55567.

pullup to netbsd-8
pullup to netbsd-9
2020-09-11 09:08:47 +00:00
mrg
c823d03c48 __mips64 does not mean 64 bit address space. also check _LP64. 2020-09-11 09:01:41 +00:00
rillig
38ac32b33e make(1): document CondParser_Comparison 2020-09-11 07:09:40 +00:00
rillig
30109ee17c make(1): fix comment in test for the || operator in conditions
Thanks to wiz for discovering this.
2020-09-11 06:51:38 +00:00
rillig
56350d0e74 make(1): add tests for really strange edge cases in conditions 2020-09-11 06:47:42 +00:00
skrll
ec64646830 Wrap a long comment 2020-09-11 06:40:25 +00:00
rillig
b1c40cfb87 make(1): reorder parameters of condition parsing functions
First the subject, then the options, then the output parameters.
2020-09-11 06:08:10 +00:00
rillig
e3ff571cdb make(1): add missing space in source code 2020-09-11 05:37:40 +00:00
rillig
4f76601a57 make(1): add rationale for evaluating expression after parse error 2020-09-11 05:29:46 +00:00
rin
8f02e7cc73 Update table for alpha, m68000, m68k, and powerpc:
- alpha is running and no regression in ATF (tests in lib/libc/sys are
  skipped due to port-alpha/55652).

- m68000 is successfully built and running at a same level as before.

- m68k (amiga, mac68k, sun3) is running and no regression in a tiny
  subset of ATF (kernel, lib/libc/{gen,sys}).

- macppc (oea) and evbppc (booke, ibm4xx) are running and no regression
  in ATF.
2020-09-11 05:24:14 +00:00
rillig
32213c9dd0 make(1): fix line numbers from test result of the previous commit 2020-09-11 05:14:21 +00:00
rillig
7233424f15 make(1): add test for evaluation of condition after parse error 2020-09-11 05:12:08 +00:00
rillig
9df3b7b65d make(1): reduce code size in CondParser_Eval 2020-09-11 05:03:20 +00:00
rillig
7ed2c478c5 make(1): use consistent naming scheme for condition parsing functions 2020-09-11 04:57:15 +00:00
rillig
8714c6fe6e make(1): rename CondGetString to CondParser_String
This describes the function's effect more accurately.  The verb "get" is
not commonly associated to having side effects.
2020-09-11 04:40:26 +00:00
rillig
f9beff981e make(1): rename GNodeSuff.gn to gnp
It was confusing to have a field called "gn" that was not a pointer to a
GNode, but a double-pointer to GNode instead.
2020-09-11 04:36:12 +00:00
rillig
fc3e32ef07 make(1): replace *a->b with a->b[0]
This allows the code to be read strictly from left to right.  In most
places this style was already used.
2020-09-11 04:32:39 +00:00
rillig
aa1ee0301b make(1): replace *par->p with par->p[0]
It's a few characters more code than before but can be read strictly
from left to right, which was not possible before.
2020-09-11 04:22:22 +00:00
rillig
f031863371 make(1): rename CondParser.condExpr to p
The prefix "cond" was needed when this struct field was a global
variable.  The main name "expr" was not precise enough since this code is
about parsing a condition, not an expression.

During parsing, this variable does not contain the whole expression but
a pointer to the remaining part of the condition, therefore the name
"expr" had been confusing.
2020-09-11 04:18:44 +00:00
rillig
c69f7fe123 make(1): rename CondLexer to CondParser
The name CondLexer was wrong since this type is about parsing conditions
that can be arbitrarily nested.
2020-09-11 04:07:44 +00:00
simonb
bd13d35203 Fix shift tyop in a comment. 2020-09-11 03:54:14 +00:00
kamil
fba137c2fa Add prototypes of internal_sigdelset() and internal_clone()
Cherry-pick the missing change from:

commit 983d7ddd0b278b45d815cbac9197205b39c4860a
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Thu Jul 11 06:22:35 2019 +0000

    Add NetBSD LSan support

    Summary:
    Combine few relatively small changes into one:

     - implement internal_ptrace() and internal_clone() for NetBSD
     - add support for stoptheworld based on the ptrace(2) API
     - define COMPILER_RT_HAS_LSAN for NetBSD
     - enable tests for NetBSD/amd64

    Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC.

    The implementation is in theory CPU independent through well defined macros
    across all NetBSD ports, however only the x86_64 version was tested.

    Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb

    Reviewed By: vitalybuka

    Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64057

    llvm-svn: 365735
2020-09-11 01:45:53 +00:00
kamil
a2d7733122 Add getauxval() compat for NetBSD
Cherry-pick and adapt:

commit 02519fc7a6f8c528f67975a9f78ce64dabf402b4
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Thu Sep 12 18:57:58 2019 +0000

    Add getauxval() compat for NetBSD

    Summary:
    getauxval() is not available on NetBSD and there is no a direct equivalent.

    Add a function that implements the same semantics with NetBSD internals.

    Reorder the GetPageSize() functions to prefer the sysctl approach for NetBSD.
    It no longer makes a difference which approach is better. Avoid changing
    conditional code path.

    Reviewers: vitalybuka, dvyukov, mgorny, joerg

    Reviewed By: vitalybuka

    Subscribers: llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67329

    llvm-svn: 371758
2020-09-11 01:08:36 +00:00
kamil
6db3e45ad2 Use sysctl to implement GetPageSize()
Cherry-pick code chunk from newer LLVM compiler-rt.
2020-09-11 01:07:53 +00:00
kamil
69763b91ed Enable SANITIZER_CAN_USE_PREINIT_ARRAY on NetBSD
Cherry-pick:

commit 3a189bac9bb111c9a59339015ab0d4e2fed735f4
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Thu Dec 19 03:21:46 2019 +0100

    [compiler-rt] Enable SANITIZER_CAN_USE_PREINIT_ARRAY on NetBSD

    .preinit_array is supported since 9.0.
2020-09-11 01:07:27 +00:00
kamil
86bc1e72b9 Adapt stop-the-world for ptrace changes in NetBSD-9.99.30
Cherry-pick and adapt:

commit fc356dcc11c10003ff22acff667b0a9f5e6c1e0f
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Tue Dec 24 20:33:54 2019 +0100

    [compiler-rt] Adapt stop-the-world for ptrace changes in NetBSD-9.99.30

    Handle PT_LWPNEXT for newer kernels and keep PT_LWPINFO for older ones.
2020-09-11 01:07:00 +00:00
kamil
39b6a894c0 Add NetBSD LSan support
Cherry-pick and adapt:

commit 983d7ddd0b278b45d815cbac9197205b39c4860a
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Thu Jul 11 06:22:35 2019 +0000

    Add NetBSD LSan support

    Summary:
    Combine few relatively small changes into one:

     - implement internal_ptrace() and internal_clone() for NetBSD
     - add support for stoptheworld based on the ptrace(2) API
     - define COMPILER_RT_HAS_LSAN for NetBSD
     - enable tests for NetBSD/amd64

    Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC.

    The implementation is in theory CPU independent through well defined macros
    across all NetBSD ports, however only the x86_64 version was tested.

    Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb

    Reviewed By: vitalybuka

    Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64057

    llvm-svn: 365735
2020-09-11 01:05:28 +00:00
kamil
f445ab3a7e Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD
Cherry-pick and adapt:

commit 8827047551570b7ed7088765c3de2a8cce6823b8
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Sat Sep 21 07:30:42 2019 +0000

    Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD

    Summary:
    The atexit(3) and __cxa_atexit() calls allocate internally memory and free on exit,
    after executing all callback. This causes false positives as DoLeakCheck() is called
    from the atexit handler. In the LSan/ASan tests there are strict checks triggering
    false positives here.

    Intercept all atexit(3) and __cxa_atexit() calls and disable LSan when calling the
    real functions.

    Stop tracing allocations in pthread_atfork(3) funtions, as there are performed
    internal allocations that are not freed for the time of running StopTheWorld()
    code. This avoids false-positives.

    The same changes have to be replicated in the ASan and LSan runtime.

    Non-NetBSD OSs are not tested and this code is restricted to NetBSD only.

    Reviewers: dvyukov, joerg, mgorny, vitalybuka, eugenis

    Reviewed By: vitalybuka

    Subscribers: jfb, llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67331

    llvm-svn: 372459
2020-09-11 01:04:33 +00:00
kamil
31e31781c6 Add __lsan::ScopedInterceptorDisabler for strerror(3)
Cherry-pick and adapt:

commit 1b58389428ed07a7322ba9c2bcaeec99807f9457
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Sat Sep 21 07:45:02 2019 +0000

    Add __lsan::ScopedInterceptorDisabler for strerror(3)

    Summary:
    strerror(3) on NetBSD uses internally TSD with a destructor that is never
    fired for exit(3). It's correctly called for pthread_exit(3) scenarios.

    This is a case when a leak on exit(3) is expected, unavoidable and harmless.

    Reviewers: joerg, vitalybuka, dvyukov, mgorny

    Reviewed By: vitalybuka

    Subscribers: dmgreen, kristof.beyls, jfb, llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67337

    llvm-svn: 372461
2020-09-11 01:03:31 +00:00
kamil
a476aad3c2 Disable sanitizer_stoptheworld_linux_libcdep.cc for NetBSD 2020-09-11 01:01:14 +00:00
rillig
6d5d05ff0f make(1): reduce code size in CondGetString
The pattern is now the usual "test the character, then increment the
pointer", throughout the whole function.
2020-09-10 23:37:54 +00:00
rillig
6ddbc03f29 make(1): skip redundant condExpr-- in CondGetString 2020-09-10 23:27:27 +00:00
kre
c2105d446d Replace a pipe into tr to normalise a var name (convert '.' or '-'
into '_' to meet sh variable name rules) into a shell string processing
loop.

On my test system, this reduces the total elapsed time for the bin/sh ATF
tests from about 109 secs to about 102 (user cpu from 24.5 to 21, sys cpu
from 34 to 30) and the usr.bin/make tests elapsed time from 42.5 to 40
secs (user from a bit over 15 to a bit over 13, and sys from 16+ to 13+).
(Recorded on an AMD64 domU).

These probably exaggerate the effect, as there are a bunch of quite small
tests, which means the ATF overhead (which this change affects) is a greater
proportion of the total test time than for some other tests where most of
the time is spent actually testing.

But I am fairly confident that there will be at least some improvement.

This could be further improved by removing the cmdsub invocation method,
and instead passing the name of a variable containing the string to
normalise (with the result returned in that same var) - but that would
mean altering all the callers as well.   Some other time maybe.
2020-09-10 22:51:10 +00:00
rillig
2bf492c8b8 make(1): reduce code size for parsing the || or && operators
On x86_64, accessing [0] generates less code than [1].
2020-09-10 22:47:22 +00:00
rillig
949eb7fd83 make(1): add tests for the |, ||, ||| operators 2020-09-10 22:44:08 +00:00
rillig
89d5f8aeda make(1): add test for the &, && and &&& operators 2020-09-10 22:38:57 +00:00
rillig
1aa23ac7b9 make(1): add test for .SILENT 2020-09-10 21:40:50 +00:00
rillig
fb492da4a2 make(1): add test for .MAKEFLAGS 2020-09-10 21:22:07 +00:00
kre
f1b3a283f6 Whitespace. NFC. 2020-09-10 17:40:34 +00:00
kre
b1ea2bb886 Replace use of tr to translate '-' in test names into '_' to satisfy ATF
requirements (correct sh variable/function name syntax).  Use a sh
loop instead, and save one fork() one vfork() and one exec of tr for
each test case (many of which don't need anything done to them at all).

This might partially mitigate PR misc/55595
2020-09-10 17:33:16 +00:00
skrll
3398ec5001 Typo in a comment 2020-09-10 17:26:38 +00:00
jakllsch
0fe0802f28 fix earmv7hfeb set list for bootarm.efi
Do this by explicitly marking all the non-earmv7hf* arm archs as not wanted,
because the set lists processor doesn't have a better way to be told.
2020-09-10 15:17:23 +00:00
jakllsch
622d3ff185 bootaa64: explicitly set GNUEFIARCH and LIBGNUEFI_ARCH to aarch64 2020-09-10 14:30:14 +00:00
maxv
b813e1084f kasan: fix the copyright notices 2020-09-10 14:10:46 +00:00
maxv
b5ed0ef9ee kcsan: fix the copyright notices 2020-09-10 14:04:45 +00:00
kamil
47333b4890 Avoid using internal RTLD/libpthread/libc symbol in sanitizers
Cherry-pick and adapt:

commit 0da15ff318480f30bbc90b9e8ecb9bb9431c7fd3
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Fri Jan 3 02:35:33 2020 +0100

    [compiler-rt] [netbsd] Switch to syscall for ThreadSelfTlsTcb()

    This change avoids using internal, namespaced per-CPU calls that
    are not a stable interface to read the TSL base value.
2020-09-10 12:53:05 +00:00
riastradh
ea2d112d7c aes neon: Gather mc_forward/backward so we can load 256 bits at once. 2020-09-10 11:31:03 +00:00
riastradh
3e1dd6a02d aes neon: Hoist dsbd/dsbe address calculation out of loop. 2020-09-10 11:30:28 +00:00
riastradh
db39c37e7d aes neon: Tweak register usage.
- Call r12 by its usual name, ip.
- No need for r7 or r11=fp at the moment.
2020-09-10 11:30:08 +00:00