From 4544ef4a2eb212a2a7c8e300df9c4a3081c611dc Mon Sep 17 00:00:00 2001 From: purplerain Date: Mon, 7 Oct 2024 03:45:05 +0000 Subject: [PATCH] sync with OpenBSD -current --- sys/arch/arm/arm/genassym.cf | 76 ++---------------------------------- sys/arch/i386/i386/apm.c | 3 +- sys/dev/pci/if_bnxt.c | 25 ++++++++++-- sys/kern/kern_pledge.c | 12 +----- usr.bin/ssh/myproposal.h | 8 ++-- usr.bin/ssh/sshd_config.5 | 9 ++--- 6 files changed, 35 insertions(+), 98 deletions(-) diff --git a/sys/arch/arm/arm/genassym.cf b/sys/arch/arm/arm/genassym.cf index c3c7d4f39..730277eb4 100644 --- a/sys/arch/arm/arm/genassym.cf +++ b/sys/arch/arm/arm/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.19 2024/10/04 19:00:27 miod Exp $ +# $OpenBSD: genassym.cf,v 1.20 2024/10/06 22:47:38 jsg Exp $ # $NetBSD: genassym.cf,v 1.27 2003/11/04 10:33:16 dsl Exp$ # Copyright (c) 1982, 1990 The Regents of the University of California. @@ -35,119 +35,49 @@ include include include include -include -include -include -include -include -include include include include -include +include include -include include include -export VM_MIN_ADDRESS -export VM_MAXUSER_ADDRESS +export PAGE_SIZE ifdef __ARM_FIQ_INDIRECT define __ARM_FIQ_INDIRECT 1 endif -export PMAP_DOMAIN_KERNEL - ifdef PMAP_INCLUDE_PTE_SYNC define PMAP_INCLUDE_PTE_SYNC 1 endif -export PAGE_SIZE -export UPAGES -export PAGE_SHIFT - export SONPROC struct proc member p_addr member p_cpu member p_stat -# XXX use PROC_SIZEOF in new code whenever possible -define PROCSIZE sizeof(struct proc) struct pcb -member pcb_tf member pcb_pagedir -member pcb_pl1vec -member pcb_l1vec -member pcb_dacr member pcb_cstate -member pcb_flags member PCB_R8 pcb_un.un_32.pcb32_r8 -member PCB_R9 pcb_un.un_32.pcb32_r9 -member PCB_R10 pcb_un.un_32.pcb32_r10 -member PCB_R11 pcb_un.un_32.pcb32_r11 -member PCB_R12 pcb_un.un_32.pcb32_r12 -member PCB_SP pcb_un.un_32.pcb32_sp -member PCB_LR pcb_un.un_32.pcb32_lr -member PCB_PC pcb_un.un_32.pcb32_pc member PCB_UND_SP pcb_un.un_32.pcb32_und_sp member pcb_onfault member pcb_tcb -# XXX use USER_SIZEOF in new code whenever possible -define USER_SIZE sizeof(struct user) - -struct uvmexp -member V_TRAP traps -member V_INTR intrs -member V_SOFT softs - -struct vmspace -member vm_map -member VM_PMAP vm_map.pmap - -union pmap_cache_state -member cs_tlb_id -member cs_tlb_d -member cs_tlb -member cs_cache_id -member cs_cache_d -member cs_cache -member cs_all - -struct pmap -member PMAP_CSTATE pm_cstate - -struct uprof -member pr_base -member pr_size -member pr_off -member pr_scale - -export SIGTRAP struct sigframe member SIGF_SC sf_sc -struct trapframe -member tf_r0 -member tf_r10 -member tf_pc -# XXX use TRAFRAME_SIZEOF in new code whenever possible -define TRAPFRAMESIZE sizeof(struct trapframe) - struct cpu_functions -member cf_icache_sync_all member cf_idcache_wbinv_all -member cf_dcache_wb_range -member cf_tlb_flushID_SE member cf_context_switch member cf_sleep -member cf_control struct cpu_info member ci_curproc diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c index 80abd4408..0516793c6 100644 --- a/sys/arch/i386/i386/apm.c +++ b/sys/arch/i386/i386/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.132 2023/07/02 19:02:27 cheloha Exp $ */ +/* $OpenBSD: apm.c,v 1.133 2024/10/07 01:31:22 jsg Exp $ */ /*- * Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved. @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/dev/pci/if_bnxt.c b/sys/dev/pci/if_bnxt.c index ac2e44a63..b411d22cf 100644 --- a/sys/dev/pci/if_bnxt.c +++ b/sys/dev/pci/if_bnxt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnxt.c,v 1.51 2024/06/26 01:40:49 jsg Exp $ */ +/* $OpenBSD: if_bnxt.c,v 1.52 2024/10/06 23:43:18 jmatthew Exp $ */ /*- * Broadcom NetXtreme-C/E network driver. * @@ -316,6 +316,7 @@ void bnxt_write_tx_doorbell(struct bnxt_softc *, struct bnxt_ring *, int); int bnxt_rx_fill(struct bnxt_queue *); +int bnxt_rx_fill_ag(struct bnxt_queue *); u_int bnxt_rx_fill_slots(struct bnxt_softc *, struct bnxt_ring *, void *, struct bnxt_slot *, uint *, int, uint16_t, u_int); void bnxt_refill(void *); @@ -955,6 +956,7 @@ bnxt_queue_up(struct bnxt_softc *sc, struct bnxt_queue *bq) rx->rx_ag_prod = 0; rx->rx_ag_cons = 0; bnxt_rx_fill(bq); + bnxt_rx_fill_ag(bq); tx->tx_cons = 0; tx->tx_prod = 0; @@ -1659,6 +1661,7 @@ bnxt_intr(void *xq) } bnxt_rx_fill(q); + bnxt_rx_fill_ag(q); if ((rx->rx_cons == rx->rx_prod) || (rx->rx_ag_cons == rx->rx_ag_prod)) timeout_add(&rx->rx_refill, 0); @@ -2233,6 +2236,17 @@ bnxt_rx_fill(struct bnxt_queue *q) } else rv = 1; + return (rv); +} + +int +bnxt_rx_fill_ag(struct bnxt_queue *q) +{ + struct bnxt_rx_queue *rx = &q->q_rx; + struct bnxt_softc *sc = q->q_sc; + u_int slots; + int rv = 0; + slots = if_rxr_get(&rx->rxr[1], rx->rx_ag_ring.ring_size); if (slots > 0) { slots = bnxt_rx_fill_slots(sc, &rx->rx_ag_ring, @@ -2253,9 +2267,14 @@ bnxt_refill(void *xq) struct bnxt_queue *q = xq; struct bnxt_rx_queue *rx = &q->q_rx; - bnxt_rx_fill(q); - if (rx->rx_cons == rx->rx_prod) + bnxt_rx_fill(q); + + if (rx->rx_ag_cons == rx->rx_ag_prod) + bnxt_rx_fill_ag(q); + + if ((rx->rx_cons == rx->rx_prod) || + (rx->rx_ag_cons == rx->rx_ag_prod)) timeout_add(&rx->rx_refill, 1); } diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 51d29d56c..89281cf0a 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.320 2024/09/24 02:22:42 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.321 2024/10/06 23:39:24 jsg Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -85,16 +85,6 @@ int parsepledges(struct proc *p, const char *kname, int canonpath(const char *input, char *buf, size_t bufsize); void unveil_destroy(struct process *ps); -/* #define DEBUG_PLEDGE */ -#ifdef DEBUG_PLEDGE -int debug_pledge = 1; -#define DPRINTF(x...) do { if (debug_pledge) printf(x); } while (0) -#define DNPRINTF(n,x...) do { if (debug_pledge >= (n)) printf(x); } while (0) -#else -#define DPRINTF(x...) -#define DNPRINTF(n,x...) -#endif - /* * Ordered in blocks starting with least risky and most required. */ diff --git a/usr.bin/ssh/myproposal.h b/usr.bin/ssh/myproposal.h index 3bdc2e955..c1459054a 100644 --- a/usr.bin/ssh/myproposal.h +++ b/usr.bin/ssh/myproposal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: myproposal.h,v 1.73 2024/09/09 02:39:57 djm Exp $ */ +/* $OpenBSD: myproposal.h,v 1.74 2024/10/06 23:37:17 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -32,14 +32,14 @@ "curve25519-sha256@libssh.org," \ "ecdh-sha2-nistp256," \ "ecdh-sha2-nistp384," \ - "ecdh-sha2-nistp521," \ + "ecdh-sha2-nistp521" \ + +#define KEX_CLIENT_KEX KEX_SERVER_KEX "," \ "diffie-hellman-group-exchange-sha256," \ "diffie-hellman-group16-sha512," \ "diffie-hellman-group18-sha512," \ "diffie-hellman-group14-sha256" -#define KEX_CLIENT_KEX KEX_SERVER_KEX - #define KEX_DEFAULT_PK_ALG \ "ssh-ed25519-cert-v01@openssh.com," \ "ecdsa-sha2-nistp256-cert-v01@openssh.com," \ diff --git a/usr.bin/ssh/sshd_config.5 b/usr.bin/ssh/sshd_config.5 index eaf639fb0..786dd08f2 100644 --- a/usr.bin/ssh/sshd_config.5 +++ b/usr.bin/ssh/sshd_config.5 @@ -33,8 +33,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. .\" -.\" $OpenBSD: sshd_config.5,v 1.374 2024/09/15 08:27:38 jmc Exp $ -.Dd $Mdocdate: September 15 2024 $ +.\" $OpenBSD: sshd_config.5,v 1.375 2024/10/06 23:37:17 djm Exp $ +.Dd $Mdocdate: October 6 2024 $ .Dt SSHD_CONFIG 5 .Os .Sh NAME @@ -1063,10 +1063,7 @@ The default is: sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com, mlkem768x25519-sha256, curve25519-sha256,curve25519-sha256@libssh.org, -ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, -diffie-hellman-group-exchange-sha256, -diffie-hellman-group16-sha512,diffie-hellman-group18-sha512, -diffie-hellman-group14-sha256 +ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521 .Ed .Pp The list of supported key exchange algorithms may also be obtained using