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

2024-05-10 07:20:55 UTC Now

2022-08-12 07:35:55 UTC MAIN commitmail json YAML

2022-08-12 06:24:03 UTC MAIN commitmail json YAML

Fix stall on PPPOE_STATE_PADR_SENT when received specific PADO, ok'ed by yamaguchi@n.o.

When pppoe receives a PADO frame larger than mbuf cluster size,
pppoe_send_padr() fails forever.  So, the pppoe interface stall
on PPPOE_STATE_PADR_SENT until ifconfig down/up.
It should retry from PADI in such case.

(knakahara)

2022-08-11 23:53:04 UTC MAIN commitmail json YAML

subr_prf.c & luasystm.c: s/panicing/panicking/ in comments

(gutteridge)

2022-08-11 23:38:45 UTC MAIN commitmail json YAML

hilkbdmap.c: fix typo in comment and add NetBSD RCS ID

(gutteridge)

2022-08-11 13:04:35 UTC MAIN commitmail json YAML

gic at fdt: Don't assume all irqs are established on disestablish.

Fixes panic on detach of PCI devices on pcihost.

(riastradh)

2022-08-11 12:52:24 UTC MAIN commitmail json YAML

specfs: Sprinkle opencnt/opened/closing assertions.

There seems to be a bug here but I'm not sure what it is yet:

https://mail-index.netbsd.org/current-users/2022/08/09/msg042800.html
https://syzkaller.appspot.com/bug?id=47c67ab6d3a87514d0707882a9ad6671beaa8642

The decision to actually invoke d_close is serialized under
device_lock, so it should not be possible for more than one process
to close at the same time, but syzbot and kre found a way for
sd_closing to be false later in spec_close.  Let's make sure it's
false when we're making what should be the exclusive decision to
close.

We can't assert !sd_opened before cancel and spec_io_drain, because
those are necessary to interrupt and wait for pending opens that
might later set sd_opened, but we can assert !sd_opened afterward
because once sd_closing is true nothing should set sd_opened.

(riastradh)

2022-08-11 10:17:44 UTC MAIN commitmail json YAML

Finish previous, evaluate the lowest mount on first access
to "struct mount_info" and store it here so we no longer
derefence the "struct mount" from fstrans_alloc_lwp_info().

Reported-by: syzbot+5a79214d043395b550d8@syzkaller.appspotmail.com

(hannken)

2022-08-10 13:38:26 UTC MAIN commitmail json YAML

Note that aes_ccm_tag() still fails with GCC 10.4 with -O2 on m68k.

(rin)

2022-08-10 08:38:43 UTC MAIN commitmail json YAML

2022-08-10 08:37:53 UTC MAIN commitmail json YAML

PR/56963: Mark Davies: inetd not configured for rpc
Move RPC includes to inetd.h

(christos)

2022-08-10 03:35:39 UTC MAIN commitmail json YAML

PR bin/56963 Mark Davies: inetd not configured for rpc

Instead of using negative flags to turn on positive flags, set -DRPC
in the makefile. Corrects a problem where the SunRPC code in parse.c
was accidentally left disabled.

This is a prime example of why we don't like negative flags...

(dholland)

2022-08-10 01:16:39 UTC MAIN commitmail json YAML

raidframe: reject invalid values for numCol and numSpares

numCol and numSpares are "int" so they can be "-1" internally,
which means negative values need to be rejected, as well as
values higher than RF_MAXCOL/RF_MAXSPARES.

explicitly nul-terminate all strings coming from userland.

some minor CSE that avoids signed arith.

this fixes issues in the RAIDFRAME_ADD_HOT_SPARE,
RAIDFRAME_CONFIGURE, RAIDFRAME_DELETE_COMPONENT,
RAIDFRAME_INCORPORATE_HOT_SPARE, and RAIDFRAME_REBUILD_IN_PLACE
ioctl commands.

Reported-by: syzbot+b584943ad1f8ab9d4fe0@syzkaller.appspotmail.com

https://syzkaller.appspot.com/bug?id=61e07e418261f8eec8a37a9226725fe31820edd0
https://syzkaller.appspot.com/bug?id=ca0c997b40de81c0f0b44790217731f142003149
https://syzkaller.appspot.com/bug?id=6fc452d228453494655a85264591dd9054cc0b08
https://syzkaller.appspot.com/bug?id=873f0271682713a27adc9a49dd7109c70b35fda3

XXX: pullup-8, pullup-9.

ok oster@ riastradh@

(mrg)

2022-08-10 00:28:00 UTC MAIN commitmail json YAML

db(1): Don't lie in the usage message re: `-q`

(charlotte)

2022-08-10 00:14:22 UTC MAIN commitmail json YAML

Add a TNF copyright statement in t_mixerctl.sh

(charlotte)

2022-08-09 23:58:46 UTC MAIN commitmail json YAML

Turn off AWIN_GMAC_MAC_CONF_ACS, so that all received packets retain FCS
bytes.

ether_input() can now trust M_HASFCS to accurately represent the packet
contents.

Discussed on tech-net@

(sekiya)

2022-08-09 20:05:14 UTC MAIN commitmail json YAML

Now that UFS_DIRHASH is default for biuilt-in file system modules, we
need to update the loadable module builds, too.

(pgoyette)

2022-08-09 12:42:05 UTC MAIN commitmail json YAML

virtio(4): Move comment for virtio_vq_intr.

No functional change intended.

(riastradh)

2022-08-09 08:14:03 UTC MAIN commitmail json YAML

Sync usage with man page.

(wiz)

2022-08-09 08:13:56 UTC MAIN commitmail json YAML

Sort options, fix macro, add RCS Id.

(wiz)

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

Switch from ``(1 << depth) color'' to ``(depth)-bpp color'' in
attach message.

For depth == 32, fix ``0 color'', and prevent ambiguous ``16Mi color''.

I don't know whether there is 24-bpp graphic card for mac68k or not,
although.

(rin)

2022-08-09 08:03:22 UTC MAIN commitmail json YAML

Add sysctl entry to improve interconnectivity to some VPN appliances, pointed out by seil-team@IIJ.

If we want to allow different identifier types on IDii and IDir, set
net.key.allow_different_idtype=1.  Default(=0) is the same as before.

(knakahara)

2022-08-09 07:56:19 UTC MAIN commitmail json YAML

PR bin/51878: db(1)'s man page to describe the actual behavior of '-q'

(charlotte)

2022-08-09 07:39:21 UTC MAIN commitmail json YAML

Minor alteration to the description of what df -b does (plus tiny reformat)

(kre)

