openbsd
20 months agoPin the default framebuffer. The Linux drm code no longer does this since
kettenis [Thu, 9 Feb 2023 17:18:21 +0000 (17:18 +0000)]
Pin the default framebuffer.  The Linux drm code no longer does this since
they switched to using a shadow framebuffer and only pin the hardware
framebuffer when flushing the shadow framebuffer.  But our wdisplay(4)
and rasops(9) code expects the hardware framebuffer to be always
accessible at the same address.

Fixes the regression introduced by amdgpu_object.c rev 1.12.

ok jsg@

20 months agoInstead of relaying struct peer from the SE to the RDE to fill out 10
claudio [Thu, 9 Feb 2023 13:43:23 +0000 (13:43 +0000)]
Instead of relaying struct peer from the SE to the RDE to fill out 10
stat numbers, just send the peerid and have the RDE response with the
stats. The control code will then merge these counters into the real
peer struct and send that to bgpctl. This reduces the number of bytes
sent around a fair bit.
OK tb@

20 months agouse newer, much easier disklabel template strings
kn [Thu, 9 Feb 2023 11:35:17 +0000 (11:35 +0000)]
use newer, much easier disklabel template strings

20 months agoDo not ask to initialize disks with softraid chunks
kn [Thu, 9 Feb 2023 10:38:41 +0000 (10:38 +0000)]
Do not ask to initialize disks with softraid chunks

Skip chunk devices in the 'Which disk do you wish to initialize?' question.
Touching sd0, e.g. after a root on softraid sd1 install on sd0, will fail.

get_dkdevs_uninitialized() is used once, in interactive installs, right
after root disk setup, iff multiple disks exist.

Tested as part of a bigger diff by a few
OK cheloha

20 months agoPull in bn_internal.h for the generic version of bn_umul_hilo()
jsing [Thu, 9 Feb 2023 09:58:53 +0000 (09:58 +0000)]
Pull in bn_internal.h for the generic version of bn_umul_hilo()

20 months agoTest adding terminating newline to known_hosts.
dtucker [Thu, 9 Feb 2023 09:55:33 +0000 (09:55 +0000)]
Test adding terminating newline to known_hosts.

20 months agoEnsure that there is a terminating newline when adding a new entry
dtucker [Thu, 9 Feb 2023 09:54:11 +0000 (09:54 +0000)]
Ensure that there is a terminating newline when adding a new entry
to known_hosts.  bz#3529, with git+openssh at limpsquid.nl,
ok deraadt@ markus@

20 months agoClean up bn_sqr_words()
jsing [Thu, 9 Feb 2023 09:16:26 +0000 (09:16 +0000)]
Clean up bn_sqr_words()

Currently there are two versions of bn_sqr_words(), which call the sqr or
sqr64 macro. Replace this with a single version that calls bn_umul_hilo()
and remove the various implementations of the sqr macro. The only slight
downside is that sqr64 does three multiplications instead of four, given
that the second and third terms are identical. However, this is a minimal
gain for the amount of duplication and entanglement it introduces.

ok tb@

20 months agoDelay setting the timestamp in the ktrace header until we've grabbed
guenther [Thu, 9 Feb 2023 08:00:31 +0000 (08:00 +0000)]
Delay setting the timestamp in the ktrace header until we've grabbed
the vnode, to eliminate misordering of ktrace records.

problem noted by jrick@
ok deraadt@

20 months agoi386: lapic_timer_trigger: disable interrupts around lapic_timer_oneshot()
cheloha [Thu, 9 Feb 2023 01:41:15 +0000 (01:41 +0000)]
i386: lapic_timer_trigger: disable interrupts around lapic_timer_oneshot()

lapic_timer_oneshot() is not atomic.  We need to disable interrupts
when calling it to ensure the timer reaches a valid state.

Link: https://marc.info/?l=openbsd-tech&m=167482851403841&w=2
ok mlarkin@

20 months agoiked: remove another unused variable
tb [Wed, 8 Feb 2023 20:10:34 +0000 (20:10 +0000)]
iked: remove another unused variable

