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

2024-05-10 08:11:16 UTC Now

2023-03-22 21:14:46 UTC MAIN commitmail json YAML

Pass B_PHYS when reading from device.  Xbd(4) at least checks
this flag and may trigger an assertion.

(hannken)

2023-03-22 19:01:57 UTC netbsd-10 commitmail json YAML

2023-03-22 19:00:47 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by hannken in ticket #124):

tests/lib/libc/sys/t_ptrace_syscall_wait.h: revision 1.3
sys/arch/sparc/sparc/syscall.c: revision 1.32
sys/arch/sparc/sparc/vm_machdep.c: revision 1.108

Adjust pc/npc before syscall allowing EJUSTRETURN to return
to the next instruction.  Only ERESTART should return to
the same instruction.  Differences to sparc64 reduced.

Test t_ptrace_wait:syscallemu1 now passes on sparc.

Fixes PR kern/52166 "syscallemu does not work on sparc (32-bit)"

Ok: Martin Husemann

(martin)

2023-03-22 17:46:20 UTC netbsd-10 commitmail json YAML

2023-03-22 13:00:54 UTC MAIN commitmail json YAML

Ignore non-recoverable and critical limits smaller than the warning limits.
These are usually invalid.

Name the limit flags to make code more readable.

(mlelstv)

2023-03-22 03:17:18 UTC MAIN commitmail json YAML

in6: make sure a user-specified checksum field is within a packet

From OpenBSD

(ozaki-r)

2023-03-21 22:07:29 UTC MAIN commitmail json YAML

octrnm(4): Raise delay on startup.

According to CN50XX-HRM-V0.99E and CN78XX-HM-0.99E:

  The entropy is provided by the jitter of 125 of 128 free-running
  oscillators XORed into a 128-bit LFSR.  The LFSR accumulates entropy
  over 81 cycles, after which it is fed into a SHA-1 engine.
  [...]
  The SHA-1 engine runs once every 81 cycles.
  [...]
  The hardware produces new 64-bit random number every 81 cycles.

The last sentence means that we only need to wait 81 cycles _between_
consecutive SHA-1 outputs (which isn't relevant anyway because we
reconfigure it into raw mode later), but the first two quotes might
mean that we need to wait 81+81 cycles for the _first_ output to be
produced on boot when running the self-test.

Now, in this case, the self-test is run with the LFSR unhooked, by
clearing the RNM_CTL_STATUS[ENT_EN] bit, so that SHA-1 is computed
from a known input -- this is really just paranoia to make sure that
_some_ functions of the device (which is conjured out of thin air at
a fixed virtual address, with no firmware bindings to guide us)
behave as we expect.

And it's not clear if it really does take 81+81 cycles for the first
SHA-1 output to appear when the LFSR isn't feeding into it anyway.
But experimentally, delay of 81+81 cycles seems to work whereas a
delay of only 81 cycles crashes.

PR kern/57280

XXX pullup-10
XXX pullup-9

(riastradh)

2023-03-21 16:55:49 UTC MAIN commitmail json YAML

2023-03-21 15:47:46 UTC MAIN commitmail json YAML

PR/57279: Izumi Tsutsui: Fix some {int,long} -> time_t. Still things will
break eventually because parts of the nfs protocol assume time_t will fit
in 32 bits.

(christos)

2023-03-21 08:31:30 UTC MAIN commitmail json YAML

Use "sigjmp_buf loc" after switch to sigsetjmp()/siglongjmp().

Fixes errors and aborts on sparc at least.

(hannken)

2023-03-20 17:25:14 UTC netbsd-10 commitmail json YAML

2023-03-20 17:24:15 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by mrg in ticket #122):

sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c: revision 1.11
sys/external/bsd/drm2/nouveau/nouveau_pci.c: revision 1.37
sys/external/bsd/drm2/radeon/radeon_pci.c: revision 1.22
sys/dev/wscons/wsdisplay.c: revision 1.166
sys/dev/wscons/wsdisplayvar.h: revision 1.57

amdgpu: Fix bogus loop invariant assertions in amdgpu_gart_map.
nouveau: Kick out genfb on firmware framebuffer before initializing.

PR kern/53126

radeon: Kick out genfb on firmware framebuffer before initializing.
this is the same change as nouveau_pci.c:1.37, and should fix at
least PR#56714 and i thought at least another PR i can't find right
now.  it fixes at least 2 different radeon cards for me on UEFI
booted system.

(martin)

2023-03-20 11:19:30 UTC MAIN commitmail json YAML

Adjust pc/npc before syscall allowing EJUSTRETURN to return
to the next instruction.  Only ERESTART should return to
the same instruction.  Differences to sparc64 reduced.

Test t_ptrace_wait:syscallemu1 now passes on sparc.

Fixes PR kern/52166 "syscallemu does not work on sparc (32-bit)"

Ok: Martin Husemann

(hannken)

2023-03-20 11:07:33 UTC MAIN commitmail json YAML

__HAVE_HASHLOCKED_ATOMICS needs to be visible to userland

(martin)

2023-03-20 09:15:52 UTC MAIN commitmail json YAML

in6: reject setting negative values but -1 via setsockopt(IPV6_CHECKSUM)

Same as OpenBSD.

(ozaki-r)

2023-03-20 05:58:56 UTC MAIN commitmail json YAML

2023-03-19 23:07:25 UTC MAIN commitmail json YAML

2023-03-19 17:55:57 UTC MAIN commitmail json YAML