2022-08-09 06:57:30 UTC MAIN commitmail json YAML

CHANGES: update clone entry for later changes

(wiz)

2022-08-08 22:31:45 UTC MAIN commitmail json YAML

rasctl(2): Avoid arithmetic overflow.

Reported-by: syzbot+40b6085d020ae47a6997@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=8fb9b5dee9b056e4f8ad3b937dc5be1296608c5f

(riastradh)

2022-08-08 20:47:00 UTC MAIN commitmail json YAML

Capitalize POSIX.

(nia)

2022-08-08 20:43:31 UTC MAIN commitmail json YAML

doc: Recent changes from several developers

(nia)

2022-08-08 19:53:28 UTC MAIN commitmail json YAML

tests/make: document history of bug in parsing unbalanced expressions

The bug was introduced in var.c 1.323, which merged two flags that
sounded as if they had been exact opposites: VAR_NOSUBST (later named
VARE_NOSUBST) and VARE_WANTRES.

Before that commit, the branch where make only counted braces instead of
properly parsing the nested expression was only taken in the modifiers
':@var@body@' and '::=', but not in ':S' and ':C'.

After merging the two flags, the modifier parts of ':S' and ':C' had to
be balanced as well, otherwise parsing would fail in cases where the
expression was only parsed, not evaluated.

(rillig)

2022-08-08 18:55:18 UTC MAIN commitmail json YAML

sys/endian.h: fix typo in comment

Came here because lint complained about non-constant case expressions in
sys/arch/xen/xen/xennet_checksum.c, line 111 and 122, which read:

case htons(ETHERTYPE_IP):
case htons(ETHERTYPE_IPV6):

POSIX says:

On some implementations, these functions are defined as macros.

NetBSD implements these functions as macros, and on little-endian platforms,
as well as in lint mode, the macros expand to function calls.

(rillig)

2022-08-08 18:23:31 UTC MAIN commitmail json YAML

2022-08-08 17:19:03 UTC netbsd-9 commitmail json YAML

2022-08-08 17:16:53 UTC netbsd-9 commitmail json YAML

Apply patch, requested by riastradh in ticket #1498:

lib/libpthread/pthread.c 1.181 (via patch)

libpthread(3): Fix a marvellous interaction with rtld.

Patch from chs@.  Comment explaining the story by me.  This patch may
not be optimal -- maybe it would be better in pthread__init, or
better for rtld to call _lwp_unpark after _lwp_park in the contened
case -- but we've tested this version and it's annoying to reproduce,
so let's take this version and worry about testing improvements
later.

(martin)

2022-08-08 17:09:21 UTC netbsd-9 commitmail json YAML

Apply patch, requested by kim in ticket #1497:

sys/netinet6/nd6.c (apply patch)

PR 55680: avoid duplicate free of link layer entries (code in HEAD is
different)

(martin)

2022-08-08 16:58:05 UTC netbsd-9 commitmail json YAML

2022-08-08 16:51:35 UTC netbsd-9 commitmail json YAML

Welcome to 9.3_STABLE

(martin)

2022-08-08 16:50:35 UTC MAIN commitmail json YAML

Add 4 new flags:
-b (from FreeBSD) - set blocksize to blocks (512 bytes)
(overrides a contrary setting in BLOCKSIZE)
-H (from FreeBSD and Linux): -h using SI units (powers of 10).  Ugh.
-N suppress the header line (except with -P which requires it).
-f show only free space (or inodes) in a minimal format (implies -N)
(that is, with one file[system] specified, print 1 number only)
With -c, show only the total.
Intended to be useful for scripting (aka, I needed it.)

While here, improve the usage message (group options where they apply,
there is no reason, for example, that -g should be shown differently
to -k -m ..., and those options aren't at all useful with -G)

Update the man page to match.

(kre)

2022-08-08 08:55:43 UTC MAIN commitmail json YAML

To avoid releasing mutex temporally, use new wm_set_mdio_slow_mode_hv_locked().

(msaitoh)

2022-08-08 08:52:37 UTC MAIN commitmail json YAML

Consistency use -1 instead of 1 for some error code. Advised by knakahara.

(msaitoh)

2022-08-08 07:49:18 UTC MAIN commitmail json YAML

Pass an error code correctly if phy.acquire() failed.

This is not a real bug because the return value is not used.

(msaitoh)

2022-08-08 07:44:40 UTC MAIN commitmail json YAML

Pass an error code to the upper layer instead of -1. Advised by knakahara.

(msaitoh)

2022-08-08 05:45:29 UTC MAIN commitmail json YAML

Modify debug messages so that we can determine where it happened.

(msaitoh)

2022-08-07 23:49:46 UTC MAIN commitmail json YAML

proplib: Allocate sizeof(*ctx), not sizeof(struct ...).

No functional change intended.

(riastradh)

2022-08-07 23:49:30 UTC MAIN commitmail json YAML

usbnet(9): Simplify assertions now that urndis(4) is less sketchy.

(riastradh)

2022-08-07 23:42:09 UTC MAIN commitmail json YAML

2022-08-07 23:03:59 UTC MAIN commitmail json YAML

Revert "module(9): Disable module autounload by default."

Needs more discussion.  Maybe better with an opt-in mechanism to
replace the opt-out mechanism than by disabling it altogether by
default.

(riastradh)

2022-08-07 22:43:28 UTC MAIN commitmail json YAML

Update what has been released by the BSD family during the last
two years; that is, since May 2020 after NetBSD 8.2 was registered
in this file.

Merge some additional information from the FreeBSD and DragonFly
versions that had several updates during this time. Added OpenBSD
and macos release dates for the same interval.

Where some release dates don't match exactly (release vs. announce
date) in the various bsd-family-tree files, assume the respective
flavor to be authoritive for its dates in this file.

Reviewed by: Sergey A. Osokin <osa@NetBSD.org>

(ast)

2022-08-07 21:17:18 UTC MAIN commitmail json YAML

module(9): Disable module autounload by default.

I don't know why this was ever enabled by default; many modules are
still not safe to unload, let alone autounload.  If any autounload is
to happen by default, it should only be for modules that have opted
into it in some way after audit.

(riastradh)

2022-08-07 20:47:05 UTC MAIN commitmail json YAML

dtrace_sdt: Register sdt providers and probes in loaded modules too.

(riastradh)

2022-08-07 20:44:39 UTC MAIN commitmail json YAML

module(9): Call callbacks in topological order on load.

They are called in reverse topological order on unload.

dtrace_sdt will rely on this soon to ensure provider definitions are
processed before their uses.

ok chs@

(riastradh)

