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 (4h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 03:18:58 UTC Now

2021-10-26 20:17:42 UTC MAIN commitmail json YAML

indent: fix debug logging

The parser state is not always 'ps', so the debug logging must use the
correct state as well.

(rillig)

2021-10-26 19:36:30 UTC MAIN commitmail json YAML

indent: run indent on its own source code

With manual corrections afterwards, to compensate for the remaining bugs
in indent.

Without the type definitions in .indent.pro, the opening braces of the
functions kw_name and lexi_alnum would not be at the beginning of the
line.

(rillig)

2021-10-26 18:36:25 UTC MAIN commitmail json YAML

indent: merge duplicate code in lexi_alnum

(rillig)

2021-10-26 17:33:18 UTC MAIN commitmail json YAML

2021-10-26 16:58:46 UTC MAIN commitmail json YAML

fix build with COPTS=-O0

(ryo)

2021-10-26 16:16:38 UTC MAIN commitmail json YAML

Merge all MD __sigaction14_sigtramp.c copies into one:
- sparc and sparc64 were not using version 0 sigcontext when there were
  no arguments in the signal version. This was probably a bug.
- vax is using +1 the version numbers of the other archs.
- Only hppa was defining __LIBC12_SOURCE__ so it was getting a working
  sigcontext before. all the other ports that supported sigcontext had
  the compat code disabled.
[pointed out by thorpej, thanks!]
If we want to remove sigcontext support from userland at least now there
is less work to do so.

(christos)

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

Use a type-correct end marker for strstrcat() rather than NULL, as
for a function with unknown number & types of args, the compiler isn't
able to automatically convert to the correct type.  Issue pointed out
in off list e-mail by Rolland Illig ... Thanks.

The first arg (pointer to where to put length of result) is of a known
type, so doesn't have the same issue - we can keep using NULL for that
one when the length isn't needed.

Also, make sure to return a correctly null terminated null string in
the (absurd) case that there are no non-null args to strstrcat() (though
there are much better ways to generate "" on the stack).  Since there is
currently just one call in the code, and it has real string args, this
isn't an issue for now, but who knows, some day.

NFCI - if there is any real change, then it is a change that is required.

XXX pullup -9 (together with the previous changes)

(kre)

2021-10-26 07:51:23 UTC MAIN commitmail json YAML

libcrypt: fine-grained warnings for argon2, requested by rin

(nia)

2021-10-26 06:34:03 UTC MAIN commitmail json YAML

2021-10-26 06:02:00 UTC MAIN commitmail json YAML

Add a comment and adjust whitespace to match style in this file

(skrll)

2021-10-26 00:05:38 UTC MAIN commitmail json YAML

PR bin/56464

After almost 30 years, finally do the right thing and read $HOME/.profile
rather than .profile in the initial directory (it was that way in version
1.1 ...)  All other ash descendants seem to have fixed this long ago.

While here, copy a feature from FreeBSD which allows "set +p" (if a
shell run by a setuid process with the -p flag is privileged) to reset
the privileges.  Once done (the set +p) it cannot be undone (a later
set -p sets the 'p' flag, but that's all it does) - that just becomes a
one bit storage location.

We do this, as (also copying from FreeBSD, and because it is the right
thing to do) we don't run .profile in a privileged shell - FreeBSD run
/etc/suid_profile in that case (not a good name, it also applies to setgid
shells) but I see no real need for that, we run /etc/profile in any case,
anything that would go in /etc/suid_profile can just go in /etc/profile
instead (with suitable guards so the commands only run in priv'd shells).

One or two minor DEBUG mode changes (notably having priv'd shells identify
themselves in the DEBUG trace) and sh.1 changes with doc of the "set +p"
change, the effect that has on $PSc and a few other wording tweaks.

XXX pullup -9  (not -8, this isn't worth it for the short lifetime
that has left - if it took 28+ years for anyone to notice this, it
cannot be having all that much effect).

(kre)

2021-10-25 21:33:24 UTC MAIN commitmail json YAML

indent: improve debug logging

Output the various details in chronological order.

(rillig)

2021-10-25 20:32:38 UTC MAIN commitmail json YAML

indent: do not output token in debug mode

When the parse stack is manipulated, the text of the token is not
relevant anymore and may even be confusing, for example when parsing
if_expr, the token may contain "}".

(rillig)

2021-10-25 20:16:16 UTC MAIN commitmail json YAML

tests/indent: clean up test for lbrace

After splitting token_type into separate types, want_blank_before_lparen
cannot depend on a parser_symbol anymore.

(rillig)

2021-10-25 19:56:03 UTC MAIN commitmail json YAML

indent: rename search_brace to search_stmt

No functional change.

(rillig)

2021-10-25 18:17:05 UTC netbsd-8 commitmail json YAML

2021-10-25 18:16:07 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by ryo in ticket #1704):

sys/net/if_ethersubr.c: revision 1.302

frame's vlan tag must be ntohs()'ed.

VLAN 0 Priority tag was misrecognized on non vlan-hwtagging interfaces.

(martin)

2021-10-25 18:11:55 UTC netbsd-9 commitmail json YAML

2021-10-25 18:11:02 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by ryo in ticket #1369):

sys/net/if_ethersubr.c: revision 1.302

frame's vlan tag must be ntohs()'ed.

VLAN 0 Priority tag was misrecognized on non vlan-hwtagging interfaces.

(martin)

2021-10-25 17:05:43 UTC MAIN commitmail json YAML

frame's vlan tag must be ntohs()'ed.
VLAN 0 Priority tag was misrecognized on non vlan-hwtagging interfaces.

(ryo)

2021-10-25 15:50:37 UTC netbsd-8 commitmail json YAML

2021-10-25 15:49:49 UTC netbsd-8 commitmail json YAML

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

sys/conf/files: revision 1.1288
sys/kern/uipc_mbuf.c: revision 1.244
share/man/man4/options.4: revision 1.520

Fix a bug that NMBCLUSTERS(kern.mbuf.nmbclusters) can't be changed by sysctl.

Update the description of the NMBCLUSTERS. Add NMBCLUSTERS_MAX.

defparam NMBCLUSTERS_MAX.

(martin)

2021-10-25 15:48:43 UTC netbsd-9 commitmail json YAML

2021-10-25 15:47:50 UTC netbsd-9 commitmail json YAML

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

sys/conf/files: revision 1.1288
sys/kern/uipc_mbuf.c: revision 1.244
share/man/man4/options.4: revision 1.520

Fix a bug that NMBCLUSTERS(kern.mbuf.nmbclusters) can't be changed by sysctl.

Update the description of the NMBCLUSTERS. Add NMBCLUSTERS_MAX.

defparam NMBCLUSTERS_MAX.

(martin)

2021-10-25 07:54:44 UTC MAIN commitmail json YAML

In some arch, _mcount() would be called recursively when built with COPTS=-O0.

Normally, functions called from mcount.c are expected to be expanded inline,
so _mcount() will never be called recursively. But when build with COPTS=-O0,
`static inline' functions aren't inlined, and _mcount() will be called
recursively.

Even if _mcount() has `__attribute__((__no_ instrument_function__))',
it has no effect on the calling external (no-inlined) function.

To avoid this, PROF.<fn> is added can be set the profiling flag of any file.
"PROF.mcount.c" is set to blank by default, mcount.c itself is compiled
without -pg.

(ryo)

2021-10-25 07:45:01 UTC MAIN commitmail json YAML

fix "error: stack usage might be unbounded [-Werror=stack-usage=]" with COPTS=-O0

(ryo)

2021-10-25 07:43:48 UTC MAIN commitmail json YAML

2021-10-25 07:41:41 UTC MAIN commitmail json YAML

For "num_critical_sections", now output not only the "static const int" variable but also macro definition.

(ryo)

2021-10-25 07:40:30 UTC MAIN commitmail json YAML

2021-10-25 06:25:19 UTC MAIN commitmail json YAML

Fix for PR lib/47398

Move cursor to end of the currently active field and sync the cursor
location so the cursor get positioned correctly when the form window
is refreshed.

(blymn)

2021-10-25 02:10:56 UTC MAIN commitmail json YAML

kpreempt_disable() before sppp_get_{ip,ip6}_addrs() are unnecessary now.

(knakahara)

2021-10-25 02:06:29 UTC MAIN commitmail json YAML

Fix missing curlwp_bind() for ifa_release(), ok'ed by yamaguchi@n.o.

This causes the following KASSERT failure in pppoe server.
    - sppp_rcr_event()
      - sppp_ipcp_confreq()
        - sppp_get_ip_addrs()
          - psref_release()

After if_spppsubr.c:1.227, sppp_ipcp_confreq() is done in workqueue
instead of softint.

(knakahara)

2021-10-25 01:06:13 UTC MAIN commitmail json YAML

indent: rename local variable sp_sw to spaced_expr

The 'sp' probably meant 'space-enclosed'; no idea what 'sw' was meant to
mean. Maybe 'switch', but that would have been rather ambiguous when
talking about control flow statements.

No functional change.

(rillig)

2021-10-25 00:54:37 UTC MAIN commitmail json YAML

indent: split type token_type into 3 separate types

Previously, token_type was used for 3 different purposes:

1. symbol types from the lexer
2. symbol types on the parser stack
3. kind of control statement for 'if (expr)' and similar statements

Splitting the 41 constants into separate types makes it immediately
clear that the parser stack never handles comments, preprocessing lines,
newlines, form feeds, the inner structure of expressions.

Previously, the constant switch_expr was especially confusing since it
was used for 3 different purposes: when returned from lexi, it
represented the keyword 'switch', in the parser stack it represented
'switch (expr)', and it was used for a statement head as well.

The only overlap between the lexer symbols and the parser symbols are
'{' and '}', and the keywords 'do' and 'else'. To increase confusion,
the constants of the previous token_type were in apparently random
order and before 2021, they had cryptic, highly abbreviated names.

No functional change.

(rillig)

2021-10-24 22:44:13 UTC MAIN commitmail json YAML

2021-10-24 22:38:20 UTC MAIN commitmail json YAML

indent: split kw_for_or_if_or_while into separate constants

No functional change.

(rillig)

2021-10-24 22:28:06 UTC MAIN commitmail json YAML

indent: split kw_do_or_else into separate constants

It was unnecessarily confusing to have the token types keyword_do_else,
keyword_do and keyword_else at the same time, without any hint in what
they differed.

Some of the token types seem to be used by the lexer while others are
used in the parse stack. Maybe all token types can be partitioned into
these groups, which would suggest to use two different types for them.
And if not, it's still clearer to have this distinction in the names of
the constants.

No functional change.

(rillig)

2021-10-24 21:55:07 UTC MAIN commitmail json YAML

tests/indent: document how empty lines in box comments are handled

(rillig)

2021-10-24 21:48:16 UTC MAIN commitmail json YAML

tests/indent: test form feed in comments

(rillig)

2021-10-24 20:57:11 UTC MAIN commitmail json YAML

indent: rename seen_quest to quest_level

The new name aligns with other similar variables like ind_level,
case_ind_level and ifdef_level. The old name 'seen' is mainly used for
bool variables.

No functional change.

(rillig)

2021-10-24 20:47:00 UTC MAIN commitmail json YAML

indent: define lexi_end as function instead of macro

(rillig)

2021-10-24 20:43:28 UTC MAIN commitmail json YAML

indent: fix indentation of ad-hoc tagged variables

Seen among others in usr.bin/indent/lexi.c, variable 'keywords'.

(rillig)

2021-10-24 20:00:12 UTC MAIN commitmail json YAML

2021-10-24 19:33:26 UTC MAIN commitmail json YAML

indent: initialize variables in main_loop in declaration

No functional change.

(rillig)

2021-10-24 19:24:22 UTC MAIN commitmail json YAML

tests/indent: demonstrate wrong indentation for initialized variable

(rillig)

2021-10-24 19:14:33 UTC MAIN commitmail json YAML

indent: run indent on its own source code

With manual corrections afterwards. Indent still does not get
extra_expr_indent correctly, it also indents global variables after
tagged declarations too deep.

No functional change.

(rillig)

2021-10-24 18:45:46 UTC MAIN commitmail json YAML

Do not ignore write failures.

We should not ignore failure to write to cmdFILE,
meta files and filemon.

Reviewed by: rillig

(sjg)

2021-10-24 17:51:19 UTC MAIN commitmail json YAML

tests/indent: add more tests for option '-di'

(rillig)

2021-10-24 17:46:06 UTC MAIN commitmail json YAML

bpf.4: amend caveat about what types of links can be written to

Try to be clearer about what's supported. A peripheral issue noted in
PR pkg/55446.

(gutteridge)

2021-10-24 17:30:19 UTC MAIN commitmail json YAML

setlocale.3: minor updates to reflect the current implementation

Reflect a couple of amendments noted by John Marino on tech-userlevel:
http://mail-index.netbsd.org/tech-userlevel/2021/10/19/msg013091.html

(gutteridge)

2021-10-24 17:19:49 UTC MAIN commitmail json YAML

indent: clean up format of warnings and errors

Previously, warnings and errors had the form of C block comments. Before
NetBSD io.c 1.20 from 2019-10-19, this format made sense because the
diagnostics could end up in the same output stream as the formatted
output.

Since NetBSD io.c 1.20 from 2019-10-19, all diagnostics are redirected
to stderr. This change was not mentioned in the commit message back
then, it makes sense nevertheless. Since stdout and stderr now are
properly separated, there is no need anymore to keep the weird format
for warnings and errors. Switch to the standard 'error: file:line'
format.

Move the function 'diag' to indent.c to have access to the name of the
current input file.

(rillig)

2021-10-24 16:51:44 UTC MAIN commitmail json YAML

indent: fix line number counting at beginning of function body

(rillig)

2021-10-24 16:46:12 UTC MAIN commitmail json YAML

indent/tests: demonstrate wrong line number counting

(rillig)

2021-10-24 16:38:00 UTC MAIN commitmail json YAML

tests/indent: document actually reachable token combinations with '('

(rillig)

2021-10-24 15:44:13 UTC MAIN commitmail json YAML

tests/indent: test want_blank_before_lparen

(rillig)

2021-10-24 11:58:23 UTC MAIN commitmail json YAML

More SPCR cleanup:

- For 16550 style UARTs, always honour GAS if BitWidth != 0
- Use BitWidth instead of AccessWidth to determine register stride
- For baud rate ID of 0, assume 115200 until we have a way of probing
  the baud rate configured by firmware.

(jmcneill)

2021-10-24 11:42:58 UTC MAIN commitmail json YAML

tests/indent: test interaction between -pcs and -bs

(rillig)

2021-10-24 11:31:37 UTC MAIN commitmail json YAML

tests/indent: add test for sizeof and offsetof with -pcs

(rillig)

2021-10-24 11:19:25 UTC MAIN commitmail json YAML

2021-10-24 11:17:05 UTC MAIN commitmail json YAML

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

indent: clean up comments

(rillig)

2021-10-24 10:54:12 UTC MAIN commitmail json YAML

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

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

Pull up following revision(s) (requested by lukem in ticket #1367):

usr.bin/ftp/ftp.c: revision 1.174

ftp: remove unnecessary variable assignments

Remove assignment to error in initconn(); it's not tested anywhere after the
initial use, so no need to set it before goto bad.
(Looks like copypasta from the initial addition of the code in rev 1.48.)

(martin)

2021-10-24 10:16:05 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by lukem in ticket #1366):

usr.bin/ftp/ftp.c: revision 1.173

ftp: validate address from PASV and LPSV response

Fail if the server's response to PASV or LPSV contains an IP address
that doesn't match that of the control connection.
(EPSV already only uses the port portion of the server's response,
per RFC 2428).

Previously a hostile server could cause ftp to open a data connection elsewhere.
Many other ftp implementations have had a similar change for many years,
including those in popular browsers (before they deprecated FTP ...)

Thanks to Simon Josefsson notifying me about
  https://lists.gnu.org/archive/html/bug-inetutils/2021-06/msg00002.html

(martin)

2021-10-24 10:13:40 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by lukem in ticket #1365):

usr.bin/ftp/fetch.c: revision 1.233

Use raw write(2) instead of fwrite(3) to avoid stream corruption because
of the progress bar interrupts. From RVP.

(martin)

2021-10-24 06:52:26 UTC MAIN commitmail json YAML

Trailing whitespace

(skrll)

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

2021-10-23 20:40:23 UTC MAIN commitmail json YAML

xhci: Always read/write both halves of 64-bit registers

Access the 64-bit registers in their entirety at all times, independent
of the AC64 parameter of the hardware implementation.

Makes xhci(4) work on SolidRun MACCHIATObin (Marvell 8040 SoC)

(jakllsch)

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

tests/indent: prevent non-comment text to be ignored in the tests

(rillig)

2021-10-23 20:30:23 UTC MAIN commitmail json YAML

2021-10-23 20:23:27 UTC MAIN commitmail json YAML

2021-10-23 20:17:08 UTC MAIN commitmail json YAML

2021-10-23 20:07:03 UTC MAIN commitmail json YAML

tests/indent: remove redundant test list_head

The test cases are already in fmt_decl.c, in old_style_definition and
LIST_HEAD.

(rillig)

2021-10-23 20:01:14 UTC MAIN commitmail json YAML

2021-10-23 18:46:26 UTC MAIN commitmail json YAML

Fix a regression introduced in kern_event.c,v 1.129 that would cause
"udata" to get clobbered on ONESHOT events, and add a unit test for it.
Reported by martin@ (manifested in his case as a KASSERT() firing when
running unit tests in COMPAT_NETBSD32).

(thorpej)

2021-10-23 17:46:26 UTC MAIN commitmail json YAML

Poll only if we don't have an IRQ resource.

(jmcneill)

2021-10-23 17:45:55 UTC MAIN commitmail json YAML

It seems that there are three 16550 types for SPCR:

- 0x0000: Fully 16550-compatible (1-byte I/O)
- 0x0001: 16550 subset compatible with DBGP Revision 1 (4-byte MMIO)
- 0x0012: 16550-compatible with parameters defined in GAS

So assume reg_width for types 0 and 1, and only look at GAS for type 12h.

(jmcneill)

2021-10-23 17:43:08 UTC MAIN commitmail json YAML

After converting msdosfs_rename() to use genfs_sane_rename() the
MSDOS tests should pass.

Tested on QEMU/nvmm archs i386 and amd64.

Should resolve PR kern/43626 (directory renaming more than a little racy)

(hannken)

2021-10-23 16:58:17 UTC MAIN commitmail json YAML

2021-10-23 15:20:26 UTC MAIN commitmail json YAML

The device path passed to EFI_BOOT_SERVICES.LocateDevicePath() may be
modified and the resulting device path may not be aligned in such a way
that the PathName string is not 16-bit aligned.

Fix OpenSimpleFileRead to make a copy of the device path to ensure
alignment before attempting to open a file. Idea from Tianocore's EFI
shell Library/FileIO.c LibOpenFile().

(jmcneill)

2021-10-23 11:53:10 UTC netbsd-8 commitmail json YAML

2021-10-23 11:49:22 UTC netbsd-8 commitmail json YAML

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

share/man/man4/wm.4 1.42
sys/dev/pci/files.pci 1.434
sys/dev/pci/if_wm.c 1.686-1.687,1.692-1.693,
1.697,1.699-1.703,
1.706-1.715 via patch
sys/dev/pci/if_wmvar.h 1.46

- Add missing drain for pcq in wm_stop_locked().
- Add support for I219V 15-19 and I219LM 16-19.
- Fix Tx stall.
- Use wm_flush_desc_rings() workaround more on I219.
- Change DMA physical address in wm_flush_desc_rings() to match other
  OSes.
- Check return value correctly in wm_lv_jumbo_workaround_ich8lan().
- Add new sysctl hw.wmN.debug_flags. This sysctl can be used if
  WM_DEBUG is set.
- Add some sysctl values for debugging TX/RX queues.
- WM_EVENT_COUNTER is enabled by default on 64 bit architectures.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxq->rxq_ptr updating.
- Stop legacy interrupts before calling softint.
- Disable printf()s in wm_flush_desc_rings() because the code is
  verified.
- Print I219's version number.
- Uniform INTx/MSI handler's Tx/Rx behavior to MSI-X's one.
- Fix return value of interrupt handler.
- Only print an error about missing I/O BARs for chips that need it.
- Do not return a void value from a void function.
- Add new flag named WM_F_CRC_STRIP and use it. No functional change.
- Whitespace fixes. Fix comments. No functional change.

(martin)

2021-10-23 11:32:06 UTC netbsd-8 commitmail json YAML

Regen for ticket #1700:

- Add modern QUMRANET/Red Hat VIRTIO range PCI devices.
- Add some more product IDs for mcx(4).
- Add current generation NVIDIA graphics cards (3050-3090 etc.).
- Add RDC R6022 PCI-Host bridge.
- Add a whole bunch of radeon devices.
- Add Realtek RTL8821CE.
- Add Intel 660p SSD, and expand the 760p description.
- Add Intel I219's version number.
- Add Intel I219V 15-19 and I219LM 16-19.
- Add Intel I225V, I225LM and WiFi 6 AX201.
- Add newer Intel PCH internal devices.
- Add Intel Jasper Lake devices.
- PDC20265 is Ultra/100, not 66.
- Fix Realtek RTL8125 description.
- Sort Cavium devices.

(martin)

2021-10-23 11:27:26 UTC netbsd-8 commitmail json YAML

Pull up the following (via patch), requested by msaitoh in ticket #1700:

sys/dev/pci/pcidevs 1.1420-1.1440

- Add modern QUMRANET/Red Hat VIRTIO range PCI devices.
- Add some more product IDs for mcx(4).
- Add current generation NVIDIA graphics cards (3050-3090 etc.).
- Add RDC R6022 PCI-Host bridge.
- Add a whole bunch of radeon devices.
- Add Realtek RTL8821CE.
- Add Intel 660p SSD, and expand the 760p description.
- Add Intel I219's version number.
- Add Intel I219V 15-19 and I219LM 16-19.
- Add Intel I225V, I225LM and WiFi 6 AX201.
- Add newer Intel PCH internal devices.
- Add Intel Jasper Lake devices.
- PDC20265 is Ultra/100, not 66.
- Fix Realtek RTL8125 description.
- Sort Cavium devices.

(martin)

2021-10-23 11:23:05 UTC netbsd-9 commitmail json YAML

2021-10-23 11:21:55 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by jnemeth in ticket #1364):

sys/dev/usb/if_urtwn.c: revision 1.101

add Edimax N150 adapter; tested on my PBP

(martin)

2021-10-23 11:21:30 UTC netbsd-9 commitmail json YAML

2021-10-23 11:17:44 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by jnemeth in ticket #1364):

sys/dev/usb/usbdevs: revision 1.798

add Edimax N150 adapter; tested on my PBP

(martin)

2021-10-23 07:45:03 UTC MAIN commitmail json YAML

Convert msdosfs_rename() to use genfs_sane_rename().

Based on work by Taylor R Campbell.

(hannken)

2021-10-23 07:41:38 UTC MAIN commitmail json YAML

2021-10-23 07:38:33 UTC MAIN commitmail json YAML

2021-10-23 06:49:46 UTC MAIN commitmail json YAML

2021-10-23 06:48:31 UTC MAIN commitmail json YAML

Shrink a panic message to avoid a long line

(skrll)

2021-10-23 05:42:49 UTC MAIN commitmail json YAML

Remove unnecessary brackets in a conditional

(skrll)

2021-10-23 05:32:40 UTC MAIN commitmail json YAML

2021-10-23 05:31:53 UTC MAIN commitmail json YAML

2021-10-23 01:28:34 UTC MAIN commitmail json YAML

Add support for the EVFILT_EMPTY filter, which is activated when the
write buffer associated with the file descriptor is empty.  This is
currently implemented only for sockets, and is intended primarily to
provide visibility to applications that all previously written data
has been acknowledged by the TCP layer on the receiver.  Compatible
with the same filter in FreeBSD.

(thorpej)

2021-10-22 22:31:55 UTC MAIN commitmail json YAML

tests/indent: fix file list

(rillig)

2021-10-22 21:06:21 UTC MAIN commitmail json YAML

tests/indent: fix file list

lex.c got renamed to lex_ident.c.

(rillig)

2021-10-22 21:03:50 UTC MAIN commitmail json YAML

2021-10-22 21:03:01 UTC MAIN commitmail json YAML

tzdata2021e update, zoneinfo Pacific/Enderbury renamed to Pacific/Kanton
(old name retained) - so add new zone file for Pacific/Kanton

(kre)

2021-10-22 21:01:07 UTC MAIN commitmail json YAML

Update to tzdata2021e (with much of 2020b still omitted)
This includes 2021c (no changes) 2021d (Fiji change) 2021e (Palestine)

Fiji has cancelled summer time changes for 2021/2 summer.  Currently
assume it will be back in 2022/3.

Palestine ends summer time October 29 01:00 (rather than Oct 30).

Pacific/Enderbury is renamed to Pacific/Kanton and updated for
historic data (Pacific/Enderbury retained as a link for compat).

Historic timestamp fixes for Niue, Rarotonga, Tongatapu

(kre)

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

2021-10-22 19:46:41 UTC MAIN commitmail json YAML

2021-10-22 19:27:53 UTC MAIN commitmail json YAML

2021-10-22 19:22:43 UTC MAIN commitmail json YAML

2021-10-22 19:21:13 UTC MAIN commitmail json YAML

return 0 in mgx_ioctl()::FBIOG*
now Xorg can find us

(macallan)

2021-10-22 16:57:14 UTC MAIN commitmail json YAML

Fix build failure

* Fix merge mistake.
* Cast to int for strict comparison like before.

(ryoon)

2021-10-22 14:27:38 UTC MAIN commitmail json YAML

2021-10-22 14:26:04 UTC MAIN commitmail json YAML

Change to code and documentation from 2021a -> 2021e

Release 2021e - 2021-10-21 18:41:00 -0700

  Changes to code

    none

Release 2021d - 2021-10-15 13:48:18 -0700

  Changes to code

    'zic -r' now uses "-00" time zone abbreviations for intervals
    with UT offsets that are unspecified due to -r truncation.
    This implements a change in draft Internet RFC 8536bis.

Release 2021c - 2021-10-01 14:21:49 -0700

  Changes to code

    Fix a bug in 'zic -b fat' that caused old timestamps to be
    mishandled in 32-bit-only readers (problem reported by Daniel
    Fischer).

  Changes to documentation

    Distribute the SECURITY file (problem reported by Andreas Radke).

Release 2021b - 2021-09-24 16:23:00 -0700

  Changes to maintenance procedure

    The new file SECURITY covers how to report security-related bugs.

    Several backward-compatibility links have been moved to the
    'backward' file.  These links, which range from Africa/Addis_Ababa
    to Pacific/Saipan, are only for compatibility with now-obsolete
    guidelines suggesting an entry for every ISO 3166 code.
    The intercontinental convenience links Asia/Istanbul and
    Europe/Nicosia have also been moved to 'backward'.

  Changes to code

    zic now creates each output file or link atomically,
    possibly by creating a temporary file and then renaming it.
    This avoids races where a TZ setting would temporarily stop
    working while zic was installing a replacement file or link.

    zic -L no longer omits the POSIX TZ string in its output.
    Starting with 2020a, zic -L truncated its output according to the
    "Expires" directive or "#expires" comment in the leapseconds file.
    The resulting TZif files omitted daylight saving transitions after
    the leap second table expired, which led to far less-accurate
    predictions of times after the expiry.  Although future timestamps
    cannot be converted accurately in the presence of leap seconds, it
    is more accurate to convert near-future timestamps with a few
    seconds error than with an hour error, so zic -L no longer
    truncates output in this way.

    Instead, when zic -L is given the "Expires" directive, it now
    outputs the expiration by appending a no-change entry to the leap
    second table.  Although this should work well with most TZif
    readers, it does not conform to Internet RFC 8536 and some pickier
    clients (including tzdb 2017c through 2021a) reject it, so
    "Expires" directives are currently disabled by default.  To enable
    them, set the EXPIRES_LINE Makefile variable.  If a TZif file uses
    this new feature it is marked with a new TZif version number 4,
    a format intended to be documented in a successor to RFC 8536.

    zic -L LEAPFILE -r @LO no longer generates an invalid TZif file
    that omits leap second information for the range LO..B when LO
    falls between two leap seconds A and B.  Instead, it generates a
    TZif version 4 file that represents the previously-missing
    information.

    The TZif reader now allows the leap second table to begin with a
    correction other than -1 or +1, and to contain adjacent
    transitions with equal corrections.  This supports TZif version 4.

    The TZif reader now lets leap seconds occur less than 28 days
    apart.  This supports possible future TZif extensions.

    Fix bug that caused 'localtime' etc. to crash when TZ was
    set to a all-year DST string like "EST5EDT4,0/0,J365/25" that does
    not conform to POSIX but does conform to Internet RFC 8536.

    Fix another bug that caused 'localtime' etc. to crash when TZ was
    set to a POSIX-conforming but unusual TZ string like
    "EST5EDT4,0/0,J365/0", where almost all the year is DST.

    Fix yet another bug that caused 'localtime' etc. to mishandle slim
    TZif files containing leap seconds after the last explicit
    transition in the table, or when handling far-future timestamps
    in slim TZif files lacking leap seconds.

    Fix localtime misbehavior involving positive leap seconds.
    This change affects only behavior for "right" system time,
    which contains leap seconds, and only if the UT offset is
    not a multiple of 60 seconds when a positive leap second occurs.
    (No such timezone exists in tzdb, luckily.)  Without the fix,
    the timestamp was ambiguous during a positive leap second.
    With the fix, any seconds occurring after a positive leap second
    and within the same localtime minute are counted through 60, not
    through 59; their UT offset (tm_gmtoff) is the same as before.
    Here is how the fix affects timestamps in a timezone with UT
    offset +01:23:45 (5025 seconds) and with a positive leap second at
    1972-06-30 23:59:60 UTC (78796800):

time_t    without the fix      with the fix
78796800  1972-07-01 01:23:45  1972-07-01 01:23:45 (leap second)
78796801  1972-07-01 01:23:45  1972-07-01 01:23:46
...
78796815  1972-07-01 01:23:59  1972-07-01 01:23:60
78796816  1972-07-01 01:24:00  1972-07-01 01:24:00

    Fix an unlikely bug that caused 'localtime' etc. to misbehave if
    civil time changes a few seconds before time_t wraps around, when
    leap seconds are enabled.

    Fix bug in zic -r; in some cases, the dummy time type after the
    last time transition disagreed with the TZ string, contrary to
    Internet RFC 8563 section 3.3.

    Fix a bug with 'zic -r @X' when X is a negative leap second that
    has a nonnegative correction.  Without the fix, the output file
    was truncated so that X appeared to be a positive leap second.
    Fix a similar, even-less-likely bug when truncating at a positive
    leap second that has a nonpositive correction.

    zic -r now reports an error if given rolling leap seconds, as this
    usage has never generally worked and is evidently unused.

    zic now generates a POSIX-conforming TZ string for TZif files
    where all-year DST is predicted for the indefinite future.
    For example, for all-year Eastern Daylight Time, zic now generates
    "XXX3EDT4,0/0,J365/23" where it previously generated
    "EST5EDT,0/0,J365/25" or "".  (Thanks to Michael Deckers for
    noting the possibility of POSIX conformance.)

    zic.c no longer requires sys/wait.h (thanks to spazmodius for
    noting it wasn't needed).

    When reading slim TZif files, zdump no longer mishandles leap
    seconds on the rare platforms where time_t counts leap seconds,
    fixing a bug introduced in 2014g.

    zdump -v now outputs timestamps at boundaries of what localtime
    and gmtime can represent, instead of the less-useful timestamps
    one day after the minimum and one day before the maximum.
    (Thanks to Arthur David Olson for prototype code, and to Manuela
    Friedrich for debugging help.)

    zdump's -c and -t options are now consistently inclusive for the
    lower time bound and exclusive for the upper.  Formerly they were
    inconsistent.  (Confusion noted by Martin Burnicki.)

  Changes to build procedure

    You can now compile with -DHAVE_MALLOC_ERRNO=0 to port to
    non-POSIX hosts where malloc doesn't set errno.
    (Problem reported by Jan Engelhardt.)

  Changes to documentation

    tzfile.5 better matches a draft successor to RFC 8536
    <https://datatracker.ietf.org/doc/draft-murchison-rfc8536bis/01/>.

(christos)

2021-10-22 13:53:20 UTC MAIN commitmail json YAML

In the "modify" test case, immediately after modifying the timer, validate
that its associated knote in the kernel has actually been deactivated.

(thorpej)

2021-10-22 13:32:28 UTC MAIN commitmail json YAML

Note update to dhcpcd-9.4.1

(roy)

2021-10-22 13:25:58 UTC MAIN commitmail json YAML

2021-10-22 13:23:20 UTC MAIN commitmail json YAML

2021-10-22 06:20:47 UTC MAIN commitmail json YAML

lagg: change hash logic to generate the same value
when pairs of source and destination are the same

(yamaguchi)

2021-10-22 04:49:24 UTC MAIN commitmail json YAML

Support modifying an existing timer without having to delete it first.
Semantics match FreeBSD.

(thorpej)

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

rename "setup_interrupts" to "alloc_interrupts"
in virtio_mmio and virtio_acpi

This should fix build failure on evbarm.

(yamaguchi)

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

Revert "Does not work" back to "Does no work". It wasn't a typo.

(andvar)

2021-10-21 20:57:06 UTC MAIN commitmail json YAML

2021-10-21 20:18:16 UTC MAIN commitmail json YAML

add Edimax N150 adapter; tested on my PBP

(jnemeth)

2021-10-21 20:17:57 UTC MAIN commitmail json YAML

2021-10-21 20:16:51 UTC MAIN commitmail json YAML

add Edimax N150 adapter; tested on my PBP

(jnemeth)

2021-10-21 17:02:38 UTC MAIN commitmail json YAML

Skip the lib/libc/sys/t_ptrace_waitid:syscall_signal_on_sce test case
with a reference to PR lib/55087.  Marking it as an expected failure
would be more appropriate, but that doesn't work for test cases that
fail by timing out.

(gson)

2021-10-21 14:34:00 UTC netbsd-9 commitmail json YAML

2021-10-21 14:30:10 UTC netbsd-9 commitmail json YAML

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

share/man/man4/wm.4 1.42
sys/dev/pci/files.pci 1.434
sys/dev/pci/if_wm.c 1.690,1.692-1.693,1.697-1.704,
1.706-1.715 via patch

- Add missing drain for pcq in wm_stop_locked().
- Add support for I219V 15-19 and I219LM 16-19.
- Fix Tx stall.
- Use wm_flush_desc_rings() workaround more on I219.
- Change DMA physical address in wm_flush_desc_rings() to match other
  OSes.
- Check return value correctly in wm_lv_jumbo_workaround_ich8lan().
- Add new sysctl hw.wmN.debug_flags. This sysctl can be used if
  WM_DEBUG is set.
- Add some sysctl values for debugging TX/RX queues.
- Use atomic_{load,store}_relaxed for evcnt 64 bit counter.
- WM_EVENT_COUNTER is enabled by default on 64 bit architectures.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxq->rxq_ptr updating.
- Stop legacy interrupts before calling softint.
- Disable printf()s in wm_flush_desc_rings() because the code is
  verified.
- Print I219's version number.
- Uniform INTx/MSI handler's Tx/Rx behavior to MSI-X's one.
- Fix return value of interrupt handler.
- Only print an error about missing I/O BARs for chips that need it.
- Do not return a void value from a void function.
- Fix comment.
- Whitespace fixes. No functional change.

(martin)

2021-10-21 14:24:46 UTC netbsd-9 commitmail json YAML

2021-10-21 14:22:56 UTC netbsd-9 commitmail json YAML

Pull up the following revisions (all via patch), requested by msaitoh
in ticket #1362:

sys/dev/pci/pcidevs 1.1419-1.1440

- Add newer ciss(4) devices.
- Add modern QUMRANET/Red Hat VIRTIO range PCI devices.
- Add some more product IDs for mcx(4).
- Add current generation NVIDIA graphics cards (3050-3090 etc.).
- Add RDC R6022 PCI-Host bridge.
- Add a whole bunch of radeon devices.
- Add Realtek RTL8821CE.
- Add Intel 660p SSD, and expand the 760p description.
- Add Intel I219's version number.
- Add Intel I219V 15-19 and I219LM 16-19.
- Add Intel I225V, I225LM and WiFi 6 AX201.
- Add newer Intel PCH internal devices.
- Add Intel Jasper Lake devices.
- PDC20265 is Ultra/100, not 66.
- Fix Realtek RTL8125 description.
- Sort Cavium devices.

(martin)

2021-10-21 13:21:55 UTC MAIN commitmail json YAML

2021-10-21 11:45:24 UTC MAIN commitmail json YAML

update (western) christian calendar for 2022, with a particular
focus on public holidays relevant to me

(nia)

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

s/optiona]/optional]/

(andvar)

2021-10-21 10:22:54 UTC MAIN commitmail json YAML

Restore 16-byte FIFO for ns16550a, accidentally lost in r1.344.

Spotted by msaitoh. Thanks!

(jmcneill)

2021-10-21 07:33:13 UTC MAIN commitmail json YAML

Bump date for previous.

(wiz)

2021-10-21 07:08:56 UTC MAIN commitmail json YAML

virtio: fix missing release of interrupt resources

(yamaguchi)

2021-10-21 07:03:26 UTC MAIN commitmail json YAML

2021-10-21 06:06:16 UTC MAIN commitmail json YAML

2021-10-21 05:37:43 UTC MAIN commitmail json YAML

virtio: reconfigure MSI-X vector on re-initialization

This may fix a problem that some interrupts, for example
link-state change of vioif(4) are not notified.

(yamaguchi)

2021-10-21 05:32:27 UTC MAIN commitmail json YAML

divide setup routine of virtio interrupts
into establishment and device configuration

(yamaguchi)

2021-10-21 04:51:11 UTC MAIN commitmail json YAML

Add documentation for the button_region_movement_enable variable.

(blymn)

2021-10-21 04:49:28 UTC MAIN commitmail json YAML

Significant update to the synaptics touchpad driver.

* Accumulate packets for primary, secondary, finger count packets
  before handing off to pms_synaptics_process_packet.  This means
  that both primary and, possibly, secondary finger locations will
  be processed at the same time.  Previously the processing each
  packet as it arrived.

* Fix the secondary finger position reporting, there was an off by
  one in the shifts when decoding which effectively halved the
  reported position.

* For a clickpad, make the emulated button region "dead" so that finger
  movements in this region are ignored.  This makes it easier to click
  a button without accidentally repositioning the cursor.  There is a
  sysctl variable "button_region_movement_enable" that will allow
  these finger movements to be reported if this is desirable.

* Reset the finger ballistics when the number of fingers changes.  This
  stops the annoying position jumps when a second finger touch is added
  to or removed from the touchpad.

* Add a level argument to the DPRINTF macro so one can choose their
  level of debug spam via the debug sysctl variable.

(blymn)

2021-10-21 04:47:57 UTC MAIN commitmail json YAML

Fix some conditionals to match gicv3 and add some comments to describe
what's going on.

Fixes PR port-evbarm/56420

(skrll)

2021-10-21 02:47:17 UTC MAIN commitmail json YAML

doc: pktq_rps_hash() changes.

(knakahara)

2021-10-21 02:34:04 UTC MAIN commitmail json YAML

Allow the f_touch() filter op to return an error, specifically in
the EVENT_REGISTER case.

(thorpej)

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

Re-factor the code that computes the EVFILT_TIMER value into its own
function.

NFC.

(thorpej)

2021-10-21 00:56:52 UTC MAIN commitmail json YAML

acpi: com: Honour the reg-shift property

(jmcneill)

2021-10-21 00:54:15 UTC MAIN commitmail json YAML

- Don't use a separate kqueue_timer_lock; just protect those knotes
  with the kq->kq_lock.
- Re-factor the guts of knote_activate() into knote_activate_locked(),
  and use it in a few places to avoid a few unlock-the-immediately-lock
  cycles.
- Define a FILT_TIMER_NOSCHED macro, rather than hard-coding (uintptr_t)-1
  in a bunch of difference place.

NFC.

(thorpej)

2021-10-21 00:09:28 UTC MAIN commitmail json YAML

2021-10-20 23:45:09 UTC MAIN commitmail json YAML

main: add .gz extension to .img references for consistency

(gutteridge)

2021-10-20 23:30:30 UTC MAIN commitmail json YAML

main: add note about amd64 now having a "bios" image, too

(gutteridge)

2021-10-20 23:23:59 UTC MAIN commitmail json YAML

main: simplify conditional markup

(gutteridge)

2021-10-20 23:03:40 UTC MAIN commitmail json YAML

SPCR_BAUD_DEFAULT maps better to -1 than 0

Suggested by jmcneill@

(jakllsch)

2021-10-20 20:29:33 UTC MAIN commitmail json YAML

crypt.3: add a reference for Argon2

(nia)

2021-10-20 20:21:44 UTC MAIN commitmail json YAML

Be a little bit more eager to let Argon2 use memory.

(nia)

2021-10-20 17:52:44 UTC MAIN commitmail json YAML

- fix clang compilation: add "%s" to format string
- comma is followed by space
- KNF multi-line comments
- fold long lines
- early returns, fixes a missed iic_release_bus() on error.
- foo == false -> !foo

(christos)

2021-10-20 17:30:29 UTC MAIN commitmail json YAML

Update remarks on default parameters for Argon2.

(nia)

2021-10-20 16:46:34 UTC MAIN commitmail json YAML

crypt(3): For argon2, default to time=3.

Good enough for a 50MHz SPARC, a shark, and the spec.

(nia)

2021-10-20 15:35:42 UTC MAIN commitmail json YAML

crypt(3): return 0 -> return NULL for function returning char *

(nia)

2021-10-20 14:33:14 UTC MAIN commitmail json YAML

2021-10-20 14:28:21 UTC MAIN commitmail json YAML

Move a mis-placed KASSERT().

(thorpej)

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

Don't use genfs_rename_knote() in the "rename foo over hard-link to itself"
case, which simply results in removing the "from" name; there are assertions
in genfs_rename_knote() that are too strong for that case.

PR kern/56460

(thorpej)

2021-10-20 13:03:29 UTC MAIN commitmail json YAML

crypt(3): Adapt default Argon2 parameters to system performance

If the parameters are unspecified:

- Set the default memory consumption based on the amount of memory
available to userspace.

The algorithm actually slows down incredibly quickly as the "memory"
parameter is increased. We want to avoid running out of memory on low
memory systems, but increase the difficulty of bruteforcing passwords
from systems with a lot of memory. At the same time, we want to avoid
problems when concurrent logins are happening.

- Run a hashing loop for one second with steadily increasing "time"
until we settle on a value for "time". We want to use as much CPU time
as reasonable for computing the password hash without making logins
inconvenient.

(nia)

2021-10-20 08:10:27 UTC MAIN commitmail json YAML

Use wm_flush_desc_rings() more.

- Use wm_flush_desc_rings() for newer than PCH_SPT, too. Same as other OSes.
  It seems that some devices has no this errata, but we don't know how to
  identify it. So just use >= PCH_SPT.
- Use wm_flush_desc_rings() before chip reset in wm_resume(), too.

(msaitoh)

2021-10-20 08:06:45 UTC MAIN commitmail json YAML

Disable printf()s in wm_flush_desc_rings() because the code is verified.

The problem was very rare, so I added those printf()s as we can see.
Last week, knakahara and I found a procedure to reproduce the problem and
verified it worked correctly.

To reproduce the problem:

0) Use I219 V1 to V5. Not all of them have the problem and newer than V5 may
    have the problem. I used V2 for the test.
1) Define WM_DEBUG or add printf in wm_flush_desc_rings() to see
    DESCRING_STATUS_FLUSH_REQ bit.
2) Run "iperf -s" on the DUT.
3) Run "iperf3 -R -u -c 192.168.1.110 -w 8m -b 1g" repeatedly on another
    machine. Note that kern.sbmax should be increased on both machines.
