Commit Graph

291693 Commits

Author SHA1 Message Date
riastradh 3b20c708cc aarch64: Fix stack traces from jump-to-null. 2021-11-27 14:11:04 +00:00
skrll 3f3a46002b Trailing whitespace 2021-11-27 10:00:01 +00:00
skrll 623df5d043 Apply some errata workarounds for Cortex A17 2021-11-27 08:51:01 +00:00
skrll c06208b789 Add the Cortex A17 Diagnostic control registers 2021-11-27 08:25:18 +00:00
skrll bf94057019 Drive-by trailing whitespace removal. 2021-11-27 06:47:43 +00:00
skrll 3bb50416cd Remove unnecessary #include 2021-11-27 06:44:16 +00:00
ryo dc1714c87d fix build for aarch64eb 2021-11-27 05:36:39 +00:00
thorpej 0cf29bbbd8 Add "Gearmo USA-FTDI4X" (a 4-port USB serial adapter) to the list of
devices supported by uftdi(4).
2021-11-26 22:37:31 +00:00
gson 0d1c554f2b The wg_handshake_timeout test case was failing because it contained
atf_fail "failed to trigger PR kern/56252" without a corresponding
atf_expect_fail "PR kern/56252", which makes no sense.  Since the
test case does occasionally fail on real hardware, fix this by adding
the atf_expect_fail rather than by removing the atf_fail.
2021-11-26 20:02:35 +00:00
skrll f801d2dc32 Mask the bottom 5 bits in the standard pic way. NFC. 2021-11-26 19:39:58 +00:00
skrll f0ed8c9cba no need to shout 2021-11-26 19:36:17 +00:00
ryo d8c022cbc1 The changes on compat/linux/common/linux_termios.c should also
be applied to compat/linux32/common/linux_termios.c, and reduce diff.

- remove duplicate fd_putfile(). This will be done after "goto out;".
- catch up from compat/linux/common/linux_termios.c r1.26  TIOCSPTLCK
- catch up from compat/linux/common/linux_termios.c r1.37  (TCOOFF/TCOON) of the TCXONC
- catch up from compat/linux/common/linux_termios.c r1.39  FIOCLEX and FIONCLEX
2021-11-26 19:28:37 +00:00
nia 82d379c3ac describe screenblank(1) 2021-11-26 17:38:07 +00:00
christos 1f3957b4a3 use MNT_NFS4ACLS instead of MNT_ACLS (which was changed before to mean
MNT_POSIX1EACLS)
2021-11-26 17:35:12 +00:00
gson 6dc8853fd6 Delete trailing whitespace 2021-11-26 15:45:52 +00:00
rillig eb461ef075 indent: enhance debug logging for input handling 2021-11-26 15:21:38 +00:00
rillig 80501c8f97 indent: add buf_add_range for adding characters to a buffer
No functional change.
2021-11-26 15:18:18 +00:00
rillig 80bf841169 indent: replace inp_enlarge with inp_add
Previously, inbuf.inp.s was only updated at the very end of reading a
line from the input file, which meant that during debugging, it pointed
to invalid memory. Updating all fields in inbuf.inp after every
reallocation makes the code less tricky to understand.

No functional change.
2021-11-26 15:08:48 +00:00
rillig 271f5df6a8 indent: split inp_read_line into smaller functions
No functional change.
2021-11-26 14:48:03 +00:00
rillig 3d3d726b21 indent: extract inp_from_file from inp_read_line
No functional change.
2021-11-26 14:33:12 +00:00
rillig 65cc42c6d0 indent: remove code that fixes malformed preprocessor directives 2021-11-26 14:27:19 +00:00
rillig 083fb08c56 indent: move ind_add from io.c to indent.c
It's a general-purpose function that is not directly related to input or
output.
2021-11-26 14:17:01 +00:00
christos e39d5bda2b Remove #error, fixes the build. I don't understand why this would not work
on big endian. We use this construct to convert pointers everywhere else.
2021-11-26 13:32:38 +00:00
christos 9ef79fb22e declare xc 2021-11-26 13:24:28 +00:00
sborrill bf76deaf12 Load rc configuration based on rcvar, not name, so that correct settings
in /etc/rc.conf.d are loaded.

Usually this does not matter as rcvar and name are set to the same value.
For pf_boot and npf_boot, rcvar is set to pf and npf respectively.

Prior to the change, if:
rc.conf contains nfp=YES
rc.conf.d/npf does not exist

Then:
/etc/rc.d/npf_boot rcvar
outputs:
# npf_boot
$npf=YES

If:
rc.conf contains npf=NO (or is not set)
rc.conf.d/npf contains npf=YES

Then:
/etc/rc.d/npf_boot rcvar
outputs:
# npf_boot
$npf=NO