Do a better job handling EACCES errors from exec() calls.  If the
EACCES is from the namei(), treat it just like ENOENT or ENOTDIR
(and if that is the final error, the exit status from a failed exec
will be 127).  If the EACCES is from the exec() itself, that indicates
the file to be run exists, but has no 'x' permission.  That's a
meaningful error (as distinct from just "yet another PATH element
search failure").

While here, return the first meaingful error we encountered while
searching PATH, rather than the last (and ENOENT if there are none
of those).

This change results in some failed command executions returning status
127 now, where they returned 126 before - which better reflects the
intent of those values (127 is simply "not found" whereas 126 is "found
but couldn't be executed").

We still do nothing to distinguish errors encountered looking up the
command name give, with errors encountered (by the kernel) attempting to
run an interpreter needed for the exec to succeed (#! line path, or
/libexec/ld.elf_so and similar - or anything else of a similar nature).

(kre)

2023-03-19 17:47:48 UTC MAIN commitmail json YAML

Switch from using _setjmp()/_longjmp() (on BSD systems which aren't SVR4)
(and setjmp()/longjmp() elsewhere) to using sigsetjmp()/siglongjmp()
everywhere.

NFCI.

(kre)

2023-03-19 17:45:30 UTC MAIN commitmail json YAML

Change a few #defines from octal to hex (pdp11 days are long gone).
Improve the layout of those definitions at the same time.

NFC.

(kre)

2023-03-19 17:26:12 UTC MAIN commitmail json YAML

PR misc/57276 from Nan Xiao

Remove redundant word ("to").

(kre)

2023-03-18 22:20:12 UTC MAIN commitmail json YAML

2023-03-18 11:36:23 UTC MAIN commitmail json YAML

Can't use disklabel to find the real size of a disk since a fake disklabel
read from disk is trusted. Revert to use drvctl again.

(mlelstv)

2023-03-17 17:16:06 UTC MAIN commitmail json YAML

s/Brigthness/Brightness/ in comment.

(andvar)

2023-03-17 17:12:54 UTC MAIN commitmail json YAML

s/enougth/enough/

(andvar)

2023-03-17 00:46:35 UTC MAIN commitmail json YAML

Avoid overflow of nfs_commitsize on machines with > 32GB RAM.

(mlelstv)

2023-03-16 07:20:28 UTC MAIN commitmail json YAML

openssh 9.3 is out

(wiz)

2023-03-16 07:19:51 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by hannken in ticket #121):

sys/dev/vnd.c: revision 1.288

Do not limit the number of pending requests for the worker thread.

With wedge on vnd it prevents a deadlock when requests get queued with
biodone() -> dkstart() -> vndstrategy().

Fixes PR kern/57263 "vnd locks up when using vn_rdwr"

(martin)

2023-03-15 20:39:12 UTC MAIN commitmail json YAML

mountd(8): comma before "and"

Not a serial comma, technically, as there are only two items, but it
makes reading easier, IMHO.

(uwe)

2023-03-15 20:33:04 UTC MAIN commitmail json YAML

mountd(8): fix minor markup nits

While here, use $() instead of `` in the example.

(uwe)

2023-03-15 18:44:39 UTC netbsd-9 commitmail json YAML

2023-03-15 18:43:28 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by hannken in ticket #1614):

sys/dev/vnd.c: revision 1.288

Do not limit the number of pending requests for the worker thread.

With wedge on vnd it prevents a deadlock when requests get queued with
biodone() -> dkstart() -> vndstrategy().

Fixes PR kern/57263 "vnd locks up when using vn_rdwr"

(martin)

2023-03-15 18:42:44 UTC netbsd-10 commitmail json YAML

2023-03-15 01:25:02 UTC MAIN commitmail json YAML

+BQP    bounded-error quantum polynomial time
+KEM    key encapsulation mechanism
+PQC    post-quantum cryptography

(jschauma)

2023-03-14 21:50:25 UTC MAIN commitmail json YAML

service(8): fix markup

(uwe)

2023-03-14 19:04:17 UTC MAIN commitmail json YAML

Add SPIR (standard portable intermediate representation).

(fcambus)

2023-03-14 17:15:36 UTC netbsd-10 commitmail json YAML

2023-03-14 17:14:06 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by nros in ticket #120):

external/mit/xorg/lib/xkeyboard-config/xkeyboard-config.pc.in: revision 1.2
external/mit/xorg/lib/xkeyboard-config/xkeyboard-config.man: revision 1.12

Fix xkb_base in the pkg-config file and mapage for xkeyboard-config

The xkbdata files are installed in /usr/X11R7/lib/X11/xkb
not /usr/X11R7/share/X11/xkb. The wrong directory causes
build failures in pkgsrc packages that use the xkb_base
variable.

Also base the datadir on the vars from bsd.x11.mk.

Also use @xkb_base@ instead of /usr/X11R7/share/lib/X11/xkb
in the manpage to show the right xkbdata directory.

(martin)

2023-03-14 17:12:38 UTC netbsd-9 commitmail json YAML

2023-03-14 17:11:13 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by kardel in ticket #119):

sys/net/npf/npf_mbuf.c: revision 1.25
sys/net/npf/npf.h: revision 1.64
sys/net/npf/npf_sendpkt.c: revision 1.23

PR kern/56052:
allow block-return packets passed through without rule matching.
Included up-stream ashttps://github.com/rmind/npf/pull/115

(martin)

2023-03-14 17:09:21 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by kardel in ticket #119):

sys/net/npf/npf_mbuf.c: revision 1.25
sys/net/npf/npf.h: revision 1.64
sys/net/npf/npf_sendpkt.c: revision 1.23

PR kern/56052:
allow block-return packets passed through without rule matching.
Included up-stream ashttps://github.com/rmind/npf/pull/115

(martin)

2023-03-14 17:04:51 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by kardel in ticket #1612):

usr.sbin/npf/npf-params.7: revision 1.9
sys/net/npf/npf_params.c: revision 1.6

PR kern/55654:

Switch default for parameter npf ip4.reassembly to 1.

This makes the NPF default configuration comply with host
requirements for IPv4.

(martin)

2023-03-14 17:02:58 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by kardel in ticket #118):

usr.sbin/npf/npf-params.7: revision 1.9
sys/net/npf/npf_params.c: revision 1.6

PR kern/55654:

Switch default for parameter npf ip4.reassembly to 1.

This makes the NPF default configuration comply with host
requirements for IPv4.

(martin)

2023-03-14 12:55:43 UTC MAIN commitmail json YAML

Do not limit the number of pending requests for the worker thread.

With wedge on vnd it prevents a deadlock when requests get queued with
biodone() -> dkstart() -> vndstrategy().

Fixes PR kern/57263 "vnd locks up when using vn_rdwr"

(hannken)

2023-03-14 10:36:07 UTC MAIN commitmail json YAML

In bwrite() if the write() returned -1, the associated errno was
being used after a (possible) call to printf (only happens when
debugging) and a certain call to free() (via brelse()).
Make a copy, and use that instead.

(kre)

2023-03-14 09:54:40 UTC MAIN commitmail json YAML

Correct a minor word usage error in a comment.  NFC.

(kre)

2023-03-14 09:25:13 UTC MAIN commitmail json YAML

Use %zd to print ssize_t (%z[uxo] for size_t), rather than %jd
(just like the other adjacent printfs do)

Should fix i386 build.

(kre)

2023-03-14 06:19:35 UTC MAIN commitmail json YAML

Don't inappropriately use xargs to run rcorder -- xargs is designed
to run the given command as many times as necessary, but rcorder must
be run just once, with all the rc.d scripts as args.  If that turns out
to be too many (E2BIG on exec) then we have more serious problems, working
around it by use of xargs just makes a mess (for rcorder).

Make the -e option cause the script to exit 0 if some enabled script was
found, and 1 if not, so one can do:
if service -e foobar >/dev/null
then
whatever we want to do when foobar is enabled
else
anything we want instead if it is not
fi
Someday perhaps add a -q to suppress the output instead of requiring
the redirect, but that day is not this one.  Make all error exit status
codes be >1 (and use the standard 126 instead of 255, for "exec failed").

Note that with more than one service given with -e, or when none are (so
all enabled scripts are listed) the exit status is 0 if any enabled script
was found (ie: anything was printed to stdout), not if all named scripts
exist and are enabled.  Testing the status works best with just one
script name given as an arg.

Correctly quote script names (and use eval where required) so scripts
(or paths to scripts) containing spaces, tabs, or shell operator chars
might be handled correctly (newlines in names will still cause failures.)

Treat rc.d scripts that do not have an rcvar (hence are always enabled)
as enabled scripts, rather than disabled - but ignore the LOGIN DAEMON...
pseudo-scripts.

While here, replace archaic uses of "test" ('[') (that is, -a etc) with
standard defined usages only, replace a baroque use of sed with sh code
(which is simpler and much faster, not that speed matters) - but do use sed
instead of two grep invocations.  Replace all uses of "echo" with "printf"
(just "because"!)  Make the usage more useful (explain what the various
option combinations achieve, explicitly), and also while here, make the
formatting look closer to something I can deal with (personally I prefer
tab indents almost everywhere, but 4 space is OK...)  Aligned runs of 8
spaces were all replaced by a tab.  For the options, use sh boolean cmds
(true|false), and simply run them, rather than making them be empty or set
and using test -n, it is easier to follow (and a tiny fraction of a ns faster).
Change a comment so what it says is relevant to the code that is present,
rather than to the change (referring to code that used to be present) with
which it was added.

Catch the manual page up with the minor parts of this intended to be
visible to users (like the exit status change).

(kre)

2023-03-14 05:49:03 UTC MAIN commitmail json YAML

Add (newly added): expm1l log1pl log2l lgammal tgammal
so that the library gets the correct symbols defined in it.

(kre)

2023-03-14 00:55:31 UTC MAIN commitmail json YAML

atf-c-api.3: correct ATF_TP_ADD_TC() examples to use "tp"

(gutteridge)

2023-03-13 22:17:24 UTC MAIN commitmail json YAML

Don't brelse() if bread() fails. The kernel does this for us. Our bread()
implementation just exits on failure, but if it didn't we would double-free.
From Ed Maste (https://reviews.freebsd.org/D39069)

(christos)

2023-03-13 22:10:30 UTC MAIN commitmail json YAML

modernize; release bpp and set it to NULL as the kernel does even if we
never return here.

(christos)

2023-03-13 21:40:40 UTC netbsd-10 commitmail json YAML

2023-03-13 21:40:24 UTC netbsd-10 commitmail json YAML

Pull up the following revision (requested by martin in ticket #117):

build.sh: revision 1.366 via patch

Avoid the dependency on a populated tooldir (or building the tools)
when simply doing mkrepro-timestamp and the current repository setups
does not actually require it.

(jdc)

2023-03-13 21:38:46 UTC netbsd-9 commitmail json YAML

2023-03-13 21:38:13 UTC netbsd-9 commitmail json YAML

Pull up the following revision (requested by martin in ticket #1611):

build.sh: revision 1.366 via patch

Avoid the dependency on a populated tooldir (or building the tools)
when simply doing mkrepro-timestamp and the current repository setups
does not actually require it.

(jdc)

2023-03-13 21:36:56 UTC netbsd-8 commitmail json YAML

2023-03-13 21:36:29 UTC netbsd-8 commitmail json YAML

Pull up the following revision (requested by martin in ticket #1807):

build.sh: revision 1.366 via patch

Avoid the dependency on a populated tooldir (or building the tools)
when simply doing mkrepro-timestamp and the current repository setups
does not actually require it.

(jdc)

2023-03-13 21:06:02 UTC netbsd-8 commitmail json YAML

2023-03-13 18:26:32 UTC MAIN commitmail json YAML

libm: Need <math.h> for __HAVE_LONG_DOUBLE.

Fixes missing definitions of lrintl, llrintl on various platforms.

(riastradh)

2023-03-13 18:18:36 UTC MAIN commitmail json YAML

libm: Fill in more dummy long double transcendental functions.

This should cover everything from C99.

(riastradh)

2023-03-13 18:13:19 UTC MAIN commitmail json YAML

vn_open(9): Add assertion that vp is locked on return.

Null out vp internally out of paranoia so we'll crash in evaluating
the assertion if we ever reach it via one of the vput paths.

(riastradh)

2023-03-13 18:12:52 UTC MAIN commitmail json YAML

vn_open(9): Clarify that this returns a locked vnode.

Comment only, no functional change intended.

(riastradh)

2023-03-13 11:52:29 UTC MAIN commitmail json YAML

Avoid the dependency on a populated tooldir (or building the tools)
when simply doing mkrepro-timestamp and the current repository setups
does not actually require it.

(martin)

2023-03-12 17:53:01 UTC netbsd-10 commitmail json YAML

2023-03-12 17:52:13 UTC netbsd-10 commitmail json YAML

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

sys/dev/acpi/igpio_acpi.c: revision 1.2
share/man/man4/igpio.4: revision 1.4

igpio(4): Disable Baytrail and Lynxpoint support. Fixes PR kern/57225.
It seems additional code is required to support Baytrail and Lynxpoint.

Disable those support.

(martin)

2023-03-12 17:22:47 UTC MAIN commitmail json YAML

PR 57241: switch mips64el back to old binutils for now

(martin)

2023-03-10 18:26:47 UTC MAIN commitmail json YAML

Note more user visible changes by me that will appear in NetBSD 10.0.

(tsutsui)

2023-03-10 18:00:27 UTC MAIN commitmail json YAML

Move changes pulled up to netbsd-10 from CHANGES to CHANGES.prev.

(tsutsui)

2023-03-09 07:06:43 UTC MAIN commitmail json YAML

make: document how read-only variables can be made read-write

(rillig)

2023-03-09 06:49:37 UTC MAIN commitmail json YAML

make: fix memory leak when parsing ':from=to' modifiers

Since var.c 1.925 from 2021-04-12.

(rillig)

2023-03-07 21:24:19 UTC MAIN commitmail json YAML

2023-03-07 20:23:00 UTC MAIN commitmail json YAML

remove "nouveau" from a comment.  noted by jmcneill.

(mrg)

2023-03-07 20:02:57 UTC netbsd-8 commitmail json YAML

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

sys/kern/vfs_syscalls.c: revision 1.557

open(2): Don't map ERESTART to EINTR.

If a file or device's open function returns ERESTART, respect that --
restart the syscall; don't pretend a signal has been delivered when
it was not.  If an SA_RESTART signal was delivered, POSIX does not
allow it to fail with EINTR:

    SA_RESTART
        This flag affects the behavior of interruptible functions;
        that is, those specified to fail with errno set to [EINTR].
        If set, and a function specified as interruptible is
        interrupted by this signal, the function shall restart and
        shall not fail with [EINTR] unless otherwise specified.  If
        an interruptible function which uses a timeout is restarted,
        the duration of the timeout following the restart is set to
        an unspecified value that does not exceed the original
        timeout value.  If the flag is not set, interruptible
        functions interrupted by this signal shall fail with errno
        set to [EINTR].

https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html

Nothing in the POSIX definition of open specifies otherwise.

In 1990, Kirk McKusick added these lines with a mysterious commit
message:
Author: Kirk McKusick <mckusick>
Date:  Tue Apr 10 19:36:33 1990 -0800
    eliminate longjmp from the kernel (for karels)
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 7bc7b39bbf..d572d3a32d 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -14,7 +14,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- *    @(#)vfs_syscalls.c      7.42 (Berkeley) 3/26/90
+ *    @(#)vfs_syscalls.c      7.43 (Berkeley) 4/10/90
  */
#include "param.h"
@@ -530,8 +530,10 @@ copen(scp, fmode, cmode, ndp, resultfd)
        if (error = vn_open(ndp, fmode, (cmode & 07777) &~ S_ISVTX)) {
                crfree(fp->f_cred);
                fp->f_count--;
-              if (error == -1)        /* XXX from fdopen */
-                      return (0);    /* XXX from fdopen */
+              if (error == EJUSTRETURN)      /* XXX from fdopen */
+                      return (0);            /* XXX from fdopen */
+              if (error == ERESTART)
+                      error = EINTR;
                scp->sc_ofile[indx] = NULL;
                return (error);
        }

(found via this git import of the CSRG history:
https://github.com/robohack/ucb-csrg-bsd/commit/cce2869b7ae5d360921eb411005b328a29c4a3fe

This change appears to have served two related purposes:
1. The fdopen function (the erstwhile open routine for /dev/fd/N)
  used to return -1 as a hack to mean it had just duplicated the fd;
  it was recently changed by Mike Karels, in kern_descrip.c 7.9, to
  return EJUSTRETURN, now defined to be -2, presumably to avoid a
  conflict with ERESTART, defined to be -1.  So this change finished
  part of the change by Mike Karels to use a different magic return
  code from fdopen.
  Of course, today we use still another disgusting hack, EDUPFD, for
  the same purpose, so none of this is relevant any more.
2. Prior to April 1990, the kernel handled signals during tsleep(9)
  by longjmping out to the system call entry point or similar.  In
  April 1990, Mike Karels worked to convert all of that into
  explicit unwind logic by passing through EINTR or ERESTART as
  appropriate, instead of setjmp at each entry point.

However, it's not clear to me why this setjmp/longjmp and
fdopen/-1/EJUSTRETURN renovation justifies unconditional logic to map
ERESTART to EINTR in open(2).  I suspect it was a mistake.

In 2013, the corresponding logic to map ERESTART to EINTR in open(2)
was removed from FreeBSD:

  r246472 | kib | 2013-02-07 14:53:33 +0000 (Thu, 07 Feb 2013) | 11 lines
  Stop translating the ERESTART error from the open(2) into EINTR.
  Posix requires that open(2) is restartable for SA_RESTART.
  For non-posix objects, in particular, devfs nodes, still disable
  automatic restart of the opens. The open call to a driver could have
  significant side effects for the hardware.
  Noted and reviewed by:  jilles
  Discussed with: bde
  MFC after:      2 weeks

Index: vfs_syscalls.c
===================================================================
--- vfs_syscalls.c      (revision 246471)
+++ vfs_syscalls.c      (revision 246472)
@@ -1106,8 +1106,6 @@
                                goto success;
                }
-              if (error == ERESTART)
-                      error = EINTR;
                goto bad;
        }
        td->td_dupfd = 0;

https://cgit.freebsd.org/src/commit/sys/kern/vfs_syscalls.c?id=2ca49983425886121b506cb5126b60a705afc38c">https://cgit.freebsd.org/src/commit/sys/kern/vfs_syscalls.c?id=2ca49983425886121b506cb5126b60a705afc38c

It's not clear to me that there's any reason to treat device nodes
specially here; in fact, if a driver's .d_open routine sleeps and is
woken by a concurrent revoke without a signal pending or with an
SA_RESTART signal pending, it is wrong for it to fail with EINTR.

But it MUST restart the whole system call rather than continue
sleeping in a loop or just exit the loop and continue to open,
because it is mandatory in the security model of revoke for open(2)
to retry the permissions check at that point.

PR kern/57260

(martin)

2023-03-07 20:02:05 UTC netbsd-9 commitmail json YAML

2023-03-07 20:01:07 UTC netbsd-9 commitmail json YAML

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

sys/kern/vfs_syscalls.c: revision 1.557

open(2): Don't map ERESTART to EINTR.

If a file or device's open function returns ERESTART, respect that --
restart the syscall; don't pretend a signal has been delivered when
it was not.  If an SA_RESTART signal was delivered, POSIX does not
allow it to fail with EINTR:

    SA_RESTART
        This flag affects the behavior of interruptible functions;
        that is, those specified to fail with errno set to [EINTR].
        If set, and a function specified as interruptible is
        interrupted by this signal, the function shall restart and
        shall not fail with [EINTR] unless otherwise specified.  If
        an interruptible function which uses a timeout is restarted,
        the duration of the timeout following the restart is set to
        an unspecified value that does not exceed the original
        timeout value.  If the flag is not set, interruptible
        functions interrupted by this signal shall fail with errno
        set to [EINTR].

https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html

Nothing in the POSIX definition of open specifies otherwise.

In 1990, Kirk McKusick added these lines with a mysterious commit
message:
Author: Kirk McKusick <mckusick>
Date:  Tue Apr 10 19:36:33 1990 -0800
    eliminate longjmp from the kernel (for karels)
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 7bc7b39bbf..d572d3a32d 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -14,7 +14,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- *    @(#)vfs_syscalls.c      7.42 (Berkeley) 3/26/90
+ *    @(#)vfs_syscalls.c      7.43 (Berkeley) 4/10/90
  */
#include "param.h"
@@ -530,8 +530,10 @@ copen(scp, fmode, cmode, ndp, resultfd)
        if (error = vn_open(ndp, fmode, (cmode & 07777) &~ S_ISVTX)) {
                crfree(fp->f_cred);
                fp->f_count--;
-              if (error == -1)        /* XXX from fdopen */
-                      return (0);    /* XXX from fdopen */
+              if (error == EJUSTRETURN)      /* XXX from fdopen */
+                      return (0);            /* XXX from fdopen */
+              if (error == ERESTART)
+                      error = EINTR;
                scp->sc_ofile[indx] = NULL;
                return (error);
        }

(found via this git import of the CSRG history:
https://github.com/robohack/ucb-csrg-bsd/commit/cce2869b7ae5d360921eb411005b328a29c4a3fe

This change appears to have served two related purposes:
1. The fdopen function (the erstwhile open routine for /dev/fd/N)
  used to return -1 as a hack to mean it had just duplicated the fd;
  it was recently changed by Mike Karels, in kern_descrip.c 7.9, to
  return EJUSTRETURN, now defined to be -2, presumably to avoid a
  conflict with ERESTART, defined to be -1.  So this change finished
  part of the change by Mike Karels to use a different magic return
  code from fdopen.
  Of course, today we use still another disgusting hack, EDUPFD, for
  the same purpose, so none of this is relevant any more.
2. Prior to April 1990, the kernel handled signals during tsleep(9)
  by longjmping out to the system call entry point or similar.  In
  April 1990, Mike Karels worked to convert all of that into
  explicit unwind logic by passing through EINTR or ERESTART as
  appropriate, instead of setjmp at each entry point.

However, it's not clear to me why this setjmp/longjmp and
fdopen/-1/EJUSTRETURN renovation justifies unconditional logic to map
ERESTART to EINTR in open(2).  I suspect it was a mistake.

In 2013, the corresponding logic to map ERESTART to EINTR in open(2)
was removed from FreeBSD:

  r246472 | kib | 2013-02-07 14:53:33 +0000 (Thu, 07 Feb 2013) | 11 lines
  Stop translating the ERESTART error from the open(2) into EINTR.
  Posix requires that open(2) is restartable for SA_RESTART.
  For non-posix objects, in particular, devfs nodes, still disable
  automatic restart of the opens. The open call to a driver could have
  significant side effects for the hardware.
  Noted and reviewed by:  jilles
  Discussed with: bde
  MFC after:      2 weeks

Index: vfs_syscalls.c
===================================================================
--- vfs_syscalls.c      (revision 246471)
+++ vfs_syscalls.c      (revision 246472)
@@ -1106,8 +1106,6 @@
                                goto success;
                }
-              if (error == ERESTART)
-                      error = EINTR;
                goto bad;
        }
        td->td_dupfd = 0;

https://cgit.freebsd.org/src/commit/sys/kern/vfs_syscalls.c?id=2ca49983425886121b506cb5126b60a705afc38c">https://cgit.freebsd.org/src/commit/sys/kern/vfs_syscalls.c?id=2ca49983425886121b506cb5126b60a705afc38c

It's not clear to me that there's any reason to treat device nodes
specially here; in fact, if a driver's .d_open routine sleeps and is
woken by a concurrent revoke without a signal pending or with an
SA_RESTART signal pending, it is wrong for it to fail with EINTR.

But it MUST restart the whole system call rather than continue
sleeping in a loop or just exit the loop and continue to open,
because it is mandatory in the security model of revoke for open(2)
to retry the permissions check at that point.

PR kern/57260

(martin)

2023-03-07 19:57:47 UTC netbsd-10 commitmail json YAML

2023-03-07 19:56:45 UTC netbsd-10 commitmail json YAML

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

sys/kern/vfs_syscalls.c: revision 1.557

open(2): Don't map ERESTART to EINTR.

If a file or device's open function returns ERESTART, respect that --
restart the syscall; don't pretend a signal has been delivered when
it was not.  If an SA_RESTART signal was delivered, POSIX does not
allow it to fail with EINTR:

    SA_RESTART
        This flag affects the behavior of interruptible functions;
        that is, those specified to fail with errno set to [EINTR].
        If set, and a function specified as interruptible is
        interrupted by this signal, the function shall restart and
        shall not fail with [EINTR] unless otherwise specified.  If
        an interruptible function which uses a timeout is restarted,
        the duration of the timeout following the restart is set to
        an unspecified value that does not exceed the original
        timeout value.  If the flag is not set, interruptible
        functions interrupted by this signal shall fail with errno
        set to [EINTR].

https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html

Nothing in the POSIX definition of open specifies otherwise.

In 1990, Kirk McKusick added these lines with a mysterious commit
message:
Author: Kirk McKusick <mckusick>
Date:  Tue Apr 10 19:36:33 1990 -0800
    eliminate longjmp from the kernel (for karels)
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 7bc7b39bbf..d572d3a32d 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -14,7 +14,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- *    @(#)vfs_syscalls.c      7.42 (Berkeley) 3/26/90
+ *    @(#)vfs_syscalls.c      7.43 (Berkeley) 4/10/90
  */
#include "param.h"
@@ -530,8 +530,10 @@ copen(scp, fmode, cmode, ndp, resultfd)
        if (error = vn_open(ndp, fmode, (cmode & 07777) &~ S_ISVTX)) {
                crfree(fp->f_cred);
                fp->f_count--;
-              if (error == -1)        /* XXX from fdopen */
-                      return (0);    /* XXX from fdopen */
+              if (error == EJUSTRETURN)      /* XXX from fdopen */
+                      return (0);            /* XXX from fdopen */
+              if (error == ERESTART)
+                      error = EINTR;
                scp->sc_ofile[indx] = NULL;
                return (error);
        }

(found via this git import of the CSRG history:
https://github.com/robohack/ucb-csrg-bsd/commit/cce2869b7ae5d360921eb411005b328a29c4a3fe

This change appears to have served two related purposes:
1. The fdopen function (the erstwhile open routine for /dev/fd/N)
  used to return -1 as a hack to mean it had just duplicated the fd;
  it was recently changed by Mike Karels, in kern_descrip.c 7.9, to
  return EJUSTRETURN, now defined to be -2, presumably to avoid a
  conflict with ERESTART, defined to be -1.  So this change finished
  part of the change by Mike Karels to use a different magic return
  code from fdopen.
  Of course, today we use still another disgusting hack, EDUPFD, for
  the same purpose, so none of this is relevant any more.
2. Prior to April 1990, the kernel handled signals during tsleep(9)
  by longjmping out to the system call entry point or similar.  In
  April 1990, Mike Karels worked to convert all of that into
  explicit unwind logic by passing through EINTR or ERESTART as
  appropriate, instead of setjmp at each entry point.

However, it's not clear to me why this setjmp/longjmp and
fdopen/-1/EJUSTRETURN renovation justifies unconditional logic to map
ERESTART to EINTR in open(2).  I suspect it was a mistake.

In 2013, the corresponding logic to map ERESTART to EINTR in open(2)
was removed from FreeBSD:

  r246472 | kib | 2013-02-07 14:53:33 +0000 (Thu, 07 Feb 2013) | 11 lines
  Stop translating the ERESTART error from the open(2) into EINTR.
  Posix requires that open(2) is restartable for SA_RESTART.
  For non-posix objects, in particular, devfs nodes, still disable
  automatic restart of the opens. The open call to a driver could have
  significant side effects for the hardware.
  Noted and reviewed by:  jilles
  Discussed with: bde
  MFC after:      2 weeks

Index: vfs_syscalls.c
===================================================================
--- vfs_syscalls.c      (revision 246471)
+++ vfs_syscalls.c      (revision 246472)
@@ -1106,8 +1106,6 @@
                                goto success;
                }
-              if (error == ERESTART)
-                      error = EINTR;
                goto bad;
        }
        td->td_dupfd = 0;

https://cgit.freebsd.org/src/commit/sys/kern/vfs_syscalls.c?id=2ca49983425886121b506cb5126b60a705afc38c">https://cgit.freebsd.org/src/commit/sys/kern/vfs_syscalls.c?id=2ca49983425886121b506cb5126b60a705afc38c

It's not clear to me that there's any reason to treat device nodes
specially here; in fact, if a driver's .d_open routine sleeps and is
woken by a concurrent revoke without a signal pending or with an
SA_RESTART signal pending, it is wrong for it to fail with EINTR.

But it MUST restart the whole system call rather than continue
sleeping in a loop or just exit the loop and continue to open,
because it is mandatory in the security model of revoke for open(2)
to retry the permissions check at that point.

PR kern/57260

(martin)

2023-03-07 19:53:31 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by thorpej in ticket #114):

lib/libc/sys/open.2: revision 1.66

Document the error code when O_REGULAR is specified and the last
path component is not a regular file.

(martin)

2023-03-07 19:52:02 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by thorpej in ticket #113):

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

In the HUP-wait path in ucomopen():
- Use cv_timedwait() rather than cv_timedwait_sig(); the wait here is
bounded (and fairly short besides) and seems appropriate to treat like
other uninterruptible waits.  The behavior is now consistent with com(4)
in this regard.
- Map EWOULDBLOCK return from cv_timedwait() to 0, as the successful passage
of time is not an error in this case.
- If the HUP-wait time has passed, clear the HUP-wait timestamp.

PR kern/57259 (although insufficient -- another change to vfs_syscalls.c
is required)

(martin)

2023-03-07 10:43:53 UTC MAIN commitmail json YAML

This example is plain asm code, running ctf tools on it is not usefull

(martin)

2023-03-07 09:47:48 UTC MAIN commitmail json YAML

radeon: Kick out genfb on firmware framebuffer before initializing.

this is the same change as nouveau_pci.c:1.37, and should fix at
least PR#56714 and i thought at least another PR i can't find right
now.  it fixes at least 2 different radeon cards for me on UEFI
booted system.

XXX: pullup-10 also include the original change:
  http://mail-index.netbsd.org/source-changes/2023/03/01/msg143606.html

(mrg)

2023-03-07 01:29:21 UTC MAIN commitmail json YAML

Add:
HCC - Home Cable Computer
HCCA - Home Cable Computer Adaptor (yes, that is the original spelling)

(thorpej)

2023-03-06 21:39:06 UTC MAIN commitmail json YAML

2023-03-06 13:15:15 UTC MAIN commitmail json YAML

doc: ch-ch-changes

(nia)

2023-03-06 12:25:06 UTC MAIN commitmail json YAML

Document __HAVE_UCAS_FULL and __HAVE_UCAS_MP.

(thorpej)

2023-03-06 05:54:54 UTC MAIN commitmail json YAML

Adjust the tilde expansion test to deal with (very) recent changes
to what the shell produces for tilde expansions, when the expansion
of the tilde prefix ends with '/' and the character immediately following
is another '/' - previously /bin/sh (and most other shells, but not all)
retained both slashes, and this test expected that behaviour.

No longer, now only one of the two will appear.  Adjust the expected
test results accordingly, and add an extra loop iteration to make sure
this is thoroughly tested (one more tilde expansion value).

Also, add two new test cases that test for the new (explicit - though
it was always stated this way, but not as explicitly) that if HOME is
an empty string (not unset - that remains an unspecified case, as it
was) then the expansion of ~ must generate "", and not nothing.
The current test was unable to distinguish those two, since it
simply looked for characters in the output, so add a new test cases
explicitly to test for this particular case.  This also means (also
previously in the standard, but not as explicitly) that shells are
not permitted to decide "The ~ expansion produces an empty string, that
is weird, let's generate something else instead" which some shells were
doing.

(kre)

2023-03-06 05:54:34 UTC MAIN commitmail json YAML

Adjust tilde expansion as will be documented in the forthcoming
version of the POSIX standard (Issue 8).  I believe we were already
compliant with what is to be required, but POSIX is now encouraging
(and will likely require in a later version) that if a tilde expansion
produces a string which ends in a '/' and the '~' that was expanded
is immediately followed by a '/' in the input word, that one of those
two slashes be omitted.  The worst (current) example of this is
when HOME=/ and we expand ~/foo - previously producing //foo which is
(in POSIX) a path with implementation defined semantics, and so not
what we should be generating by accident.  Change that, so now if
the ~ prefix expansion ends in a '/' and there is a '/' following
immediately after, the resulting word contains only one of those
chars (in the example just given, we will now produce /foo instead).

POSIX is also making it clear that the expansion that results from
the tilde expansion is treated as quoted (not subject to pathname
expansion, or field splitting, or any var/arith/command substitutions)
and that if HOME="" the expansion of ~ must generate "" (not nothing).
Our implementation did all of that already (though older versions
used to treat an empty expansion of HOME the same as if HOME was
unset - that was fixed some time ago).

The actual modification made here is probably smaller than this log entry,
and without added comments, certainly is!

(kre)

2023-03-06 01:28:54 UTC MAIN commitmail json YAML

Unless -v is given, ignore EEXIST errors from the IOC_CPU_UCODE_APPLY ioctl()
used to implement "cpuctl ucode N",  which indicates that the microcode
to be loaded already exists in the CPU, and as such, isn't really a
very interesting "error".

(kre)

2023-03-06 01:03:45 UTC MAIN commitmail json YAML

2023-03-06 00:49:32 UTC MAIN commitmail json YAML

portfeatures(9): the man page for the __HAVE macros

The man page itself is a skeleton/template for now.  Please add short
descriptions and xrefs.  If the target man page doesn't yet document
relevant __HAVE macros (hi, mutex(9)), please add something there,
possibly in a .Sh IMPLEMENTATION NOTES section.

(uwe)

2023-03-05 23:28:54 UTC MAIN commitmail json YAML

ucom(4): Simplify logic fixing PR kern/57259.

cv_timedwait only ever returns 0 or EWOULDBLOCK, so this would always
return ERESTART anyway.

No functional change intended.

(riastradh)

2023-03-05 23:24:06 UTC MAIN commitmail json YAML

In "devlist" mode, exit with a 0 return code if any nvme devices are
found, rather than exiting with 1 return code always.

(simonb)

2023-03-05 22:37:17 UTC MAIN commitmail json YAML

mpc is updated to 1.3.1.

(mrg)

2023-03-05 22:36:58 UTC MAIN commitmail json YAML

2023-03-05 22:13:48 UTC MAIN commitmail json YAML

note mpfr has a new version (4.2.0) and is updated, and
that mpc has a new version (1.3.1).

(mrg)

2023-03-05 22:12:02 UTC MAIN commitmail json YAML

2023-03-05 22:11:12 UTC MAIN commitmail json YAML

2023-03-05 22:04:54 UTC MAIN commitmail json YAML

Locate wedges as boot device and also match a partition GUID.

(mlelstv)

2023-03-05 18:03:35 UTC MAIN commitmail json YAML

2023-03-05 16:24:31 UTC MAIN commitmail json YAML

Document the error code when O_REGULAR is specified and the last
path component is not a regular file.

(thorpej)

2023-03-05 14:40:32 UTC MAIN commitmail json YAML

open(2): Don't map ERESTART to EINTR.

If a file or device's open function returns ERESTART, respect that --
restart the syscall; don't pretend a signal has been delivered when
it was not.  If an SA_RESTART signal was delivered, POSIX does not
allow it to fail with EINTR:

    SA_RESTART
        This flag affects the behavior of interruptible functions;
        that is, those specified to fail with errno set to [EINTR].
        If set, and a function specified as interruptible is
        interrupted by this signal, the function shall restart and
        shall not fail with [EINTR] unless otherwise specified.  If
        an interruptible function which uses a timeout is restarted,
        the duration of the timeout following the restart is set to
        an unspecified value that does not exceed the original
        timeout value.  If the flag is not set, interruptible
        functions interrupted by this signal shall fail with errno
        set to [EINTR].

https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html

Nothing in the POSIX definition of open specifies otherwise.

In 1990, Kirk McKusick added these lines with a mysterious commit
message:

Author: Kirk McKusick <mckusick>
Date:  Tue Apr 10 19:36:33 1990 -0800

    eliminate longjmp from the kernel (for karels)

diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 7bc7b39bbf..d572d3a32d 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -14,7 +14,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#)vfs_syscalls.c 7.42 (Berkeley) 3/26/90
+ * @(#)vfs_syscalls.c 7.43 (Berkeley) 4/10/90
  */

#include "param.h"
@@ -530,8 +530,10 @@ copen(scp, fmode, cmode, ndp, resultfd)
if (error = vn_open(ndp, fmode, (cmode & 07777) &~ S_ISVTX)) {
crfree(fp->f_cred);
fp->f_count--;
- if (error == -1) /* XXX from fdopen */
- return (0); /* XXX from fdopen */
+ if (error == EJUSTRETURN) /* XXX from fdopen */
+ return (0); /* XXX from fdopen */
+ if (error == ERESTART)
+ error = EINTR;
scp->sc_ofile[indx] = NULL;
return (error);
}

(found via this git import of the CSRG history:
https://github.com/robohack/ucb-csrg-bsd/commit/cce2869b7ae5d360921eb411005b328a29c4a3fe)

This change appears to have served two related purposes:

1. The fdopen function (the erstwhile open routine for /dev/fd/N)
  used to return -1 as a hack to mean it had just duplicated the fd;
  it was recently changed by Mike Karels, in kern_descrip.c 7.9, to
  return EJUSTRETURN, now defined to be -2, presumably to avoid a
  conflict with ERESTART, defined to be -1.  So this change finished
  part of the change by Mike Karels to use a different magic return
  code from fdopen.

  Of course, today we use still another disgusting hack, EDUPFD, for
  the same purpose, so none of this is relevant any more.

2. Prior to April 1990, the kernel handled signals during tsleep(9)
  by longjmping out to the system call entry point or similar.  In
  April 1990, Mike Karels worked to convert all of that into
  explicit unwind logic by passing through EINTR or ERESTART as
  appropriate, instead of setjmp at each entry point.

However, it's not clear to me why this setjmp/longjmp and
fdopen/-1/EJUSTRETURN renovation justifies unconditional logic to map
ERESTART to EINTR in open(2).  I suspect it was a mistake.

In 2013, the corresponding logic to map ERESTART to EINTR in open(2)
was removed from FreeBSD:

  r246472 | kib | 2013-02-07 14:53:33 +0000 (Thu, 07 Feb 2013) | 11 lines

  Stop translating the ERESTART error from the open(2) into EINTR.
  Posix requires that open(2) is restartable for SA_RESTART.

  For non-posix objects, in particular, devfs nodes, still disable
  automatic restart of the opens. The open call to a driver could have
  significant side effects for the hardware.

  Noted and reviewed by:  jilles
  Discussed with: bde
  MFC after:      2 weeks

Index: vfs_syscalls.c
===================================================================
--- vfs_syscalls.c (revision 246471)
+++ vfs_syscalls.c (revision 246472)
@@ -1106,8 +1106,6 @@
goto success;
}

- if (error == ERESTART)
- error = EINTR;
goto bad;
}
td->td_dupfd = 0;

https://cgit.freebsd.org/src/commit/sys/kern/vfs_syscalls.c?id=2ca49983425886121b506cb5126b60a705afc38c

It's not clear to me that there's any reason to treat device nodes
specially here; in fact, if a driver's .d_open routine sleeps and is
woken by a concurrent revoke without a signal pending or with an
SA_RESTART signal pending, it is wrong for it to fail with EINTR.
But it MUST restart the whole system call rather than continue
sleeping in a loop or just exit the loop and continue to open,
because it is mandatory in the security model of revoke for open(2)
to retry the permissions check at that point.

PR kern/57260

XXX pullup-8
XXX pullup-9
XXX pullup-10

(riastradh)

2023-03-05 14:38:29 UTC netbsd-10 commitmail json YAML

2023-03-05 14:37:14 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by mlelstv in ticket #112):

sbin/nvmectl/nvmectl.h: revision 1.10
sbin/nvmectl/logpage.c: revision 1.11
sbin/nvmectl/util.c: revision 1.3

Data units read/written are counted in 1000s of 512 bytes.

Convert to human-readable value.

(martin)

2023-03-05 14:34:59 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by hannken in ticket #111):

sys/miscfs/genfs/genfs_vnops.c: revision 1.220

Fix genfs_can_chtimes() to also handle the condition:

  If the time pointer is null, then write permission
  on the file is also sufficient.

From FreeBSD.

Should fix PR kern/57246 "NFS group permissions regression"

(martin)

2023-03-05 14:32:42 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by hannken in ticket #110):

external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.81

Adapt zfs_netbsd_access() to ACL support.  As ZFS itself only
handles VREAD, VWRITE, VEXEC and VAPPEND we use kauth_authorize_vnode()
to handle VADMIN.

From FreeBSD.

(martin)

2023-03-05 13:49:12 UTC MAIN commitmail json YAML

In the HUP-wait path in ucomopen():
- Use cv_timedwait() rather than cv_timedwait_sig(); the wait here is
  bounded (and fairly short besides) and seems appropriate to treat like
  other uninterruptible waits.  The behavior is now consistent with com(4)
  in this regard.
- Map EWOULDBLOCK return from cv_timedwait() to 0, as the successful passage
  of time is not an error in this case.
- If the HUP-wait time has passed, clear the HUP-wait timestamp.

kern/57259 (although insufficient -- another change to vfs_syscalls.c
is required)

(thorpej)

2023-03-04 21:15:30 UTC MAIN commitmail json YAML

2023-03-04 13:42:37 UTC MAIN commitmail json YAML

tests/make: use proper variable names in short-circuit test

The previous variable names V42, V66, iV1 and iV2 didn't carry enough
information to be readily readable, making the test hard to understand.

Rename the variables to be more expressive.  While here, properly
explain what happened behind the scenes in 2020 and how the evaluation
of conditions was fixed after discovering the actual cause of the
unexpected error messages.

(rillig)

2023-03-04 08:52:20 UTC MAIN commitmail json YAML

2023-03-04 08:07:29 UTC MAIN commitmail json YAML

2023-03-03 17:05:05 UTC netbsd-9 commitmail json YAML

2023-03-03 17:04:17 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by sekiya in ticket #1609):

sys/arch/arm/ti/if_cpsw.c: revision 1.17

Uncomment and protect sanity checks that would drop into the debugger with a
CPSW_DEBUG_DMA define.

This handles a condition where checking for DMA_RXEOQ in the received packet
results in the console being spammed with "rxeoq" messages, which soon results
in a kernel panic.  The corresponding Debugger() call for this check was
commented out.

The TI documentation ("AM335x and AMIC110 Sitara(TM) Processors Technical
Reference Manual") documents the EOQ bit thus:

        (14.3.2.4.1.2.4) This bit is set by the EMAC when the EMAC identifies
        that a descriptor is the last for a given packet received (also sets
        the EOP flag), and there are no more descriptors in the receive list
        (next descriptor pointer is NULL).  The software application can use
        this bit to detect when the EMAC receiver for the corresponding channel
        has halted. This is useful when the application appends additional free
        buffer descriptors to an active receive queue. Note that this flag is
        valid on EOP descriptors only.

Moving this check (and the offending printf() ) into a debug #ifdef results in
the BeagleBone Green surviving the nightly checks; it would always drop into
the debugger before this change.

(martin)

2023-03-03 17:03:36 UTC netbsd-10 commitmail json YAML

2023-03-03 17:02:43 UTC netbsd-10 commitmail json YAML

Pull up following revision(s) (requested by sekiya in ticket #109):

sys/arch/arm/ti/if_cpsw.c: revision 1.17

Uncomment and protect sanity checks that would drop into the debugger with a
CPSW_DEBUG_DMA define.

This handles a condition where checking for DMA_RXEOQ in the received packet
results in the console being spammed with "rxeoq" messages, which soon results
in a kernel panic.  The corresponding Debugger() call for this check was
commented out.

The TI documentation ("AM335x and AMIC110 Sitara(TM) Processors Technical
Reference Manual") documents the EOQ bit thus:

        (14.3.2.4.1.2.4) This bit is set by the EMAC when the EMAC identifies
        that a descriptor is the last for a given packet received (also sets
        the EOP flag), and there are no more descriptors in the receive list
        (next descriptor pointer is NULL).  The software application can use
        this bit to detect when the EMAC receiver for the corresponding channel
        has halted. This is useful when the application appends additional free
        buffer descriptors to an active receive queue. Note that this flag is
        valid on EOP descriptors only.

Moving this check (and the offending printf() ) into a debug #ifdef results in
the BeagleBone Green surviving the nightly checks; it would always drop into
the debugger before this change.

(martin)

2023-03-03 15:29:49 UTC MAIN commitmail json YAML

add CMC (Certificate Management over CMS, RFC5272)
add CMS (Cryptographic Message Syntax, RFC5652)

(jschauma)

2023-03-03 14:40:16 UTC MAIN commitmail json YAML

x86/fpu: Align savefpu to 64 bytes in fpuinit_mxcsr_mask.

16 bytes is not enough.

(Is this why it never worked on Xen some years back?  Got lucky and
accidentally had 64-byte alignment on native x86, but not in the call
stack in Xen?)

XXX pullup-10

(riastradh)

2023-03-03 14:40:00 UTC MAIN commitmail json YAML

x86: Call fpuinit_mxcsr_mask only once.

No need to call it again and again on the secondary CPUs to compute
what should be the same mxcsr mask.  (If it's not, we have deeper
problems!)

(riastradh)

2023-03-03 14:32:48 UTC MAIN commitmail json YAML

Revert "x86: Add kthread_fpu_enter/exit support, take two."

kthread_fpu_enter/exit changes broke some hardware, unclear why, to
investigate before fixing and reapplying these changes.

(riastradh)

2023-03-03 14:32:38 UTC MAIN commitmail json YAML

Revert "x86/fpu.c: Sprinkle KNF."

kthread_fpu_enter/exit changes broke some hardware, unclear why, to
investigate before fixing and reapplying these changes.

(riastradh)

2023-03-03 14:32:27 UTC MAIN commitmail json YAML

Revert "x86: Add kthread_fpu_enter/exit support, take two -- forgot i386 bits."

kthread_fpu_enter/exit changes broke some hardware, unclear why, to
investigate before fixing and reapplying these changes.

(riastradh)

2023-03-03 12:53:04 UTC MAIN commitmail json YAML

mremap(2): Note MAP_REMAPDUP bug.

XXX pullup-10, unless we fix the bug first

(riastradh)

2023-03-03 12:52:50 UTC MAIN commitmail json YAML

entropy(9): Allow changing flags on all entropy sources at once.

Entropy sources should all have nonempty names, and this will enable
an operator to, for example, disable all but a specific entropy
source.

XXX pullup-10

(riastradh)

2023-03-03 10:02:51 UTC MAIN commitmail json YAML

Fix genfs_can_chtimes() to also handle the condition:

  If the time pointer is null, then write permission
  on the file is also sufficient.

From FreeBSD.

Should fix PR kern/57246 "NFS group permissions regression"

(hannken)

2023-03-03 10:01:31 UTC MAIN commitmail json YAML

Adapt zfs_netbsd_access() to ACL support.  As ZFS itself only
handles VREAD, VWRITE, VEXEC and VAPPEND we use kauth_authorize_vnode()
to handle VADMIN.

From FreeBSD.

(hannken)

2023-03-02 05:45:10 UTC MAIN commitmail json YAML

fix idempotent check define as noticed by LLVM.

(mrg)

2023-03-01 21:08:38 UTC MAIN commitmail json YAML

delete attribution per request of contributor

(nia)

2023-03-01 21:07:57 UTC MAIN commitmail json YAML

delete attribution per request of contributor

(nia)

2023-03-01 21:07:21 UTC MAIN commitmail json YAML

delete attribution per request of contributor

(nia)

2023-03-01 21:06:41 UTC MAIN commitmail json YAML

delete attribution per request of contributor

(nia)

2023-03-01 20:08:42 UTC MAIN commitmail json YAML

mremap(2): Fix example to use MAP_PRIVATE.

It is a historical accident that MAP_PRIVATE is assumed when neither
it nor MAP_SHARED is specified.

XXX pullup-9
XXX pullup-10

(riastradh)

2023-03-01 16:21:26 UTC MAIN commitmail json YAML

fs/hfs: Avoid undefined pointer arith in hfslib_reada_node_offsets.

XXX pullup-8
XXX pullup-9
XXX pullup-10

(riastradh)

2023-03-01 16:21:14 UTC MAIN commitmail json YAML

fs/hfs: Avoid buffer overrun in hfslib_reada_node_offsets.

XXX pullup-8
XXX pullup-9
XXX pullup-10

(riastradh)

2023-03-01 15:45:00 UTC MAIN commitmail json YAML

Add RTTI (run-time type information).

(fcambus)

2023-03-01 15:18:18 UTC MAIN commitmail json YAML

Fix a typo in a newly added comment.

Someone please tell me why these things become obvious only after
the code has been committed!

NFC

(kre)

2023-03-01 15:15:56 UTC MAIN commitmail json YAML

When processing swapon -a (or swapctl -A, or swapctl -U) ignore lines in
fstab that have nothing to do with swapping (fs_type is neither "sw" nor "dp")
before running getfsspecname() on the fs_spec field of the line.

This avoids entries like this:

NAME=OFTEN_UNCONNECTED  /local/archived ffs    rw,log,noauto    0 0

in fstab from generating spurious error messages when the wedge named
is not currently connected to the system - that is the drive on which the
wedge exists is not connected, or not powered on.  "noauto" handles that
for some other uses, the "0"s in fs_freq and fs_passno work for other uses,
but swap{on,ctl} never look at those fields (not for this purpose).

Non "sw"/"dp" lines were being ignored anyway, but not until (a little) later.

(kre)

2023-03-01 15:11:28 UTC MAIN commitmail json YAML

mmap(2): minor markup tweaks

(uwe)

2023-03-01 14:45:26 UTC MAIN commitmail json YAML

Add TU (translation unit).

(fcambus)

2023-03-01 11:12:56 UTC MAIN commitmail json YAML

Add RAII (resource acquisition is initialization).

(fcambus)

2023-03-01 11:08:03 UTC MAIN commitmail json YAML

Add IR (intermediate representation) and MLIR (multi-level IR).

(fcambus)

2023-03-01 08:42:34 UTC MAIN commitmail json YAML

2023-03-01 08:38:50 UTC MAIN commitmail json YAML

2023-03-01 08:18:39 UTC MAIN commitmail json YAML

sparc64: Optimization: Omit needless membar when triggering softint.

When we are triggering a softint, it can't already hold any mutexes.
So any path to mutex_exit(mtx) must go via mutex_enter(mtx), which is
always done with atomic r/m/w, and we need not issue any explicit
barrier between ci->ci_curlwp = softlwp and a potential load of
mtx->mtx_owner in mutex_exit.

PR kern/57240

XXX pullup-8
XXX pullup-9
XXX pullup-10

(riastradh)

2023-03-01 08:18:24 UTC MAIN commitmail json YAML

riscv: Optimization: Omit needless membar when triggering softint.

When we are triggering a softint, it can't already hold any mutexes.
So any path to mutex_exit(mtx) must go via mutex_enter(mtx), which is
always done with atomic r/m/w, and we need not issue any explicit
barrier between ci->ci_curlwp = softlwp and a potential load of
mtx->mtx_owner in mutex_exit.

PR kern/57240

(riastradh)

2023-03-01 08:18:13 UTC MAIN commitmail json YAML

powerpc: Optimization: Omit needless membar when triggering softint.

When we are triggering a softint, it can't already hold any mutexes.
So any path to mutex_exit(mtx) must go via mutex_enter(mtx), which is
always done with atomic r/m/w, and we need not issue any explicit
barrier between ci->ci_curlwp = softlwp and a potential load of
mtx->mtx_owner in mutex_exit.

PR kern/57240

XXX pullup-8
XXX pullup-9
XXX pullup-10

(riastradh)

2023-03-01 08:18:04 UTC MAIN commitmail json YAML

mips: Optimization: Omit needless membar when triggering softint.

When we are triggering a softint, it can't already hold any mutexes.
So any path to mutex_exit(mtx) must go via mutex_enter(mtx), which is
always done with atomic r/m/w, and we need not issue any explicit
barrier between ci->ci_curlwp = softlwp and a potential load of
mtx->mtx_owner in mutex_exit.

PR kern/57240

XXX pullup-8
XXX pullup-9
XXX pullup-10

(riastradh)

2023-03-01 08:17:53 UTC MAIN commitmail json YAML

arm32: Optimization: Omit needless membar when triggering softint.

When we are triggering a softint, it can't already hold any mutexes.
So any path to mutex_exit(mtx) must go via mutex_enter(mtx), which is
always done with atomic r/m/w, and we need not issue any explicit
barrier between ci->ci_curlwp = softlwp and a potential load of
mtx->mtx_owner in mutex_exit.

PR kern/57240

XXX pullup-8
XXX pullup-9
XXX pullup-10

(riastradh)

2023-03-01 08:17:24 UTC MAIN commitmail json YAML

aarch64: Optimization: Omit needless membar when triggering softint.

When we are triggering a softint, it can't already hold any mutexes.
So any path to mutex_exit(mtx) must go via mutex_enter(mtx), which is
always done with atomic r/m/w, and we need not issue any explicit
barrier between ci->ci_curlwp = softlwp and a potential load of
mtx->mtx_owner in mutex_exit.

PR kern/57240

XXX pullup-9
XXX pullup-10

(riastradh)

2023-03-01 08:14:13 UTC MAIN commitmail json YAML

amdgpu: Fix bogus loop invariant assertions in amdgpu_gart_map.

(riastradh)

2023-03-01 08:13:54 UTC MAIN commitmail json YAML

random(4): Report number of bytes ready to read, not number of bits.

Only affects systems with the diagnostic and testing option
kern.entropy.depletion=1.

XXX pullup-10

(riastradh)

2023-03-01 08:13:44 UTC MAIN commitmail json YAML

xen/x86: Need kpreempt_disable/enable around curcpu() access.

This is called with `hardware' interrupts enabled (between sti and
cli), so presumably preemption is possible here.

XXX pullup-8
XXX pullup-9
XXX pullup-10

(riastradh)

2023-03-01 04:04:54 UTC MAIN commitmail json YAML

Add NHACP (NABU HCCA Application Communication Protocol)

(thorpej)

2023-02-28 20:42:55 UTC MAIN commitmail json YAML

Add DWARF (Debugging With Attributed Record Formats).

(fcambus)

2023-02-28 19:08:37 UTC MAIN commitmail json YAML

Add PE (portable executable).

We have an entry for COFF, so it makes sense to add PE as well.

(fcambus)

2023-02-28 16:48:00 UTC MAIN commitmail json YAML

Add KASAN (Kernel Address Sanitizer).

(fcambus)

2023-02-28 15:01:53 UTC MAIN commitmail json YAML

Add GUS (Gravis UltraSound).

(fcambus)

2023-02-28 14:32:59 UTC MAIN commitmail json YAML

Remove duplicate entry for RCS, keep the capitalized version to match CVS.

(fcambus)

2023-02-28 12:50:49 UTC MAIN commitmail json YAML

Add GCC (GNU Compiler Collection).

(fcambus)

2023-02-28 08:36:03 UTC MAIN commitmail json YAML

Remove sanitizer mention for CFI, it's a general term.

(fcambus)

2023-02-28 06:04:28 UTC MAIN commitmail json YAML

Use inline function rather that macro BM

(sjg)

2023-02-27 23:07:53 UTC MAIN commitmail json YAML

lint: split platform-specific test for loss of accuracy

Lint distinguishes between platforms where size_t is unsigned int and
platforms where size_t is unsigned long.

(rillig)

2023-02-27 22:00:25 UTC MAIN commitmail json YAML

fix some typos in comments.

(andvar)

2023-02-27 21:59:14 UTC MAIN commitmail json YAML

tests/lint: sync test for nonportable character comparisons

Message 230 was changed on 2023-02-22 but only tested on signed char
platforms.

(rillig)

2023-02-27 21:15:09 UTC MAIN commitmail json YAML

Uncomment and protect sanity checks that would drop into the debugger with a
CPSW_DEBUG_DMA define.

This handles a condition where checking for DMA_RXEOQ in the received packet
results in the console being spammed with "rxeoq" messages, which soon results
in a kernel panic.  The corresponding Debugger() call for this check was
commented out.

The TI documentation ("AM335x and AMIC110 Sitaraâ„¢ Processors Technical
Reference Manual") documents the EOQ bit thus:

(14.3.2.4.1.2.4) This bit is set by the EMAC when the EMAC identifies
that a descriptor is the last for a given packet received (also sets
the EOP flag), and there are no more descriptors in the receive list
(next descriptor pointer is NULL).  The software application can use
this bit to detect when the EMAC receiver for the corresponding channel
has halted. This is useful when the application appends additional free
buffer descriptors to an active receive queue. Note that this flag is
valid on EOP descriptors only.

Moving this check (and the offending printf() ) into a debug #ifdef results in
the BeagleBone Green surviving the nightly checks; it would always drop into
the debugger before this change.

(sekiya)

2023-02-27 21:04:43 UTC MAIN commitmail json YAML

Add PGO (profile guided optimization).

(fcambus)

2023-02-27 17:38:18 UTC MAIN commitmail json YAML

Disable completely mips ifunc test to make cross-compilation on other OSs work.
(Jan-Benedict Glaw)

(christos)

2023-02-27 16:24:46 UTC MAIN commitmail json YAML

uvm(9): KASSERT(A && B) -> KASSERT(A); KASSERT(B)

While here, print some of the inputs with KASSERTMSG.

(riastradh)

2023-02-27 16:24:28 UTC MAIN commitmail json YAML

amd64_trap.S: Annotate trap vectors with their mnemonics.

Derived from Intel and AMD manuals.

Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3
(3A, 3B, 3C, & 3D: System Programming Guide, Order Number:
325384-077US, April 2022.
https://cdrdv2.intel.com/v1/dl/getContent/671447

AMD64 Technology: AMD64 Architecture Programmers' Manual, Volume 2:
System Programming, Publication No. 24953, Revision 3.40, January 2023.
https://www.amd.com/system/files/TechDocs/24593.pdf

No functional change intended.

XXX Should apply the same treatment to i386_trap.S.

(riastradh)

2023-02-27 15:41:41 UTC MAIN commitmail json YAML

igpio(4): Disable Baytrail and Lynxpoint support. Fixes PR kern/57225.

It seems additional code is required to support Baytrail and Lynxpoint.
Disable those support.

(msaitoh)

2023-02-27 13:39:09 UTC MAIN commitmail json YAML

cast to the correct message structure (rt_msghdr instead of if_msghdr)

(kardel)

2023-02-27 08:29:36 UTC MAIN commitmail json YAML

tests/make: describe the absent fallback for ':O' modifiers more clearly

(rillig)

2023-02-27 00:34:11 UTC MAIN commitmail json YAML

obsolete several xorg-server.old configurations and normalise some comments.

(mrg)

2023-02-26 22:55:02 UTC MAIN commitmail json YAML

s/superblok/superblock/ in comment.

(andvar)

2023-02-26 20:19:05 UTC MAIN commitmail json YAML

2023-02-26 20:16:13 UTC MAIN commitmail json YAML

2023-02-26 20:14:04 UTC MAIN commitmail json YAML

updates for xf86-video-amdgpu 23.0.

(mrg)

2023-02-26 20:09:54 UTC MAIN commitmail json YAML

work around a local change that enables drivers to work.

see 'const' commented in xorg-server/dist/hw/xfree86/common/xf86xv.h.
maybe we can clean this up properly now most drivers are updated.

(mrg)

2023-02-26 20:01:45 UTC MAIN commitmail json YAML

updates for xf86-video-vmware 13.4.0.

(mrg)

2023-02-26 19:59:32 UTC MAIN commitmail json YAML

xsrc/external/mit/xf86-video-ark/dist/README deleted
xsrc/external/mit/xf86-video-ark/dist/src/ark_driver.c@1.3 / diff / nxr@1.3
xsrc/external/mit/xf86-video-s3virge/dist/src/s3v_accel.c@1.6 / diff / nxr@1.6
xsrc/external/mit/xf86-video-s3virge/dist/src/s3v_driver.c@1.9 / diff / nxr@1.9
xsrc/external/mit/xf86-video-trident/dist/README deleted
xsrc/external/mit/xf86-video-trident/dist/src/blade_accel.c deleted
xsrc/external/mit/xf86-video-trident/dist/src/blade_accel_exa.c deleted
xsrc/external/mit/xf86-video-trident/dist/src/image_accel.c deleted
xsrc/external/mit/xf86-video-trident/dist/src/trident.h@1.5 / diff / nxr@1.5
xsrc/external/mit/xf86-video-trident/dist/src/trident_accel.c deleted
xsrc/external/mit/xf86-video-trident/dist/src/trident_driver.c@1.5 / diff / nxr@1.5
xsrc/external/mit/xf86-video-trident/dist/src/tridenthelper.c deleted
xsrc/external/mit/xf86-video-trident/dist/src/tridentpcirename.h deleted
xsrc/external/mit/xf86-video-trident/dist/src/xp4_accel.c deleted
xsrc/external/mit/xf86-video-trident/dist/src/xp4_accel_exa.c deleted
xsrc/external/mit/xf86-video-trident/dist/src/xp_accel.c deleted
xsrc/external/mit/xf86-video-vmware/dist/src/vmware.c@1.4 / diff / nxr@1.4
xsrc/external/mit/xf86-video-vmware/dist/src/vmwaremodes.c@1.3 / diff / nxr@1.3
xsrc/external/mit/xf86-video-vmware/dist/vmwgfx/vmwgfx_hosted_priv.h deleted
xsrc/external/mit/xf86-video-vmware/dist/vmwgfx/vmwgfx_xmir.c deleted
xsrc/external/mit/xf86-video-vmware/dist/vmwgfx/vmwgfx_xwayland.c deleted

merge xf86-video-ark 0.7.6, xf86-video-s3virge 1.11.1,
xf86-video-trident 1.4.0, and xf86-video-vmware 13.4.0.

(mrg)

2023-02-26 14:00:42 UTC MAIN commitmail json YAML

wsemul_vt100_subr: spell edp->tabs assertion with NULL

(uwe)

2023-02-26 13:57:56 UTC MAIN commitmail json YAML

wsemul_vt100_subr: don't assert unsigned ncols >= 0

(uwe)

2023-02-26 07:27:14 UTC MAIN commitmail json YAML

2023-02-26 07:13:55 UTC MAIN commitmail json YAML

2023-02-26 06:08:06 UTC MAIN commitmail json YAML

2023-02-25 22:52:22 UTC MAIN commitmail json YAML

meta.c: use macro to access job->bm

and if job is NULL use Mybm.

No functional change.

(sjg)

2023-02-25 19:37:33 UTC MAIN commitmail json YAML

t_make skip varname-dot-make-meta-ignore_*

The meta-ignore tests will likely not work in this environment
so skip them.

(sjg)

2023-02-25 19:30:32 UTC MAIN commitmail json YAML

make: meta-ignore tests will not work if TMPDIR is /tmp

Since /tmp and /var/tmp are always part of .MAKE.META.IGNORE_PATHS
the varname-dot-make-meta-ignore_* tests will not work
if TMPDIR is either (or subdir) of those.

(sjg)

2023-02-25 19:24:07 UTC MAIN commitmail json YAML

2023-02-25 18:35:54 UTC MAIN commitmail json YAML

x86: Add kthread_fpu_enter/exit support, take two -- forgot i386 bits.

(riastradh)

2023-02-25 18:28:57 UTC MAIN commitmail json YAML

x86/fpu.c: Sprinkle KNF.

No functional change intended.

(riastradh)

2023-02-25 18:04:42 UTC MAIN commitmail json YAML

x86: Add kthread_fpu_enter/exit support, take two.

This time, make sure to restore the FPU state when switching to a
kthread in the middle of kthread_fpu_enter/exit.

This adds a single predicted-taken branch for the case of kthreads
that are not in kthread_fpu_enter/exit, so it incurs a penalty only
for threads that actually use it.  Since it avoids FPU state
switching in kthreads that do use the FPU, namely cgd worker threads,
this should be a net performance win on systems using it and have
negligible impact otherwise.

XXX pullup-10

(riastradh)

2023-02-25 18:04:25 UTC MAIN commitmail json YAML

x86: Label boolean is_64bit argument to fpu_area_restore.

No functional change intended.

(riastradh)

2023-02-25 17:37:09 UTC MAIN commitmail json YAML

ftp(1): better mark up for url vs cd example

(uwe)

2023-02-25 13:57:37 UTC MAIN commitmail json YAML

x86: Mitigate MXCSR Configuration Dependent Timing in kernel FPU use.

In fpu_kern_enter, make sure all the MXCSR exception status bits are
set when we start using the FPU, so that instructions which exhibit
MCDT are unaffected by it.

While here, zero all the other FPU registers in fpu_kern_enter.

In principle we could skip this step on future CPUs that fix the MCDT
bug, but there's probably not much benefit -- workloads that do a lot
of crypto in the kernel are probably better off using
kthread_fpu_enter or WQ_FPU to skip the fpu_kern_enter/leave cycles
in the first place.

For details, see:
https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/best-practices/mxcsr-configuration-dependent-timing.html

(riastradh)

2023-02-25 13:52:09 UTC MAIN commitmail json YAML

i386/bioscall: Disable preemption while we load the kernel pmap.

Fixes crash on boot in new KASSERT(kpreempt_disabled()) in
cpu_load_pmap.

We could do KASSERT(kpreempt_disabled() || cold), but I don't know if
bioscall is ever reachable after warm boot; this way is safer.

XXX Would be nice if bioscall were a C function, not asm -- I don't
see any reason why we need it to be asm?

(riastradh)

2023-02-25 13:51:48 UTC MAIN commitmail json YAML

ftp(1): minor markup tweaks

Use .Ql instead of .Sq Li, add some missing ones.  Use .Pq instead of
explicit () for longer phrases - these are easier to read in the
postscript output b/c of extra spacing.

(uwe)

2023-02-25 12:23:36 UTC MAIN commitmail json YAML

linux asm/barrier.h: Fix !MULTIPROCESSOR build.

(riastradh)

2023-02-25 12:07:25 UTC MAIN commitmail json YAML

Add option sslnoverify to control validation of SSL certificates.
Add netrc processing to fetch-mode (URL on command line) to enable options and autologin
via netrc.
Fix SSL cleanup in some error paths.

Certificate validation is now enabled by default. Set FTPSSLNOVERIFY=1 in environment
or configure a corresponding init macro via netrc to not validate certs (required if
you haven't installed a required CA certificate for OpenSSL).

Discussed with lukem@ on icb.

(mlelstv)

2023-02-25 11:59:12 UTC MAIN commitmail json YAML

tests/make: move tests for MAKRFLAGS to the correct file

I had accidentally added these tests to the file for the special
variable '.MAKEFLAGS' instead of the file for the environment variable
'MAKEFLAGS'.  While here, add a basic test that shows how 'MAKEFLAGS' is
built from '.MAKEFLAGS' and '.MAKEOVERRIDES'.

(rillig)

2023-02-25 11:11:16 UTC MAIN commitmail json YAML