4) run
while true; do
ifconfig wm0 down up
sleep 30
done
5) After DESCRING_STATUS_FLUSH_REQ is set, without wm_flush_desc_rings(),
    TX stalls and reboot is required to recover from it.
    With wm_flush_desc_rings(), no device hang.
6) If you can't see the DESCRING_STATUS_FLUSH_REQ is set, change the media
    to 100BASE-T.

Note that if_wm.c rev. 1.710 originally written by chuq is required for the
test. Without the change, the device becomes unrecoverable state before
wm_flush_desc_rings() and the function doesn't recover from the problem.

(msaitoh)

2021-10-20 08:02:08 UTC MAIN commitmail json YAML

Change DMA physical address in wm_flush_desc_rings() to match other OSes.

- Even without this change, the workaround works with my machines.
- Add comment.

(msaitoh)

2021-10-20 07:04:28 UTC MAIN commitmail json YAML

Fix return value of interrupt handler, pointed out by msaitoh@n.o.

Even if stopping flag is set (and handler do nothing), the interrupt
itself should be assume to be processed when ICR is not zero.  If not,
interrupt count is not incremented correctly.

(knakahara)

2021-10-20 05:41:57 UTC MAIN commitmail json YAML

indent: add reminder to make the code understandable for humans

(rillig)