2022-08-07 20:14:01 UTC MAIN commitmail json YAML

Remove extra whitespaces added by an ancient stupid script.

(tsutsui)

2022-08-07 19:37:15 UTC MAIN commitmail json YAML

2022-08-07 11:25:33 UTC MAIN commitmail json YAML

uirda(4): Unconditionally initializes mutexes and selq on attach.

We're going to unconditionally destroy them on detach.

Reported-by: syzbot+6b8aea3a51d8b1e5ab61@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=ec5ed628986cba5aab5705691596a2d27b0301fc

(riastradh)

2022-08-07 11:06:19 UTC MAIN commitmail json YAML

2022-08-07 10:12:20 UTC MAIN commitmail json YAML

2022-08-07 09:51:00 UTC MAIN commitmail json YAML

s/networkproccesor/network processor/

(andvar)

2022-08-07 09:37:47 UTC MAIN commitmail json YAML

2022-08-07 09:36:55 UTC MAIN commitmail json YAML

kill(1): s/proceses/processes/

(andvar)

2022-08-07 08:37:48 UTC MAIN commitmail json YAML

Provide and use (when appropriate) a bge_free_jumbo_mem.

(skrll)

2022-08-07 08:26:19 UTC MAIN commitmail json YAML

Misc tidyup. NFC.

(skrll)

2022-08-07 08:24:24 UTC MAIN commitmail json YAML

Unwrap a long line and remove unecessary brackets. NFC.

(skrll)

2022-08-07 08:19:39 UTC MAIN commitmail json YAML

Fix the KNF. oops.

(skrll)

2022-08-07 08:12:47 UTC MAIN commitmail json YAML

2022-08-07 07:48:19 UTC MAIN commitmail json YAML

2022-08-07 05:51:55 UTC MAIN commitmail json YAML

Consistently use ntohs() instead of htons() when converting from
network to host byte order.

No binary changes both for big and little endian.

(rin)

2022-08-07 03:08:40 UTC MAIN commitmail json YAML

Enable UFS_DIRHASH; this machine has 256MB RAM :)

(rin)

2022-08-07 02:55:46 UTC MAIN commitmail json YAML

2022-08-07 02:53:43 UTC MAIN commitmail json YAML

2022-08-07 02:52:30 UTC MAIN commitmail json YAML

UFS/LFS dirhash:
- Enable UFS_DIRHASH if the architecture or kernel model specific config
  file can use 128MB of RAM or more.
- Remove experimental tag from UFS_DIRHASH; it's been with RUMP kernel
  and by a number of NetBSD developers for years.
- Add LFS_DIRHASH if LFS was enabled.
- Be somewhat consistent with FS options order.

(simonb)

2022-08-07 02:33:47 UTC MAIN commitmail json YAML

If UFS or LFS dirhash is enabled in the kernel, set the dirhash cache
size dependant on memory size.  If less than 128MB of memory, default
to no cache.  With 128MB of memory or more, use a maximum cache size of
1/64th of memory; cap maximum default cache size to 32MB (for systems
with 2GB of memory or more).

The dirhash cache sizes are still explicityly setable by sysctl(8) or
by adding relevant entry(s) to sysctl.conf(5).

(simonb)

2022-08-06 21:31:33 UTC MAIN commitmail json YAML

aarch64: Implement __aarch64_casN_sync.

gcc generates calls to this symbol in programs that use
__sync_*_compare_and_swap, which require full sequential consistency
barriers, including store-before-load ordering on both sides of the
atomic; none of the release/acquire operations guarantee that, so we
have to insert explicit DMB instructions.

Note: gcc's own definition omits some of the DMB instructions, but I
can't prove that it's correct that way -- stores preceding the CAS
must complete before the load part of the CAS, and the store part of
the CAS must complete before loads following the CAS.  Maybe there's
some way to prove that one of these orderings is guaranteed some
other way than a DMB but I'm not seeing it, and store-before-load
ordering is hard to understand.

Patch by skrll@ based on a patch by mrg@, soliloquy in commit message
by me.

(riastradh)

2022-08-06 21:26:06 UTC MAIN commitmail json YAML

tests/make: demonstrate bug in parsing of modifier parts

In the modifier ':S,from,to,', parsing the two parts 'from' and 'to' of
the modifier differs depending on whether the expression is actually
evaluated or merely parsed.  This not only applies to the ':S' modifier,
but also to ':C', ':@var@body@', ':!cmd!', ':[...]', ':?:', '::=' and
':from=to'.

(rillig)

2022-08-06 21:21:10 UTC MAIN commitmail json YAML

vnodeops(9): Take exclusive lock in read/seek for f_offset update.

Otherwise concurrent readers/seekers might clobber it.

(riastradh)

2022-08-06 20:16:43 UTC MAIN commitmail json YAML

In my previous change, it was necessary to consider the case where the first block size is zero.

(ryo)

2022-08-06 18:26:43 UTC MAIN commitmail json YAML

2022-08-06 17:53:49 UTC MAIN commitmail json YAML

PR 56948: fix multicast hash filter setup

(martin)

2022-08-06 15:38:42 UTC MAIN commitmail json YAML

sip(4): Tidy up DMA syncs.

- No membar_producer in sip_init_rxdesc -- use bus_dmamap_sync with
  BUS_DMASYNC_PREWRITE to order updates to the DMA descriptors.

- Omit needless membar_producer in sip_init_txdesc -- the hardware
  will not look at any of these descriptors until we set CMDSTS_OWN
  on the first one in the sequence, which is done later in the
  caller, sipcom_start.

- In gsip_rxintr, make sure to read cmdsts _before_ extsts, by
  separating them with BUS_DMASYNC_PREREAD.  Otherwise, the CPU might
  reorder the loads and read a stale extsts first before witnessing
  an updated cmdsts with the CMDSTS_OWN bit that transfers ownership
  of the rx packet to us.

(riastradh)

2022-08-06 10:22:22 UTC MAIN commitmail json YAML

Assert postts only if we really obtained a timestamp.

(rin)

2022-08-06 10:19:44 UTC MAIN commitmail json YAML

Do not declare unused tstamp for SMALL. NFC.

(rin)

2022-08-06 10:16:18 UTC MAIN commitmail json YAML

Get back to the statically-allocated tbuf.

If a string is longer than tbuf, it cannot be a timestamp.
Therefore, no need for buffering anymore in this case.

(rin)

2022-08-06 09:42:33 UTC MAIN commitmail json YAML

Oops, fix thinko in the previous.

(rin)

2022-08-06 09:39:50 UTC MAIN commitmail json YAML

