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 (12m)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (177d) 

2024-05-09 20:07:01 UTC Now

2021-09-16 07:08:26 UTC MAIN commitmail json YAML

Use IXGBE_TXDCTL_WTHRESH_SHIFT macro. No functional change.

(msaitoh)

2021-09-16 02:53:28 UTC MAIN commitmail json YAML

Describe how to obtain debugging information from vchiq(4).

Ok nia@

(nat)

2021-09-15 20:21:48 UTC MAIN commitmail json YAML

Fix an ordering error in the previous (and even earlier, going back
a way, but made more serious with the recent changes).

The n>&n operation (more or less a no-op, except it clears CLOEXEC)
should precede almost everything else - and simply be made to fail if
an attempt is made to apply it to a sh internal fd.

We were renumbering the internal fd (the n> part considered first)
which was dumb, but OK, before, but now rejecting the operation
(the >&n) part when n should not be visible to the script.  That
made something of a mess (and could lead to the shell believing its
job control tty was at a fd it never got moved to).

Do things in the correct order, and simply fail that case for internal
fds (for every other n>xxx for any xxx sh simply renumbers its internal fd
n to some other fd before attempting the operation, even n>&- ... those are
all fine).

[In all the above the '>' is used in place of any redirect operator].

(kre)

2021-09-15 18:30:57 UTC MAIN commitmail json YAML

Have the ulimit command watch for ulimit -n (alter number of available fds)
and keep the rest of the shell aware of any changes.

While here, modify 'ulimit -aSH' to print both the soft and hard limits
for the resources, rather than just (in this case, as H comes last) the
hard limit.  In any other case when both S and H are present, and we're
examining a limit, use the soft limit (just as if neither were given).

No change for setting limits (both are set, unless exactly one of -H
or -S is given).  However, we now check for overflow when converting
the value to be assigned, rather than just truncating the value however
it happens to work out...

(kre)

2021-09-15 18:29:45 UTC MAIN commitmail json YAML

Improve the solution for the 2nd access to a fd which shouldn't
be available ("13") issue reported by Jan Schaumann on netbsd-users.

This fixes a bug in the earlier fix (a day or so ago) which could allow the
shell's idea of which fd range was in use by the script to get wildly
incorrect, but now also actually looks to see which fd's are in use as
renamed other user fd's during the lifetime of a redirection which needs
to be able to be undone (most redirections occur after a fork and are
permanent in the child process).  Attempting to access such a fd (as with
attempts to access a fd in use by the shell for its own purposes) is treated
as an attempt to access a closed fd (EBADF).  Attempting to reuse the fd
for some other purpose (which should be rare, even for scripts attempting
to cause problems, since the shell generally knows which fds the script
wants to use, and avoids them) will cause the renamed (renumbered) fd
to be renamed again (moved aside to some other available fd), just as
happens with the shell's private fds.

Also, when a generic fd is required, don't give up because of EMFILE
or similar unless there are no available fds at all (we might prefer >10
or bigger, but if there are none there, use anything).  This avoids
redirection errors when ulimit -n has been set small, and all the fds >10
that are available have been used, but we need somewhere to park the old
user of a fd while we reuse that fd for the redirection.

(kre)

2021-09-15 17:33:08 UTC MAIN commitmail json YAML

2021-09-15 17:26:07 UTC MAIN commitmail json YAML

Device call interface definition files for the "device" and "pci"
subsystems.

(thorpej)

2021-09-15 17:25:14 UTC MAIN commitmail json YAML

Add an awk program that reads in a device call interface description
file and emits a header file containing the argument and call binding
structures for those calls.

(thorpej)

2021-09-15 16:39:19 UTC netbsd-8 commitmail json YAML

2021-09-15 16:38:01 UTC netbsd-8 commitmail json YAML

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

sysdev/pci/ixgbe/ixgbe.c 1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch
sysdev/pci/ixgbe/ixgbe.h 1.73, 1.76-1.80 via patch
sysdev/pci/ixgbe/ix_txrx.c 1.68-1.93
sysdev/pci/ixgbe/ixv.c 1.153, 1.157-1.161, 1.163-1.166 via patch
sysdev/pci/ixgbe/if_bypass.c 1.7-1.9
sysdev/pci/ixgbe/if_fdir.c 1.4-1.5
sysdev/pci/ixgbe/if_sriov.c 1.10-1.11
sysdev/pci/ixgbe/ixgbe_82598.c 1.16
sysdev/pci/ixgbe/ixgbe_82599.c 1.23
sysdev/pci/ixgbe/ixgbe_api.c 1.25
sysdev/pci/ixgbe/ixgbe_bypass.h 1.2
sysdev/pci/ixgbe/ixgbe_common.c 1.30-1.33
sysdev/pci/ixgbe/ixgbe_dcb.c 1.10-1.11
sysdev/pci/ixgbe/ixgbe_dcb.h 1.7
sysdev/pci/ixgbe/ixgbe_dcb_82598.c 1.8-1.9
sysdev/pci/ixgbe/ixgbe_dcb_82598.h 1.7
sysdev/pci/ixgbe/ixgbe_dcb_82599.c 1.8-1.9
sysdev/pci/ixgbe/ixgbe_dcb_82599.h 1.7
sysdev/pci/ixgbe/ixgbe_fdir.h 1.3
sysdev/pci/ixgbe/ixgbe_features.h 1.3
sysdev/pci/ixgbe/ixgbe_mbx.c 1.12
sysdev/pci/ixgbe/ixgbe_netbsd.c 1.16-1.17
sysdev/pci/ixgbe/ixgbe_netbsd.h 1.13-1.14
sysdev/pci/ixgbe/ixgbe_netmap.c 1.3-1.4
sysdev/pci/ixgbe/ixgbe_netmap.h 1.2
sysdev/pci/ixgbe/ixgbe_osdep.c 1.7
sysdev/pci/ixgbe/ixgbe_osdep.h 1.29-1.30
sysdev/pci/ixgbe/ixgbe_phy.c 1.24
sysdev/pci/ixgbe/ixgbe_rss.h 1.5
sysdev/pci/ixgbe/ixgbe_sriov.h 1.4
sysdev/pci/ixgbe/ixgbe_type.h 1.49
sysdev/pci/ixgbe/ixgbe_vf.c 1.27
sysdev/pci/ixgbe/ixgbe_x540.c 1.18-1.19
sysdev/pci/ixgbe/ixgbe_x540.h 1.9
sysdev/pci/ixgbe/ixgbe_x550.c 1.19-1.20
sysdev/pci/ixgbe/ixgbe_x550.h 1.6
sysdev/pci/files.pci 1.438
share/man/man4/ixg.4 1.15
share/man/man4/ixv.4 1.8

- Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.
  Before this commit, resource shortage was easily occurred because
  the total number of the clusters is small.
- Improve performance:
  - Use m_adj(ETHER_ALIGN) more.
  - Sprinkle __predict_false() in the RX path.
  - Don't pre-allocate a cluster for RXCOPY case to improve short
    packet's performance.
- Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
  DMA buffer. Also, when the buffer is already freed, do not call
  bus_dmamap_unload(9) (no resource leaks with this change). This
  change is required to make ixg(4) work on alpha.
- Keep m_len and m_pkthdr.len consistent to prevent panic on arm.
- Fix panic when bus_dmamap_load_mbuf() failed in
  ixgbe_setup_receive_ring().
- Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability
  on aarch64.
- Use uint64_t instead of bus_addr_t for the TX descriptor's buffer
  address. At least, this change is required for macppc
  (sizeof(bus_addr_t) == 4) to make TX work.
- Fix little-endian dependence.
- Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
- Refresh unrefreshed descriptors' buffers correctly.
- Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent
  panic.
- Save the discard_multidesc state to not to forget the state by
  exiting rxeof().
- Add missing increment of no_mbuf error counter.
- Don't increment no_mbuf evcnt(9) when discarding multi-descriptor
  packet.
- ixv: Modify error message to sync with ixgbe.c
- Print the error value of ixgbe_reset_hw() for debugging.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxr->next_to_check updating.
- Add new sysctl "rx_copy_len".
- Add a new sysctl to read rxr->next_to_refresh.
- Print error number when error occurred.
- Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional
  change.
- Don't use fixed value.
- Comment out flow director processing in fast path.
- Add missing NetBSD RCS IDs and __KERNEL_RCSID()s.
- KNF.
- Fix typos.

(martin)

2021-09-15 16:34:29 UTC netbsd-8 commitmail json YAML

2021-09-15 16:32:30 UTC netbsd-9 commitmail json YAML

2021-09-15 16:30:51 UTC netbsd-9 commitmail json YAML

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

sys/dev/pci/ixgbe/ixgbe.c 1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.73, 1.76-1.80 via patch
sys/dev/pci/ixgbe/ix_txrx.c 1.68-1.93
sys/dev/pci/ixgbe/ixv.c 1.153, 1.157-1.161, 1.163-1.166 via patch
sys/dev/pci/ixgbe/if_bypass.c 1.7-1.9
sys/dev/pci/ixgbe/if_fdir.c 1.4-1.5
sys/dev/pci/ixgbe/if_sriov.c 1.10-1.11
sys/dev/pci/ixgbe/ixgbe_82598.c 1.16
sys/dev/pci/ixgbe/ixgbe_82599.c 1.23
sys/dev/pci/ixgbe/ixgbe_api.c 1.25
sys/dev/pci/ixgbe/ixgbe_bypass.h 1.2
sys/dev/pci/ixgbe/ixgbe_common.c 1.30-1.33
sys/dev/pci/ixgbe/ixgbe_dcb.c 1.10-1.11
sys/dev/pci/ixgbe/ixgbe_dcb.h 1.7
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.8-1.9
sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.7
sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.8-1.9
sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.7
sys/dev/pci/ixgbe/ixgbe_fdir.h 1.3
sys/dev/pci/ixgbe/ixgbe_features.h 1.3
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.12
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.13, 1.16-1.17
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.13-1.14
sys/dev/pci/ixgbe/ixgbe_netmap.c 1.3-1.4
sys/dev/pci/ixgbe/ixgbe_netmap.h 1.2
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.7
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.29-1.30
sys/dev/pci/ixgbe/ixgbe_phy.c 1.24
sys/dev/pci/ixgbe/ixgbe_rss.h 1.5
sys/dev/pci/ixgbe/ixgbe_sriov.h 1.4
sys/dev/pci/ixgbe/ixgbe_type.h 1.49
sys/dev/pci/ixgbe/ixgbe_vf.c 1.27
sys/dev/pci/ixgbe/ixgbe_x540.c 1.18-1.19
sys/dev/pci/ixgbe/ixgbe_x540.h 1.9
sys/dev/pci/ixgbe/ixgbe_x550.c 1.19-1.20
sys/dev/pci/ixgbe/ixgbe_x550.h 1.6
sys/dev/pci/files.pci 1.438
share/man/man4/ixg.4 1.15
share/man/man4/ixv.4 1.8

- Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.
  Before this commit, resource shortage was easily occurred because
  the total number of the clusters is small.
- Improve performance:
  - Use m_adj(ETHER_ALIGN) more.
  - Sprinkle __predict_false() in the RX path.
  - Don't pre-allocate a cluster for RXCOPY case to improve short
    packet's performance.
- Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
  DMA buffer. Also, when the buffer is already freed, do not call
  bus_dmamap_unload(9) (no resource leaks with this change). This
  change is required to make ixg(4) work on alpha.
- Keep m_len and m_pkthdr.len consistent to prevent panic on arm.
- Fix panic when bus_dmamap_load_mbuf() failed in
  ixgbe_setup_receive_ring().
- Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability
  on aarch64.
- Use uint64_t instead of bus_addr_t for the TX descriptor's buffer
  address. At least, this change is required for macppc
  (sizeof(bus_addr_t) == 4) to make TX work.
- Fix little-endian dependence.
- Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
- Refresh unrefreshed descriptors' buffers correctly.
- Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent
  panic.
- Save the discard_multidesc state to not to forget the state by
  exiting rxeof().
- Add missing increment of no_mbuf error counter.
- Don't increment no_mbuf evcnt(9) when discarding multi-descriptor
  packet.
- ixv: Modify error message to sync with ixgbe.c
- Print the error value of ixgbe_reset_hw() for debugging.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxr->next_to_check updating.
- Add new sysctl "rx_copy_len".
- Add a new sysctl to read rxr->next_to_refresh.
- Print error number when error occurred.
- Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional
  change.
- Don't use fixed value.
- Comment out flow director processing in fast path.
- Add missing NetBSD RCS IDs and __KERNEL_RCSID()s.
- KNF.
- Fix typos.

(martin)

2021-09-15 13:16:57 UTC MAIN commitmail json YAML

Don't assign v to newvar, so we can still access the original length.

(christos)

2021-09-15 11:03:25 UTC MAIN commitmail json YAML

For kernel mode address error, do not overwrite tf->tf_spc and tf->tf_r0
*before* checking pcb->pbc_onfault != NULL.

Should fix part of

PR port-sh3/56382
PR port-sh3/56401

i.e., DDB will no longer wrongly indicate NULL as fault PC for kernel mode
address error (and 0xe == EFAULT as r0).

Yes, we have another bugs that cause panics described in the two PRs, but
now we can examine them more easily :).

(rin)

2021-09-15 07:49:54 UTC MAIN commitmail json YAML

Use __SHIFTIN. Same code before and after.

(skrll)

2021-09-15 05:12:03 UTC netbsd-8 commitmail json YAML