It is not entirely obvious if some logic was forgotten or if that variable
was added for debug logging or... Be that as it may, as tobhe points out,
this variable has been unused since the initial import of iked. The logic
seems sound without it, so it has never served a purpose and can go.

ok tobhe

20 months agoiked: garbage collect an unused counter variable to make clang 15 happier
tb [Wed, 8 Feb 2023 19:59:10 +0000 (19:59 +0000)]
iked: garbage collect an unused counter variable to make clang 15 happier

ok tobhe

20 months agoOmit version in SMALL ksh builds
kn [Wed, 8 Feb 2023 17:22:10 +0000 (17:22 +0000)]
Omit version in SMALL ksh builds

No need for KSH_VERSION and its PS1 esacape sequences in installer shells.
Save some bits and clean up what(1) output on ramdisk kernels.

OK deraadt

20 months agoUse _nc_tparm_analyze() instead of trying to do it ourselves in process().
millert [Wed, 8 Feb 2023 15:56:32 +0000 (15:56 +0000)]
Use _nc_tparm_analyze() instead of trying to do it ourselves in process().
This fixes tput when used with a capability that uses push/pop.
OK gkoehler@

20 months agodump/fsck_ffs: convert two function definitions to ansi, missed
tb [Wed, 8 Feb 2023 08:25:44 +0000 (08:25 +0000)]
dump/fsck_ffs: convert two function definitions to ansi, missed
in previous passes some decades ago. Less noise from clang 15.

ok claudio

20 months agofinger/mail: two trivial functions were missed in earlier ansi passes
tb [Wed, 8 Feb 2023 08:24:29 +0000 (08:24 +0000)]
finger/mail: two trivial functions were missed in earlier ansi passes

20 months agotelnet: fix prototypes for two signal handlers to make clang 15 happy
tb [Wed, 8 Feb 2023 08:22:44 +0000 (08:22 +0000)]
telnet: fix prototypes for two signal handlers to make clang 15 happy

20 months agousr.sbin: missing void to appease clang 15's -Wstrict-prototype.
tb [Wed, 8 Feb 2023 08:20:53 +0000 (08:20 +0000)]
usr.sbin: missing void to appease clang 15's -Wstrict-prototype.

20 months agosed: add missing void to avoid -Wstrict-prototype with clang 15
tb [Wed, 8 Feb 2023 08:18:11 +0000 (08:18 +0000)]
sed: add missing void to avoid -Wstrict-prototype with clang 15

20 months agossh-agent doesn't actually take -v, so the recently-added ones will
dtucker [Wed, 8 Feb 2023 08:06:03 +0000 (08:06 +0000)]
ssh-agent doesn't actually take -v, so the recently-added ones will
result in the test not cleaning up after itself.  Patch from cjwatson
at debian.org vi bz#3536.

20 months agoisakmpd: add missing void to a function definition
tb [Wed, 8 Feb 2023 08:03:11 +0000 (08:03 +0000)]
isakmpd: add missing void to a function definition

Fixes -Wstrict-prototype warning seen with clang 15 on amd64 and arm64.

20 months agounwind: add two missing void to function definitions
tb [Wed, 8 Feb 2023 08:01:25 +0000 (08:01 +0000)]
unwind: add two missing void to function definitions

Silences -Wstrict-prototype warnings seen with clang 15 on amd64 and arm64.

ok florian

20 months agoopenssl(1) pkcs7 avoid crash on malformed files
tb [Wed, 8 Feb 2023 07:59:24 +0000 (07:59 +0000)]
openssl(1) pkcs7 avoid crash on malformed files

When printing certificates or CRLs, check signed and signedAndEnveloped
before dereferencing them. Prevents crash on inspecting malformed PKCS7
files.

ok jsing

20 months agointernal representation of icmp type/code in pfctl(8)/pf(4) does not
sashan [Tue, 7 Feb 2023 17:58:43 +0000 (17:58 +0000)]
internal representation of icmp type/code in pfctl(8)/pf(4) does not
fit into u_int8_t. Issue has been noticed and kindly reported by
amalinin _at_ bh0.amt.ru via bugs@.

OK bluhm@