binutils-2.39 out

(wiz)

2022-08-06 09:39:32 UTC MAIN commitmail json YAML

Do not discard \[.*\] which is not identified as a timestamp.

(rin)

2022-08-06 09:33:56 UTC MAIN commitmail json YAML

KNF. Do not unnecessarily define ADDC() for SMALL. No binary changes.

(rin)

2022-08-06 07:06:58 UTC MAIN commitmail json YAML

tests/make: document parsing behavior of modifiers

The table was created by manually inspecting the code of the various
ApplyModifier functions in var.c.

The modifiers are listed in alphabetical order, except for the SysV
modifier, which is listed at the end since it is used as a fallback
modifier for many other modifiers and because it does not have a fixed
prefix.

(rillig)

2022-08-06 05:55:37 UTC MAIN commitmail json YAML

allow KMSAN to work again by restoring the limiting of kva even with
NKMEMPAGES_MAX_UNLIMITED.  we used to limit kva to 1/8 of physmem
but limiting to 1/4 should be enough, and 1/4 still gives the kernel
enough kva to map all of the RAM that KMSAN has not stolen.

Reported-by: syzbot+ca3710b4c40cdd61aa72@syzkaller.appspotmail.com

(chs)

2022-08-05 23:43:46 UTC MAIN commitmail json YAML

entropy: Don't disclose stack garbage in kern.entropy sysctls.

kern.entropy.consolidate and kern.entropy.gather are supposed to be
write-only -- it doesn't make any sense to read from them, but I
suppose it's better to read-as-zero than read-as-stack-secrets!

(riastradh)

2022-08-05 21:03:43 UTC MAIN commitmail json YAML

Do not unilaterally set M_HASFCS; this breaks protocols that lack CRC bytes
(such as AppleTalk).

Instead, remove/preserve the final four bytes in the packet ourselves on a per-
protocol basis, as we do in arch/arm/xscale/ixp425_if_npe.c (and dev/ic/gem.c,
and so forth).

(sekiya)

2022-08-05 20:59:54 UTC MAIN commitmail json YAML

make: when parsing ':D' or ':U', only copy text if necessary

When parsing the expression ${:D any ${uninterpreted} text}, parsing of
the ':D' modifier only needs to skip to the next delimiter, there is no
need to keep record of the text that has been skipped.  In this
particular example, there had been an unnecessary memory allocation
since the nested expression was not copied to the result buffer.  Due to
that, the resulting buffer contained " any  text", which was not a
substring of the text passed to the parser, thereby forcing the memory
allocation.

No functional change.

(rillig)

2022-08-05 20:35:55 UTC MAIN commitmail json YAML

make: extract parsing of ':D' and ':U' modifiers into separate function

No functional change.

(rillig)

2022-08-05 10:36:02 UTC MAIN commitmail json YAML

ptyfs: Don't copy out cookies past end of buffer.

Reported-by: syzbot+2aae7c4eddc796f917e6@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=5fe24c1da952ac2ea498d745d6479bc6be91a751

(riastradh)

2022-08-05 08:48:37 UTC MAIN commitmail json YAML

2022-08-05 05:50:54 UTC MAIN commitmail json YAML

Sprinkle const on splfoo call results.

(skrll)

2022-08-05 05:20:39 UTC MAIN commitmail json YAML

In vcache_reclaim(), post NOTE_REVOKE immediately after changing the
vnode state to VS_RECLAIMING, before we actually call VOP_RECLAIM(),
which will release the reference on the lower node of a stacked FS
vnode, which is likely to free the upper node's v_klist backing store.

Acquire the vnode interlock when checking for kevent interest now,
because the vp->v_klist pointer is now volatile.

PR kern/56950

(thorpej)

2022-08-04 21:11:52 UTC MAIN commitmail json YAML

s/bufferred/buffered/ in memory description.L:

(andvar)

2022-08-04 15:30:37 UTC netbsd-9 commitmail json YAML

2022-08-04 11:58:55 UTC MAIN commitmail json YAML

Don't pass a block of size 0 to fdt_memory_add_range().

There are some environments where size 0 blocks are passed from the loader.

(ryo)

2022-08-04 09:02:29 UTC MAIN commitmail json YAML

proplib: Fix mistake in previous -- use strncmp for prefix matching.

(riastradh)

2022-08-03 21:20:21 UTC MAIN commitmail json YAML

proplib: Don't run off end of buffer with memcmp.

The input is required to be NUL-terminated anyway, so just use strcmp
here.

Reported-by: syzbot+69838802c8ec55909ba3@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=927d66e8aa079ba2be43497425a6d9878025ad09

(riastradh)

2022-08-03 21:13:46 UTC MAIN commitmail json YAML

2022-08-03 17:55:05 UTC MAIN commitmail json YAML

fix build with options PMAPBOOT_DEBUG and options DDB

(ryo)

2022-08-03 16:21:55 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1493):

sys/dev/usb/ucom.c: revision 1.129

ucom(4): Fix earlier mistake causing pipes not to be closed.

In revision 1.123, mrg@ changed what he thought was a double-close,
but was actually abort&close (as is appropriate) to just abort (which
is not enough -- leaks the pipe).  This restores the abort&close.

