sync with OpenBSD -current
This commit is contained in:
parent
492219ffd1
commit
087a435dae
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: options.c,v 1.114 2024/04/17 18:12:12 jca Exp $ */
|
||||
/* $OpenBSD: options.c,v 1.115 2024/05/10 20:28:31 millert Exp $ */
|
||||
/* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
@ -277,21 +277,20 @@ options(int argc, char **argv)
|
||||
if (strcmp(NM_TAR, argv0) == 0) {
|
||||
op_mode = OP_TAR;
|
||||
tar_options(argc, argv);
|
||||
return;
|
||||
}
|
||||
#ifndef NOCPIO
|
||||
else if (strcmp(NM_CPIO, argv0) == 0) {
|
||||
} else if (strcmp(NM_CPIO, argv0) == 0) {
|
||||
op_mode = OP_CPIO;
|
||||
cpio_options(argc, argv);
|
||||
return;
|
||||
}
|
||||
#endif /* !NOCPIO */
|
||||
/*
|
||||
* assume pax as the default
|
||||
*/
|
||||
argv0 = NM_PAX;
|
||||
op_mode = OP_PAX;
|
||||
pax_options(argc, argv);
|
||||
} else {
|
||||
argv0 = NM_PAX;
|
||||
op_mode = OP_PAX;
|
||||
pax_options(argc, argv);
|
||||
}
|
||||
|
||||
/* Line-buffer the file list output as needed. */
|
||||
if (listf != stderr)
|
||||
setvbuf(listf, NULL, _IOLBF, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dsa_key.c,v 1.35 2023/08/03 18:53:55 tb Exp $ */
|
||||
/* $OpenBSD: dsa_key.c,v 1.36 2024/05/10 04:53:55 tb Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -69,24 +69,16 @@
|
||||
#include "bn_local.h"
|
||||
#include "dsa_local.h"
|
||||
|
||||
static int dsa_builtin_keygen(DSA *dsa);
|
||||
|
||||
int
|
||||
DSA_generate_key(DSA *dsa)
|
||||
{
|
||||
if (dsa->meth->dsa_keygen)
|
||||
return dsa->meth->dsa_keygen(dsa);
|
||||
return dsa_builtin_keygen(dsa);
|
||||
}
|
||||
LCRYPTO_ALIAS(DSA_generate_key);
|
||||
|
||||
static int
|
||||
dsa_builtin_keygen(DSA *dsa)
|
||||
{
|
||||
BIGNUM *pub_key = NULL, *priv_key = NULL;
|
||||
BN_CTX *ctx = NULL;
|
||||
int ok = 0;
|
||||
|
||||
if (dsa->meth->dsa_keygen != NULL)
|
||||
return dsa->meth->dsa_keygen(dsa);
|
||||
|
||||
if ((priv_key = BN_new()) == NULL)
|
||||
goto err;
|
||||
if ((pub_key = BN_new()) == NULL)
|
||||
@ -117,4 +109,6 @@ dsa_builtin_keygen(DSA *dsa)
|
||||
|
||||
return ok;
|
||||
}
|
||||
LCRYPTO_ALIAS(DSA_generate_key);
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ec_ameth.c,v 1.67 2024/04/18 11:56:53 tb Exp $ */
|
||||
/* $OpenBSD: ec_ameth.c,v 1.68 2024/05/10 05:12:03 tb Exp $ */
|
||||
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
||||
* project 2006.
|
||||
*/
|
||||
@ -173,6 +173,7 @@ eckey_from_object(const ASN1_OBJECT *aobj, EC_KEY **out_eckey)
|
||||
{
|
||||
int nid;
|
||||
|
||||
EC_KEY_free(*out_eckey);
|
||||
*out_eckey = NULL;
|
||||
|
||||
if ((nid = OBJ_obj2nid(aobj)) == NID_undef)
|
||||
@ -206,6 +207,7 @@ eckey_to_params(EC_KEY *eckey, int *out_type, void **out_val)
|
||||
static int
|
||||
eckey_from_params(int ptype, const void *pval, EC_KEY **out_eckey)
|
||||
{
|
||||
EC_KEY_free(*out_eckey);
|
||||
*out_eckey = NULL;
|
||||
|
||||
if (ptype == V_ASN1_SEQUENCE)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kvm_proc.c,v 1.63 2022/02/22 17:35:01 deraadt Exp $ */
|
||||
/* $OpenBSD: kvm_proc.c,v 1.64 2024/05/10 06:46:14 asou Exp $ */
|
||||
/* $NetBSD: kvm_proc.c,v 1.30 1999/03/24 05:50:50 mrg Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -187,7 +187,7 @@ _kvm_ureadm(kvm_t *kd, const struct kinfo_proc *p, u_long va, u_long *cnt)
|
||||
*/
|
||||
if (KREAD(kd, (u_long)p->p_vmspace, &vm))
|
||||
return (NULL);
|
||||
addr = (u_long)&vm.vm_map.addr.rbh_root.rbt_root;
|
||||
addr = (u_long)vm.vm_map.addr.rbh_root.rbt_root;
|
||||
while (1) {
|
||||
if (addr == 0)
|
||||
return (NULL);
|
||||
@ -228,7 +228,7 @@ _kvm_ureadm(kvm_t *kd, const struct kinfo_proc *p, u_long va, u_long *cnt)
|
||||
return (NULL);
|
||||
|
||||
if (_kvm_pread(kd, kd->pmfd, (void *)kd->swapspc,
|
||||
(size_t)kd->nbpg, (off_t)pg.phys_addr) != kd->nbpg)
|
||||
(size_t)kd->nbpg, _kvm_pa2off(kd, pg.phys_addr)) != kd->nbpg)
|
||||
return (NULL);
|
||||
} else {
|
||||
if (kd->swfd == -1 ||
|
||||
@ -432,21 +432,20 @@ static char **
|
||||
kvm_doargv(kvm_t *kd, const struct kinfo_proc *p, int nchr, int isenv,
|
||||
void (*info)(struct ps_strings *, u_long *, int *))
|
||||
{
|
||||
static struct ps_strings *ps;
|
||||
struct proc pp;
|
||||
struct process pr;
|
||||
struct ps_strings *ps;
|
||||
struct ps_strings arginfo;
|
||||
u_long addr;
|
||||
char **ap;
|
||||
int cnt;
|
||||
|
||||
if (ps == NULL) {
|
||||
struct _ps_strings _ps;
|
||||
const int mib[2] = { CTL_VM, VM_PSSTRINGS };
|
||||
size_t len;
|
||||
|
||||
len = sizeof(_ps);
|
||||
sysctl(mib, 2, &_ps, &len, NULL, 0);
|
||||
ps = (struct ps_strings *)_ps.val;
|
||||
}
|
||||
/* get ps_strings address */
|
||||
if (KREAD(kd, (u_long)p->p_paddr, &pp))
|
||||
return (0);
|
||||
if (KREAD(kd, (u_long)pp.p_p, &pr))
|
||||
return (0);
|
||||
ps = (struct ps_strings *)pr.ps_strings;
|
||||
|
||||
/*
|
||||
* Pointers are stored at the top of the user stack.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: s3_lib.c,v 1.251 2024/03/02 11:46:55 tb Exp $ */
|
||||
/* $OpenBSD: s3_lib.c,v 1.252 2024/05/10 05:08:05 tb Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -168,13 +168,6 @@
|
||||
|
||||
#define SSL3_NUM_CIPHERS (sizeof(ssl3_ciphers) / sizeof(SSL_CIPHER))
|
||||
|
||||
/*
|
||||
* FIXED_NONCE_LEN is a macro that provides in the correct value to set the
|
||||
* fixed nonce length in algorithms2. It is the inverse of the
|
||||
* SSL_CIPHER_AEAD_FIXED_NONCE_LEN macro.
|
||||
*/
|
||||
#define FIXED_NONCE_LEN(x) (((x / 2) & 0xf) << 24)
|
||||
|
||||
/* list of available SSLv3 ciphers (sorted by id) */
|
||||
const SSL_CIPHER ssl3_ciphers[] = {
|
||||
|
||||
@ -644,9 +637,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
|
||||
FIXED_NONCE_LEN(4)|
|
||||
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
|
||||
.strength_bits = 128,
|
||||
.alg_bits = 128,
|
||||
},
|
||||
@ -662,9 +653,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384|
|
||||
FIXED_NONCE_LEN(4)|
|
||||
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384,
|
||||
.strength_bits = 256,
|
||||
.alg_bits = 256,
|
||||
},
|
||||
@ -680,9 +669,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
|
||||
FIXED_NONCE_LEN(4)|
|
||||
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
|
||||
.strength_bits = 128,
|
||||
.alg_bits = 128,
|
||||
},
|
||||
@ -698,9 +685,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384|
|
||||
FIXED_NONCE_LEN(4)|
|
||||
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384,
|
||||
.strength_bits = 256,
|
||||
.alg_bits = 256,
|
||||
},
|
||||
@ -716,9 +701,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
|
||||
FIXED_NONCE_LEN(4)|
|
||||
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
|
||||
.strength_bits = 128,
|
||||
.alg_bits = 128,
|
||||
},
|
||||
@ -734,9 +717,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384|
|
||||
FIXED_NONCE_LEN(4)|
|
||||
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384,
|
||||
.strength_bits = 256,
|
||||
.alg_bits = 256,
|
||||
},
|
||||
@ -1215,9 +1196,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
|
||||
FIXED_NONCE_LEN(4)|
|
||||
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
|
||||
.strength_bits = 128,
|
||||
.alg_bits = 128,
|
||||
},
|
||||
@ -1233,9 +1212,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384|
|
||||
FIXED_NONCE_LEN(4)|
|
||||
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384,
|
||||
.strength_bits = 256,
|
||||
.alg_bits = 256,
|
||||
},
|
||||
@ -1251,9 +1228,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
|
||||
FIXED_NONCE_LEN(4)|
|
||||
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
|
||||
.strength_bits = 128,
|
||||
.alg_bits = 128,
|
||||
},
|
||||
@ -1269,9 +1244,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384|
|
||||
FIXED_NONCE_LEN(4)|
|
||||
SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA384|TLS1_PRF_SHA384,
|
||||
.strength_bits = 256,
|
||||
.alg_bits = 256,
|
||||
},
|
||||
@ -1287,8 +1260,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
|
||||
FIXED_NONCE_LEN(12),
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
|
||||
.strength_bits = 256,
|
||||
.alg_bits = 256,
|
||||
},
|
||||
@ -1304,8 +1276,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
|
||||
FIXED_NONCE_LEN(12),
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
|
||||
.strength_bits = 256,
|
||||
.alg_bits = 256,
|
||||
},
|
||||
@ -1321,8 +1292,7 @@ const SSL_CIPHER ssl3_ciphers[] = {
|
||||
.algorithm_mac = SSL_AEAD,
|
||||
.algorithm_ssl = SSL_TLSV1_2,
|
||||
.algo_strength = SSL_HIGH,
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256|
|
||||
FIXED_NONCE_LEN(12),
|
||||
.algorithm2 = SSL_HANDSHAKE_MAC_SHA256|TLS1_PRF_SHA256,
|
||||
.strength_bits = 256,
|
||||
.alg_bits = 256,
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ssl_local.h,v 1.14 2024/03/26 03:44:11 beck Exp $ */
|
||||
/* $OpenBSD: ssl_local.h,v 1.15 2024/05/10 05:08:05 tb Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -262,20 +262,6 @@ __BEGIN_HIDDEN_DECLS
|
||||
#define TLS1_PRF_SHA384 (SSL_HANDSHAKE_MAC_SHA384 << TLS1_PRF_DGST_SHIFT)
|
||||
#define TLS1_PRF (TLS1_PRF_MD5 | TLS1_PRF_SHA1)
|
||||
|
||||
/*
|
||||
* SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD is an algorithm2 flag that
|
||||
* indicates that the variable part of the nonce is included as a prefix of
|
||||
* the record (AES-GCM, for example, does this with an 8-byte variable nonce.)
|
||||
*/
|
||||
#define SSL_CIPHER_ALGORITHM2_VARIABLE_NONCE_IN_RECORD (1 << 22)
|
||||
|
||||
/*
|
||||
* SSL_CIPHER_AEAD_FIXED_NONCE_LEN returns the number of bytes of fixed nonce
|
||||
* for an SSL_CIPHER with an algorithm_mac of SSL_AEAD.
|
||||
*/
|
||||
#define SSL_CIPHER_AEAD_FIXED_NONCE_LEN(ssl_cipher) \
|
||||
(((ssl_cipher->algorithm2 >> 24) & 0xf) * 2)
|
||||
|
||||
/*
|
||||
* Cipher strength information.
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: resolver.c,v 1.164 2024/02/25 10:13:09 florian Exp $ */
|
||||
/* $OpenBSD: resolver.c,v 1.165 2024/05/10 15:02:26 florian Exp $ */
|
||||
|
||||
|
||||
/*
|
||||
@ -1211,6 +1211,7 @@ static const struct {
|
||||
{ "target-fetch-policy:", "0 0 0 0 0" },
|
||||
{ "outgoing-range:", "64" },
|
||||
{ "val-max-restart:", "0" },
|
||||
{ "infra-keep-probing", "yes" },
|
||||
};
|
||||
|
||||
struct uw_resolver *
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: hid.c,v 1.6 2023/08/12 20:47:06 miod Exp $ */
|
||||
/* $OpenBSD: hid.c,v 1.7 2024/05/10 10:49:10 mglocker Exp $ */
|
||||
/* $NetBSD: hid.c,v 1.23 2002/07/11 21:14:25 augustss Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */
|
||||
|
||||
@ -691,7 +691,7 @@ hid_get_id_of_collection(const void *desc, int size, int32_t usage,
|
||||
|
||||
hd = hid_start_parse(desc, size, hid_all);
|
||||
|
||||
DPRINTF("%s: id=%d usage=0x%x\n", __func__, id, usage);
|
||||
DPRINTF("%s: usage=0x%x\n", __func__, usage);
|
||||
while (hid_get_item(hd, &hi)) {
|
||||
DPRINTF("%s: kind=%d id=%d usage=0x%x(0x%x)\n", __func__,
|
||||
hi.kind, hi.report_ID, hi.usage, usage);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: hidms.c,v 1.10 2023/08/12 20:47:06 miod Exp $ */
|
||||
/* $OpenBSD: hidms.c,v 1.11 2024/05/10 10:49:10 mglocker Exp $ */
|
||||
/* $NetBSD: ums.c,v 1.60 2003/03/11 16:44:00 augustss Exp $ */
|
||||
|
||||
/*
|
||||
@ -79,14 +79,14 @@ hidms_stylus_hid_parse(struct hidms *ms, struct hid_data *d,
|
||||
switch (h.usage) {
|
||||
/* Buttons */
|
||||
case HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_TIP_SWITCH):
|
||||
DPRINTF("Stylus usage tip set\n");
|
||||
DPRINTF(("Stylus usage tip set\n"));
|
||||
if (ms->sc_num_stylus_buttons >= MAX_BUTTONS)
|
||||
break;
|
||||
loc_stylus_btn[ms->sc_num_stylus_buttons++] = h.loc;
|
||||
ms->sc_flags |= HIDMS_TIP;
|
||||
break;
|
||||
case HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_BARREL_SWITCH):
|
||||
DPRINTF("Stylus usage barrel set\n");
|
||||
DPRINTF(("Stylus usage barrel set\n"));
|
||||
if (ms->sc_num_stylus_buttons >= MAX_BUTTONS)
|
||||
break;
|
||||
loc_stylus_btn[ms->sc_num_stylus_buttons++] = h.loc;
|
||||
@ -94,48 +94,48 @@ hidms_stylus_hid_parse(struct hidms *ms, struct hid_data *d,
|
||||
break;
|
||||
case HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS,
|
||||
HUD_SECONDARY_BARREL_SWITCH):
|
||||
DPRINTF("Stylus usage secondary barrel set\n");
|
||||
DPRINTF(("Stylus usage secondary barrel set\n"));
|
||||
if (ms->sc_num_stylus_buttons >= MAX_BUTTONS)
|
||||
break;
|
||||
loc_stylus_btn[ms->sc_num_stylus_buttons++] = h.loc;
|
||||
ms->sc_flags |= HIDMS_SEC_BARREL;
|
||||
break;
|
||||
case HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_IN_RANGE):
|
||||
DPRINTF("Stylus usage in range set\n");
|
||||
DPRINTF(("Stylus usage in range set\n"));
|
||||
if (ms->sc_num_stylus_buttons >= MAX_BUTTONS)
|
||||
break;
|
||||
loc_stylus_btn[ms->sc_num_stylus_buttons++] = h.loc;
|
||||
break;
|
||||
case HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_QUALITY):
|
||||
DPRINTF("Stylus usage quality set\n");
|
||||
DPRINTF(("Stylus usage quality set\n"));
|
||||
if (ms->sc_num_stylus_buttons >= MAX_BUTTONS)
|
||||
break;
|
||||
loc_stylus_btn[ms->sc_num_stylus_buttons++] = h.loc;
|
||||
break;
|
||||
/* Axes */
|
||||
case HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_WACOM_X):
|
||||
DPRINTF("Stylus usage x set\n");
|
||||
DPRINTF(("Stylus usage x set\n"));
|
||||
ms->sc_loc_x = h.loc;
|
||||
ms->sc_tsscale.minx = h.logical_minimum;
|
||||
ms->sc_tsscale.maxx = h.logical_maximum;
|
||||
ms->sc_flags |= HIDMS_ABSX;
|
||||
break;
|
||||
case HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_WACOM_Y):
|
||||
DPRINTF("Stylus usage y set\n");
|
||||
DPRINTF(("Stylus usage y set\n"));
|
||||
ms->sc_loc_y = h.loc;
|
||||
ms->sc_tsscale.miny = h.logical_minimum;
|
||||
ms->sc_tsscale.maxy = h.logical_maximum;
|
||||
ms->sc_flags |= HIDMS_ABSY;
|
||||
break;
|
||||
case HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_TIP_PRESSURE):
|
||||
DPRINTF("Stylus usage pressure set\n");
|
||||
DPRINTF(("Stylus usage pressure set\n"));
|
||||
ms->sc_loc_z = h.loc;
|
||||
ms->sc_tsscale.minz = h.logical_minimum;
|
||||
ms->sc_tsscale.maxz = h.logical_maximum;
|
||||
ms->sc_flags |= HIDMS_Z;
|
||||
break;
|
||||
case HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_WACOM_DISTANCE):
|
||||
DPRINTF("Stylus usage distance set\n");
|
||||
DPRINTF(("Stylus usage distance set\n"));
|
||||
ms->sc_loc_w = h.loc;
|
||||
ms->sc_tsscale.minw = h.logical_minimum;
|
||||
ms->sc_tsscale.maxw = h.logical_maximum;
|
||||
@ -189,19 +189,19 @@ hidms_wacom_setup(struct device *self, struct hidms *ms, void *desc, int dlen)
|
||||
if ((hd = hid_get_collection_data(desc, dlen,
|
||||
HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_DIGITIZER),
|
||||
HCOLL_APPLICATION))) {
|
||||
DPRINTF("found the global collection\n");
|
||||
DPRINTF(("found the global collection\n"));
|
||||
hid_end_parse(hd);
|
||||
if ((hd = hid_get_collection_data(desc, dlen,
|
||||
HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_STYLUS),
|
||||
HCOLL_PHYSICAL))) {
|
||||
DPRINTF("found stylus collection\n");
|
||||
DPRINTF(("found stylus collection\n"));
|
||||
hidms_stylus_hid_parse(ms, hd, loc_stylus_btn);
|
||||
hid_end_parse(hd);
|
||||
}
|
||||
if ((hd = hid_get_collection_data(desc, dlen,
|
||||
HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_TABLET_FKEYS),
|
||||
HCOLL_PHYSICAL))) {
|
||||
DPRINTF("found tablet keys collection\n");
|
||||
DPRINTF(("found tablet keys collection\n"));
|
||||
hidms_pad_buttons_hid_parse(ms, hd, loc_pad_btn);
|
||||
hid_end_parse(hd);
|
||||
}
|
||||
@ -209,7 +209,7 @@ hidms_wacom_setup(struct device *self, struct hidms *ms, void *desc, int dlen)
|
||||
if ((hd = hid_get_collection_data(desc, dlen,
|
||||
HID_USAGE2(HUP_WACOM | HUP_DIGITIZERS, HUD_WACOM_BATTERY),
|
||||
HCOLL_PHYSICAL))) {
|
||||
DPRINTF("found battery collection\n");
|
||||
DPRINTF(("found battery collection\n"));
|
||||
/* parse and set the battery info */
|
||||
/* not yet used */
|
||||
hid_end_parse(hd);
|
||||
@ -233,7 +233,7 @@ hidms_wacom_setup(struct device *self, struct hidms *ms, void *desc, int dlen)
|
||||
memcpy(&ms->sc_loc_btn[i], &loc_pad_btn[i],
|
||||
sizeof(struct hid_location));
|
||||
ms->sc_num_buttons = i;
|
||||
DPRINTF("Button information\n");
|
||||
DPRINTF(("Button information\n"));
|
||||
#ifdef HIDMS_DEBUG
|
||||
for (i = 0; i < ms->sc_num_buttons; i++)
|
||||
printf("size: 0x%x, pos: 0x%x, count: 0x%x\n",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: nvme.c,v 1.109 2024/04/15 14:25:10 krw Exp $ */
|
||||
/* $OpenBSD: nvme.c,v 1.110 2024/05/10 21:23:32 krw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
|
||||
@ -201,46 +201,28 @@ nvme_dumpregs(struct nvme_softc *sc)
|
||||
int
|
||||
nvme_ready(struct nvme_softc *sc, u_int32_t rdy)
|
||||
{
|
||||
u_int32_t csts;
|
||||
u_int i;
|
||||
u_int i = 0;
|
||||
|
||||
for (i = 0; i <= sc->sc_rdy_to; i++) {
|
||||
csts = nvme_read4(sc, NVME_CSTS);
|
||||
/* enable fails if fatal error, disable succeeds. */
|
||||
if (csts == 0xffffffff || ISSET(csts, NVME_CSTS_CFS))
|
||||
return (rdy == NVME_CSTS_RDY);
|
||||
|
||||
if ((csts & NVME_CSTS_RDY) == rdy)
|
||||
return (0);
|
||||
while ((nvme_read4(sc, NVME_CSTS) & NVME_CSTS_RDY) != rdy) {
|
||||
if (i++ > sc->sc_rdy_to)
|
||||
return (1);
|
||||
|
||||
delay(1000);
|
||||
nvme_barrier(sc, NVME_CSTS, 4, BUS_SPACE_BARRIER_READ);
|
||||
}
|
||||
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
nvme_enable(struct nvme_softc *sc)
|
||||
{
|
||||
u_int32_t cc, csts;
|
||||
u_int32_t cc;
|
||||
|
||||
cc = nvme_read4(sc, NVME_CC);
|
||||
if (cc != 0xffffffff && ISSET(cc, NVME_CC_EN))
|
||||
if (ISSET(cc, NVME_CC_EN))
|
||||
return (nvme_ready(sc, NVME_CSTS_RDY));
|
||||
|
||||
csts = nvme_read4(sc, NVME_CSTS);
|
||||
if (csts != 0xffffffff && ISSET(csts, NVME_CSTS_RDY)) {
|
||||
/*
|
||||
* Ensure CSTS.RDY is 0.
|
||||
*
|
||||
* Transitioning CC.EN from 0 to 1 when CSTS.RDY is 1
|
||||
* "has undefined results" says NVMe.
|
||||
*/
|
||||
if (nvme_ready(sc, 0))
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (sc->sc_ops->op_enable != NULL)
|
||||
sc->sc_ops->op_enable(sc);
|
||||
|
||||
@ -276,18 +258,10 @@ nvme_disable(struct nvme_softc *sc)
|
||||
u_int32_t cc, csts;
|
||||
|
||||
cc = nvme_read4(sc, NVME_CC);
|
||||
if (!ISSET(cc, NVME_CC_EN))
|
||||
return (nvme_ready(sc, 0));
|
||||
|
||||
csts = nvme_read4(sc, NVME_CSTS);
|
||||
if (!ISSET(csts, NVME_CSTS_RDY)) {
|
||||
/*
|
||||
* Ensure CSTS.RDY is 1.
|
||||
*
|
||||
* Transitioning CC.EN from 1 to 0 when CSTS.RDY is 0
|
||||
* "has undefined results" says NVMe.
|
||||
*/
|
||||
if (nvme_ready(sc, NVME_CSTS_RDY))
|
||||
if (ISSET(cc, NVME_CC_EN)) {
|
||||
csts = nvme_read4(sc, NVME_CSTS);
|
||||
if (!ISSET(csts, NVME_CSTS_CFS) &&
|
||||
nvme_ready(sc, NVME_CSTS_RDY) != 0)
|
||||
return (1);
|
||||
}
|
||||
|
||||
@ -539,8 +513,6 @@ nvme_shutdown(struct nvme_softc *sc)
|
||||
nvme_barrier(sc, 0, sc->sc_ios,
|
||||
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
||||
csts = nvme_read4(sc, NVME_CSTS);
|
||||
if (csts == 0xffffffff)
|
||||
break;
|
||||
if ((csts & NVME_CSTS_SHST_MASK) == NVME_CSTS_SHST_DONE)
|
||||
return (0);
|
||||
|
||||
@ -1001,7 +973,6 @@ nvme_poll(struct nvme_softc *sc, struct nvme_queue *q, struct nvme_ccb *ccb,
|
||||
void (*done)(struct nvme_softc *, struct nvme_ccb *, struct nvme_cqe *);
|
||||
void *cookie;
|
||||
int64_t us;
|
||||
u_int32_t csts;
|
||||
u_int16_t flags;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
@ -1017,11 +988,6 @@ nvme_poll(struct nvme_softc *sc, struct nvme_queue *q, struct nvme_ccb *ccb,
|
||||
for (us = ms * 1000; ms == 0 || us > 0; us -= NVME_TIMO_DELAYNS) {
|
||||
if (ISSET(state.c.flags, htole16(NVME_CQE_PHASE)))
|
||||
break;
|
||||
csts = nvme_read4(sc, NVME_CSTS);
|
||||
if (csts == 0xffffffff || ISSET(csts, NVME_CSTS_CFS)) {
|
||||
SET(state.c.flags, htole16(NVME_CQE_SC_INTERNAL_DEV_ERR));
|
||||
break;
|
||||
}
|
||||
if (nvme_q_complete(sc, q) == 0)
|
||||
delay(NVME_TIMO_DELAYNS);
|
||||
nvme_barrier(sc, NVME_CSTS, 4, BUS_SPACE_BARRIER_READ);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ufshci.c,v 1.19 2024/05/09 08:24:09 mglocker Exp $ */
|
||||
/* $OpenBSD: ufshci.c,v 1.20 2024/05/10 06:14:10 mglocker Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
|
||||
@ -42,8 +42,7 @@
|
||||
#include <dev/ic/ufshcivar.h>
|
||||
#include <dev/ic/ufshcireg.h>
|
||||
|
||||
//#define UFSHCI_DEBUG 1
|
||||
|
||||
//#define UFSHCI_DEBUG
|
||||
#ifdef UFSHCI_DEBUG
|
||||
int ufshci_dbglvl = 1;
|
||||
#define DPRINTF(x...) do { printf(x); } while (0)
|
||||
@ -174,7 +173,7 @@ ufshci_attach(struct ufshci_softc *sc)
|
||||
/* XXX: Using more than one slot currently causes OCS errors */
|
||||
sc->sc_nutrs = 1;
|
||||
|
||||
#if UFSHCI_DEBUG
|
||||
#ifdef UFSHCI_DEBUG
|
||||
printf("Capabilities (0x%08x):\n", sc->sc_cap);
|
||||
printf(" CS=%d\n", sc->sc_cap & UFSHCI_REG_CAP_CS ? 1 : 0);
|
||||
printf(" UICDMETMS=%d\n",
|
||||
@ -1653,10 +1652,8 @@ ufshci_scsi_io(struct scsi_xfer *xs, int dir)
|
||||
if ((xs->flags & (SCSI_DATA_IN | SCSI_DATA_OUT)) != dir)
|
||||
goto error1;
|
||||
|
||||
DPRINTF("%s: %s, lba=%llu, blocks=%u, datalen=%d (%s)\n",
|
||||
__func__,
|
||||
ISSET(xs->flags, SCSI_DATA_IN) ? "READ" : "WRITE",
|
||||
lba, blocks, xs->datalen,
|
||||
DPRINTF("%s: %s, datalen=%d (%s)\n", __func__,
|
||||
ISSET(xs->flags, SCSI_DATA_IN) ? "READ" : "WRITE", xs->datalen,
|
||||
ISSET(xs->flags, SCSI_POLL) ? "poll" : "no poll");
|
||||
|
||||
error = bus_dmamap_load(sc->sc_dmat, dmap, xs->data, xs->datalen, NULL,
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* $OpenBSD: init_sysent.c,v 1.279 2024/04/24 19:10:11 claudio Exp $ */
|
||||
/* $OpenBSD: init_sysent.c,v 1.280 2024/05/10 09:21:41 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* System call switch table.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from; OpenBSD: syscalls.master,v 1.262 2024/04/24 19:09:14 claudio Exp
|
||||
* created from; OpenBSD: syscalls.master,v 1.263 2024/05/10 09:21:01 claudio Exp
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -254,7 +254,7 @@ const struct sysent sysent[] = {
|
||||
sys_ppoll }, /* 109 = ppoll */
|
||||
{ 6, s(struct sys_pselect_args), SY_NOLOCK | 0,
|
||||
sys_pselect }, /* 110 = pselect */
|
||||
{ 1, s(struct sys_sigsuspend_args), 0,
|
||||
{ 1, s(struct sys_sigsuspend_args), SY_NOLOCK | 0,
|
||||
sys_sigsuspend }, /* 111 = sigsuspend */
|
||||
{ 3, s(struct sys_sendsyslog_args), SY_NOLOCK | 0,
|
||||
sys_sendsyslog }, /* 112 = sendsyslog */
|
||||
@ -695,7 +695,7 @@ const struct sysent sysent[] = {
|
||||
sys___thrwakeup }, /* 301 = __thrwakeup */
|
||||
{ 1, s(struct sys___threxit_args), 0,
|
||||
sys___threxit }, /* 302 = __threxit */
|
||||
{ 3, s(struct sys___thrsigdivert_args), 0,
|
||||
{ 3, s(struct sys___thrsigdivert_args), SY_NOLOCK | 0,
|
||||
sys___thrsigdivert }, /* 303 = __thrsigdivert */
|
||||
{ 2, s(struct sys___getcwd_args), 0,
|
||||
sys___getcwd }, /* 304 = __getcwd */
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* $OpenBSD: syscalls.c,v 1.277 2024/04/24 19:10:11 claudio Exp $ */
|
||||
/* $OpenBSD: syscalls.c,v 1.278 2024/05/10 09:21:41 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* System call names.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from; OpenBSD: syscalls.master,v 1.262 2024/04/24 19:09:14 claudio Exp
|
||||
* created from; OpenBSD: syscalls.master,v 1.263 2024/05/10 09:21:01 claudio Exp
|
||||
*/
|
||||
|
||||
const char *const syscallnames[] = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
; $OpenBSD: syscalls.master,v 1.262 2024/04/24 19:09:14 claudio Exp $
|
||||
; $OpenBSD: syscalls.master,v 1.263 2024/05/10 09:21:01 claudio Exp $
|
||||
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
|
||||
|
||||
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
|
||||
@ -234,7 +234,7 @@
|
||||
110 STD NOLOCK { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
|
||||
fd_set *ex, const struct timespec *ts, \
|
||||
const sigset_t *mask); }
|
||||
111 STD { int sys_sigsuspend(int mask); }
|
||||
111 STD NOLOCK { int sys_sigsuspend(int mask); }
|
||||
112 STD NOLOCK { int sys_sendsyslog(const char *buf, size_t nbyte, \
|
||||
int flags); }
|
||||
113 UNIMPL fktrace
|
||||
@ -525,7 +525,7 @@
|
||||
301 STD NOLOCK { int sys___thrwakeup(const volatile void *ident, \
|
||||
int n); }
|
||||
302 STD { void sys___threxit(pid_t *notdead); }
|
||||
303 STD { int sys___thrsigdivert(sigset_t sigmask, \
|
||||
303 STD NOLOCK { int sys___thrsigdivert(sigset_t sigmask, \
|
||||
siginfo_t *info, const struct timespec *timeout); }
|
||||
304 STD { int sys___getcwd(char *buf, size_t len); }
|
||||
305 STD NOLOCK { int sys_adjfreq(const int64_t *freq, \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pf.c,v 1.1194 2024/04/12 16:07:09 bluhm Exp $ */
|
||||
/* $OpenBSD: pf.c,v 1.1195 2024/05/10 03:50:12 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Daniel Hartmeier
|
||||
@ -239,7 +239,7 @@ int pf_src_connlimit(struct pf_state **);
|
||||
int pf_match_rcvif(struct mbuf *, struct pf_rule *);
|
||||
int pf_step_into_anchor(struct pf_test_ctx *,
|
||||
struct pf_rule *);
|
||||
int pf_match_rule(struct pf_test_ctx *,
|
||||
enum pf_test_status pf_match_rule(struct pf_test_ctx *,
|
||||
struct pf_ruleset *);
|
||||
void pf_counters_inc(int, struct pf_pdesc *,
|
||||
struct pf_state *, struct pf_rule *,
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* $OpenBSD: syscall.h,v 1.276 2024/04/24 19:10:11 claudio Exp $ */
|
||||
/* $OpenBSD: syscall.h,v 1.277 2024/05/10 09:21:41 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* System call numbers.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from; OpenBSD: syscalls.master,v 1.262 2024/04/24 19:09:14 claudio Exp
|
||||
* created from; OpenBSD: syscalls.master,v 1.263 2024/05/10 09:21:01 claudio Exp
|
||||
*/
|
||||
|
||||
/* syscall: "exit" ret: "void" args: "int" */
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* $OpenBSD: syscallargs.h,v 1.279 2024/04/24 19:10:11 claudio Exp $ */
|
||||
/* $OpenBSD: syscallargs.h,v 1.280 2024/05/10 09:21:41 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* System call argument lists.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from; OpenBSD: syscalls.master,v 1.262 2024/04/24 19:09:14 claudio Exp
|
||||
* created from; OpenBSD: syscalls.master,v 1.263 2024/05/10 09:21:01 claudio Exp
|
||||
*/
|
||||
|
||||
#ifdef syscallarg
|
||||
|
Loading…
Reference in New Issue
Block a user