20 months agohome.arpa is a special-use domain, internally answered by libunbound.
florian [Tue, 7 Feb 2023 17:44:02 +0000 (17:44 +0000)]
home.arpa is a special-use domain, internally answered by libunbound.

Let it through to forwarders like we do with AS112 domains because
home.arpa might be useful in the local network.
Issue reported by Ryan Kavanagh (rak at rak.ac), thanks!
Input & OK tb

20 months agoremove seatbelt
deraadt [Tue, 7 Feb 2023 17:34:10 +0000 (17:34 +0000)]
remove seatbelt

20 months agoRemove needless #ifdef INET6 from struct ether_extracted field in
bluhm [Tue, 7 Feb 2023 16:14:55 +0000 (16:14 +0000)]
Remove needless #ifdef INET6 from struct ether_extracted field in
public header file.  Makes debugging with special kernels easier.

20 months agoFix arbitrary memory read in GENERAL_NAME_cmp()
tb [Tue, 7 Feb 2023 15:46:58 +0000 (15:46 +0000)]
Fix arbitrary memory read in GENERAL_NAME_cmp()

The ASN.1 template for GENERAL_NAME and its corresponding C structure
disagree on the type of the x400Address member. This results in an ASN.1
string to be considered as an ASN.1 type, which allows an attacker to read
(essentially) arbitrary memory. Fix this by forcing comparison as strings.

While the underlying type confusion has been present since time immemorial,
this particular bug came with the EdiPartyName fix (6.8/008_asn1.patch.sig).

Reported by David Benjamin, fix suggested by jsing.

Release date for this was set to be January 31. Unilaterally pushed back to
February 7 by OpenSSL by way of announcement of many completely unrelated
embargoed issues, some of which they had been sitting on since July 2020.

ok beck jsing

20 months agoswitch to new simplified disklabel template format.
krw [Tue, 7 Feb 2023 15:33:22 +0000 (15:33 +0000)]
switch to new simplified disklabel template format.

ok kn@

20 months agoswitch to new simplified disklabel template format
kn [Tue, 7 Feb 2023 15:04:27 +0000 (15:04 +0000)]
switch to new simplified disklabel template format

20 months agoExtend template parsing to allow "[mount point] *" as the specification for
krw [Tue, 7 Feb 2023 14:30:48 +0000 (14:30 +0000)]
Extend template parsing to allow "[mount point] *" as the specification for
putting the maximum available free space into a partition.

Extend command line parsing to allow 'T-' as the specification to
read the template file from stdin.

Prompted by, feedback, testing and ok kn@

20 months agoSince we override CFLAGS here, don't forget to put -Oz in there so as to compile
miod [Tue, 7 Feb 2023 12:06:53 +0000 (12:06 +0000)]
Since we override CFLAGS here, don't forget to put -Oz in there so as to compile
with some form of optimization.

20 months agoRemove old buffer when renaming rather than complaining, GitHub issue
nicm [Tue, 7 Feb 2023 10:56:04 +0000 (10:56 +0000)]
Remove old buffer when renaming rather than complaining, GitHub issue
3467 from Jean-Philippe Paradis.

20 months agoAdd an L modifier like P, W, S to loop over clients. Also fix some long
nicm [Tue, 7 Feb 2023 10:21:01 +0000 (10:21 +0000)]
Add an L modifier like P, W, S to loop over clients. Also fix some long
lines in tmux(1).

20 months agolibcrypto/ec: another missing point-on-curve check
tb [Tue, 7 Feb 2023 09:00:48 +0000 (09:00 +0000)]
libcrypto/ec: another missing point-on-curve check

Unlike in the affine/compressed/... cases, when setting projective
coordinates of an elliptic curve point, there is no check whether
the point is actually on the curve.

Pointed out by Guido Vranken

ok beck miod

20 months agoregen
kevlo [Tue, 7 Feb 2023 07:11:14 +0000 (07:11 +0000)]
regen

20 months agoAdd ASMedia ASM2142 xhci
kevlo [Tue, 7 Feb 2023 07:10:43 +0000 (07:10 +0000)]
Add ASMedia ASM2142 xhci

ok deraadt@