The original `bug' was found by code inspection, whereas this bug was
found by asserting in usb_subr.c that no pipes are open on device
disconnection after detach; the asserts actually triggered with
several ucom(4) devices, and no longer trigger with this change.

XXX pullup-9

(martin)

2022-08-03 16:02:25 UTC netbsd-9 commitmail json YAML

2022-08-03 16:00:47 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1495):

share/man/man4/tpm.4: revision 1.7
sys/dev/ic/tpm.c: revision 1.17
sys/dev/ic/tpmvar.h: revision 1.10
sys/dev/ic/tpm.c: revision 1.18
sys/dev/ic/tpm.c: revision 1.19
sys/dev/acpi/tpm_acpi.c: revision 1.14
sys/dev/ic/tpmreg.h: revision 1.10
sys/dev/ic/tpmreg.h: revision 1.11
sys/dev/ic/tpm.c: revision 1.21
sys/dev/ic/tpm.c: revision 1.22
sys/dev/ic/tpm.c: revision 1.23
sys/dev/ic/tpm.c: revision 1.24
sys/dev/ic/tpm.c: revision 1.25
sys/dev/ic/tpmreg.h: revision 1.7
sys/dev/ic/tpmreg.h: revision 1.8
sys/dev/ic/tpmreg.h: revision 1.9
sys/dev/ic/tpmvar.h: revision 1.8
sys/dev/ic/tpmvar.h: revision 1.9

dev/ic/tpm: Tidy up headers.
- Add include guards.
- Add necessary includes.
- Sort includes.
- Use _BYTE_ORDER, not BYTE_ORDER, for public header.

dev/ic/tpm: Add missing line break in attach output.

dev/ic/tpm: Take advantage of entropy source if available.

If the tpm is deactivated, though, detach the entropy source so we
don't continue to try polling it -- it can't be activated without a
reboot anyway.

Add note about enabling TPM and rnd(4) source.

tpm(4): Handle TPM 2.0 random source too, and loop on short reads.
Tested on ThinkPad T480.

tpm(4): Preserve error if any on ending commands.
This way we don't spuriously suppress an error, such as
TPM_DEACTIVATED, in a loop where we rely on it.

tpm@acpi: Require only one locality's worth of register space.
We don't actually use the registers for the other localities, and
some older TPMs only have the first locality exposed via ACPI.

tpm(4): Fix disabling of rnd source if tpm is deactivated.

Nothing prevents a second worker from being queued when the first one
is about to do rnd_detach_source.  Instead, just set a flag so future
requests don't bother running a new thread; if there's a concurrent
one that's already been scheduled on another CPU, well, too bad, we
get a couple extra log messages but that's fine.

A better way to do this would probably be to detect whether the tpm
is deactivated at attach time, but that requires reading more of the
tpm spec than I care to do when there are alternative ways to
procrastinate like scrubbing the toilet.

tpm(4): Fix suspend and rework I/O transaction lock.

Use sc->sc_lock over individual I/O transactions, not open/close of
the whole device.  This way there is a bounded time before the tpm is
unbusied even if userland is getting at it, so userland can't hold up
suspend indefinitely.  Of course, the tpm might be suspended and
resumed in the middle of the user's session this way -- tough.

This limits the response buffer to 1024 bytes -- which is already a
bit hefty to have on the stack (but it's probably not very deep on
the stack from userland so maybe not a big deal).  If it turns out we
need more, we can use kmem to allocate a buffer on the heap, with the
caveat that it might fail.  This is necessary so that suspend doesn't
block indefinitely on uiomove in tpmread.

tpm(4): Nix TPM_BE16/TPM_BE32.  Just use sys/endian.h.

(martin)

2022-08-03 15:54:23 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1494):

external/cddl/osnet/sys/kern/kmem.c: revision 1.3

kmem_cache_create()'s "name" parameter can be on the stack,
so make a copy of it rather than keeping a pointer to it.

(martin)

2022-08-03 15:50:03 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1492):

sys/dev/usb/ukbd.c: revision 1.154

ukbd(4): Wait for callouts and blinking to complete in detach.

This detach routine (and whole driver) has got a lotta other
problems, but let's fix 'em one at a time...

(martin)

2022-08-03 15:47:49 UTC netbsd-9 commitmail json YAML

Apply patch, requested by riastradh in ticket #1491:

sys/external/bsd/drm2/dist/drm/i915/i915_drv.h (apply patch)

Fix newlines in i915 console messages

(martin)

2022-08-03 15:44:24 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1490):

sys/dev/acpi/thinkpad_acpi.c: revision 1.48

With the recent change of the EC address space handler, we no longer get
an ACPI_INTEGER in host byte order but a byte sized buffer with little
endian data.

Extract only the low 8 bits from buffer to get the fan speed again.

(martin)

2022-08-03 11:17:36 UTC netbsd-9 commitmail json YAML

2022-08-03 11:16:12 UTC netbsd-9 commitmail json YAML

Apply patch, requested by riastradh in ticket #1487:

sys/compat/common/vfs_syscalls_20.c            (apply patch)

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.

(martin)

2022-08-03 11:11:33 UTC netbsd-9 commitmail json YAML

Pull up following revision(s), all via patch
(requested by riastradh in ticket #1487):

sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168
sys/compat/sunos/sunos_misc.c: revision 1.177
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52
sys/compat/common/kern_resource_43.c: revision 1.23
sys/compat/netbsd32/netbsd32_conv.h: revision 1.46
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35
sys/compat/common/vfs_syscalls_12.c: revision 1.38
sys/compat/ultrix/ultrix_misc.c: revision 1.126
sys/compat/common/kern_sig_43.c: revision 1.37
sys/compat/linux/common/linux_mtio.c: revision 1.8
sys/compat/freebsd/freebsd_misc.c: revision 1.34
sys/compat/freebsd/freebsd_machdep.c: revision 1.5
sys/compat/linux/common/linux_olduname.c: revision 1.67
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44
sys/compat/freebsd/freebsd_sched.c: revision 1.23
sys/compat/ossaudio/ossaudio.c: revision 1.84
sys/compat/sys/time_types.h: revision 1.6
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51
sys/compat/common/ieee80211_20.c: revision 1.7
sys/compat/linux/common/linux_file.c: revision 1.119
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34
sys/compat/netbsd32/netbsd32_wait.c: revision 1.25
sys/compat/linux32/common/linux32_time.c: revision 1.38
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52
sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46
sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36
sys/compat/ultrix/ultrix_ioctl.c: revision 1.39
sys/compat/linux/common/linux_misc.c: revision 1.252
sys/compat/linux/common/linux_hdio.c: revision 1.19
sys/compat/sunos/sunos_ioctl.c: revision 1.71
sys/compat/linux/common/linux_sched.c: revision 1.79
sys/compat/common/kern_info_43.c: revision 1.40
sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20
sys/compat/linux/common/linux_socket.c: revision 1.153
sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60
sys/compat/common/vfs_syscalls_43.c: revision 1.68
sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25
sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9
sys/compat/common/kern_time_50.c: revision 1.37
sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42
sys/compat/linux/common/linux_cdrom.c: revision 1.28
sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43
sys/compat/common/kern_info_09.c: revision 1.22
sys/compat/linux32/common/linux32_resource.c: revision 1.12
sys/compat/linux/common/linux_oldolduname.c: revision 1.67
sys/compat/common/if_media_80.c: revision 1.4
sys/compat/linux/arch/alpha/linux_osf1.c: revision 1.5
sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8
sys/compat/linux32/common/linux32_signal.c: revision 1.21
sys/compat/common/kern_sig_13.c: revision 1.22
sys/compat/sunos32/sunos32_ioctl.c: revision 1.36
sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.62
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.23
sys/compat/netbsd32/netbsd32_time.c: revision 1.56
sys/compat/linux/common/linux_signal.c: revision 1.84
sys/compat/netbsd32/netbsd32_signal.c: revision 1.52
sys/compat/sunos32/sunos32_misc.c: revision 1.85
sys/compat/linux/common/linux_time.c: revision 1.40
sys/compat/linux/common/linux_fdio.c: revision 1.14
sys/compat/common/vfs_syscalls_30.c: revision 1.43

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.

(martin)

2022-08-03 11:09:13 UTC MAIN commitmail json YAML

kern/vfs_lockf.c: Fix overflow in overflow detection.

Reported-by: syzbot+cda9440741a1516747c8@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=030eb71324790093d467799263cd0789e5097229

(riastradh)

2022-08-03 11:05:51 UTC netbsd-9 commitmail json YAML

Pull up following revision(s), all via patch
(requested by riastradh in ticket #1489):

sys/compat/netbsd32/netbsd32_netbsd.c: revision 1.232
sys/compat/netbsd32/netbsd32_socket.c: revision 1.56
sys/compat/netbsd32/netbsd32_conv.h: revision 1.45
sys/compat/netbsd32/netbsd32_fs.c: revision 1.92
sys/compat/netbsd32/netbsd32.h: revision 1.137

The read/write/send/recv system calls return ssize_t because -1 is
returned on error.  Therefore we must restrict the lengths of any
buffers to NETBSD32_SSIZE_MAX with compat32 to avoid garbage return
values.

Fixes ATF lib/libc/sys/t_write:write_err.

(martin)

2022-08-03 11:01:51 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1488):

sys/altq/altq_hfsc.c: revision 1.29
sys/altq/altq_priq.c: revision 1.27

sys/altq: 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.

(martin)

2022-08-03 10:58:58 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1486):

sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.7

compat_netbsd32: Copy out 32-bit version in nfssvc32_nsd_out.

(martin)

2022-08-03 10:55:45 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1485):

sys/dev/pci/if_iwi.c: revision 1.117
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.401
sys/dev/scsipi/ses.c: revision 1.52
sys/dev/isa/mcd.c: revision 1.121

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).

(martin)

2022-08-03 10:42:02 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by wiz in ticket #1484):

lib/libc/sys/clone.2: revision 1.14
lib/libc/sys/clone.2: revision 1.15
include/sched.h: revision 1.13
include/sched.h: revision 1.14
include/sched.h: revision 1.15

Remove mentions of CLONE_PID and CLONE_STOPPED

CLONE_PID was removed in Linux 2.5.15 and recycled for
CLONE_PIDFD since Linux 5.2.
CLONE_STOPPED was removed in Linux 2.6.38 and recycled
for CLONE_NEWCGROUP since Linux 4.6.

sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.
Ok martin@

clone(2): document that _GNU_SOURCE must be defined for the prototypes
sched.h: format comment to follow KNF
requested by thorpej@
sched.h: keep __clone() visible under _NETBSD_SOURCE

(martin)

2022-08-03 09:40:25 UTC MAIN commitmail json YAML

rasctl(2): Avoid overflow in address range arithmetic.

Remove various contortions to suppress warnings.  Rely on
-Wno-type-limits instead.

Reported-by: syzbot+8b0f1ced3fce82031535@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=e9055200701cffd653d5b13491d85c34e07f06a3

(riastradh)

2022-08-03 09:37:37 UTC MAIN commitmail json YAML

sys: Build kernel with -Wno-type-limits.

The type-limits warning is actively harmful because it discourages
writing safe portable overflow detection logic which happens, on some
architectures, to be dead code.

(riastradh)

2022-08-03 05:29:04 UTC MAIN commitmail json YAML

Add a KASSERT for the locking protocol in wm_ioctl.

Read the interface up/down status from sc_if_flags (under WM_CORE_LOCK)
when deciding if the multicast filter needs to be updated.

Discussed with msaitoh@, knakahara@ and riastradh@

(skrll)

2022-08-03 05:23:30 UTC MAIN commitmail json YAML

Add some KASSERTs around the locking protocol.

Discussed with msaitoh@, knakahara@ and riastradh@

(skrll)

2022-08-03 01:53:06 UTC MAIN commitmail json YAML

change the ARC reclaim code to use the pagedaemon's free page target
rather than having a separate target.

(chs)

2022-08-03 01:52:11 UTC MAIN commitmail json YAML

for platforms which define NKMEMPAGES_MAX_UNLIMITED, set nkmempages
high enough to allow the kernel to map all of RAM into kmem,
so that free physical pages rather than kernel virtual space is
the limiting factor in allocating kernel memory.  this gives ZFS
more flexibility in tuning how much memory to use for its ARC cache.

(chs)

2022-08-03 01:38:51 UTC MAIN commitmail json YAML

sys/compat/common/if_media_80.c: Add kernel rcsid.

(riastradh)

2022-08-02 15:44:56 UTC netbsd-8 commitmail json YAML

2022-08-02 15:43:54 UTC netbsd-8 commitmail json YAML

2022-08-02 15:41:46 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by msaitoh in ticket #1754):
sys/dev/pci/pcidevs: 1.1445-1.1460 via patch
Update pcidevs:
- Add Intel Alder Lake devices and Intel 600 Series PCH devices.
- Add some Intel Xeon Scalable / Skylake-E devices.
- Fix AMD F16_HB from 0x1568 to 0x1538.
- Add some devices for AMD and improve some descriptions to clarify.
- Add VMware AHCI and NVMe.
- Update Intel 700 series Ethernet devices.
- Add some Broadcom devices.
- Add some Broadcom / LSI RAID cards.
- Fix typos and whitespace.

(snj)

2022-08-01 23:30:10 UTC MAIN commitmail json YAML

genfb: Handle uninitialized softc in genfb_enable/disable_polling.

This can happen due to janky MD kludgerosity like x86
x86_genfb_ddb_trap_callback, which should really be cleaned up, but
at least this might help with the recursive traps we've been seeing
in syzbot.

(riastradh)

2022-08-01 22:23:35 UTC MAIN commitmail json YAML

more xf86SetModeDefaultName( after xf86CVTMode()

(macallan)

2022-08-01 22:21:58 UTC MAIN commitmail json YAML

more xf86SetModeDefaultName( after xf86CVTMode()

(macallan)

2022-08-01 22:19:41 UTC MAIN commitmail json YAML

more xf86SetModeDefaultName( after xf86CVTMode()

(macallan)

2022-08-01 22:17:27 UTC MAIN commitmail json YAML

more xf86SetModeDefaultName( after xf86CVTMode()

(macallan)

2022-08-01 15:48:40 UTC MAIN commitmail json YAML

Provide _GNU_SOURCE for t_clone now that is required to make clone()
visible.

(kre)

2022-08-01 15:16:05 UTC MAIN commitmail json YAML

sched.h: keep __clone() visible under _NETBSD_SOURCE

(wiz)

2022-08-01 14:44:15 UTC MAIN commitmail json YAML

Prevent multiple unregistrations.

(mlelstv)

2022-08-01 14:43:15 UTC MAIN commitmail json YAML

revert accidental commit.

(mlelstv)

2022-08-01 14:34:02 UTC MAIN commitmail json YAML

sched.h: format comment to follow KNF

requested by thorpej@

(wiz)

2022-08-01 14:22:32 UTC MAIN commitmail json YAML

clone(2): document that _GNU_SOURCE must be defined for the prototypes

(wiz)

2022-08-01 14:19:40 UTC MAIN commitmail json YAML

sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.

Ok martin@

(wiz)

2022-08-01 10:30:29 UTC MAIN commitmail json YAML

Revert this to 1.205, undoing changes apparently mistakenly
committed in 1.206, and the total disaster that the attempt to
revert those in 1.207 created.

(kre)

2022-08-01 09:38:58 UTC netbsd-8 commitmail json YAML

2022-08-01 09:38:02 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by rin in ticket #1753):

sys/dev/usb/uslsa.c: revision 1.32

PR kern/56946
Baud rate must be in little endian for SLSA_R_SET_BAUDRATE request.

(martin)

2022-08-01 09:37:01 UTC netbsd-9 commitmail json YAML

2022-08-01 09:36:06 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by rin in ticket #1483):

sys/dev/usb/uslsa.c: revision 1.32

PR kern/56946
Baud rate must be in little endian for SLSA_R_SET_BAUDRATE request.

(martin)

2022-08-01 08:09:30 UTC MAIN commitmail json YAML

Now really restore 1.24.

(mlelstv)

2022-08-01 07:37:18 UTC MAIN commitmail json YAML

2022-08-01 07:34:28 UTC MAIN commitmail json YAML

2022-08-01 06:56:43 UTC MAIN commitmail json YAML

sprinkle xf86SetModeDefaultName() since apparently xf86CVTMode() no longer
sets a mode's .name
now this works again on macppc

(macallan)

2022-08-01 01:32:15 UTC MAIN commitmail json YAML

ms_wscons_ioctl(): Return EPASSTHROUGH instead of -1, for unsupported
ioctl, as done for other backends of wsmouse(4).

(rin)

2022-07-31 17:11:41 UTC MAIN commitmail json YAML

in pmap_enter_ptpage(), if we are allowed to fail then fail rather than
waiting for memory to be available.  when we are mapping an anon or uobj page
then we will be holding the lock for that page owner, and sleeping to wait
for memory with a page owner lock held is illegal because the pagedaemon
can wait for that lock, which will lead to deadlock.  fixes PR 56932.

(chs)

2022-07-31 13:49:23 UTC MAIN commitmail json YAML

Fix build on 32bit.

(mlelstv)

2022-07-31 13:14:55 UTC MAIN commitmail json YAML

Count dropped packets caused by ENOBUFS as interface error.

(mlelstv)

2022-07-31 13:08:19 UTC MAIN commitmail json YAML

Don't panic for a negative offset, just fail the operation with EINVAL.

(mlelstv)

2022-07-31 13:01:17 UTC MAIN commitmail json YAML

Compute a unique port number from interface index.

(mlelstv)

2022-07-31 12:59:26 UTC MAIN commitmail json YAML

Don't report errors as timeout.

(mlelstv)

2022-07-31 12:40:35 UTC MAIN commitmail json YAML

Move libisns to /lib to allow /sbin/iscsid to work without /usr being
mounted.

(mlelstv)

2022-07-31 12:11:44 UTC MAIN commitmail json YAML

Report error code (SCT/SC).

(mlelstv)

2022-07-31 12:02:28 UTC MAIN commitmail json YAML

The namespace id is a 32bit value, in particular the "all namespaces" value
for global commands is 0xffffffff. While the driver only supports 16bit
numbers (device minor & 0xffff), we need to use the full value for pass
through commands.

This fixes e.g. logpage requests on the controller level.

(mlelstv)

2022-07-31 11:58:37 UTC MAIN commitmail json YAML

The status is an 8 bit field. Fix masks and move the status type field
to the correct bit position.

(mlelstv)

2022-07-31 11:28:46 UTC MAIN commitmail json YAML

Move attributes to the front of the __do_atomic_store declarations
(to make it compatible with c++ and other more nitpicky compiker invocations).
Should fix the build for sparc.

(martin)

2022-07-31 06:21:42 UTC MAIN commitmail json YAML

__quotactl(2): typo.

(dholland)

2022-07-30 17:12:39 UTC MAIN commitmail json YAML

amdgpu: Make sure to bus_dmamap_sync before using zero'd dummy page.

(riastradh)

2022-07-30 17:03:51 UTC MAIN commitmail json YAML

2022-07-30 16:55:00 UTC MAIN commitmail json YAML

amdgpu: Make sure dummy page is zero-filled.

(riastradh)

2022-07-30 16:34:00 UTC MAIN commitmail json YAML

Pull an upstream (post-21.1) fix for xf86CompatOutput().

https://gitlab.freedesktop.org/xorg/xserver/-/commit/75d70612888f18339703315549db781a22c0cb23
This is an additional fix against the previous revision that is
avaiable in 21.1 branch:
https://gitlab.freedesktop.org/xorg/xserver/-/commit/80eeff3ebac772e25c9107199989e677457dbe06
and may avoid a possible out of bounds access at least on dumb wsfb servers.

ok'ed by mrg@ on current-users@:
https://mail-index.netbsd.org/current-users/2022/07/24/msg042731.html

(tsutsui)

2022-07-30 16:13:54 UTC MAIN commitmail json YAML

Restore -flipPixels option removed in upstream server-21.1-branch.

https://gitlab.freedesktop.org/xorg/xserver/-/commit/d1c00c859c6676fbb540420c9055788bc19cb18f
Note ScrnInfoRec structure in hw/xfree86/common/xf86str.h isn't reverted
because it isn't used by -flipPixels option so that we can keep ABI
compatibility among xf86-video-foo drivers.

This -flipPixels is mandatory at least by Xorg server users with
xf86-video-wsfb driver on NetBSD/mac68k and SE/30 mono screen
that has "black=1 and white=0" VRAM.

"go for it" by mrg@ on current-users@:
https://mail-index.netbsd.org/current-users/2022/07/24/msg042731.html

(tsutsui)

2022-07-30 14:13:27 UTC MAIN commitmail json YAML

sys/atomic.h: Fix atomic_store_* on sparcv7, sparcv8.

These did not cooperate with the hash-locked scheme of the other
atomic operations, with the effect that, for instance, a typical
naive spin lock based on atomic_*,

volatile unsigned locked = 0;
lock()
{
while (atomic_swap_uint(&locked, 1))
continue;
membar_acquire();
}
unlock()
{
membar_release();
atomic_store_relaxed(&locked, 0);
}

would fail to achieve mutual exclusion.

For this case, we need to use atomic_swap_* (or, for 8- or 16-bit
objects, atomic_cas_32 loops, since there is no atomic_swap_8 or
atomic_swap_16).

The new machine/types.h macro __HAVE_HASHLOCKED_ATOMICS says whether
these contortions are necessary.

Note that this _requires_ the use of atomic_store_*(p, v), not
regular stores *p = v, to work with the r/m/w atomic operations.

(riastradh)

2022-07-30 14:11:01 UTC MAIN commitmail json YAML

x86: Eliminate mfence hotpatch for membar_sync.

The more-compatible  LOCK ADD $0,-N(%rsp)  turns out to be cheaper
than MFENCE anyway.  Let's save some space and maintenance and rip
out the hotpatching for it.

(riastradh)

2022-07-30 13:09:20 UTC MAIN commitmail json YAML

2022-07-30 13:03:05 UTC MAIN commitmail json YAML

osnet: Stop disabling dtrace probes.

(riastradh)

2022-07-30 12:59:31 UTC MAIN commitmail json YAML

zfs: Give condvars more meaningful names.

These will be truncated to 16 characters, but hey, better'n `zfscv'.

