CVS: cvs.openbsd.org: src

2024-04-22 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/04/22 01:31:54

Modified files:
regress/lib/libssl: Makefile 
regress/lib/libssl/client: Makefile 

Log message:
Instead of unhooking libssl/client regress tests, flag them as expected
to fail.

ok tb@



Re: CVS: cvs.openbsd.org: src

2024-04-17 Thread Anton Lindqvist
On Tue, Apr 16, 2024 at 08:37:49AM -0600, Florian Obser wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   flor...@cvs.openbsd.org 2024/04/16 08:37:49
> 
> Modified files:
>   sys/netinet6   : in6.c 
> 
> Log message:
> Destination addresses make no sense on loopback interfaces.
> 
> While here use (variable & FLAG) or !(variable & FLAG) consistently in
> in6_update_ifa().
> 
> Discussed with claudio
> OK denis

This change introduced 15 regress failures, all related to inet6.

https://regress.basename.se/

Excerpt from sys/net/mpath showing the symptom:

doas -n /sbin/ifconfig lo19 inet6 fc00::19 alias
ifconfig: lo19: SIOCIFAFATTACH: Invalid argument
ifconfig: SIOCAIFADDR: Invalid argument



CVS: cvs.openbsd.org: src

2024-04-03 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/04/03 00:01:11

Modified files:
regress/usr.bin/ssh: test-exec.sh 

Log message:
Since ssh-agent(1) is only readable by root by now, use ssh(1) while
generating data in tests.



Re: CVS: cvs.openbsd.org: src

2024-04-01 Thread Anton Lindqvist
On Mon, Apr 01, 2024 at 09:50:17AM -0600, Theo de Raadt wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   dera...@cvs.openbsd.org 2024/04/01 09:50:17
> 
> Modified files:
>   usr.bin/ssh/ssh-agent: Makefile 
> 
> Log message:
> also create a relink kit for ssh-agent, since it is a long-running setgid
> program carrying keys with some (not very powerful) communication channels.
> solution for testing the binary from dtucker.  agreement from djm.
> Will add it into /etc/rc in a few days.

The BINMODE change, removing read permissions from group and others,
caused ssh regress to fail. Flooded with the following message:

cat: /usr/bin/ssh-agent: Permission denied



CVS: cvs.openbsd.org: src

2024-04-01 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/04/01 12:52:34

Modified files:
regress/sys/arch/amd64/fpu: fenv.S 

Log message:
The regress/sys/arch/amd64/fpu/fenv.S utility issues "direct" syscalls
which does not go through libc. This is no longer possible due to
pinsyscalls(2). Borrow the PINSYSCALL asm macro from libc/arch/DEFS.h to
setup a .openbsd.syscalls section.



Re: CVS: cvs.openbsd.org: src