2021-09-15 05:07:42 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by martin in ticket #1695):
build.sh: revision 1.348
build.sh: revision 1.349
build.sh: revision 1.350
build.sh: revision 1.351
build.sh: revision 1.352
build.sh: revision 1.356
ignore cvslatest errors in expert mode
Handle git and mercurial for reproducible builds.
for mercurial, use the latest revision instead of limiting the output to 1
(requested by joerg)
handle different flavors of date(1)
kre@ does not like the subshell :-)
Add a new operation "mkrepro-timestamp" to extract the timestamp a
build with -P would use. Example usage:
./build.sh -T /usr/tools -P mkrepro-timestamp
This allows us to extract this information once, make other use of it,
and replicate it on other machines with -V MKREPRO=yes -V MKREPRO_TIMESTAMP=..

(msaitoh)

2021-09-14 22:14:11 UTC MAIN commitmail json YAML

reflect reality on flags.

(christos)

2021-09-14 22:01:40 UTC MAIN commitmail json YAML

add format for flags.

(christos)

2021-09-14 22:01:17 UTC MAIN commitmail json YAML

2021-09-14 22:00:11 UTC MAIN commitmail json YAML

Remove "no IOMMU" hack.

(jmcneill)

2021-09-14 21:49:31 UTC MAIN commitmail json YAML

ipsectools: fix lint error

Returning a value from a void function is a GNU extension, but even in
GNU mode, lint does not allow these.

No functional change.

(rillig)

2021-09-14 21:45:20 UTC MAIN commitmail json YAML

sysinst: fix lint error about empty compound literal

In C99, a compound literal must have at least one expression between the
braces.  Empty structs and compound literals are a GNU extension.

The first member of struct part_entry has type size_t, therefore 0 fits
well.

No functional change.

(rillig)

2021-09-14 20:45:19 UTC MAIN commitmail json YAML

2021-09-14 20:40:55 UTC MAIN commitmail json YAML

autofs: fix lint errors

common.c(1034): error: void function parse_map cannot return value [213]
common.c(1053): error: void function parse_map cannot return value [213]

(rillig)

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

usr.sbin: enable lint for all programs

(rillig)

2021-09-14 20:34:36 UTC MAIN commitmail json YAML

acpidump: fix lint errors

When lint runs on the code, it defines the preprocessor macro 'lint' to
be 1.  Due to that, this name cannot be used as a regular identifier.

acpi.c(86): error: syntax error '1' [249]
acpi.c(1004): error: syntax error '1' [249]
acpi.c(2422): error: void function acpi_print_lpit cannot return value
    [213]

The FreeBSD code doesn't need this name change since lint is specific to
NetBSD.

No functional change.

(rillig)

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

sbin: enable lint for almost all programs

The programs fsck_lfs and newfs_lfs both trigger a longstanding bug in
lint that is difficult to fix, so ignore them for now.

For resize_ffs, lint thinks that 'struct fs' is incomplete, but GCC and
Clang accept it.  Needs further investigation.

(rillig)

2021-09-14 19:44:40 UTC MAIN commitmail json YAML

lint: allow [*] everywhere where [] and [integer] are allowed

It's a seldom used feature, but now it's at least consistent.

(rillig)

2021-09-14 19:08:41 UTC MAIN commitmail json YAML

tests/lint: fix typo from previous commit

(rillig)

2021-09-14 19:06:27 UTC MAIN commitmail json YAML

lint: support int[*][3] from C99

No warning in pre-C99 mode since this declarator is not used in practice
anyway.

(rillig)

2021-09-14 19:02:15 UTC MAIN commitmail json YAML

2021-09-14 17:10:46 UTC MAIN commitmail json YAML

Provide some snprintb(3) formats.

(christos)

2021-09-14 17:09:18 UTC MAIN commitmail json YAML

2021-09-14 15:04:09 UTC MAIN commitmail json YAML

Quote the filenames like before

(christos)

2021-09-14 14:49:39 UTC MAIN commitmail json YAML

Deal with some issues where fds intended only for internal use
by the shell were available for manipulation by scripts (or the user).
These issues were reported by Jan Schaumann on netbsd-users.

The first allows the user to reference sh internal fds, and is
a simple fix - any sh internal fd is simply treated as if it were closed
when referenced by the script.  These fds can be discovered by
examining /proc/N/fd so it is not difficult for a script to discover
which fd it should attempt to access.

The second allows the user to reference a user level fd which is
one that is normally available to it, but at a point where it should
no longer be visible (when that fd has been redirected, for a built
in command, so the original fd needs to be saved so it can be restored,
the saving fd should not be accessible).  It is not as easy for the
script to determine which fd to attempt here, as the relevant one
exists only during the lifetime of a built-in command (and similar),
but there are ways in some cases (aside from looking at /proc from
another process).

Fix this one by watching which fds the user script is attempting
to use, and avoid using those as temporary fds.  This is possible in
this case as we know what command is being run, before we need to
save the fds it uses.  That's different from the earlier case where
when the shell allocates its fds we have no idea what it might
reference later.

Also clean up a couple of other minor code issues (NFC intended) that
I noticed while here...

(kre)

2021-09-14 02:23:35 UTC netbsd-9 commitmail json YAML

2021-09-14 02:21:35 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by martin in ticket #1345):
build.sh: revision 1.348
build.sh: revision 1.349
build.sh: revision 1.350
build.sh: revision 1.351
build.sh: revision 1.352
build.sh: revision 1.356
ignore cvslatest errors in expert mode
Handle git and mercurial for reproducible builds.
for mercurial, use the latest revision instead of limiting the output to 1
(requested by joerg)
handle different flavors of date(1)
kre@ does not like the subshell :-)
Add a new operation "mkrepro-timestamp" to extract the timestamp a
build with -P would use. Example usage:
./build.sh -T /usr/tools -P mkrepro-timestamp
This allows us to extract this information once, make other use of it,
and replicate it on other machines with -V MKREPRO=yes -V MKREPRO_TIMESTAMP=..

(msaitoh)

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

Support new style msi-ranges from U-Boot

(jmcneill)

2021-09-13 23:31:23 UTC MAIN commitmail json YAML

2021-09-13 23:30:52 UTC MAIN commitmail json YAML

apple: provide a non-posted bs tag by default

This tag is still used for early console attachment.

(jmcneill)

2021-09-13 23:30:05 UTC MAIN commitmail json YAML

applepcie: Explicitly use posted BS tag for PCI devices.

(jmcneill)

2021-09-13 22:46:02 UTC MAIN commitmail json YAML

PR bin/56398

The final component of both a/b/c and a/b/c/ is "c", so that's the one
to which the -m arg applies.

(kre)

2021-09-13 22:09:06 UTC MAIN commitmail json YAML

tests/lint: add more tests for direct-abstract-declarator

Lint's grammar in this area differs a lot from the grammar in C99. GCC's
parser has a long comment about special cases in this area.  It's tricky
to even parse these type names correctly, let alone assign them the
correct types, that's why it needs more tests before trying to refactor
that code.

(rillig)

2021-09-13 14:47:28 UTC thorpej-i2c-spi-conf2 commitmail json YAML

2021-09-13 11:54:42 UTC MAIN commitmail json YAML

Fix IBM405 errata 77 workaround for __cpu_simple_lock{,_try}();
adjust labels so that dcbt is executed before stwcx. insn.

(rin)