(riastradh)

2022-07-30 12:48:17 UTC MAIN commitmail json YAML

aprint_error_dev is for autoconfig messages, use device_printf instead.

(mlelstv)

2022-07-30 07:27:55 UTC MAIN commitmail json YAML

Fix WSMOUSEIO_GTYPE so that X does not fail to initialize wsmouse(4).

(rin)

2022-07-30 03:29:52 UTC MAIN commitmail json YAML

COPTS -> CWARNFLAGS

(tnn)

2022-07-30 03:26:45 UTC MAIN commitmail json YAML

amdgpu: add some more CWARNFLAGS to appease clang

XXX backport this change to files.amdgpu

(tnn)

2022-07-30 03:12:00 UTC MAIN commitmail json YAML

amdgpu: don't set -mhard-float for clang

clang complains that the option has no effect and it generates hard
float instructions without the option. soft-float not really supported
on x86_64 with clang from what I can tell.

(tnn)

2022-07-30 00:55:38 UTC MAIN commitmail json YAML

The new drm modules made the image file grow again!  Bump the size
limit a bit.

XXX Other $ARCH might also need this.

(pgoyette)

2022-07-29 23:50:44 UTC MAIN commitmail json YAML

2022-07-29 20:55:41 UTC MAIN commitmail json YAML