20 months agomatch on another Elkhart Lake id
jsg [Mon, 6 Feb 2023 23:40:53 +0000 (23:40 +0000)]
match on another Elkhart Lake id
Noticed when looking at the datasheet.  Merged into drm-intel-next.

20 months agovmd(8): scan pci bus to determine bootorder strings.
dv [Mon, 6 Feb 2023 20:33:34 +0000 (20:33 +0000)]
vmd(8): scan pci bus to determine bootorder strings.

vmd's SeaBIOS bootorder strings had hardcoded pci device ids, so
if a user added a network interface the bootorder strings didn't
line up with reality. Using vmctl(8) to boot from a cdrom (-B cdrom)
would fail, for instance, if attaching both a nic and a disk as
well.

This change scans the pci devices and finds the first of each type
to construct viable bootorder strings.

ok jan@

20 months agoconsolidate mbuf header parsing on device driver layer
jan [Mon, 6 Feb 2023 20:27:44 +0000 (20:27 +0000)]
consolidate mbuf header parsing on device driver layer

with tweaks from mvs@, mpi@, dlg@, naddy@ and bluhm@

"go for it" deraadt@

ok naddy@, mvs@

21 months agosmtpd(8) could abort due to a connection from a local, scoped ipv6 address.
semarie [Mon, 6 Feb 2023 18:35:52 +0000 (18:35 +0000)]
smtpd(8) could abort due to a connection from a local, scoped ipv6 address.

avoid using inet_pton(3) which doesn't support scoped ipv6 address, and use
getaddrinfo(3) instead of.

ok millert@ florian@ kn@

21 months agoAccept netstat-style address.port syntax too.
millert [Mon, 6 Feb 2023 18:14:10 +0000 (18:14 +0000)]
Accept netstat-style address.port syntax too.
OK bluhm@ deraadt@ jmc@

21 months agoUnifdef -U _PMAP_MAY_USE_PROM_CONSOLE. This code hasn't been needed in years
miod [Mon, 6 Feb 2023 11:16:22 +0000 (11:16 +0000)]
Unifdef -U _PMAP_MAY_USE_PROM_CONSOLE. This code hasn't been needed in years
since the TC machines have switched to the MI zstty code.

21 months agoAdd -f to list-clients like the other list commands, from Andy Walker in
nicm [Mon, 6 Feb 2023 09:20:30 +0000 (09:20 +0000)]
Add -f to list-clients like the other list commands, from Andy Walker in
GitHub issue 3449.

21 months agoAdd space after comma in MD "No * partition in *,try again." replies
kn [Mon, 6 Feb 2023 08:41:00 +0000 (08:41 +0000)]
Add space after comma in MD "No * partition in *,try again." replies
split across `echo -n' and `echo'.  Those in single `echo' have it.

21 months agoAdd missing check for pg != NULL
gkoehler [Mon, 6 Feb 2023 06:41:38 +0000 (06:41 +0000)]
Add missing check for pg != NULL

The code was reading pg->pg_flags, so clang assumed pg != NULL, then
optimized a later "if (pg != NULL)" to "if (1)", and allowed a call to
pmap_enter_pv(pted, NULL).  Such a call can freeze bsd.mp by trying to
lock NULL's ((struct mutex *)0x3c).  I froze bsd.mp this way by
starting Xorg on a macppc with nv(4) or r128(4) video, as it tried to
mmap the xf86(4) aperture.

ok miod@

21 months agoDo not allow multiple line separators in a row.
nicm [Sun, 5 Feb 2023 21:26:48 +0000 (21:26 +0000)]
Do not allow multiple line separators in a row.

21 months agoExtend display-message to work for control clients. GitHub issue 3449.
nicm [Sun, 5 Feb 2023 21:15:32 +0000 (21:15 +0000)]
Extend display-message to work for control clients. GitHub issue 3449.

21 months agoremove --no-execute-only seatbelt
deraadt [Sun, 5 Feb 2023 15:37:28 +0000 (15:37 +0000)]
remove --no-execute-only seatbelt