2021-09-13 06:11:51 UTC MAIN commitmail json YAML

2021-09-13 05:25:27 UTC MAIN commitmail json YAML

lint: replace comment in new_style_function with equivalent code

No functional change.

(rillig)

2021-09-13 05:21:30 UTC MAIN commitmail json YAML

lint: eliminate local variable in new_style_function

No functional change.

(rillig)

2021-09-13 01:12:36 UTC MAIN commitmail json YAML

2021-09-12 23:13:02 UTC thorpej-i2c-spi-conf2 commitmail json YAML

- Improve some comments.
- Update pcfiic_i2c_exec() for the channel split (might fix an issue
  spotted by tnn@ in testing).

(thorpej)

2021-09-12 22:02:19 UTC thorpej-i2c-spi-conf2 commitmail json YAML

iic_devslot_remove(): remove an errant "return false;" (the result of
a paste-o).

(thorpej)

2021-09-12 19:23:27 UTC thorpej-i2c-spi-conf2 commitmail json YAML

- add_i2c_devices(): because we're matching on phandle path, we can be
  visited multiple times for the same phandle (once for the controller,
  once for the "iic" bus instances, which inherit's the controller's
  phandle).  Detect this and avoid allocating a redundant i2c_fixup_container.
- sparc64_device_tree_fixup(): this is called before machine_model[] is
  initialized, so don't make any permanent decisions until it has been.

(thorpej)

2021-09-12 18:38:07 UTC thorpej-i2c-spi-conf2 commitmail json YAML

2021-09-12 17:30:53 UTC MAIN commitmail json YAML

2021-09-12 16:28:45 UTC MAIN commitmail json YAML

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

tests/lint: demonstrate parse error for function-type parameters

Seen in sbin/fsck_lfs/vnode.c(104), where lint wrongly complains:

error: redeclaration of register_vget [27]

(rillig)

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

tests/lint: make documentation for lint2/msg_000 less ambiguous

(rillig)

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

sys/bitops.h: fix __BITMAP_ZERO for non-GCC compilers

Running 'make -C sbin/cgdconfig lint' failed with:

cgdconfig.c(1253): error: left operand of '->' must be pointer to struct
    or union, not 'struct <unnamed>' [104]

(rillig)

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

tests/make: allow to only test selected variants

Testing all variants takes several minutes, so make it possible to test
a single or a few test variants separately.

(rillig)

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

tests/make: make output of test job-output-null clearer

Having 5 times the word 'hello' in the output doesn't help at
understanding the test and how the output was produced.

Bash 5 sometimes makes this test fail by adding '2b' and '2c' to the
output.

(rillig)

2021-09-12 10:06:03 UTC MAIN commitmail json YAML

lint: un-abbreviate rvused and rvdisc

No functional change.

(rillig)

2021-09-12 09:51:14 UTC MAIN commitmail json YAML

make: error out if a pre-C99 platform defines bool in some cases

On NetBSD/amd64 9.99.88, when compiling make in C90 mode, make.h defined
its own boolean type as an alias for unsigned int.  Not plain int since
that would make the value of bit-fields -1 instead of 1.

This worked fine for all files except main.c, which includes
<sys/sysctl.h>, which in turn includes <stdbool.h> unconditionally, even
in C90 mode.  This meant that in main.c, sizeof(bool) was 1, while in
all other files it was 4.

This in turn led to a segmentation fault when ParseDependencySourceMain
tried to access opts.create.  Since parse.c assumed sizeof(bool) == 4,
it computed an offset outside of struct CmdOpts, which was defined in
main.c with sizeof(bool) == 1.

Rather than risking these segmentation faults, prevent building make on
platforms like these and suggest a proper workaround.

(rillig)

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

comment whitespace

(skrll)

2021-09-12 08:36:15 UTC MAIN commitmail json YAML

make: fix build for DEBUG_HASH_LOOKUP

(rillig)

2021-09-12 08:32:23 UTC MAIN commitmail json YAML

make: reduce number of relocations in Targ_PrintType

On x86_64, this saves 120 bytes of .text.

No functional change.

(rillig)

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

pmap_page_remove: simply and reduce the code size slightly.

(skrll)

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

make: fix lint warnings for strict bool mode

In strict bool mode, lint does not consider 'x & y' as having type bool,
if x and y have integer type, it only allows this for enums.

No functional change.

(rillig)

2021-09-12 07:52:21 UTC MAIN commitmail json YAML

make: fix Targ_PrintType for pre-C99 compilers

(rillig)

2021-09-12 07:50:45 UTC MAIN commitmail json YAML

make: make Targ_PrintType simpler

No functional change.

(rillig)

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

2021-09-12 06:53:08 UTC MAIN commitmail json YAML

Mark up NULL with Dv.

(wiz)

2021-09-12 03:58:52 UTC MAIN commitmail json YAML

Fix build for uniprocessor.

(nat)

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

Improve the formatting of the list of Built-in commands for those
commands with multiple synopsis lines (eg: trap).

But there really must be a better way to achieve this effect than
the way it is accomplished here, and I'm hoping some wizard who
understands mdoc much better than I do will revert this change and
do it using some inspired magic incantation instead.

(kre)

2021-09-12 01:30:41 UTC MAIN commitmail json YAML

Don't dereference NULL on "jobs -Z" (with no title given), instead
do setproctitle(NULL) (which is not the same thing at all).  Do the
same with jobs -Z '' as setting the title to "sh: " isn't useful.

Improve the way this is documented, and note that it is only done
this way because zsh did it first (ie: pass on the balme, doing this
in the jobs command is simply absurd.)

(kre)

2021-09-11 22:34:17 UTC MAIN commitmail json YAML

Bootloader banner changes

(nia)

2021-09-11 21:30:46 UTC MAIN commitmail json YAML

2021-09-11 20:55:03 UTC MAIN commitmail json YAML

2021-09-11 20:43:32 UTC MAIN commitmail json YAML

Add jobs -Z (like in zsh(1)) to setproctitle(3).

(christos)

2021-09-11 20:28:06 UTC MAIN commitmail json YAML

2021-09-11 20:05:34 UTC MAIN commitmail json YAML

stdio.h: remove outdated comment for vscanf

When these functions where added to stdio.h 1.72 on 2008-08-04, the
conditional included _NETBSD_SOURCE.

The additional condition was removed in stdio.h 1.99 from 2020-03-20,
but the comment was not updated.

(rillig)

2021-09-11 19:58:24 UTC MAIN commitmail json YAML

popen.3: move popenve from BUGS to HISTORY

(rillig)

2021-09-11 19:56:51 UTC MAIN commitmail json YAML

add 32.0GT/s to the list of pcie speeds (PCIe 5.x.)

(mrg)

2021-09-11 19:05:06 UTC MAIN commitmail json YAML

stdio.h: sync comment for struct __sFILE with reality

In stdio.h 1.1 from 1993-03-21, the struct had a member named _ub for
the ungetc buffer.  That member was repurposed in stdio.h 1.42 from
2001-12-07 in order to support wide characters.

