sync with OpenBSD -current
This commit is contained in:
parent
60ea4113ce
commit
25aa71bc5f
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cms_enc.c,v 1.23 2023/07/08 08:26:26 beck Exp $ */
|
||||
/* $OpenBSD: cms_enc.c,v 1.24 2024/01/14 18:40:24 tb Exp $ */
|
||||
/*
|
||||
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
||||
* project.
|
||||
@ -61,7 +61,10 @@
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/cms.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#include "cms_local.h"
|
||||
#include "evp_local.h"
|
||||
#include "x509_local.h"
|
||||
|
||||
/* CMS EncryptedData Utilities */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cms_env.c,v 1.26 2023/07/08 08:26:26 beck Exp $ */
|
||||
/* $OpenBSD: cms_env.c,v 1.27 2024/01/14 18:40:24 tb Exp $ */
|
||||
/*
|
||||
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
||||
* project.
|
||||
@ -54,16 +54,17 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1t.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/cms.h>
|
||||
#include <openssl/aes.h>
|
||||
#include "cms_local.h"
|
||||
|
||||
#include "asn1/asn1_local.h"
|
||||
#include "cms_local.h"
|
||||
#include "evp/evp_local.h"
|
||||
#include "x509_local.h"
|
||||
|
||||
/* CMS EnvelopedData Utilities */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cms_ess.c,v 1.23 2023/07/08 08:26:26 beck Exp $ */
|
||||
/* $OpenBSD: cms_ess.c,v 1.24 2024/01/14 18:40:24 tb Exp $ */
|
||||
/*
|
||||
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
||||
* project.
|
||||
@ -54,15 +54,15 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1t.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/cms.h>
|
||||
#include "cms_local.h"
|
||||
|
||||
#include "cms_local.h"
|
||||
#include "x509_local.h"
|
||||
|
||||
CMS_ReceiptRequest *
|
||||
d2i_CMS_ReceiptRequest(CMS_ReceiptRequest **a, const unsigned char **in, long len)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cms_pwri.c,v 1.30 2023/12/20 18:38:19 tb Exp $ */
|
||||
/* $OpenBSD: cms_pwri.c,v 1.31 2024/01/14 18:40:24 tb Exp $ */
|
||||
/*
|
||||
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
||||
* project.
|
||||
@ -66,6 +66,7 @@
|
||||
|
||||
#include "cms_local.h"
|
||||
#include "evp_local.h"
|
||||
#include "x509_local.h"
|
||||
|
||||
int
|
||||
CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri, unsigned char *pass,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: loader.c,v 1.218 2023/12/19 16:13:22 deraadt Exp $ */
|
||||
/* $OpenBSD: loader.c,v 1.219 2024/01/14 09:39:03 kettenis Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
|
||||
@ -70,6 +70,7 @@ int _dl_trust __relro = 0;
|
||||
char **_dl_libpath __relro = NULL;
|
||||
const char **_dl_argv __relro = NULL;
|
||||
int _dl_argc __relro = 0;
|
||||
const char *_dl_libcname;
|
||||
|
||||
char *_dl_preload __boot_data = NULL;
|
||||
char *_dl_tracefmt1 __boot_data = NULL;
|
||||
@ -358,6 +359,31 @@ _dl_load_dep_libs(elf_object_t *object, int flags, int booting)
|
||||
if (dynp->d_tag == DT_NEEDED)
|
||||
liblist[loop++].dynp = dynp;
|
||||
|
||||
/*
|
||||
* We can't support multiple versions of libc
|
||||
* in a single process. So remember the first
|
||||
* libc SONAME we encounter as a dependency
|
||||
* and use it in further loads of libc. In
|
||||
* practice this means we will always use the
|
||||
* libc version that the binary was linked
|
||||
* against. This isn't entirely correct, but
|
||||
* it will keep most binaries running when
|
||||
* transitioning over a libc major bump.
|
||||
*/
|
||||
if (_dl_libcname == NULL) {
|
||||
for (loop = 0; loop < libcount; loop++) {
|
||||
const char *libname;
|
||||
libname = dynobj->dyn.strtab;
|
||||
libname +=
|
||||
liblist[loop].dynp->d_un.d_val;
|
||||
if (_dl_strncmp(libname,
|
||||
"libc.so.", 8) == 0) {
|
||||
_dl_libcname = libname;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Randomize these */
|
||||
for (loop = 0; loop < libcount; loop++)
|
||||
randomlist[loop] = loop;
|
||||
@ -380,6 +406,10 @@ _dl_load_dep_libs(elf_object_t *object, int flags, int booting)
|
||||
liblist[randomlist[loop]].dynp->d_un.d_val;
|
||||
DL_DEB(("loading: %s required by %s\n", libname,
|
||||
dynobj->load_name));
|
||||
if (_dl_strncmp(libname, "libc.so.", 8) == 0) {
|
||||
if (_dl_libcname)
|
||||
libname = _dl_libcname;
|
||||
}
|
||||
depobj = _dl_load_shlib(libname, dynobj,
|
||||
OBJTYPE_LIB, depflags, nodelete);
|
||||
if (depobj == 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: sched.h,v 1.67 2023/10/24 13:20:11 claudio Exp $ */
|
||||
/* $OpenBSD: sched.h,v 1.69 2024/01/14 17:23:56 cheloha Exp $ */
|
||||
/* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */
|
||||
|
||||
/*-
|
||||
@ -69,8 +69,6 @@
|
||||
#ifndef _SYS_SCHED_H_
|
||||
#define _SYS_SCHED_H_
|
||||
|
||||
#include <sys/queue.h>
|
||||
|
||||
/*
|
||||
* Posix defines a <sched.h> which may want to include <sys/sched.h>
|
||||
*/
|
||||
@ -88,6 +86,17 @@
|
||||
#define CP_IDLE 5
|
||||
#define CPUSTATES 6
|
||||
|
||||
struct cpustats {
|
||||
uint64_t cs_time[CPUSTATES]; /* CPU state statistics */
|
||||
uint64_t cs_flags; /* see below */
|
||||
};
|
||||
|
||||
#define CPUSTATS_ONLINE 0x0001 /* CPU is schedulable */
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <sys/queue.h>
|
||||
|
||||
#define SCHED_NQS 32 /* 32 run queues. */
|
||||
|
||||
struct clockintr;
|
||||
@ -124,15 +133,6 @@ struct schedstate_percpu {
|
||||
u_char spc_smrgp; /* this CPU's view of grace period */
|
||||
};
|
||||
|
||||
struct cpustats {
|
||||
uint64_t cs_time[CPUSTATES]; /* CPU state statistics */
|
||||
uint64_t cs_flags; /* see below */
|
||||
};
|
||||
|
||||
#define CPUSTATS_ONLINE 0x0001 /* CPU is schedulable */
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
/* spc_flags */
|
||||
#define SPCF_SEENRR 0x0001 /* process has seen roundrobin() */
|
||||
#define SPCF_SHOULDYIELD 0x0002 /* process should yield the CPU */
|
||||
|
Loading…
Reference in New Issue
Block a user