21 months agodefault __mips64__ to execute only
deraadt [Sun, 5 Feb 2023 15:37:10 +0000 (15:37 +0000)]
default __mips64__ to execute only

21 months agoSwitch the mips64 linker scripts over to the templates that order .rodata
kettenis [Sun, 5 Feb 2023 15:26:36 +0000 (15:26 +0000)]
Switch the mips64 linker scripts over to the templates that order .rodata
before .text.

ok deraadt@

21 months agosync
deraadt [Sun, 5 Feb 2023 15:05:01 +0000 (15:05 +0000)]
sync

21 months agoImplement usertc corresponding to the Allwinner A64 agtimer(4) errata.
kettenis [Sun, 5 Feb 2023 13:37:51 +0000 (13:37 +0000)]
Implement usertc corresponding to the Allwinner A64 agtimer(4) errata.

ok cheloha@, semarie@

21 months agowritev() appeared in 4.1c before 4.2
jsg [Sun, 5 Feb 2023 12:33:17 +0000 (12:33 +0000)]
writev() appeared in 4.1c before 4.2

21 months agogetpagesize() appeared in 4.1c before 4.2
jsg [Sun, 5 Feb 2023 12:17:25 +0000 (12:17 +0000)]
getpagesize() appeared in 4.1c before 4.2

21 months agoadd ufshci(4);
jmc [Sun, 5 Feb 2023 07:11:12 +0000 (07:11 +0000)]
add ufshci(4);

21 months agomatch on Elkhart Lake
jsg [Sun, 5 Feb 2023 02:26:02 +0000 (02:26 +0000)]
match on Elkhart Lake
ok patrick@ jan@

21 months agoregen
jsg [Sun, 5 Feb 2023 01:58:30 +0000 (01:58 +0000)]
regen

21 months agoadd Intel Elkhart Lake ids
jsg [Sun, 5 Feb 2023 01:57:59 +0000 (01:57 +0000)]
add Intel Elkhart Lake ids

from:
Intel Atom x6000E Series, and Intel Pentium and Celeron N and
J Series Processors for IoT Applications
Datasheet, Volume 1
Document Number: 636112-1.6

AHCI changed from 0x4b60 to 0x4b63 to match what is seen on
Dell EMC Edge Gateway 3200 with Atom x6425RE and
Compulab fitlet3 with Atom x6425E.

0x4b7f is documented as Reserved but is SRAM

ok patrick@ jan@

21 months agopowerpc64: dec_rearm: don't disable interrupts around atomic operations
cheloha [Sat, 4 Feb 2023 23:20:54 +0000 (23:20 +0000)]
powerpc64: dec_rearm: don't disable interrupts around atomic operations

We don't need to disable interrupts around this singular mtdec() call.
The mtdec operation is atomic.

Link: https://marc.info/?l=openbsd-tech&m=167494864124073&w=2
ok gkoehler@

21 months agomacppc: dec_rearm: don't disable interrupts around atomic operations
cheloha [Sat, 4 Feb 2023 23:17:05 +0000 (23:17 +0000)]
macppc: dec_rearm: don't disable interrupts around atomic operations

We don't need to disable interrupts around ppc_mtdec().  The
underlying operation, mtdec, is atomic.

Link: https://marc.info/?l=openbsd-tech&m=167494864124073&w=2
ok gkoehler@

21 months agoInitial driver for Universal Flash Storage (UFS) Host Controllers.
mglocker [Sat, 4 Feb 2023 23:11:59 +0000 (23:11 +0000)]
Initial driver for Universal Flash Storage (UFS) Host Controllers.

ok kettenis@

21 months agoMake ld.bfd default to --execute-only on amd64.
kettenis [Sat, 4 Feb 2023 21:20:40 +0000 (21:20 +0000)]
Make ld.bfd default to --execute-only on amd64.

ok deraadt@

21 months agoSet default volume to -30 dB instead of using the hardware default of 0 dB
kettenis [Sat, 4 Feb 2023 20:04:20 +0000 (20:04 +0000)]
Set default volume to -30 dB instead of using the hardware default of 0 dB
(which means maximum volume).

ok patrick@, ratchov@