2021-10-20 05:37:21 UTC MAIN commitmail json YAML

indent: rename ps.last_u_d to match its comment

No functional change.

(rillig)

2021-10-20 05:26:46 UTC MAIN commitmail json YAML

indent: rename parser stack variables

No functional change.

(rillig)

2021-10-20 05:14:21 UTC MAIN commitmail json YAML

indent: rename blankline_requested variables

The words 'prefix' and 'postfix' sounded too much like horizontal
concepts, like in operators. The actual purpose of these variables is to
add blank lines before and after the current line, so use the same
wording as in the command line options.

No functional change.

(rillig)

2021-10-20 05:07:08 UTC MAIN commitmail json YAML

indent: invert condition in process_newline

It's hard to follow a condition that combines many negated terms with
'||'. Group the conditions by their origin.

The condition '!opt.break_after_comma && break_comma' still sounds like
a contradition, more investigations to follow.

No functional change.

(rillig)

2021-10-20 05:00:37 UTC MAIN commitmail json YAML

indent: rename next_blank_lines to blank_lines_to_output

The previous name was already an improvement over the name before that
(n_real_blanklines), but didn't express the intended purpose clearly
enough, so try another name.

No functional change.

(rillig)

2021-10-20 03:26:20 UTC MAIN commitmail json YAML