s/collissions/collisions/

(andvar)

2022-07-29 15:30:42 UTC MAIN commitmail json YAML

Improve a couple of comments

(skrll)

2022-07-29 15:29:07 UTC MAIN commitmail json YAML

Trailing whitespace

(skrll)

2022-07-29 15:25:51 UTC MAIN commitmail json YAML

No need to wrap the call to if_detach with splnet / splx as if_detach
raises spl as required.

(skrll)

2022-07-29 15:24:28 UTC MAIN commitmail json YAML

Fix a typo in a comment.

(skrll)

2022-07-29 15:19:30 UTC MAIN commitmail json YAML

KNF a comment

(skrll)

2022-07-29 13:07:15 UTC MAIN commitmail json YAML

PR kern/56946

Baud rate must be in little endian for SLSA_R_SET_BAUDRATE request.

(rin)

2022-07-29 12:49:17 UTC MAIN commitmail json YAML

update for new openssl releases, mention openssl 3.0.5

(wiz)

2022-07-29 12:43:15 UTC MAIN commitmail json YAML

amdgpu: Make amdgpu_ttm_io_mem_pfn return pfn, not paddr.

(riastradh)

2022-07-29 10:08:01 UTC MAIN commitmail json YAML

x86: Disable new DRM_LEGACY option in INSTALL kernel.