21 months agokernel: stathz is always non-zero after cpu_initclocks()
cheloha [Sat, 4 Feb 2023 19:33:03 +0000 (19:33 +0000)]
kernel: stathz is always non-zero after cpu_initclocks()

Now that the clockintr switch is complete, cpu_initclocks() always
initializes stathz to a non-zero value.  We don't call statclock()
from hardclock(9) anymore and, more broadly, we don't need to test
whether stathz is non-zero before using it.

With input from kettenis@.

Link: https://marc.info/?l=openbsd-tech&m=167434223309668&w=2
ok kettenis@ miod@

21 months agotimecounting: remove incomplete PPS support
cheloha [Sat, 4 Feb 2023 19:19:35 +0000 (19:19 +0000)]
timecounting: remove incomplete PPS support

The timecounting code has had stubs for pulse-per-second (PPS) polling
since it was imported in 2004.  At this point it seems unlikely that
anyone is going to finish adding PPS support, so let's remove the stubs:

- Delete the dead tc_poll_pps() call from tc_windup().
- Remove all tc_poll_pps symbols from the kernel.

Link: https://marc.info/?l=openbsd-tech&m=167519035723210&w=2
ok miod@

21 months agoSet default volume to -30 dB instead of using the hardware default of 0 dB
kettenis [Sat, 4 Feb 2023 18:58:19 +0000 (18:58 +0000)]
Set default volume to -30 dB instead of using the hardware default of 0 dB
(which means maximum volume).

ok patrick@, ratchov@

21 months agoRemove bn_sqr_words() on amd64.
jsing [Sat, 4 Feb 2023 14:00:18 +0000 (14:00 +0000)]
Remove bn_sqr_words() on amd64.

s2n-bignum's bignum_sqr() is not the same as bn_sqr_words() (which only
computes a partial result, unlike the former). This went unnoticed since
bn_sqr() is called directly on amd64, hence bn_sqr_words() is currently
unused.

21 months agocorrect history, shutdown(8) appeared in 4.1BSD before 4.1c
jsg [Sat, 4 Feb 2023 13:03:58 +0000 (13:03 +0000)]
correct history, shutdown(8) appeared in 4.1BSD before 4.1c

"shutdown
Is a new command which shuts the system down at a specified time."
Bug fixes and changes in 4.1bsd
May 10, 1981
from bitsavers bits/BSD/BSD4.1_bootable.tap.gz
/usr/man/man0/changes.4-81

There may have been some confusion when checking against CSRG archives.
The 4.1 there is 4.0 with a "4.0.upgrade" directory with 4.1 files such
as 4.0.upgrade/etc/shutdown.  And 4.1a isn't a full tree.
In SCCS shutdown.c starts on Feb 7 1981.

21 months agoFix output constraints for bn_umul_hilo().
jsing [Sat, 4 Feb 2023 11:48:55 +0000 (11:48 +0000)]
Fix output constraints for bn_umul_hilo().

When bn_umul_hilo() is implemented using an instruction pair, mark the
first output with a constraint that prevents the output from overlapping
with the inputs ("&"). Otherwise the first instruction can overwrite the
inputs, which then results in the second instruction producing incorrect
value.

21 months agounstub i915_gem_stolen_lmem_setup()
jsg [Sat, 4 Feb 2023 00:07:11 +0000 (00:07 +0000)]
unstub i915_gem_stolen_lmem_setup()

21 months agoRASOPS_CLIPPING is about screen coordinates, don't let it mess with color
miod [Fri, 3 Feb 2023 18:34:24 +0000 (18:34 +0000)]
RASOPS_CLIPPING is about screen coordinates, don't let it mess with color
codes. NFC as this option is not enabled anywhere.

21 months agoRemove leftover rasops_isgray[] declaration.
miod [Fri, 3 Feb 2023 18:32:31 +0000 (18:32 +0000)]
Remove leftover rasops_isgray[] declaration.
From Crystal Kolipe.

21 months agoRemove redundant DIAGNOSTIC wrappers around KASSERT macros.
miod [Fri, 3 Feb 2023 18:31:16 +0000 (18:31 +0000)]
Remove redundant DIAGNOSTIC wrappers around KASSERT macros.
From Crystal Kolipe.