Oops, forgot to note the history of NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE,
and NOTE_READ.

(thorpej)

2021-10-20 03:13:14 UTC MAIN commitmail json YAML

Regen for:

Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.

(thorpej)

2021-10-20 03:09:45 UTC MAIN commitmail json YAML

Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.

(thorpej)

2021-10-20 03:08:19 UTC MAIN commitmail json YAML

Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.

(thorpej)

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

Uniform INTx/MSI handler's Tx/Rx behavior to MSI-X's one.

Because the difference has caused INTx/MSI own bugs.

(knakahara)

2021-10-20 02:05:15 UTC MAIN commitmail json YAML

Fix Tx stall, reported and implemented original patch by chs@n.o, thanks.

Check if_snd queue because if.c::if_transmit() doesn't call ifp->if_start()
when IFQ_ENQUEUE failed.

Reviewed and tested by chs@n.o and msaitoh@n.o.

(knakahara)

2021-10-20 01:09:49 UTC MAIN commitmail json YAML

- microtime -> microuptime
- avoid kpause with timeo=0

(jmcneill)

2021-10-19 21:39:19 UTC MAIN commitmail json YAML

indent: always keep next_blank_lines >= 0

No functional change.

(rillig)

2021-10-19 21:22:20 UTC MAIN commitmail json YAML

