kn [Sat, 15 Oct 2022 15:29:45 +0000 (15:29 +0000)]
fix comments wrt. pending ksh fixes
jmc [Sat, 15 Oct 2022 15:18:15 +0000 (15:18 +0000)]
.Oc -> .Op in previous;
jsg [Sat, 15 Oct 2022 14:58:54 +0000 (14:58 +0000)]
ansi
florian [Sat, 15 Oct 2022 13:27:45 +0000 (13:27 +0000)]
Do not throw away errno.
Pointed out in the pref64 code, which was copied from here, by kn.
florian [Sat, 15 Oct 2022 13:26:15 +0000 (13:26 +0000)]
Implement RFC 8781 PREF64 router advertisement option.
With this clients can learn the presence and used prefix for Network
Address and Protocol Translation between IPv6 and IPv4 (NAT64).
Apparently there is support in mobile devices as well as in macOS.
This option, together with the the dhcp "IPv6-only preferred"
option (108) enables the Customer-side transLATor (CLAT) on macOS so
IPv4 literals can be used in IPv6-only networks.
Input & OK kn
jsg [Sat, 15 Oct 2022 10:12:12 +0000 (10:12 +0000)]
ansi
op [Sat, 15 Oct 2022 09:54:29 +0000 (09:54 +0000)]
typo in comment: Funtion -> Function
jsg [Sat, 15 Oct 2022 08:41:18 +0000 (08:41 +0000)]
ansi
jsg [Sat, 15 Oct 2022 08:04:02 +0000 (08:04 +0000)]
ansi
deraadt [Sat, 15 Oct 2022 05:56:01 +0000 (05:56 +0000)]
remove one of the debug messages
deraadt [Sat, 15 Oct 2022 03:23:50 +0000 (03:23 +0000)]
During the MAP_STACK introduction in 2018, sigaltstack() became a
problem because haphazard use could shoot holes in the address space
(changing permissions, providing opportunities for pivoting, etc). I
tried to write a diff to convert the address space correctly but did
not understand enough about map entries, so instead we mapped new
memory over top of the existing object. Placing a new mapping becomes
unfeasible with the upcoming mimmutable model, so here is code that
adds MAP_STACK to the region. It will only do so for a contigiously
mapped region that is non-syscall with permission RW, otherwise it
returns an error.
Food for thought: If we know the object isn't service by an object,
we should consider zero'ing the region, to block pre-pivot placement?
ok kettenis
kn [Fri, 14 Oct 2022 23:51:16 +0000 (23:51 +0000)]
add two new errexit/trap tests, tweak wording
both pass in bash and ksh93 from ports.
our ksh fails for now, so mark them as expected fail.
sthen [Fri, 14 Oct 2022 23:01:16 +0000 (23:01 +0000)]
sync
kn [Fri, 14 Oct 2022 22:56:13 +0000 (22:56 +0000)]
add two new errexit/trap tests
both behave the same with our ksh, bash and ksh93 from ports.
jmc [Fri, 14 Oct 2022 21:44:06 +0000 (21:44 +0000)]
space required between macro and punctuation;
while here, wrap long line;
aoyama [Fri, 14 Oct 2022 20:53:18 +0000 (20:53 +0000)]
Pass boot device information from bootloader to kernel.
This brings the default root device is the same one of the kernel
specified by bootloader, rather than NVRAM setting, like other
architectures.
"looks good to me" miod@, tested on LUNA-88K2 and nono (LUNA-88K
capable emulator) by me.
millert [Fri, 14 Oct 2022 18:35:19 +0000 (18:35 +0000)]
Update to 2022egtz from https://github.com/JodaOrg/global-tz
Major changes:
o Jordan and Syria switch from +02/+03 with DST to year-round +03.
tb [Fri, 14 Oct 2022 17:17:13 +0000 (17:17 +0000)]
Add RCS markers
tb [Fri, 14 Oct 2022 17:09:43 +0000 (17:09 +0000)]
Revert kn's Makefile surgery. It no longer does what it was supposed
to do and I'm still not clear what it was supposed to fix.
krw [Fri, 14 Oct 2022 16:36:36 +0000 (16:36 +0000)]
Fix botched D_SUNCYLCHECK+D_VENDOR check from r1.321.
D_VENDOR lives in d_flags, not d_secpercyl.
Makes resizing a partition more likely to respect cylinder rounding
on sparc64.
martijn [Fri, 14 Oct 2022 15:26:58 +0000 (15:26 +0000)]
Add an agentx_retry call.
If a session, agentcaps, region, index, or object doesn't properly open
because of an error returned by the AgentX master it remained closed until
a reconnect. This new function call walks the tree and tries to reopen
everything in a closed state.
OK sthen@
martijn [Fri, 14 Oct 2022 15:20:33 +0000 (15:20 +0000)]
Don't call agentx_reset on errors returned by the AgentX
There is no reason to assume that a reset of the connection and a retry
will solve the problem and could cause reconnect loops.
Found while playing with context in vmd in combination with snmpd(8)
instead of net-snmpd.
OK sthen@
krw [Fri, 14 Oct 2022 13:22:57 +0000 (13:22 +0000)]
No point in luna88k setting D_VENDOR since all actual uses are
inside #ifdef SUN_CYLCHECK or #ifdef SUN_AAT0 blocks in
disklabel(8), neither of which are defined for luna88k.
ok miod@
kn [Fri, 14 Oct 2022 11:26:19 +0000 (11:26 +0000)]
Document missing cases of variable substitution
Feedback OK op
kn [Fri, 14 Oct 2022 11:02:43 +0000 (11:02 +0000)]
add configtest
OK florian
kn [Fri, 14 Oct 2022 10:41:43 +0000 (10:41 +0000)]
add configtest
OK florian
tb [Fri, 14 Oct 2022 06:56:33 +0000 (06:56 +0000)]
Error out if the out secret wasn't properly initialized
Calling HKDF_expand() with a length of 0 happens to succeed due to a quirk
in the API inherited from BoringSSL. This hides caller-side errors during
development. Error out to catch such mistakes early on.
ok jsing
jmc [Fri, 14 Oct 2022 06:46:52 +0000 (06:46 +0000)]
remove the unsightly plural from Nd:
audio files manipulation tool -> audio file manipulation tool
jmc [Fri, 14 Oct 2022 06:43:26 +0000 (06:43 +0000)]
some macro fixes, mostly Cm -> Ic;
from josiah frentsos
anton [Fri, 14 Oct 2022 05:44:42 +0000 (05:44 +0000)]
The HTTP endpoint used for the redirect chain started to unconditionally
respond with the HTTP protocol in the response location header although
HTTPS is being used in the corresponding request. Flag the test as
expected to fail for now.
deraadt [Fri, 14 Oct 2022 04:38:39 +0000 (04:38 +0000)]
put the malloc_readonly struct into the "openbsd.mutable" section, so
that the kernel and ld.so will know not to mark it immutable. malloc
handles the read/write transitions by itself.
jmc [Thu, 13 Oct 2022 21:37:05 +0000 (21:37 +0000)]
controm terminql -> controlling terminal;
kettenis [Thu, 13 Oct 2022 18:34:56 +0000 (18:34 +0000)]
Properly implement disestablishing LPI interrupts. Fixes a crash when using
virtio(4) in combination with agintc(4).
ok jsg@, patrick@
jsg [Thu, 13 Oct 2022 09:09:28 +0000 (09:09 +0000)]
use correct type with sizeof
ok djm@
kettenis [Thu, 13 Oct 2022 09:07:26 +0000 (09:07 +0000)]
Add (minimal) support for the RK3568 PCIe controller. This relies on
the firmware to do most of the hardware initialization; the driver
basically only sets up the address translation unit to match the
configuration specified in the device tree.
ok patrick@
tb [Thu, 13 Oct 2022 08:38:53 +0000 (08:38 +0000)]
Make comment match the code.
Since rnd.c r1.127, there is only one stirring polynomial.
kettenis [Thu, 13 Oct 2022 07:04:53 +0000 (07:04 +0000)]
Implement support for MBIs. MBIs are message based interrupts that can be
used as an alternative implementation for MSIs on hardware that doesn't
implement an ITS (or where the ITS is broken such as on the Rochchip
RK3566 SoC).
Based on an earlier WIP diff from patrick@; I just cleaned it up a bit.
ok patrick@
jmatthew [Thu, 13 Oct 2022 04:55:33 +0000 (04:55 +0000)]
Add client certificate authentication and optional SASL EXTERNAL bind,
which allows the client to bind as the subject of the certificate in cases
where the directory doesn't implicitly do that.
The client certificate is configured with 'certfile' and 'keyfile'
directives, and SASL EXTERNAL bind is configured with the 'bindext'
directive.
ok tb@
job [Thu, 13 Oct 2022 04:43:32 +0000 (04:43 +0000)]
All of ROA, MFT, ASPA, and RSC define their respective 'version' field
in ASN.1 as following: "version [0] INTEGER DEFAULT 0,". Each object
profile preamble contains "DEFINITIONS EXPLICIT TAGS ::=".
We didn't bump into any issue yet, because all Signed Objects are at
version 0, which means the field is entirely omitted (including the tag,
be it implicit or explicit). (From X.690 section 11.5: "The encoding of
a set value or a sequence value shall not include an encoding for any
component value which is equal to its default value.")
OK tb@
krw [Wed, 12 Oct 2022 23:11:32 +0000 (23:11 +0000)]
Nuke D_BADSECT and disktab's 'sf'.
DEC standard 144 bad sector information is no longer a thing. As
evidenced by bad144(8) moving to the attic 16 years ago.
ok miod@, who points out that badsect(8) is now the nail sticking
out.
kettenis [Wed, 12 Oct 2022 13:39:50 +0000 (13:39 +0000)]
Extend struct todr_chip_handle with a todr_quality member. This allows us
to assign a quality to RTC implementation and pick the "best" RTC if a
system has multiple RTCs (or multiple interfaces to an RTC). This allows
us to prefer a battery-backed I2C RTC over an RTC that is part of the SoC
which is only running of the SoC is powered. It also allows us to
work around issues with firmware RTC interfaces that may lie to us or
even crash the system.
This change makes sure the todr_quality member of the struct is always
initialized. In most cases the quality will be set to zero; further
adjustments of the quality for specific subsystems/architectures will follow.
ok cheloha@, patrick@
jsg [Wed, 12 Oct 2022 11:57:40 +0000 (11:57 +0000)]
avoid use after free in error paths
ok miod@ martijn@
jsg [Wed, 12 Oct 2022 11:29:53 +0000 (11:29 +0000)]
use correct type with sizeof
ok miod@ kettenis@
jsg [Wed, 12 Oct 2022 11:26:05 +0000 (11:26 +0000)]
use correct type with sizeof
ok miod@ claudio@ tb@
kn [Wed, 12 Oct 2022 10:48:33 +0000 (10:48 +0000)]
Remove powerpc left-overs
There since the powerpc -> macppc move/rename.
KERN_AS usage disappeared in
commit
5b7db11d478192c5908038bb1345e7d51cc35c8e
Author: rahnds <rahnds@openbsd.org>
Date: Mon May 5 16:47:15 1997 +0000
only build one version of the libraries.
REAL_VIRT usage disappeared in
commit
08e027d6bb9ca863bfc44a1aa6957ff3a242e2f4
Author: rahnds <rahnds@openbsd.org>
Date: Thu Apr 27 12:36:29 2000 +0000
Fixes to xcoff bootloader to allow it to execute and load kernels for OpenBSD.
Make agrees that these are defined but not used:
$ make -p | grep -e KERN_AS -e REAL_VIRT
KERN_AS = library
REAL_VIRT = -v
$ make -C ofwboot -p | grep -e KERN_AS -e REAL_VIRT
KERN_AS = library
REAL_VIRT = -v
No object change.
Feedback OK miod
kn [Wed, 12 Oct 2022 09:23:45 +0000 (09:23 +0000)]
Fix -Wreturn-type
OK miod
deraadt [Wed, 12 Oct 2022 02:39:16 +0000 (02:39 +0000)]
The sigaltstack() MAP_STACK re-map mechanism is incompatible with immutable
regions, so immutable stack isn't viable yet. There are configure programs
which create sigstacks upon their own stacks, and there is no simple fix for
the sigaltstack mechanism...
discovered by sthen and tb
krw [Tue, 11 Oct 2022 23:39:07 +0000 (23:39 +0000)]
Give checkdisklabel() a new parameter supplying the dev_t of the
device whose disklabel is being checked. Within checkdisklabel()
use this information to discover a device name iff (sic) the
label is an obsolete version. Use the name to generate a
meaningful warning message asking the user to rewrite the
disklabel and thus promote it to the current version.
Suggested by, feedback from and ok deraadt@
krw [Tue, 11 Oct 2022 16:32:40 +0000 (16:32 +0000)]
Vox populi says "cdio:" prefix is useful so switch back to using
warnx(), but with required "\n" manually output to stderr before
calling warnx().
Requested by tb@ and OP Michael Siegel.
tb [Tue, 11 Oct 2022 13:52:23 +0000 (13:52 +0000)]
Fix path of mentioned regress test
tb [Tue, 11 Oct 2022 13:51:41 +0000 (13:51 +0000)]
Handle corner case in which the test case can actually be a square
jsg [Tue, 11 Oct 2022 13:40:38 +0000 (13:40 +0000)]
correct t_lex_type() return type
ok miod@
jsg [Tue, 11 Oct 2022 11:46:58 +0000 (11:46 +0000)]
add missing unlock in swapmount()
ok tb@ kn@ miod@
jsg [Tue, 11 Oct 2022 07:36:27 +0000 (07:36 +0000)]
fix unintended sizeof pointer introduced in 1.10
ok cheloha@ miod@ matthieu@ martijn@
anton [Tue, 11 Oct 2022 05:45:41 +0000 (05:45 +0000)]
Run noexec tests in a new thread, leveraging the fact that
pthread_create() allocates a new stack which has mutable permissions.
Allows the temporary expected failures to be dropped.
ok deraadt@
jsg [Tue, 11 Oct 2022 03:37:14 +0000 (03:37 +0000)]
remove unused var
kettenis [Mon, 10 Oct 2022 17:45:35 +0000 (17:45 +0000)]
Add support for the RK817 PMIC.
ok patrick@, mlarkin@
bket [Mon, 10 Oct 2022 16:43:12 +0000 (16:43 +0000)]
Recalculate checksum of normalised packet
In 2011, henning@ removed fiddling with the ip checksum of normalised
packets in r1.131 of sys/net/pf_norm.c. Rationale was that the checksum
is always recalculated in all output paths anyway. In 2016, procter@
reintroduced checksum modification to preserve end-to-end checksums in
r1.189 of sys/net/pf_norm.c. Likely soomewhere in that timeslot checksum
recalculation of normalised packets was broken.
With input from bluhm@.
OK sashan@, bluhm@
krw [Mon, 10 Oct 2022 15:04:09 +0000 (15:04 +0000)]
Use warnx(), not warn(), when 'errno' is not relevant.
kn [Mon, 10 Oct 2022 14:57:48 +0000 (14:57 +0000)]
Trigger ERR trap on permanent I/O redirection failure
The following three cases behave identical in bash(1), but our ksh
(ksh93 also) fails to run the trap in the last case:
(non-zero exit code is trigger, no redirection)
$ ksh -c 'trap "echo ERR" ERR ; false'
ERR
(failed redirection is trigger, 'echo' was not executed)
$ ksh -c 'trap "echo ERR" ERR ; echo >/'
ksh: cannot create /: Is a directory
ERR
(failed redirection, no execution, trap was NOT triggered)
$ ksh -c 'trap "echo ERR" ERR ; exec >/'
ksh: cannot create /: Is a directory
bash(1) prints "ERR" in all three cases, as expected.
ksh93 behaves like our ksh(1).
In ksh `exec' is a builtin (CSHELL), but also special (SPEC_BI):
$ type alias
alias is a shell builtin
$ type exec
exec is a special shell builtin
Without command and redirection alone, `exec' permanently redirects I/O for
the shell itself, not executing anything; it is the only (special) builtin
with such a special use-case, implemented as c_sh.c:c_exec().
This corner-case is overlooked in exec.c:execute() which handles iosetup()
failure for all commands, incl. builtins.
Exclude c_exec() from the rest of special builtins to ensure it runs the
ERR trap as expected:
$ ./obj/ksh -c 'trap "echo ERR" ERR ; exec >/'
ksh: cannot create /: Is a directory
ERR
Also add three new regress cases covering this; rest keep passing.
OK millert
krw [Mon, 10 Oct 2022 14:52:02 +0000 (14:52 +0000)]
Don't leak 'sec' in error path.
kn [Mon, 10 Oct 2022 12:07:53 +0000 (12:07 +0000)]
Enable configtest
OK solene
tobhe [Mon, 10 Oct 2022 11:33:55 +0000 (11:33 +0000)]
Move enabling the policy refcounting from policy_ref() to config_free_policy().
In config_free_policy() the refcounting is unchanged and each SA linked to the
policy will trigger a call to policy_ref() and increase the references as
before the change. This allows unconditional calls to policy_ref() and
policy_unref() and the callers no longer have to check if IKED_POLICY_REFCNT
is set.
From and ok markus@
kn [Mon, 10 Oct 2022 11:06:14 +0000 (11:06 +0000)]
Continue tests is the mountpoint already exists
regress should be resilient against partially cleaned obj/.
Feedback bluhm
kn [Mon, 10 Oct 2022 11:04:17 +0000 (11:04 +0000)]
Discard stdout/err only where needed in check_unattendedupgrade()
We should be fine silencing only the test condition which produces legit
output and warnings.
All else produces no output and should not error out; if it does, those
warnings should be printed and fixed.
Feedback OK halex
jsg [Mon, 10 Oct 2022 10:42:42 +0000 (10:42 +0000)]
consistently use IPv4/IPv6
jsg [Mon, 10 Oct 2022 09:13:43 +0000 (09:13 +0000)]
consistently use IPv4/IPv6; from jmc@
nicm [Mon, 10 Oct 2022 09:03:08 +0000 (09:03 +0000)]
ncurses wide character functions should be available with _XOPEN_SOURCE
of 500 or greater and not require _XOPEN_SOURCE_EXTENDED. Bring in
changes from upstream ncurses patches
20100403 and
20111030 to take this
into account. Reported by Grigory Kirillov via jmc@.
ok millert jmc
anton [Mon, 10 Oct 2022 05:26:11 +0000 (05:26 +0000)]
two tests are now expected to fail since the introduction of mimmutable
jsg [Mon, 10 Oct 2022 03:01:11 +0000 (03:01 +0000)]
add references to 10h 12h revision guides
jsg [Mon, 10 Oct 2022 01:58:36 +0000 (01:58 +0000)]
revert amdgpu dirty fb helper changes from 5.15.71
drm/amdgpu: don't register a dirty callback for non-atomic
drm/amdgpu: use dirty framebuffer helper
kettenis found that these changes made xpdf slow on x395 (picasso).
I can not reproduce this on renoir.
jsg [Mon, 10 Oct 2022 00:12:45 +0000 (00:12 +0000)]
Ipv6 -> IPv6
kn [Sun, 9 Oct 2022 23:04:57 +0000 (23:04 +0000)]
Drop fattr promise unless file creation is allowed
This is only required for the single fchmod(2) ensuring default permissions
which only happens in the -c code path.
OK millert
kettenis [Sun, 9 Oct 2022 20:31:30 +0000 (20:31 +0000)]
RK3566/RK3568 support.
ok mlarkin@, patrick@
kettenis [Sun, 9 Oct 2022 20:30:59 +0000 (20:30 +0000)]
RK3566/RK3568 support.
ok patrick@
op [Sun, 9 Oct 2022 09:59:31 +0000 (09:59 +0000)]
allow newlines inside the `alternative names' block in acme-client.conf
ok florian
anton [Sun, 9 Oct 2022 05:54:40 +0000 (05:54 +0000)]
remove by now unwanted extra space in output
kevlo [Sun, 9 Oct 2022 02:32:02 +0000 (02:32 +0000)]
Fix typo in debug messages.
ok deraadt@
kettenis [Sat, 8 Oct 2022 19:46:52 +0000 (19:46 +0000)]
Add PNP ID to make this attach on Qualcomm SoCs.
ok mglocker@, patrick@
kevlo [Sat, 8 Oct 2022 17:08:55 +0000 (17:08 +0000)]
List SIMCom SIM8262E-M2 as supported for umb(4)
ok jmc@
deraadt [Sat, 8 Oct 2022 17:03:09 +0000 (17:03 +0000)]
The stack can also be marked immutable, because we expect no sane program
to try to change the permissions of it. We won't know who's trying that
until we enable it and see what breaks.
A tricky piece relating to setrlimit stack size changing was previously commited.
ok kettenis
deraadt [Sat, 8 Oct 2022 16:58:34 +0000 (16:58 +0000)]
The signal trampoline and timekeep regions can be marked immutable at
execve() time
ok kettenis
kettenis [Sat, 8 Oct 2022 16:42:41 +0000 (16:42 +0000)]
Since the PF_MUTABLE flag is an OpenBSD-specific flag, rename it to
PF_OPENBSD_MUTABLE. While there, add the missing PF_MASKOS, which makes
it obvious this bit is indeed in the space reserved for OS-specific bits.
ok deraadt@
mglocker [Sat, 8 Oct 2022 06:55:49 +0000 (06:55 +0000)]
regen
mglocker [Sat, 8 Oct 2022 06:53:06 +0000 (06:53 +0000)]
Add Wacom One M CTL-672 USB tablet.
krw [Fri, 7 Oct 2022 19:59:19 +0000 (19:59 +0000)]
Fix some error output, replacing some silly 'warnx("\n...")' with
fprintf(stderr, "\n...").
Reported by Michael Siegel via bugs@. ok tb@ (with some further suggestions)
krw [Fri, 7 Oct 2022 19:34:40 +0000 (19:34 +0000)]
Nuke GPTDOSACTIVE which specified the wrong bit. It was superseded by
GPTPARTATTR_BOOTABLE which specifies the correct one.
Reminded by drahn@
jmc [Fri, 7 Oct 2022 16:31:36 +0000 (16:31 +0000)]
sort SEE ALSO;
deraadt [Fri, 7 Oct 2022 15:43:41 +0000 (15:43 +0000)]
sync
deraadt [Fri, 7 Oct 2022 15:22:10 +0000 (15:22 +0000)]
Show the entry immutable bit in the various output formats.
deraadt [Fri, 7 Oct 2022 15:21:04 +0000 (15:21 +0000)]
Add mimmutable(2) libc stub, add & adjust manual pages, and crank the minor.
ok kettenis
deraadt [Fri, 7 Oct 2022 15:04:51 +0000 (15:04 +0000)]
In the linkers, collect objects in section "openbsd.mutable" and place
them into a page-aligned region in the bss, with the right markers for
kernel/ld.so to identify the region and skip making it immutable.
While here, fix readelf/objdump versions to show all of this.
ok miod kettenis
deraadt [Fri, 7 Oct 2022 15:00:12 +0000 (15:00 +0000)]
sync
deraadt [Fri, 7 Oct 2022 14:59:39 +0000 (14:59 +0000)]
Add mimmutable(2) system call which locks the permissions (PROT_*) of
memory mappings so they cannot be changed by a later mmap(), mprotect(),
or munmap(), which will error with EPERM instead.
ok kettenis
claudio [Fri, 7 Oct 2022 09:20:30 +0000 (09:20 +0000)]
Kill extra space in ext community ovs output.
Noticed by job@, OK tb@
jmc [Fri, 7 Oct 2022 06:00:58 +0000 (06:00 +0000)]
ssh-agent.1:
- use Nm not Xr for self-ref
- while here, wrap a long line
ssh-agent.c:
- add -O to usage()
deraadt [Fri, 7 Oct 2022 05:01:44 +0000 (05:01 +0000)]
new UVM_ET_IMMUTABLE flag marks a uvm entry as immutable.
djm [Fri, 7 Oct 2022 04:06:26 +0000 (04:06 +0000)]
document "-O no-restrict-websafe"; spotted by Ross L Richardson
deraadt [Fri, 7 Oct 2022 03:20:58 +0000 (03:20 +0000)]
Add identifiers for the new "mutable bss" section, ".openbsd.mutable" is
0x65a3dbe5. Also add PF_MUTABLE as a segment flag for later use.
jsg [Fri, 7 Oct 2022 03:12:22 +0000 (03:12 +0000)]
unstub intel_guc_send_busy_loop() ct_send()