diff --git a/etc/root/root.mail b/etc/root/root.mail index f07dfb044..dd3ebef5f 100644 --- a/etc/root/root.mail +++ b/etc/root/root.mail @@ -1,6 +1,6 @@ -From purplerain@secbsd.org Wed Apr 20 00:00:00 UTC 2024 +From purplerain@secbsd.org Sun Oct 27 00:00:00 UTC 2024 Return-Path: root -Date: Apr 20 00:00:00 UTC 2024 +Date: Oct 27 00:00:00 UTC 2024 From: purplerain@secbsd.org (Purple Rain) To: root Subject: Welcome to SecBSD 1.5! diff --git a/etc/skel/dot.version b/etc/skel/dot.version index 75c8c00ee..24df1b779 100644 --- a/etc/skel/dot.version +++ b/etc/skel/dot.version @@ -1 +1 @@ -# SecBSD 1.5-55f1360: Sat Jul 6 00:00:00 UTC 2024 (Yatagarasu) +# SecBSD 1.6-0217120: Thu Aug 8 00:00:00 UTC 2024 (Yatagarasu) diff --git a/include/stdio.h b/include/stdio.h index ecee3ef94..4898998f1 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdio.h,v 1.55 2022/01/05 20:57:27 millert Exp $ */ +/* $OpenBSD: stdio.h,v 1.56 2024/08/07 05:15:28 guenther Exp $ */ /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /*- @@ -217,7 +217,7 @@ int fgetpos(FILE *, fpos_t *); char *fgets(char *, int, FILE *) __attribute__((__bounded__ (__string__,1,2))); FILE *fopen(const char *, const char *); -int fprintf(FILE *, const char *, ...); +int fprintf(FILE *, const char * __restrict, ...); int fputc(int, FILE *); int fputs(const char *, FILE *); size_t fread(void *, size_t, size_t, FILE *) @@ -246,7 +246,7 @@ extern int sys_nerr; /* perror(3) external variables */ extern char *sys_errlist[]; #endif void perror(const char *); -int printf(const char *, ...); +int printf(const char * __restrict, ...); int putc(int, FILE *); int putchar(int); int puts(const char *); @@ -259,14 +259,14 @@ void rewind(FILE *); int scanf(const char *, ...); void setbuf(FILE *, char *); int setvbuf(FILE *, char *, int, size_t); -int sprintf(char *, const char *, ...); +int sprintf(char * __restrict, const char * __restrict, ...); int sscanf(const char *, const char *, ...); FILE *tmpfile(void); char *tmpnam(char *); int ungetc(int, FILE *); -int vfprintf(FILE *, const char *, __va_list); -int vprintf(const char *, __va_list); -int vsprintf(char *, const char *, __va_list); +int vfprintf(FILE *, const char * __restrict, __va_list); +int vprintf(const char * __restrict, __va_list); +int vsprintf(char * __restrict, const char * __restrict, __va_list); #if __POSIX_VISIBLE >= 200809 int vdprintf(int, const char * __restrict, __va_list) __attribute__((__format__ (printf, 2, 0))) @@ -274,11 +274,12 @@ int vdprintf(int, const char * __restrict, __va_list) #endif #if __ISO_C_VISIBLE >= 1999 || __XPG_VISIBLE >= 500 || __BSD_VISIBLE -int snprintf(char *, size_t, const char *, ...) +int snprintf(char * __restrict, size_t, const char * __restrict, ...) __attribute__((__format__ (printf, 3, 4))) __attribute__((__nonnull__ (3))) __attribute__((__bounded__ (__string__,1,2))); -int vsnprintf(char *, size_t, const char *, __va_list) +int vsnprintf(char * __restrict, size_t, const char * __restrict, + __va_list) __attribute__((__format__ (printf, 3, 0))) __attribute__((__nonnull__ (3))) __attribute__((__bounded__(__string__,1,2))); @@ -338,6 +339,15 @@ FILE *open_memstream(char **, size_t *); #if __XPG_VISIBLE char *tempnam(const char *, const char *); #endif + +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE +int asprintf(char ** __restrict, const char * __restrict, ...) + __attribute__((__format__ (printf, 2, 3))) + __attribute__((__nonnull__ (2))); +int vasprintf(char ** __restrict, const char * __restrict, __va_list) + __attribute__((__format__ (printf, 2, 0))) + __attribute__((__nonnull__ (2))); +#endif /* __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE */ __END_DECLS #endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */ @@ -347,18 +357,12 @@ __END_DECLS */ #if __BSD_VISIBLE __BEGIN_DECLS -int asprintf(char **, const char *, ...) - __attribute__((__format__ (printf, 2, 3))) - __attribute__((__nonnull__ (2))); char *fgetln(FILE *, size_t *); int fpurge(FILE *); int getw(FILE *); int putw(int, FILE *); void setbuffer(FILE *, char *, int); int setlinebuf(FILE *); -int vasprintf(char **, const char *, __va_list) - __attribute__((__format__ (printf, 2, 0))) - __attribute__((__nonnull__ (2))); __END_DECLS /* diff --git a/include/wchar.h b/include/wchar.h index 462ed5e4b..96e86a155 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wchar.h,v 1.32 2024/07/14 10:04:17 jca Exp $ */ +/* $OpenBSD: wchar.h,v 1.33 2024/08/07 04:59:45 guenther Exp $ */ /* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ /*- @@ -223,12 +223,15 @@ int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, __va_list); int vwscanf(const wchar_t * __restrict, __va_list); int wscanf(const wchar_t * __restrict, ...); +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE +size_t wcslcat(wchar_t * __restrict, const wchar_t * __restrict, size_t) + __attribute__ ((__bounded__(__wcstring__,1,3))); +size_t wcslcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t) + __attribute__ ((__bounded__(__wcstring__,1,3))); +#endif + #if __BSD_VISIBLE wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); -size_t wcslcat(wchar_t *, const wchar_t *, size_t) - __attribute__ ((__bounded__(__wcstring__,1,3))); -size_t wcslcpy(wchar_t *, const wchar_t *, size_t) - __attribute__ ((__bounded__(__wcstring__,1,3))); #endif #define getwc(f) fgetwc(f) diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index 2e09cc824..7984acbc8 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: printf.3,v 1.93 2022/08/04 06:20:24 jsg Exp $ +.\" $OpenBSD: printf.3,v 1.94 2024/08/07 05:15:28 guenther Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,7 +33,7 @@ .\" .\" @(#)printf.3 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: August 4 2022 $ +.Dd $Mdocdate: August 7 2024 $ .Dt PRINTF 3 .Os .Sh NAME @@ -53,29 +53,29 @@ .Sh SYNOPSIS .In stdio.h .Ft int -.Fn printf "const char *format" ... +.Fn printf "const char * restrict format" ... .Ft int -.Fn fprintf "FILE *stream" "const char *format" ... +.Fn fprintf "FILE *stream" "const char * restrict format" ... .Ft int -.Fn sprintf "char *str" "const char *format" ... +.Fn sprintf "char * restrict str" "const char * restrict format" ... .Ft int -.Fn snprintf "char *str" "size_t size" "const char *format" ... +.Fn snprintf "char * restrict str" "size_t size" "const char * restrict format" ... .Ft int -.Fn asprintf "char **ret" "const char *format" ... +.Fn asprintf "char ** restrict ret" "const char * restrict format" ... .Ft int .Fn dprintf "int fd" "const char * restrict format" ... .In stdarg.h .In stdio.h .Ft int -.Fn vprintf "const char *format" "va_list ap" +.Fn vprintf "const char * restrict format" "va_list ap" .Ft int -.Fn vfprintf "FILE *stream" "const char *format" "va_list ap" +.Fn vfprintf "FILE *stream" "const char * restrict format" "va_list ap" .Ft int -.Fn vsprintf "char *str" "const char *format" "va_list ap" +.Fn vsprintf "char * restrict str" "const char * restrict format" "va_list ap" .Ft int -.Fn vsnprintf "char *str" "size_t size" "const char *format" "va_list ap" +.Fn vsnprintf "char * restrict str" "size_t size" "const char * restrict format" "va_list ap" .Ft int -.Fn vasprintf "char **ret" "const char *format" "va_list ap" +.Fn vasprintf "char ** restrict ret" "const char * restrict format" "va_list ap" .Ft int .Fn vdprintf "int fd" "const char * restrict format" "va_list ap" .Sh DESCRIPTION @@ -906,11 +906,13 @@ and functions conform to .St -isoC-99 . The -.Fn dprintf +.Fn dprintf , +.Fn vdprintf , +.Fn asprintf , and -.Fn vdprintf +.Fn vasprintf functions conform to -.St -p1003.1-2008 . +.St -p1003.1-2024 . .Sh HISTORY The predecessors .Fn ftoa diff --git a/lib/libc/string/wcslcpy.3 b/lib/libc/string/wcslcpy.3 index 5d8721c35..d27903807 100644 --- a/lib/libc/string/wcslcpy.3 +++ b/lib/libc/string/wcslcpy.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: wcslcpy.3,v 1.7 2019/01/25 00:19:25 millert Exp $ +.\" $OpenBSD: wcslcpy.3,v 1.8 2024/08/07 04:59:45 guenther Exp $ .\" .\" Copyright (c) 1998, 2000 Todd C. Miller .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 25 2019 $ +.Dd $Mdocdate: August 7 2024 $ .Dt WCSLCPY 3 .Os .Sh NAME @@ -24,9 +24,9 @@ .Sh SYNOPSIS .In wchar.h .Ft size_t -.Fn wcslcpy "wchar_t *dst" "const wchar_t *src" "size_t size" +.Fn wcslcpy "wchar_t * restrict dst" "const wchar_t * restrict src" "size_t size" .Ft size_t -.Fn wcslcat "wchar_t *dst" "const wchar_t *src" "size_t size" +.Fn wcslcat "wchar_t * restrict dst" "const wchar_t * restrict src" "size_t size" .Sh DESCRIPTION The .Fn wcslcpy @@ -137,6 +137,13 @@ The check exists to prevent potential security problems in incorrect code. .Xr swprintf 3 , .Xr wcsncat 3 , .Xr wcsncpy 3 +.Sh STANDARDS +The +.Fn wcslcpy +and +.Fn wcslcat +functions conform to +.St -p1003.1-2024 . .Sh HISTORY The .Fn wcslcpy diff --git a/lib/libcrypto/ui/ui_util.c b/lib/libcrypto/ui/ui_util.c index 4fa4058cd..e1dda0042 100644 --- a/lib/libcrypto/ui/ui_util.c +++ b/lib/libcrypto/ui/ui_util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ui_util.c,v 1.14 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: ui_util.c,v 1.15 2024/08/08 09:56:51 tb Exp $ */ /* ==================================================================== * Copyright (c) 2001-2002 The OpenSSL Project. All rights reserved. * @@ -53,11 +53,10 @@ * */ +#include #include -#include - -#include "ui_local.h" +#include int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt, int verify) diff --git a/lib/libradius/radius.c b/lib/libradius/radius.c index f1a20cc5c..db351ea97 100644 --- a/lib/libradius/radius.c +++ b/lib/libradius/radius.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radius.c,v 1.4 2023/07/08 08:53:26 yasuoka Exp $ */ +/* $OpenBSD: radius.c,v 1.5 2024/08/08 09:16:37 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -261,7 +261,8 @@ radius_check_response_authenticator(const RADIUS_PACKET * packet, uint8_t authenticator[16]; radius_calc_response_authenticator(authenticator, packet, secret); - return (memcmp(authenticator, packet->pdata->authenticator, 16)); + return (timingsafe_memcmp(authenticator, packet->pdata->authenticator, + 16)); } void @@ -299,7 +300,8 @@ radius_check_accounting_request_authenticator(const RADIUS_PACKET * packet, radius_calc_accounting_request_authenticator(authenticator, packet, secret); - return (memcmp(authenticator, packet->pdata->authenticator, 16)); + return (timingsafe_memcmp(authenticator, packet->pdata->authenticator, + 16)); } diff --git a/lib/libradius/radius_msgauth.c b/lib/libradius/radius_msgauth.c index bbc26e77a..97170b65d 100644 --- a/lib/libradius/radius_msgauth.c +++ b/lib/libradius/radius_msgauth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radius_msgauth.c,v 1.3 2024/07/24 08:19:16 yasuoka Exp $ */ +/* $OpenBSD: radius_msgauth.c,v 1.4 2024/08/08 09:16:37 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -149,5 +149,5 @@ radius_check_message_authenticator(RADIUS_PACKET * packet, const char *secret) if (len != sizeof(ma1)) return (-1); - return (memcmp(ma0, ma1, sizeof(ma1))); + return (timingsafe_memcmp(ma0, ma1, sizeof(ma1))); } diff --git a/regress/lib/libcrypto/hmac/Makefile b/regress/lib/libcrypto/hmac/Makefile index 670533621..19ec43dce 100644 --- a/regress/lib/libcrypto/hmac/Makefile +++ b/regress/lib/libcrypto/hmac/Makefile @@ -1,9 +1,15 @@ -# $OpenBSD: Makefile,v 1.3 2014/07/08 15:53:52 jsing Exp $ +# $OpenBSD: Makefile,v 1.4 2024/08/08 03:46:50 tb Exp $ + +.include PROG= hmactest LDADD= -lcrypto DPADD= ${LIBCRYPTO} WARNINGS= Yes -CFLAGS+= -DLIBRESSL_INTERNAL -Werror +CFLAGS+= -DLIBRESSL_INTERNAL +# The bounded attribute for HMAC_Init_ex() warns for gcc, breaking compilation +.if ${COMPILER_VERSION:L} == "clang" +CFLAGS+= -Werror +.endif .include diff --git a/regress/lib/libcrypto/man/check_complete.pl b/regress/lib/libcrypto/man/check_complete.pl index 6af5f8c32..d85bbc704 100755 --- a/regress/lib/libcrypto/man/check_complete.pl +++ b/regress/lib/libcrypto/man/check_complete.pl @@ -20,7 +20,7 @@ use warnings; my %internal = ( asn1 => [qw( ASN1_ENCODING - ASN1_STRING_FLAG_BITS_LEFT ASN1_STRING_FLAG_CONT + ASN1_STRING_FLAG_CONT ASN1_STRING_FLAG_MSTRING ASN1_STRING_FLAG_NDEF CHARTYPE_FIRST_ESC_2253 CHARTYPE_LAST_ESC_2253 CHARTYPE_PRINTABLESTRING )], @@ -49,7 +49,6 @@ my %obsolete = ( ASN1_i2d_fp ASN1_i2d_fp_of ASN1_i2d_fp_of_const ASN1_LONG_UNDEF BIT_STRING_BITNAME - ub_title V_ASN1_PRIMATIVE_TAG X509_algor_st )], @@ -92,15 +91,7 @@ my %postponed = ( TYPEDEF_D2I_OF TYPEDEF_D2I2D_OF TYPEDEF_I2D_OF )], x509 => [qw( - d2i_PBEPARAM d2i_PBE2PARAM d2i_PBKDF2PARAM - i2d_PBEPARAM i2d_PBE2PARAM i2d_PBKDF2PARAM - NETSCAPE_SPKAC NETSCAPE_SPKI - PBEPARAM PBEPARAM_free PBEPARAM_new - PBE2PARAM PBE2PARAM_free PBE2PARAM_new - PBKDF2PARAM PBKDF2PARAM_free PBKDF2PARAM_new - PKCS5_pbe_set PKCS5_pbe_set0_algor - PKCS5_pbe2_set PKCS5_pbe2_set_iv - PKCS5_pbkdf2_set + NETSCAPE_SPKAC NETSCAPE_SPKI PBEPARAM )] ); diff --git a/regress/sbin/disklabel/1000.sparc64.ok b/regress/sbin/disklabel/1000.sparc64.ok index c2aee11be..8bb8047aa 100644 --- a/regress/sbin/disklabel/1000.sparc64.ok +++ b/regress/sbin/disklabel/1000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.0G 0 4.2BSD 2048 16384 1 # / a: 2017300 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/1024.sparc64.ok b/regress/sbin/disklabel/1024.sparc64.ok index c659ab7bf..ecf98be24 100644 --- a/regress/sbin/disklabel/1024.sparc64.ok +++ b/regress/sbin/disklabel/1024.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.0G 0 4.2BSD 2048 16384 1 # / a: 2064000 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/12000.sparc64.ok b/regress/sbin/disklabel/12000.sparc64.ok index 34aec9271..2309c11f6 100644 --- a/regress/sbin/disklabel/12000.sparc64.ok +++ b/regress/sbin/disklabel/12000.sparc64.ok @@ -11,31 +11,31 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.2G 0 4.2BSD 2048 16384 1 # / - a: 411600 0 4.2BSD 2048 16384 1 - b: 0.2G 411600 swap - b: 372600 411600 swap - d: 0.2G 784200 4.2BSD 2048 16384 1 # /tmp - d: 412800 784200 4.2BSD 2048 16384 1 - e: 0.2G 1197000 4.2BSD 2048 16384 1 # /var - e: 435200 1197000 4.2BSD 2048 16384 1 - f: 1.6G 1632200 4.2BSD 2048 16384 1 # /usr - f: 3280700 1632200 4.2BSD 2048 16384 1 - g: 0.4G 4912900 4.2BSD 2048 16384 1 # /usr/X11R6 - g: 849100 4912900 4.2BSD 2048 16384 1 - h: 1.1G 5762000 4.2BSD 2048 16384 1 # /usr/local - h: 2410200 5762000 4.2BSD 2048 16384 1 - i: 1.5G 8172200 4.2BSD 2048 16384 1 # /usr/src - i: 3113800 8172200 4.2BSD 2048 16384 1 - j: 5.0G 11286000 4.2BSD 2048 16384 1 # /usr/obj - j: 10569300 11286000 4.2BSD 2048 16384 1 - k: 1.3G 21855300 4.2BSD 2048 16384 1 # /home - k: 2722700 21855300 4.2BSD 2048 16384 1 + a: 355500 0 4.2BSD 2048 16384 1 + b: 0.1G 355500 swap + b: 260300 355500 swap + d: 0.2G 615800 4.2BSD 2048 16384 1 # /tmp + d: 323000 615800 4.2BSD 2048 16384 1 + e: 0.1G 938800 4.2BSD 2048 16384 1 # /var + e: 289300 938800 4.2BSD 2048 16384 1 + f: 1.5G 1228100 4.2BSD 2048 16384 1 # /usr + f: 3168500 1228100 4.2BSD 2048 16384 1 + g: 0.4G 4396600 4.2BSD 2048 16384 1 # /usr/X11R6 + g: 815400 4396600 4.2BSD 2048 16384 1 + h: 1.1G 5212000 4.2BSD 2048 16384 1 # /usr/local + h: 2241900 5212000 4.2BSD 2048 16384 1 + i: 2.0G 7453900 4.2BSD 2048 16384 1 # /usr/src + i: 4213600 7453900 4.2BSD 2048 16384 1 + j: 5.0G 11667500 4.2BSD 2048 16384 1 # /usr/obj + j: 10524400 11667500 4.2BSD 2048 16384 1 + k: 1.1G 22191900 4.2BSD 2048 16384 1 # /home + k: 2386100 22191900 4.2BSD 2048 16384 1 /dev/vnd0a / ffs rw 1 1 /dev/vnd0k /home ffs rw 1 2 diff --git a/regress/sbin/disklabel/18000.sparc64.ok b/regress/sbin/disklabel/18000.sparc64.ok index ef72a00dc..a1a964e8e 100644 --- a/regress/sbin/disklabel/18000.sparc64.ok +++ b/regress/sbin/disklabel/18000.sparc64.ok @@ -11,31 +11,31 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.5G 0 4.2BSD 2048 16384 1 # / - a: 1026000 0 4.2BSD 2048 16384 1 - b: 0.8G 1026000 swap - b: 1601400 1026000 swap - d: 0.7G 2627400 4.2BSD 2048 16384 1 # /tmp - d: 1395800 2627400 4.2BSD 2048 16384 1 - e: 1.0G 4023200 4.2BSD 2048 16384 1 # /var - e: 2032600 4023200 4.2BSD 2048 16384 1 - f: 2.2G 6055800 4.2BSD 2048 16384 1 # /usr - f: 4509500 6055800 4.2BSD 2048 16384 1 - g: 0.6G 10565300 4.2BSD 2048 16384 1 # /usr/X11R6 - g: 1217700 10565300 4.2BSD 2048 16384 1 - h: 2.0G 11783000 4.2BSD 2048 16384 1 # /usr/local - h: 4253400 11783000 4.2BSD 2048 16384 1 - i: 1.6G 16036400 4.2BSD 2048 16384 1 # /usr/src - i: 3359500 16036400 4.2BSD 2048 16384 1 - j: 5.3G 19395900 4.2BSD 2048 16384 1 # /usr/obj - j: 11060800 19395900 4.2BSD 2048 16384 1 - k: 3.1G 30456700 4.2BSD 2048 16384 1 # /home - k: 6409300 30456700 4.2BSD 2048 16384 1 + a: 969900 0 4.2BSD 2048 16384 1 + b: 0.7G 969900 swap + b: 1489100 969900 swap + d: 0.6G 2459000 4.2BSD 2048 16384 1 # /tmp + d: 1306000 2459000 4.2BSD 2048 16384 1 + e: 0.9G 3765000 4.2BSD 2048 16384 1 # /var + e: 1886700 3765000 4.2BSD 2048 16384 1 + f: 2.1G 5651700 4.2BSD 2048 16384 1 # /usr + f: 4397300 5651700 4.2BSD 2048 16384 1 + g: 0.6G 10049000 4.2BSD 2048 16384 1 # /usr/X11R6 + g: 1184100 10049000 4.2BSD 2048 16384 1 + h: 1.9G 11233100 4.2BSD 2048 16384 1 # /usr/local + h: 4085100 11233100 4.2BSD 2048 16384 1 + i: 2.1G 15318200 4.2BSD 2048 16384 1 # /usr/src + i: 4459400 15318200 4.2BSD 2048 16384 1 + j: 5.3G 19777600 4.2BSD 2048 16384 1 # /usr/obj + j: 11015900 19777600 4.2BSD 2048 16384 1 + k: 2.9G 30793500 4.2BSD 2048 16384 1 # /home + k: 6072500 30793500 4.2BSD 2048 16384 1 /dev/vnd0a / ffs rw 1 1 /dev/vnd0k /home ffs rw 1 2 diff --git a/regress/sbin/disklabel/2000.sparc64.ok b/regress/sbin/disklabel/2000.sparc64.ok index fe5234954..7d6b4772b 100644 --- a/regress/sbin/disklabel/2000.sparc64.ok +++ b/regress/sbin/disklabel/2000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.9G 0 4.2BSD 2048 16384 1 # / a: 3962900 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/20000.sparc64.ok b/regress/sbin/disklabel/20000.sparc64.ok index c9bc74296..0a0aef74f 100644 --- a/regress/sbin/disklabel/20000.sparc64.ok +++ b/regress/sbin/disklabel/20000.sparc64.ok @@ -11,31 +11,31 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.6G 0 4.2BSD 2048 16384 1 # / - a: 1230800 0 4.2BSD 2048 16384 1 - b: 1.0G 1230800 swap - b: 2011000 1230800 swap - d: 0.8G 3241800 4.2BSD 2048 16384 1 # /tmp - d: 1723500 3241800 4.2BSD 2048 16384 1 - e: 1.2G 4965300 4.2BSD 2048 16384 1 # /var - e: 2565100 4965300 4.2BSD 2048 16384 1 - f: 2.3G 7530400 4.2BSD 2048 16384 1 # /usr - f: 4919100 7530400 4.2BSD 2048 16384 1 - g: 0.6G 12449500 4.2BSD 2048 16384 1 # /usr/X11R6 - g: 1340600 12449500 4.2BSD 2048 16384 1 - h: 2.3G 13790100 4.2BSD 2048 16384 1 # /usr/local - h: 4867800 13790100 4.2BSD 2048 16384 1 - i: 1.6G 18657900 4.2BSD 2048 16384 1 # /usr/src - i: 3441500 18657900 4.2BSD 2048 16384 1 - j: 5.4G 22099400 4.2BSD 2048 16384 1 # /usr/obj - j: 11224600 22099400 4.2BSD 2048 16384 1 - k: 3.6G 33324000 4.2BSD 2048 16384 1 # /home - k: 7638000 33324000 4.2BSD 2048 16384 1 + a: 1174700 0 4.2BSD 2048 16384 1 + b: 0.9G 1174700 swap + b: 1898700 1174700 swap + d: 0.8G 3073400 4.2BSD 2048 16384 1 # /tmp + d: 1633700 3073400 4.2BSD 2048 16384 1 + e: 1.2G 4707100 4.2BSD 2048 16384 1 # /var + e: 2419200 4707100 4.2BSD 2048 16384 1 + f: 2.3G 7126300 4.2BSD 2048 16384 1 # /usr + f: 4806900 7126300 4.2BSD 2048 16384 1 + g: 0.6G 11933200 4.2BSD 2048 16384 1 # /usr/X11R6 + g: 1306900 11933200 4.2BSD 2048 16384 1 + h: 2.2G 13240100 4.2BSD 2048 16384 1 # /usr/local + h: 4699500 13240100 4.2BSD 2048 16384 1 + i: 2.2G 17939600 4.2BSD 2048 16384 1 # /usr/src + i: 4541300 17939600 4.2BSD 2048 16384 1 + j: 5.3G 22480900 4.2BSD 2048 16384 1 # /usr/obj + j: 11179800 22480900 4.2BSD 2048 16384 1 + k: 3.5G 33660700 4.2BSD 2048 16384 1 # /home + k: 7301300 33660700 4.2BSD 2048 16384 1 /dev/vnd0a / ffs rw 1 1 /dev/vnd0k /home ffs rw 1 2 diff --git a/regress/sbin/disklabel/2200.sparc64.ok b/regress/sbin/disklabel/2200.sparc64.ok index b58836955..5d0bab622 100644 --- a/regress/sbin/disklabel/2200.sparc64.ok +++ b/regress/sbin/disklabel/2200.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 2.1G 0 4.2BSD 2048 16384 1 # / a: 4352000 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/2300.sparc64.ok b/regress/sbin/disklabel/2300.sparc64.ok index 1af813f05..759b73767 100644 --- a/regress/sbin/disklabel/2300.sparc64.ok +++ b/regress/sbin/disklabel/2300.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 2.2G 0 4.2BSD 2048 16384 1 # / a: 4546600 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/256.sparc64.ok b/regress/sbin/disklabel/256.sparc64.ok index 4034f5f37..b5b5ad52d 100644 --- a/regress/sbin/disklabel/256.sparc64.ok +++ b/regress/sbin/disklabel/256.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.3G 0 4.2BSD 2048 16384 1 # / a: 526300 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/3000.sparc64.ok b/regress/sbin/disklabel/3000.sparc64.ok index fefa0841a..601173314 100644 --- a/regress/sbin/disklabel/3000.sparc64.ok +++ b/regress/sbin/disklabel/3000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.8G 0 4.2BSD 2048 16384 1 # / a: 1696300 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/300000.sparc64.ok b/regress/sbin/disklabel/300000.sparc64.ok index 04c89a352..f9263ee95 100644 --- a/regress/sbin/disklabel/300000.sparc64.ok +++ b/regress/sbin/disklabel/300000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.0G 0 4.2BSD 2048 16384 1 # / a: 2097200 0 4.2BSD 2048 16384 1 @@ -24,18 +24,18 @@ Offset: 0 Signature: 0x0 d: 8388700 35521000 4.2BSD 2048 16384 1 e: 35.4G 43909700 4.2BSD 2048 16384 1 # /var e: 74187600 43909700 4.2BSD 2048 16384 1 - f: 29.7G 118097300 4.2BSD 2048 16384 1 # /usr - f: 62263100 118097300 4.2BSD 2048 16384 1 - g: 1.0G 180360400 4.2BSD 2048 16384 1 # /usr/X11R6 - g: 2097200 180360400 4.2BSD 2048 16384 1 - h: 20.0G 182457600 4.2BSD 2048 16384 1 # /usr/local - h: 41943100 182457600 4.2BSD 2048 16384 1 - i: 3.0G 224400700 4.2BSD 2048 16384 1 # /usr/src - i: 6291500 224400700 4.2BSD 2048 16384 1 - j: 6.0G 230692200 4.2BSD 2048 16384 1 # /usr/obj - j: 12583000 230692200 4.2BSD 2048 16384 1 - k: 177.0G 243275200 4.2BSD 4096 32768 1 # /home - k: 371126800 243275200 4.2BSD 4096 32768 1 + f: 29.6G 118097300 4.2BSD 2048 16384 1 # /usr + f: 62150900 118097300 4.2BSD 2048 16384 1 + g: 1.0G 180248200 4.2BSD 2048 16384 1 # /usr/X11R6 + g: 2097200 180248200 4.2BSD 2048 16384 1 + h: 20.0G 182345400 4.2BSD 2048 16384 1 # /usr/local + h: 41943100 182345400 4.2BSD 2048 16384 1 + i: 5.0G 224288500 4.2BSD 2048 16384 1 # /usr/src + i: 10485800 224288500 4.2BSD 2048 16384 1 + j: 6.0G 234774300 4.2BSD 2048 16384 1 # /usr/obj + j: 12583000 234774300 4.2BSD 2048 16384 1 + k: 175.0G 247357300 4.2BSD 4096 32768 1 # /home + k: 367044700 247357300 4.2BSD 4096 32768 1 /dev/vnd0a / ffs rw 1 1 /dev/vnd0k /home ffs rw 1 2 diff --git a/regress/sbin/disklabel/3500.sparc64.ok b/regress/sbin/disklabel/3500.sparc64.ok index 3ab798f28..0e7dc7c2a 100644 --- a/regress/sbin/disklabel/3500.sparc64.ok +++ b/regress/sbin/disklabel/3500.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.8G 0 4.2BSD 2048 16384 1 # / a: 1747500 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/400.sparc64.ok b/regress/sbin/disklabel/400.sparc64.ok index 09a371426..75f740286 100644 --- a/regress/sbin/disklabel/400.sparc64.ok +++ b/regress/sbin/disklabel/400.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.4G 0 4.2BSD 2048 16384 1 # / a: 821200 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/4000.sparc64.ok b/regress/sbin/disklabel/4000.sparc64.ok index caa096ad6..3bda19eb4 100644 --- a/regress/sbin/disklabel/4000.sparc64.ok +++ b/regress/sbin/disklabel/4000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.9G 0 4.2BSD 2048 16384 1 # / a: 1798700 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/40000.sparc64.ok b/regress/sbin/disklabel/40000.sparc64.ok index 1a96cf84f..3f3d1a47c 100644 --- a/regress/sbin/disklabel/40000.sparc64.ok +++ b/regress/sbin/disklabel/40000.sparc64.ok @@ -11,31 +11,31 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.0G 0 4.2BSD 2048 16384 1 # / a: 2097200 0 4.2BSD 2048 16384 1 b: 2.9G 2097200 swap - b: 6107000 2097200 swap - d: 2.4G 8204200 4.2BSD 2048 16384 1 # /tmp - d: 5000300 8204200 4.2BSD 2048 16384 1 - e: 3.8G 13204500 4.2BSD 2048 16384 1 # /var - e: 7889900 13204500 4.2BSD 2048 16384 1 - f: 4.3G 21094400 4.2BSD 2048 16384 1 # /usr - f: 9015100 21094400 4.2BSD 2048 16384 1 - g: 1.0G 30109500 4.2BSD 2048 16384 1 # /usr/X11R6 - g: 2097200 30109500 4.2BSD 2048 16384 1 - h: 5.3G 32206700 4.2BSD 2048 16384 1 # /usr/local - h: 11011800 32206700 4.2BSD 2048 16384 1 - i: 2.0G 43218500 4.2BSD 2048 16384 1 # /usr/src - i: 4260700 43218500 4.2BSD 2048 16384 1 - j: 6.0G 47479200 4.2BSD 2048 16384 1 # /usr/obj - j: 12583000 47479200 4.2BSD 2048 16384 1 - k: 10.4G 60062200 4.2BSD 2048 16384 1 # /home - k: 21859800 60062200 4.2BSD 2048 16384 1 + b: 5994700 2097200 swap + d: 2.3G 8091900 4.2BSD 2048 16384 1 # /tmp + d: 4910500 8091900 4.2BSD 2048 16384 1 + e: 3.7G 13002400 4.2BSD 2048 16384 1 # /var + e: 7744000 13002400 4.2BSD 2048 16384 1 + f: 4.2G 20746400 4.2BSD 2048 16384 1 # /usr + f: 8902900 20746400 4.2BSD 2048 16384 1 + g: 1.0G 29649300 4.2BSD 2048 16384 1 # /usr/X11R6 + g: 2097200 29649300 4.2BSD 2048 16384 1 + h: 5.2G 31746500 4.2BSD 2048 16384 1 # /usr/local + h: 10843500 31746500 4.2BSD 2048 16384 1 + i: 2.6G 42590000 4.2BSD 2048 16384 1 # /usr/src + i: 5360500 42590000 4.2BSD 2048 16384 1 + j: 6.0G 47950500 4.2BSD 2048 16384 1 # /usr/obj + j: 12583000 47950500 4.2BSD 2048 16384 1 + k: 10.2G 60533500 4.2BSD 2048 16384 1 # /home + k: 21388500 60533500 4.2BSD 2048 16384 1 /dev/vnd0a / ffs rw 1 1 /dev/vnd0k /home ffs rw 1 2 diff --git a/regress/sbin/disklabel/4100.sparc64.ok b/regress/sbin/disklabel/4100.sparc64.ok index 4cafecde2..718391ba7 100644 --- a/regress/sbin/disklabel/4100.sparc64.ok +++ b/regress/sbin/disklabel/4100.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.9G 0 4.2BSD 2048 16384 1 # / a: 1808900 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/5000.sparc64.ok b/regress/sbin/disklabel/5000.sparc64.ok index b71486a11..b421903ef 100644 --- a/regress/sbin/disklabel/5000.sparc64.ok +++ b/regress/sbin/disklabel/5000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.9G 0 4.2BSD 2048 16384 1 # / a: 1901100 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/6000.sparc64.ok b/regress/sbin/disklabel/6000.sparc64.ok index f2cdd83c8..0c69ae4ca 100644 --- a/regress/sbin/disklabel/6000.sparc64.ok +++ b/regress/sbin/disklabel/6000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.0G 0 4.2BSD 2048 16384 1 # / a: 2003500 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/7000.sparc64.ok b/regress/sbin/disklabel/7000.sparc64.ok index 6e5309386..cc278261e 100644 --- a/regress/sbin/disklabel/7000.sparc64.ok +++ b/regress/sbin/disklabel/7000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.0G 0 4.2BSD 2048 16384 1 # / a: 2105900 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/800.sparc64.ok b/regress/sbin/disklabel/800.sparc64.ok index 5a0a0fe77..b3b8a31d4 100644 --- a/regress/sbin/disklabel/800.sparc64.ok +++ b/regress/sbin/disklabel/800.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 0.8G 0 4.2BSD 2048 16384 1 # / a: 1628200 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/8000.sparc64.ok b/regress/sbin/disklabel/8000.sparc64.ok index 521cddbe1..b975e5290 100644 --- a/regress/sbin/disklabel/8000.sparc64.ok +++ b/regress/sbin/disklabel/8000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.1G 0 4.2BSD 2048 16384 1 # / a: 2208300 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/9000.sparc64.ok b/regress/sbin/disklabel/9000.sparc64.ok index 9fb6ce96c..c0fb662bf 100644 --- a/regress/sbin/disklabel/9000.sparc64.ok +++ b/regress/sbin/disklabel/9000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.1G 0 4.2BSD 2048 16384 1 # / a: 2310700 0 4.2BSD 2048 16384 1 diff --git a/regress/sbin/disklabel/90000.sparc64.ok b/regress/sbin/disklabel/90000.sparc64.ok index fa01a9357..271d93fde 100644 --- a/regress/sbin/disklabel/90000.sparc64.ok +++ b/regress/sbin/disklabel/90000.sparc64.ok @@ -11,31 +11,31 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.0G 0 4.2BSD 2048 16384 1 # / a: 2097200 0 4.2BSD 2048 16384 1 - b: 7.8G 2097200 swap - b: 16347000 2097200 swap - d: 4.0G 18444200 4.2BSD 2048 16384 1 # /tmp - d: 8388700 18444200 4.2BSD 2048 16384 1 - e: 10.1G 26832900 4.2BSD 2048 16384 1 # /var - e: 21201900 26832900 4.2BSD 2048 16384 1 - f: 9.2G 48034800 4.2BSD 2048 16384 1 # /usr - f: 19255100 48034800 4.2BSD 2048 16384 1 - g: 1.0G 67289900 4.2BSD 2048 16384 1 # /usr/X11R6 - g: 2097200 67289900 4.2BSD 2048 16384 1 - h: 12.6G 69387100 4.2BSD 2048 16384 1 # /usr/local - h: 26371800 69387100 4.2BSD 2048 16384 1 - i: 3.0G 95758900 4.2BSD 2048 16384 1 # /usr/src - i: 6291500 95758900 4.2BSD 2048 16384 1 - j: 6.0G 102050400 4.2BSD 2048 16384 1 # /usr/obj - j: 12583000 102050400 4.2BSD 2048 16384 1 - k: 33.2G 114633400 4.2BSD 2048 16384 1 # /home - k: 69688600 114633400 4.2BSD 2048 16384 1 + b: 7.7G 2097200 swap + b: 16234700 2097200 swap + d: 4.0G 18331900 4.2BSD 2048 16384 1 # /tmp + d: 8388700 18331900 4.2BSD 2048 16384 1 + e: 10.0G 26720600 4.2BSD 2048 16384 1 # /var + e: 21056000 26720600 4.2BSD 2048 16384 1 + f: 9.1G 47776600 4.2BSD 2048 16384 1 # /usr + f: 19142900 47776600 4.2BSD 2048 16384 1 + g: 1.0G 66919500 4.2BSD 2048 16384 1 # /usr/X11R6 + g: 2097200 66919500 4.2BSD 2048 16384 1 + h: 12.5G 69016700 4.2BSD 2048 16384 1 # /usr/local + h: 26203500 69016700 4.2BSD 2048 16384 1 + i: 3.5G 95220200 4.2BSD 2048 16384 1 # /usr/src + i: 7408500 95220200 4.2BSD 2048 16384 1 + j: 6.0G 102628700 4.2BSD 2048 16384 1 # /usr/obj + j: 12583000 102628700 4.2BSD 2048 16384 1 + k: 33.0G 115211700 4.2BSD 2048 16384 1 # /home + k: 69110300 115211700 4.2BSD 2048 16384 1 /dev/vnd0a / ffs rw 1 1 /dev/vnd0k /home ffs rw 1 2 diff --git a/regress/sbin/disklabel/900000.sparc64.ok b/regress/sbin/disklabel/900000.sparc64.ok index 89187a072..580ebdc08 100644 --- a/regress/sbin/disklabel/900000.sparc64.ok +++ b/regress/sbin/disklabel/900000.sparc64.ok @@ -11,10 +11,10 @@ Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- - 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused - 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused + 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] Unused a: 1.0G 0 4.2BSD 2048 16384 1 # / a: 2097200 0 4.2BSD 2048 16384 1 @@ -30,12 +30,12 @@ Offset: 0 Signature: 0x0 g: 2097200 181011900 4.2BSD 2048 16384 1 h: 20.0G 183109100 4.2BSD 2048 16384 1 # /usr/local h: 41943100 183109100 4.2BSD 2048 16384 1 - i: 3.0G 225052200 4.2BSD 2048 16384 1 # /usr/src - i: 6291500 225052200 4.2BSD 2048 16384 1 - j: 6.0G 231343700 4.2BSD 2048 16384 1 # /usr/obj - j: 12583000 231343700 4.2BSD 2048 16384 1 - k: 300.0G 243926700 4.2BSD 4096 32768 1 # /home - k: 629145600 243926700 4.2BSD 4096 32768 1 + i: 5.0G 225052200 4.2BSD 2048 16384 1 # /usr/src + i: 10485800 225052200 4.2BSD 2048 16384 1 + j: 6.0G 235538000 4.2BSD 2048 16384 1 # /usr/obj + j: 12583000 235538000 4.2BSD 2048 16384 1 + k: 300.0G 248121000 4.2BSD 4096 32768 1 # /home + k: 629145600 248121000 4.2BSD 4096 32768 1 /dev/vnd0a / ffs rw 1 1 /dev/vnd0k /home ffs rw 1 2 diff --git a/regress/sys/arch/sparc64/emul-ldqstq/asi/asi_asm.S b/regress/sys/arch/sparc64/emul-ldqstq/asi/asi_asm.S index 7e50b1fb8..0d90491ea 100644 --- a/regress/sys/arch/sparc64/emul-ldqstq/asi/asi_asm.S +++ b/regress/sys/arch/sparc64/emul-ldqstq/asi/asi_asm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: asi_asm.S,v 1.2 2003/07/12 07:09:25 jason Exp $ */ +/* $OpenBSD: asi_asm.S,v 1.3 2024/08/06 05:39:48 claudio Exp $ */ /* * Copyright (c) 2003 Jason L. Wright (jason@thought.net) @@ -27,6 +27,7 @@ */ #include +#define _LOCORE #include /* void asm_ldq_asi(int asi, struct fpquad *r) %f0 = *r */ diff --git a/regress/sys/arch/sparc64/emul-ldqstq/simm13/genasm.pl b/regress/sys/arch/sparc64/emul-ldqstq/simm13/genasm.pl index 1729ad0df..f714ca3a0 100644 --- a/regress/sys/arch/sparc64/emul-ldqstq/simm13/genasm.pl +++ b/regress/sys/arch/sparc64/emul-ldqstq/simm13/genasm.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: genasm.pl,v 1.2 2003/07/13 06:39:44 jason Exp $ +# $OpenBSD: genasm.pl,v 1.3 2024/08/06 05:39:48 claudio Exp $ # # Copyright (c) 2003 Jason L. Wright (jason@thought.net) # All rights reserved. @@ -27,6 +27,7 @@ # print "#include \n"; +print "#define _LOCORE\n"; print "#include \n\n"; for ($i = -4096; $i <= 4095; $i++) { diff --git a/regress/sys/arch/sparc64/emul-ldqstq/simm13/genc.pl b/regress/sys/arch/sparc64/emul-ldqstq/simm13/genc.pl index e8c771392..e0d6ea680 100644 --- a/regress/sys/arch/sparc64/emul-ldqstq/simm13/genc.pl +++ b/regress/sys/arch/sparc64/emul-ldqstq/simm13/genc.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: genc.pl,v 1.4 2004/08/05 11:39:37 art Exp $ +# $OpenBSD: genc.pl,v 1.5 2024/08/06 05:39:48 claudio Exp $ # # Copyright (c) 2003 Jason L. Wright (jason@thought.net) # All rights reserved. @@ -29,6 +29,8 @@ print < +#include +#include #include #include "fpregs.h" diff --git a/regress/sys/kern/fork-exit/Makefile b/regress/sys/kern/fork-exit/Makefile index 8d7032870..44448adeb 100644 --- a/regress/sys/kern/fork-exit/Makefile +++ b/regress/sys/kern/fork-exit/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2021/05/21 20:21:10 bluhm Exp $ +# $OpenBSD: Makefile,v 1.5 2024/08/07 18:25:39 claudio Exp $ # Copyright (c) 2021 Alexander Bluhm # @@ -57,42 +57,42 @@ run-fork-thread: ${PROG} REGRESS_TARGETS += run-fork1-heap run-fork1-heap: ${PROG} # allocate 400 MB of heap memory - ulimit -p 500 -n 1000; ./fork-exit -h 100000 + ulimit -p 500 -n 1000; ./fork-exit -h 400000 REGRESS_TARGETS += run-fork-heap run-fork-heap: ${PROG} # allocate 400 MB of heap memory in processes - ulimit -p 500 -n 1000; ./fork-exit -p 100 -h 1000 + ulimit -p 500 -n 1000; ./fork-exit -p 100 -h 4000 REGRESS_TARGETS += run-fork1-thread1-heap run-fork1-thread1-heap: ${PROG} # allocate 400 MB of heap memory in single child and one thread - ulimit -p 500 -n 1000; ./fork-exit -t 1 -h 100000 + ulimit -p 500 -n 1000; ./fork-exit -t 1 -h 400000 REGRESS_TARGETS += run-fork-thread-heap run-fork-thread-heap: ${PROG} # allocate 400 MB of heap memory in threads - ulimit -p 500 -n 1000; ./fork-exit -p 10 -t 100 -h 100 + ulimit -p 500 -n 1000; ./fork-exit -p 10 -t 100 -h 400 REGRESS_TARGETS += run-fork1-stack run-fork1-stack: ${PROG} # allocate 32 MB of stack memory - ulimit -p 500 -n 1000; ulimit -s 32768; ./fork-exit -s 8000 + ulimit -p 500 -n 1000; ulimit -s 32768; ./fork-exit -s 32000 REGRESS_TARGETS += run-fork-stack run-fork-stack: ${PROG} # allocate 400 MB of stack memory in processes - ulimit -p 500 -n 1000; ulimit -s 32768; ./fork-exit -p 100 -s 1000 + ulimit -p 500 -n 1000; ulimit -s 32768; ./fork-exit -p 100 -s 4000 REGRESS_TARGETS += run-fork1-thread1-stack run-fork1-thread1-stack: ${PROG} # allocate 400 MB of stack memory in single child and one thread - ulimit -p 500 -n 1000; ./fork-exit -t 1 -s 100000 + ulimit -p 500 -n 1000; ./fork-exit -t 1 -s 400000 REGRESS_TARGETS += run-fork-thread-stack run-fork-thread-stack: ${PROG} # allocate 400 MB of stack memory in threads - ulimit -p 500 -n 1000; ./fork-exit -p 10 -t 100 -s 100 + ulimit -p 500 -n 1000; ./fork-exit -p 10 -t 100 -s 400 REGRESS_CLEANUP = cleanup cleanup: diff --git a/regress/sys/kern/fork-exit/fork-exit.c b/regress/sys/kern/fork-exit/fork-exit.c index 857750431..5fd20052a 100644 --- a/regress/sys/kern/fork-exit/fork-exit.c +++ b/regress/sys/kern/fork-exit/fork-exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fork-exit.c,v 1.7 2021/07/06 11:50:34 bluhm Exp $ */ +/* $OpenBSD: fork-exit.c,v 1.8 2024/08/07 18:25:39 claudio Exp $ */ /* * Copyright (c) 2021 Alexander Bluhm @@ -39,6 +39,8 @@ int stack = 0; int threads = 0; int timeout = 30; +int pagesize; + pthread_barrier_t thread_barrier; char timeoutstr[sizeof("-2147483647")]; @@ -48,9 +50,9 @@ usage(void) fprintf(stderr, "fork-exit [-ed] [-p procs] [-t threads] [-T timeout]\n" " -e child execs sleep(1), default call sleep(3)\n" " -d daemonize, use if already process group leader\n" - " -h heap allocate pages of heap memory, default 0\n" + " -h heap allocate number of kB of heap memory, default 0\n" " -p procs number of processes to fork, default 1\n" - " -s stack allocate pages of stack memory, default 0\n" + " -s stack allocate number of kB of stack memory, default 0\n" " -t threads number of threads to create, default 0\n" " -T timeout parent and children will exit, default 30 sec\n"); exit(2); @@ -71,7 +73,7 @@ recurse_page(int depth) static void alloc_stack(void) { - recurse_page(stack); + recurse_page((stack * 1024) / (4096 + 200)); } static void @@ -80,8 +82,9 @@ alloc_heap(void) int *p; int i; - for(i = 0; i < heap; i++) { - p = mmap(0, 4096, PROT_WRITE, MAP_SHARED|MAP_ANON, -1, 0); + for (i = 0; i < heap / (pagesize / 1024); i++) { + p = mmap(0, pagesize, PROT_WRITE|PROT_READ, + MAP_SHARED|MAP_ANON, -1, 0); if (p == MAP_FAILED) err(1, "mmap"); p[1] = 0x12345678; @@ -123,7 +126,7 @@ create_threads(void) if (stack) { /* thread start and function call overhead needs a bit more */ error = pthread_attr_setstacksize(&tattr, - (stack + 2) * (4096 + 64)); + (stack + 2) * (1024ULL + 50)); if (error) errc(1, error, "pthread_attr_setstacksize"); } @@ -213,6 +216,8 @@ main(int argc, char *argv[]) pid_t pgrp; struct timeval tv; + pagesize = sysconf(_SC_PAGESIZE); + while ((ch = getopt(argc, argv, "edh:p:s:T:t:")) != -1) { switch (ch) { case 'e': @@ -228,14 +233,15 @@ main(int argc, char *argv[]) errstr, optarg); break; case 'p': - procs = strtonum(optarg, 0, INT_MAX / 4096, &errstr); + procs = strtonum(optarg, 0, INT_MAX / pagesize, + &errstr); if (errstr != NULL) errx(1, "number of procs is %s: %s", errstr, optarg); break; case 's': stack = strtonum(optarg, 0, - (INT_MAX / (4096 + 64)) - 2, &errstr); + (INT_MAX / (1024 + 50)) - 2, &errstr); if (errstr != NULL) errx(1, "number of stack allocations is %s: %s", errstr, optarg); diff --git a/sbin/iked/radius.c b/sbin/iked/radius.c index 61e9b05a1..e30a9f17a 100644 --- a/sbin/iked/radius.c +++ b/sbin/iked/radius.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radius.c,v 1.8 2024/07/18 08:58:59 yasuoka Exp $ */ +/* $OpenBSD: radius.c,v 1.9 2024/08/08 03:58:53 yasuoka Exp $ */ /* * Copyright (c) 2024 Internet Initiative Japan Inc. @@ -841,7 +841,7 @@ iked_radius_dae_on_event(int fd, short ev, void *ctx) if (code == RADIUS_CODE_COA_REQUEST) { code = RADIUS_CODE_COA_NAK; cause = RADIUS_ERROR_CAUSE_ADMINISTRATIVELY_PROHIBITED; - nakcause = "Coa-Request is not supprted"; + nakcause = "Coa-Request is not supported"; goto send; } log_warnx("%s: received an invalid RADIUS message " diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 418b58206..149ac02c5 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -1,4 +1,4 @@ -# $OpenBSD: sys.mk,v 1.95 2024/02/17 16:13:24 deraadt Exp $ +# $OpenBSD: sys.mk,v 1.96 2024/08/07 15:59:25 deraadt Exp $ # $NetBSD: sys.mk,v 1.27 1996/04/10 05:47:19 mycroft Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -10,7 +10,7 @@ unix= We run SecBSD. OSMAJOR= 1 -OSMINOR= 5 +OSMINOR= 6 OSREV= $(OSMAJOR).$(OSMINOR) OSrev= $(OSMAJOR)$(OSMINOR) diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c index 24df29b22..0d0c02be7 100644 --- a/sys/arch/amd64/amd64/cpu.c +++ b/sys/arch/amd64/amd64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.191 2024/07/21 19:41:31 bluhm Exp $ */ +/* $OpenBSD: cpu.c,v 1.192 2024/08/08 07:02:38 kettenis Exp $ */ /* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -1464,6 +1464,7 @@ wbinvd_on_all_cpus(void) #endif int cpu_suspended; +int cpu_wakeups; #ifdef SUSPEND @@ -1480,9 +1481,6 @@ int cpu_suspend_primary(void) { struct cpu_info *ci = curcpu(); - int count = 0; - - printf("suspend\n"); /* Mask clock interrupts. */ local_pic.pic_hwmask(&local_pic, 0); @@ -1500,7 +1498,7 @@ cpu_suspend_primary(void) while (cpu_suspended) { cpu_suspend_cycle(); - count++; + cpu_wakeups++; } intr_disable(); @@ -1509,7 +1507,6 @@ cpu_suspend_primary(void) /* Unmask clock interrupts. */ local_pic.pic_hwunmask(&local_pic, 0); - printf("resume %d\n", count); return 0; } diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index f8c4acea3..413a69c52 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.170 2024/07/21 19:41:31 bluhm Exp $ */ +/* $OpenBSD: pmap.c,v 1.171 2024/08/08 15:57:22 dv Exp $ */ /* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */ /* @@ -2655,6 +2655,7 @@ pmap_enter_ept(struct pmap *pmap, paddr_t gpa, paddr_t hpa, vm_prot_t prot) } atomic_clearbits_int(&ptp->pg_flags, PG_BUSY); + ptp->wire_count = 1; pptp->wire_count++; npa = VM_PAGE_TO_PHYS(ptp); diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c index 3559b92ca..2ccb155e5 100644 --- a/sys/arch/i386/i386/cpu.c +++ b/sys/arch/i386/i386/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.115 2024/05/29 12:21:33 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.116 2024/08/08 07:02:38 kettenis Exp $ */ /* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */ /*- @@ -927,3 +927,4 @@ wbinvd_on_all_cpus(void) #endif int cpu_suspended; +int cpu_wakeups; diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index d8e897002..eb5408ee2 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: newvers.sh,v 1.203 2024/03/12 01:20:30 deraadt Exp $ +# $OpenBSD: newvers.sh,v 1.204 2024/08/07 15:59:24 deraadt Exp $ # $NetBSD: newvers.sh,v 1.17.2.1 1995/10/12 05:17:11 jtc Exp $ # # Copyright (c) 1984, 1986, 1990, 1993 @@ -68,13 +68,13 @@ id=`basename "${d}"` # and disable POOL_DEBUG in sys/conf/GENERIC ost="SecBSD" -osr="1.5" +osr="1.6" cat >vers.c < * Copyright (c) 2005 Jordan Hargrave @@ -87,6 +87,7 @@ sleep_setstate(void *v) int gosleep(void *v) { + extern int cpu_wakeups; struct acpi_softc *sc = v; int ret; @@ -107,8 +108,20 @@ gosleep(void *v) if (sc->sc_pmc_suspend) sc->sc_pmc_suspend(sc->sc_pmc_cookie); - ret = acpi_sleep_cpu(sc, sc->sc_state); - acpi_resume_cpu(sc, sc->sc_state); + cpu_wakeups = 0; + sc->sc_wakeup = 0; + sc->sc_wakeups = 0; + while (!sc->sc_wakeup) { + ret = acpi_sleep_cpu(sc, sc->sc_state); + acpi_resume_cpu(sc, sc->sc_state); + sc->sc_wakeups++; + + if (sc->sc_ec && sc->sc_wakegpe == sc->sc_ec->sc_gpe) { + sc->sc_wakeup = 0; + acpiec_gpehandler(sc, sc->sc_wakegpe, sc->sc_ec); + } else + sc->sc_wakeup = 1; + } if (sc->sc_pmc_resume) sc->sc_pmc_resume(sc->sc_pmc_cookie); @@ -151,10 +164,15 @@ checklids(struct acpi_softc *sc) int suspend_finish(void *v) { + extern int cpu_wakeups; struct acpi_softc *sc = v; + printf("wakeups: %d %d\n", cpu_wakeups, sc->sc_wakeups); printf("wakeup event: "); switch (sc->sc_wakegpe) { + case 0: + printf("unknown\n"); + break; case -1: printf("PWRBTN\n"); break; @@ -165,6 +183,7 @@ suspend_finish(void *v) printf("GPE 0x%x\n", sc->sc_wakegpe); break; } + sc->sc_wakegpe = 0; acpi_record_event(sc, APM_NORMAL_RESUME); acpi_indicator(sc, ACPI_SST_WORKING); diff --git a/sys/dev/acpi/acpibtn.c b/sys/dev/acpi/acpibtn.c index bda94a9a4..ad1b8d1c8 100644 --- a/sys/dev/acpi/acpibtn.c +++ b/sys/dev/acpi/acpibtn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpibtn.c,v 1.52 2024/05/13 19:56:37 kettenis Exp $ */ +/* $OpenBSD: acpibtn.c,v 1.53 2024/08/06 17:38:56 kettenis Exp $ */ /* * Copyright (c) 2005 Marco Peereboom * @@ -213,7 +213,7 @@ acpibtn_attach(struct device *parent, struct device *self, void *aux) printf("\n"); aml_register_notify(sc->sc_devnode, aa->aaa_dev, acpibtn_notify, - sc, ACPIDEV_NOPOLL); + sc, ACPIDEV_NOPOLL | ACPIDEV_WAKEUP); } int diff --git a/sys/dev/acpi/acpidev.h b/sys/dev/acpi/acpidev.h index 512d79b76..6122c9501 100644 --- a/sys/dev/acpi/acpidev.h +++ b/sys/dev/acpi/acpidev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpidev.h,v 1.44 2018/06/29 17:39:18 kettenis Exp $ */ +/* $OpenBSD: acpidev.h,v 1.45 2024/08/06 17:38:56 kettenis Exp $ */ /* * Copyright (c) 2005 Marco Peereboom * Copyright (c) 2005 Thorsten Lockert @@ -26,8 +26,9 @@ #define DEVNAME(s) ((s)->sc_dev.dv_xname) -#define ACPIDEV_NOPOLL 0 -#define ACPIDEV_POLL 1 +#define ACPIDEV_NOPOLL 0x0000 +#define ACPIDEV_POLL 0x0001 +#define ACPIDEV_WAKEUP 0x0002 /* * _BIF (Battery InFormation) diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h index 8719ea336..67b7fa085 100644 --- a/sys/dev/acpi/acpireg.h +++ b/sys/dev/acpi/acpireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpireg.h,v 1.60 2023/09/12 08:32:58 jmatthew Exp $ */ +/* $OpenBSD: acpireg.h,v 1.61 2024/08/08 07:01:22 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Marco Peereboom @@ -476,6 +476,30 @@ struct acpi_tpm2 { uint32_t start_method; } __packed; +/* + * Intel ACPI Low Power S0 Idle + */ +struct acpi_lpit { + struct acpi_table_header hdr; +#define LPIT_SIG "LPIT" + /* struct acpi_lpit_entry[]; */ +} __packed; + +struct acpi_lpit_entry { + uint32_t type; + uint32_t length; + uint16_t uid; + uint16_t reserved; + uint32_t flags; +#define LPIT_DISABLED (1L << 0) +#define LPIT_COUNTER_NOT_AVAILABLE (1L << 1) + struct acpi_gas entry_trigger; + uint32_t residency; + uint32_t latency; + struct acpi_gas residency_counter; + uint64_t residency_frequency; +}; + /* * Intel ACPI DMA Remapping Entries */ diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index d1af26fa0..c7e17c4bd 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpivar.h,v 1.132 2024/08/04 11:05:18 kettenis Exp $ */ +/* $OpenBSD: acpivar.h,v 1.134 2024/08/08 07:02:38 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -264,6 +264,8 @@ struct acpi_softc { struct aml_node *sc_sst; struct aml_node *sc_wak; int sc_state; + int sc_wakeup; + int sc_wakeups; time_t sc_resume_time; struct acpiec_softc *sc_ec; /* XXX assume single EC */ @@ -341,6 +343,7 @@ int acpi_set_gpehandler(struct acpi_softc *, int, void acpiec_read(struct acpiec_softc *, uint8_t, int, uint8_t *); void acpiec_write(struct acpiec_softc *, uint8_t, int, uint8_t *); +int acpiec_gpehandler(struct acpi_softc *, int, void *); #if NACPIPWRRES > 0 int acpipwrres_ref_incr(struct acpipwrres_softc *, struct aml_node *); diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c index aeb114da3..d179cfdd1 100644 --- a/sys/dev/acpi/dsdt.c +++ b/sys/dev/acpi/dsdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.c,v 1.269 2024/06/26 01:40:49 jsg Exp $ */ +/* $OpenBSD: dsdt.c,v 1.270 2024/08/06 17:38:56 kettenis Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave * @@ -28,6 +28,7 @@ #include #endif +#include #include #include #include @@ -364,7 +365,7 @@ struct aml_notify_data { char pnpid[20]; void *cbarg; int (*cbproc)(struct aml_node *, int, void *); - int poll; + int flags; SLIST_ENTRY(aml_notify_data) link; }; @@ -536,7 +537,7 @@ aml_notify_task(void *node, int notify_value) void aml_register_notify(struct aml_node *node, const char *pnpid, - int (*proc)(struct aml_node *, int, void *), void *arg, int poll) + int (*proc)(struct aml_node *, int, void *), void *arg, int flags) { struct aml_notify_data *pdata; extern int acpi_poll_enabled; @@ -548,23 +549,30 @@ aml_register_notify(struct aml_node *node, const char *pnpid, pdata->node = node; pdata->cbarg = arg; pdata->cbproc = proc; - pdata->poll = poll; + pdata->flags = flags; if (pnpid) strlcpy(pdata->pnpid, pnpid, sizeof(pdata->pnpid)); SLIST_INSERT_HEAD(&aml_notify_list, pdata, link); - if (poll && !acpi_poll_enabled) + if ((flags & ACPIDEV_POLL) && !acpi_poll_enabled) timeout_add_sec(&acpi_softc->sc_dev_timeout, 10); } void aml_notify(struct aml_node *node, int notify_value) { + struct aml_notify_data *pdata; + if (node == NULL) return; + SLIST_FOREACH(pdata, &aml_notify_list, link) { + if (pdata->node == node && (pdata->flags & ACPIDEV_WAKEUP)) + acpi_softc->sc_wakeup = 1; + } + dnprintf(10,"queue notify: %s %x\n", aml_nodename(node), notify_value); acpi_addtask(acpi_softc, aml_notify_task, node, notify_value); } @@ -588,7 +596,7 @@ acpi_poll_notify_task(void *arg0, int arg1) struct aml_notify_data *pdata = NULL; SLIST_FOREACH(pdata, &aml_notify_list, link) - if (pdata->cbproc && pdata->poll) + if (pdata->cbproc && (pdata->flags & ACPIDEV_POLL)) pdata->cbproc(pdata->node, 0, pdata->cbarg); } diff --git a/sys/dev/acpi/intelpmc.c b/sys/dev/acpi/intelpmc.c index 7e06bc5f4..c22da5a76 100644 --- a/sys/dev/acpi/intelpmc.c +++ b/sys/dev/acpi/intelpmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intelpmc.c,v 1.1 2024/08/04 11:05:18 kettenis Exp $ */ +/* $OpenBSD: intelpmc.c,v 1.2 2024/08/08 07:01:22 kettenis Exp $ */ /* * Copyright (c) 2024 Mark Kettenis * @@ -46,6 +46,9 @@ struct intelpmc_softc { struct acpi_softc *sc_acpi; struct aml_node *sc_node; + struct acpi_gas sc_counter[4]; + int sc_num_counters; + #ifdef INTELPMC_DEBUG uint64_t sc_c3[2]; uint64_t sc_c6[2]; @@ -57,6 +60,7 @@ struct intelpmc_softc { uint64_t sc_pc8[2]; uint64_t sc_pc9[2]; uint64_t sc_pc10[2]; + uint64_t sc_lpit[4][2]; #endif }; @@ -78,6 +82,7 @@ const char *intelpmc_hids[] = { NULL }; +void intelpmc_parse_lpit(struct intelpmc_softc *, struct acpi_lpit *); void intelpmc_suspend(void *); void intelpmc_resume(void *); @@ -95,12 +100,25 @@ intelpmc_attach(struct device *parent, struct device *self, void *aux) { struct intelpmc_softc *sc = (struct intelpmc_softc *)self; struct acpi_attach_args *aaa = aux; + struct acpi_q *entry; + struct acpi_lpit *lpit = NULL; sc->sc_acpi = (struct acpi_softc *)parent; sc->sc_node = aaa->aaa_node; printf(": %s\n", aaa->aaa_node->name); + SIMPLEQ_FOREACH(entry, &sc->sc_acpi->sc_tables, q_next) { + if (memcmp(entry->q_table, LPIT_SIG, + sizeof(LPIT_SIG) - 1) == 0) { + lpit = entry->q_table; + break; + } + } + + if (lpit) + intelpmc_parse_lpit(sc, lpit); + sc->sc_acpi->sc_pmc_suspend = intelpmc_suspend; sc->sc_acpi->sc_pmc_resume = intelpmc_resume; sc->sc_acpi->sc_pmc_cookie = sc; @@ -111,6 +129,7 @@ intelpmc_activate(struct device *self, int act) { #ifdef INTELPMC_DEBUG struct intelpmc_softc *sc = (struct intelpmc_softc *)self; + int i; switch (act) { case DVACT_RESUME: @@ -124,6 +143,10 @@ intelpmc_activate(struct device *self, int act) printf("PC8: %lld -> %lld\n", sc->sc_pc8[0], sc->sc_pc8[1]); printf("PC9: %lld -> %lld\n", sc->sc_pc9[0], sc->sc_pc9[1]); printf("PC10: %lld -> %lld\n", sc->sc_pc10[0], sc->sc_pc10[1]); + for (i = 0; i < sc->sc_num_counters; i++) { + printf("LPIT%d: %lld -> %lld\n", i, + sc->sc_lpit[i][0], sc->sc_lpit[i][1]); + } break; } #endif @@ -131,6 +154,63 @@ intelpmc_activate(struct device *self, int act) return 0; } +void +intelpmc_parse_lpit(struct intelpmc_softc *sc, struct acpi_lpit *lpit) +{ + caddr_t addr = (caddr_t)(lpit + 1); + + while (addr < (caddr_t)lpit + lpit->hdr.length) { + struct acpi_lpit_entry *entry = (struct acpi_lpit_entry *)addr; + uint32_t length = entry->length; + + if (length < 8) + return; + + if (addr + length > (caddr_t)lpit + lpit->hdr.length) + return; + + switch (entry->type) { + case 0: + if (length != sizeof(struct acpi_lpit_entry)) + return; + + if (entry->flags & LPIT_DISABLED) + break; + +#ifdef INTELPMC_DEBUG + printf("state %d: 0x%02x:%d:%d:0x%02x:0x%016llx\n", + entry->uid, entry->entry_trigger.address_space_id, + entry->entry_trigger.register_bit_width, + entry->entry_trigger.register_bit_offset, + entry->entry_trigger.access_size, + entry->entry_trigger.address); +#endif + + if (entry->flags & LPIT_COUNTER_NOT_AVAILABLE) + break; + +#ifdef INTELPMC_DEBUG + printf("counter: 0x%02x:%d:%d:0x%02x:0x%016llx\n", + entry->residency_counter.address_space_id, + entry->residency_counter.register_bit_width, + entry->residency_counter.register_bit_offset, + entry->residency_counter.access_size, + entry->residency_counter.address); + printf("frequency: %lld\n", + entry->residency_frequency); +#endif + + if (sc->sc_num_counters >= nitems(sc->sc_counter)) + break; + memcpy(&sc->sc_counter[sc->sc_num_counters++], + &entry->residency_counter, sizeof(struct acpi_gas)); + break; + } + + addr += length; + } +} + int intelpmc_dsm(struct acpi_softc *sc, struct aml_node *node, int func) { @@ -173,6 +253,9 @@ void intelpmc_suspend(void *cookie) { struct intelpmc_softc *sc = cookie; +#ifdef INTELPMC_DEBUG + int i; +#endif if (sc->sc_acpi->sc_state != ACPI_STATE_S0) return; @@ -188,6 +271,18 @@ intelpmc_suspend(void *cookie) rdmsr_safe(MSR_PKG_C8_RESIDENCY, &sc->sc_pc8[0]); rdmsr_safe(MSR_PKG_C9_RESIDENCY, &sc->sc_pc9[0]); rdmsr_safe(MSR_PKG_C10_RESIDENCY, &sc->sc_pc10[0]); + for (i = 0; i < sc->sc_num_counters; i++) { + if (sc->sc_counter[i].address_space_id == GAS_FUNCTIONAL_FIXED) + rdmsr_safe(sc->sc_counter[i].address, &sc->sc_lpit[i][0]); + else { + acpi_gasio(sc->sc_acpi, ACPI_IOREAD, + sc->sc_counter[i].address_space_id, + sc->sc_counter[i].address, + (1 << sc->sc_counter[i].access_size), + sc->sc_counter[i].register_bit_width / 8, + &sc->sc_lpit[i][0]); + } + } #endif intelpmc_dsm(sc->sc_acpi, sc->sc_node, ACPI_LPS0_SCREEN_OFF); @@ -198,6 +293,9 @@ void intelpmc_resume(void *cookie) { struct intelpmc_softc *sc = cookie; +#ifdef INTELPMC_DEBUG + int i; +#endif if (sc->sc_acpi->sc_state != ACPI_STATE_S0) return; @@ -216,5 +314,17 @@ intelpmc_resume(void *cookie) rdmsr_safe(MSR_PKG_C8_RESIDENCY, &sc->sc_pc8[1]); rdmsr_safe(MSR_PKG_C9_RESIDENCY, &sc->sc_pc9[1]); rdmsr_safe(MSR_PKG_C10_RESIDENCY, &sc->sc_pc10[1]); + for (i = 0; i < sc->sc_num_counters; i++) { + if (sc->sc_counter[i].address_space_id == GAS_FUNCTIONAL_FIXED) + rdmsr_safe(sc->sc_counter[i].address, &sc->sc_lpit[i][1]); + else { + acpi_gasio(sc->sc_acpi, ACPI_IOREAD, + sc->sc_counter[i].address_space_id, + sc->sc_counter[i].address, + (1 << sc->sc_counter[i].access_size), + sc->sc_counter[i].register_bit_width / 8, + &sc->sc_lpit[i][1]); + } + } #endif } diff --git a/sys/dev/pci/if_igc.c b/sys/dev/pci/if_igc.c index 490fc2c3f..a79daae0b 100644 --- a/sys/dev/pci/if_igc.c +++ b/sys/dev/pci/if_igc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_igc.c,v 1.25 2024/05/24 06:02:53 jsg Exp $ */ +/* $OpenBSD: if_igc.c,v 1.26 2024/08/08 14:58:49 jan Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause * @@ -881,7 +881,7 @@ igc_init(void *arg) } igc_initialize_transmit_unit(sc); - sc->rx_mbuf_sz = MCLBYTES + ETHER_ALIGN; + sc->rx_mbuf_sz = MCLBYTES; /* Prepare receive descriptors and buffers. */ if (igc_setup_receive_structures(sc)) { printf("%s: Could not setup receive structures\n", @@ -2159,7 +2159,7 @@ igc_allocate_receive_buffers(struct igc_rxring *rxr) rxbuf = rxr->rx_buffers; for (i = 0; i < sc->num_rx_desc; i++, rxbuf++) { error = bus_dmamap_create(rxr->rxdma.dma_tag, - MAX_JUMBO_FRAME_SIZE, 1, MAX_JUMBO_FRAME_SIZE, 0, + MAX_JUMBO_FRAME_SIZE, IGC_MAX_SCATTER, MCLBYTES, 0, BUS_DMA_NOWAIT, &rxbuf->map); if (error) { printf("%s: Unable to create RX DMA map\n", diff --git a/sys/dev/pci/ksmn.c b/sys/dev/pci/ksmn.c index e57204491..8b0204584 100644 --- a/sys/dev/pci/ksmn.c +++ b/sys/dev/pci/ksmn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ksmn.c,v 1.9 2023/09/05 13:06:01 stsp Exp $ */ +/* $OpenBSD: ksmn.c,v 1.10 2024/08/07 17:39:00 brynet Exp $ */ /* * Copyright (c) 2019 Bryan Steele @@ -107,6 +107,7 @@ static const struct pci_matchid ksmn_devices[] = { { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_17_6X_RC }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_4X_RC }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_6X_RC }, + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_7X_RC }, }; int diff --git a/sys/dev/pci/pcidevs b/sys/dev/pci/pcidevs index 44fc41bbf..72259f4fb 100644 --- a/sys/dev/pci/pcidevs +++ b/sys/dev/pci/pcidevs @@ -1,4 +1,4 @@ -$OpenBSD: pcidevs,v 1.2080 2024/07/29 01:17:53 jsg Exp $ +$OpenBSD: pcidevs,v 1.2081 2024/08/07 06:48:55 jsg Exp $ /* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */ /* @@ -707,6 +707,14 @@ product AMD 10_ADDR 0x1201 10h Address Map product AMD 10_DRAM 0x1202 10h DRAM Cfg product AMD 10_MISC 0x1203 10h Misc Cfg product AMD 10_LINK 0x1204 10h Link Cfg +product AMD 19_78_DF_1 0x12f8 19h/7xh Data Fabric +product AMD 19_78_DF_2 0x12f9 19h/7xh Data Fabric +product AMD 19_78_DF_3 0x12fa 19h/7xh Data Fabric +product AMD 19_78_DF_4 0x12fb 19h/7xh Data Fabric +product AMD 19_78_DF_5 0x12fc 19h/7xh Data Fabric +product AMD 19_78_DF_6 0x12fd 19h/7xh Data Fabric +product AMD 19_78_DF_7 0x12fe 19h/7xh Data Fabric +product AMD 19_78_DF_8 0x12ff 19h/7xh Data Fabric product AMD 11_HT 0x1300 11h HyperTransport product AMD 11_ADDR 0x1301 11h Address Map product AMD 11_DRAM 0x1302 11h DRAM Cfg @@ -876,8 +884,12 @@ product AMD 19_6X_XHCI_2 0x15b7 19h/6xh xHCI product AMD 19_6X_XHCI_3 0x15b8 19h/6xh xHCI product AMD 19_7X_XHCI_1 0x15b9 19h/7xh xHCI product AMD 19_7X_XHCI_2 0x15ba 19h/7xh xHCI +product AMD 19_78_XHCI_1 0x15bb 19h/7xh xHCI +product AMD 19_78_XHCI_2 0x15bd 19h/7xh xHCI product AMD 19_7X_XHCI_3 0x15c0 19h/7xh xHCI product AMD 19_7X_XHCI_4 0x15c1 19h/7xh xHCI +product AMD 19_78_XHCI_3 0x15c2 19h/7xh xHCI +product AMD 19_78_XHCI_4 0x15c3 19h/7xh xHCI product AMD 19_7X_PSP 0x15c7 19h/7xh PSP product AMD 17_1X_RC 0x15d0 17h/1xh Root Complex product AMD 17_1X_IOMMU 0x15d1 17h/1xh IOMMU @@ -8792,6 +8804,7 @@ product REALTEK REALMANAGE_SERIAL_1 0x816a RealManage Serial product REALTEK REALMANAGE_SERIAL_2 0x816b RealManage Serial product REALTEK REALMANAGE_IPMI 0x816c RealManage IPMI product REALTEK REALMANAGE_EHCI 0x816d RealManage USB +product REALTEK REALMANAGE_BMC 0x816e RealManage BMC product REALTEK RTL8192SE 0x8172 8192SE product REALTEK RTL8188CE 0x8176 8188CE product REALTEK RTL8192CE 0x8178 RTL8192CE @@ -9146,6 +9159,7 @@ product SIS 966_HDA 0x7502 966 HD Audio /* SK hynix products */ product SKHYNIX SSD 0x1327 BC501 NVMe +product SKHYNIX BC901 0x1d59 BC901 /* SMC products */ product SMC 83C170 0x0005 83C170 diff --git a/sys/dev/pci/pcidevs.h b/sys/dev/pci/pcidevs.h index 7a4d65c35..ed9959797 100644 --- a/sys/dev/pci/pcidevs.h +++ b/sys/dev/pci/pcidevs.h @@ -2,7 +2,7 @@ * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * OpenBSD: pcidevs,v 1.2080 2024/07/29 01:17:53 jsg Exp + * OpenBSD: pcidevs,v 1.2081 2024/08/07 06:48:55 jsg Exp */ /* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */ @@ -712,6 +712,14 @@ #define PCI_PRODUCT_AMD_10_DRAM 0x1202 /* 10h DRAM Cfg */ #define PCI_PRODUCT_AMD_10_MISC 0x1203 /* 10h Misc Cfg */ #define PCI_PRODUCT_AMD_10_LINK 0x1204 /* 10h Link Cfg */ +#define PCI_PRODUCT_AMD_19_78_DF_1 0x12f8 /* 19h/7xh Data Fabric */ +#define PCI_PRODUCT_AMD_19_78_DF_2 0x12f9 /* 19h/7xh Data Fabric */ +#define PCI_PRODUCT_AMD_19_78_DF_3 0x12fa /* 19h/7xh Data Fabric */ +#define PCI_PRODUCT_AMD_19_78_DF_4 0x12fb /* 19h/7xh Data Fabric */ +#define PCI_PRODUCT_AMD_19_78_DF_5 0x12fc /* 19h/7xh Data Fabric */ +#define PCI_PRODUCT_AMD_19_78_DF_6 0x12fd /* 19h/7xh Data Fabric */ +#define PCI_PRODUCT_AMD_19_78_DF_7 0x12fe /* 19h/7xh Data Fabric */ +#define PCI_PRODUCT_AMD_19_78_DF_8 0x12ff /* 19h/7xh Data Fabric */ #define PCI_PRODUCT_AMD_11_HT 0x1300 /* 11h HyperTransport */ #define PCI_PRODUCT_AMD_11_ADDR 0x1301 /* 11h Address Map */ #define PCI_PRODUCT_AMD_11_DRAM 0x1302 /* 11h DRAM Cfg */ @@ -881,8 +889,12 @@ #define PCI_PRODUCT_AMD_19_6X_XHCI_3 0x15b8 /* 19h/6xh xHCI */ #define PCI_PRODUCT_AMD_19_7X_XHCI_1 0x15b9 /* 19h/7xh xHCI */ #define PCI_PRODUCT_AMD_19_7X_XHCI_2 0x15ba /* 19h/7xh xHCI */ +#define PCI_PRODUCT_AMD_19_78_XHCI_1 0x15bb /* 19h/7xh xHCI */ +#define PCI_PRODUCT_AMD_19_78_XHCI_2 0x15bd /* 19h/7xh xHCI */ #define PCI_PRODUCT_AMD_19_7X_XHCI_3 0x15c0 /* 19h/7xh xHCI */ #define PCI_PRODUCT_AMD_19_7X_XHCI_4 0x15c1 /* 19h/7xh xHCI */ +#define PCI_PRODUCT_AMD_19_78_XHCI_3 0x15c2 /* 19h/7xh xHCI */ +#define PCI_PRODUCT_AMD_19_78_XHCI_4 0x15c3 /* 19h/7xh xHCI */ #define PCI_PRODUCT_AMD_19_7X_PSP 0x15c7 /* 19h/7xh PSP */ #define PCI_PRODUCT_AMD_17_1X_RC 0x15d0 /* 17h/1xh Root Complex */ #define PCI_PRODUCT_AMD_17_1X_IOMMU 0x15d1 /* 17h/1xh IOMMU */ @@ -8797,6 +8809,7 @@ #define PCI_PRODUCT_REALTEK_REALMANAGE_SERIAL_2 0x816b /* RealManage Serial */ #define PCI_PRODUCT_REALTEK_REALMANAGE_IPMI 0x816c /* RealManage IPMI */ #define PCI_PRODUCT_REALTEK_REALMANAGE_EHCI 0x816d /* RealManage USB */ +#define PCI_PRODUCT_REALTEK_REALMANAGE_BMC 0x816e /* RealManage BMC */ #define PCI_PRODUCT_REALTEK_RTL8192SE 0x8172 /* 8192SE */ #define PCI_PRODUCT_REALTEK_RTL8188CE 0x8176 /* 8188CE */ #define PCI_PRODUCT_REALTEK_RTL8192CE 0x8178 /* RTL8192CE */ @@ -9151,6 +9164,7 @@ /* SK hynix products */ #define PCI_PRODUCT_SKHYNIX_SSD 0x1327 /* BC501 NVMe */ +#define PCI_PRODUCT_SKHYNIX_BC901 0x1d59 /* BC901 */ /* SMC products */ #define PCI_PRODUCT_SMC_83C170 0x0005 /* 83C170 */ diff --git a/sys/dev/pci/pcidevs_data.h b/sys/dev/pci/pcidevs_data.h index e587836f6..949681c45 100644 --- a/sys/dev/pci/pcidevs_data.h +++ b/sys/dev/pci/pcidevs_data.h @@ -2,7 +2,7 @@ * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * OpenBSD: pcidevs,v 1.2080 2024/07/29 01:17:53 jsg Exp + * OpenBSD: pcidevs,v 1.2081 2024/08/07 06:48:55 jsg Exp */ /* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */ @@ -1079,6 +1079,38 @@ static const struct pci_known_product pci_known_products[] = { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_10_LINK, "10h Link Cfg", }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_DF_1, + "19h/7xh Data Fabric", + }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_DF_2, + "19h/7xh Data Fabric", + }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_DF_3, + "19h/7xh Data Fabric", + }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_DF_4, + "19h/7xh Data Fabric", + }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_DF_5, + "19h/7xh Data Fabric", + }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_DF_6, + "19h/7xh Data Fabric", + }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_DF_7, + "19h/7xh Data Fabric", + }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_DF_8, + "19h/7xh Data Fabric", + }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_11_HT, "11h HyperTransport", @@ -1755,6 +1787,14 @@ static const struct pci_known_product pci_known_products[] = { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_7X_XHCI_2, "19h/7xh xHCI", }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_XHCI_1, + "19h/7xh xHCI", + }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_XHCI_2, + "19h/7xh xHCI", + }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_7X_XHCI_3, "19h/7xh xHCI", @@ -1763,6 +1803,14 @@ static const struct pci_known_product pci_known_products[] = { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_7X_XHCI_4, "19h/7xh xHCI", }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_XHCI_3, + "19h/7xh xHCI", + }, + { + PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_78_XHCI_4, + "19h/7xh xHCI", + }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_7X_PSP, "19h/7xh PSP", @@ -31731,6 +31779,10 @@ static const struct pci_known_product pci_known_products[] = { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_REALMANAGE_EHCI, "RealManage USB", }, + { + PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_REALMANAGE_BMC, + "RealManage BMC", + }, { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8192SE, "8192SE", @@ -32971,6 +33023,10 @@ static const struct pci_known_product pci_known_products[] = { PCI_VENDOR_SKHYNIX, PCI_PRODUCT_SKHYNIX_SSD, "BC501 NVMe", }, + { + PCI_VENDOR_SKHYNIX, PCI_PRODUCT_SKHYNIX_BC901, + "BC901", + }, { PCI_VENDOR_SMC, PCI_PRODUCT_SMC_83C170, "83C170", diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c index b231c339e..42afe2757 100644 --- a/sys/dev/sdmmc/sdhc.c +++ b/sys/dev/sdmmc/sdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhc.c,v 1.76 2023/10/01 08:56:24 kettenis Exp $ */ +/* $OpenBSD: sdhc.c,v 1.77 2024/08/06 15:03:36 patrick Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler @@ -1057,6 +1057,9 @@ sdhc_start_command(struct sdhc_host *hp, struct sdmmc_command *cmd) DPRINTF(1,("%s: cmd=%#x mode=%#x blksize=%d blkcount=%d\n", DEVNAME(hp->sc), command, mode, blksize, blkcount)); + /* We're starting a new command, reset state. */ + hp->intr_status = 0; + /* * Start a CPU data transfer. Writing to the high order byte * of the SDHC_COMMAND register triggers the SD command. (1.5) diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c index 9cd890735..8441b50a2 100644 --- a/sys/dev/usb/if_umb.c +++ b/sys/dev/usb/if_umb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_umb.c,v 1.58 2024/05/23 03:21:09 jsg Exp $ */ +/* $OpenBSD: if_umb.c,v 1.59 2024/08/08 05:10:00 deraadt Exp $ */ /* * Copyright (c) 2016 genua mbH @@ -241,7 +241,13 @@ struct umb_quirk { int umb_match; }; const struct umb_quirk umb_quirks[] = { - { { USB_VENDOR_DELL, USB_PRODUCT_DELL_DW5821E }, + { { USB_VENDOR_DELL, USB_PRODUCT_DELL_DW5821E_1 }, + 0, + 2, + UMATCH_VENDOR_PRODUCT + }, + + { { USB_VENDOR_DELL, USB_PRODUCT_DELL_DW5821E_2 }, 0, 2, UMATCH_VENDOR_PRODUCT diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 62eda2a80..6f3e8e45c 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1,4 +1,4 @@ -$OpenBSD: usbdevs,v 1.766 2024/05/29 06:48:43 jsg Exp $ +$OpenBSD: usbdevs,v 1.767 2024/08/08 05:09:09 deraadt Exp $ /* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */ /* @@ -1537,7 +1537,8 @@ product DELL PRISM_GT_2 0x8104 PrismGT USB 2.0 WLAN product DELL W5500 0x8115 W5500 HSDPA product DELL U740 0x8135 U740 CDMA product DELL EU870D 0x8138 EU870D HSDPA -product DELL DW5821E 0x81d7 DW5821e LTE +product DELL DW5821E_1 0x81d7 DW5821e LTE +product DELL DW5821E_2 0x81e0 DW5821e LTE product DELL DW700 0x9500 DW700 GPS product DELL2 UPS 0xffff UPS diff --git a/sys/dev/usb/usbdevs.h b/sys/dev/usb/usbdevs.h index c71d7908c..80524949b 100644 --- a/sys/dev/usb/usbdevs.h +++ b/sys/dev/usb/usbdevs.h @@ -1,10 +1,10 @@ -/* $OpenBSD: usbdevs.h,v 1.778 2024/05/29 06:49:38 jsg Exp $ */ +/* $OpenBSD: usbdevs.h,v 1.779 2024/08/08 05:09:33 deraadt Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * OpenBSD: usbdevs,v 1.766 2024/05/29 06:48:43 jsg Exp + * OpenBSD: usbdevs,v 1.767 2024/08/08 05:09:09 deraadt Exp */ /* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */ @@ -1544,7 +1544,8 @@ #define USB_PRODUCT_DELL_W5500 0x8115 /* W5500 HSDPA */ #define USB_PRODUCT_DELL_U740 0x8135 /* U740 CDMA */ #define USB_PRODUCT_DELL_EU870D 0x8138 /* EU870D HSDPA */ -#define USB_PRODUCT_DELL_DW5821E 0x81d7 /* DW5821e LTE */ +#define USB_PRODUCT_DELL_DW5821E_1 0x81d7 /* DW5821e LTE */ +#define USB_PRODUCT_DELL_DW5821E_2 0x81e0 /* DW5821e LTE */ #define USB_PRODUCT_DELL_DW700 0x9500 /* DW700 GPS */ #define USB_PRODUCT_DELL2_UPS 0xffff /* UPS */ diff --git a/sys/dev/usb/usbdevs_data.h b/sys/dev/usb/usbdevs_data.h index 4c487fee2..6cb37aa37 100644 --- a/sys/dev/usb/usbdevs_data.h +++ b/sys/dev/usb/usbdevs_data.h @@ -1,10 +1,10 @@ -/* $OpenBSD: usbdevs_data.h,v 1.772 2024/05/29 06:49:38 jsg Exp $ */ +/* $OpenBSD: usbdevs_data.h,v 1.773 2024/08/08 05:09:33 deraadt Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * OpenBSD: usbdevs,v 1.766 2024/05/29 06:48:43 jsg Exp + * OpenBSD: usbdevs,v 1.767 2024/08/08 05:09:09 deraadt Exp */ /* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */ @@ -2494,7 +2494,11 @@ const struct usb_known_product usb_known_products[] = { "EU870D HSDPA", }, { - USB_VENDOR_DELL, USB_PRODUCT_DELL_DW5821E, + USB_VENDOR_DELL, USB_PRODUCT_DELL_DW5821E_1, + "DW5821e LTE", + }, + { + USB_VENDOR_DELL, USB_PRODUCT_DELL_DW5821E_2, "DW5821e LTE", }, { diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index cf9ef254b..e2ca8e805 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci.c,v 1.131 2024/05/23 03:21:09 jsg Exp $ */ +/* $OpenBSD: xhci.c,v 1.132 2024/08/06 17:30:04 kettenis Exp $ */ /* * Copyright (c) 2014-2015 Martin Pieuchot @@ -79,6 +79,7 @@ struct xhci_pipe { }; int xhci_reset(struct xhci_softc *); +void xhci_suspend(struct xhci_softc *); int xhci_intr1(struct xhci_softc *); void xhci_event_dequeue(struct xhci_softc *); void xhci_event_xfer(struct xhci_softc *, uint64_t, uint32_t, uint32_t); @@ -533,7 +534,7 @@ xhci_activate(struct device *self, int act) break; case DVACT_POWERDOWN: rv = config_activate_children(self, act); - xhci_reset(sc); + xhci_suspend(sc); break; default: rv = config_activate_children(self, act); @@ -577,6 +578,73 @@ xhci_reset(struct xhci_softc *sc) return (0); } +void +xhci_suspend(struct xhci_softc *sc) +{ + uint32_t hcr; + int i; + + XOWRITE4(sc, XHCI_USBCMD, 0); /* Halt controller */ + for (i = 0; i < 100; i++) { + usb_delay_ms(&sc->sc_bus, 1); + hcr = XOREAD4(sc, XHCI_USBSTS) & XHCI_STS_HCH; + if (hcr) + break; + } + + if (!hcr) { + printf("%s: halt timeout\n", DEVNAME(sc)); + xhci_reset(sc); + return; + } + + /* + * Some Intel controllers will not power down completely + * unless they have seen a save state command. This in turn + * will prevent the SoC from reaching its lowest idle state. + * So save the state here. + * + * Note that we don't restore this saved state anywhere. + * Instead we reset the controller and reinitialize it from + * scratch when we resume. + */ + + XOWRITE4(sc, XHCI_USBCMD, XHCI_CMD_CSS); /* Save state */ + hcr = XOREAD4(sc, XHCI_USBSTS); + for (i = 0; i < 100; i++) { + usb_delay_ms(&sc->sc_bus, 1); + hcr = XOREAD4(sc, XHCI_USBSTS) & XHCI_STS_SSS; + if (!hcr) + break; + } + + if (hcr) { + printf("%s: save state timeout\n", DEVNAME(sc)); + xhci_reset(sc); + return; + } + + /* Disable interrupts. */ + XRWRITE4(sc, XHCI_IMOD(0), 0); + XRWRITE4(sc, XHCI_IMAN(0), 0); + + /* Clear the event ring address. */ + XRWRITE4(sc, XHCI_ERDP_LO(0), 0); + XRWRITE4(sc, XHCI_ERDP_HI(0), 0); + + XRWRITE4(sc, XHCI_ERSTBA_LO(0), 0); + XRWRITE4(sc, XHCI_ERSTBA_HI(0), 0); + + XRWRITE4(sc, XHCI_ERSTSZ(0), 0); + + /* Clear the command ring address. */ + XOWRITE4(sc, XHCI_CRCR_LO, 0); + XOWRITE4(sc, XHCI_CRCR_HI, 0); + + XOWRITE4(sc, XHCI_DCBAAP_LO, 0); + XOWRITE4(sc, XHCI_DCBAAP_HI, 0); +} + void xhci_reinit(struct xhci_softc *sc) { diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index e2c99fe1e..a31924140 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_event.c,v 1.199 2024/07/29 12:42:53 claudio Exp $ */ +/* $OpenBSD: kern_event.c,v 1.200 2024/08/06 08:44:54 claudio Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon @@ -124,6 +124,8 @@ int filt_kqueue_common(struct knote *kn, struct kqueue *kq); int filt_procattach(struct knote *kn); void filt_procdetach(struct knote *kn); int filt_proc(struct knote *kn, long hint); +int filt_procmodify(struct kevent *kev, struct knote *kn); +int filt_procprocess(struct knote *kn, struct kevent *kev); int filt_sigattach(struct knote *kn); void filt_sigdetach(struct knote *kn); int filt_signal(struct knote *kn, long hint); @@ -145,17 +147,21 @@ const struct filterops kqread_filtops = { }; const struct filterops proc_filtops = { - .f_flags = 0, + .f_flags = FILTEROP_MPSAFE, .f_attach = filt_procattach, .f_detach = filt_procdetach, .f_event = filt_proc, + .f_modify = filt_procmodify, + .f_process = filt_procprocess, }; const struct filterops sig_filtops = { - .f_flags = 0, + .f_flags = FILTEROP_MPSAFE, .f_attach = filt_sigattach, .f_detach = filt_sigdetach, .f_event = filt_signal, + .f_modify = filt_procmodify, + .f_process = filt_procprocess, }; const struct filterops file_filtops = { @@ -177,6 +183,7 @@ const struct filterops timer_filtops = { struct pool knote_pool; struct pool kqueue_pool; struct mutex kqueue_klist_lock = MUTEX_INITIALIZER(IPL_MPFLOOR); +struct rwlock kqueue_ps_list_lock = RWLOCK_INITIALIZER("kqpsl"); int kq_ntimeouts = 0; int kq_timeoutmax = (4 * 1024); @@ -333,7 +340,7 @@ int filt_procattach(struct knote *kn) { struct process *pr; - int s; + int nolock; if ((curproc->p_p->ps_flags & PS_PLEDGE) && (curproc->p_p->ps_pledge & PLEDGE_PROC) == 0) @@ -342,13 +349,14 @@ filt_procattach(struct knote *kn) if (kn->kn_id > PID_MAX) return ESRCH; + KERNEL_LOCK(); pr = prfind(kn->kn_id); if (pr == NULL) - return (ESRCH); + goto fail; /* exiting processes can't be specified */ if (pr->ps_flags & PS_EXITING) - return (ESRCH); + goto fail; kn->kn_ptr.p_process = pr; kn->kn_flags |= EV_CLEAR; /* automatically set */ @@ -360,13 +368,26 @@ filt_procattach(struct knote *kn) kn->kn_data = kn->kn_sdata; /* ppid */ kn->kn_fflags = NOTE_CHILD; kn->kn_flags &= ~EV_FLAG1; + rw_assert_wrlock(&kqueue_ps_list_lock); } - s = splhigh(); + /* this needs both the ps_mtx and exclusive kqueue_ps_list_lock. */ + nolock = (rw_status(&kqueue_ps_list_lock) == RW_WRITE); + if (!nolock) + rw_enter_write(&kqueue_ps_list_lock); + mtx_enter(&pr->ps_mtx); klist_insert_locked(&pr->ps_klist, kn); - splx(s); + mtx_leave(&pr->ps_mtx); + if (!nolock) + rw_exit_write(&kqueue_ps_list_lock); + + KERNEL_UNLOCK(); return (0); + +fail: + KERNEL_UNLOCK(); + return (ESRCH); } /* @@ -380,25 +401,25 @@ filt_procattach(struct knote *kn) void filt_procdetach(struct knote *kn) { - struct kqueue *kq = kn->kn_kq; struct process *pr = kn->kn_ptr.p_process; - int s, status; + int status; - mtx_enter(&kq->kq_lock); + /* this needs both the ps_mtx and exclusive kqueue_ps_list_lock. */ + rw_enter_write(&kqueue_ps_list_lock); + mtx_enter(&pr->ps_mtx); status = kn->kn_status; - mtx_leave(&kq->kq_lock); - if (status & KN_DETACHED) - return; + if ((status & KN_DETACHED) == 0) + klist_remove_locked(&pr->ps_klist, kn); - s = splhigh(); - klist_remove_locked(&pr->ps_klist, kn); - splx(s); + mtx_leave(&pr->ps_mtx); + rw_exit_write(&kqueue_ps_list_lock); } int filt_proc(struct knote *kn, long hint) { + struct process *pr = kn->kn_ptr.p_process; struct kqueue *kq = kn->kn_kq; u_int event; @@ -419,17 +440,14 @@ filt_proc(struct knote *kn, long hint) */ if (event == NOTE_EXIT) { struct process *pr = kn->kn_ptr.p_process; - int s; mtx_enter(&kq->kq_lock); kn->kn_status |= KN_DETACHED; mtx_leave(&kq->kq_lock); - s = splhigh(); kn->kn_flags |= (EV_EOF | EV_ONESHOT); kn->kn_data = W_EXITCODE(pr->ps_xexit, pr->ps_xsig); klist_remove_locked(&pr->ps_klist, kn); - splx(s); return (1); } @@ -452,7 +470,12 @@ filt_proc(struct knote *kn, long hint) kev.fflags = kn->kn_sfflags; kev.data = kn->kn_id; /* parent */ kev.udata = kn->kn_udata; /* preserve udata */ + + rw_assert_wrlock(&kqueue_ps_list_lock); + mtx_leave(&pr->ps_mtx); error = kqueue_register(kq, &kev, 0, NULL); + mtx_enter(&pr->ps_mtx); + if (error) kn->kn_fflags |= NOTE_TRACKERR; } @@ -460,6 +483,37 @@ filt_proc(struct knote *kn, long hint) return (kn->kn_fflags != 0); } +int +filt_procmodify(struct kevent *kev, struct knote *kn) +{ + struct process *pr = kn->kn_ptr.p_process; + int active; + + mtx_enter(&pr->ps_mtx); + active = knote_modify(kev, kn); + mtx_leave(&pr->ps_mtx); + + return (active); +} + +/* + * By default only grab the mutex here. If the event requires extra protection + * because it alters the klist (NOTE_EXIT, NOTE_FORK the caller of the knote + * needs to grab the rwlock first. + */ +int +filt_procprocess(struct knote *kn, struct kevent *kev) +{ + struct process *pr = kn->kn_ptr.p_process; + int active; + + mtx_enter(&pr->ps_mtx); + active = knote_process(kn, kev); + mtx_leave(&pr->ps_mtx); + + return (active); +} + /* * signal knotes are shared with proc knotes, so we apply a mask to * the hint in order to differentiate them from process hints. This @@ -470,7 +524,6 @@ int filt_sigattach(struct knote *kn) { struct process *pr = curproc->p_p; - int s; if (kn->kn_id >= NSIG) return EINVAL; @@ -478,9 +531,12 @@ filt_sigattach(struct knote *kn) kn->kn_ptr.p_process = pr; kn->kn_flags |= EV_CLEAR; /* automatically set */ - s = splhigh(); + /* this needs both the ps_mtx and exclusive kqueue_ps_list_lock. */ + rw_enter_write(&kqueue_ps_list_lock); + mtx_enter(&pr->ps_mtx); klist_insert_locked(&pr->ps_klist, kn); - splx(s); + mtx_leave(&pr->ps_mtx); + rw_exit_write(&kqueue_ps_list_lock); return (0); } @@ -489,17 +545,17 @@ void filt_sigdetach(struct knote *kn) { struct process *pr = kn->kn_ptr.p_process; - int s; - s = splhigh(); + rw_enter_write(&kqueue_ps_list_lock); + mtx_enter(&pr->ps_mtx); klist_remove_locked(&pr->ps_klist, kn); - splx(s); + mtx_leave(&pr->ps_mtx); + rw_exit_write(&kqueue_ps_list_lock); } int filt_signal(struct knote *kn, long hint) { - if (hint & NOTE_SIGNAL) { hint &= ~NOTE_SIGNAL; @@ -2002,14 +2058,28 @@ knote_fdclose(struct proc *p, int fd) void knote_processexit(struct process *pr) { - KERNEL_ASSERT_LOCKED(); - + /* this needs both the ps_mtx and exclusive kqueue_ps_list_lock. */ + rw_enter_write(&kqueue_ps_list_lock); + mtx_enter(&pr->ps_mtx); knote_locked(&pr->ps_klist, NOTE_EXIT); + mtx_leave(&pr->ps_mtx); + rw_exit_write(&kqueue_ps_list_lock); /* remove other knotes hanging off the process */ klist_invalidate(&pr->ps_klist); } +void +knote_processfork(struct process *pr, pid_t pid) +{ + /* this needs both the ps_mtx and exclusive kqueue_ps_list_lock. */ + rw_enter_write(&kqueue_ps_list_lock); + mtx_enter(&pr->ps_mtx); + knote_locked(&pr->ps_klist, NOTE_FORK | pid); + mtx_leave(&pr->ps_mtx); + rw_exit_write(&kqueue_ps_list_lock); +} + void knote_attach(struct knote *kn) { diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index df61b2c57..189596c53 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.256 2024/07/08 13:17:12 claudio Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.257 2024/08/06 08:44:54 claudio Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -711,7 +711,7 @@ sys_execve(struct proc *p, void *v, register_t *retval) /* * notify others that we exec'd */ - knote_locked(&pr->ps_klist, NOTE_EXEC); + knote(&pr->ps_klist, NOTE_EXEC); /* map the process's timekeep page, needs to be before exec_elf_fixup */ if (exec_timekeep_map(pr)) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 4882de636..280af8ce0 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.228 2024/07/29 09:49:49 claudio Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.230 2024/08/06 18:41:20 claudio Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 884dcd64d..bedd7dd48 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.260 2024/06/03 12:48:25 claudio Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.261 2024/08/06 08:44:54 claudio Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -199,6 +199,7 @@ process_initialize(struct process *pr, struct proc *p) rw_init(&pr->ps_lock, "pslock"); mtx_init(&pr->ps_mtx, IPL_HIGH); + klist_init_mutex(&pr->ps_klist, &pr->ps_mtx); timeout_set_flags(&pr->ps_realit_to, realitexpire, pr, KCLOCK_UPTIME, 0); @@ -484,7 +485,7 @@ fork1(struct proc *curp, int flags, void (*func)(void *), void *arg, /* * Notify any interested parties about the new process. */ - knote_locked(&curpr->ps_klist, NOTE_FORK | pr->ps_pid); + knote_processfork(curpr, pr->ps_pid); /* * Update stats now that we know the fork was successful. diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 1e251bd66..e5b8575a5 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.336 2024/07/29 12:42:53 claudio Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.337 2024/08/06 08:44:54 claudio Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -985,7 +985,7 @@ ptsignal(struct proc *p, int signum, enum signal_type type) } if (type != SPROPAGATED) - knote_locked(&pr->ps_klist, NOTE_SIGNAL | signum); + knote(&pr->ps_klist, NOTE_SIGNAL | signum); prop = sigprop[signum]; diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 7e7414562..8a5f2852e 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.433 2024/08/05 18:47:29 mvs Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.436 2024/08/08 15:02:36 bluhm Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -507,6 +507,8 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, return (sysctl_rdstring(oldp, oldlenp, newp, version)); case KERN_NUMVNODES: /* XXX numvnodes is a long */ return (sysctl_rdint(oldp, oldlenp, newp, numvnodes)); + case KERN_CLOCKRATE: + return (sysctl_clockrate(oldp, oldlenp, newp)); case KERN_BOOTTIME: { struct timeval bt; memset(&bt, 0, sizeof bt); @@ -531,6 +533,18 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, return (sysctl_rdstruct(oldp, oldlenp, newp, &mbs, sizeof(mbs))); } + case KERN_MSGBUFSIZE: + case KERN_CONSBUFSIZE: { + struct msgbuf *mp; + mp = (name[0] == KERN_MSGBUFSIZE) ? msgbufp : consbufp; + /* + * deal with cases where the message buffer has + * become corrupted. + */ + if (!mp || mp->msg_magic != MSG_MAGIC) + return (ENXIO); + return (sysctl_rdint(oldp, oldlenp, newp, mp->msg_bufs)); + } case KERN_OSREV: case KERN_NFILES: case KERN_TTYCOUNT: @@ -614,20 +628,6 @@ kern_sysctl_locked(int *name, u_int namelen, void *oldp, size_t *oldlenp, error = sysctl_int(oldp, oldlenp, newp, newlen, &inthostid); hostid = inthostid; return (error); - case KERN_CLOCKRATE: - return (sysctl_clockrate(oldp, oldlenp, newp)); - case KERN_MSGBUFSIZE: - case KERN_CONSBUFSIZE: { - struct msgbuf *mp; - mp = (name[0] == KERN_MSGBUFSIZE) ? msgbufp : consbufp; - /* - * deal with cases where the message buffer has - * become corrupted. - */ - if (!mp || mp->msg_magic != MSG_MAGIC) - return (ENXIO); - return (sysctl_rdint(oldp, oldlenp, newp, mp->msg_bufs)); - } case KERN_CONSBUF: if ((error = suser(p))) return (error); @@ -635,7 +635,10 @@ kern_sysctl_locked(int *name, u_int namelen, void *oldp, size_t *oldlenp, case KERN_MSGBUF: { struct msgbuf *mp; mp = (name[0] == KERN_MSGBUF) ? msgbufp : consbufp; - /* see note above */ + /* + * deal with cases where the message buffer has + * become corrupted. + */ if (!mp || mp->msg_magic != MSG_MAGIC) return (ENXIO); return (sysctl_rdstruct(oldp, oldlenp, newp, mp, @@ -1679,7 +1682,7 @@ sysctl_file(int *name, u_int namelen, char *where, size_t *sizep, */ if (pr->ps_flags & (PS_SYSTEM | PS_EMBRYO | PS_EXITING)) continue; - if (arg > 0 && pr->ps_pid != (pid_t)arg) { + if (arg >= 0 && pr->ps_pid != (pid_t)arg) { /* not the pid we are looking for */ continue; } @@ -1699,6 +1702,9 @@ sysctl_file(int *name, u_int namelen, char *where, size_t *sizep, FILLIT(fp, fdp, i, NULL, pr); FRELE(fp, p); } + /* pid is unique, stop searching */ + if (arg >= 0) + break; } if (!matched) error = ESRCH; diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 76bed8488..83e5c133d 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.341 2024/08/01 17:19:01 bluhm Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.342 2024/08/06 20:14:56 mvs Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -234,8 +234,8 @@ sobind(struct socket *so, struct mbuf *nam, struct proc *p) int solisten(struct socket *so, int backlog) { - int somaxconn_local = READ_ONCE(somaxconn); - int sominconn_local = READ_ONCE(sominconn); + int somaxconn_local = atomic_load_int(&somaxconn); + int sominconn_local = atomic_load_int(&sominconn); int error; switch (so->so_type) { diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 580698ca8..270e45593 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_usrreq.c,v 1.208 2024/06/28 21:30:24 mvs Exp $ */ +/* $OpenBSD: uipc_usrreq.c,v 1.209 2024/08/06 20:13:58 mvs Exp $ */ /* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */ /* @@ -235,12 +235,12 @@ uipc_setaddr(const struct unpcb *unp, struct mbuf *nam) * be large enough for at least one max-size datagram plus address. */ #define PIPSIZ 8192 -u_int unpst_sendspace = PIPSIZ; -u_int unpst_recvspace = PIPSIZ; -u_int unpsq_sendspace = PIPSIZ; -u_int unpsq_recvspace = PIPSIZ; -u_int unpdg_sendspace = 2*1024; /* really max datagram size */ -u_int unpdg_recvspace = 16*1024; +u_int unpst_sendspace = PIPSIZ; /* [a] */ +u_int unpst_recvspace = PIPSIZ; /* [a] */ +u_int unpsq_sendspace = PIPSIZ; /* [a] */ +u_int unpsq_recvspace = PIPSIZ; /* [a] */ +u_int unpdg_sendspace = 2*1024; /* [a] really max datagram size */ +u_int unpdg_recvspace = 16*1024; /* [a] */ const struct sysctl_bounded_args unpstctl_vars[] = { { UNPCTL_RECVSPACE, &unpst_recvspace, 0, SB_MAX }, @@ -267,15 +267,21 @@ uipc_attach(struct socket *so, int proto, int wait) switch (so->so_type) { case SOCK_STREAM: - error = soreserve(so, unpst_sendspace, unpst_recvspace); + error = soreserve(so, + atomic_load_int(&unpst_sendspace), + atomic_load_int(&unpst_recvspace)); break; case SOCK_SEQPACKET: - error = soreserve(so, unpsq_sendspace, unpsq_recvspace); + error = soreserve(so, + atomic_load_int(&unpsq_sendspace), + atomic_load_int(&unpsq_recvspace)); break; case SOCK_DGRAM: - error = soreserve(so, unpdg_sendspace, unpdg_recvspace); + error = soreserve(so, + atomic_load_int(&unpdg_sendspace), + atomic_load_int(&unpdg_recvspace)); break; default: diff --git a/sys/net/pf.c b/sys/net/pf.c index 378bafc21..a5eac9edb 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.1203 2024/07/14 18:53:39 bluhm Exp $ */ +/* $OpenBSD: pf.c,v 1.1204 2024/08/06 16:56:09 bluhm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -7978,7 +7978,7 @@ done: action = PF_DROP; goto out; } - if (ip_directedbcast) + if (atomic_load_int(&ip_directedbcast)) SET(flags, IP_ALLOWBROADCAST); ip_forward(pd.m, ifp, NULL, flags); } else diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 46e352610..5a2ae6936 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.400 2024/07/19 16:58:31 bluhm Exp $ */ +/* $OpenBSD: ip_input.c,v 1.401 2024/08/06 16:56:09 bluhm Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -99,7 +99,7 @@ int ip_dosourceroute = 0; int ip_defttl = IPDEFTTL; int ip_mtudisc = 1; int ip_mtudisc_timeout = IPMTUDISCTIMEOUT; -int ip_directedbcast = 0; +int ip_directedbcast = 0; /* [a] */ /* Protects `ipq' and `ip_frags'. */ struct mutex ipq_mutex = MUTEX_INITIALIZER(IPL_SOFTNET); @@ -114,6 +114,7 @@ int ip_frags = 0; const struct sysctl_bounded_args ipctl_vars_unlocked[] = { { IPCTL_FORWARDING, &ip_forwarding, 0, 2 }, { IPCTL_SENDREDIRECTS, &ip_sendredirects, 0, 1 }, + { IPCTL_DIRECTEDBCAST, &ip_directedbcast, 0, 1 }, }; const struct sysctl_bounded_args ipctl_vars[] = { @@ -121,7 +122,6 @@ const struct sysctl_bounded_args ipctl_vars[] = { { IPCTL_MRTPROTO, &ip_mrtproto, SYSCTL_INT_READONLY }, #endif { IPCTL_DEFTTL, &ip_defttl, 0, 255 }, - { IPCTL_DIRECTEDBCAST, &ip_directedbcast, 0, 1 }, { IPCTL_IPPORT_FIRSTAUTO, &ipport_firstauto, 0, 65535 }, { IPCTL_IPPORT_LASTAUTO, &ipport_lastauto, 0, 65535 }, { IPCTL_IPPORT_HIFIRSTAUTO, &ipport_hifirstauto, 0, 65535 }, @@ -483,7 +483,7 @@ ip_input_if(struct mbuf **mp, int *offp, int nxt, int af, struct ifnet *ifp) SET(flags, IP_FORWARDING); break; } - if (ip_directedbcast) + if (atomic_load_int(&ip_directedbcast)) SET(flags, IP_ALLOWBROADCAST); hlen = ip->ip_hl << 2; @@ -1805,6 +1805,7 @@ ip_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, return (error); case IPCTL_FORWARDING: case IPCTL_SENDREDIRECTS: + case IPCTL_DIRECTEDBCAST: return (sysctl_bounded_arr( ipctl_vars_unlocked, nitems(ipctl_vars_unlocked), name, namelen, oldp, oldlenp, newp, newlen)); diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 15a048e40..4638f3727 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.323 2024/07/20 17:26:19 mvs Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.324 2024/08/06 20:15:53 mvs Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -112,15 +112,20 @@ #include #endif +/* + * Locks used to protect data: + * a atomic + */ + /* * UDP protocol implementation. * Per RFC 768, August, 1980. */ -int udpcksum = 1; +int udpcksum = 1; /* [a] */ -u_int udp_sendspace = 9216; /* really max datagram size */ +u_int udp_sendspace = 9216; /* [a] really max datagram size */ u_int udp_recvspace = 40 * (1024 + sizeof(struct sockaddr_in)); - /* 40 1K datagrams */ + /* [a] 40 1K datagrams */ const struct pr_usrreqs udp_usrreqs = { .pru_attach = udp_attach, @@ -1063,7 +1068,7 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct mbuf *addr, ((struct ip *)ui)->ip_len = htons(sizeof (struct udpiphdr) + len); ((struct ip *)ui)->ip_ttl = inp->inp_ip.ip_ttl; ((struct ip *)ui)->ip_tos = inp->inp_ip.ip_tos; - if (udpcksum) + if (atomic_load_int(&udpcksum)) m->m_pkthdr.csum_flags |= M_UDP_CSUM_OUT; udpstat_inc(udps_opackets); @@ -1098,7 +1103,8 @@ udp_attach(struct socket *so, int proto, int wait) if (so->so_pcb != NULL) return EINVAL; - if ((error = soreserve(so, udp_sendspace, udp_recvspace))) + if ((error = soreserve(so, atomic_load_int(&udp_sendspace), + atomic_load_int(&udp_recvspace)))) return error; NET_ASSERT_LOCKED(); @@ -1285,10 +1291,8 @@ udp_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, return (udp_sysctl_udpstat(oldp, oldlenp, newp)); default: - NET_LOCK(); error = sysctl_bounded_arr(udpctl_vars, nitems(udpctl_vars), name, namelen, oldp, oldlenp, newp, newlen); - NET_UNLOCK(); return (error); } /* NOTREACHED */ diff --git a/sys/sys/event.h b/sys/sys/event.h index 20cca20bc..ca530a2bd 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -1,4 +1,4 @@ -/* $OpenBSD: event.h,v 1.72 2024/07/29 12:42:53 claudio Exp $ */ +/* $OpenBSD: event.h,v 1.73 2024/08/06 08:44:54 claudio Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon @@ -294,6 +294,7 @@ extern void knote(struct klist *list, long hint); extern void knote_locked(struct klist *list, long hint); extern void knote_fdclose(struct proc *p, int fd); extern void knote_processexit(struct process *); +extern void knote_processfork(struct process *, pid_t); extern void knote_assign(const struct kevent *, struct knote *); extern void knote_submit(struct knote *, struct kevent *); extern void kqueue_init(void); diff --git a/sys/sys/param.h b/sys/sys/param.h index 1d2d72040..8868eafbd 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.142 2024/02/17 16:13:24 deraadt Exp $ */ +/* $OpenBSD: param.h,v 1.143 2024/08/07 15:59:25 deraadt Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -41,8 +41,8 @@ #define BSD4_3 1 #define BSD4_4 1 -#define SecBSD 202404 /* SecBSD version (year & month). */ -#define SecBSD1_5 1 /* SecBSD 1.5 */ +#define SecBSD 202410 /* SecBSD version (year & month). */ +#define SecBSD1_6 1 /* SecBSD 1.6 */ #include diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 9274b210a..e0f6aa0cb 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.366 2024/07/29 09:49:49 claudio Exp $ */ +/* $OpenBSD: proc.h,v 1.367 2024/08/06 08:44:54 claudio Exp $ */ /* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */ /*- @@ -136,6 +136,7 @@ struct pinsyscall { * K kernel lock * m this process' `ps_mtx' * p this process' `ps_lock' + * Q kqueue_ps_list_lock * R rlimit_lock * S scheduler lock * T itimer_mtx @@ -181,7 +182,7 @@ struct process { /* The following fields are all zeroed upon creation in process_new. */ #define ps_startzero ps_klist - struct klist ps_klist; /* knotes attached to this process */ + struct klist ps_klist; /* [Q,m] knotes attached to process */ u_int ps_flags; /* [a] PS_* flags. */ int ps_siglist; /* Signals pending for the process. */ diff --git a/usr.bin/make/timestamp.c b/usr.bin/make/timestamp.c index 38c47533c..a26d6dff9 100644 --- a/usr.bin/make/timestamp.c +++ b/usr.bin/make/timestamp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: timestamp.c,v 1.12 2024/04/09 15:08:21 cheloha Exp $ */ +/* $OpenBSD: timestamp.c,v 1.13 2024/08/06 04:59:18 gnezdo Exp $ */ /* * Copyright (c) 2001 Marc Espie. @@ -24,7 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include +#include #include #include #include "defines.h" diff --git a/usr.bin/signify/signify.1 b/usr.bin/signify/signify.1 index a1056a22c..933405cdc 100644 --- a/usr.bin/signify/signify.1 +++ b/usr.bin/signify/signify.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: signify.1,v 1.59 2024/03/02 23:38:00 benno Exp $ +.\" $OpenBSD: signify.1,v 1.60 2024/08/07 15:59:25 deraadt Exp $ .\" .\"Copyright (c) 2013 Marc Espie .\"Copyright (c) 2013 Ted Unangst @@ -14,7 +14,7 @@ .\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.Dd $Mdocdate: March 2 2024 $ +.Dd $Mdocdate: August 7 2024 $ .Dt SIGNIFY 1 .Os .Sh NAME @@ -171,12 +171,12 @@ Verify a release directory containing .Pa SHA256.sig and a full set of release files: .Bd -literal -offset indent -compact -$ signify -C -p /etc/signify/secbsd-15-base.pub -x SHA256.sig +$ signify -C -p /etc/signify/secbsd-16-base.pub -x SHA256.sig .Ed .Pp Verify a bsd.rd before an upgrade: .Bd -literal -offset indent -compact -$ signify -C -p /etc/signify/secbsd-15-base.pub -x SHA256.sig bsd.rd +$ signify -C -p /etc/signify/secbsd-16-base.pub -x SHA256.sig bsd.rd .Ed .Pp Sign a gzip archive: diff --git a/usr.sbin/radiusd/radiusd_ipcp.8 b/usr.sbin/radiusd/radiusd_ipcp.8 index 2647ad13a..71684ef1b 100644 --- a/usr.sbin/radiusd/radiusd_ipcp.8 +++ b/usr.sbin/radiusd/radiusd_ipcp.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: radiusd_ipcp.8,v 1.5 2024/08/04 03:56:57 yasuoka Exp $ +.\" $OpenBSD: radiusd_ipcp.8,v 1.6 2024/08/07 07:15:18 yasuoka Exp $ .\" .\" Copyright (c) 2024 Internet Initiative Japan Inc. .\" @@ -16,7 +16,7 @@ .\" .\" The following requests are required for all man pages. .\" -.Dd $Mdocdate: August 4 2024 $ +.Dd $Mdocdate: August 7 2024 $ .Dt RADIUSD_IPCP 8 .Os .Sh NAME @@ -82,7 +82,7 @@ disconnects the session through DAE at the specified time after starting. When .Dq radius is specified, -the value of the Session-Timeout attribute in Access-Accepted is used for +the value of the Session-Timeout attribute in Access-Accept is used for the timeout. Configure .Ic dae server