Fix for PR lib/47397

Fix a misinterpretation of the role of field fore and back.  Now field
pad is rendered in the back attribute always instead of only being used
for the non-current field.

(blymn)

2021-10-19 21:21:07 UTC MAIN commitmail json YAML

indent: use simpler code for copying the input buffer

In debug mode, this reduces the amount of debug output lines.

No functional change in default mode.

(rillig)

2021-10-19 20:41:42 UTC MAIN commitmail json YAML

tests/indent: move tests for indent comments

The special INDENT ON and INDENT OFF comments look like ordinary
comments but are handled in inbuf_read_line. Implementing this feature
in the input function has several unintended side effects regarding
indentation of these comments, as demonstrated by the tests.

(rillig)

2021-10-19 20:20:25 UTC MAIN commitmail json YAML

tests/indent: add test for INDENT OFF/ON comments

Just to prevent unintended side effects when fixing bugs in this area.

(rillig)

2021-10-19 20:01:09 UTC MAIN commitmail json YAML

netinet: Allow binding the unspecified address when no addresses exist

You should always be able to bind to the unspecified address even if
no addresses have been configured on any interface.

For example, a DHCP client could be started before the loopback interface
has been fully configured.

(roy)

2021-10-19 19:59:05 UTC MAIN commitmail json YAML