21 months agosync
deraadt [Fri, 3 Feb 2023 18:20:40 +0000 (18:20 +0000)]
sync

21 months agoAdd void to conn_close_any()
tb [Fri, 3 Feb 2023 17:43:25 +0000 (17:43 +0000)]
Add void to conn_close_any()

This makes the function definition match the prototype and silences a
clang-15 warning.

21 months agoFix tput when compiled with clang-15 -O2
tb [Fri, 3 Feb 2023 15:55:59 +0000 (15:55 +0000)]
Fix tput when compiled with clang-15 -O2

For some reason clang-15 doesn't like passing the uninitialized array of
pointers nargv[] to the vararg function tparm(). With -O2 it optimizes the
for loop preceding the tparm() call strangely, with the result that the
argv[i] == NULL error is hit in most real-world usage. This broke naddy's
fancy shell prompt among other things. Initialize nargv[] to appease the
insatiable undefined behavior exploiter.

ok jca millert

21 months agoadd sncodec(4);
jmc [Fri, 3 Feb 2023 15:53:15 +0000 (15:53 +0000)]
add sncodec(4);

21 months agoadd missing ".It Xo" in previous;
jmc [Fri, 3 Feb 2023 15:51:09 +0000 (15:51 +0000)]
add missing ".It Xo" in previous;

21 months agoDefine get_softraid_disks() before get_dkdevs*() so they can use it
kn [Fri, 3 Feb 2023 15:28:04 +0000 (15:28 +0000)]
Define get_softraid_disks() before get_dkdevs*() so they can use it

21 months agoenable sncodec(4)
kettenis [Fri, 3 Feb 2023 14:48:57 +0000 (14:48 +0000)]
enable sncodec(4)

21 months agoMake softraid helper return disk not device names
kn [Fri, 3 Feb 2023 14:18:56 +0000 (14:18 +0000)]
Make softraid helper return disk not device names

get_softraid_chunks() yields full device names with labels, e.g. "sd0a",
but the installer largely deals with disk names "sd0".

The only user of this, MAKEDEV, behaves identically with either form.

Rename to get_softraid_disks(), clarify comments and return disk names
so it can be reused without pattern matching or stripping labels.

OK afresh1

21 months agosncodec(4)
kettenis [Fri, 3 Feb 2023 13:28:51 +0000 (13:28 +0000)]
sncodec(4)

21 months agoAdd sncodec(4) a driver for the TI SN012776/TAS2764 digital amplifier.
kettenis [Fri, 3 Feb 2023 13:22:59 +0000 (13:22 +0000)]
Add sncodec(4) a driver for the TI SN012776/TAS2764 digital amplifier.

ok ratchov@

21 months agoSet clock divider instead of relying on the pre-configured value.
kettenis [Fri, 3 Feb 2023 13:20:21 +0000 (13:20 +0000)]
Set clock divider instead of relying on the pre-configured value.

ok ratchov@

21 months agoAdd ASPA to Looking Glass
job [Fri, 3 Feb 2023 13:10:57 +0000 (13:10 +0000)]
Add ASPA to Looking Glass

OK claudio@

21 months agoRemove PHY ID checks. The Linux driver is no longer checking for
mbuhl [Fri, 3 Feb 2023 11:31:52 +0000 (11:31 +0000)]
Remove PHY ID checks. The Linux driver is no longer checking for
the PHY ID because there is only one venor.
ok kevlo@

21 months agoAdd ASPA support to bgpctl FastCGI server
job [Fri, 3 Feb 2023 10:10:36 +0000 (10:10 +0000)]
Add ASPA support to bgpctl FastCGI server

OK tb@ claudio@

21 months agoRemove a bunch of pic-related macros which were supposed to mimic similar
miod [Fri, 3 Feb 2023 06:13:08 +0000 (06:13 +0000)]
Remove a bunch of pic-related macros which were supposed to mimic similar
x86 macros but have never been implemented and never been used either.