Remove the reference to the 'WARNING above' since there is no such
warning and even when this comment was added in stdio.h 1.20 from
1998-02-02, there was none.

(rillig)

2021-09-11 18:46:22 UTC MAIN commitmail json YAML

fseek.3: fix grammar

(rillig)

2021-09-11 18:38:25 UTC MAIN commitmail json YAML

stdio.h: remove outdated comment about fpos_t

The 'fairly grotesque' from 1994-04-03 referred to the conditional
definition of the type fpos_t, using two different integer types that
both happened to be 64-bit.

When stdio was changed on 2012-01-22 to keep track of the mbstate, the
conditional type definition was removed and the comment no longer made
sense.

(rillig)

2021-09-11 18:18:29 UTC MAIN commitmail json YAML

2021-09-11 17:22:36 UTC thorpej-i2c-spi-conf2 commitmail json YAML

2021-09-11 16:58:39 UTC MAIN commitmail json YAML

stdio.h: fix typo in comment

(rillig)

2021-09-11 16:29:18 UTC MAIN commitmail json YAML

fix license copypasta
NFC

(macallan)

2021-09-11 16:10:37 UTC MAIN commitmail json YAML

Build and install the if_run module.  run(4) is not necessarily included
in all GENERIC kernels (as reported on libera IRC).

(pgoyette)

2021-09-11 15:22:57 UTC thorpej-i2c-spi-conf2 commitmail json YAML

2021-09-11 14:47:06 UTC thorpej-i2c-spi-conf2 commitmail json YAML

Fix a memory leak if the "compatible" property is > 32 bytes.

(thorpej)

2021-09-11 14:23:04 UTC MAIN commitmail json YAML

Ignore failed closes (if for example a closed file descriptor is passed as
a starting point). This is how the kernel behaves.

(christos)

2021-09-11 14:22:12 UTC MAIN commitmail json YAML

remove fake closefrom()

(christos)

2021-09-11 13:13:59 UTC thorpej-i2c-spi-conf2 commitmail json YAML

Use i2c_enumerate_deventries().

(thorpej)

2021-09-11 13:02:29 UTC thorpej-i2c-spi-conf2 commitmail json YAML

No longer need to fixup the devhandle for the "pmu" i2c bus node,
since of_i2c_enumerate_devices() now handles it.

(thorpej)

2021-09-11 12:58:48 UTC thorpej-i2c-spi-conf2 commitmail json YAML

Building on the previous, some Sun OpenFirmware device trees have a
similar schema (e.g. /pci/pmu@6/i2c@0,0), but use a slightly different
name ("i2c" vs "i2c-bus").  Handle this.

(thorpej)

2021-09-11 12:44:49 UTC thorpej-i2c-spi-conf2 commitmail json YAML

The Device Tree bindings state that if a controller has a
child node named "i2c-bus", then that is the node beneath
which the child devices are populated.

(thorpej)

2021-09-11 10:09:55 UTC MAIN commitmail json YAML

ksyms: Use pserialize(9) for kernel access to ksyms.

This makes it available in interrupt context, e.g. for printing
messages with kernel symbol names for return addresses as drm wants
to do.

(riastradh)

2021-09-11 10:09:31 UTC MAIN commitmail json YAML

ksyms(4): Take a complete snapshot on each open.

- Snapshots are stored in pageable anonymous uvm objects.
- Snapshots are reference-counted so they can be reused across opens.
- Opening /dev/ksyms blocks module unload until snapshot is taken.
- Merely holding /dev/ksyms open does not block module unload.
- /dev/ksyms is now mmappable.

This slightly changes the behaviour of fstat(2) on /dev/ksyms -- it
is a little more useful now!  In particular, st_size is the size of
the symbol table.  Some other fields which were not very useful to
begin with -- st_dev, st_ino, st_mode, st_nlink, st_*time,
st_blksize, st_blocks -- are now different, and independent of the
file system on which the device node resides.

Discussed in

https://mail-index.netbsd.org/source-changes-d/2021/08/17/msg013425.html

This is option (3), adapted to make the ksyms snapshots pageable,
after options (1) and (2) posed practical problems.

(riastradh)

2021-09-11 10:09:14 UTC MAIN commitmail json YAML

sys/kern: Avoid fp->f_offset without the object (here, vnode) lock.

(riastradh)

2021-09-11 10:08:56 UTC MAIN commitmail json YAML

sys/kern: Allow custom fileops to specify fo_seek method.

Previously only vnodes allowed lseek/pread[v]/pwrite[v], which meant
converting a regular device to a cloning device doesn't always work.

Semantics is:

(*fp->f_ops->fo_seek)(fp, delta, whence, newoffp, flags)

1. Compute a new offset according to whence + delta -- that is, if
  whence is SEEK_CUR, add delta to fp->f_offset; if whence is
  SEEK_END, add delta to end of file; if whence is SEEK_CUR, use delta
  as is.

2. If newoffp is nonnull, return the new offset in *newoffp.

3. If flags & FOF_UPDATE_OFFSET, set fp->f_offset to the new offset.

Access to fp->f_offset, and *newoffp if newoffp = &fp->f_offset, must
happen under the object lock (e.g., vnode lock), in order to
synchronize fp->f_offset reads and writes.

This change has the side effect that every call to VOP_SEEK happens
under the vnode lock now, when previously it didn't.  However, from a
review of all the VOP_SEEK implementations, it does not appear that
any file system even examines the vnode, let alone locks it.  So I
think this is safe -- and essentially the only reasonable way to do
things, given that it is used to validate a change from oldoff to
newoff, and oldoff becomes stale the moment we unlock the vnode.

No kernel bump because this reuses a spare entry in struct fileops,
and it is safe for the entry to be null, so all existing fileops will
continue to work as before (rejecting seek).

(riastradh)

2021-09-11 09:16:14 UTC MAIN commitmail json YAML

make: eliminate a few common subexpressions

This commit contains only changes that don't increase the code size on
x86_64.  Replacing the remaining instance of ModChain_ShouldEval would
either increase the code size or make the code harder to understand.

No functional change.

(rillig)

2021-09-11 08:34:25 UTC MAIN commitmail json YAML

stdio.h: fix typo in comment

(rillig)

2021-09-11 08:32:11 UTC MAIN commitmail json YAML

librumphijack: fix typo for NetBSD < 5.99.7

(rillig)

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

GIC: Support SPI affinity routing before secondary CPUs have hatched.

Instead of reading MPIDR from CPU init to determine a routing target, trust
system configuration data (Devicetree or ACPI) to properly fill in ci_cpuid.
This allows for SPI affinity routing to work before secondary CPUs are
hatched; previously, one of two things would happen:

a) If 1ofN distribution is supported, the SPI could be distributed to any
  participating PE.
b) If 1ofN distribution is not supported, the SPI would not be forwarded
  and would stay pending.

(jmcneill)

2021-09-11 01:03:18 UTC thorpej-i2c-spi-conf2 commitmail json YAML

Re-factor the code in sandpoint and sparc64 that enumerates a static
table of i2c device entries into something sharable.