tests/indent: make add-test generate flexible tests

They need fewer source files and are more versatile.

(rillig)

2021-10-19 18:29:59 UTC MAIN commitmail json YAML

indent: if a file ends with indent off, don't add space-newline

(rillig)

2021-10-19 18:18:23 UTC MAIN commitmail json YAML

tests/indent: remove main code from test for token_comment

I had indented to use that code for completing the list of missing tests
but somehow forgot to remove it.

(rillig)

2021-10-19 15:59:26 UTC MAIN commitmail json YAML

Replace ${.OBJDIR} with <curdir> for consistent results.

If we replace ${.OBJDIR} with <objdir> some tests produce
different results depending on the value of .OBJDIR

For similar reasons eliminate .OBJDIR and .PATH from output of
varname-empty

Reviewed by: rillig

(sjg)

2021-10-19 10:56:08 UTC netbsd-9 commitmail json YAML

2021-10-19 10:55:15 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by oster in ticket #1361):

sys/dev/raidframe/rf_netbsd.h: revision 1.36 (via patch)
sys/dev/raidframe/rf_diskqueue.c: revision 1.58
sys/dev/raidframe/rf_diskqueue.c: revision 1.59

remove unnnecessary splbio() in rf_FreeDiskQueueData()

getiobuf() can return NULL if there are no IO buffers available.
RAIDframe can't deal with that, so create a dedicated pool of buffers
to use for IO.  PR_WAITOK is fine here, as we pre-allocate more than
we need to guarantee IO can make progress.  Tuning of pool still to
come.