21 months agodefault sparc64 ld.lld to --execute-only
deraadt [Fri, 3 Feb 2023 05:59:08 +0000 (05:59 +0000)]
default sparc64 ld.lld to --execute-only
Note this doesn't actually work yet for anything big -- some unknown
stuff needs to be fixed.  Also ld.lld isn't the default sparc64 ld yet.
But at least having this available during normal builds, to test iterate
upon, will speed up either of those desireable outcomes.
ok claudio

21 months agoMove BN_mod_exp2_mont() to bn_exp.c.
jsing [Fri, 3 Feb 2023 05:30:49 +0000 (05:30 +0000)]
Move BN_mod_exp2_mont() to bn_exp.c.

21 months agoReorder functions in bn_exp.c to be slightly sensible...
jsing [Fri, 3 Feb 2023 05:27:50 +0000 (05:27 +0000)]
Reorder functions in bn_exp.c to be slightly sensible...

No functional change intended.

21 months agoClean up and simplify BN_mod_lshift{,_quick}().
jsing [Fri, 3 Feb 2023 05:15:40 +0000 (05:15 +0000)]
Clean up and simplify BN_mod_lshift{,_quick}().

BN_mod_lshift() already has a BN_CTX available, make use of it rather than
calling BN_dup() and BN_free().

In BN_mod_lshift_quick(), BN_copy() already handles dst == src, so avoid
checking this before the call. The max_shift == 0 case can also be handled
without code duplication. And as with other *_quick() functions, use
BN_ucmp() and BN_usub() directly given the 0 <= a < m constraint.

ok tb@

21 months agoClean up BN_mod_mul() and simplify BN_mod_sqr().
jsing [Fri, 3 Feb 2023 05:10:57 +0000 (05:10 +0000)]
Clean up BN_mod_mul() and simplify BN_mod_sqr().

Use the same naming/code pattern in BN_mod_mul() as is used in BN_mul().
Note that the 'rr' allocation is unnecessary, since both BN_mul() and
BN_sqr() handle the case where r == a || r == b. However, it avoids a
potential copy on the exit from BN_mul()/BN_sqr(), so leave it in place
for now.

Turn BN_mod_sqr() into a wrapper that calls BN_mod_mul(), since it already
calls BN_sqr() in the a == b. The supposed gain of calling BN_mod_ct()
instead of BN_nnmod() does not really exist.

ok tb@

21 months agoSimplify BN_mod_{lshift1,sub}_quick().
jsing [Fri, 3 Feb 2023 05:06:20 +0000 (05:06 +0000)]
Simplify BN_mod_{lshift1,sub}_quick().

The BN_mod_.*_quick() functions require that their inputs are non-negative
and are already reduced. As such, they can and should use BN_ucmp() and
BN_usub() instead of BN_cmp() and BN_add()/BN_sub() (which internally call
BN_uadd()/BN_usub() and potentially BN_cmp()).

ok tb@

21 months agoSimplify BN_nnmod().
jsing [Fri, 3 Feb 2023 04:55:13 +0000 (04:55 +0000)]
Simplify BN_nnmod().

In the case that the result is negative (i.e. one of a or m is negative),
the positive result can be achieved via a single BN_usub(). This simplifies
BN_nnmod() and avoids indirection via BN_add()/BN_sub(), which do BN_cmp()
and then call into BN_uadd()/BN_usub().

ok tb@

21 months agoTurn BN_mod_{ct,nonct}() into symbols.
jsing [Fri, 3 Feb 2023 04:47:59 +0000 (04:47 +0000)]
Turn BN_mod_{ct,nonct}() into symbols.

Also use accurate/useful variables names.

ok tb@

21 months agomake --execute-only the default on powerpc
deraadt [Fri, 3 Feb 2023 03:41:21 +0000 (03:41 +0000)]
make --execute-only the default on powerpc
ok gkoehler

21 months agoEmit log messages in consistent format
job [Thu, 2 Feb 2023 20:31:37 +0000 (20:31 +0000)]
Emit log messages in consistent format

21 months agoRemove AIX toc data after every function. NFC
miod [Thu, 2 Feb 2023 20:12:05 +0000 (20:12 +0000)]
Remove AIX toc data after every function. NFC