The INSTALL kernel appears to be intended to have no drm in it at
all, but DRM_LEGACY brings it in just for modules.

(riastradh)

2022-07-29 07:58:18 UTC MAIN commitmail json YAML

2022-07-29 07:46:19 UTC MAIN commitmail json YAML

Trailing whitespace

(skrll)

2022-07-29 07:35:16 UTC MAIN commitmail json YAML

Remove obsoleted comments.

These comments are added with IFNET_LOCK by in_pcb.c:r1.180 and
in6_pcb.c:r1.162.  And then, IFNET_LOCK codes are removed in
in_pcb.c:r1.183 and in6_pcb.c:r1.166, however the comments have
remained.

(knakahara)

2022-07-28 22:00:24 UTC MAIN commitmail json YAML

2022-07-28 21:52:37 UTC MAIN commitmail json YAML

drm: New option DRM_LEGACY.

This brings in the `drmums' components, which are the parts of the
current drm code base (sys/external/bsd/drm2) needed by legacy
user-mode-setting drivers (currently just viadrmums), in contrast to
the old drm code base (sys/external/bsd/drm).

This way, viadrmums.kmod can be loaded into GENERIC i386 kernels, but
platforms without any relevant legacy UMS drivers don't get the
legacy goo statically baked in.

(riastradh)

2022-07-28 16:45:31 UTC MAIN commitmail json YAML

2022-07-28 15:15:29 UTC MAIN commitmail json YAML

Trailing whitespace

(skrll)

2022-07-28 10:44:46 UTC MAIN commitmail json YAML

drmkms_sched: Fix typo in module definition.

(riastradh)

2022-07-28 10:43:36 UTC MAIN commitmail json YAML

drmkms_sched: Remove duplicate module definition.

(riastradh)

2022-07-28 10:42:46 UTC MAIN commitmail json YAML

2022-07-28 10:41:07 UTC MAIN commitmail json YAML

drmkms_sched: Revert previous MKLDSCRIPT, red herring.

(riastradh)

2022-07-28 10:26:26 UTC MAIN commitmail json YAML

arm/pic: Mark definitions static to match declarations.

(riastradh)

2022-07-28 10:26:15 UTC MAIN commitmail json YAML

arm/pic: Assert ci_cpl doesn't lower across interrupt handler.

(riastradh)