2024-03-27 Thread Anton Lindqvist
On Tue, Mar 26, 2024 at 03:46:47AM -0600, Vitaliy Makkoveev wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   m...@cvs.openbsd.org2024/03/26 03:46:47
> 
> Modified files:
>   sys/kern   : sys_socket.c uipc_socket.c uipc_socket2.c 
>uipc_usrreq.c 
>   sys/miscfs/fifofs: fifo_vnops.c 
>   sys/sys: socketvar.h 
> 
> Log message:
> Use `sb_mtx' to protect `so_rcv' receive buffer of unix(4) sockets.
> 
> This makes re-locking unnecessary in the uipc_*send() paths, because
> it's enough to lock one socket to prevent peer from concurrent
> disconnection. As the little bonus, one  unix(4) socket can perform
> simultaneous transmission and reception with one exception for
> uipc_rcvd(), which still requires the re-lock for connection oriented
> sockets.
> 
> The socket lock is not held while filt_soread() and filt_soexcept()
> called from uipc_*send() through sorwakeup(). However, the unlocked
> access to the `so_options', `so_state' and `so_error' is fine.
> 
> The receiving socket can't be or became listening socket. It also can't
> be disconnected concurrently. This makes immutable SO_ACCEPTCONN,
> SS_ISDISCONNECTED and SS_ISCONNECTED bits which are clean and set
> respectively.
> 
> `so_error' is set on the peer sockets only by unp_detach(), which also
> can't be called concurrently on sending socket.
> 
> This is also true for filt_fiforead() and filt_fifoexcept(). For other
> callers like kevent(2) or doaccept() the socket lock is still held.
> 
> ok bluhm

Observing two regress hangs in the kernel on netio. Both seems make use
of unix sockets. Could this be the culprit?

regress/lib/libc/fread
regress/usr.bin/ssh (scp.sh)



CVS: cvs.openbsd.org: src

2024-03-04 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/03/05 00:01:40

Modified files:
regress/libexec/ftpd: Makefile 

Log message:
Make ftpd tests less flaky by ensuring the server has terminated before
starting a new one.



CVS: cvs.openbsd.org: src

2024-02-28 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/02/28 23:54:29

Modified files:
regress/sys/net/vxlan: vxlan_2.sh 

Log message:
Stop assuming arbitrary rdomains are available and use the first given
rdomain as the vnetid.



CVS: cvs.openbsd.org: src

2024-02-27 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/02/27 23:33:39

Modified files:
regress/sys/net/vxlan: Makefile 

Log message:
Infer all rdomains from the environment with sane defaults.



CVS: cvs.openbsd.org: src

2024-02-27 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/02/27 12:34:13

Modified files:
regress/sys/btcfi: foobar.c 

Log message:
Skip btcfi tests on amd64 CPUs not supporting CET IBT.

ok kettenis@



CVS: cvs.openbsd.org: src

2024-02-26 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/02/27 00:21:07

Modified files:
regress/sys/netinet/in_pcbbind: Makefile 

Log message:
Favor usage of REGRESS_SKIP_TARGETS instead of this custom logic.



CVS: cvs.openbsd.org: src

2024-02-26 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/02/26 23:58:48

Modified files:
regress/usr.bin/ctfdump: base_types_encoding.amd64 
 base_types_encoding.i386 

Log message:
Cope with recent ctfdump output changes.



CVS: cvs.openbsd.org: src

2024-02-26 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/02/26 23:58:19

Modified files:
usr.bin/ctfconv: generate.c 

Log message:
Recent ctfconv refactoring broke support for long double types, as
discovered by the regress tests.



CVS: cvs.openbsd.org: src

2024-02-18 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/02/18 13:17:48

Modified files:
sys/dev/wscons : wskbd.c 

Log message:
Prevent ioctl(WSKBDIO_GETENCODINGS) NULL deference when sysctl
machdep.forceukbd is enabled without any USB keyboard being attached.

Found the hard way by sthen@; ok miod@



CVS: cvs.openbsd.org: src

2024-02-07 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/02/07 12:26:58

Modified files:
regress/usr.sbin/ospf6d: Makefile 

Log message:
Infer rdomains from environment variables N1 and N2 like many others in
regress/sys/net already does. No functional change as the defaults
remains the same.



CVS: cvs.openbsd.org: src

2024-02-04 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/02/04 23:48:04

Modified files:
regress/lib/libc/locale/uselocale: uselocale.c 

Log message:
Cope with recent ctype.h prefix changes.



CVS: cvs.openbsd.org: src

2024-01-28 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/01/28 05:36:21

Modified files:
regress/usr.sbin/bgpd/integrationtests: ixp.sh 
network_statement.sh 
Added files:
regress/usr.sbin/bgpd/integrationtests: util.sh 

Log message:
Use the wait until construct in ixp.sh in the hopes of making it more
stable.



CVS: cvs.openbsd.org: src

2024-01-23 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/01/23 03:27:12

Modified files:
regress/sys/kern/exec_self: exec_self.c 

Log message:
Place the blob in the .openbsd.mutable section to cope with recent
madvise(2) changes.

ok deraadt@



CVS: cvs.openbsd.org: src

2024-01-15 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/01/15 23:40:07

Modified files:
regress/sys/net/pf_table: Makefile 

Log message:
Cope with recent changes to pfctl output.



CVS: cvs.openbsd.org: src

2024-01-14 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/01/14 23:51:55

Modified files:
regress/sys/netinet/carp: carp_subr 

Log message:
Increase wait until threshold. Should hopefully make these tests more
stable.



CVS: cvs.openbsd.org: src

2024-01-05 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2024/01/05 03:37:54

Modified files:
regress/sys/netinet/carp: carp_1.sh carp_2.sh carp_3.sh 
  carp_4.sh carp_subr 

Log message:
Wait until the expected interface state is reached instead of relying on
arbitrary sleeps. Should hopefully make these tests more stable.



Re: CVS: cvs.openbsd.org: src

2023-12-23 Thread Anton Lindqvist
On Fri, Dec 22, 2023 at 10:12:13AM -0700, Todd C. Miller wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   mill...@cvs.openbsd.org 2023/12/22 10:12:13
> 
> Modified files:
>   regress/usr.bin/xargs: xargs-L.sh 
>   usr.bin/xargs  : xargs.c 
> 
> Log message:
> xargs: fix parsing of empty fields when "xargs -0" is used.
> Previously, these fields would be skipped.  From Hiltjo Posthuma.

This broke the common `find -print0 | xargs -0` idiom:

$ mkdir -p /tmp/a
$ find /tmp/a -print0 | xargs -0r rm -r
rm: : No such file or directory



Re: CVS: cvs.openbsd.org: src

2023-11-21 Thread Anton Lindqvist
On Tue, Nov 21, 2023 at 09:21:03AM +0100, Florian Obser wrote:
> On 2023-11-21 08:04 +01, Anton Lindqvist  wrote:
> > On Mon, Nov 20, 2023 at 05:15:16AM -0700, Florian Obser wrote:
> >> CVSROOT:   /cvs
> >> Module name:   src
> >> Changes by:flor...@cvs.openbsd.org 2023/11/20 05:15:16
> >> 
> >> Modified files:
> >>lib/libc/asr   : asr_private.h asr_utils.c getaddrinfo_async.c 
> >> gethostnamadr_async.c 
> >> 
> >> Log message:
> >> localhost is either 127.0.0.1 or ::1, nothing else.
> >> 
> >> RFC 6761, 6.3 Domain Name Reservation Considerations for "localhost.":
> >> 3.  Name resolution APIs and libraries SHOULD recognize localhost
> >> names as special and SHOULD always return the IP loopback address
> >> for address queries and negative responses for all other query
> >> types.  Name resolution APIs SHOULD NOT send queries for
> >> localhost names to their configured caching DNS server(s).
> >> 
> >> This makes sure that the getaddrinfo(3) and gethostbyname(3) family of
> >> functions always return the loopback address and do not send queries
> >> to name servers. This includes "localhost", "localhost." and
> >> everything under ".localhost" and ".localhost.".
> >> 
> >> For example, a host underneath the .com.ar zone will per default have
> >> a search list of "com.ar.". resolv.conf(5) has a default of "lookup
> >> bind file". Both combined will result in lookups for "localhost" to
> >> not return 127.0.0.1 because localhost.com.ar is registered in DNS.
> >> 
> >> It has been known for decades that this is a problem, especially for
> >> localhost.
> >> 
> >> Problem recently spotted by gonzalo@ and debugged by sthen@
> >> 
> >> Testing sthen, gonzalo
> >> Input & OK phessler, eric, millert
> >> OK sthen, kn, deraadt
> >
> > Seeing two new failures. The offending pf rule:
> >
> > pass in inet6 proto tcp to port 25 divert-to localhost port 8025
> >
> > pfctl complains about:
> >
> > stdin:10: divert-to address family mismatch
> >
> > Changing localhost to ::1 makes it pass again. Is this expected or a
> > regression? The ipsecctl failure looks like a symptom of the same
> > problem.
> 
> We were a bit too enthusiastic short-circuiting "localhost". It has to
> fail if AI_NUMERICHOST is set, because "localhost" is not an IP address.
> 
> This makes the pfctl and ipsecctl regress tests pass again. (At least
> with a non-weird /etc/resolv.conf).
> 
> OK?

Fixes the tests here as well; ok anton@ FWIW

> diff --git getaddrinfo_async.c getaddrinfo_async.c
> index f85d541398a..2e5898b6411 100644
> --- getaddrinfo_async.c
> +++ getaddrinfo_async.c
> @@ -115,7 +115,7 @@ getaddrinfo_async_run(struct asr_query *as, struct 
> asr_result *ar)
>   char fqdn[MAXDNAME];
>   const char  *str;
>   struct addrinfo *ai;
> - int  i, family, r, is_localhost;
> + int  i, family, r, is_localhost = 0;
>   FILE*f;
>   union {
>   struct sockaddr sa;
> @@ -228,7 +228,8 @@ getaddrinfo_async_run(struct asr_query *as, struct 
> asr_result *ar)
>  
>   ar->ar_gai_errno = 0;
>  
> - is_localhost = _asr_is_localhost(as->as.ai.hostname);
> + if (!(ai->ai_flags & AI_NUMERICHOST))
> + is_localhost = _asr_is_localhost(as->as.ai.hostname);
>   /*
>* If hostname is NULL, "localhost" or falls within the
>* ".localhost." domain, use local address.
> 
> 
> >
> >> sbin/ipsecctl
> > Exit: 1
> > Duration: 00:00:06
> > Log: 181-sbin-ipsecctl.log
> >
> >  ike 
> > cat /home/src/regress/sbin/ipsecctl/ike56.in | sed -e
> > 's,DIR,/home/src/regress/sbin/ipsecctl,g' | /sbin/ipsecctl -nv -f - |
> > diff -u /home/src/regress/sbin/ipsecctl/ike56.ok /dev/stdin
> > stdin: 1: source/destination address families do not match
> > ipsecctl: Syntax error in config file: ipsec rules not loaded
> > --- /home/src/regress/sbin/ipsecctl/ike56.okFri Sep  2 12:58:24 2016
> > +++ /dev/stdin  Tue Nov 21 02:26:19 2023
> > @@ -1,33 +0,0 @@
> > -C set [Phase 1]:127.0.0.1=peer-127.0.0.1 force
> > -C set [peer-127.0.0.1]:Phase=1 force
> > -C set [peer-127.0.0.1]:Add

Re: CVS: cvs.openbsd.org: src

2023-11-20 Thread Anton Lindqvist
On Mon, Nov 20, 2023 at 05:15:16AM -0700, Florian Obser wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   flor...@cvs.openbsd.org 2023/11/20 05:15:16
> 
> Modified files:
>   lib/libc/asr   : asr_private.h asr_utils.c getaddrinfo_async.c 
>gethostnamadr_async.c 
> 
> Log message:
> localhost is either 127.0.0.1 or ::1, nothing else.
> 
> RFC 6761, 6.3 Domain Name Reservation Considerations for "localhost.":
> 3.  Name resolution APIs and libraries SHOULD recognize localhost
> names as special and SHOULD always return the IP loopback address
> for address queries and negative responses for all other query
> types.  Name resolution APIs SHOULD NOT send queries for
> localhost names to their configured caching DNS server(s).
> 
> This makes sure that the getaddrinfo(3) and gethostbyname(3) family of
> functions always return the loopback address and do not send queries
> to name servers. This includes "localhost", "localhost." and
> everything under ".localhost" and ".localhost.".
> 
> For example, a host underneath the .com.ar zone will per default have
> a search list of "com.ar.". resolv.conf(5) has a default of "lookup
> bind file". Both combined will result in lookups for "localhost" to
> not return 127.0.0.1 because localhost.com.ar is registered in DNS.
> 
> It has been known for decades that this is a problem, especially for
> localhost.
> 
> Problem recently spotted by gonzalo@ and debugged by sthen@
> 
> Testing sthen, gonzalo
> Input & OK phessler, eric, millert
> OK sthen, kn, deraadt

Seeing two new failures. The offending pf rule:

pass in inet6 proto tcp to port 25 divert-to localhost port 8025

pfctl complains about:

stdin:10: divert-to address family mismatch

Changing localhost to ::1 makes it pass again. Is this expected or a
regression? The ipsecctl failure looks like a symptom of the same
problem.

> sbin/ipsecctl
Exit: 1
Duration: 00:00:06
Log: 181-sbin-ipsecctl.log

 ike 
cat /home/src/regress/sbin/ipsecctl/ike56.in | sed -e 
's,DIR,/home/src/regress/sbin/ipsecctl,g' |  /sbin/ipsecctl -nv -f - | diff -u 
/home/src/regress/sbin/ipsecctl/ike56.ok /dev/stdin
stdin: 1: source/destination address families do not match
ipsecctl: Syntax error in config file: ipsec rules not loaded
--- /home/src/regress/sbin/ipsecctl/ike56.okFri Sep  2 12:58:24 2016
+++ /dev/stdin  Tue Nov 21 02:26:19 2023
@@ -1,33 +0,0 @@
-C set [Phase 1]:127.0.0.1=peer-127.0.0.1 force
-C set [peer-127.0.0.1]:Phase=1 force
-C set [peer-127.0.0.1]:Address=127.0.0.1 force
-C set [peer-127.0.0.1]:Configuration=phase1-peer-127.0.0.1 force
-C set [phase1-peer-127.0.0.1]:EXCHANGE_TYPE=ID_PROT force
-C add 
[phase1-peer-127.0.0.1]:Transforms=phase1-transform-peer-127.0.0.1-RSA_SIG-SHA-AES128-MODP_3072
 force
-C set 
[phase1-transform-peer-127.0.0.1-RSA_SIG-SHA-AES128-MODP_3072]:AUTHENTICATION_METHOD=RSA_SIG
 force
-C set 
[phase1-transform-peer-127.0.0.1-RSA_SIG-SHA-AES128-MODP_3072]:HASH_ALGORITHM=SHA
 force
-C set 
[phase1-transform-peer-127.0.0.1-RSA_SIG-SHA-AES128-MODP_3072]:ENCRYPTION_ALGORITHM=AES_CBC
 force
-C set 
[phase1-transform-peer-127.0.0.1-RSA_SIG-SHA-AES128-MODP_3072]:KEY_LENGTH=128,128:256
 force
-C set 
[phase1-transform-peer-127.0.0.1-RSA_SIG-SHA-AES128-MODP_3072]:GROUP_DESCRIPTION=MODP_3072
 force
-C set 
[phase1-transform-peer-127.0.0.1-RSA_SIG-SHA-AES128-MODP_3072]:Life=LIFE_MAIN_MODE
 force
-C set [from-127.0.0.1-to-127.0.0.1]:Phase=2 force
-C set [from-127.0.0.1-to-127.0.0.1]:ISAKMP-peer=peer-127.0.0.1 force
-C set 
[from-127.0.0.1-to-127.0.0.1]:Configuration=phase2-from-127.0.0.1-to-127.0.0.1 
force
-C set [from-127.0.0.1-to-127.0.0.1]:Local-ID=from-127.0.0.1 force
-C set [from-127.0.0.1-to-127.0.0.1]:Remote-ID=to-127.0.0.1 force
-C set [phase2-from-127.0.0.1-to-127.0.0.1]:EXCHANGE_TYPE=QUICK_MODE force
-C set 
[phase2-from-127.0.0.1-to-127.0.0.1]:Suites=phase2-suite-from-127.0.0.1-to-127.0.0.1
 force
-C set 
[phase2-suite-from-127.0.0.1-to-127.0.0.1]:Protocols=phase2-protocol-from-127.0.0.1-to-127.0.0.1
 force
-C set [phase2-protocol-from-127.0.0.1-to-127.0.0.1]:PROTOCOL_ID=IPSEC_ESP force
-C set 
[phase2-protocol-from-127.0.0.1-to-127.0.0.1]:Transforms=phase2-transform-from-127.0.0.1-to-127.0.0.1-AES128-SHA2_256-MODP_3072-TUNNEL
 force
-C set 
[phase2-transform-from-127.0.0.1-to-127.0.0.1-AES128-SHA2_256-MODP_3072-TUNNEL]:TRANSFORM_ID=AES
 force
-C set 
[phase2-transform-from-127.0.0.1-to-127.0.0.1-AES128-SHA2_256-MODP_3072-TUNNEL]:KEY_LENGTH=128,128:256
 force
-C set 
[phase2-transform-from-127.0.0.1-to-127.0.0.1-AES128-SHA2_256-MODP_3072-TUNNEL]:ENCAPSULATION_MODE=TUNNEL
 force
-C set 
[phase2-transform-from-127.0.0.1-to-127.0.0.1-AES128-SHA2_256-MODP_3072-TUNNEL]:AUTHENTICATION_ALGORITHM=HMAC_SHA2_256
 force
-C set 
[phase2-transform-from-127.0.0.1-to-127.0.0.1-AES128-SHA2_256-MODP_3072-TUNNEL]:GROUP_DESCRIPTION=MODP_3072
 force
-C set 

CVS: cvs.openbsd.org: src

2023-11-17 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/11/18 00:18:07

Modified files:
share/zoneinfo : Makefile 

Log message:
Fix make other_two target by coping with leapseconds being placed in
objdir by now.



CVS: cvs.openbsd.org: src

2023-11-15 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/11/15 23:27:12

Added files:
regress/usr.bin/grep: t28_1.out t28_2.out t28_3.out t28_4.out 
  t28_5.out t28_6.out t28_7.out t28_8.out 

Log message:
Add expected output files, missed in previous commit. I hope our grep is
producing the wanted output at this point.



CVS: cvs.openbsd.org: src

2023-11-10 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/11/11 00:34:54

Modified files:
regress/sys/net/rtable: kern_compat.h util.c 

Log message:
Cope with recent rt_hash() const changes.



CVS: cvs.openbsd.org: src

2023-11-09 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/11/09 23:15:50

Modified files:
regress/usr.bin/nc: Makefile 

Log message:
Make further use of netcat server close barrier in regress to reduce
flakiness.



CVS: cvs.openbsd.org: src

2023-10-27 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/27 01:33:06

Modified files:
regress/lib/libc/sys: t_sendmmsg.c 

Log message:
Include wait(2) status in error message, in the hopes of providing clues
on why this occasionally fails.



CVS: cvs.openbsd.org: src

2023-10-26 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/26 12:52:45

Modified files:
regress/usr.bin/ssh: Makefile 

Log message:
make use of bsd.regress.mk in extra and interop targets; ok dtucker@



CVS: cvs.openbsd.org: src

2023-10-25 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/25 02:01:59

Modified files:
regress/usr.bin/ssh: conch-ciphers.sh 

Log message:
ssh conch interop tests requires a controlling terminal; ok dtucker@



CVS: cvs.openbsd.org: src

2023-10-23 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/23 05:30:49

Modified files:
regress/usr.bin/ssh: conch-ciphers.sh 

Log message:
Use private key that is allowed by sshd defaults in conch interop tests.

ok dtucker@



CVS: cvs.openbsd.org: src

2023-10-19 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/19 12:36:41

Modified files:
regress/sbin/route: Makefile 
regress/sbin/slaacd: Makefile 
regress/sys/net/etherip: Makefile 
regress/sys/net/gif: Makefile 
regress/sys/net/loop: Makefile 
regress/sys/net/pair: Makefile 
regress/sys/net/pflog: Makefile 
regress/sys/net/rdomains: ifalocal.sh 
regress/sys/net/vxlan: vxlan_1.sh vxlan_2.sh 
regress/sys/netinet/carp: carp_1.sh carp_2.sh carp_3.sh 
  carp_4.sh 
regress/usr.bin/netstat: Makefile 
regress/usr.sbin/arp: Makefile 

Log message:
Add missing removal of network interfaces in regress cleanup targets.
Reducing the risk tests conflicting with each other.

ok bluhm@



CVS: cvs.openbsd.org: src

2023-10-18 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/18 13:14:32

Modified files:
regress/lib/libssl/interop: Makefile.inc 

Log message:
Make libssl interop server/client tests less flaky by ensuring the
server has terminated before examining the outcome.



CVS: cvs.openbsd.org: src

2023-10-18 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/18 12:01:10

Modified files:
regress/usr.bin/ul: ul.sh 

Log message:
adjust sgr0 escape sequence after ncurses update; ok nicm@



CVS: cvs.openbsd.org: src

2023-10-14 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/14 07:05:43

Modified files:
regress/sys/kern/pipe: test-kqueue.c 

Log message:
Suppress harmless EPIPE errors during test shutdown.



CVS: cvs.openbsd.org: src

2023-10-13 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/13 13:30:18

Modified files:
regress/sys/mfs_noperm: Makefile 

Log message:
Use a unique mount point rooted in /mnt in order to not conflict with other
tests.



CVS: cvs.openbsd.org: src

2023-10-13 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/13 13:28:59

Modified files:
regress/sys/fileops: Makefile.inc 

Log message:
Use the  idiom in cleanup target like many others
in regress already does.



CVS: cvs.openbsd.org: src

2023-10-12 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/12 10:59:24

Modified files:
regress/sbin/disklabel: Makefile 
regress/sbin/newfs: checknewfs 
regress/sys/dev/vnd: Makefile 
regress/sys/kern/mount: Makefile 
regress/sys/kern/realpath-unmount: Makefile 
regress/sys/kern/unveil-unmount: Makefile 
regress/usr.sbin/syslogd: Makefile 

Log message:
Let vnconfig select an unused device as opposed of unconditionally
assume vnd0 is available.



CVS: cvs.openbsd.org: src

2023-10-11 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/11 12:07:56

Modified files:
regress/sys/net/gif: Makefile 
regress/sys/net/loop: Makefile 
regress/sys/net/pair: Makefile 
regress/sys/net/pf_opts: Makefile 
regress/sys/net/pflog: Makefile 

Log message:
Check if loopback interfaces used are skipped by pf as opposed of
bailing out if any loopback interface is skipped other than lo0.



CVS: cvs.openbsd.org: src

2023-10-11 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/11 12:07:15

Modified files:
regress/sys/net/vxlan: Makefile 
regress/sys/netinet/carp: Makefile 

Log message:
Infer rdomains from environment variables N1 and N2 like many others in
regress/sys/net already does. No functional change as the defaults
remains the same.



CVS: cvs.openbsd.org: src

2023-10-10 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/10 12:18:05

Modified files:
regress/sys/kern/pipe: test-kqueue.c 

Log message:
Fix timing issue in which one thread could be left hanging in
pipe_read().



CVS: cvs.openbsd.org: src

2023-10-10 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/10/10 12:17:26

Modified files:
regress/sys/fileops: Makefile.inc 
regress/sys/fileops/ext2: Makefile 
regress/sys/fileops/ffs: Makefile 
regress/sys/fileops/msdos16: Makefile 
regress/sys/fileops/msdos32: Makefile 

Log message:
Make it possible to run fileops tests in parallel by making use of a
unique mount point and vnd device.



CVS: cvs.openbsd.org: src

2023-09-26 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/09/26 23:18:40

Modified files:
regress/usr.sbin/vmd/config: Makefile 

Log message:
Cope with progname now being present in vmd errors messages.



CVS: cvs.openbsd.org: src

2023-09-18 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/09/18 12:33:17

Modified files:
regress/usr.bin/sed: sedtest.sh 

Log message:
Favor jot while generating characters within the [1, 256) range as awk
recently became utf-8 aware.

ok millert@



Re: CVS: cvs.openbsd.org: src

2023-09-08 Thread Anton Lindqvist
On Thu, Sep 07, 2023 at 03:59:43AM -0600, Alexandr Nedvedicky wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   sas...@cvs.openbsd.org  2023/09/07 03:59:43
> 
> Modified files:
>   sys/net: pf.c 
> 
> Log message:
> pf(4) ignores 'keep state' and 'nat-to' actions for unsolicited
> icmp error responses. Fix tightens rule matching logic so icmp
> error responses no longer match 'keep state' rule. In typical
> scenarios icmp errors (if solicited) should match existing state.
> The change is going to bite firewalls which deal with asymmetric
> routes. In those cases the 'keep state' action should be relaxed
> to sloppy or new 'no state' rule to explicitly match icmp
> errors should be added.
> 
> The issue has been reported by Peter J. Philip (pjp _at_ delphinusdns.org).
> 
> Discussed with bluhm@ and florian@
> 
> OK bluhm@

Couple of new failures. Reverting this commit makes the problem go away.

https://regress.basename.se/amd64/2023-09-08.1/296-sys-net-pair.log
https://regress.basename.se/amd64/2023-09-08.1/310-sys-net-vxlan.log
https://regress.basename.se/amd64/2023-09-08.1/397-usr.sbin-bgpd.log
https://regress.basename.se/amd64/2023-09-08.1/405-usr.sbin-ospf6d.log



Re: CVS: cvs.openbsd.org: xenocara

2023-09-07 Thread Anton Lindqvist
On Thu, Sep 07, 2023 at 05:24:35PM +0200, Matthieu Herrb wrote:
> On Thu, Sep 07, 2023 at 07:11:40AM +0200, Anton Lindqvist wrote:
> > On Wed, Sep 06, 2023 at 05:42:37AM -0600, Robert Nagy wrote:
> > > CVSROOT:  /cvs
> > > Module name:  xenocara
> > > Changes by:   rob...@cvs.openbsd.org  2023/09/06 05:42:37
> > > 
> > > Modified files:
> > >   driver/xf86-video-amdgpu/src: amdgpu_present.c drmmode_display.h 
> > >   xserver/glamor : glamor.h glamor_egl.c 
> > > 
> > > Log message:
> > > unbreak build with clang-16 by fixing up function definitions to match
> > > 
> > > our uint64_t is an unsinged long long, but CARD64 is defined as unsigned 
> > > long
> > > so the function pointer types in both glamor and xf86-video-amdgpu were
> > > mismatched and clang-16 treats that as an error
> > > 
> > > ok matthieu@
> > 
> > This broke the tree. Here's a potential fix.
> 
> Hmm no, this one reverts parts of the llvm 16 diffs.
> 
> What about this that gets rid of CARD64 completely in this context ?
> 
> hint for the X developpers: CARD64 and friends are normally reserved
> for the X protocol specification and implementation
> 
> All other uses as cheap substites for uint64_t or similar are just
> historical artefacts from an era where there was no standard integer
> types with known fixed lengths.

ok anton@ fwiw



Re: CVS: cvs.openbsd.org: xenocara

2023-09-06 Thread Anton Lindqvist
On Wed, Sep 06, 2023 at 05:42:37AM -0600, Robert Nagy wrote:
> CVSROOT:  /cvs
> Module name:  xenocara
> Changes by:   rob...@cvs.openbsd.org  2023/09/06 05:42:37
> 
> Modified files:
>   driver/xf86-video-amdgpu/src: amdgpu_present.c drmmode_display.h 
>   xserver/glamor : glamor.h glamor_egl.c 
> 
> Log message:
> unbreak build with clang-16 by fixing up function definitions to match
> 
> our uint64_t is an unsinged long long, but CARD64 is defined as unsigned long
> so the function pointer types in both glamor and xf86-video-amdgpu were
> mismatched and clang-16 treats that as an error
> 
> ok matthieu@

This broke the tree. Here's a potential fix.

Index: src/drmmode_display.c
===
RCS file: /cvs/xenocara/driver/xf86-video-amdgpu/src/drmmode_display.c,v
retrieving revision 1.4
diff -u -p -r1.4 drmmode_display.c
--- src/drmmode_display.c   5 Dec 2022 16:41:17 -   1.4
+++ src/drmmode_display.c   7 Sep 2023 04:49:05 -
@@ -161,7 +161,7 @@ drmmode_ConvertToKMode(ScrnInfoPtr scrn,
  */
 Bool
 drmmode_wait_vblank(xf86CrtcPtr crtc, drmVBlankSeqType type,
-   uint32_t target_seq, unsigned long signal, uint64_t *ust,
+   uint32_t target_seq, unsigned long signal, CARD64 *ust,
uint32_t *result_seq)
 {
int crtc_id = drmmode_get_crtc_id(crtc);
Index: src/drmmode_display.h
===
RCS file: /cvs/xenocara/driver/xf86-video-amdgpu/src/drmmode_display.h,v
retrieving revision 1.5
diff -u -p -r1.5 drmmode_display.h
--- src/drmmode_display.h   6 Sep 2023 11:42:37 -   1.5
+++ src/drmmode_display.h   7 Sep 2023 04:49:05 -
@@ -284,13 +284,13 @@ Bool amdgpu_do_pageflip(ScrnInfoPtr scrn
amdgpu_drm_abort_proc abort,
enum drmmode_flip_sync flip_sync,
uint32_t target_msc);
-int drmmode_crtc_get_ust_msc(xf86CrtcPtr crtc, uint64_t *ust, uint64_t *msc);
+int drmmode_crtc_get_ust_msc(xf86CrtcPtr crtc, CARD64 *ust, CARD64 *msc);
 int drmmode_get_current_ust(int drm_fd, CARD64 * ust);
 void drmmode_crtc_set_vrr(xf86CrtcPtr crtc, Bool enabled);
 
 Bool drmmode_wait_vblank(xf86CrtcPtr crtc, drmVBlankSeqType type,
 uint32_t target_seq, unsigned long signal,
-uint64_t *ust, uint32_t *result_seq);
+CARD64 *ust, uint32_t *result_seq);
 
 
 extern miPointerSpriteFuncRec drmmode_sprite_funcs;



CVS: cvs.openbsd.org: src

2023-08-20 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/08/20 23:10:25

Modified files:
regress/sbin/bioctl: Makefile 

Log message:
bioctl tests needs root



CVS: cvs.openbsd.org: src

2023-08-14 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/08/14 03:26:37

Modified files:
regress/lib/libm/msun: Makefile 

Log message:
Sync expected failures with reality. Recent libm changes caused
nearbyint_test.c to pass on amd64.

ok miod@



CVS: cvs.openbsd.org: src

2023-08-13 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/08/13 12:36:20

Removed files:
regress/libexec/ld.so/ldd: test.sh 

Log message:
remove by now unused test.sh script



CVS: cvs.openbsd.org: src

2023-08-13 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/08/13 12:34:49

Modified files:
regress/libexec/ld.so/ldd: Makefile 

Log message:
Use a dedicated regress target for each test case.

ok gnezdo@



CVS: cvs.openbsd.org: src

2023-07-29 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/29 00:52:50

Modified files:
sys/dev: kcov.c 

Log message:
Read curcpu once in kcov code hot paths.



CVS: cvs.openbsd.org: src

2023-07-29 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/29 00:52:08

Modified files:
sys/kern   : kern_task.c kern_timeout.c 
sys/sys: kcov.h 

Log message:
Avoid accessing curproc early during boot when kcov is enabled as it
might be unassigned until all secondary processors are up and running.



CVS: cvs.openbsd.org: src

2023-07-25 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/25 23:50:45

Modified files:
regress/usr.sbin/vmd/diskfmt: vioscribble.c 

Log message:
Print error messages to stderr as opposed of using syslog.



CVS: cvs.openbsd.org: src

2023-07-18 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/18 23:56:42

Modified files:
regress/sys/net/rdomains: lo.ok 

Log message:
Cope with LRO for TCP being enabled per default by now.



CVS: cvs.openbsd.org: src

2023-07-16 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/16 00:36:18

Modified files:
regress/usr.bin/rsync: Makefile test10_perms.test 
   test6_perms.test test6b_perms.test 

Log message:
Make remaining unstable tests fail consistently by adjusting the
modification time of the problematic file(s), causing the check_file()
routine to always hit the "file exists and is possible match" case.

While here, sync expected failures with reality.



CVS: cvs.openbsd.org: src

2023-07-12 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/12 12:36:06

Added files:
regress/usr.bin/rsync: test13_perms.test 

Log message:
Add test which consistently triggers the problem with test6_perms,
omitting all other irrelevant files.



CVS: cvs.openbsd.org: src

2023-07-12 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/12 12:21:39

Modified files:
regress/sys/net/pf_trans: dev-limit.c 

Log message:
Report fork errors as this test is likely to hit the default
kern.maxproc limit.



CVS: cvs.openbsd.org: src

2023-07-11 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/11 00:09:32

Modified files:
regress/usr.bin/rsync: lib.sh 

Log message:
Trim leading whitespace from find(1) output, missed in previous.



CVS: cvs.openbsd.org: src

2023-07-10 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/10 11:46:29

Modified files:
regress/usr.bin/rsync: lib.sh 

Log message:
The rsync tests are unstable since the directory listing includes the
last modification timestamp. One directory represents the one rsync is
operating on and the other is our reference to compare against. If the
current time managed to tick up to the next minute between creation of
the two directories, the timestamps will differ.

Improving the normalization in the findme helper makes the tests stable.

ok bluhm@ claudio@



CVS: cvs.openbsd.org: src

2023-07-10 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/10 11:46:03

Modified files:
regress/sys/net/pf_trans: Makefile 

Log message:
Infer the timeout from the environment, with sane defaults. Should
hopefully make these tests more stable on my slow^W regress machines.

ok sashan@



CVS: cvs.openbsd.org: src

2023-07-10 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/10 11:45:17

Modified files:
regress/sys/net/pf_trans: dev-limit.c iocmd-limit.c 

Log message:
Improve err/warn messages:

* The colon space separator is already appended by err/warn.
* Favor err(1, NULL) for malloc errors.



Re: CVS: cvs.openbsd.org: src

2023-07-06 Thread Anton Lindqvist
On Wed, Jul 05, 2023 at 12:51:56PM -0600, Tobias Heider wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   to...@cvs.openbsd.org   2023/07/05 12:51:56
> 
> Modified files:
>   sys/dev/acpi   : acpi.c acpi_x86.c 
> 
> Log message:
> Move acpiioctl to acpi_x86.c, it is only used up on i386 and amd64.
> 
> ok kettenis@ deraadt@

This broke the amd64 ramdisk.

ld -T ld.script -X --warn-common -nopie -o bsd ${SYSTEM_HEAD} vers.o ${OBJS}
ld: error: undefined symbol: acpiioctl
>>> referenced by conf.c
>>>   conf.o:(cdevsw)
*** Error 1 in /home/src2/sys/arch/amd64/compile/RAMDISK_CD (Makefile:610 
'bsd': @echo ld -T ld.script -X --warn-common -nopie -o bsd '${SYS...)
*** Error 2 in /home/src2/distrib/amd64/ramdisk_cd (Makefile:71 'bsd')
*** Error 2 in /home/src2/distrib/amd64 (:48 'all')
*** Error 2 in /home/src2/distrib (:48 'all')
*** Error 2 in . (Makefile:301 'distrib')
*** Error 2 in . (Makefile:277 'do-release')
*** Error 2 in /home/src2/etc (Makefile:260 'release')



CVS: cvs.openbsd.org: src

2023-07-05 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/05 12:23:10

Modified files:
sys/arch/amd64/amd64: locore.S 
sys/dev/pv : hyperv.c 

Log message:
The hypercall page populated with instructions by the hypervisor is not IBT
compatible due to lack of endbr64. Replace the indirect call with a new
hv_hypercall_trampoline() routine which jumps to the hypercall page without any
indirection.

Allows me to boot OpenBSD using Hyper-V on Windows 11 again.

ok guenther@



CVS: cvs.openbsd.org: src

2023-07-04 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/04 13:01:46

Modified files:
regress/gnu/usr.bin/perl: Makefile 

Log message:
favor hw.ncpuonline; ok bluhm@



CVS: cvs.openbsd.org: src

2023-07-03 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/07/03 11:55:51

Modified files:
regress/usr.bin/pkg-config: Makefile 

Log message:
favor REGRESS_EXPECTED_FAILURES



Re: CVS: cvs.openbsd.org: src

2023-06-28 Thread Anton Lindqvist
On Wed, Jun 28, 2023 at 06:12:48AM -0600, Kenneth R Westerback wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   k...@cvs.openbsd.org2023/06/28 06:12:48
> 
> Modified files:
>   sbin/disklabel : editor.c 
> 
> Log message:
> Refactor editor_allocspace() into easier to follow pieces.
> 
> editor_allocspace() interates over alloc_tables calling
> allocate_space().  allocate_space() iterates over
> space_allocations calling allocate_partition().
> allocate_partition() calls allocate_diskchunk() which finds disk
> space for the partition.
> 
> No intentional functional change.
> 
> ok otto@
> 
My regress machines failed today during autoinstall with the following
error:

disklabel: autoalloc failed
Autopartitioning failed

These machines are using disk templates. I haven't been able to test a
revert yet but this looks like the prime suspect according to the cvs
delta.



CVS: cvs.openbsd.org: src

2023-06-12 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/06/12 22:59:10

Modified files:
regress/usr.bin/seq: Makefile 

Log message:
All hooked up regress directories must at least support make obj and clean in
order to not break the tree. Therefore make use of bsd.regress.mk.



CVS: cvs.openbsd.org: src

2023-04-26 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/04/26 23:42:44

Modified files:
regress/sys/arch/amd64/vmm: vcpu.c 

Log message:
cope with recent vmm changes



Re: CVS: cvs.openbsd.org: src

2023-04-25 Thread Anton Lindqvist
On Mon, Apr 24, 2023 at 10:53:57AM -0600, Dave Voutila wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   d...@cvs.openbsd.org2023/04/24 10:53:57
> 
> Modified files:
>   sys/arch/amd64/amd64: vmm.c 
> 
> Log message:
> vmm(4): allow guests to enable and use supervisor IBT.
> 
> Why should hosts have all the fun? Conditionally unmask the cpuid
> bits for IBT and allow r/w access to the supervisor CET msr.
> 
> Will need revisiting when we introduce usage of userland CET msr.
> 
> ok marlkin@

Running on older hardware where CET is not enumerated causes guests to
panic in cpu_fix_msrs() during RDMSR 0x6a2.

diff --git sys/arch/amd64/amd64/vmm.c sys/arch/amd64/amd64/vmm.c
index 42ac8007029..35b05033cdc 100644
--- sys/arch/amd64/amd64/vmm.c
+++ sys/arch/amd64/amd64/vmm.c
@@ -7059,7 +7059,7 @@ vmm_handle_cpuid(struct vcpu *vcpu)
*rcx &= ~SEFF0ECX_PKU;
 
/* Expose IBT bit if we've enabled CET on the host. */
-   if (rcr4() | CR4_CET)
+   if (rcr4() & CR4_CET)
*rdx |= SEFF0EDX_IBT;
else
*rdx &= ~SEFF0EDX_IBT;



Re: CVS: cvs.openbsd.org: src

2023-04-24 Thread Anton Lindqvist
On Mon, Apr 24, 2023 at 10:55:06AM -0600, Theo Buehler wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   t...@cvs.openbsd.org2023/04/24 10:55:06
> 
> Modified files:
>   lib/libssl : ssl_tlsext.c 
> 
> Log message:
> Free and calloc() the tlsext_build_order and remember its length
> 
> Aligns tlsext_randomize_build_order() with tlsext_linearize_build_order()
> and will help regression testing.
> 
> ok jsing

Does not compile without the following:

Index: ssl_local.h
===
RCS file: /cvs/src/lib/libssl/ssl_local.h,v
retrieving revision 1.4
diff -u -p -r1.4 ssl_local.h
--- ssl_local.h 23 Apr 2023 18:51:53 -  1.4
+++ ssl_local.h 25 Apr 2023 05:13:01 -
@@ -975,6 +975,7 @@ struct ssl_st {
unsigned int max_send_fragment;
 
const struct tls_extension **tlsext_build_order;
+   size_t tlsext_build_order_len;
char *tlsext_hostname;
 
/* certificate status request info */



CVS: cvs.openbsd.org: src

2023-04-23 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/04/23 12:38:55

Modified files:
regress/sys/arch/amd64/vmm: vcpu.c 

Log message:
cope with more s/XCR0/XFEATURE renames



CVS: cvs.openbsd.org: src

2023-04-22 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/04/22 23:37:55

Modified files:
usr.sbin/vmd   : vm.c 

Log message:
unbreak tree by coping with recent s/XCR0/XFEATURE rename



CVS: cvs.openbsd.org: src

2023-04-04 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/04/04 12:14:32

Modified files:
lib/libcrypto  : x86_64cpuid.pl 

Log message:
A refactoring back in 2016 in which magic numbers where extracted into
named constants accidentally dropped an instruction causing detection of
eXtended operations (XOP) on AMD hardware to break.

ok miod@ tb@



CVS: cvs.openbsd.org: www

2023-04-04 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:www
Changes by: an...@cvs.openbsd.org   2023/04/04 12:06:30

Modified files:
.  : 73.html 

Log message:
mention more uhidpp changes



CVS: cvs.openbsd.org: src

2023-04-02 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/04/02 02:53:01

Modified files:
sys/dev/ic : ufshci.c 

Log message:
zap excessive semicolons; ok mglocker@



Re: CVS: cvs.openbsd.org: src

2023-03-27 Thread Anton Lindqvist
On Sat, Mar 25, 2023 at 12:27:28PM -0600, Klemens Nanni wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   k...@cvs.openbsd.org2023/03/25 12:27:28
> 
> Modified files:
>   distrib/miniroot: install.sub 
> 
> Log message:
> simplify final MAKEDEV call
> 
> No need to loop here, the script takes multiple args.
> 
> OK tb afresh1

Seen in install log on my regress machines during autoinstall. Is this
commit the culprit?

Making all device nodes...mknod: sd0a: File exists
mknod: rsd0a: File exists
mknod: sd0b: File exists
mknod: rsd0b: File exists
mknod: sd0c: File exists
mknod: rsd0c: File exists
mknod: sd0d: File exists
mknod: rsd0d: File exists
mknod: sd0e: File exists
mknod: rsd0e: File exists
mknod: sd0f: File exists
mknod: rsd0f: File exists
mknod: sd0g: File exists
mknod: rsd0g: File exists
mknod: sd0h: File exists
mknod: rsd0h: File exists
mknod: sd0i: File exists
mknod: rsd0i: File exists
mknod: sd0j: File exists
mknod: rsd0j: File exists
mknod: sd0k: File exists
mknod: rsd0k: File exists
mknod: sd0l: File exists
mknod: rsd0l: File exists
mknod: sd0m: File exists
mknod: rsd0m: File exists
mknod: sd0n: File exists
mknod: rsd0n: File exists
mknod: sd0o: File exists
mknod: rsd0o: File exists
mknod: sd0p: File exists
mknod: rsd0p: File exists
mknod: cd0a: File exists
mknod: rcd0a: File exists
mknod: cd0c: File exists
mknod: rcd0c: File exists
 done.



CVS: cvs.openbsd.org: src

2023-03-08 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/03/08 23:22:40

Modified files:
regress/bin/ps : command.sh 

Log message:
Cope with recent changes to alignment of command column.



CVS: cvs.openbsd.org: src

2023-02-19 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/02/19 11:46:46

Modified files:
sys/kern   : kern_pledge.c 

Log message:
Make pinsyscall(2) always available for pledged processes. Needed by pledge
execpromises, as noted by regress/sys/kern/pledge/execpromise.

sure deraadt@



CVS: cvs.openbsd.org: src

2023-02-19 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/02/19 03:40:34

Modified files:
regress/sys/kern/poll: Makefile 
regress/sys/kern/select: Makefile 

Log message:
Disable tests using the preferred bsd.regress.mk technique.



CVS: cvs.openbsd.org: src

2023-02-02 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/02/02 05:37:14

Modified files:
regress/lib/libssl/ssl: ssltest.c 

Log message:
Sync function prototypes and declarations to satisfy clang 15.

ok jsing@



CVS: cvs.openbsd.org: src

2023-02-02 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/02/02 05:36:52

Modified files:
lib/libcsi : csi_dh.c csi_dh_groups.c 

Log message:
Sync function prototypes and declarations to satisfy clang 15.

ok jsing@



CVS: cvs.openbsd.org: src

2023-01-22 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/22 09:38:36

Modified files:
regress/sys/kern/noexec: testfly.S 

Log message:
Cope with xonly on amd64 by moving the testfly routine to the rodata
section.



CVS: cvs.openbsd.org: src

2023-01-18 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/18 12:18:49

Modified files:
regress/sys/kern: Makefile 
Added files:
regress/sys/kern/xonly: Makefile xonly.c 

Log message:
Add xonly tests, initially written by deraadt@. Tweaked by me to fit and
the regress framework and allowing the expected outcome to be enumerated
per architecture. Currently limited to amd64 and arm64.



CVS: cvs.openbsd.org: src

2023-01-18 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/18 12:18:00

src/regress/sys/kern/xonly

Update of /cvs/src/regress/sys/kern/xonly
In directory cvs.openbsd.org:/tmp/cvs-serv5489/xonly

Log Message:
Directory /cvs/src/regress/sys/kern/xonly added to the repository



CVS: cvs.openbsd.org: src

2023-01-16 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/16 23:33:50

Modified files:
regress/usr.sbin/syslogd: Makefile 

Log message:
fix typo in package name



CVS: cvs.openbsd.org: src

2023-01-16 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/16 23:33:25

Modified files:
regress/usr.sbin/syslogd: args-sendsyslog-console.pl 
  args-sendsyslog-fault.pl 
  args-sendsyslog-flags.pl 
  args-sendsyslog-nostash.pl 
  args-sendsyslog-syscall.pl 

Log message:
cope with ktrace "(via syscall)" changes



CVS: cvs.openbsd.org: src

2023-01-10 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/10 05:19:18

Removed files:
regress/sys/uvm/wx_syscall: Makefile wx_syscall.c 

Log message:
purge unhooked wx_syscall files



CVS: cvs.openbsd.org: src

2023-01-10 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/10 05:17:00

Modified files:
regress/sys/uvm: Makefile 

Log message:
Retire wx_syscall regress tests, they have been failing since the
introduction of mimmutable(2) and also needs to cope with xonly on some
architectures by now. There's already the syscallwx target in
regress/usr.bin/lastcomm which does the same thing but also ensures that
the expected code path is reached by looking at accounting records.



CVS: cvs.openbsd.org: src

2023-01-09 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/09 04:50:01

Modified files:
regress/usr.bin/lastcomm: Makefile syscallwx.c 
Added files:
regress/usr.bin/lastcomm: gadget.S 

Log message:
Fix the syscallwx target which is affected by both mimmutable(2) and
xonly by using a new gadget routine written in assembler with the sole
purpose of issuing a syscall. Since it needs to be copied to wx memory,
place it in the rodata section.



CVS: cvs.openbsd.org: src

2023-01-08 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/08 23:34:02

Modified files:
regress/bin/ps : command.sh 

Log message:
Sanitize the inherited environment by removing LC_ALL, missed in previous.



CVS: cvs.openbsd.org: src

2023-01-07 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/07 23:56:01

Modified files:
regress/sys/kern/noexec: testfly.S 

Log message:
Due to xonly on arm64 it is no longer possible to read the testfly routine.
Put it in the rodata section allowing it to be copied. Note that testfly is
never executed directly but only after placing it in a separate chunk of memory
allowing its permissions to be mutated.



CVS: cvs.openbsd.org: src

2023-01-07 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/07 23:55:18

Modified files:
regress/bin/ps : command.sh 

Log message:
cope with recent thread name changes



CVS: cvs.openbsd.org: src

2023-01-07 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/07 23:54:51

Modified files:
sys/dev/usb: uhidpp.c 

Log message:
Rename argument funcidx_swid to func_idx as it does not include any software id.
No functional change.



CVS: cvs.openbsd.org: src

2023-01-03 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/03 08:52:02

Modified files:
sys/dev/usb: uhidpp.c 

Log message:
Poll battery sensors less frequently.



CVS: cvs.openbsd.org: src

2023-01-03 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/03 08:51:40

Modified files:
sys/dev/usb: uhidpp.c 

Log message:
The software id in the request must be copied as is to the response by the
hardware. Leverage the fact that the same id can be anything within [1, 15] by
using a different id per request in a round robin fashion. Makes it easier to
correlate requests and responses while making sense of the debug output.



CVS: cvs.openbsd.org: src

2023-01-03 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2023/01/03 08:50:52

Modified files:
sys/dev/usb: uhidpp.c 

Log message:
Group more request and response constants.



Re: CVS: cvs.openbsd.org: src

2022-12-11 Thread Anton Lindqvist
On Sun, Dec 11, 2022 at 02:19:08PM -0700, Vitaliy Makkoveev wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   m...@cvs.openbsd.org2022/12/11 14:19:08
> 
> Modified files:
>   sys/kern   : sys_socket.c uipc_socket.c uipc_socket2.c 
>uipc_usrreq.c 
>   sys/miscfs/fifofs: fifo_vnops.c 
>   sys/netinet: tcp_usrreq.c 
>   sys/sys: socketvar.h 
> 
> Log message:
> This time, socket's buffer lock requires solock() to be held. As a part of
> socket buffers standalone locking work, move socket state bits which
> represent its buffers state to per buffer state. Introduce `sb_state' and
> turn SS_CANTSENDMORE to SBS_CANTSENDMORE. This bit will be processed on
> `so_snd' buffer only.
> 
> Move SS_CANTRCVMORE and SS_RCVATMARK bits with separate diff to make
> review easier and exclude possible so_rcv/so_snd mistypes.
> 
> Also, don't adjust the remaining SS_* bits right now.
> 
> ok millert@

Tree is broken due to the SS_CANTSENDMORE removal.

Index: fstat.c
===
RCS file: /cvs/src/usr.bin/fstat/fstat.c,v
retrieving revision 1.103
diff -u -p -r1.103 fstat.c
--- fstat.c 20 Jun 2022 01:39:44 -  1.103
+++ fstat.c 12 Dec 2022 06:30:21 -
@@ -807,8 +807,6 @@ socktrans(struct kinfo_file *kf)
if (!(kf->so_state & SS_CANTRCVMORE))
*cp++ = '<';
*cp++ = '-';
-   if (!(kf->so_state & SS_CANTSENDMORE))
-   *cp++ = '>';
*cp = '\0';
printf(" %s ", shoconn);
hide((void *)(uintptr_t)kf->unp_conn);



CVS: cvs.openbsd.org: src

2022-12-10 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2022/12/10 05:17:46

Modified files:
regress/usr.sbin/syslogd: args-fdexhaustion-sighup.pl 
  args-server-tcp-reconnect.pl 
  args-server-tls-reconnect.pl 
  args-sighup-tcp.pl args-sighup-tls.pl 
  args-sighup.pl args-sync-tcp.pl 

Log message:
Make the accepted log grep pattern more strict in order to not pick up any log
entries from sshd causing intermittent failures.

Discussed with bluhm@ back in August this year.



  1   2   3   4   5   6   7   8   9   >