(martin)

2021-10-19 08:02:42 UTC MAIN commitmail json YAML

lagg: reject a vlan interface that is not configured

The vlan I/F has no MAC address used in LACP.

(yamaguchi)

2021-10-19 07:57:15 UTC MAIN commitmail json YAML

added test cases for lagg(4) on l2tp(4)

(yamaguchi)

2021-10-19 07:52:33 UTC MAIN commitmail json YAML

lagg: support l2tp(4) aggregation

- Accept "ifconfig lagg* laggport l2tp*"
- Set promiscuous mode when the added interface is l2tp*
- check IFF_UP in addition to IFF_RUNNING on
  SIOCSIFFLAGS to a child interface.

(yamaguchi)

2021-10-19 07:40:53 UTC MAIN commitmail json YAML

lagg: clear I/G bitg and set G/L bit in a generated MAC address

(yamaguchi)

2021-10-19 06:41:03 UTC MAIN commitmail json YAML

2021-10-19 06:37:29 UTC MAIN commitmail json YAML

Fix for PR pkg/55931
Don't move the cursor when getch is called if input is not going to
be echoed.  Lynx uses the cursor to mark the current selection in a
pop-up, previously the cursor was being relocated when getch was called
which broke the Lynx item marking.

(blymn)

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

Revert previous:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/mips/mips/vm_machdep.c#rev1.163

> cpu_uarea_alloc: For ILP32, do not try to allocate physical memory above
> pmap_limits.avail_end.
>
> Fix NULL dereference in uvm_pglistalloc_contig_aggressive().

"high" argument larger than pmap_limits.avail_end is just legal for
uvm_pglistalloc(); uvm_pglistalloc_contig_aggressive() and friends
allocate memory between uvm_physseg_get_avail_start() and
uvm_physseg_get_avail_end().

It turned out that the NULL dereference took place as PHYS_TO_VM_PAGE()
aka uvm_phys_to_vm_page() returns NULL for a valid pa. I've not figured
out why...

Thanks chs@ for correcting my misunderstanding.

(rin)

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

2021-10-18 22:46:34 UTC MAIN commitmail json YAML

2021-10-18 22:30:35 UTC MAIN commitmail json YAML