This means that in the latter case, at boot time the npfctl start command
is never run and the firewall is not operational.
2021-11-26 13:11:36 +00:00
sborrill 1438126a18 Use rcvar=$name syntax consistently in rc.d scripts which makes it easier to
search for rc.d scripts where rcvar differs from name. No functional change.
2021-11-26 12:51:24 +00:00
ryo 836f4a42d7 The internal architecture name of golang is "arm" or "arm64", which has
different naming conventions from netbsd's machine[] or machine_arch[]
("earmv7", "aarch64", etc.) and cannot be used as is.
Instead, use define LINUX_GO_RT0_SIGNATURE_ARCH{32,64}.
2021-11-26 09:05:05 +00:00
ryo bbb9625b59 - LINUX_GO_RT0_SIGNATURE for compat_linux is no longer enabled by default.
it is now defined in each arch same as the other *_SIGNATURE definitions.
- add new LINUX32_GO_RT0_SIGNATURE for compat_linux32, and is defined in amd64 and aarch64.
2021-11-26 08:56:28 +00:00
ryo d9c43f29c8 Fix anonymous memory object leak for sigcode.
- Repeating "modload compat_linux && /emul/linux/bin/ls && modunload compat_linux"
  will reproduce this problem.
- It cause in exec_sigcode_map(), anon-object for sigcode was created at
  first exec, but it remained even after exec_remove.
- Fixed that the anon-object for sigcode is created at exec_add(), and the
  anon-object reference is removed at exec_remove().
- sigobject_lock is no longer needed since it is locked by exec_lock.
- The compat_16 module rewrites the e_sigcode entry in emul_netbsd directly and
  does not use exec_add()/exec_remove(), so it needs to call
  sigcode_alloc()/sigcode_free() on its own.
2021-11-26 08:06:11 +00:00
rillig 04618526c8 indent: prevent undefined behavior in inp_line_start
No functional change.
2021-11-25 21:59:40 +00:00
rillig c680087d06 indent: make error message for missing command line arguments clearer 2021-11-25 21:48:23 +00:00
rillig 51ce682b28 tests/indent: use escape sequence for newline characters
No functional change.
2021-11-25 21:45:28 +00:00
rillig 5852ffadb7 tests/indent: test in-place formatting with parse errors
The file gets formatted until the end, despite the parse error. This may
destroy layout details of the code but usually preserves the overall
structure. Since all source code is supposed to be under version
control, this is not a problem.
2021-11-25 21:39:21 +00:00
rillig 1039243a64 indent: make fits_in_one_line independent of ps
This makes it easier to understand the function. Having the dependency
to the input line handling is already complicated enough.

No functional change.
2021-11-25 21:01:32 +00:00
rillig 5554de13ae indent: fix accidentally joined and broken comments (since 2019-04-04)
The fixed version is not perfect as it gets the indentation of the last
line of the first comment wrong, but at least indent doesn't generate
malformed output anymore.
2021-11-25 20:44:09 +00:00
rillig 3ad751bf18 tests/indent: demonstrate bugs in comment processing 2021-11-25 20:14:00 +00:00
rillig 7ccaa90a01 tests/indent: fix misleading typedef name 2021-11-25 20:02:06 +00:00
rillig fb86fc3d95 indent: update cross-reference comments for bug in comment handling
The function was renamed in io.c 1.122 from 2021-11-19.
2021-11-25 20:00:31 +00:00
rillig da67cf2c19 tests/indent: rename ps.in_parameter_declaration in test as well 2021-11-25 19:56:03 +00:00
rillig 2bb193fc7b indent: rename ps.in_function_parameters to match reality
This flag is only set while parsing the parameters of a function
definition, but not for a function declaration. See buffer_add in the
test fmt_decl.

No functional change.
2021-11-25 18:48:37 +00:00
rillig a2cadd752a indent: improve heuristic for spaces around '*' in declarations 2021-11-25 18:36:30 +00:00
rillig f6009395a1 tests/indent: demonstrate more example for broken '*' in declarations
Since indent-2021.11.25.16.41.33.
2021-11-25 18:20:21 +00:00
rillig c196c08428 tests/indent: demonstrate 'sizeof(int) *expr' (since 2021-11-25)
Broken in indent-2021.11.25.16.41.33, while fixing the spacing around
'*' in declarations.
2021-11-25 18:10:23 +00:00
rillig a7111b0c20 indent: eliminate 3 negations in tokenizer
No functional change.
2021-11-25 17:50:00 +00:00
rillig db3af19824 indent: extract lex_asterisk_unary into separate function
No functional change.
2021-11-25 17:46:51 +00:00
rillig aad385990f indent: condense code for building tokens from characters
No functional change.
2021-11-25 17:35:46 +00:00
rillig 0103a601e4 indent: in lexi, assign lsym and next_unary in consistent order
No functional change.
2021-11-25 17:28:13 +00:00
rillig 83c7310d0e indent: fix heuristic for declaration/definition to post-1990 reality 2021-11-25 17:10:53 +00:00
rillig c5f096eda7 tests/indent: remove unnecessary option for testing '-pcs'
Before lexi.c 1.157 from 2021-11-25, the option '-npsl' had been
necessary to prevent a wrong line break, as indent wrongly interpreted
the function declaration as a function definition, just because the
first ')' in the declaration line was not immediately followed by a ','
or ';'.
2021-11-25 16:56:02 +00:00
rillig dbc9f6e14c indent: fix space after function name for option '-pcs' 2021-11-25 16:51:24 +00:00