(thorpej)

2021-09-10 23:32:17 UTC MAIN commitmail json YAML

this driver allows to read the speeds of fans controlled via mac-io/fans/*
found in some G5, for example my 7,3
based on guesswork and observation

(macallan)

2021-09-10 22:48:19 UTC MAIN commitmail json YAML

2021-09-10 22:11:03 UTC MAIN commitmail json YAML

bin: remove unnecessary lint comment CONSTCOND

Since 2021-01-31, lint no longer warns about 'do ... while (0)'.

No functional change.

(rillig)

2021-09-10 21:52:18 UTC MAIN commitmail json YAML

2021-09-10 21:22:05 UTC MAIN commitmail json YAML

Ignore closefrom(3) for now; too complicated to descern between regular
and rump fds.

(christos)

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

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

iic.4: add missing client devs (those with man pages, many don't have one)

(nia)

2021-09-10 21:05:08 UTC MAIN commitmail json YAML

tests/lint: align message checker for lint2 to the one from lint1

No functional change.

(rillig)

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

- implement pselect so that the ssh test has a chance to work
- 1 -> EXIT_FAILURE
- more info about fds

(christos)

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

2021-09-10 19:40:18 UTC MAIN commitmail json YAML

2021-09-10 18:51:36 UTC MAIN commitmail json YAML

libedit: fix indentation

No change to the resulting object files.

(rillig)

2021-09-10 15:45:28 UTC thorpej-i2c-spi-conf2 commitmail json YAML

2021-09-10 15:43:03 UTC thorpej-i2c-spi-conf2 commitmail json YAML

Record the attached child device_t in the spi_handle.

(thorpej)

2021-09-10 14:56:26 UTC MAIN commitmail json YAML

if_et.c: nothing in this driver needs netinet includes now,
so drop #include "opt_inet.h" and the includes of netinet headers
conditioned on it.

(jakllsch)

2021-09-10 14:43:04 UTC MAIN commitmail json YAML

No need to #include "vlan.h", as NVLAN is not used in these drivers now.

(jakllsch)

2021-09-10 13:33:45 UTC MAIN commitmail json YAML

Add an LLVM fuzzing wrapper for the portable libedit (Christian Holler)

(christos)

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

rl_startup_hook should be called each time. From Carlos Henrique Lima Melara

(christos)

2021-09-10 07:50:49 UTC netbsd-9 commitmail json YAML

Fix typo, pointed out by msaitoh

(martin)

2021-09-10 07:45:27 UTC netbsd-9 commitmail json YAML

Fix editor mishap, pointed out by msaitoh

(martin)

2021-09-09 23:26:37 UTC MAIN commitmail json YAML

sys/dev: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.

I think the iwi(4), mcd(4), and ses(4) changes actually plug leaks;
the raidframe(4) change probably doesn't (but doesn't hurt).

(riastradh)

2021-09-09 21:47:47 UTC MAIN commitmail json YAML

tests/stdio: disable flappy test for EINTR with _IOFBF for now

This case is currently not handled correctly by fwrite/fflush, which
makes the test fail sometimes.  The tests for _IONBF and _IOLBF are
pretty stable though.

(rillig)

2021-09-09 21:39:03 UTC MAIN commitmail json YAML

If we get a spurious interrupt, log a debug message and ignore it.

Otherwise we risk tripping an assertion later on due to an interrupt
firing before it is scheduled.

(jmcneill)

2021-09-09 20:25:30 UTC MAIN commitmail json YAML

fix memory issues found by fuzzing (double frees and buffer overflows)

(christos)

2021-09-09 20:24:08 UTC MAIN commitmail json YAML

Add casts to appease conversions between wchar_t and wint_t

(christos)

2021-09-09 15:00:01 UTC MAIN commitmail json YAML

Add a new operation "mkrepro-timestamp" to extract the timestamp a
build with -P would use. Example usage:

./build.sh -T /usr/tools -P mkrepro-timestamp

This allows us to extract this information once, make other use of it,
and replicate it on other machines with -V MKREPRO=yes -V MKREPRO_TIMESTAMP=..

(martin)

2021-09-09 13:22:50 UTC MAIN commitmail json YAML

Enable WSDISPLAY_CUSTOM_OUTPUT and WSDISPLAY_CUSTOM_BORDER on
amd64 GENERIC as i386 GENERIC already does.

(jakllsch)

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

Add optional GENERIC.local include in alpha's GENERIC.

(jakllsch)

2021-09-09 12:14:37 UTC MAIN commitmail json YAML

Add license text I forgot to include in 1.1

(jakllsch)

2021-09-09 08:12:27 UTC MAIN commitmail json YAML

In pmap_icache_sync_range change

for (...) {
...
if (condition) {
// do stuff
}
}

to

for (...) {
...
if (!conditional)
continue;
// do stuff
}

to save on indentation. Same code (modulo register usage) before and
after.

(skrll)

2021-09-09 08:11:43 UTC MAIN commitmail json YAML

fix part of the previous: Link Capability Max Speed is a value not
a bitmask.  pointed out by msaitoh@.

(mrg)

2021-09-09 08:09:44 UTC MAIN commitmail json YAML

2021-09-09 02:12:48 UTC MAIN commitmail json YAML

add some bits in the pci Link Capabilities Register, and also the similar
set in the Link Capabilities 2 Register.

(mrg)

2021-09-09 01:14:04 UTC MAIN commitmail json YAML

Fix a bug with here document processing reported on the austin group list
by oguzismailuysal@gmail.com (2021-09-08) (applies to all ash descendant
shells).

There were places in the parser where newline tokens were handled
without reading any pending here documents (leaving those until a
later newline token).

Eg: in
: << do | for x in xxx
do
do echo $x
done

The here doc text (<<do) should start immediately after the next newline
(which is after xxx).  But it wasn't happening until after the following
newline (after the line containing only "do").

Bizarrely, this
: << do | for x in xxx
do echo $x
do
done
"worked" because of that.

For other cases that also failed, see the hard_cases test case in
src/tests/bin/sh/t_here.sh  Note that there's nothing magic about
the particular end delimiter word chosen here, any will do, using
the ones selected for the tests (and shown here) simply makes it
all more mysterious!  The one here is the exact case reported.

Fix this by reading the here docs when processing newline tokens
when they are encountered in other than the "normal" way.  Whether
this catches every possibility is unknown currently - may never be
known for certain, but there are no more I can currently think of.

No pullups needed, this isn't a significant enough bug (ie: no one
actually writes code like this) to warrant that.

(kre)

2021-09-09 00:04:51 UTC MAIN commitmail json YAML

Add a new test case to check for correct parsing and execution
of a few bizarre here document usages, such as

: << do | for x in xxx
do
do echo $x
done

which should work, but never have done.  (See the source for others).

This test case will currently fail, until the bug is fixed
(already done, to be committed very soon).

(kre)

2021-09-08 12:00:50 UTC MAIN commitmail json YAML

Hmm, remove one more parentheses from return.

(rin)

2021-09-08 11:59:43 UTC MAIN commitmail json YAML

Restore braces for if/else statements which have logically single line,
but physically multiple lines.

This is recommended by an example in style:
http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/style#rev1.58

Thanks tsutsui@ for pointing it out.

(rin)

2021-09-08 11:20:44 UTC MAIN commitmail json YAML

2021-09-08 11:02:05 UTC MAIN commitmail json YAML

Consider two tags equal if they share the same cookie. For fdtbus,
we may have different tags to deal with mapping attributes and CPU vs bus
address translation, but otherwise represent the same bus space.

(jmcneill)

2021-09-08 09:09:47 UTC MAIN commitmail json YAML

Reduce bus_dmamap_sync() cost.

- Don't sync whole descriptor ring but limited counts(rx_process_limit)
  descriptors.
- Dont' sync every loop.

(msaitoh)

2021-09-08 08:46:29 UTC MAIN commitmail json YAML

Don't pre-allocate a cluster not to do m_freem() it on RXCOPY case.

(msaitoh)

2021-09-08 07:25:55 UTC MAIN commitmail json YAML

Redo a part of rev 1.89:
- Improve uniformity of panic messages. Also, use __func__ instead of
  hard-coded function names.

(rin)

2021-09-08 07:22:56 UTC MAIN commitmail json YAML

Redo a part of rev 1.89:

- Remove redundant parentheses/braces/comments.
- Fix indents.

No binary changes confirmed this time.

(rin)

2021-09-08 07:13:18 UTC MAIN commitmail json YAML

Revert rev 1.89:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sh3/sh3/pmap.c#rev1.89

I misunderstood evaluation order of ? operator.

I should have split the commit into two parts, i.e., with and without
binary diffs, in order to avoid such a serious mistake.

Thanks rillig@ so much for careful check!!!!

(rin)

2021-09-08 00:35:56 UTC MAIN commitmail json YAML

Misc cosmetic fixes:
- Remove redundant parentheses/braces/comments.
- Improve uniformity of panic messages. Also, use __func__ instead of
  hard-coded function names.
- Fix indents.

(rin)

2021-09-08 00:24:29 UTC MAIN commitmail json YAML

Turn KASSERT's added for PR port-sh3/56381 into KDASSERT's;
they are less likely expected to fire again.

(rin)

2021-09-08 00:17:21 UTC MAIN commitmail json YAML

pte_enter() and pmap_enter_pv(): return zero for success, and
non-zero value for failure, as normally expected.

(rin)

2021-09-07 22:30:10 UTC netbsd-9 commitmail json YAML

2021-09-07 22:29:46 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by martin in ticket #1344):
distrib/sets/makesrctars: revision 1.43
PR 56389: do not include top level .git or .hg directories
in source sets.

(snj)

2021-09-07 22:29:07 UTC netbsd-8 commitmail json YAML

2021-09-07 22:28:31 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by martin in ticket #1694):
distrib/sets/makesrctars: revision 1.43
PR 56389: do not include top level .git or .hg directories
in source sets.

(snj)

2021-09-07 20:41:58 UTC MAIN commitmail json YAML

2021-09-07 18:02:46 UTC MAIN commitmail json YAML

PR 56389: do not include top level .git or .hg directories
in source sets.

(martin)

2021-09-07 17:13:20 UTC netbsd-9 commitmail json YAML

2021-09-07 17:12:21 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by manu in ticket #1343):

share/man/man7/sysctl.7: revision 1.153
sys/kern/vfs_lockf.c: revision 1.74
lib/libc/sys/fcntl.2: revision 1.46
lib/libc/sys/flock.2: revision 1.23

Tie the maximum file lock per unprivilegied uid to kern.maxfiles

This makes the limit simple to raise at run time. While there, document
that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.

(martin)

2021-09-07 16:56:25 UTC MAIN commitmail json YAML

Revert "ksyms(4): Simply block unload until last /dev/ksyms close."

This appears to break t_execsnoop -- presumably something goes wrong
with how libdtrace uses ksyms.  To investigate.

(riastradh)

2021-09-07 16:56:13 UTC MAIN commitmail json YAML

2021-09-07 13:29:41 UTC MAIN commitmail json YAML

person on internet is confused by how to list disks because there's
so much in /dev

(nia)

2021-09-07 13:24:46 UTC MAIN commitmail json YAML

2021-09-07 12:36:57 UTC MAIN commitmail json YAML

Do not compile in whole fileio.c for LIBHACK.

Fix build failure when built as libhack, due to missing fileio.h.

IMO, this should be cleaner than generating fileio.h for {get,put}win(3),
that are useless for install media.

(rin)

2021-09-07 11:43:05 UTC MAIN commitmail json YAML

sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.

(riastradh)

2021-09-07 11:41:32 UTC MAIN commitmail json YAML

Remove banner printing code from bootloaders, add it to libsa.

This harmonizes efiboot and the various x86 bootloaders to use shared
code for printing the banner. By friendly coincidence, it also adds
support for specifying 'banner=' in arm efiboot's boot.cfg, as on x86.

(nia)

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

New crashme sysctl to enter ddb directly.

(riastradh)

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

ksyms: Use pserialize(9) for kernel access to ksyms.

This makes it available in interrupt context, e.g. for printing
messages with kernel symbol names for return addresses as drm wants
to do.

(riastradh)

2021-09-07 10:59:46 UTC MAIN commitmail json YAML

ksyms(4): Simply block unload until last /dev/ksyms close.

Otherwise, readers may get a garbled snapshot of ksyms (or a crash on
an assertion failure because of the garbled snapshot) if modules are
unloaded while they read.

https://mail-index.netbsd.org/source-changes-d/2021/08/17/msg013425.html

(riastradh)

2021-09-07 10:44:18 UTC MAIN commitmail json YAML

usb(4): Fix xfer race between software abort and hardware completion.

This fixes a bug in the API contract of usbd_abort_pipe: with the
change, the caller is guaranteed the xfer completion callbacks have
returned; without the change, completion callbacks could still be
running on the queued xfers while the caller of usbd_abort_pipe
proceeds to concurrently issue usbd_destroy_xfer.

This also fixes the following problem for interrupt pipes, whose
xfers stay on the queue until the pipe is aborted:

Thread 1: Hardware completion interrupt calls usb_transfer_complete.
Thread 1: pipe->up_repeat is 1, so usb_transfer_complete keeps xfer
  queued.
Thread 2: Calls usbd_abort_pipe (e.g., in detach).
Thread 2: usbd_abort_pipe waits for bus lock.
Thread 1: usb_transfer_complete releases bus lock to invoke callback.
Thread 2: Sets pipe->up_repeat := 0 (too late for thread 1 to see).
Thread 1: usb_transfer_complete waits to reacquire bus lock before
  resetting xfer status to USBD_NOT_STARTED.
Thread 2: Repeatdly calls upm_abort on the same xfer, which does
  nothing because upm_abort just does usbd_abort_xfer which does
  nothing because the xfer status is (e.g.) USBD_IOERROR and not
  USBD_IN_PROGRESS.

Thread 2 is now spinning forever with the bus lock held (and possibly
the kernel lock) waiting for queue or xfer status to change, which
will never happen as long as it holds the bus lock.

The resolution is for thread 2 to notice that thread 1 is busy
invoking a callback, and to wait until thread 1 has finished invoking
the callback and updated the xfer status to reset it to
USBD_NOT_STARTED at which point thread 1 can make progress again.

XXX pullup-9

(riastradh)

2021-09-07 10:44:05 UTC MAIN commitmail json YAML

ugen(4): Keep fields null when not allocated; kassert on close.

This avoids silent leaks in DIAGNOSTIC kernels.

(riastradh)

2021-09-07 10:43:51 UTC MAIN commitmail json YAML

ugen(4): Use cv_wait loop for draining reference count on detach.

- Should be no need to use cv_timedwait because all users have now
  been given a wakeup (previously writers were not, so we relied on
  the timeouts to work out).

- Need to run this in a loop or else a spurious wakeup could cause us
  to free data structures before the users have actually drained.

(riastradh)

2021-09-07 10:43:34 UTC MAIN commitmail json YAML

ugen(4): Use cv_broadcast to wake all I/O operations on detach.

Nothing prevents two concurrent reads or two concurrent writes on any
particular ugen endpoint, as far as I can tell, and we need to wake
all of them, so use cv_broadcast rather than cv_signal on detach.

XXX It's not clear to me that cv_signal in the xfer completion
callbacks is correct either: any one consumer might use less than the
full buffer.  So I think either we should use cv_broadcast, or
consumers that don't use the whole buffer need to issue cv_signal too
to wake up another consumer even if we want to avoid a thundering
herd.

(riastradh)

2021-09-07 10:43:21 UTC MAIN commitmail json YAML

ugen(4): Issue explicit wakeup on detach for OUT endpoints too.

Writers can be blocked in cv_timedwait_sig too.

While here, fix comment: aborting the pipes does not cause all
waiters to wake, because the xfer completion callbacks sometimes skip
the notification.  We should maybe change that, but this is a simpler
fix to ensure everyone waiting on I/O is woken to notice sc_dying.

(riastradh)

2021-09-07 10:43:11 UTC MAIN commitmail json YAML

ugen(4): Ensure we close pipes on detach.

Calling vdevgone has the effect of VOP_REVOKE -> spec_node_revoke ->
VOP_CLOSE -> spec_close -> cdev_close -> ugenclose, but:

(a) the flags passed to VOP_CLOSE don't have FREAD or FWRITE, and
(b) ugenclose has no effect when sc_dying is set anyway.

So create another path into the close logic, ugen_do_close.  We have
to do this in detach _after_ the references have drained because we
may free buffers that other users are still using while the reference
count is nonzero.

(riastradh)

2021-09-07 10:42:59 UTC MAIN commitmail json YAML

ugen(4): Refuse non-forced detach with EBUSY if endpoints are open.

Sprinkle some comments.

(riastradh)

2021-09-07 10:42:48 UTC MAIN commitmail json YAML

ugen(4): Prevent ugenopen while ugen_set_config is in progress.

(except on the control endpoint)

Although we hold the kernel lock (which we should eventually change),
we may sleep in usbd_set_config_no at which point ugenopen might
happen and start making use of endpoint state which we'll stomp all
over once usbd_set_config_no returns.  Setting sc_is_open[endpt]
while we wait prevents this.

(riastradh)

2021-09-07 10:42:34 UTC MAIN commitmail json YAML

ugen(4): Fix race of ugenopen against itself.

Even though we have the kernel lock held, a sleep during kmem_alloc
or usbd_open_pipe could allow another ugenopen to run concurrently
before we have marked the endpoint opened.

To avoid this, mark the endpoint open immediately (while we still
have the kernel lock held and before any sleeps, so there is no
TOCTOU error here), and then revert on unwind in the event of
failure.

(riastradh)

2021-09-07 10:42:22 UTC MAIN commitmail json YAML

ugen(4): Sprinkle KERNEL_LOCKED_P assertions around sc_is_open.

(riastradh)

2021-09-07 10:09:34 UTC MAIN commitmail json YAML

2021-09-07 08:17:20 UTC MAIN commitmail json YAML

Don't increment no_mbuf evcnt(9) when discarding multi-descriptor packet.

(msaitoh)

2021-09-07 06:36:06 UTC MAIN commitmail json YAML

Make this compile again.

XXX
Unfortunately, kernel does not boot on TX3922-based machines...

(rin)

2021-09-07 03:48:01 UTC MAIN commitmail json YAML

Sprinkle __predict_false() in the RX path.

(msaitoh)

2021-09-07 01:29:13 UTC MAIN commitmail json YAML

PR lib/56388

Regen addstr2.chk after fix for the line-hash bug in libcurses.

Now, all t_curses tests successfully pass on all platforms I have tried.

Thanks blymn@ for kind advice!

(rin)

2021-09-07 01:23:10 UTC MAIN commitmail json YAML

PR lib/56388

For __newwin() and __resizewin(), the line hash was calculated as if
HAVE_WCHAR is disabled.

Fix this bug by refactoring __hash_line() function, which calculates
the line hash by an appropriate method.

(rin)

2021-09-06 21:56:04 UTC MAIN commitmail json YAML

2021-09-06 21:18:55 UTC MAIN commitmail json YAML

tests/make: test modifier ':S' with replacement '&'

Before 2020-08-30, OpenBSD make incorrectly copied the anchors '^' and
'$' to the replacement string.  Just guard against this possible bug.

(rillig)

2021-09-06 20:55:08 UTC MAIN commitmail json YAML

fix typos in word "segment" and two additional typos in if_tl.c.

(andvar)

2021-09-06 19:38:30 UTC MAIN commitmail json YAML

2021-09-06 17:34:33 UTC MAIN commitmail json YAML

libldap: fix undefined behavior in ldap_int_tls_connect

The function isdigit must not be called with 'char' as argument.

https://bugs.openldap.org/show_bug.cgi?id=9668

(rillig)

2021-09-06 17:19:53 UTC MAIN commitmail json YAML

libipsec: fix undefined behavior when calling isprint

(rillig)

2021-09-06 15:17:25 UTC MAIN commitmail json YAML

Always autogen fileio.h.

Bump CURSES_LIB_MAJOR.CURSES_LIB_MINOR to 9.0 belatedly.

(rin)

2021-09-06 14:03:18 UTC MAIN commitmail json YAML

2021-09-06 13:11:34 UTC MAIN commitmail json YAML

2021-09-06 08:37:43 UTC MAIN commitmail json YAML

Clamp zfs nlinks at UINT32_MAX (nlink_t max) instead of (much) smaller
16-bit LINK_MAX until we bump LINK_MAX.  Fixes fts(3) problems with
"rm -rf" on zfs directories with > 32766 subdirectories.

Thanks mlelstv@ and mrg@ for helping debug this.

(simonb)