From nobody Sun Jul 30 06:27:40 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDBJW5Tfyz4pydQ; Sun, 30 Jul 2023 06:28:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDBJF5Fgfz3NPW; Sun, 30 Jul 2023 06:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690698478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+SrmNcLqS/WJtUZaiLwQal6GnE4m8npNKYQoefw0dTU=; b=rCK4fY7r/FooVMnz+hyBeRq9LSBRcn4Yl7OZ1xvkU6xbACKVrWWlFQh1O0iD6MvKnWaoBH jRge4xKUTQV9axDowxvssojnqNDsN3cQpbwd5PNdy7Kn+I/ywPtFqiirA3rmoffGDWjvDW CW/8df+c1il/qOiRLFB1p+Q4lOYBbybBJYEzAq9EKPzyhoMUiXo3OCvT6YqtKwi2MINwol K2RDu96NT4lDh0KQzfvD3ZH0qEHOUX94VNdtlUnRFmRRZKAx3LcCPasIp7Z7At+vsOlzgP hJrn2qWgrtXCHNat8THsFTERONkY8cNB80BYoTydA9QXNCGJrvvB3Foo8iMa6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690698478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+SrmNcLqS/WJtUZaiLwQal6GnE4m8npNKYQoefw0dTU=; b=Aaimb61bQIKwbMx1CkfgMCtS43PP7mjgIw5LY/z1IQu4Xve1JjLHDiI1R2S9YY0egEXa7r ZmwN+ZSsVoo3i69cJtCIJvkIMMJA3Wi2YAnzrWIM6twVpTCyXICf49ukJ7X5tOQUBuRT+4 t9xzhEPhqe+/25/m+cPnPbXSKmBXk0miOgo8oQ4WI1b53EW4nZ4hy2rGqYhuJEotXuZABU +x6xbGLQLlj9t4uGGenqV1aX1+iq1X9eaIg+BzkU6foiL6rSlJK8GXGBcp214QAg1Bt9RQ 7emYGSciOu7KcCXtIO9ZUAO65nICbZxU4WgVK4P0E5+3r6ewZV8peGTv4MwNgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690698478; a=rsa-sha256; cv=none; b=AAggam/Tr5n+HdNGHK1sXW+p1tOsgVRQHLpU8y6CEEs7RopfkRHKESRku+7ntQr2susNne WdpSDEl377Khol/5bPRbi/gjsjrw2adgUFi2goYe2X6Vzmi/2xeunozEvFyyq+mjlLjL8T k+uU2EH7XXVKmRXrx0sKoKu3+lMJj9YJh4zq4Vh87Q7QNHeoDDnKRRdXYoujvj/jDx94N+ WD9wpn/KrEJ/1yIZrdQIh+RXc1nkfXxvPj+zAq1TeJO4c5OBD07nOks+8ni9nhItrRFBTT 4OpfJ8GdLxXtvOBwguWT1giMfcD8e14DBNSCZXH6Kcb0OfPZ1rM9j5ubUl9SOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RDBHy4dN7z13yl; Sun, 30 Jul 2023 06:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36U6Re96064141; Sun, 30 Jul 2023 06:27:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36U6ReV9064140; Sun, 30 Jul 2023 06:27:40 GMT (envelope-from git) Date: Sun, 30 Jul 2023 06:27:40 GMT Message-Id: <202307300627.36U6ReV9064140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 38f5cb1bfbe1 - main - radix_tree: redefine the clev field List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38f5cb1bfbe11bad92ba0266251ff3b0b8fcda73 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=38f5cb1bfbe11bad92ba0266251ff3b0b8fcda73 commit 38f5cb1bfbe11bad92ba0266251ff3b0b8fcda73 Author: Doug Moore AuthorDate: 2023-07-30 06:20:07 +0000 Commit: Doug Moore CommitDate: 2023-07-30 06:20:07 +0000 radix_tree: redefine the clev field The clev field in the node struct is almost always multiplied by WIDTH; occasionally, it is incremented and then multiplied by WIDTH. Instructions can be saved by storing it always multiplied by WIDTH. For the computation of slot(), this just eliminates a multiplication. For trimkey(), where the caller always adds one to clev before passing it as an argument, this change has the caller, not the caller, do that. Trimkey() handles it not by adding WIDTH to the input parameter, but by shifting COUNT, and not 1. That produces the same result, and it relieves keybarr of the need to test to avoid shifting by more than 63 bits, since level is always <= 63. This takes 3 instrutions and 14 bytes out of the basic lookup loop on amd64. Reviewed by: kib Tested by: pho (as part of a larger change) Differential Revision: https://reviews.freebsd.org/D41226 --- sys/kern/subr_pctrie.c | 76 +++++++++++++++++++----------------------------- sys/vm/vm_radix.c | 78 ++++++++++++++++++++------------------------------ 2 files changed, 60 insertions(+), 94 deletions(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index 6d45d9762a78..c08e4b5910a5 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -83,17 +83,13 @@ _Static_assert(sizeof(pn_popmap_t) <= sizeof(int), #define PCTRIE_FLAGS (PCTRIE_ISLEAF) #define PCTRIE_PAD PCTRIE_FLAGS -/* Returns one unit associated with specified level. */ -#define PCTRIE_UNITLEVEL(lev) \ - ((uint64_t)1 << ((lev) * PCTRIE_WIDTH)) - struct pctrie_node; typedef SMR_POINTER(struct pctrie_node *) smr_pctnode_t; struct pctrie_node { uint64_t pn_owner; /* Owner of record. */ pn_popmap_t pn_popmap; /* Valid children. */ - uint8_t pn_clev; /* Current level. */ + uint8_t pn_clev; /* Level * WIDTH. */ smr_pctnode_t pn_child[PCTRIE_COUNT]; /* Child nodes. */ }; @@ -108,14 +104,14 @@ static __inline void pctrie_node_store(smr_pctnode_t *p, void *val, static __inline int pctrie_slot(uint64_t index, uint16_t level) { - return ((index >> (level * PCTRIE_WIDTH)) & PCTRIE_MASK); + return ((index >> level) & PCTRIE_MASK); } -/* Computes the key (index) with the low-order 'level' radix-digits zeroed. */ +/* Computes the key (index) with the low-order 'level' + 1 radix-digits zeroed. */ static __inline uint64_t pctrie_trimkey(uint64_t index, uint16_t level) { - return (index & -PCTRIE_UNITLEVEL(level)); + return (index & -((uint64_t)PCTRIE_COUNT << level)); } /* @@ -124,7 +120,7 @@ pctrie_trimkey(uint64_t index, uint16_t level) */ static struct pctrie_node * pctrie_node_get(struct pctrie *ptree, pctrie_alloc_t allocfn, uint64_t index, - uint16_t clevel) + uint64_t newind) { struct pctrie_node *node; @@ -142,8 +138,20 @@ pctrie_node_get(struct pctrie *ptree, pctrie_alloc_t allocfn, uint64_t index, PCTRIE_NULL, PCTRIE_UNSERIALIZED); node->pn_popmap = 0; } - node->pn_owner = pctrie_trimkey(index, clevel + 1); - node->pn_clev = clevel; + + /* + * From the highest-order bit where the indexes differ, + * compute the highest level in the trie where they differ. Then, + * compute the least index of this subtrie. + */ + KASSERT(index != newind, ("%s: passing the same key value %jx", + __func__, (uintmax_t)index)); + _Static_assert(sizeof(long long) >= sizeof(uint64_t), + "uint64 too wide"); + _Static_assert(sizeof(uint64_t) * NBBY <= + (1 << (sizeof(node->pn_clev) * NBBY)), "pn_clev too narrow"); + node->pn_clev = rounddown(flsll(index ^ newind) - 1, PCTRIE_WIDTH); + node->pn_owner = pctrie_trimkey(index, node->pn_clev); return (node); } @@ -259,37 +267,18 @@ pctrie_toval(struct pctrie_node *node) * Make 'child' a child of 'node'. */ static __inline void -pctrie_addnode(struct pctrie_node *node, uint64_t index, uint16_t clev, +pctrie_addnode(struct pctrie_node *node, uint64_t index, struct pctrie_node *child, enum pctrie_access access) { int slot; - slot = pctrie_slot(index, clev); + slot = pctrie_slot(index, node->pn_clev); pctrie_node_store(&node->pn_child[slot], child, access); node->pn_popmap ^= 1 << slot; KASSERT((node->pn_popmap & (1 << slot)) != 0, ("%s: bad popmap slot %d in node %p", __func__, slot, node)); } -/* - * Returns the level where two keys differ. - * It cannot accept 2 equal keys. - */ -static __inline uint16_t -pctrie_keydiff(uint64_t index1, uint64_t index2) -{ - - KASSERT(index1 != index2, ("%s: passing the same key value %jx", - __func__, (uintmax_t)index1)); - CTASSERT(sizeof(long long) >= sizeof(uint64_t)); - - /* - * From the highest-order bit where the indexes differ, - * compute the highest level in the trie where they differ. - */ - return ((flsll(index1 ^ index2) - 1) / PCTRIE_WIDTH); -} - /* * Returns TRUE if it can be determined that key does not belong to the * specified node. Otherwise, returns FALSE. @@ -297,12 +286,8 @@ pctrie_keydiff(uint64_t index1, uint64_t index2) static __inline bool pctrie_keybarr(struct pctrie_node *node, uint64_t idx) { - - if (node->pn_clev < PCTRIE_LIMIT) { - idx = pctrie_trimkey(idx, node->pn_clev + 1); - return (idx != node->pn_owner); - } - return (false); + idx = pctrie_trimkey(idx, node->pn_clev); + return (idx != node->pn_owner); } /* @@ -366,7 +351,6 @@ pctrie_insert(struct pctrie *ptree, uint64_t *val, pctrie_alloc_t allocfn) struct pctrie_node *leaf, *node, *parent; smr_pctnode_t *parentp; int slot; - uint16_t clev; index = *val; leaf = pctrie_toleaf(val); @@ -383,8 +367,7 @@ pctrie_insert(struct pctrie *ptree, uint64_t *val, pctrie_alloc_t allocfn) if (parent == NULL) ptree->pt_root = leaf; else - pctrie_addnode(parent, index, - parent->pn_clev, leaf, + pctrie_addnode(parent, index, leaf, PCTRIE_LOCKED); return (0); } @@ -411,13 +394,12 @@ pctrie_insert(struct pctrie *ptree, uint64_t *val, pctrie_alloc_t allocfn) */ parentp = (parent != NULL) ? &parent->pn_child[slot]: (smr_pctnode_t *)&ptree->pt_root; - clev = pctrie_keydiff(newind, index); - parent = pctrie_node_get(ptree, allocfn, index, clev); + parent = pctrie_node_get(ptree, allocfn, index, newind); if (parent == NULL) return (ENOMEM); /* These writes are not yet visible due to ordering. */ - pctrie_addnode(parent, index, clev, leaf, PCTRIE_UNSERIALIZED); - pctrie_addnode(parent, newind, clev, node, PCTRIE_UNSERIALIZED); + pctrie_addnode(parent, index, leaf, PCTRIE_UNSERIALIZED); + pctrie_addnode(parent, newind, node, PCTRIE_UNSERIALIZED); /* Synchronize to make the above visible. */ pctrie_node_store(parentp, parent, PCTRIE_LOCKED); return (0); @@ -714,7 +696,7 @@ DB_SHOW_COMMAND(pctrienode, db_show_pctrienode) node = (struct pctrie_node *)addr; db_printf("node %p, owner %jx, children popmap %04x, level %u:\n", (void *)node, (uintmax_t)node->pn_owner, node->pn_popmap, - node->pn_clev); + node->pn_clev / PCTRIE_WIDTH); for (popmap = node->pn_popmap; popmap != 0; popmap ^= 1 << slot) { slot = ffs(popmap) - 1; tmp = pctrie_node_load(&node->pn_child[slot], NULL, @@ -722,7 +704,7 @@ DB_SHOW_COMMAND(pctrienode, db_show_pctrienode) db_printf("slot: %d, val: %p, value: %p, clev: %d\n", slot, (void *)tmp, pctrie_isleaf(tmp) ? pctrie_toval(tmp) : NULL, - node->pn_clev); + node->pn_clev / PCTRIE_WIDTH); } } #endif /* DDB */ diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index 3c4ea9568108..f50f9e3605a1 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -107,10 +107,6 @@ _Static_assert(sizeof(rn_popmap_t) <= sizeof(int), #define VM_RADIX_FLAGS (VM_RADIX_ISLEAF) #define VM_RADIX_PAD VM_RADIX_FLAGS -/* Returns one unit associated with specified level. */ -#define VM_RADIX_UNITLEVEL(lev) \ - ((vm_pindex_t)1 << ((lev) * VM_RADIX_WIDTH)) - enum vm_radix_access { SMR, LOCKED, UNSERIALIZED }; struct vm_radix_node; @@ -119,7 +115,7 @@ typedef SMR_POINTER(struct vm_radix_node *) smrnode_t; struct vm_radix_node { vm_pindex_t rn_owner; /* Owner of record. */ rn_popmap_t rn_popmap; /* Valid children. */ - uint8_t rn_clev; /* Current level. */ + uint8_t rn_clev; /* Level * WIDTH. */ smrnode_t rn_child[VM_RADIX_COUNT]; /* Child nodes. */ }; @@ -135,21 +131,22 @@ static void vm_radix_node_store(smrnode_t *p, struct vm_radix_node *v, static __inline int vm_radix_slot(vm_pindex_t index, uint16_t level) { - return ((index >> (level * VM_RADIX_WIDTH)) & VM_RADIX_MASK); + return ((index >> level) & VM_RADIX_MASK); } -/* Computes the key (index) with the low-order 'level' radix-digits zeroed. */ +/* Computes the key (index) with the low-order 'level' + 1 radix-digits + * zeroed. */ static __inline vm_pindex_t vm_radix_trimkey(vm_pindex_t index, uint16_t level) { - return (index & -VM_RADIX_UNITLEVEL(level)); + return (index & -((vm_pindex_t)VM_RADIX_COUNT << level)); } /* * Allocate a radix node. */ static struct vm_radix_node * -vm_radix_node_get(vm_pindex_t index, uint16_t clevel) +vm_radix_node_get(vm_pindex_t index, vm_pindex_t newind) { struct vm_radix_node *rnode; @@ -167,8 +164,20 @@ vm_radix_node_get(vm_pindex_t index, uint16_t clevel) VM_RADIX_NULL, UNSERIALIZED); rnode->rn_popmap = 0; } - rnode->rn_owner = vm_radix_trimkey(index, clevel + 1); - rnode->rn_clev = clevel; + + /* + * From the highest-order bit where the indexes differ, + * compute the highest level in the trie where they differ. Then, + * compute the least index of this subtrie. + */ + KASSERT(index != newind, ("%s: passing the same key value %jx", + __func__, (uintmax_t)index)); + _Static_assert(sizeof(long long) >= sizeof(vm_pindex_t), + "vm_pindex_t too wide"); + _Static_assert(sizeof(vm_pindex_t) * NBBY <= + (1 << (sizeof(rnode->rn_clev) * NBBY)), "rn_clev too narrow"); + rnode->rn_clev = rounddown(flsll(index ^ newind) - 1, VM_RADIX_WIDTH); + rnode->rn_owner = vm_radix_trimkey(index, rnode->rn_clev); return (rnode); } @@ -284,37 +293,18 @@ vm_radix_topage(struct vm_radix_node *rnode) * Make 'child' a child of 'rnode'. */ static __inline void -vm_radix_addnode(struct vm_radix_node *rnode, vm_pindex_t index, uint16_t clev, +vm_radix_addnode(struct vm_radix_node *rnode, vm_pindex_t index, struct vm_radix_node *child, enum vm_radix_access access) { int slot; - slot = vm_radix_slot(index, clev); + slot = vm_radix_slot(index, rnode->rn_clev); vm_radix_node_store(&rnode->rn_child[slot], child, access); rnode->rn_popmap ^= 1 << slot; KASSERT((rnode->rn_popmap & (1 << slot)) != 0, ("%s: bad popmap slot %d in rnode %p", __func__, slot, rnode)); } -/* - * Returns the level where two keys differ. - * It cannot accept 2 equal keys. - */ -static __inline uint16_t -vm_radix_keydiff(vm_pindex_t index1, vm_pindex_t index2) -{ - - KASSERT(index1 != index2, ("%s: passing the same key value %jx", - __func__, (uintmax_t)index1)); - CTASSERT(sizeof(long long) >= sizeof(vm_pindex_t)); - - /* - * From the highest-order bit where the indexes differ, - * compute the highest level in the trie where they differ. - */ - return ((flsll(index1 ^ index2) - 1) / VM_RADIX_WIDTH); -} - /* * Returns TRUE if it can be determined that key does not belong to the * specified rnode. Otherwise, returns FALSE. @@ -322,12 +312,8 @@ vm_radix_keydiff(vm_pindex_t index1, vm_pindex_t index2) static __inline bool vm_radix_keybarr(struct vm_radix_node *rnode, vm_pindex_t idx) { - - if (rnode->rn_clev < VM_RADIX_LIMIT) { - idx = vm_radix_trimkey(idx, rnode->rn_clev + 1); - return (idx != rnode->rn_owner); - } - return (false); + idx = vm_radix_trimkey(idx, rnode->rn_clev); + return (idx != rnode->rn_owner); } /* @@ -420,7 +406,6 @@ vm_radix_insert(struct vm_radix *rtree, vm_page_t page) struct vm_radix_node *leaf, *parent, *rnode; smrnode_t *parentp; int slot; - uint16_t clev; index = page->pindex; leaf = vm_radix_toleaf(page); @@ -437,8 +422,8 @@ vm_radix_insert(struct vm_radix *rtree, vm_page_t page) if (parent == NULL) rtree->rt_root = leaf; else - vm_radix_addnode(parent, index, - parent->rn_clev, leaf, LOCKED); + vm_radix_addnode(parent, index, leaf, + LOCKED); return (0); } newind = vm_radix_topage(rnode)->pindex; @@ -463,13 +448,12 @@ vm_radix_insert(struct vm_radix *rtree, vm_page_t page) */ parentp = (parent != NULL) ? &parent->rn_child[slot]: (smrnode_t *)&rtree->rt_root; - clev = vm_radix_keydiff(newind, index); - parent = vm_radix_node_get(index, clev); + parent = vm_radix_node_get(index, newind); if (parent == NULL) return (ENOMEM); /* These writes are not yet visible due to ordering. */ - vm_radix_addnode(parent, index, clev, leaf, UNSERIALIZED); - vm_radix_addnode(parent, newind, clev, rnode, UNSERIALIZED); + vm_radix_addnode(parent, index, leaf, UNSERIALIZED); + vm_radix_addnode(parent, newind, rnode, UNSERIALIZED); /* Serializing write to make the above visible. */ vm_radix_node_store(parentp, parent, LOCKED); return (0); @@ -808,14 +792,14 @@ DB_SHOW_COMMAND(radixnode, db_show_radixnode) rnode = (struct vm_radix_node *)addr; db_printf("radixnode %p, owner %jx, children popmap %04x, level %u:\n", (void *)rnode, (uintmax_t)rnode->rn_owner, rnode->rn_popmap, - rnode->rn_clev); + rnode->rn_clev / VM_RADIX_WIDTH); for (popmap = rnode->rn_popmap; popmap != 0; popmap ^= 1 << slot) { slot = ffs(popmap) - 1; tmp = vm_radix_node_load(&rnode->rn_child[slot], UNSERIALIZED); db_printf("slot: %d, val: %p, page: %p, clev: %d\n", slot, (void *)tmp, vm_radix_isleaf(tmp) ? vm_radix_topage(tmp) : NULL, - rnode->rn_clev); + rnode->rn_clev / VM_RADIX_WIDTH); } } #endif /* DDB */ From nobody Sun Jul 30 10:30:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDHhf6Cygz4q8Yq; Sun, 30 Jul 2023 10:30:49 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDHhR1NzJz3wWZ; Sun, 30 Jul 2023 10:30:46 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of dchagin@heemeyer.club has no SPF policy when checking 195.93.173.158) smtp.mailfrom=dchagin@heemeyer.club; dmarc=none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.2/8.16.1) with ESMTP id 36UAUbcN016978; Sun, 30 Jul 2023 13:30:37 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 36UAUbjj016977; Sun, 30 Jul 2023 13:30:37 +0300 (MSK) (envelope-from dchagin) Date: Sun, 30 Jul 2023 13:30:37 +0300 From: Dmitry Chagin To: Alan Cox Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 50d663b14b31 - main - vm: Fix vm_map_find_min() Message-ID: References: <202307260525.36Q5PbRm027006@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202307260525.36Q5PbRm027006@gitrepo.freebsd.org> X-Spamd-Result: default: False [-1.80 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[dchagin@freebsd.org,dchagin@heemeyer.club]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[dchagin]; ARC_NA(0.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_NEQ_ENVFROM(0.00)[dchagin@freebsd.org,dchagin@heemeyer.club] X-Rspamd-Queue-Id: 4RDHhR1NzJz3wWZ X-Spamd-Bar: - On Wed, Jul 26, 2023 at 05:25:37AM +0000, Alan Cox wrote: > The branch main has been updated by alc: > > URL: https://cgit.FreeBSD.org/src/commit/?id=50d663b14b310d6020b4b6cc92d4fae985f086f2 > > commit 50d663b14b310d6020b4b6cc92d4fae985f086f2 > Author: Alan Cox > AuthorDate: 2023-07-25 07:24:19 +0000 > Commit: Alan Cox > CommitDate: 2023-07-26 05:24:50 +0000 > > vm: Fix vm_map_find_min() > > Fix the handling of address hints that are less than min_addr by > vm_map_find_min(). > Thank you for fixing that, however it still fails under Linuxulator. #include #include #include #include #include #include #include #include int main(int argc, char** argv) { struct stat sb; void *s32; int f, r; f = open(argv[0], O_RDONLY); assert(f > 0); r = fstat(f, &sb); assert(r == 0); s32 = mmap(NULL, sb.st_size, PROT_READ, MAP_32BIT|MAP_PRIVATE, f, 0); assert(s32 != MAP_FAILED); assert((uintptr_t)s32 < 0x80000000); close(f); munmap(s32, sb.st_size); return (0); } > Reported by: dchagin > Reviewed by: kib > Fixes: d8e6f4946cec0 "vm: Fix anonymous memory clustering under ASLR" > Differential Revision: https://reviews.freebsd.org/D41159 > --- > sys/vm/vm_map.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c > index 444e09986d4e..eb607d519247 100644 > --- a/sys/vm/vm_map.c > +++ b/sys/vm/vm_map.c > @@ -2255,10 +2255,10 @@ vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset, > int rv; > > hint = *addr; > - if (hint == 0) > + if (hint == 0) { > cow |= MAP_NO_HINT; > - if (hint < min_addr) > *addr = hint = min_addr; > + } > for (;;) { > rv = vm_map_find(map, object, offset, addr, length, max_addr, > find_space, prot, max, cow); From nobody Sun Jul 30 10:58:05 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDJLR6vV9z4q9Ct; Sun, 30 Jul 2023 11:00:15 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDJHz2WkVz40bc; Sun, 30 Jul 2023 10:58:06 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of dchagin@heemeyer.club has no SPF policy when checking 195.93.173.158) smtp.mailfrom=dchagin@heemeyer.club; dmarc=none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.2/8.16.1) with ESMTP id 36UAw5Uu017121; Sun, 30 Jul 2023 13:58:05 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 36UAw5GG017120; Sun, 30 Jul 2023 13:58:05 +0300 (MSK) (envelope-from dchagin) Date: Sun, 30 Jul 2023 13:58:05 +0300 From: Dmitry Chagin To: Alan Cox Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 50d663b14b31 - main - vm: Fix vm_map_find_min() Message-ID: References: <202307260525.36Q5PbRm027006@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [-1.80 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[dchagin@freebsd.org,dchagin@heemeyer.club]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[dchagin]; ARC_NA(0.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_NEQ_ENVFROM(0.00)[dchagin@freebsd.org,dchagin@heemeyer.club] X-Rspamd-Queue-Id: 4RDJHz2WkVz40bc X-Spamd-Bar: - On Sun, Jul 30, 2023 at 01:30:37PM +0300, Dmitry Chagin wrote: > On Wed, Jul 26, 2023 at 05:25:37AM +0000, Alan Cox wrote: > > The branch main has been updated by alc: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=50d663b14b310d6020b4b6cc92d4fae985f086f2 > > > > commit 50d663b14b310d6020b4b6cc92d4fae985f086f2 > > Author: Alan Cox > > AuthorDate: 2023-07-25 07:24:19 +0000 > > Commit: Alan Cox > > CommitDate: 2023-07-26 05:24:50 +0000 > > > > vm: Fix vm_map_find_min() > > > > Fix the handling of address hints that are less than min_addr by > > vm_map_find_min(). > > > Thank you for fixing that, however it still fails under Linuxulator. > > > #include > #include > > #include > #include > #include > #include > #include > #include > > int > main(int argc, char** argv) > { > struct stat sb; > void *s32; > int f, r; > > f = open(argv[0], O_RDONLY); > assert(f > 0); > > r = fstat(f, &sb); > assert(r == 0); > > s32 = mmap(NULL, sb.st_size, PROT_READ, > MAP_32BIT|MAP_PRIVATE, f, 0); > assert(s32 != MAP_FAILED); > assert((uintptr_t)s32 < 0x80000000); > > close(f); > munmap(s32, sb.st_size); > return (0); > } > hmm, it also fails natively with disable aslr > > > > Reported by: dchagin > > Reviewed by: kib > > Fixes: d8e6f4946cec0 "vm: Fix anonymous memory clustering under ASLR" > > Differential Revision: https://reviews.freebsd.org/D41159 > > --- > > sys/vm/vm_map.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c > > index 444e09986d4e..eb607d519247 100644 > > --- a/sys/vm/vm_map.c > > +++ b/sys/vm/vm_map.c > > @@ -2255,10 +2255,10 @@ vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset, > > int rv; > > > > hint = *addr; > > - if (hint == 0) > > + if (hint == 0) { > > cow |= MAP_NO_HINT; > > - if (hint < min_addr) > > *addr = hint = min_addr; > > + } > > for (;;) { > > rv = vm_map_find(map, object, offset, addr, length, max_addr, > > find_space, prot, max, cow); From nobody Sun Jul 30 15:47:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDQjv1dG8z4p9Nd; Sun, 30 Jul 2023 15:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDQjg3S9Rz4Kfc; Sun, 30 Jul 2023 15:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690732039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjJ6nKOe1I8y1DeSFwb3ddzdb7TtdyoTIdc4/Ft3ApU=; b=AV6pnWObMtWegxQ3uEJOFmLfgUftlLbN0kmZ+3eEP/FbVVncUPeLO+cz0SGBkgtAwBIRe1 mS30Gork4G6HatNkEYMcVujjfk+E1D/UYsxKQF5nFOZpFATLWCHex0cDqhX9BEyHQzcQUB X3MLaq1PPPLFKoHgAeoUupaFuZQuF7nVQtU1lgKXtD6yjaYnDLhxKaNt1eDWKGDAiJGu2i htxIPRlsR9T9omZ90r8GVVJeoszZNOZi8E9Y/hGjBHhXFeutt+4S5/k/sby3OEy4L3vwjZ 4pn19ASAzg7JXRtT7isQ8Q0SAAOP7+HDhieK4NJg8QB+E5XsWPJ1t7kfFbJZZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690732039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjJ6nKOe1I8y1DeSFwb3ddzdb7TtdyoTIdc4/Ft3ApU=; b=aSykVwm1gq875NV86gGQTSiOEqvCqtoZ77chi4ZLXbq+1+RtrW5wM8yD47q2axuBztPCL+ +mSjV10bG8NhKgbyau9jXHz1eiPsiA6rB2TJyItzy7hMq4FlLipo/fuKQBlU9lqOlhyZO/ zl/l8PmowJ4XEDF/Jhmw2qIfbf05q97W7AEE2ZpDmdm3bHBazWmwv5Dh4m3e362Awhog1/ rPmQBHHGpF9+oqOLmdbv17uin3MiFAuQfhG70s0Yt2vZ1Xv0MuYMsqiKH1m1/PfOe0RE/O bIsQEfDf20Cp/8I8iQ3j3Nuyq0BnxsErtOGJQ9O38d/PAWJFO5hh3Z+RhHKb5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690732039; a=rsa-sha256; cv=none; b=NOf7QBQ4imRnwCueQ+GVQUNogYTiq7rMi0p35FljVXSxBA6I27C5WZdw+8Hd7FVG8IDRFn C94hqHfhdzpGus+d1cOzWLwSa0joWNSocl4GPJCPHYZjnuAZINGqh7zi/bf4S2ZQ1g/jqZ sGIyVwPY83QEMPmj7nmuJnhg2WeV2oGJstth3wgENdBm7fyUJZIDTllsdHdT+kWkNluQP4 w4Bs4v5Lnman47dVwJTI4LajzpzpJLsD2cBNcdDlj4CxoDAMfWXc62YzuNHI956Akvkf0J cEY7JiRTNhDpzsCIkhkojlMHRALdZT3Y70I9lEzEOxgfU8C8iDpgqYp1O8LQGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RDQjg0X3HzKjd; Sun, 30 Jul 2023 15:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36UFlH57089124; Sun, 30 Jul 2023 15:47:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36UFlHLk089123; Sun, 30 Jul 2023 15:47:17 GMT (envelope-from git) Date: Sun, 30 Jul 2023 15:47:17 GMT Message-Id: <202307301547.36UFlHLk089123@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5ad29bc8d4d4 - main - amd64: Fix TLB invalidation routines in !SMP kernels List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ad29bc8d4d436660954f6db507909965369fc32 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5ad29bc8d4d436660954f6db507909965369fc32 commit 5ad29bc8d4d436660954f6db507909965369fc32 Author: Mark Johnston AuthorDate: 2023-07-30 15:12:35 +0000 Commit: Mark Johnston CommitDate: 2023-07-30 15:12:35 +0000 amd64: Fix TLB invalidation routines in !SMP kernels amd64 is special in that its implementation of zpcpu_offset_cpu() is not the identity transformation, even in !SMP kernels. Because the pm_pcidp array of amd64's struct pmap is allocated from a pcpu UMA zone, this means that accessing pm_pcidp directly, as is done in !SMP implementations of pmap_invalidate_*, does not work. Specifically, I see occasional unexplicable crashes in userspace when PCIDs are enabled. Apply a minimal patch to fix the problem. While it would also make sense to provide separate implementations of zpcpu_* for !SMP kernels, fixing it this way makes the SMP and !SMP implementations of pmap_invalidate_* more similar. Reviewed by: alc, kib MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D41230 --- sys/amd64/amd64/pmap.c | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index c1968fc11844..5bc40bd00a32 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -3489,6 +3489,7 @@ void pmap_invalidate_page(pmap_t pmap, vm_offset_t va) { struct invpcid_descr d; + struct pmap_pcid *pcidp; uint64_t kcr3, ucr3; uint32_t pcid; @@ -3504,7 +3505,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) if (pmap == PCPU_GET(curpmap) && pmap_pcid_enabled && pmap->pm_ucr3 != PMAP_NO_CR3) { critical_enter(); - pcid = pmap->pm_pcidp->pm_pcid; + pcid = pmap_get_pcid(pmap); if (invpcid_works) { d.pcid = pcid | PMAP_PCID_USER_PT; d.pad = 0; @@ -3518,16 +3519,20 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) } critical_exit(); } - } else if (pmap_pcid_enabled) - pmap->pm_pcidp->pm_gen = 0; + } else if (pmap_pcid_enabled) { + pcidp = zpcpu_get(pmap->pm_pcidp); + pcidp->pm_gen = 0; + } } void pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { struct invpcid_descr d; + struct pmap_pcid *pcidp; vm_offset_t addr; uint64_t kcr3, ucr3; + uint32_t pcid; if (pmap->pm_type == PT_RVI || pmap->pm_type == PT_EPT) { pmap->pm_eptgen++; @@ -3542,24 +3547,24 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) if (pmap == PCPU_GET(curpmap) && pmap_pcid_enabled && pmap->pm_ucr3 != PMAP_NO_CR3) { critical_enter(); + pcid = pmap_get_pcid(pmap); if (invpcid_works) { - d.pcid = pmap->pm_pcidp->pm_pcid | - PMAP_PCID_USER_PT; + d.pcid = pcid | PMAP_PCID_USER_PT; d.pad = 0; d.addr = sva; for (; d.addr < eva; d.addr += PAGE_SIZE) invpcid(&d, INVPCID_ADDR); } else { - kcr3 = pmap->pm_cr3 | pmap->pm_pcidp-> - pm_pcid | CR3_PCID_SAVE; - ucr3 = pmap->pm_ucr3 | pmap->pm_pcidp-> - pm_pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; + kcr3 = pmap->pm_cr3 | pcid | CR3_PCID_SAVE; + ucr3 = pmap->pm_ucr3 | pcid | + PMAP_PCID_USER_PT | CR3_PCID_SAVE; pmap_pti_pcid_invlrng(ucr3, kcr3, sva, eva); } critical_exit(); } } else if (pmap_pcid_enabled) { - pmap->pm_pcidp->pm_gen = 0; + pcidp = zpcpu_get(pmap->pm_pcidp); + pcidp->pm_gen = 0; } } @@ -3567,7 +3572,9 @@ void pmap_invalidate_all(pmap_t pmap) { struct invpcid_descr d; + struct pmap_pcid *pcidp; uint64_t kcr3, ucr3; + uint32_t pcid; if (pmap->pm_type == PT_RVI || pmap->pm_type == PT_EPT) { pmap->pm_eptgen++; @@ -3586,8 +3593,9 @@ pmap_invalidate_all(pmap_t pmap) } else if (pmap == PCPU_GET(curpmap)) { if (pmap_pcid_enabled) { critical_enter(); + pcid = pmap_get_pcid(pmap); if (invpcid_works) { - d.pcid = pmap->pm_pcidp->pm_pcid; + d.pcid = pcid; d.pad = 0; d.addr = 0; invpcid(&d, INVPCID_CTX); @@ -3596,10 +3604,10 @@ pmap_invalidate_all(pmap_t pmap) invpcid(&d, INVPCID_CTX); } } else { - kcr3 = pmap->pm_cr3 | pmap->pm_pcidp->pm_pcid; + kcr3 = pmap->pm_cr3 | pcid; if (pmap->pm_ucr3 != PMAP_NO_CR3) { - ucr3 = pmap->pm_ucr3 | pmap->pm_pcidp-> - pm_pcid | PMAP_PCID_USER_PT; + ucr3 = pmap->pm_ucr3 | pcid | + PMAP_PCID_USER_PT; pmap_pti_pcid_invalidate(ucr3, kcr3); } else load_cr3(kcr3); @@ -3609,7 +3617,8 @@ pmap_invalidate_all(pmap_t pmap) invltlb(); } } else if (pmap_pcid_enabled) { - pmap->pm_pcidp->pm_gen = 0; + pcidp = zpcpu_get(pmap->pm_pcidp); + pcidp->pm_gen = 0; } } @@ -3623,12 +3632,15 @@ pmap_invalidate_cache(void) static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) { + struct pmap_pcid *pcidp; pmap_update_pde_store(pmap, pde, newpde); if (pmap == kernel_pmap || pmap == PCPU_GET(curpmap)) pmap_update_pde_invalidate(pmap, va, newpde); - else - pmap->pm_pcidp->pm_gen = 0; + else { + pcidp = zpcpu_get(pmap->pm_pcidp); + pcidp->pm_gen = 0; + } } #endif /* !SMP */ From nobody Sun Jul 30 17:35:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDT6R4KxGz4pFyp; Sun, 30 Jul 2023 17:35:11 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mx0b-0010f301.pphosted.com (mx0b-0010f301.pphosted.com [148.163.153.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDT640Myvz3DGM; Sun, 30 Jul 2023 17:35:07 +0000 (UTC) (envelope-from alc@rice.edu) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0102859.ppops.net [127.0.0.1]) by mx0b-0010f301.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 36UHU1Fr020751; Sun, 30 Jul 2023 12:35:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rice.edu; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s=ricemail; bh=bqc/bjdJ2hVo5qu/Q0nxbfLmVoLk5tFmkOzvnrDhGbM=; b=WHZNS521nte8 jnIQ3BHa5TB+GDkROi9rlOOdtD8DjU8JuDRlHacXy/dFqFiBoBlViwyAuv7RRe/a NSvX2t4MoivnKwNtAwBDbxPQ/9t0m18+aGf2yw1YSX0189yFzxUE6GLBuHB/2lmn RqmJGVkebJQN8KuR2Q855kJuF0Mst4gmCCnD2A7OtXlX/BThKkGYnIM/WAJqvlnd u+rG50Oi/O2LM4YvJyHZefav+EKC7jAU1Lq1dlIuBT+SIAqPdZors3Lk3uyQLJDt 7BdtZS5B6EEz9rHu0I5dqFDwM/OU7tAf2ayoAlzfs82thvmpFBKMkS8bbPD17Oy+ LyFq95CCaQ== Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by mx0b-0010f301.pphosted.com (PPS) with ESMTPS id 3s5hacrd3q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 30 Jul 2023 12:35:04 -0500 (CDT) Received-X: from mh3.mail.rice.edu (localhost [127.0.0.1]) by mh3.mail.rice.edu (Postfix) with ESMTP id A19EA604084; Sun, 30 Jul 2023 12:35:03 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mh3.mail.rice.edu (Postfix) with ESMTP id A02496037D9; Sun, 30 Jul 2023 12:35:03 -0500 (CDT) X-Virus-Scanned: by amavis-2.12.1 at mh3.mail.rice.edu, auth channel Received: from mh3.mail.rice.edu ([127.0.0.1]) by localhost (mh3.mail.rice.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QKheXE1uBzcN; Sun, 30 Jul 2023 12:35:03 -0500 (CDT) Received: from [108.254.203.201] (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id E8617209EA5; Sun, 30 Jul 2023 12:35:02 -0500 (CDT) Message-ID: Date: Sun, 30 Jul 2023 12:35:02 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: git: 50d663b14b31 - main - vm: Fix vm_map_find_min() Content-Language: en-US To: Dmitry Chagin , Alan Cox Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202307260525.36Q5PbRm027006@gitrepo.freebsd.org> From: Alan Cox In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-27_10,2023-07-26_01,2023-05-22_02 X-Rspamd-Queue-Id: 4RDT640Myvz3DGM X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:22843, ipnet:148.163.152.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated I see.  That change fixed the case where the address hint is non-zero, e.g., 0x100000, but not zero. On 7/30/23 05:58, Dmitry Chagin wrote: > On Sun, Jul 30, 2023 at 01:30:37PM +0300, Dmitry Chagin wrote: >> On Wed, Jul 26, 2023 at 05:25:37AM +0000, Alan Cox wrote: >>> The branch main has been updated by alc: >>> >>> URL: https://urldefense.com/v3/__https://cgit.FreeBSD.org/src/commit/?id=50d663b14b310d6020b4b6cc92d4fae985f086f2__;!!BuQPrrmRaQ!mJGmkdRJ06TT6ocFnVe7lPS7hSNIIhrCQH9IKMbB6XZVJuiUc2_wPJ55o1zzD6AhClmQwgQKHvKnW4rs75yVrtax$ >>> >>> commit 50d663b14b310d6020b4b6cc92d4fae985f086f2 >>> Author: Alan Cox >>> AuthorDate: 2023-07-25 07:24:19 +0000 >>> Commit: Alan Cox >>> CommitDate: 2023-07-26 05:24:50 +0000 >>> >>> vm: Fix vm_map_find_min() >>> >>> Fix the handling of address hints that are less than min_addr by >>> vm_map_find_min(). >>> >> Thank you for fixing that, however it still fails under Linuxulator. >> >> >> #include >> #include >> >> #include >> #include >> #include >> #include >> #include >> #include >> >> int >> main(int argc, char** argv) >> { >> struct stat sb; >> void *s32; >> int f, r; >> >> f = open(argv[0], O_RDONLY); >> assert(f > 0); >> >> r = fstat(f, &sb); >> assert(r == 0); >> >> s32 = mmap(NULL, sb.st_size, PROT_READ, >> MAP_32BIT|MAP_PRIVATE, f, 0); >> assert(s32 != MAP_FAILED); >> assert((uintptr_t)s32 < 0x80000000); >> >> close(f); >> munmap(s32, sb.st_size); >> return (0); >> } >> > hmm, it also fails natively with disable aslr > > >> >>> Reported by: dchagin >>> Reviewed by: kib >>> Fixes: d8e6f4946cec0 "vm: Fix anonymous memory clustering under ASLR" >>> Differential Revision: https://urldefense.com/v3/__https://reviews.freebsd.org/D41159__;!!BuQPrrmRaQ!mJGmkdRJ06TT6ocFnVe7lPS7hSNIIhrCQH9IKMbB6XZVJuiUc2_wPJ55o1zzD6AhClmQwgQKHvKnW4rs70ygLqzX$ >>> --- >>> sys/vm/vm_map.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c >>> index 444e09986d4e..eb607d519247 100644 >>> --- a/sys/vm/vm_map.c >>> +++ b/sys/vm/vm_map.c >>> @@ -2255,10 +2255,10 @@ vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset, >>> int rv; >>> >>> hint = *addr; >>> - if (hint == 0) >>> + if (hint == 0) { >>> cow |= MAP_NO_HINT; >>> - if (hint < min_addr) >>> *addr = hint = min_addr; >>> + } >>> for (;;) { >>> rv = vm_map_find(map, object, offset, addr, length, max_addr, >>> find_space, prot, max, cow); From nobody Sun Jul 30 20:21:05 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDXnb3wKzz4pQ2s; Sun, 30 Jul 2023 20:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDXnZ20Xvz3lrc; Sun, 30 Jul 2023 20:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690748466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K9x16U0V7DBwWUeEVrms4iUIBjd0tdIyrxrgYzFW8oM=; b=jtDZP5+W8CWxZh+D85ps4w0ltHHbwfXfY0shdcswQ89jEMzAAkEcPtLrFMZ8TDF5xdhh8F UER7h2ZiCdoO1dm44ZHDCq46bUyLq2/Xd5zeXu4Rb9uhLz4Qabg5GtBj0ByUKU3XCcyvMY Jv1scqfoGgFEascdrRKNzP9nxiCF88An5RLYFQ8QNsM5Q+L22RpQM2X86kC4iwmvyanoeA mFmMtU6db08KxIwOkXiTJREON9IGD2hfYNMA0cUKWuT12yDANwdNwOp28enhtyKuakxEPo z60n/uHnXI7xy5oacIhsJJkQC6cPQHk0HL9FLpSwN8OpHyC38i22QZ/BfnULXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690748466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K9x16U0V7DBwWUeEVrms4iUIBjd0tdIyrxrgYzFW8oM=; b=n0WIYNn/I91ib55KTk+sxfpWOZaXDbCK8NblEYy06uuMWEbMrvM6Xyu4rRux2yfAe6hkYb oKcWoLNhicmc3Flglb+hekUzdeayOdFsdIwIxDDrIX2Jh9+pmftji5ydnTUJVNbBDAnUJ7 45AIjZ3FJ8h8L1TxviDAFwtyhJ49Nb7aY4L+bzW8LRcVQEs254/OzSswF3/Tzzhj57lOHm Plz5T0g8nQzHVqTUhYqO9REVBnkOqt5T/qR7JJm1X46tHOj5TyfXWcYQm2TL96DQl1BXZE dZLYeVtxNmqlWZwLS1M06eHs+Te4zhdBlfSDSV4scPtLm96OQjvmkjZkmooG4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690748466; a=rsa-sha256; cv=none; b=BWl8mZHjzDWGVuxkq50EmLB1JDB/JCMWSqFIBzuQwsZpoeMJcoQZ22ZfSlH2rcJ8WRWvcd /15+lTQ7ML/YrcYDyFE76I9earupKBBkZIlxDVFjaynsWimj6g/mPnnYiUx5NEDo3WDWt1 cOdSANCIH+qro9p5rw2XbZlOcXhplD2Rhd8+Z6sgEriHBhAwA8TwiND2tGdqjKJLdLkHdx A911ZAcV6WCzfRD1Z6lU6mjXKJtMpzjA8FDO1Dbp0gVF4vkmqEZRcMFOdiBbIfhdNPiep2 6aJLZg+Qpn557cYwEFwThD+L6zefQJ/EASOf362MtiuqAovq7fU3i3y9Zb2G5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RDXnY4dHPzSP9; Sun, 30 Jul 2023 20:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36UKL5RG048771; Sun, 30 Jul 2023 20:21:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36UKL54O048770; Sun, 30 Jul 2023 20:21:05 GMT (envelope-from git) Date: Sun, 30 Jul 2023 20:21:05 GMT Message-Id: <202307302021.36UKL54O048770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: ac0572e66067 - main - radix_tree: compute slot from keybarr List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac0572e6606746aa0e9f39fb6439f9a20a455743 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=ac0572e6606746aa0e9f39fb6439f9a20a455743 commit ac0572e6606746aa0e9f39fb6439f9a20a455743 Author: Doug Moore AuthorDate: 2023-07-30 20:12:06 +0000 Commit: Doug Moore CommitDate: 2023-07-30 20:12:06 +0000 radix_tree: compute slot from keybarr The computation of keybarr(), the function that determines when a search has failed at a non-leaf node, can be done in a way that computes the 'slot' value when keybarr() fails, which is exactly when slot() would next be invoked. Computing things this way saves space in search loops. This reduces the amd64 coding of the search loop in vm_radix_lookup from 40 bytes to 28 bytes. Reviewed by: alc Tested by: pho (as part of a larger change) Differential Revision: https://reviews.freebsd.org/D41235 --- sys/kern/subr_pctrie.c | 57 +++++++++++++++++++++------------------------- sys/vm/vm_radix.c | 61 +++++++++++++++++++++----------------------------- 2 files changed, 51 insertions(+), 67 deletions(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index c08e4b5910a5..c0e100173adc 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -99,19 +99,26 @@ static __inline void pctrie_node_store(smr_pctnode_t *p, void *val, enum pctrie_access access); /* - * Return the position in the array for a given level. + * Map index to an array position for the children of node, */ static __inline int -pctrie_slot(uint64_t index, uint16_t level) +pctrie_slot(struct pctrie_node *node, uint64_t index) { - return ((index >> level) & PCTRIE_MASK); + return ((index >> node->pn_clev) & PCTRIE_MASK); } -/* Computes the key (index) with the low-order 'level' + 1 radix-digits zeroed. */ -static __inline uint64_t -pctrie_trimkey(uint64_t index, uint16_t level) +/* + * Returns true if index does not belong to the specified node. Otherwise, + * sets slot value, and returns false. + */ +static __inline bool +pctrie_keybarr(struct pctrie_node *node, uint64_t index, int *slot) { - return (index & -((uint64_t)PCTRIE_COUNT << level)); + index = (index - node->pn_owner) >> node->pn_clev; + if (index >= PCTRIE_COUNT) + return (true); + *slot = index; + return (false); } /* @@ -151,7 +158,8 @@ pctrie_node_get(struct pctrie *ptree, pctrie_alloc_t allocfn, uint64_t index, _Static_assert(sizeof(uint64_t) * NBBY <= (1 << (sizeof(node->pn_clev) * NBBY)), "pn_clev too narrow"); node->pn_clev = rounddown(flsll(index ^ newind) - 1, PCTRIE_WIDTH); - node->pn_owner = pctrie_trimkey(index, node->pn_clev); + node->pn_owner = PCTRIE_COUNT; + node->pn_owner = index & -(node->pn_owner << node->pn_clev); return (node); } @@ -272,24 +280,13 @@ pctrie_addnode(struct pctrie_node *node, uint64_t index, { int slot; - slot = pctrie_slot(index, node->pn_clev); + slot = pctrie_slot(node, index); pctrie_node_store(&node->pn_child[slot], child, access); node->pn_popmap ^= 1 << slot; KASSERT((node->pn_popmap & (1 << slot)) != 0, ("%s: bad popmap slot %d in node %p", __func__, slot, node)); } -/* - * Returns TRUE if it can be determined that key does not belong to the - * specified node. Otherwise, returns FALSE. - */ -static __inline bool -pctrie_keybarr(struct pctrie_node *node, uint64_t idx) -{ - idx = pctrie_trimkey(idx, node->pn_clev); - return (idx != node->pn_owner); -} - /* * Internal helper for pctrie_reclaim_allnodes(). * This function is recursive. @@ -377,11 +374,10 @@ pctrie_insert(struct pctrie *ptree, uint64_t *val, pctrie_alloc_t allocfn) __func__, (uintmax_t)index); break; } - if (pctrie_keybarr(node, index)) { + if (pctrie_keybarr(node, index, &slot)) { newind = node->pn_owner; break; } - slot = pctrie_slot(index, node->pn_clev); parent = node; node = pctrie_node_load(&node->pn_child[slot], NULL, PCTRIE_LOCKED); @@ -424,9 +420,8 @@ _pctrie_lookup(struct pctrie *ptree, uint64_t index, smr_t smr, return (m); break; } - if (pctrie_keybarr(node, index)) + if (pctrie_keybarr(node, index, &slot)) break; - slot = pctrie_slot(index, node->pn_clev); node = pctrie_node_load(&node->pn_child[slot], smr, access); } return (NULL); @@ -494,7 +489,7 @@ pctrie_lookup_ge(struct pctrie *ptree, uint64_t index) return (m); break; } - if (pctrie_keybarr(node, index)) { + if (pctrie_keybarr(node, index, &slot)) { /* * If all values in this subtree are > index, then the * least value in this subtree is the answer. @@ -503,7 +498,6 @@ pctrie_lookup_ge(struct pctrie *ptree, uint64_t index) succ = node; break; } - slot = pctrie_slot(index, node->pn_clev); /* * Just in case the next search step leads to a subtree of all @@ -528,7 +522,7 @@ pctrie_lookup_ge(struct pctrie *ptree, uint64_t index) * Take a step to the next bigger sibling of the node chosen * last time. In that subtree, all values > index. */ - slot = pctrie_slot(index, succ->pn_clev) + 1; + slot = pctrie_slot(succ, index) + 1; KASSERT((succ->pn_popmap >> slot) != 0, ("%s: no popmap siblings past slot %d in node %p", __func__, slot, succ)); @@ -574,12 +568,11 @@ pctrie_lookup_le(struct pctrie *ptree, uint64_t index) return (m); break; } - if (pctrie_keybarr(node, index)) { + if (pctrie_keybarr(node, index, &slot)) { if (node->pn_owner < index) pred = node; break; } - slot = pctrie_slot(index, node->pn_clev); if ((node->pn_popmap & ((1 << slot) - 1)) != 0) pred = node; node = pctrie_node_load(&node->pn_child[slot], NULL, @@ -588,7 +581,7 @@ pctrie_lookup_le(struct pctrie *ptree, uint64_t index) if (pred == NULL) return (NULL); if (pred != node) { - slot = pctrie_slot(index, pred->pn_clev); + slot = pctrie_slot(pred, index); KASSERT((pred->pn_popmap & ((1 << slot) - 1)) != 0, ("%s: no popmap siblings before slot %d in node %p", __func__, slot, pred)); @@ -624,7 +617,7 @@ pctrie_remove(struct pctrie *ptree, uint64_t index, pctrie_free_t freefn) break; parent = node; node = child; - slot = pctrie_slot(index, node->pn_clev); + slot = pctrie_slot(node, index); child = pctrie_node_load(&node->pn_child[slot], NULL, PCTRIE_LOCKED); } @@ -649,7 +642,7 @@ pctrie_remove(struct pctrie *ptree, uint64_t index, pctrie_free_t freefn) if (parent == NULL) pctrie_root_store(ptree, child, PCTRIE_LOCKED); else { - slot = pctrie_slot(index, parent->pn_clev); + slot = pctrie_slot(parent, index); KASSERT(node == pctrie_node_load(&parent->pn_child[slot], NULL, PCTRIE_LOCKED), ("%s: invalid child value", __func__)); diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index f50f9e3605a1..c678bfe1baa7 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -126,20 +126,26 @@ static void vm_radix_node_store(smrnode_t *p, struct vm_radix_node *v, enum vm_radix_access access); /* - * Return the position in the array for a given level. + * Map index to an array position for the children of rnode, */ static __inline int -vm_radix_slot(vm_pindex_t index, uint16_t level) +vm_radix_slot(struct vm_radix_node *rnode, vm_pindex_t index) { - return ((index >> level) & VM_RADIX_MASK); + return ((index >> rnode->rn_clev) & VM_RADIX_MASK); } -/* Computes the key (index) with the low-order 'level' + 1 radix-digits - * zeroed. */ -static __inline vm_pindex_t -vm_radix_trimkey(vm_pindex_t index, uint16_t level) +/* + * Returns true if index does not belong to the specified rnode. Otherwise, + * sets slot value, and returns false. + */ +static __inline bool +vm_radix_keybarr(struct vm_radix_node *rnode, vm_pindex_t index, int *slot) { - return (index & -((vm_pindex_t)VM_RADIX_COUNT << level)); + index = (index - rnode->rn_owner) >> rnode->rn_clev; + if (index >= VM_RADIX_COUNT) + return (true); + *slot = index; + return (false); } /* @@ -177,7 +183,8 @@ vm_radix_node_get(vm_pindex_t index, vm_pindex_t newind) _Static_assert(sizeof(vm_pindex_t) * NBBY <= (1 << (sizeof(rnode->rn_clev) * NBBY)), "rn_clev too narrow"); rnode->rn_clev = rounddown(flsll(index ^ newind) - 1, VM_RADIX_WIDTH); - rnode->rn_owner = vm_radix_trimkey(index, rnode->rn_clev); + rnode->rn_owner = VM_RADIX_COUNT; + rnode->rn_owner = index & -(rnode->rn_owner << rnode->rn_clev); return (rnode); } @@ -298,24 +305,13 @@ vm_radix_addnode(struct vm_radix_node *rnode, vm_pindex_t index, { int slot; - slot = vm_radix_slot(index, rnode->rn_clev); + slot = vm_radix_slot(rnode, index); vm_radix_node_store(&rnode->rn_child[slot], child, access); rnode->rn_popmap ^= 1 << slot; KASSERT((rnode->rn_popmap & (1 << slot)) != 0, ("%s: bad popmap slot %d in rnode %p", __func__, slot, rnode)); } -/* - * Returns TRUE if it can be determined that key does not belong to the - * specified rnode. Otherwise, returns FALSE. - */ -static __inline bool -vm_radix_keybarr(struct vm_radix_node *rnode, vm_pindex_t idx) -{ - idx = vm_radix_trimkey(idx, rnode->rn_clev); - return (idx != rnode->rn_owner); -} - /* * Internal helper for vm_radix_reclaim_allnodes(). * This function is recursive. @@ -432,11 +428,10 @@ vm_radix_insert(struct vm_radix *rtree, vm_page_t page) __func__, (uintmax_t)index); break; } - if (vm_radix_keybarr(rnode, index)) { + if (vm_radix_keybarr(rnode, index, &slot)) { newind = rnode->rn_owner; break; } - slot = vm_radix_slot(index, rnode->rn_clev); parent = rnode; rnode = vm_radix_node_load(&rnode->rn_child[slot], LOCKED); } @@ -479,9 +474,8 @@ _vm_radix_lookup(struct vm_radix *rtree, vm_pindex_t index, return (m); break; } - if (vm_radix_keybarr(rnode, index)) + if (vm_radix_keybarr(rnode, index, &slot)) break; - slot = vm_radix_slot(index, rnode->rn_clev); rnode = vm_radix_node_load(&rnode->rn_child[slot], access); } return (NULL); @@ -551,7 +545,7 @@ vm_radix_lookup_ge(struct vm_radix *rtree, vm_pindex_t index) return (m); break; } - if (vm_radix_keybarr(rnode, index)) { + if (vm_radix_keybarr(rnode, index, &slot)) { /* * If all pages in this subtree have pindex > index, * then the page in this subtree with the least pindex @@ -561,7 +555,6 @@ vm_radix_lookup_ge(struct vm_radix *rtree, vm_pindex_t index) succ = rnode; break; } - slot = vm_radix_slot(index, rnode->rn_clev); /* * Just in case the next search step leads to a subtree of all @@ -585,7 +578,7 @@ vm_radix_lookup_ge(struct vm_radix *rtree, vm_pindex_t index) * Take a step to the next bigger sibling of the node chosen * last time. In that subtree, all pages have pindex > index. */ - slot = vm_radix_slot(index, succ->rn_clev) + 1; + slot = vm_radix_slot(succ, index) + 1; KASSERT((succ->rn_popmap >> slot) != 0, ("%s: no popmap siblings past slot %d in node %p", __func__, slot, succ)); @@ -630,12 +623,11 @@ vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index) return (m); break; } - if (vm_radix_keybarr(rnode, index)) { + if (vm_radix_keybarr(rnode, index, &slot)) { if (rnode->rn_owner < index) pred = rnode; break; } - slot = vm_radix_slot(index, rnode->rn_clev); if ((rnode->rn_popmap & ((1 << slot) - 1)) != 0) pred = rnode; rnode = vm_radix_node_load(&rnode->rn_child[slot], LOCKED); @@ -643,7 +635,7 @@ vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index) if (pred == NULL) return (NULL); if (pred != rnode) { - slot = vm_radix_slot(index, pred->rn_clev); + slot = vm_radix_slot(pred, index); KASSERT((pred->rn_popmap & ((1 << slot) - 1)) != 0, ("%s: no popmap siblings before slot %d in node %p", __func__, slot, pred)); @@ -677,7 +669,7 @@ vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index) break; parent = rnode; rnode = child; - slot = vm_radix_slot(index, rnode->rn_clev); + slot = vm_radix_slot(rnode, index); child = vm_radix_node_load(&rnode->rn_child[slot], LOCKED); } if ((m = vm_radix_topage(child)) == NULL || m->pindex != index) @@ -700,7 +692,7 @@ vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index) if (parent == NULL) vm_radix_root_store(rtree, child, LOCKED); else { - slot = vm_radix_slot(index, parent->rn_clev); + slot = vm_radix_slot(parent, index); KASSERT(rnode == vm_radix_node_load(&parent->rn_child[slot], LOCKED), ("%s: invalid child value", __func__)); @@ -762,9 +754,8 @@ vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage) } break; } - if (vm_radix_keybarr(rnode, index)) + if (vm_radix_keybarr(rnode, index, &slot)) break; - slot = vm_radix_slot(index, rnode->rn_clev); parent = rnode; rnode = vm_radix_node_load(&rnode->rn_child[slot], LOCKED); } From nobody Sun Jul 30 22:50:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDc6J5lS1z4pYHv; Sun, 30 Jul 2023 22:50:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDc6B3r1Rz3wtX; Sun, 30 Jul 2023 22:50:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=cPozs82V; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::112b as permitted sender) smtp.mailfrom=markjdb@gmail.com; dmarc=none Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-583f837054eso46223257b3.3; Sun, 30 Jul 2023 15:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690757440; x=1691362240; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=ZkrUp9DomS0MNBj4FcWKqpW9q5QyL2RgbdtbOcYwrz0=; b=cPozs82VdNWpTgCs+6WT9ps/UKaomooOWWIDR2SiJTfpu6OG2pAghJnQyQWzK9ajkF FQiJnM5FQDUeI3t9jjluHZl4GUVKxqpN8ACaSeO2gHAcN9Erf0fV+9RtpdCyI+YYDBso X1QMuTubp3Y12JBdiMDpLF0kwHaKSKaYctg/1JMZMkpbH2McZH/vAIU/Q8lw9XSpKj4V ogc7B9WGQ7c3HPaPX7KvkSf0s5HLZ2t3/PV1qdfNKV6A4xpFZw3QLZKlmtY7h4vVW+hl KO8O80qawD/Vyptlx/bNtyjlOyUbRWVkMjeTJmDhSkNXSyeXeUCXvIH6kbU17mpFT8ji vY3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690757440; x=1691362240; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZkrUp9DomS0MNBj4FcWKqpW9q5QyL2RgbdtbOcYwrz0=; b=NLum+1JAhHyBvjbXZIQlbLyDTr3OfBkNisT/DF4jTzbeJZgZTQYTcz3q1Gb0w1yKWe aKEgJ8k9GSJUmCuLC48E+SIfkMrzBK0FmwDz5urAjHoY7HFS99uvh8xg90I7xMPyyZ5X sh3yKD4qO+VSuKJUxNDCRdaUif7OGpQjMwPkj6FIkFzmWopysS7RV6N5/5xYN0eJoMR4 Eb+dra3JbJlIRDmHneqzat8ZRlVaINHaMw0X3TmfHvZwK2VK3REiYgtnGcX/ao4OQ2kW YPtaKhGLGuCx+QdoZzf/tevH2yGSNaLlZbJh7QAdvWxZQFyPw2eY600ftMlnRCXy7tvy dVsw== X-Gm-Message-State: ABy/qLZX/NUfthxav9TgJe3kOwRHb8mmOPKyyo0jOcb1zVK8zCAHJEfh NqVXo2hj/67oHQXCSa8i4KeaMIBrC90= X-Google-Smtp-Source: APBJJlExZaHvqhDIVhl27XeYHjcv9kQ5quhX9ReXxbqa7BLCyOJewM4KsqgxgOkKDUDDj12o+iHMSg== X-Received: by 2002:a81:5d56:0:b0:583:d9dd:38e1 with SMTP id r83-20020a815d56000000b00583d9dd38e1mr9498912ywb.18.1690757439763; Sun, 30 Jul 2023 15:50:39 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id a15-20020a05620a16cf00b0076c94030a2esm1795961qkn.114.2023.07.30.15.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jul 2023 15:50:38 -0700 (PDT) Date: Sun, 30 Jul 2023 18:50:36 -0400 From: Mark Johnston To: Jessica Clarke Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 65f28f63a73d - main - tools/build: Create toolchain symlinks for non-absolute compiler/linker Message-ID: References: <202307270412.36R4C2vh097664@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202307270412.36R4C2vh097664@gitrepo.freebsd.org> X-Spamd-Result: default: False [-2.64 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-0.995]; NEURAL_HAM_LONG(-0.98)[-0.983]; NEURAL_HAM_MEDIUM(-0.96)[-0.964]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::112b:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4RDc6B3r1Rz3wtX X-Spamd-Bar: -- On Thu, Jul 27, 2023 at 04:12:02AM +0000, Jessica Clarke wrote: > The branch main has been updated by jrtc27: > > URL: https://cgit.FreeBSD.org/src/commit/?id=65f28f63a73d3371d9d724a2018be6d1ada0d3e0 > > commit 65f28f63a73d3371d9d724a2018be6d1ada0d3e0 > Author: Jessica Clarke > AuthorDate: 2023-07-27 04:10:47 +0000 > Commit: Jessica Clarke > CommitDate: 2023-07-27 04:10:47 +0000 > > tools/build: Create toolchain symlinks for non-absolute compiler/linker > > If any of the toolchain variables are not absolute then we need to > create a symlink in WORLDTMP/legacy/bin in order to make them available > during a BUILD_WITH_STRICT_TMPPATH build. This commit appears to break a 13.0-RELEASE jail's ability to build world from the main branch. Specifically, while building clang during the cross tools stage, lib/Support/BLAKE3/blake3.c can't be compiled because immintrin.h isn't found. The host compiler is clang 11.0.1. Some experimentation shows that this version of clang, when invoked using the absolute path of the symlink in tmp/legacy/usr/bin created as of this commit, does not search /usr/lib/clang/11.0.1 for immintrin.h. It only looks in /usr/include. If I invoke clang using a relative path to the symlink, it finds immintrin.h. Newer versions of LLVM don't have this (buggy?) behaviour, they search their resource directory in either case. Is this a bug in the commit, or does this just mean that I need to upgrade my jail? I'm not sure what guarantees we provide with respect to origin versions of source upgrades. From nobody Mon Jul 31 02:28:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDhxk40JYz4ph0W; Mon, 31 Jul 2023 02:28:41 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oo1-xc30.google.com (mail-oo1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDhxg4jTWz4T81; Mon, 31 Jul 2023 02:28:39 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=nW93qiMl; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2607:f8b0:4864:20::c30 as permitted sender) smtp.mailfrom=mjguzik@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-56c74961e0cso1654263eaf.3; Sun, 30 Jul 2023 19:28:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690770518; x=1691375318; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IZpMzCBvink2StQ0JZV+aJeR40m+hbM6FIIegopVNKA=; b=nW93qiMlOwnG+5C47F826GjsZvzeXGvXNV8uQeKqYgsPXWnCc2VoPfNUDSuXNX0LEX UNiRUfN9Ke52cCgHFbr+X2h3ke21o1X3ipfLHupZhnPK6Zw3anLaiiJS9M3nicilYf/h 9xWccuNci/8Y7n6DgPoGzjc9TKVL/SFIptV1eYIyaAj0fGz/rLGqCbN9zwF+dCU0GF4o 1K3ucmxyL5l3zQuBWw9YvQxbWMAxGfzdQ74qjjKnrue+FxeADZxWwiG2Hq9FztBNR8IS eGtULVoishkAhaxaROib9QncDXSsY5NwN4xwydEzX0vhQbgQ0jesuGCQje1b+b2enilm 0Y0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690770518; x=1691375318; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IZpMzCBvink2StQ0JZV+aJeR40m+hbM6FIIegopVNKA=; b=ghmeUZVLzdU6w7WclsjRstmUt/CwIiUHPXdW2URlda537ivlN7vMf7BoIkkz9BUfe8 rCvsUOCjyxnAhqBcz/x0EZiv0/wUu+ClO11hl0CXGCbzUt1e0Cf1F55e55f+3GEpy+CQ XApKkD1YtleIssje+QE653IvPeQ7kBlpwNj/ETpy5a3jBywODCSdFSMpUYxUfBf2m7ED qFmsG/5aNKXIz/tfxqDszdjmKZxVNXed1QkyC7zCTK2V7QI+vR6W4YpeVE1HZC0U68OF IgVxSU5EeO8ttSvsY/AYrhEgO6V/+4fSIC+5f5jh8eo0ZAl3N/e0/wqaNkwR8j3V2Tr/ EO3g== X-Gm-Message-State: ABy/qLbh/CChcCADU7kkr6/ikHa5bBWOCRSsjQHsebLP+CTmHLzFw8i6 GDjirA/uEaC8qaEiHcK8LQX1v9efjeBBCQR6g0Q= X-Google-Smtp-Source: APBJJlFVVowMWDWHGrK0yPcFWehuLGOILmtv3tQgsWGcfhzvvGHdLAYze4iWfJqPcdVzNgZYPmGF0p9gIC7MC1AO80M= X-Received: by 2002:a4a:8299:0:b0:565:cf26:5a10 with SMTP id e25-20020a4a8299000000b00565cf265a10mr6350350oog.0.1690770518199; Sun, 30 Jul 2023 19:28:38 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:614e:0:b0:4f0:1250:dd51 with HTTP; Sun, 30 Jul 2023 19:28:37 -0700 (PDT) In-Reply-To: References: <202307242203.36OM3IwQ009522@gitrepo.freebsd.org> From: Mateusz Guzik Date: Mon, 31 Jul 2023 04:28:37 +0200 Message-ID: Subject: Re: git: 5b353925ff61 - main - vnode read(2)/write(2): acquire rangelock regardless of do_vn_io_fault() To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-3.45 / 15.00]; NEURAL_HAM_MEDIUM(-0.94)[-0.940]; NEURAL_HAM_SHORT(-0.93)[-0.927]; NEURAL_HAM_LONG(-0.58)[-0.583]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::c30:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MIME_TRACE(0.00)[0:+]; FREEMAIL_TO(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4RDhxg4jTWz4T81 X-Spamd-Bar: --- On 7/28/23, Konstantin Belousov wrote: > On Fri, Jul 28, 2023 at 02:17:51AM +0200, Mateusz Guzik wrote: >> On 7/25/23, Konstantin Belousov wrote: >> > The branch main has been updated by kib: >> > >> > URL: >> > https://cgit.FreeBSD.org/src/commit/?id=5b353925ff61b9ddb97bb453ba75278b578ed7d9 >> > >> > commit 5b353925ff61b9ddb97bb453ba75278b578ed7d9 >> > Author: Konstantin Belousov >> > AuthorDate: 2023-07-23 15:55:50 +0000 >> > Commit: Konstantin Belousov >> > CommitDate: 2023-07-24 22:02:59 +0000 >> > >> > vnode read(2)/write(2): acquire rangelock regardless of >> > do_vn_io_fault() >> > >> > To ensure atomicity of reads against parallel writes and truncates, >> > vnode lock was not enough at least since introduction of >> > vn_io_fault(). >> > That code only take rangelock when it was possible that vn_read() >> > and >> > vn_write() could drop the vnode lock. >> > >> > At least since the introduction of VOP_READ_PGCACHE() which >> > generally >> > does not lock the vnode at all, rangelocks become required even >> > for filesystems that do not need vn_io_fault() workaround. For >> > instance, tmpfs. >> > >> >> Is there a bug with pgcache reads disabled (as in when the vnode lock >> is held for reads?) >> >> Note this patch adds 2 lock trips which were previously not present, >> which has to slow things down single-threaded, but I did not bother >> measuring that part. >> >> As this adds to vnode-wide *lock* acquires this has to very negatively >> affect scalability. >> >> This time around I ran: ./readseek3_processes -t 10 (10 workers >> reading from *disjoint* offsets from the same vnode. this in principle >> can scale perfectly) >> >> I observed a 90% drop in performance: >> before: total:25723459 ops/s >> after: total:2455794 ops/s >> >> Going to an unpatched kernel and disabling pgcache reads instead: >> disabled: total:6522480 ops/s >> >> or about 2.6x of performance of the current kernel >> >> In other words I think the thing to do here is to revert the patch and >> instead flip pgcache reads to off by default until a better fix can be >> implemented. > > The rangelock purpose is to ensure atomicity of reads in presence of > writes. In other words, taking the rangelock there is architecturally > right. Also, it fixes issues with truncation that are not fixable with > the vnode lock on tmpfs vnodes anyway. > How come? I see vn_truncate xlocking the vnode across the entire thing. If all tmpfs reads slock and all writes xlock the vnode, everyone gets protection against truncation as is. > That said, disabling pgcache vop on tmpfs means that the regular read vop > is always used, which takes the vnode lock around reads. So I doubt that > the changed disposition would gain much in your test. > I pasted a benchmark number without pgcache and without the change, clearly showing that rangelock + pgcache loses big time to mere vnode locking. > The proper future fix would be to improve scalability of the rangelocks, > whose naive stop-gap implementation I did initially in time of current-7 > or -8 was not changed at all. > I agree rangelocks should be fixed. But in the meantime, the patch at hand seems to be too heavy handed to fix the issue (and disabling pgcache reads would do it just fine instead). > BTW, it seems that file offset locks are no longer needed, but I need to > recheck it. This should shave off four atomics on read and write path. > -- Mateusz Guzik From nobody Mon Jul 31 07:07:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDq8J4HzHz4psql; Mon, 31 Jul 2023 07:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDq7z2JNNz3KSL; Mon, 31 Jul 2023 07:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690787279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TFq8zBeg8xL6P0BoYanux9zAajYUj8GYoREfZWZ2Pwo=; b=sFDB/PyRwi0U41FKVVu4+sI0zIsPoOXiS23nk0uy8fUzKxtTJFdrAXYXFx5U2sq7dnSgy9 j1beWbutZ8FigLzDWU4Ks4bDjyEPN2CKYuwZmmeXz9DLAn+em+UrlXiyhuHeeqqha8jMsL 7i3fNLS0AMse+C5dxTSOD6hkP8/zELp0jFJQZ3+dzy9nXMt7Tid+6rwrd4oz05GqnlWKG+ zTQKanu2wTOdEJVjlo+6MWHVFpUdfVLKIY1pI3CI1pb1MpxuXmEDoR4RoPSV9bvzK6mRqa qb35i+d3a1RxvG8hKUYp8g2dU3yUV1bJzkVBClZQIvfGyR2EtQWE5T595o5OPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690787279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TFq8zBeg8xL6P0BoYanux9zAajYUj8GYoREfZWZ2Pwo=; b=VivcwoDsOZRI8cRxiE32ReiKZUUVnbRoNeqfzMk6eh5vZXjIlKzTGIM/yaNRAX38OVbsFS IOcXHnemKHgM+AP216E/w9ihaaSsXbZTX46C/AdjQTsXAnG/v1hrLiUTvb/eRPq1JFDueH 5Fumk2HgBJwT3JvPbkZGcJYt80wFvceBFqJRAj/5xCUzfYBHNrU7NjbD2Mg03bruMBzDlC Fiv9t8HPBLEJi0p95uxiLnyjjVVYCxXyh3OOOnxIsF/06lFm3anFR/IhEPnvNixz4zlcEs 20DIXGLswSq6DtnFiU6Smw48fldzpBE/n7l/vglhlV7UgBetVU0oi3i+wCQ38g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690787279; a=rsa-sha256; cv=none; b=Y1s198S14flhx+yOUH/jWGyHojSSpd8jMxfB2cA7GHO6Iwe9WNwJgps2jtXx8oMPaCsj6P E1Cp8+clf5QdpYg2HeCBCL7IqA68MfiZ746+EecGzuy96GcluJxZig25mpLYN3+TX87fqU o0H5IbVq6GM2CkU7X4cPyIhtTpMOkYYeFHsC6tbBVbBPgWEtwLeC/BXahWzNehRmePEyZo VUVeI9Fb1rjT/JKwpMeEVeAIcc3xl+sU0KUjUYnkf7KzdqAqUQX9Z2XfPRiR+GI9tXG8Dc WNVifTk8jbQ9vd3USqHiJBmxWClsgbZh2sBq+LKlIsQ8v9jmkvKvH5BCxEBSOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RDq7y5Km4zmVN; Mon, 31 Jul 2023 07:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36V77w4H014587; Mon, 31 Jul 2023 07:07:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36V77wCd014586; Mon, 31 Jul 2023 07:07:58 GMT (envelope-from git) Date: Mon, 31 Jul 2023 07:07:58 GMT Message-Id: <202307310707.36V77wCd014586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 896809e29675 - main - stress2: Added killpg(2) scenarios List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 896809e296752c54884bde3b04cce213938dfa26 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=896809e296752c54884bde3b04cce213938dfa26 commit 896809e296752c54884bde3b04cce213938dfa26 Author: Peter Holm AuthorDate: 2023-07-31 07:07:06 +0000 Commit: Peter Holm CommitDate: 2023-07-31 07:07:06 +0000 stress2: Added killpg(2) scenarios --- tools/test/stress2/misc/killpg2.sh | 197 +++++++++++++++++++++++++++++++++++++ tools/test/stress2/misc/killpg3.sh | 192 ++++++++++++++++++++++++++++++++++++ tools/test/stress2/misc/killpg4.sh | 114 +++++++++++++++++++++ 3 files changed, 503 insertions(+) diff --git a/tools/test/stress2/misc/killpg2.sh b/tools/test/stress2/misc/killpg2.sh new file mode 100755 index 000000000000..5e986f059637 --- /dev/null +++ b/tools/test/stress2/misc/killpg2.sh @@ -0,0 +1,197 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Peter Holm +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +# killpg(2) version of reaper.sh. No problems seen. + +. ../default.cfg + +prog=$(basename "$0" .sh) +cat > /tmp/$prog.c < +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static volatile u_int *share; + +#define CONT 0 +#define GID 1 +#define SYNC 2 +#define MAXP 10000 + +static void +hand(int i __unused) { + _exit(0); +} + +static void +looper(void) +{ + struct sigaction sa; + time_t start; + struct passwd *pw; + pid_t pids[MAXP]; + int i, parallel; + + setproctitle("looper"); + sa.sa_handler = SIG_IGN; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + if (sigaction(SIGUSR1, &sa, NULL) == -1) + err(1, "sigaction"); + + if ((pw = getpwnam("TUSER")) == NULL) + err(1, "no such user: TUSER"); + + if (setgroups(1, &pw->pw_gid) || + setegid(pw->pw_gid) || setgid(pw->pw_gid) || + seteuid(pw->pw_uid) || setuid(pw->pw_uid)) + err(1, "Can't drop privileges to \"TUSER\""); + endpwent(); + setpgrp(0, 0); + share[GID] = getpgrp(); + share[SYNC] = 1; + start = time(NULL); + while (time(NULL) - start < 120) { + parallel = arc4random() % MAXP + 1; + for (i = 0; i < parallel; i++) { + if ((pids[i] = fork()) == 0) { + sa.sa_handler = hand; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + if (sigaction(SIGUSR1, &sa, NULL) == -1) + err(1, "sigaction"); + setproctitle("child"); + for (;;) + pause(); + _exit(0); /* never reached */ + } + if (pids[i] == -1) + err(1, "fork()"); + } + for (i = 0; i < parallel; i++) { + if (waitpid(pids[i], NULL, 0) != pids[i]) + err(1, "waitpid(%d) in looper", pids[i]); + } + } + _exit(0); +} + +static void +killer(void) +{ + int e, gid; + + while (share[SYNC] == 0) + ; + gid = share[GID]; + while (share[CONT] == 1) { + usleep(arc4random() % 50000); + gid = share[GID]; + if (gid != 0) { + e = 0; + while (e == 0) { + if (killpg(gid, SIGUSR1) == -1) { + e = 1; + if (errno != ESRCH) + err(1, "pgkill(%d)", gid); + } + usleep(5000 + arc4random() % 5000); + } + } + } + _exit(0); +} + +int +main(void) +{ + size_t len; + time_t start; + int lpid, kpid, s1, s2; + + len = PAGE_SIZE; + if ((share = mmap(NULL, len, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED) + err(1, "mmap"); + + start = time(NULL); + while (time(NULL) - start < 120) { + share[CONT] = 1; + share[GID] = 0; + share[SYNC] = 0; + if ((lpid = fork()) == 0) + looper(); + usleep(arc4random() % 100000); + if ((kpid = fork()) == 0) + killer(); + + if (waitpid(lpid, &s1, 0) != lpid) + err(1, "waitpid looper"); + usleep(arc4random() % 1000); + share[CONT] = 0; + waitpid(kpid, &s2, 0); + } + + return (0); +} +EOF +sed -i '' "s#TUSER#$testuser#" /tmp/$prog.c +cc -o /tmp/$prog -Wall -Wextra -O0 /tmp/$prog.c || exit 1 +rm /tmp/$prog.c + +n=1 +start=`date +%s` +while true; do + /tmp/$prog + for i in `jot 50`; do + pgrep -q $prog || break + sleep .5 + done + if pgrep -q $prog; then + e=$((`date +%s` - start)) + echo "Failed in loop #$n after $e seconds." + pgrep "$prog|timeout" | xargs ps -jp + pkill $prog + rm -f /tmp/$prog + exit 1 + fi + [ $((`date +%s` - start)) -ge 600 ] && break + n=$((n + 1)) +done +rm /tmp/$prog +exit 0 diff --git a/tools/test/stress2/misc/killpg3.sh b/tools/test/stress2/misc/killpg3.sh new file mode 100755 index 000000000000..304b3e320f2f --- /dev/null +++ b/tools/test/stress2/misc/killpg3.sh @@ -0,0 +1,192 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Peter Holm +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +# killpg(2) version of reaper.sh. No problems seen. + +. ../default.cfg + +prog=$(basename "$0" .sh) +cat > /tmp/$prog.c < +#include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static _Atomic(int) *share; + +#define GID 0 +#define PARALLEL 10 +#define RDY 1 +#define MAXP 7000 + +static void +hand(int i __unused) { + _exit(0); +} + +static void +innerloop(int parallel) +{ + pid_t pids[MAXP]; + struct sigaction sa; + int i; + + usleep(1000); + for (i = 0; i < parallel; i++) { + if ((pids[i] = fork()) == 0) { + sa.sa_handler = hand; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + if (sigaction(SIGUSR1, &sa, NULL) == -1) + err(1, "sigaction"); + atomic_fetch_add(&share[RDY], 1); + setproctitle("child"); + for (;;) + pause(); + _exit(0); /* never reached */ + } + if (pids[i] == -1) + err(1, "fork()"); + } + for (i = 0; i < parallel; i++) { + if (waitpid(pids[i], NULL, 0) != pids[i]) + err(1, "waitpid(%d) in looper", pids[i]); + } + _exit(0); +} + +static void +looper(void) +{ + struct sigaction sa; + struct passwd *pw; + pid_t pids[MAXP]; + int i, parallel; + + setproctitle("looper"); + sa.sa_handler = SIG_IGN; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + if (sigaction(SIGUSR1, &sa, NULL) == -1) + err(1, "sigaction"); + + if ((pw = getpwnam("TUSER")) == NULL) + err(1, "no such user: TUSER"); + + if (setgroups(1, &pw->pw_gid) || + setegid(pw->pw_gid) || setgid(pw->pw_gid) || + seteuid(pw->pw_uid) || setuid(pw->pw_uid)) + err(1, "Can't drop privileges to \"TUSER\""); + endpwent(); + setpgrp(0, 0); + share[GID] = getpgrp(); + parallel = arc4random() % MAXP + 1; + parallel = parallel / PARALLEL * PARALLEL; + for (i = 0; i < PARALLEL; i++) { + if ((pids[i] = fork()) == 0) + innerloop(parallel / PARALLEL); + } + while (atomic_load(&share[RDY]) != parallel) + usleep(10000); + if (killpg(share[GID], SIGUSR1) == -1) + err(1, "pgkill(%d)", share[GID]); + for (i = 0; i < 4; i++) { + if (waitpid(pids[i], NULL, 0) != pids[i]) + err(1, "waitpid(%d) in looper", pids[i]); + } + _exit(0); +} + +int +main(void) +{ + size_t len; + time_t start; + int lpid, s1; + + len = PAGE_SIZE; + if ((share = mmap(NULL, len, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED) + err(1, "mmap"); + + start = time(NULL); + while (time(NULL) - start < 120) { + share[GID] = 0; + share[RDY] = 0; + if ((lpid = fork()) == 0) + looper(); + if (waitpid(lpid, &s1, 0) != lpid) + err(1, "waitpid looper"); + } + + return (0); +} +EOF +sed -i '' "s#TUSER#$testuser#" /tmp/$prog.c +mycc -o /tmp/$prog -Wall -Wextra -O0 /tmp/$prog.c || exit 1 +rm /tmp/$prog.c + +export MAXSWAPPCT=70 +n=1 +start=`date +%s` +while true; do + ../testcases/swap/swap -t 2m -i 20 > /dev/null & + /tmp/$prog & pid=$! + st=`date +%s` + while kill -0 $pid > /dev/null 2>&1; do + e=$((`date +%s` - st)) + if [ $e -ge 120 ]; then + while pgrep -q swap; do pkill swap; done + fi + if [ $e -ge 600 ]; then + echo "Failed in loop #$n after $e seconds." + ps -jU$testuser | head -20 + kill $pid + pkill -U$testuser + wait + rm -f /tmp/$prog + exit 1 + fi + done + wait + [ $((`date +%s` - start)) -ge 300 ] && break + n=$((n + 1)) +done +rm /tmp/$prog +exit 0 diff --git a/tools/test/stress2/misc/killpg4.sh b/tools/test/stress2/misc/killpg4.sh new file mode 100755 index 000000000000..448a7f60dd4b --- /dev/null +++ b/tools/test/stress2/misc/killpg4.sh @@ -0,0 +1,114 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Peter Holm +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +# Another killpg(2) test scenario. No problems seen. + +. ../default.cfg +export prog=$(basename "$0" .sh) +set -u + +cat > /tmp/$prog.c < +#include +#include +#include +#include +#define PARALLEL 2 + +int +test(void) +{ + pid_t pid; + time_t start; + + start = time(NULL); + while (time(NULL) - start < 300) { + if ((pid = fork()) == -1) + err(1, "fork()"); + if (pid == 0) { + if (arc4random() % 100 < 20) + usleep(arc4random() % 5000); + _exit(0); /* Not reached */ + } + if (waitpid(pid, NULL, 0) != pid) + err(1, "waitpid()"); + } + _exit(0); +} + +int +main(void) +{ + pid_t pids[PARALLEL]; + int i; + + for (i = 0; i < PARALLEL; i++) { + test(); + } + for (i = 0; i < PARALLEL; i++) { + if (waitpid(pids[i], NULL, 0) != pids[i]) + err(1, "waotpid() main"); + } + +} +EOF +mycc -o /tmp/$prog -Wall -Wextra -O2 /tmp/$prog.c || exit 1 + +export MAXSWAPPCT=80 +../testcases/swap/swap -t 2m -i 5 > /dev/null 2>&1 & +sleep .5 +start=`date +%s` +while [ $((`date +%s` - start)) -lt 120 ]; do + for i in `jot 200 100`; do + ( + sl=$prog.$i + sleep=/tmp/$sl + cp /tmp/$prog $sleep + su $testuser -c "$sleep & $sleep & $sleep &" & pid=$! + for j in `jot 10`; do + pgrep -q "$sl" && break + sleep .5 + done + pgrep -q "$sl" || { echo "No start"; exit 1; } + pgid=`pgrep "$sl" | xargs ps -jp | sed 1d | \ + tail -1 | awk '{print $4}'` + [ -z "$pgid" ] && { echo "Zero pgid:$pgid"; ps aj | \ + sed -n "1p;/$sl/p"; exit 1; } + sleep 1.`jot -r 1 2 9` + kill -- -$pgid || { echo "kill -$pgid failed"; exit 1; } + wait $pid + rm -f $sleep + ) & + done + while [ `ps -U$testuser | wc -l` -gt 1 ] ; do sleep 2; done +done +while pkill swap; do :; done +wait +rm /tmp/$prog /tmp/$prog.c +exit 0 From nobody Mon Jul 31 08:44:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDsHs6Y18z4pwl9; Mon, 31 Jul 2023 08:44:56 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDsHl15kwz3hhF; Mon, 31 Jul 2023 08:44:50 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of dchagin@heemeyer.club has no SPF policy when checking 195.93.173.158) smtp.mailfrom=dchagin@heemeyer.club; dmarc=none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.2/8.16.1) with ESMTP id 36V8ikYM005068; Mon, 31 Jul 2023 11:44:46 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 36V8ik8Q005067; Mon, 31 Jul 2023 11:44:46 +0300 (MSK) (envelope-from dchagin) Date: Mon, 31 Jul 2023 11:44:46 +0300 From: Dmitry Chagin To: Michael Tuexen Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c620788150d2 - main - sctp: keep sb_acc and sb_ccc in sync Message-ID: References: <202307282217.36SMHSJD073301@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202307282217.36SMHSJD073301@gitrepo.freebsd.org> X-Spamd-Result: default: False [-1.80 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FORGED_SENDER(0.30)[dchagin@freebsd.org,dchagin@heemeyer.club]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[dchagin]; ARC_NA(0.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[dchagin@freebsd.org,dchagin@heemeyer.club] X-Rspamd-Queue-Id: 4RDsHl15kwz3hhF X-Spamd-Bar: - On Fri, Jul 28, 2023 at 10:17:28PM +0000, Michael Tuexen wrote: > The branch main has been updated by tuexen: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c620788150d274c09a070ab486602c98407d73b0 > > commit c620788150d274c09a070ab486602c98407d73b0 > Author: Michael Tuexen > AuthorDate: 2023-07-28 13:16:23 +0000 > Commit: Michael Tuexen > CommitDate: 2023-07-28 13:16:23 +0000 > > sctp: keep sb_acc and sb_ccc in sync > > PR: 260116 > MFC after: 1 week > --- Hi, Michael, perhaps some of the recent fixes have broken these tests: https://ci.freebsd.org/view/all/job/FreeBSD-main-amd64-test/lastFailedBuild/console 02:04:05 sys/netpfil/pf/sctp:basic_v4 -> epair1a: Ethernet address: 02:b9:89:4e:84:0a 02:04:05 epair1b: Ethernet address: 02:b9:89:4e:84:0b 02:04:05 epair1a: link state changed to UP 02:04:05 epair1b: link state changed to UP 02:04:06 panic: Counter goes negative 02:04:06 cpuid = 1 02:04:06 time = 1690758247 02:04:06 KDB: stack backtrace: 02:04:06 db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00a0775480 02:04:06 vpanic() at vpanic+0x149/frame 0xfffffe00a07754d0 02:04:06 panic() at panic+0x43/frame 0xfffffe00a0775530 02:04:06 sctp_abort_notification() at sctp_abort_notification/frame 0xfffffe00a0775540 02:04:06 sctp_express_handle_sack() at sctp_express_handle_sack+0x647/frame 0xfffffe00a0775640 02:04:06 sctp_process_control() at sctp_process_control+0xf62/frame 0xfffffe00a0775990 02:04:06 sctp_common_input_processing() at sctp_common_input_processing+0x561/frame 0xfffffe00a0775b10 02:04:06 sctp_input_with_port() at sctp_input_with_port+0x1fa/frame 0xfffffe00a0775be0 02:04:06 sctp_input() at sctp_input+0x10/frame 0xfffffe00a0775bf0 02:04:06 ip_input() at ip_input+0x2ab/frame 0xfffffe00a0775c50 02:04:06 netisr_dispatch_src() at netisr_dispatch_src+0xad/frame 0xfffffe00a0775cb0 02:04:06 ether_demux() at ether_demux+0x17a/frame 0xfffffe00a0775ce0 02:04:06 ether_nh_input() at ether_nh_input+0x39f/frame 0xfffffe00a0775d30 02:04:06 netisr_dispatch_src() at netisr_dispatch_src+0xad/frame 0xfffffe00a0775d90 02:04:06 ether_input() at ether_input+0xd9/frame 0xfffffe00a0775df0 02:04:06 epair_tx_start_deferred() at epair_tx_start_deferred+0xd7/frame 0xfffffe00a0775e40 02:04:06 taskqueue_run_locked() at taskqueue_run_locked+0xab/frame 0xfffffe00a0775ec0 02:04:06 taskqueue_thread_loop() at taskqueue_thread_loop+0xd3/frame 0xfffffe00a0775ef0 02:04:06 fork_exit() at fork_exit+0x82/frame 0xfffffe00a0775f30 02:04:06 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00a0775f30 02:04:06 --- trap 0xc, rip = 0xf04bf926c9a, rsp = 0xf04c04a4f48, rbp = 0xf04c04a4f60 --- > sys/netinet/sctp_os_bsd.h | 18 ++++++++++++------ > sys/netinet/sctp_output.c | 2 +- > sys/netinet/sctp_pcb.c | 2 +- > sys/netinet/sctp_var.h | 4 ++-- > sys/netinet/sctputil.c | 4 ++-- > sys/netinet/sctputil.h | 4 ++-- > 6 files changed, 20 insertions(+), 14 deletions(-) > > diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h > index 80c187b3c5ef..0d88377523c8 100644 > --- a/sys/netinet/sctp_os_bsd.h > +++ b/sys/netinet/sctp_os_bsd.h > @@ -372,11 +372,6 @@ typedef struct callout sctp_os_timer_t; > #define SCTP_CLEAR_SO_NBIO(so) ((so)->so_state &= ~SS_NBIO) > /* get the socket type */ > #define SCTP_SO_TYPE(so) ((so)->so_type) > -/* Use a macro for renaming sb_cc to sb_acc. > - * Initially sb_ccc was used, but this broke select() when used > - * with SCTP sockets. > - */ > -#define sb_cc sb_acc > /* reserve sb space for a socket */ > #define SCTP_SORESERVE(so, send, recv) soreserve(so, send, recv) > /* wakeup a socket */ > @@ -384,8 +379,19 @@ typedef struct callout sctp_os_timer_t; > /* number of bytes ready to read */ > #define SCTP_SBAVAIL(sb) sbavail(sb) > /* clear the socket buffer state */ > +#define SCTP_SB_INCR(sb, incr) \ > +{ \ > + atomic_add_int(&(sb)->sb_acc, incr); \ > + atomic_add_int(&(sb)->sb_ccc, incr); \ > +} > +#define SCTP_SB_DECR(sb, decr) \ > +{ \ > + SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_acc, decr); \ > + SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_ccc, decr); \ > +} > #define SCTP_SB_CLEAR(sb) \ > - (sb).sb_cc = 0; \ > + (sb).sb_acc = 0; \ > + (sb).sb_ccc = 0; \ > (sb).sb_mb = NULL; \ > (sb).sb_mbcnt = 0; > > diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c > index a146ad401b30..7e32cc662f38 100644 > --- a/sys/netinet/sctp_output.c > +++ b/sys/netinet/sctp_output.c > @@ -7290,7 +7290,7 @@ one_more_time: > if ((stcb->sctp_socket != NULL) && > ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || > (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { > - atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc, sp->length); > + SCTP_SB_DECR(&stcb->sctp_socket->so_snd, sp->length); > } > if (sp->data) { > sctp_m_freem(sp->data); > diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c > index 9df2f82bdaa6..220d8b72667d 100644 > --- a/sys/netinet/sctp_pcb.c > +++ b/sys/netinet/sctp_pcb.c > @@ -3612,7 +3612,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) > TAILQ_REMOVE(&inp->read_queue, sq, next); > sctp_free_remote_addr(sq->whoFrom); > if (so) > - so->so_rcv.sb_cc -= sq->length; > + SCTP_SB_DECR(&so->so_rcv, sq->length); > if (sq->data) { > sctp_m_freem(sq->data); > sq->data = NULL; > diff --git a/sys/netinet/sctp_var.h b/sys/netinet/sctp_var.h > index 8301ec38cf6e..ef01b0b6c3bd 100644 > --- a/sys/netinet/sctp_var.h > +++ b/sys/netinet/sctp_var.h > @@ -198,7 +198,7 @@ extern struct protosw sctp_seqpacket_protosw, sctp_stream_protosw; > } > > #define sctp_sbfree(ctl, stcb, sb, m) { \ > - SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_cc, SCTP_BUF_LEN((m))); \ > + SCTP_SB_DECR(sb, SCTP_BUF_LEN((m))); \ > SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_mbcnt, MSIZE); \ > if (((ctl)->do_not_ref_stcb == 0) && stcb) {\ > SCTP_SAVE_ATOMIC_DECREMENT(&(stcb)->asoc.sb_cc, SCTP_BUF_LEN((m))); \ > @@ -210,7 +210,7 @@ extern struct protosw sctp_seqpacket_protosw, sctp_stream_protosw; > } > > #define sctp_sballoc(stcb, sb, m) { \ > - atomic_add_int(&(sb)->sb_cc,SCTP_BUF_LEN((m))); \ > + SCTP_SB_INCR(sb, SCTP_BUF_LEN((m))); \ > atomic_add_int(&(sb)->sb_mbcnt, MSIZE); \ > if (stcb) { \ > atomic_add_int(&(stcb)->asoc.sb_cc, SCTP_BUF_LEN((m))); \ > diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c > index ef8d763efabf..a4d4e806c00e 100644 > --- a/sys/netinet/sctputil.c > +++ b/sys/netinet/sctputil.c > @@ -5044,7 +5044,7 @@ sctp_free_bufspace(struct sctp_tcb *stcb, struct sctp_association *asoc, > if ((stcb->sctp_socket != NULL) && > (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) || > ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE)))) { > - SCTP_SAVE_ATOMIC_DECREMENT(&stcb->sctp_socket->so_snd.sb_cc, tp1->book_size); > + SCTP_SB_DECR(&stcb->sctp_socket->so_snd, tp1->book_size); > } > } > > @@ -6121,7 +6121,7 @@ get_more_data: > if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { > sctp_sblog(&so->so_rcv, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBFREE, (int)cp_len); > } > - SCTP_SAVE_ATOMIC_DECREMENT(&so->so_rcv.sb_cc, (int)cp_len); > + SCTP_SB_DECR(&so->so_rcv, (int)cp_len); > if ((control->do_not_ref_stcb == 0) && > stcb) { > atomic_subtract_int(&stcb->asoc.sb_cc, (int)cp_len); > diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h > index 60b5661c309c..d74780cdccf7 100644 > --- a/sys/netinet/sctputil.h > +++ b/sys/netinet/sctputil.h > @@ -253,7 +253,7 @@ do { \ > } \ > if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \ > (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ > - SCTP_SAVE_ATOMIC_DECREMENT(&stcb->sctp_socket->so_snd.sb_cc, sp->length); \ > + SCTP_SB_DECR(&stcb->sctp_socket->so_snd, sp->length); \ > } \ > } \ > } while (0) > @@ -264,7 +264,7 @@ do { \ > if ((stcb->sctp_socket != NULL) && \ > ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \ > (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ > - atomic_add_int(&stcb->sctp_socket->so_snd.sb_cc,sz); \ > + SCTP_SB_INCR(&stcb->sctp_socket->so_snd, sz); \ > } \ > } while (0) > From nobody Mon Jul 31 09:35:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDtQ70xCxz4q05q; Mon, 31 Jul 2023 09:35:18 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDtPx5kGBz3lrD; Mon, 31 Jul 2023 09:35:17 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (ip4d15f6ca.dynamic.kabel-deutschland.de [77.21.246.202]) (Authenticated sender: micmac) by mail-n.franken.de (Postfix) with ESMTPSA id 5A30F82389265; Mon, 31 Jul 2023 11:35:13 +0200 (CEST) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: c620788150d2 - main - sctp: keep sb_acc and sb_ccc in sync From: tuexen@freebsd.org In-Reply-To: Date: Mon, 31 Jul 2023 11:35:12 +0200 Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202307282217.36SMHSJD073301@gitrepo.freebsd.org> To: Dmitry Chagin X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 4RDtPx5kGBz3lrD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:193.174.0.0/15, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated > On 31. Jul 2023, at 10:44, Dmitry Chagin wrote: >=20 > On Fri, Jul 28, 2023 at 10:17:28PM +0000, Michael Tuexen wrote: >> The branch main has been updated by tuexen: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc620788150d274c09a070ab486602c98= 407d73b0 >>=20 >> commit c620788150d274c09a070ab486602c98407d73b0 >> Author: Michael Tuexen >> AuthorDate: 2023-07-28 13:16:23 +0000 >> Commit: Michael Tuexen >> CommitDate: 2023-07-28 13:16:23 +0000 >>=20 >> sctp: keep sb_acc and sb_ccc in sync >>=20 >> PR: 260116 >> MFC after: 1 week >> --- >=20 > Hi, Michael, > perhaps some of the recent fixes have broken these tests: > = https://ci.freebsd.org/view/all/job/FreeBSD-main-amd64-test/lastFailedBuil= d/console Hi Dmitry, part of the change is that the macro is now checking for underflows. = This seems to trigger (Counter goes negative). I guess the patch is not breaking any = tests, but highlighting a problem. Will look into it. Best regards Michael >=20 > 02:04:05 sys/netpfil/pf/sctp:basic_v4 -> epair1a: Ethernet address: = 02:b9:89:4e:84:0a > 02:04:05 epair1b: Ethernet address: 02:b9:89:4e:84:0b > 02:04:05 epair1a: link state changed to UP > 02:04:05 epair1b: link state changed to UP > 02:04:06 panic: Counter goes negative > 02:04:06 cpuid =3D 1 > 02:04:06 time =3D 1690758247 > 02:04:06 KDB: stack backtrace: > 02:04:06 db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xfffffe00a0775480 > 02:04:06 vpanic() at vpanic+0x149/frame 0xfffffe00a07754d0 > 02:04:06 panic() at panic+0x43/frame 0xfffffe00a0775530 > 02:04:06 sctp_abort_notification() at sctp_abort_notification/frame = 0xfffffe00a0775540 > 02:04:06 sctp_express_handle_sack() at = sctp_express_handle_sack+0x647/frame 0xfffffe00a0775640 > 02:04:06 sctp_process_control() at sctp_process_control+0xf62/frame = 0xfffffe00a0775990 > 02:04:06 sctp_common_input_processing() at = sctp_common_input_processing+0x561/frame 0xfffffe00a0775b10 > 02:04:06 sctp_input_with_port() at sctp_input_with_port+0x1fa/frame = 0xfffffe00a0775be0 > 02:04:06 sctp_input() at sctp_input+0x10/frame 0xfffffe00a0775bf0 > 02:04:06 ip_input() at ip_input+0x2ab/frame 0xfffffe00a0775c50 > 02:04:06 netisr_dispatch_src() at netisr_dispatch_src+0xad/frame = 0xfffffe00a0775cb0 > 02:04:06 ether_demux() at ether_demux+0x17a/frame 0xfffffe00a0775ce0 > 02:04:06 ether_nh_input() at ether_nh_input+0x39f/frame = 0xfffffe00a0775d30 > 02:04:06 netisr_dispatch_src() at netisr_dispatch_src+0xad/frame = 0xfffffe00a0775d90 > 02:04:06 ether_input() at ether_input+0xd9/frame 0xfffffe00a0775df0 > 02:04:06 epair_tx_start_deferred() at = epair_tx_start_deferred+0xd7/frame 0xfffffe00a0775e40 > 02:04:06 taskqueue_run_locked() at taskqueue_run_locked+0xab/frame = 0xfffffe00a0775ec0 > 02:04:06 taskqueue_thread_loop() at taskqueue_thread_loop+0xd3/frame = 0xfffffe00a0775ef0 > 02:04:06 fork_exit() at fork_exit+0x82/frame 0xfffffe00a0775f30 > 02:04:06 fork_trampoline() at fork_trampoline+0xe/frame = 0xfffffe00a0775f30 > 02:04:06 --- trap 0xc, rip =3D 0xf04bf926c9a, rsp =3D 0xf04c04a4f48, = rbp =3D 0xf04c04a4f60 --- >=20 >=20 >> sys/netinet/sctp_os_bsd.h | 18 ++++++++++++------ >> sys/netinet/sctp_output.c | 2 +- >> sys/netinet/sctp_pcb.c | 2 +- >> sys/netinet/sctp_var.h | 4 ++-- >> sys/netinet/sctputil.c | 4 ++-- >> sys/netinet/sctputil.h | 4 ++-- >> 6 files changed, 20 insertions(+), 14 deletions(-) >>=20 >> diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h >> index 80c187b3c5ef..0d88377523c8 100644 >> --- a/sys/netinet/sctp_os_bsd.h >> +++ b/sys/netinet/sctp_os_bsd.h >> @@ -372,11 +372,6 @@ typedef struct callout sctp_os_timer_t; >> #define SCTP_CLEAR_SO_NBIO(so) ((so)->so_state &=3D ~SS_NBIO) >> /* get the socket type */ >> #define SCTP_SO_TYPE(so) ((so)->so_type) >> -/* Use a macro for renaming sb_cc to sb_acc. >> - * Initially sb_ccc was used, but this broke select() when used >> - * with SCTP sockets. >> - */ >> -#define sb_cc sb_acc >> /* reserve sb space for a socket */ >> #define SCTP_SORESERVE(so, send, recv) soreserve(so, send, recv) >> /* wakeup a socket */ >> @@ -384,8 +379,19 @@ typedef struct callout sctp_os_timer_t; >> /* number of bytes ready to read */ >> #define SCTP_SBAVAIL(sb) sbavail(sb) >> /* clear the socket buffer state */ >> +#define SCTP_SB_INCR(sb, incr) \ >> +{ \ >> + atomic_add_int(&(sb)->sb_acc, incr); \ >> + atomic_add_int(&(sb)->sb_ccc, incr); \ >> +} >> +#define SCTP_SB_DECR(sb, decr) \ >> +{ \ >> + SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_acc, decr); \ >> + SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_ccc, decr); \ >> +} >> #define SCTP_SB_CLEAR(sb) \ >> - (sb).sb_cc =3D 0; \ >> + (sb).sb_acc =3D 0; \ >> + (sb).sb_ccc =3D 0; \ >> (sb).sb_mb =3D NULL; \ >> (sb).sb_mbcnt =3D 0; >>=20 >> diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c >> index a146ad401b30..7e32cc662f38 100644 >> --- a/sys/netinet/sctp_output.c >> +++ b/sys/netinet/sctp_output.c >> @@ -7290,7 +7290,7 @@ one_more_time: >> if ((stcb->sctp_socket !=3D NULL) && >> ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || >> (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { >> - atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc, sp->length); >> + SCTP_SB_DECR(&stcb->sctp_socket->so_snd, sp->length); >> } >> if (sp->data) { >> sctp_m_freem(sp->data); >> diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c >> index 9df2f82bdaa6..220d8b72667d 100644 >> --- a/sys/netinet/sctp_pcb.c >> +++ b/sys/netinet/sctp_pcb.c >> @@ -3612,7 +3612,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int = immediate, int from) >> TAILQ_REMOVE(&inp->read_queue, sq, next); >> sctp_free_remote_addr(sq->whoFrom); >> if (so) >> - so->so_rcv.sb_cc -=3D sq->length; >> + SCTP_SB_DECR(&so->so_rcv, sq->length); >> if (sq->data) { >> sctp_m_freem(sq->data); >> sq->data =3D NULL; >> diff --git a/sys/netinet/sctp_var.h b/sys/netinet/sctp_var.h >> index 8301ec38cf6e..ef01b0b6c3bd 100644 >> --- a/sys/netinet/sctp_var.h >> +++ b/sys/netinet/sctp_var.h >> @@ -198,7 +198,7 @@ extern struct protosw sctp_seqpacket_protosw, = sctp_stream_protosw; >> } >>=20 >> #define sctp_sbfree(ctl, stcb, sb, m) { \ >> - SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_cc, SCTP_BUF_LEN((m))); \ >> + SCTP_SB_DECR(sb, SCTP_BUF_LEN((m))); \ >> SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_mbcnt, MSIZE); \ >> if (((ctl)->do_not_ref_stcb =3D=3D 0) && stcb) {\ >> SCTP_SAVE_ATOMIC_DECREMENT(&(stcb)->asoc.sb_cc, SCTP_BUF_LEN((m))); \ >> @@ -210,7 +210,7 @@ extern struct protosw sctp_seqpacket_protosw, = sctp_stream_protosw; >> } >>=20 >> #define sctp_sballoc(stcb, sb, m) { \ >> - atomic_add_int(&(sb)->sb_cc,SCTP_BUF_LEN((m))); \ >> + SCTP_SB_INCR(sb, SCTP_BUF_LEN((m))); \ >> atomic_add_int(&(sb)->sb_mbcnt, MSIZE); \ >> if (stcb) { \ >> atomic_add_int(&(stcb)->asoc.sb_cc, SCTP_BUF_LEN((m))); \ >> diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c >> index ef8d763efabf..a4d4e806c00e 100644 >> --- a/sys/netinet/sctputil.c >> +++ b/sys/netinet/sctputil.c >> @@ -5044,7 +5044,7 @@ sctp_free_bufspace(struct sctp_tcb *stcb, = struct sctp_association *asoc, >> if ((stcb->sctp_socket !=3D NULL) && >> (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) || >> ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE)))) { >> - SCTP_SAVE_ATOMIC_DECREMENT(&stcb->sctp_socket->so_snd.sb_cc, = tp1->book_size); >> + SCTP_SB_DECR(&stcb->sctp_socket->so_snd, tp1->book_size); >> } >> } >>=20 >> @@ -6121,7 +6121,7 @@ get_more_data: >> if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { >> sctp_sblog(&so->so_rcv, control->do_not_ref_stcb ? NULL : stcb, = SCTP_LOG_SBFREE, (int)cp_len); >> } >> - SCTP_SAVE_ATOMIC_DECREMENT(&so->so_rcv.sb_cc, (int)cp_len); >> + SCTP_SB_DECR(&so->so_rcv, (int)cp_len); >> if ((control->do_not_ref_stcb =3D=3D 0) && >> stcb) { >> atomic_subtract_int(&stcb->asoc.sb_cc, (int)cp_len); >> diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h >> index 60b5661c309c..d74780cdccf7 100644 >> --- a/sys/netinet/sctputil.h >> +++ b/sys/netinet/sctputil.h >> @@ -253,7 +253,7 @@ do { \ >> } \ >> if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & = SCTP_PCB_FLAGS_TCPTYPE) || \ >> (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ >> - SCTP_SAVE_ATOMIC_DECREMENT(&stcb->sctp_socket->so_snd.sb_cc, = sp->length); \ >> + SCTP_SB_DECR(&stcb->sctp_socket->so_snd, sp->length); \ >> } \ >> } \ >> } while (0) >> @@ -264,7 +264,7 @@ do { \ >> if ((stcb->sctp_socket !=3D NULL) && \ >> ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \ >> (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ >> - atomic_add_int(&stcb->sctp_socket->so_snd.sb_cc,sz); \ >> + SCTP_SB_INCR(&stcb->sctp_socket->so_snd, sz); \ >> } \ >> } while (0) >>=20 From nobody Mon Jul 31 11:15:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDwfF18kGz4q3J9; Mon, 31 Jul 2023 11:15:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDwf71hxKz3rq1; Mon, 31 Jul 2023 11:15:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690802159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ECTDzqdjd3SGgRq5ZCMEmGaUgl94H6NMSwq3H/a5ro=; b=BBl9IfffwIOZOR5WdX1mNRTXj1MKVGRrrI4mgDKuZGFFl37YZvMb/67Q6klFHiP7SD3bbj 4gSnu89mQPG4oq3LGBEqDIcUvKywuNZjsTdtq8xzonK1Rg/TUUdNeUcgjeqZX3hZBzrx78 A1BfVZC+aKrlzZkWujtI/qHXaKt39wsUSm4Adi6ofDGTmDdUMh5H+vbp/KAcCR0uPbcwL1 ZYnWceiyvetWU1Ieb0NvyTvq/XjPnJbHlVmdhdfz9U7rCRe6G7OjbAb2up6W9JBSjZZ4R6 X5ILeIKOBku3uKz4y/XH85TujGy6f4uL/dlseVydkH7a29OF4g369Zu+g3Aqhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690802159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ECTDzqdjd3SGgRq5ZCMEmGaUgl94H6NMSwq3H/a5ro=; b=cHtHBpoQBeVsO8Bd1TXJNLbIkQ38+k+1Q2vzGdMnW9vbLULogDyBsE2SkCyLBICuYAbZrt 2ZR8Q9Ffgq/gCPFuKdJg62r5QxpqOXdGwtSBZcAMYsf3N7PSZIAIECwew/cwKOd7DXrFe0 ZMItPLn+XgwLPDjgEvSAm8kOUR8b5MMHC3BPj71tq2/7ud/kJ0l85AKNdR1RpcjyTJrc4d OLyLvF4Sdth15SCUHmuLm3K2yZh6IxHmSYwO1I8XyDgIGibYsqmxz+UFsZ36A+ILOZTQ6Z aCgTnYSIw0R0QfaKw20MCSWIuXbhuLLV9w8lekf74N5NOVW5mjCr3l3HXSxzUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690802159; a=rsa-sha256; cv=none; b=fJMJKDatwZJCTmMtZcpraOhq3ZApaxCaELX0QJKnCbz8rpdvQ09pT+ASPgIOGhwIJIftcO dMKjjtXjSsTTjWDIHkuFHHz4sujWRKMKLl/BPdb/Flx/r/7oCweOaqUub5kfENbgJdUJu0 BKQufkiFEFOSufOt9h/KEp/Y+rdAQWv4qrAiVNgT8kud4d7K95UzstyNt9W4NdkyI1FD0l JYURym2LxG7y3NtbPlnEyUcByH2io7F8mSN+bBcQEz361ZfZ0IdPPdyFlWXL/bl0FvZgbi fYOQRq9jLf0a0sThQUA+LtGV0YtQvhQzeD5bIvm3mYI1muhY8QwvbFwVMc5tdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RDwf66YmdztTJ; Mon, 31 Jul 2023 11:15:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VBFwPj028367; Mon, 31 Jul 2023 11:15:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VBFwcj028359; Mon, 31 Jul 2023 11:15:58 GMT (envelope-from git) Date: Mon, 31 Jul 2023 11:15:58 GMT Message-Id: <202307311115.36VBFwcj028359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: d91bfe0fb7fa - main - libarchive: merge from vendor branch List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d91bfe0fb7faab2e1f0b8e160b0cf59afb8576c4 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=d91bfe0fb7faab2e1f0b8e160b0cf59afb8576c4 commit d91bfe0fb7faab2e1f0b8e160b0cf59afb8576c4 Merge: 896809e29675 f8035ed8e513 Author: Martin Matuska AuthorDate: 2023-07-31 11:13:30 +0000 Commit: Martin Matuska CommitDate: 2023-07-31 11:15:12 +0000 libarchive: merge from vendor branch Changes to not yet connected unzip only. MFC after: 1 week contrib/libarchive/cat/cmdline.c | 12 +- contrib/libarchive/unzip/bsdunzip.c | 66 +++++-- contrib/libarchive/unzip/bsdunzip.h | 63 +++++++ contrib/libarchive/unzip/cmdline.c | 250 +++++++++++++++++++++++++++ contrib/libarchive/unzip/test/test.h | 2 +- contrib/libarchive/unzip/test/test_version.c | 34 ++++ 6 files changed, 402 insertions(+), 25 deletions(-) diff --cc contrib/libarchive/unzip/bsdunzip.h index 000000000000,12b65cefb466..12b65cefb466 mode 000000,100644..100644 --- a/contrib/libarchive/unzip/bsdunzip.h +++ b/contrib/libarchive/unzip/bsdunzip.h diff --cc contrib/libarchive/unzip/cmdline.c index 000000000000,95d4f99b8242..95d4f99b8242 mode 000000,100644..100644 --- a/contrib/libarchive/unzip/cmdline.c +++ b/contrib/libarchive/unzip/cmdline.c diff --cc contrib/libarchive/unzip/test/test_version.c index 000000000000,efa797982d57..efa797982d57 mode 000000,100644..100644 --- a/contrib/libarchive/unzip/test/test_version.c +++ b/contrib/libarchive/unzip/test/test_version.c From nobody Mon Jul 31 14:30:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF0zH0SQqz4qBJ6; Mon, 31 Jul 2023 14:30:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF0z701C5z47yB; Mon, 31 Jul 2023 14:30:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690813859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bGsxYFa5D56zHdcUm33tAY8ARuFvEAuNyFZXEy13d2U=; b=ar9qf1sHuBUwU9WdaCT1lO2ZyU1rQqZ/A4yYJ11DVwa2SfJPRayRwFyePVXPhiUrC3Ph1s JvHjYq2fVnZ+a7BQV24aBWzkEj39ePtDLUzpqOvVbjhSUapQHFMLNw6iaz4PIiJ6PCPgc7 8uI09Burfp6oioaj9MB/3vDJY531+Qf50WV4UQQ0DnYtO5UPszPmNkTQgKaC6sLnKjl1eN Wy78HTNQkr81xLIdMvCdjer9oNrrMj98zT8KJaril4l82lqp9QuCEO+EjeomUkp4hgocBn zPTJU4wLVqgq6Btgn/PHvzBjFS50p6f/Oc96R9xbj9MGjxes5aV2a5/vCEYWWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690813859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bGsxYFa5D56zHdcUm33tAY8ARuFvEAuNyFZXEy13d2U=; b=Yjq1d4ITEciMW+evaQ7DMv6Zf9o2+VMJNrf1cj7wMnvsoVlipd/A+3+xaSYFP+uBsewUhl U0ikfMfsB4U/2nDslbq0mwdZirn0yP24sDD6W9ppO4b+t2QS5kciGFa2UPiQaC4LbSna6D eNkYMnDB0PupD0b1oJM5/dskgPuO1ofd5B4Ctys72N3uxCq9YS6M1fOcT03vKw3Ft42vXV htLBDWq98cnR2R0lHPe8+B488nsrrD5pLkPRc5qo+PVRzPXJQicyNx96JaV5h+0Ljx78WJ nXxKpNxRAIZsBeebe7isFRBpe51hDpmtwL8wu0Z0/Gc0mN4IXTjBOz0nYgpqbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690813859; a=rsa-sha256; cv=none; b=WEDbi5g1YhWAnl3FWkNBrJcLcTcPe+AU1YXZq6Gm/twK4B+TtFImAk0PokIIydRkGO1eZV aLWoJnMj5VeqFsY4RlBmyebBzDghs65ngARsR5/einAwl6ov9sCuweRKADQA4JEg5EYbAJ gyxqQBdJ4ibn5AMxc9ZL5DP3CTjNkdBTFIcB1qxvH0jXNcj2b0bmJyc4zLmXgn/Tc0+0az GGU5zgYRcrwPEL4v8oSaJFLzfWiXk4OSBE9g4axCBHnlfNvx+r/58n9J1k22ZxngSzJ/Bn /eXm1V46ZgWBqtg/OxtCreplHGnJov0BsqpZpfGd+MeMvE6tOvv+3f9UpTnPSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF0z65dYgz10DH; Mon, 31 Jul 2023 14:30:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VEUwat053122; Mon, 31 Jul 2023 14:30:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VEUwpK053121; Mon, 31 Jul 2023 14:30:58 GMT (envelope-from git) Date: Mon, 31 Jul 2023 14:30:58 GMT Message-Id: <202307311430.36VEUwpK053121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: d101156ec69d - main - intelspi(4): Add missing driver mutex unlock in NO_SLEEP mode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d101156ec69d4c51d626034419a48634d3827f23 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=d101156ec69d4c51d626034419a48634d3827f23 commit d101156ec69d4c51d626034419a48634d3827f23 Author: Vladimir Kondratyev AuthorDate: 2023-07-31 14:30:24 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-07-31 14:30:24 +0000 intelspi(4): Add missing driver mutex unlock in NO_SLEEP mode Fixes: 1f40866feb21 ("intelspi: add PCI attachment (Lynx/Wildcat/Sunrise Point)") MFC after: 1 week --- sys/dev/intel/spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/intel/spi.c b/sys/dev/intel/spi.c index 497c2606a1c9..0ac7a3b5e9bb 100644 --- a/sys/dev/intel/spi.c +++ b/sys/dev/intel/spi.c @@ -317,8 +317,10 @@ intelspi_transfer(device_t dev, device_t child, struct spi_command *cmd) /* If the controller is in use wait until it is available. */ while (sc->sc_flags & INTELSPI_BUSY) { - if ((cmd->flags & SPI_FLAG_NO_SLEEP) == SPI_FLAG_NO_SLEEP) + if ((cmd->flags & SPI_FLAG_NO_SLEEP) == SPI_FLAG_NO_SLEEP) { + INTELSPI_UNLOCK(sc); return (EBUSY); + } err = mtx_sleep(dev, &sc->sc_mtx, 0, "intelspi", 0); if (err == EINTR) { INTELSPI_UNLOCK(sc); From nobody Mon Jul 31 14:33:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF12F078wz4qB5R; Mon, 31 Jul 2023 14:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF1292Lnkz48jD; Mon, 31 Jul 2023 14:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690814017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ruNHfxHLNUm2Dm2nsPQjhVEYzDTgTDNLAwLfB/sEDI=; b=NMma0RmXnNMrINBT11dwNz4D+GXZBnjL9zo2nowJnd1hoiFNbXJJozmfAz7FIBfcu3EomR F5x5kCEGaGWZqUUJgt5zEgMe1H0g3c21nkzMzUpkVtDShCnjp4s0GyyTohH69z400k4qc3 HAPvUA3SBywOk6X8k5oQwt/CVL11bo5vENT79+lKqI0hHKnnOM0CUE3M2x1Lm/AzU9GtIT wM/bTjG39M0LkmdxvevLk8xHv0I/rkqNE1XlrU6o9wtSYHmlVI5HJxCWr6daeaYTQQYCNM KCa7Q243v2F/5J7l2nvjhmw42OBV2ExBaO+kJz5sEHivq0qXfcLlIsWhzGzWfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690814017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ruNHfxHLNUm2Dm2nsPQjhVEYzDTgTDNLAwLfB/sEDI=; b=L3GK4XSHC/uAgnZvi8qGeDMil3hBIgiE9rF5/V/eBfLEgqFeGp+/fxJPrynszjyP8gcuLp +IhRckhLy99HO07wTLDR5pfeLG3z6yPo+OE4yIZ1sbpmU7WAGpCNbt547svAw+OSdnf8y/ 2y+FVyrOKxb0epGWbFB7AYklWZJg+jmwBmEmyvD7zwl0E2HAIWO8vikSa0+iShD8EAj9C6 TwLw8ycXuuoqKzMS6EbJzjLZD0VLzlxn9TK+cAg6Jjc+EriIGBdmAvK3u8SL5UZxNp8mKT +hyEEFSGFiXLiLzXDKm5CRTTIThqqi3IKnMw1mWee726adrlV3w9GNTaynJx8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690814017; a=rsa-sha256; cv=none; b=lkmhbq5bbHf76JGSvVsqc0nyrMFifOgQXnqCdSKE2OgXwrLsBKBulk6QxLRPLd8qZqdckd Du+stXFSDBrBsobJDNXY9emW8+v32RT6kp4x3a5Qo0EEWcFln97/5wAxs1DkjGCRglNrDT 4pmZxQjmuwy3SmfUDZ79Ezg9tq4G5P9b2GJf1Ayl88EuNLJ87Z+8/3x1wRUvjpDVgUslOE DU+Mslrhfcs5UowZ60BQtr1UcMVjBaoIo31OKzbzB6LSj6J96JX7LTJc3WNMtLhbAQ7CDW anDHJmGLYvKyc05uRqh3GYyIHiGCQHhiMpM0NTekH1Fk0SL5TjpNJ0QADUMAPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF1290YV2z10Km; Mon, 31 Jul 2023 14:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VEXapa058822; Mon, 31 Jul 2023 14:33:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VEXa4f058821; Mon, 31 Jul 2023 14:33:36 GMT (envelope-from git) Date: Mon, 31 Jul 2023 14:33:36 GMT Message-Id: <202307311433.36VEXa4f058821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: fc14525044b6 - main - nvme(4): detect S3X NVMe controller in 2016-2017 MacBooks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc14525044b651e9d2256c0e8aa8c74c900cc815 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=fc14525044b651e9d2256c0e8aa8c74c900cc815 commit fc14525044b651e9d2256c0e8aa8c74c900cc815 Author: Vladimir Kondratyev AuthorDate: 2023-07-31 14:33:14 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-07-31 14:33:14 +0000 nvme(4): detect S3X NVMe controller in 2016-2017 MacBooks Adds support for detection of the S3X NVMe controller found in the 13" MacBook Pro 2017 without Touch Bar (MacBook14,1) It is known to be used in following MacBooks: - Retina MacBook 2016 (MacBook9,1) - 13" MacBook Pro 2016 without Touch Bar (MacBook13,1) - 13" MacBook Pro 2016 with Touch Bar (MacBook13,2) --- sys/dev/nvme/nvme_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/nvme/nvme_pci.c b/sys/dev/nvme/nvme_pci.c index 5e7efa7f33bc..22188ccfacea 100644 --- a/sys/dev/nvme/nvme_pci.c +++ b/sys/dev/nvme/nvme_pci.c @@ -95,6 +95,7 @@ static struct _pcsid { 0xa821144d, 0, 0, "Samsung PM1725", QUIRK_DELAY_B4_CHK_RDY }, { 0xa822144d, 0, 0, "Samsung PM1725a", QUIRK_DELAY_B4_CHK_RDY }, { 0x07f015ad, 0, 0, "VMware NVMe Controller" }, + { 0x2003106b, 0, 0, "Apple S3X NVMe Controller" }, { 0x00000000, 0, 0, NULL } }; From nobody Mon Jul 31 14:50:27 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF1SL0n9tz4qBfQ; Mon, 31 Jul 2023 14:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF1Pc4B45z4GK5; Mon, 31 Jul 2023 14:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690815028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1sZ+nBVIAjhszGbbLnRCTcq7gi5zZ0GOugLZ8CshDes=; b=DD0CFL1MBGH/7aWj5CiomBZnvDjKxrEehmvalmZm2dPaDy22lwdcJczUemBrTlS6s6v4s7 HYV8gzvbKhPqHr3yv2Nnn5FOCbOl5kB2+W+pjq+nt83zqHjTdqllU+bnZqfjk60iL0S5VX 9wAbCKiF5qIddjTx+DTdDW5JW+R3gdr/AUDyZtKax+xDCNeeMFIuwzHLdD6Ps5y1wYaQnc OHfzsFBbWbRGrHfQVLWekPYTykQsZP9jqhxxeU1ZLePANsLq87iI8hnVGPT/4kn1dA6SXl xPt0/VuGHBa//cbkKNiTIWkb6Ln+7KPHQxCMiaB5QzhrwWkyHltr3jqFMnSKoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690815028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1sZ+nBVIAjhszGbbLnRCTcq7gi5zZ0GOugLZ8CshDes=; b=fz0QzSVNkPKMcDsDtzUd5j1VhWL3BE5/fWMSgTNKkn2+LIpHzgfjPl7I5dodIXjhD3D3r4 zmgmoGzMBcVNpl3oNqmQycQB2/Ly4tIZ9OQXpHSFtQP0KITJDe2VVS73I+UPzZNoSCilml YOhpZwnPDX81Y7WYctbxIx8hbVAVfx2TUaivNXhyJCs/K+SjUCpC2uoYXGXhTK+3yIEdE1 Q2+Oce2vV5L3dIKgs6uauzpOLAFS2033IG6IoRJ56pTDc4C2tvrQOHcTyQ6TMycChNeWUe V7lhGliJjvG+bKYO2stI0xPJvYEd7+39L7sQuZ3wqJqjsmWE8tqEt6YPT2l1dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690815028; a=rsa-sha256; cv=none; b=RYGSLHa4ghjUQkokPsRBjra2w5rVrAlgfXYhkxGie17WDB8Jp83TMy+zcac7J2u1nVydzP CmqjxR5pYtlEwhgKKMAneHx+8DcyU7GxUdxWhG3dX+930XjuhHMswzQJCKaHFTnoziCFmU hLC5pZbMu2OiYlg5KgY5Y7wMvqMfw0/hPkV73IiOtjrkGhRaR2t40CHIvcCbTnWS6nnRB0 twrk+eNG8E8LYO1nHYKuiTFv4K9+0a62HVlaRoc8XrH8o55xbBAZFm8ORhCXbpfrotJxIX tEHLgVh1S9WAizvSw5qmn2I88GjoOLEbb6kbIaW1tgx86lvu/5j6KRnPV0+uFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF1Pb5hVwz10Qc; Mon, 31 Jul 2023 14:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VEoRZh085182; Mon, 31 Jul 2023 14:50:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VEoRVs085181; Mon, 31 Jul 2023 14:50:27 GMT (envelope-from git) Date: Mon, 31 Jul 2023 14:50:27 GMT Message-Id: <202307311450.36VEoRVs085181@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2682a1552724 - main - xargs tests: Disable the test added in commit eab91d008165 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2682a15527241278c9aa46c4907d3b07460b8ec0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2682a15527241278c9aa46c4907d3b07460b8ec0 commit 2682a15527241278c9aa46c4907d3b07460b8ec0 Author: Mark Johnston AuthorDate: 2023-07-31 14:44:32 +0000 Commit: Mark Johnston CommitDate: 2023-07-31 14:44:32 +0000 xargs tests: Disable the test added in commit eab91d008165 This test has been triggering OOM kills in CI runs since it triggers an allocation of 16GB. Temporarily disable the test until the problem is solved one way or another. --- usr.bin/xargs/tests/regress.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/xargs/tests/regress.sh b/usr.bin/xargs/tests/regress.sh index f0f0bd4a3edd..f3f670fb0fd5 100644 --- a/usr.bin/xargs/tests/regress.sh +++ b/usr.bin/xargs/tests/regress.sh @@ -1,6 +1,6 @@ # $FreeBSD$ -echo 1..22 +echo 1..21 REGRESSION_START($1) @@ -13,7 +13,9 @@ REGRESSION_TEST(`R', `xargs -I% -R1 echo The % % % %% % % <${SRCDIR}/regress.in' REGRESSION_TEST(`R-1', `xargs -I% -R-1 echo The % % % %% % % <${SRCDIR}/regress.in') REGRESSION_TEST(`n1', `xargs -n1 echo <${SRCDIR}/regress.in') REGRESSION_TEST(`n2', `xargs -n2 echo <${SRCDIR}/regress.in') -REGRESSION_TEST(`n2147483647', `xargs -n2147483647 <${SRCDIR}/regress.in') +# This test may consume a large amount of memory, making it unsuited to CI +# environments. Disable it for now. +#REGRESSION_TEST(`n2147483647', `xargs -n2147483647 <${SRCDIR}/regress.in') REGRESSION_TEST(`n2P0',`xargs -n2 -P0 echo <${SRCDIR}/regress.in | sort') REGRESSION_TEST(`n3', `xargs -n3 echo <${SRCDIR}/regress.in') REGRESSION_TEST(`0', `xargs -0 -n1 echo <${SRCDIR}/regress.0.in') From nobody Mon Jul 31 15:02:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF1hg1m2fz4qC8y; Mon, 31 Jul 2023 15:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF1gB0Sjvz4J7L; Mon, 31 Jul 2023 15:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690815734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LRsSwpxgu1NpsJ4fEDByWKpJY6Unal1qsJPrnD1sJ+8=; b=U3moXd4nzc23Ec5lX2XGoEqWlWmpFsijIcPfRujDmkWg6TLzKnMUjqHBE4z+8pjrXnvzuf f8a7hX/vBguattU+gaFPeXlQjIWSxPuiwLHQA82Tsw8tITQfO6fYVl4e3jz/M68am6BulH 30+Xdo1sF3P0tx12HmKtVY2d6CC5SSNSYRg4pONAfyhYe0r3NMgVWbnLk1jnbP+aXRH49I s5JIu+evLfeZicwWQEdEVnnGwwAVU6ySzUB/fN+3Gn86Awmsa2CYq1SOUthQh312SrVxuW 5kJyhEqT9/3FXkFQ78kNyjlCJfwVHiCmQ7/R8JxDDIYrEAnzORq7nEhIaJPD+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690815734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LRsSwpxgu1NpsJ4fEDByWKpJY6Unal1qsJPrnD1sJ+8=; b=DGbml9k3YmzCkhxLf5F/8HPbNGMBg87VZmOQDS2LHUhhihulV8CzEUhFRcHQgqrkz+o2GI NocZlOghYwyb4s5W9YRxRiL0CNZHBkXOXXsK5Y919Kzwo75b5DbmWlWMKTT2V0T/+SS8Xx eMQmYyYsTzANbs8vqx+2klp6Eu6d8Q7QnxEkqwyakKLwSxu7nLauX2tiM4ZLmr9l5CqTqD l7oA49o3PJ6CapM5ucNUOAnTxPzmAgmwrGEnnh+SkAMJeXNfpbIY0WSp/4i3Ue+xpt2jrJ XSUwcFeMx3C3lnTBSDqtdQBOCRapzcTI11ZBkCEe36PBvRg3gl1/jinKMISRuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690815734; a=rsa-sha256; cv=none; b=K5eyQsG11UTplTjzaxGN3lhFlS8XzSk8Wk2K77ZfPDiLNwb/FYBI5UY1Xn5v2NDQIvgsB4 ZbJwWQTiWXVNVv0yb8BhXb1vx4p8sLOjWIPK65DV3br9IKJ7ab8/8HZiJ/GJIscN9qAbLH cOpbDNKhBCSEg9K5ViW9ckoJu9axDmF/vyCr6gvuJ5FALx+/GWSYKWxeSV91FV+nHtg8cm BTjFz/Uyc0fqAsW8gxUCdXs4vIzxgr3mPyaNhIGrkAeAH7hXtGUIVfQS0z4TvvbAzRoXFD +WQ56iVasYO3vsG+62ryU4tMU+T7LuFl/63l1Y/OJDkdaFyIOKApWusntMX2ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF1g955nWz10xf; Mon, 31 Jul 2023 15:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VF2DgT007781; Mon, 31 Jul 2023 15:02:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VF2Dpa007768; Mon, 31 Jul 2023 15:02:13 GMT (envelope-from git) Date: Mon, 31 Jul 2023 15:02:13 GMT Message-Id: <202307311502.36VF2Dpa007768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a94158d255fe - main - dhclient tests: Serialize pcp tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a94158d255fe5ce46d7b98d2924d99273bcf27d9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a94158d255fe5ce46d7b98d2924d99273bcf27d9 commit a94158d255fe5ce46d7b98d2924d99273bcf27d9 Author: Mark Johnston AuthorDate: 2023-06-20 13:04:07 +0000 Commit: Mark Johnston CommitDate: 2023-07-31 15:01:43 +0000 dhclient tests: Serialize pcp tests --- sbin/dhclient/tests/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sbin/dhclient/tests/Makefile b/sbin/dhclient/tests/Makefile index 790d3dbcccce..d366778f3bbc 100644 --- a/sbin/dhclient/tests/Makefile +++ b/sbin/dhclient/tests/Makefile @@ -4,6 +4,9 @@ ATF_TESTS_SH= pcp +# Tests assign a common IP address. +TEST_METADATA.pcp+= is_exclusive=true + PLAIN_TESTS_C= option-domain-search_test SRCS.option-domain-search_test= alloc.c convert.c hash.c options.c \ tables.c parse.c conflex.c tree.c fake.c \ From nobody Mon Jul 31 15:02:15 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF1j94KKZz4qC3D; Mon, 31 Jul 2023 15:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF1gD2TlKz4J7P; Mon, 31 Jul 2023 15:02:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690815736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bm1fS0UKNPMQck0C0gY9KfJBE+wELTZC2YUCRVqzD9M=; b=RJFkCzGzbwEJ6nfCHJ1+sTwGUZCjGotl7PB8Gus0NJ57n19mi5iyWizGxkBAFSHpYFgd1/ uOflX/n64Fuf+ufDW4r7E103v3Hj2FzXaH8QJ3V2ZyvyKTnzWdE/SRsoJd6iAv6I8Sjal+ Bhhx3e9di2YBvXjUf5GLIe8jeagmqY3nTeASTHpuBt3+dTgcicH7yqPHmVexUcjkYdewL4 m3zmvekJOVV8Xgm97YXYZSfvF3C9waBHnkEtlEfbvcOV9T+WBbwxO9jR5K8Lw7C/iZyZs+ ZkJKfzgVZxCex382SRBbjdU+oe5HXz3k5+pAGMN7UJ3FqXlDGPT8y8tf4ZAAVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690815736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bm1fS0UKNPMQck0C0gY9KfJBE+wELTZC2YUCRVqzD9M=; b=mnTnGxYOPbY2wz2v1dP1D3PTs/mkXDSJmYOqpRg3fmyroYx+SJDC9oPmOAt2H8jk1QN7iF 6s/ykHDAc3CTQzfu9IMZS02TFeNOYJoVxioKI+prU7qrajosD64yk29jmrzL3bBx87KWGI cZbMqfASTjpMW51NULTyAQV4ulev0sqtWSMw0T4lpv4VTMi9m9DchsD4MjuFAoTqAewTAK BLr1ia7vsR9glt0SAJsfR8a5iT0jQRytEcjYLO8JM6TXL6VeKP/MKfIhASiDq+KFRpCCGa /Ml/elbzYtAGhdj+HUhpqAq+qPsoLVi+U4AOYEIBBLeKwGoesgpS+s35LEu6+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690815736; a=rsa-sha256; cv=none; b=Za0p90eHBSZEEdPkoK7TgU7ramIpjXtiuOC+ITYgUnNTsZS0ihrJ4zxfFnGZAEi7dTGdgg 1M5Glrn80HDT94bGhaPwpeyPZ1VgAkK+W513r87cMjELijPvTr/UppenwO2W/SQlrGsRXA 9FQnl64FNNh/+qtjKDIKux5tL3DrxVQzEniK4E8YMc050EAbTa119dqa2TC2uWetEycB7i RYT7z0FWIzUjm+Zgf1lZkGiRufelyE/lkOIlo52i0De/2juZgp26cI79Ujmgl/1zc0K9Hi h3HzzIZxZapFkv7B/toaT2gQoQnIXnqE8fOrj/GNTST70uxLpIIBJjRk+/yJRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF1gC67WGz10xg; Mon, 31 Jul 2023 15:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VF2FP4009036; Mon, 31 Jul 2023 15:02:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VF2F1k009023; Mon, 31 Jul 2023 15:02:15 GMT (envelope-from git) Date: Mon, 31 Jul 2023 15:02:15 GMT Message-Id: <202307311502.36VF2F1k009023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 15e564e40801 - main - ggate tests: Serialize List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15e564e408015a70a1bf2d73bc7047247b7db349 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=15e564e408015a70a1bf2d73bc7047247b7db349 commit 15e564e408015a70a1bf2d73bc7047247b7db349 Author: Mark Johnston AuthorDate: 2023-06-20 13:09:52 +0000 Commit: Mark Johnston CommitDate: 2023-07-31 15:01:53 +0000 ggate tests: Serialize --- tests/sys/geom/class/gate/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/sys/geom/class/gate/Makefile b/tests/sys/geom/class/gate/Makefile index 417fa7dfd197..600cef0b6bca 100644 --- a/tests/sys/geom/class/gate/Makefile +++ b/tests/sys/geom/class/gate/Makefile @@ -6,4 +6,7 @@ TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} ATF_TESTS_SH+= ggate_test +# Tests listen on the same port. +TEST_METADATA.ggate_test+= is_exclusive=true + .include From nobody Mon Jul 31 15:02:14 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF1hy3VY4z4qByl; Mon, 31 Jul 2023 15:03:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF1gC1PK5z4JPL; Mon, 31 Jul 2023 15:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690815735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FK4xIJUlLz5qHtthXj/6Yj/0nvTGvLqqAcHpr5pm1Q=; b=Jwq8uWg/K5bfrvqkvmi+Zpqi3ci5x8nEMRq0aep2Nc1v6PZRjfqYU7rouAJ49Ph0eq+3xY miTjoQYgQ65m4D3JSN9Mt5pvSvrRie4mDkidM8vmGq+Bh2aF2PxxKNbCFq7WIRIo8urboh FbArmlZ+TVkbhrxGWsyVXoeRjkxJJe5jbs9rwDbS72dVxQ9pmZaDVpynE/OqT13g283PcW CO7gEs900//3VrwcCHYt2/A/yVCzXffYYXK59WmW41Y5KxMP05NLr0P2TKVwM3O3lxXJ5E X/+2s5juzjujvrwCs/vcRpNO3HATj9oOsRVHo3cPXarQI+EEe/N0INRSM0QCKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690815735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/FK4xIJUlLz5qHtthXj/6Yj/0nvTGvLqqAcHpr5pm1Q=; b=QCbFWtZH0ZSoVbEXGc3NVVtp8mHWh6JNoxQ3emwQyhD787ivsaLxlD6x7yjGoC1he3po/t pL7xaqqUh7MBhiKVEAyqeVkx/5UyszasiRJVe538MHUgr4BRYWUpN/0ie77X0w9TUJAuw5 MEarKjCVNC+tpjVrX/oIzSLZksXNQ/w+g4egf7o+QUnfywyMCjlcl3fRRNOJ8DbKbLEXdH QFRU456uGMCrnqmdDDUMqcpGyTSoAMvJVZR0F29Bj+zvgCsTOKoegZ00ibqV3y8sox5vNR KQhFOfjivWKnq+WSAgoLLC/FAsPvVjOWnhpLpqa+HiuDXHNks4Lffz6etUY5nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690815735; a=rsa-sha256; cv=none; b=HBw1ZCPARP9I7PwfI4pef1lFAIBh7Mst9dLle/M/Yx1uTFbYZ7FR/slpJchmKiypT9W/uu Qf0v525Nkfv1HtagOjZT52HNAmXP3DoXXabW5OSWOQmfbzKs4hBPGZgpwUk+/T1hnDscd9 OxcpdvURmCJv0Je1iesL0XDxSa44BxPPpPkUuyFkfOwP5FtMkZikN6Gk+7ZJpx3z7RnVxe RPsa+EHZLqYTmXQLTKMo//oJZ9u1Dn8hN81nIQ6XSjpcn5uamQd9Hs0NMrnf+1wPrwvRPQ 6hgULecvhGv5LfuZhF+0siWz4feyokut14u6/+BCvpOosY391EXzUE4k4Q4aSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF1gB5lhtz10jr; Mon, 31 Jul 2023 15:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VF2Esn008263; Mon, 31 Jul 2023 15:02:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VF2EEu008262; Mon, 31 Jul 2023 15:02:14 GMT (envelope-from git) Date: Mon, 31 Jul 2023 15:02:14 GMT Message-Id: <202307311502.36VF2EEu008262@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 9c3f6368b1bd - main - gmirror tests: Serialize List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c3f6368b1bdb576512a056e08d116f22da43931 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9c3f6368b1bdb576512a056e08d116f22da43931 commit 9c3f6368b1bdb576512a056e08d116f22da43931 Author: Mark Johnston AuthorDate: 2023-06-20 13:05:53 +0000 Commit: Mark Johnston CommitDate: 2023-07-31 15:01:49 +0000 gmirror tests: Serialize --- tests/sys/geom/class/mirror/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/sys/geom/class/mirror/Makefile b/tests/sys/geom/class/mirror/Makefile index f719d7542964..61fa5526c02f 100644 --- a/tests/sys/geom/class/mirror/Makefile +++ b/tests/sys/geom/class/mirror/Makefile @@ -21,6 +21,9 @@ TAP_TESTS_SH+= 13_test ATF_TESTS_SH+= component_selection ATF_TESTS_SH+= sync_error +# Tests use a global gmirror fail point. +TEST_METADATA+= is_exclusive=true + ${PACKAGE}FILES+= conf.sh .for t in ${TAP_TESTS_SH} From nobody Mon Jul 31 15:22:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF2726X5hz4qCnV; Mon, 31 Jul 2023 15:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF26s4Zm4z4LXx; Mon, 31 Jul 2023 15:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690816965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TMT382Yiq2rfM4i9stpYj6QTQJKItWx6zz/medWjGZ0=; b=F5HewzAcbHmQ14DzRc4m8Bz4SJTUZdvUAFBecY60wwKAJwz74jC1buCgJSq8FkVBYg3JF5 M0MqA4/iUOORIOY/XwuYDuILd94nd3PO1UqnJVOMiZy/M2MySxE7Qu068fMk2Jnkb6JYTI SHsniqKa4Ck27vCM8bHcspb0nxhPA2LQEhkJ1lOBJx9bqaY+Adgn+b9NC9e+vwKn2NXuIo 89l2d7SGSWtS+rKYXX+nH3JLietGoTqL0pKW02xgTkx1El73KfhJ+J9oIQ/Oq/PN0AomIV gZ+Atx8wHJe9SFIuCDg11D4FklhboJeu9xQaNEiWHEZPAPZU2sJi3ipgj9kc0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690816965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TMT382Yiq2rfM4i9stpYj6QTQJKItWx6zz/medWjGZ0=; b=FVr/GadGqkzqStJyNj+VsjBjZDhBX2qaV3w5t4eeqT9PvJGp7NDR0J5uNgWWH5N5cYxjIK dpGz7B1UvMFkc570E6SG57Qzc3DuSRQgJWZdcsZEYmOllbNn04plU6RlT97BlE971lJLvY Bd4C/xY2PtL/4Qd++bg6hGqUR09L+5eGgOWPoPO2o6Ct1kWp0bDDdox3RQnMRfXztfqcSs fviFKrJvBkQeCzaWXAtk8RXJcpojewjusms+RrymnFCLPqSG1Huk83A2OVyIBr72r3EbCi TdMeMiOKzKf/Uy3sa5Y/Wh/DTSMac/XgE5nOYnryFXWWbOkvMnhYCgQ4tqG8ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690816966; a=rsa-sha256; cv=none; b=RRyZiCf0HqHpoEGVuxa9O95zWbiVwhyYegoPlhgjfaWD5qYAyfExPbVjO1h8T3QN7tlC0K UmMoAVP7YetOuKmTpqziZq1RNpHS0+xlQxE+aPWnhqGRj9E37+uhvsIkhlqH6loCjgTdAC ZgSo3h54/GHRE7oOP+mY515ExXRw4VV/lAQVPTqLTtZ5oUnWfVzHQxx8/icjM0BdPEosfh VNKi9j1LOX5e5fxbEhG1Gy9ZHwGn57jm7WERL+yc8kDxW/9Zw1AkgnNQdBZ5HSot9cD7l+ vJF9q2Ja8qjXgJGcWzITWu95hB+aTzil22DNWBy66ZPfxcPyn/czbrJauyfuwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF26r6QK0z11Kf; Mon, 31 Jul 2023 15:22:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VFMiTW042229; Mon, 31 Jul 2023 15:22:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VFMixg042228; Mon, 31 Jul 2023 15:22:44 GMT (envelope-from git) Date: Mon, 31 Jul 2023 15:22:44 GMT Message-Id: <202307311522.36VFMixg042228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: e1353dcb63bb - main - e1000: Fix lem(4)/em(4) TSO6 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1353dcb63bbdb33be6a907ed6236c120518129e Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e1353dcb63bbdb33be6a907ed6236c120518129e commit e1353dcb63bbdb33be6a907ed6236c120518129e Author: Kevin Bowling AuthorDate: 2023-07-31 15:16:24 +0000 Commit: Kevin Bowling CommitDate: 2023-07-31 15:19:14 +0000 e1000: Fix lem(4)/em(4) TSO6 * Fix TSO6 by specializing IP checksum insertion and following Intel SDM values for IPv6. * Remove unnecessary 82544 IP-bit handling * Remove TSO6 from lem(4) capabilitities Reviewed by: erj (earlier version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41170 --- sys/dev/e1000/em_txrx.c | 40 ++++++++++++++++++++++++---------------- sys/dev/e1000/if_em.c | 9 ++++----- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 0e433f388ac5..b90ab21cd825 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -141,7 +141,6 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, if_softc_ctx_t scctx = sc->shared; struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; struct tx_ring *txr = &que->txr; - struct e1000_hw *hw = &sc->hw; struct e1000_context_desc *TXD; int cur, hdr_len; uint32_t cmd_type_len; @@ -151,27 +150,39 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, E1000_TXD_DTYP_D | /* Data descr type */ E1000_TXD_CMD_TSE); /* Do TSE on this packet */ - /* IP and/or TCP header checksum calculation and insertion. */ - *txd_upper = (E1000_TXD_POPTS_IXSM | E1000_TXD_POPTS_TXSM) << 8; - cur = pi->ipi_pidx; TXD = (struct e1000_context_desc *)&txr->tx_base[cur]; /* - * Start offset for header checksum calculation. - * End offset for header checksum calculation. - * Offset of place put the checksum. + * ipcss - Start offset for header checksum calculation. + * ipcse - End offset for header checksum calculation. + * ipcso - Offset of place to put the checksum. */ + switch(pi->ipi_etype) { + case ETHERTYPE_IP: + /* IP and/or TCP header checksum calculation and insertion. */ + *txd_upper = (E1000_TXD_POPTS_IXSM | E1000_TXD_POPTS_TXSM) << 8; + + TXD->lower_setup.ip_fields.ipcse = + htole16(pi->ipi_ehdrlen + pi->ipi_ip_hlen - 1); + break; + case ETHERTYPE_IPV6: + /* TCP header checksum calculation and insertion. */ + *txd_upper = E1000_TXD_POPTS_TXSM << 8; + + TXD->lower_setup.ip_fields.ipcse = htole16(0); + break; + default: + break; + } TXD->lower_setup.ip_fields.ipcss = pi->ipi_ehdrlen; - TXD->lower_setup.ip_fields.ipcse = - htole16(pi->ipi_ehdrlen + pi->ipi_ip_hlen - 1); TXD->lower_setup.ip_fields.ipcso = pi->ipi_ehdrlen + offsetof(struct ip, ip_sum); /* - * Start offset for payload checksum calculation. - * End offset for payload checksum calculation. - * Offset of place to put the checksum. + * tucss - Start offset for payload checksum calculation. + * tucse - End offset for payload checksum calculation. + * tucso - Offset of place to put the checksum. */ TXD->upper_setup.tcp_fields.tucss = pi->ipi_ehdrlen + pi->ipi_ip_hlen; TXD->upper_setup.tcp_fields.tucse = 0; @@ -188,16 +199,13 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, /* * "PCI/PCI-X SDM 4.0" page 45, and "PCIe GbE SDM 2.5" page 63 * - Set up basic TUCMDs - * - Enable IP bit on 82544 * - For others IP bit on indicates IPv4, while off indicates IPv6 */ cmd_type_len = sc->txd_cmd | E1000_TXD_CMD_DEXT | /* Extended descr */ E1000_TXD_CMD_TSE | /* TSE context */ E1000_TXD_CMD_TCP; /* Do TCP checksum */ - if (hw->mac.type == e1000_82544) - cmd_type_len |= E1000_TXD_CMD_IP; - else if (pi->ipi_etype == ETHERTYPE_IP) + if (pi->ipi_etype == ETHERTYPE_IP) cmd_type_len |= E1000_TXD_CMD_IP; TXD->cmd_and_length = htole32(cmd_type_len | (pi->ipi_len - hdr_len)); /* Total len */ diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 1f6100cff293..40579b0a5a55 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -784,8 +784,7 @@ em_set_num_queues(if_ctx_t ctx) #define LEM_CAPS \ IFCAP_HWCSUM | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | \ IFCAP_VLAN_HWCSUM | IFCAP_WOL | IFCAP_VLAN_HWFILTER | IFCAP_TSO4 | \ - IFCAP_LRO | IFCAP_VLAN_HWTSO| IFCAP_JUMBO_MTU | IFCAP_HWCSUM_IPV6 | \ - IFCAP_TSO6 + IFCAP_LRO | IFCAP_VLAN_HWTSO | IFCAP_JUMBO_MTU | IFCAP_HWCSUM_IPV6 #define EM_CAPS \ IFCAP_HWCSUM | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | \ @@ -937,14 +936,14 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_tso_segments_max = EM_MAX_SCATTER; scctx->isc_tx_tso_size_max = EM_TSO_SIZE; scctx->isc_tx_tso_segsize_max = EM_TSO_SEG_SIZE; - scctx->isc_capabilities = scctx->isc_capenable = EM_CAPS; + scctx->isc_capabilities = scctx->isc_capenable = LEM_CAPS; /* - * For LEM-class devices, don't enable IFCAP_{TSO4,VLAN_HWTSO,TSO6} + * For LEM-class devices, don't enable IFCAP_{TSO4,VLAN_HWTSO} * by default as we don't have workarounds for all associated * silicon errata. TSO4 may work on > 82544 but its status * is unknown by the authors. Please report any success or failures. */ - scctx->isc_capenable &= ~(IFCAP_TSO4 | IFCAP_VLAN_HWTSO | IFCAP_TSO6); + scctx->isc_capenable &= ~(IFCAP_TSO4 | IFCAP_VLAN_HWTSO); scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; From nobody Mon Jul 31 17:28:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF4ys6Pc7z4pLpb; Mon, 31 Jul 2023 17:30:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF4w41L8Mz3hkc; Mon, 31 Jul 2023 17:28:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690824516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7g47/aPMlbWDdKeck02eQLqoK75oFcBoxYfLkSM/woQ=; b=akjIYOE5a7tBb8VP66d2xH657tBn9Pmym6kU1q+q5dUtdQcLerBvYhH+wQSuwbSUivT+da waF4Xu2mK7MSNhRM7g7d/GBIxGwzB+rhT31WUCQazOuiEaoQ3Y+vV0ns7o5YD8nVkOXEVq pOlzzl47IqPDNvZvyoe6ia2A2ABFX16GGmT1+0uxaFIQ0wH49NI9LF/tTyu+Xe9U1qYEeA AsFbAw4Kiy+7O8qsF9GsMNTJLI0X6IF7N1DZCyaVg1WHkSztdpX/WuXSYBdG60lE76CBWR hpaNhJcH+e5mIsBRGzqtj1YX4kZ9+UbwR4m2cun467v60ddv+9t6AnXEPBmtCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690824516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7g47/aPMlbWDdKeck02eQLqoK75oFcBoxYfLkSM/woQ=; b=lQAW28amAuexH9cTVD/1zSMCbQ64e2I4ySvflLgS+PIAzKmHViCn+kIYQumIxXsnugH29E Vm4Mt2hUxOgM83OzaC8ekeTeiOBEp14rlKPk12ApOd1TDrPD/tgQS+Ry8lEhUhsq6SUxEn 1PJKz08p1F1+Wws0aczPSLmahdDhY090dzqHtwCLd/oh3wk6X7YVDtm2dinUNcFYtAjqpc o6ttMHvyNuMp7N75K40/DIrc1PduzmunpIondVAW/mHv+WwcY9gVxljN5Fs94xOqXRSBH2 AIJ6kH0nwa80IHoOPi2Y0ymf0NT07HznVzjvX2enetoZSszFsfdxhbW7Qgb+aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690824516; a=rsa-sha256; cv=none; b=UWCGwIGjb/OSkBAaSeIHB6SlpVVlVelxDp/vwdRu2OmLnrR5eQm8pLlWAE78RtDcfnXhj7 acyfeT7YGlGEVpe6bfYDoBp64DEtFMlzFgy/ng9K6ijvym6v/bqnBWkDU2CUgaAUII/CCo 3UkODS7tihUIrz0pBIA6Fn3S8Y53ka5pIm0QJsH+CTKYKT+2730EJRJfYP4p7Du15Srjdp dY/yiuz6/sKt3h9hXu8K+K+8kMq40Wlirp3/Fo6ViVih+DFvGrSKqvS1SOrZJ9CCFKI/mE 3xAhkDGjji1P1Q4YwOKrz217yay9s8+v4sTvs3XVCe6a9hKFdAPdz1aGZR7YpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF4w255Vqz140W; Mon, 31 Jul 2023 17:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VHSYVb058122; Mon, 31 Jul 2023 17:28:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VHSY2t058121; Mon, 31 Jul 2023 17:28:34 GMT (envelope-from git) Date: Mon, 31 Jul 2023 17:28:34 GMT Message-Id: <202307311728.36VHSY2t058121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 01718a2e94da - main - tools/build: Work around broken Clang FreeBSD resource dir logic pre-13 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01718a2e94dae03994448f40e0b57a3432f5272c Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=01718a2e94dae03994448f40e0b57a3432f5272c commit 01718a2e94dae03994448f40e0b57a3432f5272c Author: Jessica Clarke AuthorDate: 2023-07-31 17:28:08 +0000 Commit: Jessica Clarke CommitDate: 2023-07-31 17:28:08 +0000 tools/build: Work around broken Clang FreeBSD resource dir logic pre-13 Prior to Clang 13 (e.g. in the Clang 11 present in 13.0-RELEASE), the resource directory logic for FreeBSD was broken and would not resolve symlinks, meaning symlinks would only work if in a directory next to the containing lib directory. Therefore we cannot even use a symlink for worldtmp, we have to make a wrapper script that execs the real binary via an absolute path. Reported by: markj Reviewed by: markj Fixes: 65f28f63a73d ("tools/build: Create toolchain symlinks for non-absolute compiler/linker") Differential Revision: https://reviews.freebsd.org/D41238 --- tools/build/Makefile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tools/build/Makefile b/tools/build/Makefile index 46fd5c7d3159..fd7fd158f169 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -338,10 +338,21 @@ _host_tools_to_symlink:= ${_host_tools_to_symlink:Nsh} .endif # We also need to symlink any non-absolute toolchain commands. Clang finds its -# resource directory relative to itself, so CC/CXX/CPP must be symlinked, and -# we do the same for LD for consistency. There should be no concerns about -# installing over the current system since we don't use the toolchain during -# install. +# resource directory relative to itself, so CC/CXX/CPP cannot be copied, and +# there should be no concerns about installing over the current system since we +# don't use the toolchain during install, so that's not an issue. However, +# before Clang 13 there was no symlink detection for FreeBSD so that was broken +# in the same way as copying (https://reviews.llvm.org/D103346), thus create a +# wrapper script for each to work around this and behave like a symlink. +# Remove this hack and just use a symlink once Clang 13 can be assumed. +# For consistency, we use the same strategy for LD. +.include +.if ${.MAKE.OS} == "FreeBSD" && ${COMPILER_TYPE} == "clang" && \ + ${COMPILER_VERSION} < 130000 +_WRAP_HOST_TOOL= sh -c "printf '\#!/bin/sh\nexec \"\%s\" \"\$$@\"\n' \"\$$0\" > \"\$$1\" && chmod +x \"\$$1\"" +.else +_WRAP_HOST_TOOL= ${_LINK_HOST_TOOL} +.endif .for var in CC CXX CPP LD .for X in $${_empty_var_} X .if !empty(${X}${var}) && !${${X}${var}:M/*} && \ @@ -382,7 +393,7 @@ host-symlinks: echo "Cannot find host tool '${_tool}' in PATH ($$PATH)." >&2; false; \ fi; \ rm -f "${DESTDIR}/bin/${_tool}"; \ - ${_LINK_HOST_TOOL} "$${source_path}" "${DESTDIR}/bin/${_tool}" + ${_WRAP_HOST_TOOL} "$${source_path}" "${DESTDIR}/bin/${_tool}" .endfor # Create all the directories that are needed during the legacy, bootstrap-tools From nobody Mon Jul 31 18:28:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF6FK5RJ6z4pNq0; Mon, 31 Jul 2023 18:28:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF6F46Zswz3sCR; Mon, 31 Jul 2023 18:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690828105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CElO4+0m0BkpF4H36V6n2zxZbqmz7oooMe79yMltz9k=; b=D7NC4k9eoTMwAlN/lbNUoGr3BFppaZqNHw6Em+CC+F3a9wZBTAezfOw4co0Ab9vanjtelS vVuDVfj5BtoBIrn7sBpmNGrhxhMPuOw2jENic6ls6bgTl1zHVULtytqkUth22RDy9yvRJx LAdM7KWdBoGO9IF2jSs7cpUH8A6YUho9f7Z7LEPmbWV2xxArv7sLE9PDy4cAzGy43LBzrx 5xYNzMmevEmnksoXban6AavLwpgyZ9yaWaaWacSllpcbvMS9B1ZOom/akY9bLa0I/00+Qp x8Zq0q0S9eWnhCXntzQ0XYOkKgPpoT78ua/LS4UaedHmAUuSNyHsS2s+UW6G0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690828105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CElO4+0m0BkpF4H36V6n2zxZbqmz7oooMe79yMltz9k=; b=Owg+38QRk9Hu6C0K3on2lBCWN+0rvf3UTWSLQLUFFAmy2VBI9yw2nJsC3Tbl14/8Bh6J97 WKaInlEVaAISGMIqkv13UbXtoLShfV7/ccSj86GyBs7BRM2xianeXuxNaaskp7FyIHVpLc Fp3vbqsSOAUD+KWq2ySLk0X4fCCOJClhrwSUkp79v30kPlUhYpwwhOCvZRd7lJpIuQd2vw J9w3MrVj6i+CbDf4Fh5BVwRts8PHFhhPXlQcaaJk+I6sFTqihfB3+oXtMs1dxEh6glimgw Do7o9IcZMz/toXhqSLlhlLSy/7W6KUnIAOiM0PgmZB6gbbMZI4pVHjw9l+oAeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690828105; a=rsa-sha256; cv=none; b=dA+De9txuNjj4GZD6zVGFmXpzoHa/HdUC2HH/sx3ivln6VlV0XiqB3bgrlXLTE/DhYbkyC yekDepk5MK2D1QtMFZ/YN8E7r901uJ1+xb2OuygIlxD64eKyrNSup7d/ZukKoVKQlbIHJK NM9BzFf6PXyG153JFBV0EGNQEHk8bWyxQrKhbztQafPtMtuV9LeNQcnPOO7msR89j0WXrc 0EbK0nkRJ4CN8qjFcYJjVhDWxfhh0URmAX1233B2HSkCiKnB3xRN849yrMHWGSb9wZDFhC 2wEIym089FT1uaI16/pneXpn38Tsin2v4oXxmzQPRzIQhZPcZ5QUJqDBUcvbpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF6F44H2Cz15g5; Mon, 31 Jul 2023 18:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VISOcS057948; Mon, 31 Jul 2023 18:28:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VISOZX057947; Mon, 31 Jul 2023 18:28:24 GMT (envelope-from git) Date: Mon, 31 Jul 2023 18:28:24 GMT Message-Id: <202307311828.36VISOZX057947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Reifenberger Subject: git: dd262a8273d7 - main - Delete i386 support since I dont have a i386 system to rescue and test. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd262a8273d78c3dd552706087826ff4db6a34d1 Auto-Submitted: auto-generated The branch main has been updated by mr: URL: https://cgit.FreeBSD.org/src/commit/?id=dd262a8273d78c3dd552706087826ff4db6a34d1 commit dd262a8273d78c3dd552706087826ff4db6a34d1 Author: Michael Reifenberger AuthorDate: 2023-07-31 18:26:14 +0000 Commit: Michael Reifenberger CommitDate: 2023-07-31 18:26:14 +0000 Delete i386 support since I dont have a i386 system to rescue and test. --- tools/tools/nanobsd/rescue/R32 | 14 -------------- tools/tools/nanobsd/rescue/build.sh | 8 -------- tools/tools/nanobsd/rescue/merge.sh | 28 ---------------------------- tools/tools/nanobsd/rescue/rescue_i386.conf | 10 ---------- 4 files changed, 60 deletions(-) diff --git a/tools/tools/nanobsd/rescue/R32 b/tools/tools/nanobsd/rescue/R32 deleted file mode 100644 index 3c15ebee49e7..000000000000 --- a/tools/tools/nanobsd/rescue/R32 +++ /dev/null @@ -1,14 +0,0 @@ -# -# R32 -- Generic kernel configuration file with modifications for rescue. -# -# $FreeBSD$ - -include GENERIC - -ident R32 - -nooptions INVARIANTS -nooptions INVARIANT_SUPPORT -nooptions WITNESS -nooptions WITNESS_SKIPSPIN -nooptions MALLOC_DEBUG_MAXZONES diff --git a/tools/tools/nanobsd/rescue/build.sh b/tools/tools/nanobsd/rescue/build.sh index 7d2ed80cd265..0c7026c868f9 100755 --- a/tools/tools/nanobsd/rescue/build.sh +++ b/tools/tools/nanobsd/rescue/build.sh @@ -26,14 +26,6 @@ sh ../nanobsd.sh $* -c ${CFG} if [ \! -d /usr/obj/Rescue ]; then mkdir -p /usr/obj/Rescue fi -F32="/usr/obj/Rescue/rescue_${today}_x32" -D32="/usr/obj/nanobsd.rescue_i386" -if [ -f "${D32}/_.disk.full" ]; then - cp "${D32}/_.disk.full" "${F32}.img" -fi -if [ -f "${D32}/_.disk.iso" ]; then - cp "${D32}/_.disk.iso" "${F32}.iso" -fi F64="/usr/obj/Rescue/rescue_${today}_x64" D64="/usr/obj/nanobsd.rescue_amd64" diff --git a/tools/tools/nanobsd/rescue/merge.sh b/tools/tools/nanobsd/rescue/merge.sh deleted file mode 100755 index afb66371fe3c..000000000000 --- a/tools/tools/nanobsd/rescue/merge.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -today=`date '+%Y%m%d'` - -I32="/usr/obj/Rescue/rescue_${today}_x32.img" -I64="/usr/obj/Rescue/rescue_${today}_x64.img" -IAL="/usr/obj/Rescue/rescue_${today}_xal.img" -D64="/usr/obj/nanobsd.rescue_amd64" -MNT="/usr/obj/Rescue/_mnt" - -if [ \! -d "$MNT" ]; then - mkdir "$MNT" -fi - -dd if=${I32} of=${IAL} bs=128k -MD=`mdconfig -a -t vnode -f ${IAL}` - -dd if=${D64}/_.disk.image of=/dev/${MD}s2 bs=128k -tunefs -L rescues2a /dev/${MD}s2a -mount /dev/${MD}s2a ${MNT} - -sed -i "" -e 's/rescues1/rescues2/' ${MNT}/conf/base/etc/fstab -sed -i "" -e 's/rescues1/rescues2/' ${MNT}/etc/fstab - -umount ${MNT} - -mdconfig -d -u ${MD} diff --git a/tools/tools/nanobsd/rescue/rescue_i386.conf b/tools/tools/nanobsd/rescue/rescue_i386.conf deleted file mode 100644 index 97b51d49e21d..000000000000 --- a/tools/tools/nanobsd/rescue/rescue_i386.conf +++ /dev/null @@ -1,10 +0,0 @@ -# -# $FreeBSD$ -# -NANO_KERNEL=R32 -NANO_ARCH=i386 -TARGET_ARCH=i386; export TARGET_ARCH -#TARGET_CPUTYPE=i386; export TARGET_CPUTYPE -NANO_NAME=rescue_i386 - -. common From nobody Mon Jul 31 20:26:22 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF8sP2h34z4pSsj; Mon, 31 Jul 2023 20:26:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF8sB5CMsz4BsF; Mon, 31 Jul 2023 20:26:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690835182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lqp1/shE7rZwVWjGFaP41SPmXAkydYyvisDhnRmGOgU=; b=BMicV7HoTBkj9eX/X6YWJwfy2zclK08sltaYl+5JsxJU63oGQsWXUgLW8u/Vy+XK5TaKC1 FpQJtJYvzDxmsYa3aXxkp9zr/W0NKSQupGsca46nUwb/3TDjMBQMSl3UHrb5EH6mo631g3 OWAkcVkOOtz9ieglEFqEHMePDLZolV3uH2O5fTk996o8vYYGRonS3+3r8Y9+LZi2okH8ur X9LvLOsSWwdc6hif3pmRJir2bdEQORird5QSlA2drJWrs5I1N91qw4fPqfsgNtwD395uke XK/1BMC9enaz+ExR7UMgdpf2maGKt9lygvtezI++zO1JFr9aXZ4hTLUmeep0MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690835182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lqp1/shE7rZwVWjGFaP41SPmXAkydYyvisDhnRmGOgU=; b=p5aV8SdcrXbJRPTH89IeHVPjZHjE/KwQmu8UWUVeipAL5XntkBZ7NBV7vGXAzyDkAwm3Jj tnUSq4ZroStjm+jOQCNj2HqNIR+I+rYmrM4dGQK+0UkaZKXAFQfGYyV2m9Ti+EAilp8Xb3 Qtnw5JSqhmYkBvlsbclKo4G5mjFwePYDmd0UWVajR32ouoBLuZrV0wBDEV0mhN96O4QJgU m3kFINAVG8kR3j4CxFtMFt7Dy/LAhrMvcXQ6Vl8Arb30ohZJdlgitVJGA18a7p/ALM1Cmf opOpKuI9X77VH/oo7qQC+3op1RhoqbCDva2SZKESiIFtWKjauiyWyIfeqFrODw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690835182; a=rsa-sha256; cv=none; b=hVXk8XyzmxG/KbCp5x6255Hv2J3EArwyoNvmvlC3nVCkQ9ZGHUJNUMCCLdzfvlYLGVRPX9 88tOCoXPkrHnk4yaH4fIVvo3+JtGheF8KZsttQaRHytQHlAikbkxurrMohNLqES/C7acJR 2mRdzDm+Qiy8LgXRlYs9nFY1ZSfTuxFeL36+k8kFbYHWhncRBMqgtF1af0RjOk4YAmZhX0 sJ08r7kVnfHv6JGR4Tped1V32SaPFiZTU+a/Pf1cApIga8gwV5THznLkF9Bj4RBkZhIo1m zaAdERuuAHQd93sy1djP23+i1MzD0JnMRxIBugUfQZG7rwMxL0m6Vt/I0sA/pQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF8sB2s0cz18wd; Mon, 31 Jul 2023 20:26:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VKQMcq057948; Mon, 31 Jul 2023 20:26:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VKQMsp057946; Mon, 31 Jul 2023 20:26:22 GMT (envelope-from git) Date: Mon, 31 Jul 2023 20:26:22 GMT Message-Id: <202307312026.36VKQMsp057946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f561c2ec087e - main - memdesc: Add routines for copying data to/from memory descriptors List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f561c2ec087e87dc997f6ebd351ccade3a90b7a8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f561c2ec087e87dc997f6ebd351ccade3a90b7a8 commit f561c2ec087e87dc997f6ebd351ccade3a90b7a8 Author: John Baldwin AuthorDate: 2023-07-31 20:24:44 +0000 Commit: John Baldwin CommitDate: 2023-07-31 20:24:44 +0000 memdesc: Add routines for copying data to/from memory descriptors These are modeled on the API used for m_copydata/m_copyback and the crypto buffer APIs. One day it might be nice to reduce the proliferation of these by adding cursors and using memdesc directly for crypto request buffers. Reviewed by: markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D40615 --- sys/conf/files | 1 + sys/kern/subr_memdesc.c | 325 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/memdesc.h | 10 ++ 3 files changed, 336 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index 6774be310f84..ae83722eaca5 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3879,6 +3879,7 @@ kern/subr_kobj.c standard kern/subr_lock.c standard kern/subr_log.c standard kern/subr_mchain.c optional libmchain +kern/subr_memdesc.c standard kern/subr_module.c standard kern/subr_msan.c optional kmsan \ compile-with "${NORMAL_C:N-fsanitize*:N-fstack-protector*}" diff --git a/sys/kern/subr_memdesc.c b/sys/kern/subr_memdesc.c new file mode 100644 index 000000000000..9ba9d7fe031b --- /dev/null +++ b/sys/kern/subr_memdesc.c @@ -0,0 +1,325 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Chelsio Communications, Inc. + * Written by: John Baldwin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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 +#include +#include +#include + +static void +phys_copyback(vm_paddr_t pa, int off, int size, const void *src) +{ + const char *cp; + u_int page_off; + int todo; + void *p; + + KASSERT(PMAP_HAS_DMAP, ("direct-map required")); + + cp = src; + pa += off; + page_off = pa & PAGE_MASK; + while (size > 0) { + todo = min(PAGE_SIZE - page_off, size); + p = (void *)PHYS_TO_DMAP(pa); + memcpy(p, cp, todo); + size -= todo; + cp += todo; + pa += todo; + page_off = 0; + } +} + +static void +vlist_copyback(struct bus_dma_segment *vlist, int sglist_cnt, int off, + int size, const void *src) +{ + const char *p; + int todo; + + while (vlist->ds_len <= off) { + KASSERT(sglist_cnt > 1, ("out of sglist entries")); + + off -= vlist->ds_len; + vlist++; + sglist_cnt--; + } + + p = src; + while (size > 0) { + KASSERT(sglist_cnt >= 1, ("out of sglist entries")); + + todo = size; + if (todo > vlist->ds_len - off) + todo = vlist->ds_len - off; + + memcpy((char *)(uintptr_t)vlist->ds_addr + off, p, todo); + off = 0; + vlist++; + sglist_cnt--; + size -= todo; + p += todo; + } +} + +static void +plist_copyback(struct bus_dma_segment *plist, int sglist_cnt, int off, + int size, const void *src) +{ + const char *p; + int todo; + + while (plist->ds_len <= off) { + KASSERT(sglist_cnt > 1, ("out of sglist entries")); + + off -= plist->ds_len; + plist++; + sglist_cnt--; + } + + p = src; + while (size > 0) { + KASSERT(sglist_cnt >= 1, ("out of sglist entries")); + + todo = size; + if (todo > plist->ds_len - off) + todo = plist->ds_len - off; + + phys_copyback(plist->ds_addr, off, todo, p); + off = 0; + plist++; + sglist_cnt--; + size -= todo; + p += todo; + } +} + +static void +vmpages_copyback(vm_page_t *m, int off, int size, const void *src) +{ + struct iovec iov[1]; + struct uio uio; + int error __diagused; + + iov[0].iov_base = __DECONST(void *, src); + iov[0].iov_len = size; + uio.uio_iov = iov; + uio.uio_iovcnt = 1; + uio.uio_offset = 0; + uio.uio_resid = size; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_rw = UIO_WRITE; + error = uiomove_fromphys(m, off, size, &uio); + KASSERT(error == 0 && uio.uio_resid == 0, ("copy failed")); +} + +void +memdesc_copyback(struct memdesc *mem, int off, int size, const void *src) +{ + KASSERT(off >= 0, ("%s: invalid offset %d", __func__, off)); + KASSERT(size >= 0, ("%s: invalid size %d", __func__, off)); + + switch (mem->md_type) { + case MEMDESC_VADDR: + KASSERT(off + size <= mem->md_len, ("copy out of bounds")); + memcpy((char *)mem->u.md_vaddr + off, src, size); + break; + case MEMDESC_PADDR: + KASSERT(off + size <= mem->md_len, ("copy out of bounds")); + phys_copyback(mem->u.md_paddr, off, size, src); + break; + case MEMDESC_VLIST: + vlist_copyback(mem->u.md_list, mem->md_nseg, off, size, src); + break; + case MEMDESC_PLIST: + plist_copyback(mem->u.md_list, mem->md_nseg, off, size, src); + break; + case MEMDESC_UIO: + panic("Use uiomove instead"); + break; + case MEMDESC_MBUF: + m_copyback(mem->u.md_mbuf, off, size, src); + break; + case MEMDESC_VMPAGES: + KASSERT(off + size <= mem->md_len, ("copy out of bounds")); + vmpages_copyback(mem->u.md_ma, mem->md_offset + off, size, + src); + break; + default: + __assert_unreachable(); + } +} + +static void +phys_copydata(vm_paddr_t pa, int off, int size, void *dst) +{ + char *cp; + u_int page_off; + int todo; + const void *p; + + KASSERT(PMAP_HAS_DMAP, ("direct-map required")); + + cp = dst; + pa += off; + page_off = pa & PAGE_MASK; + while (size > 0) { + todo = min(PAGE_SIZE - page_off, size); + p = (const void *)PHYS_TO_DMAP(pa); + memcpy(cp, p, todo); + size -= todo; + cp += todo; + pa += todo; + page_off = 0; + } +} + +static void +vlist_copydata(struct bus_dma_segment *vlist, int sglist_cnt, int off, + int size, void *dst) +{ + char *p; + int todo; + + while (vlist->ds_len <= off) { + KASSERT(sglist_cnt > 1, ("out of sglist entries")); + + off -= vlist->ds_len; + vlist++; + sglist_cnt--; + } + + p = dst; + while (size > 0) { + KASSERT(sglist_cnt >= 1, ("out of sglist entries")); + + todo = size; + if (todo > vlist->ds_len - off) + todo = vlist->ds_len - off; + + memcpy(p, (char *)(uintptr_t)vlist->ds_addr + off, todo); + off = 0; + vlist++; + sglist_cnt--; + size -= todo; + p += todo; + } +} + +static void +plist_copydata(struct bus_dma_segment *plist, int sglist_cnt, int off, + int size, void *dst) +{ + char *p; + int todo; + + while (plist->ds_len <= off) { + KASSERT(sglist_cnt > 1, ("out of sglist entries")); + + off -= plist->ds_len; + plist++; + sglist_cnt--; + } + + p = dst; + while (size > 0) { + KASSERT(sglist_cnt >= 1, ("out of sglist entries")); + + todo = size; + if (todo > plist->ds_len - off) + todo = plist->ds_len - off; + + phys_copydata(plist->ds_addr, off, todo, p); + off = 0; + plist++; + sglist_cnt--; + size -= todo; + p += todo; + } +} + +static void +vmpages_copydata(vm_page_t *m, int off, int size, void *dst) +{ + struct iovec iov[1]; + struct uio uio; + int error __diagused; + + iov[0].iov_base = dst; + iov[0].iov_len = size; + uio.uio_iov = iov; + uio.uio_iovcnt = 1; + uio.uio_offset = 0; + uio.uio_resid = size; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_rw = UIO_READ; + error = uiomove_fromphys(m, off, size, &uio); + KASSERT(error == 0 && uio.uio_resid == 0, ("copy failed")); +} + +void +memdesc_copydata(struct memdesc *mem, int off, int size, void *dst) +{ + KASSERT(off >= 0, ("%s: invalid offset %d", __func__, off)); + KASSERT(size >= 0, ("%s: invalid size %d", __func__, off)); + + switch (mem->md_type) { + case MEMDESC_VADDR: + KASSERT(off + size <= mem->md_len, ("copy out of bounds")); + memcpy(dst, (const char *)mem->u.md_vaddr + off, size); + break; + case MEMDESC_PADDR: + KASSERT(off + size <= mem->md_len, ("copy out of bounds")); + phys_copydata(mem->u.md_paddr, off, size, dst); + break; + case MEMDESC_VLIST: + vlist_copydata(mem->u.md_list, mem->md_nseg, off, size, dst); + break; + case MEMDESC_PLIST: + plist_copydata(mem->u.md_list, mem->md_nseg, off, size, dst); + break; + case MEMDESC_UIO: + panic("Use uiomove instead"); + break; + case MEMDESC_MBUF: + m_copydata(mem->u.md_mbuf, off, size, dst); + break; + case MEMDESC_VMPAGES: + KASSERT(off + size <= mem->md_len, ("copy out of bounds")); + vmpages_copydata(mem->u.md_ma, mem->md_offset + off, size, + dst); + break; + default: + __assert_unreachable(); + } +} diff --git a/sys/sys/memdesc.h b/sys/sys/memdesc.h index 9054e2674409..9bd806688e1c 100644 --- a/sys/sys/memdesc.h +++ b/sys/sys/memdesc.h @@ -155,4 +155,14 @@ memdesc_vmpages(struct vm_page **ma, size_t len, u_int ma_offset) struct memdesc memdesc_bio(struct bio *bio); struct memdesc memdesc_ccb(union ccb *ccb); +/* + * Similar to m_copyback/data, *_copyback copy data from the 'src' + * buffer into the memory descriptor's data buffer while *_copydata + * copy data from the memory descriptor's data buffer into the the + * 'dst' buffer. + */ +void memdesc_copyback(struct memdesc *mem, int off, int size, + const void *src); +void memdesc_copydata(struct memdesc *mem, int off, int size, void *dst); + #endif /* _SYS_MEMDESC_H_ */ From nobody Mon Jul 31 20:26:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF8sP2h3lz4pShP; Mon, 31 Jul 2023 20:26:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RF8sB5CM3z4C90; Mon, 31 Jul 2023 20:26:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690835182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J6Iwh5dhZO69cZXOXdBgxjANfX0Wf5IEZNfbVlNHDkI=; b=B+rPQsVdNcsNpBUoXIPxEuts/Ppw60PFLaqaou4mnMX9+u9JQDu2yC3oVKkTgICndSi4As g4bWiX4hOUtCFgcyKH9DBQp58jq2ho5Iml/9HXvwJC7KLxwQoXdUI7lz5HDLapsEBHa3nK 81/l+s4OfG9CQ8bjKSmsI0fVlUkOLY/qLWtFoBMaaqtVktJ98FSxOYP9CRx7d0Fb1/lUks 7pCKoc7janu8urmUcL8/nW86wLKHY4tFyoCGs6vxhZnFooscuQzQv3LRhIYO25T9yZaVK2 wWjRxiepatXc/NDY3k5KGUTbny1Vn8wqvIxva4TeF69uv4XsHCus6deh8wY1+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690835182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J6Iwh5dhZO69cZXOXdBgxjANfX0Wf5IEZNfbVlNHDkI=; b=ih9b+Spp7L2dlEwjiGBk9ckoiFyhNQQ7DlPQFd5bYdXcHj/UOcgXes5Gj52pOGYnFdvjjU SUiZe96KR5nxYMLNOFtgqTiM52gOsvAPGJCdB91OnSVVTQjEUBxsaY/Li6abaVUcIdvWQe hK/k6ktm1p8S8c7pYSyeUEWxGUTT+2vhrY6TEWNC0l00h50Hmz1iEN4cO2wnbpJqpn/mYz Qyfrlm4JV1/6Sy/KfzcFcHSRsSoCX7en9uIbse4dSHw95NxnEwtNIk/+JRWbWlkVhKna/w z1zfBQJL4H8wk/bwQRiTexNgKpq22ltylXLhoCesxven7g2HxJCz9ZUd8Xg43Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690835182; a=rsa-sha256; cv=none; b=NQI8AOGxEaiEmWOLkuQEMlEkwOs6MS7oeISMh6m/IB9yvtjAN6Fif0qjRzdaXYI3NtMUL4 hKOVu+otxqBcnrhYU2chyP9qlqon3/Przm+jK5zaM0I1XzWdANJLhnt5G4iXtY1vKXHiqJ oRIbWFtgPU2Thxb3DOMI0CYvd7JMuPJxJrTE7OxN+TnV8ZdVzZUP0zAU57wv0+9/8Ye9Ix RHnOjltXVBWTAjjqdJ06DtJJfq2dWNa7CDwNPsyz9ZhHZG7E73bKKtIEx8jWw6wayXOMNx MwyiU3LGUC7bZpi3EjRxMHhO9p6E+hIVZEKW520y6JYb56oqYUFqdOIAj5EQ3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RF8sB2kpQz18pF; Mon, 31 Jul 2023 20:26:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VKQLae057928; Mon, 31 Jul 2023 20:26:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VKQLQV057927; Mon, 31 Jul 2023 20:26:21 GMT (envelope-from git) Date: Mon, 31 Jul 2023 20:26:21 GMT Message-Id: <202307312026.36VKQLQV057927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 56e9a0136f87 - main - gsb_crc32: Fix a warning when compiled in userland. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56e9a0136f87de0dd5d834289d40835700bc9e5b Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=56e9a0136f87de0dd5d834289d40835700bc9e5b commit 56e9a0136f87de0dd5d834289d40835700bc9e5b Author: John Baldwin AuthorDate: 2023-07-31 20:24:18 +0000 Commit: John Baldwin CommitDate: 2023-07-31 20:24:18 +0000 gsb_crc32: Fix a warning when compiled in userland. crc32_tab[] is only exposed as a global in for the kernel, not for userland. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D40614 --- sys/libkern/gsb_crc32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/libkern/gsb_crc32.c b/sys/libkern/gsb_crc32.c index 27b9a926888b..8b13d27b5c08 100644 --- a/sys/libkern/gsb_crc32.c +++ b/sys/libkern/gsb_crc32.c @@ -64,6 +64,9 @@ __FBSDID("$FreeBSD$"); #endif #endif /* _KERNEL */ +#ifndef _KERNEL +static +#endif const uint32_t crc32_tab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, From nobody Mon Jul 31 22:56:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFFmh6n5Cz4pbk8; Tue, 1 Aug 2023 00:07:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFDBn2LZVz3PY7; Mon, 31 Jul 2023 22:56:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690844210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ft1CMto6tf/b+fKx+73ZXOEXzPE+fnWboZtdwi6JD5s=; b=fLZ2wb1qcl8Dhc9FLTQDhWDxX6BYHb0xaGC+wvkJJhfld2lyDSJ8xauOwvIRCxCy4KYavn F+WK2BiWef9QQCxm0OiWNifGVBzCQnoR+6sGVyZPfjpGqY5yrZ4QNJK+TD38+Hz0+RzYK+ D6k98wu6M3TJg+0ilnApm289JFEOEvZ1esYd5tEQuMvPNghQpyP9rVNc/RxQ4wzu42EdaV G/r0fA8518biEryc+Hip5nDo3g7iwUnVQVLU1sBwYdpNrRyvub0QX9WVQ5WLI3kpvCl+4i qhVIKt0lJEhlpsxwGdf3fXesS4YLjPclmdksL9fTh7beSsUaxhT8Hg0v1eRJog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690844210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ft1CMto6tf/b+fKx+73ZXOEXzPE+fnWboZtdwi6JD5s=; b=l+shfkZJ2nvA3FfHQevs54CLZxD5IL7JeVgxjaaRrDJiFcNE6/A4Ftfc72ZsvIfXufsD4T Gr5h5RT6FBdmnWoIF2deeVoqAR4Sr120IDPjiy1emC5LO7xDsGhRO+PIF8z3xFl9TilBem CtoEHY/x6/iRE0e7rfkLBxX/LnCE6HLgC7k5HkLkvm1z+TukzNHoQtFt3b/wLMobzNq+0A lv2DebKVeGugG+FHY3NGLUliE3uGNWDbRkxyuj1ZCD1B16j9oHB2DkPiitML8No4dD0BA3 o+M4ePvKQqODTjJi+ezMCRcp9BQ5g+5vQPi9Zahlg/d75z8RR5qkmRkZXEpZEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690844210; a=rsa-sha256; cv=none; b=oB2n8LXqpQKHtaQE5MdejmRY2drYmh5Nkj8jAtOv2uQ/MqP+RvizG1CNyexsObA/09PYQk WtLjRO+8RbaIFaI/YDQsuB+M6IZM+o1D32y6rjXReo+o+wWESPwSuR5zy3CjhgHJ+oIOYk CeEgRqAckNo5VRnBZlpBLQVWuqYugp+fO7gspwuyooq5xo1Vqbx68eg8stB0RfTmQlrIEv AF/vMGu2WoFzOKBvOa+LShPG8X+C8ivjKdq8nUpTexIz7Arq7N/PS5qAVenoSA+uealuG0 4ICDmXRyoO1O83LpjorC+8f2reTHRWTKgIPPRqvXdaMUjbUBHtjXHWSeyKuzGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFDBl08YrzDjH; Mon, 31 Jul 2023 22:56:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VMujXZ006652; Mon, 31 Jul 2023 22:56:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VMujAC006651; Mon, 31 Jul 2023 22:56:45 GMT (envelope-from git) Date: Mon, 31 Jul 2023 22:56:45 GMT Message-Id: <202307312256.36VMujAC006651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: fa3cf6cdc68c - main - cd9660: do not leak buffers in cd9660_rrip_loop() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa3cf6cdc68cb6d6f2c440f2653258d68eae1015 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fa3cf6cdc68cb6d6f2c440f2653258d68eae1015 commit fa3cf6cdc68cb6d6f2c440f2653258d68eae1015 Author: Konstantin Belousov AuthorDate: 2023-07-31 22:55:13 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-31 22:55:13 +0000 cd9660: do not leak buffers in cd9660_rrip_loop() Reported by: Robert Morris PR: 272856 Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/fs/cd9660/cd9660_rrip.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/fs/cd9660/cd9660_rrip.c b/sys/fs/cd9660/cd9660_rrip.c index 26a09f9be383..21b176a3f0f6 100644 --- a/sys/fs/cd9660/cd9660_rrip.c +++ b/sys/fs/cd9660/cd9660_rrip.c @@ -520,12 +520,18 @@ cd9660_rrip_loop(struct iso_directory_record *isodir, ISO_RRIP_ANALYZE *ana, } if (ana->fields && ana->iso_ce_len) { - if (ana->iso_ce_blk >= ana->imp->volume_space_size - || ana->iso_ce_off + ana->iso_ce_len > ana->imp->logical_block_size - || bread(ana->imp->im_devvp, - ana->iso_ce_blk << - (ana->imp->im_bshift - DEV_BSHIFT), - ana->imp->logical_block_size, NOCRED, &bp)) + if (ana->iso_ce_blk >= ana->imp->volume_space_size || + ana->iso_ce_off + ana->iso_ce_len > + ana->imp->logical_block_size) + break; + if (bp != NULL) { + brelse(bp); + bp = NULL; + } + if (bread(ana->imp->im_devvp, + ana->iso_ce_blk << + (ana->imp->im_bshift - DEV_BSHIFT), + ana->imp->logical_block_size, NOCRED, &bp) != 0) /* what to do now? */ break; phead = (ISO_SUSP_HEADER *)(bp->b_data + ana->iso_ce_off); From nobody Tue Aug 1 02:04:39 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFJMd0lf1z4pgtN; Tue, 1 Aug 2023 02:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFJMX6sFhz44XV; Tue, 1 Aug 2023 02:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690855481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ENkDvyJA6wAoSt3WR1jatcHDJoMEjn/tTnp0B5qOA8=; b=wEV/GLqL1ZMcWl+yy2otEHJkE6Yi6YVQVbzr9jFp7P+Q2Mj6J3sYBVOtm/iv3kF5jR32kR HlmHl2h8uxc7MaAZAU7IEOvFTdjVthYiRpOd1aKK9IgTHceNMkin9bticAduP3VvFqoL/N dleMKr8klOplQGLktNMAJiQdra67ouPqj3MLT0kaBqBvogdj6L7Gc6BrOwilLzr8If4LUG uV8KVMrYBF8b9kPt8H4oBoCuCbuOA8HxySWLplXWUUdK5BerbxqqLHQ749ZL2nqS/jB0hD IFWLULt80hdjkyu8TmDv4JSu0f2cTS6nfsImOdNIZVDckQ6JdMYKcIMEvPZbow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690855481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ENkDvyJA6wAoSt3WR1jatcHDJoMEjn/tTnp0B5qOA8=; b=whaqC3RW0K4d6GFejvCbSY1fH0GvewMG77RaCqNhUMbW7uIuo/eapgQHeMmE/X3ixBkZ7y JM7bBrDl6MLQHDV15M4oJUqUFZ3EyhYLcuSHZfT+0w1efPuQTph35rrUgqZL2EzU02ZIIL mpfDmRUGw8Vm7FJJpESWQSkpOyoWg6iM35oa6F37MkbJUQui9XRbSWlA3NeR/hPB/Kirsm jbGfFb/dbsRhyM5kEDTAHJnycPSoD+165iA/LpV00LOtyUfiPyiFWP8tFhnLYtWp191+lF rnm9Y5lZ0YrgXXehau9s0k0HNbmMRcgIxcvZE/xc3OPGpdkI1PZAfhLZT5E/VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690855481; a=rsa-sha256; cv=none; b=L716C4sJktmAQDAcRmyBwpvBDtgfjXLzkOhSoEoJ9b7N+AOKaq10pgj3JFxG0Z35oBwgah OJ/ynGinSWh76FXnK4xmE0rRAhy2EyjJFei8wMMk0lNIPEC1rwK5hi7ktcmIAO6uT+mCJD uL/Yfq4g7Xxe8ycx3BxsPc0rykhDkNGTrl5TMcUVlgY1TWeXubH+1JwgC3AI+xlPvG5FE7 OKv0laFVAFovWuq5Q57A9AHqsMYP2buYw3EeuNpZZuCtcWgd5er83KhjqBKHw9wOEsXkeO elqb9F4kRiM3U9cYv2CdKwfAJ+oRzEbE10rr/g/HI3/BSUzRndfFouukuNSDEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFJMX4KzKzKQy; Tue, 1 Aug 2023 02:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37124dRD023440; Tue, 1 Aug 2023 02:04:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37124dt1023439; Tue, 1 Aug 2023 02:04:39 GMT (envelope-from git) Date: Tue, 1 Aug 2023 02:04:39 GMT Message-Id: <202308010204.37124dt1023439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: c2cbd7ffa71a - main - isa_common: find next bit faster List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2cbd7ffa71a4009e4cc38c04c726ea562b11361 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=c2cbd7ffa71a4009e4cc38c04c726ea562b11361 commit c2cbd7ffa71a4009e4cc38c04c726ea562b11361 Author: Doug Moore AuthorDate: 2023-08-01 02:02:56 +0000 Commit: Doug Moore CommitDate: 2023-08-01 02:02:56 +0000 isa_common: find next bit faster Since ffs is no longer implemented with a linear search, find_next_bit can work in constant time, with masking. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D41251 --- sys/isa/isa_common.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index ca7fd15442b2..994288886cea 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -275,12 +275,7 @@ find_first_bit(uint32_t mask) static int find_next_bit(uint32_t mask, int bit) { - bit++; - while (bit < 32 && !(mask & (1 << bit))) - bit++; - if (bit != 32) - return (bit); - return (-1); + return (find_first_bit(mask & (-2 << bit))); } /* From nobody Tue Aug 1 05:51:01 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFPNp244yz4pqqG; Tue, 1 Aug 2023 05:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFPNj57Fzz4NGx; Tue, 1 Aug 2023 05:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690869061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EwoaXMwc7FsvEWVxq2ie9lzvZ0ZWcetPuGHhHsmlpaQ=; b=fdZShg9kjGxVFbIOddCjalqv7pOjAwFtcniG3FBN8gP0ZodS1lN4kBSd1f+kz0GipOfcDP yPR+Jj2pqXAKFDaYgVgOdsZjRnBpmBloudem1hEeeWH4KNBt+BPhSPWKRaDRmGzgvZedvN JrP7T1I6eojOz5j7I5L4Iq1krQI227b69Vwd3X5yhyVcbN945L0L3GQbpa+fPvaB6LQCEz Mo8iRVXPlfKpEVrPMBaqfRVbMyEG62zd3iNYEF3QN0MMUru9T2383OwIuwzkIoB7Xfk4u1 7IZw8fEMkWVBfkJtMo1M4PER4myVgY+FuNmC8RIHbIj9dQmasMnFPeFmw/hZug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690869061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EwoaXMwc7FsvEWVxq2ie9lzvZ0ZWcetPuGHhHsmlpaQ=; b=i/DQym7o3aTwbiAEzCC7wpIRJXsxuTt3yyWgPtVeiL3v4bF3iNCRTSngAeT4GhzQuOPYq1 nf8XdxRXUmw5+kGlcC+Iowrz3OBA3ix58LQjHdn66CoVCcnaGO4nGXvJ+//nKldGeSrMPt zVutdr0JB2Dt2GcSSGyUais4nV5Qd8Qso29izXnVmhJDVL6cLEcXD7rXbI6OFvOptw54nf uSUhJoWpvv8mvIVh6/cwxQfZnFTH56CKoOOEVN31B8UWXWmRBNJzf3WMwsxEinTaVQe3TK EUfOj7dF3BCIK/poFY8r9KemVhXJD9zEjJKA1lk6NgJnTi70Iex+wG3jiaRRyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690869061; a=rsa-sha256; cv=none; b=op+AZSnuLQJxcbnrz2K7tYqeICQur0+HtEUo6OZzye0lziyjniMz0K/kx0IMdIkrRId15N lTjluCmQioPrCtEipchsBTRTJEw1lEigDXVOzdKA/ecATCQLHyk1msA1js3nmySLBEYIZR 5+lPZxLUjKFYKXw9QmtZpSGj+8+fqUgTFhx3a7k/xztbYV0p8AU+d0axqd4aSl7BSI3aDP 9VonwT8A+BeyfZfPRzZLdMIA3E5MnFfg/mhRyfKd+lpCnuYGUYjOsVlYsyj3SK3esUHqhF 1jKBcWw6vX6Elpuga/4w7qEqq0LMfymLBvb9ls/sZt2FzBnS/MKzoo5N8XcBxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFPNj3cz8zQnv; Tue, 1 Aug 2023 05:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3715p1Lk001603; Tue, 1 Aug 2023 05:51:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3715p1sa001602; Tue, 1 Aug 2023 05:51:01 GMT (envelope-from git) Date: Tue, 1 Aug 2023 05:51:01 GMT Message-Id: <202308010551.3715p1sa001602@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 135c2b71562f - main - sk(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 135c2b71562f6a6b8e918cc66d5468342c198d02 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=135c2b71562f6a6b8e918cc66d5468342c198d02 commit 135c2b71562f6a6b8e918cc66d5468342c198d02 Author: Gordon Bergling AuthorDate: 2023-08-01 05:50:45 +0000 Commit: Gordon Bergling CommitDate: 2023-08-01 05:50:45 +0000 sk(4): Fix a typo in a source code comment - s/nomral/normal/ MFC after: 3 days --- sys/dev/sk/if_sk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index ac0f552da7d1..39aec245c53f 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -2571,7 +2571,7 @@ skc_resume(device_t dev) * to get correct checksum value but couldn't get correct one. So TCP/UDP * checksum offload was disabled at the moment and only IP checksum offload * was enabled. - * As nomral IP header size is 20 bytes I can't expect it would give an + * As normal IP header size is 20 bytes I can't expect it would give an * increase in throughput. However it seems it doesn't hurt performance in * my testing. If there is a more detailed information for checksum secret * of the hardware in question please contact yongari@FreeBSD.org to add From nobody Tue Aug 1 14:13:05 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFcX214SGz4qDQy; Tue, 1 Aug 2023 14:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFcX12gDMz44b7; Tue, 1 Aug 2023 14:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690899185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jIxzX6bP728YZqy7fs9K7TJBQQlhGsI+9jOesUd5uZ0=; b=MxEGpyT2fXx8mas7AVvx7VG2a75ywST/yhW9I70tybHlpZ3bpK2R+ipJz0nzTjMpc6lzTs jtotzOK+Kk6YD0o9l8TcoJZ5p+iJ2AfRqZuG6zRVq6zhV1xYjWHK8dpeAVu2BLCiR8+RBd krSAPjvt9hmwch2so59hHX4+qS0OBVnfAdBF/BIQ7kaCj08zUVInNCng3Vf0VojGH/nxwp ij8QyPaZ1QniJalHHgKcCzeK0pNhpXY2l2fVdg4NHzX72m8f91oB1l45LMqto5DXj8XYxd UhWP1l+KwqG9VPARBHwdiYJKPJwGkReOoPInHMMsp+tBOYQrC4VhH1UdfejqVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690899185; a=rsa-sha256; cv=none; b=LsMW4Uu9L/HLuj3HaBQFZt+SfK55xxcD18vnU2jnlPBAnHv772Rb/AiyA6jzhe+fZL1Su1 BD9dILzRrfvjFVn8spTmPsWmok6uLHJG/DH2KqlMqlDVn/IWsRyE6bhNHhriHK4MfvKnYi P0HjH8rniigUthKZ9LIdQgUEuKIzQxK9Daqvmic4yUtoAtyu3nFChwmyD+S//JA4cYH7kE xdfxj3TQ30q14HgV+itw6vYdhpwYIobdc0iOeuQ2tlfEK5Wjt1XOJor3cbhqs+ZutFEYx5 UH1Ee8PHALf8sIR+ohuRy1cN3bWPIXZOYX94SW2KoYZjitLezHuuDwkivWT22Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690899185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jIxzX6bP728YZqy7fs9K7TJBQQlhGsI+9jOesUd5uZ0=; b=nQPsiO8kPozrfOGn4QdkGsrqtFWmMyyly6y20vVKz+qcb96T7JT83JDoK49Lw6dhm/aJ4u pirBlnwXd1/he+LruA4ai1J29je4P08zkLEEkOTuJ+7CBhA13jLn7B1/KAdvRAHx5hV9Ut vhWPIzsf/exn4EHoQvYMTg0cylK6qrurRa9NKX5LQgu9hl8Gj+RE1xHJBrW8nlr5YXywFb FyChp1w3TB3jmiOrZCKMuq+fjdrFiqb3FbxFaQkvJ92o9r6uJiNcAQTGuY5Dzmipq08Xv9 4fl98Si+ju8xGB4EGs8p/CvjxB7r8rJNx9DBBA7Y3DfTnkjxf68B3ajq/yjnRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFcX118q9zgJn; Tue, 1 Aug 2023 14:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371ED54P031923; Tue, 1 Aug 2023 14:13:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371ED5sd031922; Tue, 1 Aug 2023 14:13:05 GMT (envelope-from git) Date: Tue, 1 Aug 2023 14:13:05 GMT Message-Id: <202308011413.371ED5sd031922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 848ff9bc1b97 - main - libdtrace: Explicitly set SHLIBDIR and SHLIB_MAJOR List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 848ff9bc1b97b04a0b7328ec7079fb031fef452d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=848ff9bc1b97b04a0b7328ec7079fb031fef452d commit 848ff9bc1b97b04a0b7328ec7079fb031fef452d Author: Mark Johnston AuthorDate: 2023-08-01 14:11:23 +0000 Commit: Mark Johnston CommitDate: 2023-08-01 14:11:42 +0000 libdtrace: Explicitly set SHLIBDIR and SHLIB_MAJOR They were previously being defined by cddl/lib/Makefile.inc, and as of commit 4ae699122810 were being overridden by defaults in bsd.own.mk, which changed SHLIBDIR to /usr/lib. Reported by: Domagoj Stolfa Fixes: 4ae699122810 ("dtrace: Add WITH_DTRACE_ASAN") --- cddl/lib/libdtrace/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index a6a7b90d3d39..d6771aee37b6 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -7,6 +7,10 @@ PACKAGE= dtrace LIB= dtrace + +SHLIBDIR= /lib +SHLIB_MAJOR= 2 + SRCS= dt_aggregate.c \ dt_as.c \ dt_buf.c \ From nobody Tue Aug 1 14:13:03 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFcX20nYCz4qDLm; Tue, 1 Aug 2023 14:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFcX038mRz44MN; Tue, 1 Aug 2023 14:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690899184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zvm3A3OjrJdU/Y/pvY/jV3xHE46DekjvS5jQwIxFfx0=; b=LnoV9DJxUY8eqCnjdxOa6WN15ugKBv7jhEgnQh+TKULApGDZ0Mpt1QoWuyFewskzcR3XDc Pp4tEXx7NLNLe9CsL9pUaMZeRoZzbRiD9AZIWFODm99qKxgvIgi0jayZ7YEiT1G4MFgVKa AE3Msl6distgvIGX6UW+ivkwZCUb6c0BdFFyaOO1XzeYE6ShK+Pn6YzuGQ5lKY0bDYTcbC eUnL3Mx9/MiPp6Ahosqp2Aa86MeFd0iSVTQmITSVKBfJbBUST/+1E/isg8W7WG8x3Lkald wJlrzsWOPJLYG7bDaakb48FyZ+53ph5Gl9fmtnlXjRQ4lGlCpZV6LCqWQ6oi2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690899184; a=rsa-sha256; cv=none; b=DsCrO0L4KhFbRSK5d0X6Id0xRTHdbEzFYSARrMeKbCLPwwdczxyMmgNCijzjutpJ8TTq3X 9DCgiwOB13jHDs0Y4fk01bRkHX9IKh8bZoeh6qZYR/QYpXAkuqEVmW964D0oefNMbXhrqs GUQutoqO8nnxt6Em2k8TJE58HDfywUVLxF116sj+SvYbEiP8i9QRcsULD3t4PRoDcyL70F OXh3qD2mGlyDl/QK1ddIqb+2IkpeUtgKmmIR6awlc7e624mqzjOonqmG1TSM2d/lz589B5 Uh1sV7unP6qUY7+TSXnDPO5s1gInILQDPOdOgqNh+E1q8MEWUOLFbFCc8FxvdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690899184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zvm3A3OjrJdU/Y/pvY/jV3xHE46DekjvS5jQwIxFfx0=; b=TNme+6Xn3CXNFeB25x6VipBx0JgA7BNLsFuvWFRlPDhB+KspfnHmjl7UwjXdnSt4boSTZ8 twiWf8Ozztq7RmeMdBjgfHElDfWQPDQ7swnruAONFnj52R5WpwPZPGSplYO0JPCCX9H0gA sBSN2xKJKwYHPo6PuZm1b3yjHXX/l6hkiQVneiwKy+rRvvIDsxPNG9Bn0CwXkcNF6i5gf5 xT2SdAvft4Lk6xtDS/q1ANrsxG8BsQnNrdv/0s4AES9nakMAY0ez//YC2tpN/j54VPzspp cpcy44fqmKy1meu5Q8l92d0sm/NCyUag8jXQVuicvSfaZf2JazedNB04feqLzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFcX01Lf0zgJm; Tue, 1 Aug 2023 14:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371ED3ZW031898; Tue, 1 Aug 2023 14:13:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371ED3FT031897; Tue, 1 Aug 2023 14:13:03 GMT (envelope-from git) Date: Tue, 1 Aug 2023 14:13:03 GMT Message-Id: <202308011413.371ED3FT031897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d0e4e53ebd64 - main - vm_map: Add a macro to fetch a map entry's split boundary index List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0e4e53ebd6499d420c19426586eeeafec157150 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d0e4e53ebd6499d420c19426586eeeafec157150 commit d0e4e53ebd6499d420c19426586eeeafec157150 Author: Mark Johnston AuthorDate: 2023-05-09 14:07:15 +0000 Commit: Mark Johnston CommitDate: 2023-08-01 14:10:02 +0000 vm_map: Add a macro to fetch a map entry's split boundary index The resulting code is a bit more concise. No functional change intended. Reviewed by: alc, dougm, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41249 --- sys/vm/vm_fault.c | 3 +-- sys/vm/vm_map.c | 13 ++++--------- sys/vm/vm_map.h | 4 +++- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 8b4b8ebb7375..458772d976fc 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -539,8 +539,7 @@ vm_fault_populate(struct faultstate *fs) MPASS(pager_last < fs->first_object->size); vm_fault_restore_map_lock(fs); - bdry_idx = (fs->entry->eflags & MAP_ENTRY_SPLIT_BOUNDARY_MASK) >> - MAP_ENTRY_SPLIT_BOUNDARY_SHIFT; + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(fs->entry); if (fs->map->timestamp != fs->map_generation) { if (bdry_idx == 0) { vm_fault_populate_cleanup(fs->first_object, pager_first, diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index eb607d519247..8ab38ae2a087 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -2449,8 +2449,7 @@ vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, vm_offset_t startaddr) KASSERT(entry->end > startaddr && entry->start < startaddr, ("%s: invalid clip of entry %p", __func__, entry)); - bdry_idx = (entry->eflags & MAP_ENTRY_SPLIT_BOUNDARY_MASK) >> - MAP_ENTRY_SPLIT_BOUNDARY_SHIFT; + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); if (bdry_idx != 0) { if ((startaddr & (pagesizes[bdry_idx] - 1)) != 0) return (KERN_INVALID_ARGUMENT); @@ -2523,8 +2522,7 @@ vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, vm_offset_t endaddr) KASSERT(entry->start < endaddr && entry->end > endaddr, ("%s: invalid clip of entry %p", __func__, entry)); - bdry_idx = (entry->eflags & MAP_ENTRY_SPLIT_BOUNDARY_MASK) >> - MAP_ENTRY_SPLIT_BOUNDARY_SHIFT; + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); if (bdry_idx != 0) { if ((endaddr & (pagesizes[bdry_idx] - 1)) != 0) return (KERN_INVALID_ARGUMENT); @@ -3516,8 +3514,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm_offset_t end, int flags) saved_start = entry->start; saved_end = entry->end; last_timestamp = map->timestamp; - bidx = (entry->eflags & MAP_ENTRY_SPLIT_BOUNDARY_MASK) - >> MAP_ENTRY_SPLIT_BOUNDARY_SHIFT; + bidx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); incr = pagesizes[bidx]; vm_map_busy(map); vm_map_unlock(map); @@ -3715,9 +3712,7 @@ vm_map_sync( vm_map_unlock_read(map); return (KERN_INVALID_ARGUMENT); } - bdry_idx = (entry->eflags & - MAP_ENTRY_SPLIT_BOUNDARY_MASK) >> - MAP_ENTRY_SPLIT_BOUNDARY_SHIFT; + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); if (bdry_idx != 0 && ((start & (pagesizes[bdry_idx] - 1)) != 0 || (end & (pagesizes[bdry_idx] - 1)) != 0)) { diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index c4ed36ce57ba..b974f52e51ed 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -154,8 +154,10 @@ struct vm_map_entry { #define MAP_ENTRY_HEADER 0x00080000 #define MAP_ENTRY_SPLIT_BOUNDARY_MASK 0x00300000 - #define MAP_ENTRY_SPLIT_BOUNDARY_SHIFT 20 +#define MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry) \ + (((entry)->eflags & MAP_ENTRY_SPLIT_BOUNDARY_MASK) >> \ + MAP_ENTRY_SPLIT_BOUNDARY_SHIFT) #ifdef _KERNEL static __inline u_char From nobody Tue Aug 1 14:30:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFcwr6Mfxz4qDlq; Tue, 1 Aug 2023 14:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFcwY3FCjz44s8; Tue, 1 Aug 2023 14:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690900253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MU0nFMWaKHukNuVbKY6LyRy6/J8+1ClURHKq5sBI/9Q=; b=BKQjnjds6RIruH8cEI6cw4TdE+b7EI2zzdXc8YtxBqvcqWMUs5kBHpnEA6e0SSxJ76DH9D bZq/nP4h+7CYwyC0JENGm/bmYCFc/F3gSaXr+UY+eGX4PF7cWY7+BddM+Y2ygxwv8ug0Dz EpFgXr08DbZ9F8gdR1dbZIwHpivGO+tDDyKgp7x1TMAhpu5tsjn/Sfe+y20D3bR+xs8f/C chjCOIPoAAeXuNiVKmBVZoTbob354/d+/i2PvuScIJQzhICm6izqUZHtyaA2LGe6nuW/Cj ia77ceFkyp7mShsO8qvLcqdw8FCZdpUF9TqmWAd6geDWmEMx6hePDVo2Ah1Ktg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690900253; a=rsa-sha256; cv=none; b=ybimhK6pM3USr/Ipd2jYgoprkhw6cYvnohn1W1PhUhcKdtYP4eU+1tRyN3TZKHkhMzucG4 r04uqxkjGxAofM/c0y3Qt2/TEQLJHtSlGj7vEhagftYxqSRn8A5WNZx4TCFVrC99NBZau4 2IaQgEc5hEqek2E3mY55+Io5ybVlZFNdwor0bcVz2QfJbBIUSpYR2LdUd3+F7MOqPYnUYE /Wm8dOHXkRdZvGjC+O/9nYtZxoEtJ2gpZK6oqiYZTaUoEmwAMj54BEiMSiI1mwR39eyh2v ZBiYOJx+26Qgve6cF8sqAQCaHe27ZQ9d63PLcMrfZKm9aE5pnkfHJp/kVrjOew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690900253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MU0nFMWaKHukNuVbKY6LyRy6/J8+1ClURHKq5sBI/9Q=; b=cMdKjstHXNZNJysnO5IBR3X4lbWm+DokaX+WBNMwinUeiheGTJN6ZSZuOZefrdY96D9Am6 kTjbe/PlhYUmZDVcFPPEw8UrPW6/B1xaMsK6LzEm8ut35CGniA9L029HX+ve5K0wyY5Vl+ t+FE2PclO31yuUaxpCfa+CHdI1BgBsewGaH/mOQ0sFnB3N2ymZl7tdJjhPS4FNUJT0LiQ5 98Wws+Q4rETVBlAcOGNNfClhBbu15VTbf3PFOIX3GRHCOddHlzpLMntqLwiX5ns2Qi+q5o 8lX2jUmxc5YDF0JwkrNXHn2xlgBDPIddicqlDZTSi+0Om93GAltlpWFzsVpXZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFcwY1YWWzh2Q; Tue, 1 Aug 2023 14:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371EUrfk058637; Tue, 1 Aug 2023 14:30:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371EUr54058636; Tue, 1 Aug 2023 14:30:53 GMT (envelope-from git) Date: Tue, 1 Aug 2023 14:30:53 GMT Message-Id: <202308011430.371EUr54058636@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 258c6d5e9b98 - main - filemon(4): Better error checking in code example List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 258c6d5e9b98122e45c23122cccafee6ce2958b9 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=258c6d5e9b98122e45c23122cccafee6ce2958b9 commit 258c6d5e9b98122e45c23122cccafee6ce2958b9 Author: Pau Amma AuthorDate: 2023-08-01 14:24:44 +0000 Commit: Mitchell Horne CommitDate: 2023-08-01 14:30:38 +0000 filemon(4): Better error checking in code example Discussed with: dim Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D38367 --- share/man/man4/filemon.4 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/share/man/man4/filemon.4 b/share/man/man4/filemon.4 index 9fb2fe10a2ec..b7e7f30133be 100644 --- a/share/man/man4/filemon.4 +++ b/share/man/man4/filemon.4 @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 1, 2022 +.Dd August 1, 2023 .Dt FILEMON 4 .Os .Sh NAME @@ -193,12 +193,13 @@ no log entry for the system call. #include #include #include +#include #include static void open_filemon(void) { - pid_t child; + pid_t child, wait_rv; int fm_fd, fm_log; if ((fm_fd = open("/dev/filemon", O_RDWR | O_CLOEXEC)) == -1) @@ -215,8 +216,14 @@ open_filemon(void) if (ioctl(fm_fd, FILEMON_SET_PID, &child) == -1) err(1, "Cannot set filemon PID"); /* Do something here. */ - } else { - wait(&child); + } else if (child == -1) + err(1, "Cannot fork child"); + else { + while ((wait_rv = wait(&child)) == -1 && + errno == EINTR) + ; + if (wait_rv == -1) + err(1, "cannot wait for child"); close(fm_fd); } } From nobody Tue Aug 1 15:20:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFf2510Zxz4pXJY; Tue, 1 Aug 2023 15:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFf1z0KfLz48vf; Tue, 1 Aug 2023 15:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690903239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T4f2csXDV6i45/09AWR/OkalPtZ8ypsdYlslAoEDjG4=; b=CmpbY+5bajqhO3Nv7oLtokWCfseSzNOwAEjSeEU2jbyUPNeGOfRvBy5tq6ud1o+KO4TxWU eK4oL+kp5XN3sTkBn+kkrSOzx4ZWN7xIj7yo9uZRIPEr96RagBKY7RnXmcJU7loJ/d6DGP fB0DnR+M5IBgZ6gFrJBN8X+bRhg3x/ePJehi0buoMHomJQPDnIxr1VvvBDcts68zoJuKU3 seVOvgcIVSOF7TK2hzn0t4c11+wg8PqCzianBFXxNHH1dRm5at92muJgd9GKUUp4/iv162 UHCa8UiPJCvT+n6YIM7pQ1nfkNRPBfj0CIE94avcZg7onILzyco5Jmo3ME8fjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690903239; a=rsa-sha256; cv=none; b=uEPMqzmTd/xwjF4p9YRoySweRBXa+pER7QS8htYPMQCZuSzZOFODzGxCQUrn1WJcq66+Hk Kq9q5A7yapyZb0ftegtiOD5cqYTf5ud7LmuLx3p+b4Wl0iO0nYZxrC+P/U82zPvAh4l+j+ UtGZ01PHpXo3f+ZYnBzWsVTnZOTgLre648DZgMoVitOSzpFwMDN31hVUlbGoHbp0jwYh6Z zkKxWMid4VRPe/X7r2cWGMvi7jKam2qiEjixI7FdBDT3ZVGKhfk4+oR1WUFs2D4peUmQkU uEkgkbRTyswXUE9BDNo8kjLEL4AD6yPUd5mvw5HnkzWlGcARgsAn6B3RAH8z+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690903239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T4f2csXDV6i45/09AWR/OkalPtZ8ypsdYlslAoEDjG4=; b=WkP+eMauL/zV0vZ9HXuAaeULAww3b8A1iIbjYvD8t/gJWCaAVM9CL8u0i0tKV59J8/ViGC XC5tNv17ttxpxBBEKwPGCElhpnJgVYfV7v4V6PTUbQJ7FcML3nD1DU6xe0YutiNgId9rGA /3lmztZPAKddHse4q8B/IYrXmMlZsOw0iUKy7OXJ1HngvLT0dkHFrH3C9WcVFUA8nNTCX8 aQ+apGnq92PTbqtt7M0snxkNUzc+38ngQaBgZzolA3k43X6wwOyHYpwfEn32Qz0QHGjDDO EHoLu6sBeVn0jz+y19F6QWalfsuSXayfI49qYB6UKkzJdB+Qb/ILNMRpEhoKgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFf1y6MLdzjCB; Tue, 1 Aug 2023 15:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371FKcwQ040839; Tue, 1 Aug 2023 15:20:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371FKc2m040838; Tue, 1 Aug 2023 15:20:38 GMT (envelope-from git) Date: Tue, 1 Aug 2023 15:20:38 GMT Message-Id: <202308011520.371FKc2m040838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 391e1f23b301 - main - src.conf.5: regen after armv6 demotion List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 391e1f23b301780a850a451715e064d46ac35f15 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=391e1f23b301780a850a451715e064d46ac35f15 commit 391e1f23b301780a850a451715e064d46ac35f15 Author: Ed Maste AuthorDate: 2023-08-01 15:19:37 +0000 Commit: Ed Maste CommitDate: 2023-08-01 15:20:15 +0000 src.conf.5: regen after armv6 demotion Fixes: 98d03dca9ac8 ("universe: Demote armv6 to an extra architecture.") Sponsored by: The FreeBSD Foundation --- share/man/man5/src.conf.5 | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 69f0cc5feff9..7eb920e70c5c 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd July 27, 2023 +.Dd August 1, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -454,7 +454,7 @@ Do not build .Xr cxgbetool 8 .Pp This is a default setting on -arm/armv6, arm/armv7, powerpc/powerpc and riscv/riscv64. +arm/armv7, powerpc/powerpc and riscv/riscv64. .It Va WITH_CXGBETOOL Build .Xr cxgbetool 8 @@ -630,7 +630,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7 and arm64/aarch64. +amd64/amd64, arm/armv7 and arm64/aarch64. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP Do not build ELF Tool Chain tools (addr2line, nm, size, strings and strip) @@ -656,7 +656,7 @@ Build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. +arm/armv7, arm64/aarch64, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. .It Va WITHOUT_FILE Do not build .Xr file 1 @@ -722,7 +722,7 @@ Do not build HTML docs. Do not build or install HyperV utilities. .Pp This is a default setting on -arm/armv6, arm/armv7, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. +arm/armv7, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. .It Va WITH_HYPERV Build or install HyperV utilities. .Pp @@ -882,7 +882,7 @@ On 64-bit platforms, do not build 32-bit library set and a runtime linker. .Pp This is a default setting on -arm/armv6, arm/armv7, i386/i386, powerpc/powerpc, powerpc/powerpc64le and riscv/riscv64. +arm/armv7, i386/i386, powerpc/powerpc, powerpc/powerpc64le and riscv/riscv64. .It Va WITH_LIB32 On 64-bit platforms, build the 32-bit library set and a .Nm ld-elf32.so.1 @@ -896,7 +896,7 @@ Do not build LLVM's lld linker. Do not build the LLDB debugger. .Pp This is a default setting on -arm/armv6, arm/armv7 and riscv/riscv64. +arm/armv7 and riscv/riscv64. .It Va WITH_LLDB Build the LLDB debugger. .Pp @@ -1011,12 +1011,12 @@ powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpc64le. Build GELI bootloader support. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386 and riscv/riscv64. +amd64/amd64, arm/armv7, arm64/aarch64, i386/i386 and riscv/riscv64. .It Va WITHOUT_LOADER_KBOOT Do not build kboot, a linuxboot environment loader .Pp This is a default setting on -arm/armv6, arm/armv7, i386/i386, powerpc/powerpc, powerpc/powerpc64le and riscv/riscv64. +arm/armv7, i386/i386, powerpc/powerpc, powerpc/powerpc64le and riscv/riscv64. .It Va WITH_LOADER_KBOOT Build kboot, a linuxboot environment loader .Pp @@ -1031,12 +1031,12 @@ powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpc64le. Build LUA bindings for the boot loader. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386 and riscv/riscv64. +amd64/amd64, arm/armv7, arm64/aarch64, i386/i386 and riscv/riscv64. .It Va WITHOUT_LOADER_OFW Disable building of openfirmware bootloader components. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386 and riscv/riscv64. +amd64/amd64, arm/armv7, arm64/aarch64, i386/i386 and riscv/riscv64. .It Va WITH_LOADER_OFW Build openfirmware bootloader components. .Pp @@ -1051,7 +1051,7 @@ amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64le and riscv/riscv64. Build ubldr. .Pp This is a default setting on -arm/armv6, arm/armv7, powerpc/powerpc and powerpc/powerpc64. +arm/armv7, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_LOADER_VERBOSE Build with extra verbose debugging in the loader. May explode already nearly too large loader over the limit. @@ -1247,7 +1247,7 @@ Do not build .Xr mlx5tool 8 .Pp This is a default setting on -arm/armv6, arm/armv7, powerpc/powerpc and riscv/riscv64. +arm/armv7, powerpc/powerpc and riscv/riscv64. .It Va WITH_MLX5TOOL Build .Xr mlx5tool 8 @@ -1322,7 +1322,7 @@ and related programs. Do not build nvme related tools and kernel modules. .Pp This is a default setting on -arm/armv6, arm/armv7, powerpc/powerpc and riscv/riscv64. +arm/armv7, powerpc/powerpc and riscv/riscv64. .It Va WITH_NVME Build nvme related tools and kernel modules. .Pp @@ -1334,7 +1334,7 @@ Do not build the InfiniBand software stack, including kernel modules and userspace libraries. .Pp This is a default setting on -arm/armv6 and arm/armv7. +arm/armv7. When set, it enforces these options: .Pp .Bl -item -compact @@ -1358,7 +1358,7 @@ Enable building LDAP support for kerberos using an openldap client from ports. Do not build LLVM's OpenMP runtime. .Pp This is a default setting on -arm/armv6, arm/armv7 and powerpc/powerpc. +arm/armv7 and powerpc/powerpc. .It Va WITH_OPENMP Build LLVM's OpenMP runtime. .Pp @@ -1407,7 +1407,7 @@ is set explicitly) Do not include kernel TLS support in OpenSSL. .Pp This is a default setting on -arm/armv6, arm/armv7, i386/i386, powerpc/powerpc and riscv/riscv64. +arm/armv7, i386/i386, powerpc/powerpc and riscv/riscv64. .It Va WITH_OPENSSL_KTLS Include kernel TLS support in OpenSSL. .Pp @@ -1444,7 +1444,7 @@ Do not build dynamically linked binaries as Position-Independent Executable (PIE). .Pp This is a default setting on -arm/armv6, arm/armv7, i386/i386 and powerpc/powerpc. +arm/armv7, i386/i386 and powerpc/powerpc. .It Va WITH_PIE Build dynamically linked binaries as Position-Independent Executable (PIE). From nobody Tue Aug 1 17:03:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFhJh5XlQz4pdGJ; Tue, 1 Aug 2023 17:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFhJg6bZ2z4KKL; Tue, 1 Aug 2023 17:03:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690909412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cAK19CWoUeVdeMa0GcF9qiuzV+XLCMNmcaE5dbmN/VI=; b=I2yLymxL8MMM4AId3AgI7BMOCGU0XRZFGPjFKp8LJv8e3pu6OdmV9R45rIcewWBDIK+Sii 0/IoVpKb/76HwxpiXbh6cJygDtzbBIa5YP+VXM9pglhLj4hEToXlCrFUPeKt0u0lRu8WBv SrJsks6gdKIgJI0XEWyYwNZmUn5NKKCXuusMfuK4qAlahyLT4xKrNGfk8vw8o4UNKV0MIz 4EoYYLEkuGzps0tPevXr7/oxdm7wYx1sCmrLZ2agGreLdssy89nsFaZ+a6jt6EnyDX8Kf6 TdkiBRF9vdA0xiFthIyu6qzc2zaIIVbf1zgnfCeSGUdKFLCTzhIHQL6o0Si6RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690909412; a=rsa-sha256; cv=none; b=XUw1V1Z7z8S8Z7avcAS0Y1QGHMhVOEy2fLmjUHKVVAAneN9ZSLWc6WR1cwBmh4hx3w4oI7 W0bbu/V+JjRZio9nFzFPIYJ2U3iqmhcY9SDWT1pWlYRRFoCRdPYJeSbAr18tAPlpPkZSIm SgcfHFj7FNLUVslMDMpR9SfHB3Fhz6h48qyLZiENjrHG7kl0wioC+3yftXaakG5nF5IvpM 2ptikTbrcO/Couf4wNhRXADGQ9LJtsA53Ozdi4F26y+E4lz2Y3h5GdQrce6tdk2bDfKtac eY/SNnqhKP2B5L4PZ8o/iRMgYKA1pVNGAQOkcOFqG3yVUJ4v/iMAQ7NkJ+2HCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690909412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cAK19CWoUeVdeMa0GcF9qiuzV+XLCMNmcaE5dbmN/VI=; b=U2YasmwKZL9BuN7tJyOeZN4JBW3ANqQNPPRwTlcR9jWpeZ2l34TQ/pf/AdFFSlhdkUvONh f6AutqNxE60DKL8xb0ZQ1d9Rk0NZefavVdeawtcovr6E4cIJ2/2C8aDmeycA9cOU+Be/iR MG05aIvfZmBYJ77fEbnVJObBCAZH9Hkdw82tBktxyPrBVVv+WJX6L6hgBdcTSTmZvfUx55 NgdWD4RUUBWdvQ60pV3/rin8E7Sk/k668rH35hOaJoFwvcULSlUCpGY0LY6af6w8aEKfGo uxX4nWN/PD7jrCGJcuBJ3JldHTnb+5Yko2yL51He3K/+4sdofWruQ1ZJqABaIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFhJg3ZxGzlZB; Tue, 1 Aug 2023 17:03:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371H3VVQ012824; Tue, 1 Aug 2023 17:03:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371H3V7a012823; Tue, 1 Aug 2023 17:03:31 GMT (envelope-from git) Date: Tue, 1 Aug 2023 17:03:31 GMT Message-Id: <202308011703.371H3V7a012823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5cdaac92e119 - main - dtrace: Revert the addition of WITH_DTRACE_ASAN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5cdaac92e119d41063d4f0155a78a4abe767f15e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5cdaac92e119d41063d4f0155a78a4abe767f15e commit 5cdaac92e119d41063d4f0155a78a4abe767f15e Author: Mark Johnston AuthorDate: 2023-08-01 17:01:37 +0000 Commit: Mark Johnston CommitDate: 2023-08-01 17:03:10 +0000 dtrace: Revert the addition of WITH_DTRACE_ASAN The follow-up fix triggers a lib32 build failure, revert everything until the problem is addressed. --- cddl/lib/libdtrace/Makefile | 11 ----------- cddl/usr.sbin/dtrace/Makefile | 5 ----- cddl/usr.sbin/lockstat/Makefile | 7 ------- cddl/usr.sbin/plockstat/Makefile | 7 ------- share/man/man5/src.conf.5 | 5 ----- share/mk/src.opts.mk | 1 - tools/build/options/WITH_DTRACE_ASAN | 4 ---- 7 files changed, 40 deletions(-) diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index d6771aee37b6..23cc8d2db574 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -1,16 +1,10 @@ # $FreeBSD$ -.include - .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libgen/common PACKAGE= dtrace LIB= dtrace - -SHLIBDIR= /lib -SHLIB_MAJOR= 2 - SRCS= dt_aggregate.c \ dt_as.c \ dt_buf.c \ @@ -144,11 +138,6 @@ DSRCS+= regs_aarch64.d YFLAGS+=-d -.if ${MK_DTRACE_ASAN} != "no" -CFLAGS+= -fsanitize=address -fsanitize=undefined -LDFLAGS+= -fsanitize=address -fsanitize=undefined -.endif - LIBADD= ctf elf proc pthread rtld_db CLEANFILES= dt_errtags.c dt_names.c diff --git a/cddl/usr.sbin/dtrace/Makefile b/cddl/usr.sbin/dtrace/Makefile index fcc0668f1b1d..d8510e62fb29 100644 --- a/cddl/usr.sbin/dtrace/Makefile +++ b/cddl/usr.sbin/dtrace/Makefile @@ -30,11 +30,6 @@ CFLAGS+= -DHAVE_ISSETUGID #CFLAGS+= -DNEED_ERRLOC #YFLAGS+= -d -.if ${MK_DTRACE_ASAN} != "no" -CFLAGS+= -fsanitize=address -fsanitize=undefined -LDFLAGS+= -fsanitize=address -fsanitize=undefined -.endif - LIBADD= dtrace ctf elf proc spl .if ${MK_DTRACE_TESTS} != "no" diff --git a/cddl/usr.sbin/lockstat/Makefile b/cddl/usr.sbin/lockstat/Makefile index 72cedbdb20ed..a4bec42df367 100644 --- a/cddl/usr.sbin/lockstat/Makefile +++ b/cddl/usr.sbin/lockstat/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/lockstat PACKAGE= dtrace @@ -28,11 +26,6 @@ CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/sys CFLAGS+= -DHAVE_ISSETUGID -.if ${MK_DTRACE_ASAN} != "no" -CFLAGS+= -fsanitize=address -fsanitize=undefined -LDFLAGS+= -fsanitize=address -fsanitize=undefined -.endif - CFLAGS+= -DNEED_ERRLOC -g #YFLAGS+= -d diff --git a/cddl/usr.sbin/plockstat/Makefile b/cddl/usr.sbin/plockstat/Makefile index 41ef446c111b..22610870c846 100644 --- a/cddl/usr.sbin/plockstat/Makefile +++ b/cddl/usr.sbin/plockstat/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/plockstat PACKAGE= dtrace @@ -28,11 +26,6 @@ CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/sys CFLAGS+= -DHAVE_ISSETUGID -.if ${MK_DTRACE_ASAN} != "no" -CFLAGS+= -fsanitize=address -fsanitize=undefined -LDFLAGS+= -fsanitize=address -fsanitize=undefined -.endif - LIBADD= dtrace proc .include diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 7eb920e70c5c..4554735207c8 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -594,11 +594,6 @@ When set, it enforces these options: .It .Va WITHOUT_CTF .El -.It Va WITH_DTRACE_ASAN -Compile userspace DTrace code (libdtrace, dtrace(1), lockstat(1), plockstat(1)) -with address and undefined behavior sanitizers. -Requires that Clang be used as the base system compiler -and that the runtime support library is available. .It Va WITH_DTRACE_TESTS Build and install the DTrace test suite in .Pa /usr/tests/cddl/usr.sbin/dtrace . diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index a799c1614fff..899d620fb0c1 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -201,7 +201,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_FORMAT \ DETECT_TZ_CHANGES \ DISK_IMAGE_TOOLS_BOOTSTRAP \ - DTRACE_ASAN \ DTRACE_TESTS \ EXPERIMENTAL \ HESIOD \ diff --git a/tools/build/options/WITH_DTRACE_ASAN b/tools/build/options/WITH_DTRACE_ASAN deleted file mode 100644 index 4240aee4b89b..000000000000 --- a/tools/build/options/WITH_DTRACE_ASAN +++ /dev/null @@ -1,4 +0,0 @@ -Compile userspace DTrace code (libdtrace, dtrace(1), lockstat(1), plockstat(1)) -with address and undefined behavior sanitizers. -Requires that Clang be used as the base system compiler -and that the runtime support library is available. From nobody Tue Aug 1 17:26:09 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFhqV3dVSz4pf8Q; Tue, 1 Aug 2023 17:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFhpq4NWfz4RZn; Tue, 1 Aug 2023 17:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690910772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2cbMaQcenrY+MqM94/kG72bBiDHnx9wYlayFBqJhETk=; b=llllUvnd0sAC2tczUwuUiix65mAK3tdCyWoHs4J8HNYm7iSZs5TPPP5UAhF4c5zFJtlpvM emNoVqDovYiloCoRb3xzkF/QOAWbas2YbuAYSjLlX+4ov12zW733FXhpE9aly4o4mLzzgt SYl846vj2cfpD8Q/TVZ0EoDtz1EtZ8frHU8mKPeyiz0R8izHdclSs/FRCfnLILyyTb1qwZ yFiklrJTFcfjmxe0eAm0IfX3OIXQn2wCCQhL8laO4TVJN+sU8dU4YRLH4ymZvfBCsJMO0b uVZl9v1FgCcM7Jl0eoqAm1HcR8EwoN9wEBdqqKohkYQOsf9MOzzOx8PCuQngIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690910772; a=rsa-sha256; cv=none; b=k9kDZJ+KqdfzO3FX/VqH96XoF7dCfJ8TCiO/p2pH1ICtcrNfczdMheDvIzPduoC2FgFaRv 3auLXH8qnTg5UpGlxgIPmNH0efMd2nDFxKNvkTjIlRbB+QLJDuZUeghDvSpw5LoKz6DRiA ee5XMpIURF8goj8s5MxBhW1ULMqOOo9Rlnb6HBaP9qE2BcO5urGt9IIoDEZpkigfDQoHR5 k2y3p92Q0yRm6A0vYPpeds2YjQv+NggtzaOTLXKbgfa670axTLc+lc3wltX56m+lMlMPX+ 6kbFpmY+b/yOwwh/lNa2/q2z6l2REjDD3ENCJK+o+HHq/vX7FcnOtIOtjana7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690910772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2cbMaQcenrY+MqM94/kG72bBiDHnx9wYlayFBqJhETk=; b=MCCB3v1VhrLCICtN9j5UmuuoBmfehqw7B54ygqQ0vRASGWDnav5i/Qd7sVOm0SEmcCC7Jv uu0dAzXzrxt+Qy0hFtRyR2Ihw43Bt8r8hGaA5sMtnRoTYciBlEqHkYCoF5G3LXiQgyRblx X8VWtKRXyyUVwC3RZUfjwIK8pMD6dsMc71zNFbtGEf4W29ne231WB+2LBHb7jv7D+RJqWB bVMLu0UCABBICI7PzDQLxi+EZ1WnvP/TDkbL3es7IqFqXE64RsrsvB3E/zKjOb0ecSb4pU ZGhVmCRHKdIFYDAv+7+TrDtkVwaSDCMO0ufFwVWtrXldtFSAphSV9Saj3rWiGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFhpq2frYzlss; Tue, 1 Aug 2023 17:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371HQ96x046387; Tue, 1 Aug 2023 17:26:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371HQ9m6046386; Tue, 1 Aug 2023 17:26:09 GMT (envelope-from git) Date: Tue, 1 Aug 2023 17:26:09 GMT Message-Id: <202308011726.371HQ9m6046386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 89c762c815da - main - inet.3: remove mention of VAX endianness List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89c762c815dae64a39221956070af549b11ceb80 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=89c762c815dae64a39221956070af549b11ceb80 commit 89c762c815dae64a39221956070af549b11ceb80 Author: Ed Maste AuthorDate: 2023-08-01 17:20:12 +0000 Commit: Ed Maste CommitDate: 2023-08-01 17:23:42 +0000 inet.3: remove mention of VAX endianness Machine endianness is not very important in understanding the inet* functions; the endianness of the VAX is especially so. PR: 272728 Sponsored by: The FreeBSD Foundation --- lib/libc/net/inet.3 | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3 index cb44394d0a0c..7a5d888a4951 100644 --- a/lib/libc/net/inet.3 +++ b/lib/libc/net/inet.3 @@ -191,17 +191,6 @@ a When four parts are specified, each is interpreted as a byte of data and assigned, from left to right, to the four bytes of an Internet address. -Note -that when an Internet address is viewed as a 32-bit -integer quantity on the -.Tn VAX -the bytes referred to -above appear as -.Dq Li d.c.b.a . -That is, -.Tn VAX -bytes are -ordered from right to left. .Pp When a three part address is specified, the last part is interpreted as a 16-bit quantity and placed From nobody Tue Aug 1 17:29:09 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFhtS4J56z4pfBB; Tue, 1 Aug 2023 17:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFhtF4jdMz4RlD; Tue, 1 Aug 2023 17:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690910950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W3V//YNBWGuPYd5fdN3Sl1HTRuTdkH3C7WMYMV2E9bs=; b=ZvG5ISop6yMqs3/bsO0y5sO43EnI8B24FGOdjbhWT4yRkeX0gCEmAnHXGdotMeCI7vFLmB MN5enPGwd0rrCXcAfBsL+qhUKDL5mzibtHHdQ+1Mimf5vaZgiVakoklkLC6Lmw9+pmGyJk 3gZ9rln7HU8o5pvw/AHXCL2l5UI/wm5qE45kAQI/8L/Kesd7cn3tfBeTkz6hcA5v/nffoe in4U4qW0+WeehSCK2aOSwLupovcHkWRReBAcxhKdb5NNvQNgAlacTP0RXRWZ5odKkK0bnS CY9zMzxDFIH7IUUJYa1a06NcPDYkwaeYpES+n8GY1pgPsZXaCT3v3NFLhL8EWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690910950; a=rsa-sha256; cv=none; b=k/sZyYRJ3sKlIDKmvdLWEbbbPPrTzSB2fw+79QQyEhsm2mYydrIuq3oaFVfE0FhpkgKzna n4ZFWHEo5gZyuruYiN8RiwRalTkHvCZzXB97v2ffxHAxctR6fdzAA+Xzw4jeNSbEEaY9nv Pv7gfb2HZKmmu4ylMy+o6XjsZx/64JpYgf+OloJCoBR6q2BgLLb5o1D9HdruRtG0ZIg/nF OYSJG8IYLPW/hBY+8jbirb34tFOrNBhN4FQ2HKUd8kHgDDuVR2Zd4ItJWk9dtsgynYIAx1 hreVNkJCtETRBGgKamKArJwIY1JJ9MYfILe2A0obIZvniU8iahJnHIkRa6keRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690910950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W3V//YNBWGuPYd5fdN3Sl1HTRuTdkH3C7WMYMV2E9bs=; b=lxqEpj0DKUIspqGGGzYz8OFNG6SiExu3zOVSSvFWo2v/v2Ra1jxlmDiYSIvPC/niLi9xdK QWFq3LorN+oj1QeWQbB67GjEgKNJU4EpoLcnApxq4b/n+kG70kMQMmUgxXgwSlSOYXtH0E 2ogs1lEU7OIOsBbGowYuvrDpITrsYxA6J7D35ENJbFAcIa6KdPUFa+2OsxVhtX3OxlmnTW RBUeB7aJwN0PN+Q5W7sqx8sXhHWeEXvy6PlyJCqJGO1CR/PFQU28crTJaHHdftos55AGmn Tq4BPGQQ5W//abPWsj4GI1eBFSnS8ORwOdkRz+8zVakeBuA3+w3aw8t1q9qQag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFhtF2VD8zm9D; Tue, 1 Aug 2023 17:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371HT9JI046892; Tue, 1 Aug 2023 17:29:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371HT9vL046891; Tue, 1 Aug 2023 17:29:09 GMT (envelope-from git) Date: Tue, 1 Aug 2023 17:29:09 GMT Message-Id: <202308011729.371HT9vL046891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 837f6ecd88ee - main - dtrace: remove illumos code from dt_proc.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 837f6ecd88ee6c4285c088f4f0ddbf637889a130 Auto-Submitted: auto-generated The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=837f6ecd88ee6c4285c088f4f0ddbf637889a130 commit 837f6ecd88ee6c4285c088f4f0ddbf637889a130 Author: Eric van Gyzen AuthorDate: 2023-07-25 16:58:47 +0000 Commit: Eric van Gyzen CommitDate: 2023-08-01 17:28:50 +0000 dtrace: remove illumos code from dt_proc.c The illumos #ifdef's in this file make it harder to read and maintain. There is little change upstream, and increasing changes for FreeBSD. Remove the illumos code with `unifdef`. The only manual changes here are the #includes and #defines at the top, and removing blank lines. Reviewed by: markj MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D41173 --- .../opensolaris/lib/libdtrace/common/dt_proc.c | 150 +-------------------- 1 file changed, 2 insertions(+), 148 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c index 02b63c0a788a..40b1f4108d1a 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c @@ -80,10 +80,8 @@ * up using this condition and will then call the client handler as necessary. */ +#include #include -#ifdef illumos -#include -#endif #include #include #include @@ -93,14 +91,10 @@ #include #include -#ifndef illumos -#include #include -#define SYS_forksys SYS_fork -#endif #define IS_SYS_EXEC(w) (w == SYS_execve) -#define IS_SYS_FORK(w) (w == SYS_vfork || w == SYS_forksys) +#define IS_SYS_FORK(w) (w == SYS_vfork || w == SYS_fork) static dt_bkpt_t * dt_proc_bpcreate(dt_proc_t *dpr, uintptr_t addr, dt_bkpt_f *func, void *data) @@ -147,38 +141,23 @@ dt_proc_bpdestroy(dt_proc_t *dpr, int delbkpts) static void dt_proc_bpmatch(dtrace_hdl_t *dtp, dt_proc_t *dpr) { -#ifdef illumos - const lwpstatus_t *psp = &Pstatus(dpr->dpr_proc)->pr_lwp; -#else unsigned long pc; -#endif dt_bkpt_t *dbp; assert(DT_MUTEX_HELD(&dpr->dpr_lock)); -#ifndef illumos proc_regget(dpr->dpr_proc, REG_PC, &pc); proc_bkptregadj(&pc); -#endif for (dbp = dt_list_next(&dpr->dpr_bps); dbp != NULL; dbp = dt_list_next(dbp)) { -#ifdef illumos - if (psp->pr_reg[R_PC] == dbp->dbp_addr) - break; -#else if (pc == dbp->dbp_addr) break; -#endif } if (dbp == NULL) { dt_dprintf("pid %d: spurious breakpoint wakeup for %lx\n", -#ifdef illumos - (int)dpr->dpr_pid, (ulong_t)psp->pr_reg[R_PC]); -#else (int)dpr->dpr_pid, pc); -#endif return; } @@ -346,12 +325,8 @@ dt_proc_rdwatch(dt_proc_t *dpr, rd_event_e event, const char *evname) } (void) dt_proc_bpcreate(dpr, rdn.u.bptaddr, -#ifdef illumos - (dt_bkpt_f *)dt_proc_rdevent, (void *)evname); -#else /* XXX ugly */ (dt_bkpt_f *)dt_proc_rdevent, __DECONST(void *, evname)); -#endif } /* @@ -361,34 +336,18 @@ dt_proc_rdwatch(dt_proc_t *dpr, rd_event_e event, const char *evname) static void dt_proc_attach(dt_proc_t *dpr, int exec) { -#ifdef illumos - const pstatus_t *psp = Pstatus(dpr->dpr_proc); -#endif rd_err_e err; GElf_Sym sym; assert(DT_MUTEX_HELD(&dpr->dpr_lock)); if (exec) { -#ifdef illumos - if (psp->pr_lwp.pr_errno != 0) - return; /* exec failed: nothing needs to be done */ -#endif dt_proc_bpdestroy(dpr, B_FALSE); -#ifdef illumos - Preset_maps(dpr->dpr_proc); -#endif } if ((dpr->dpr_rtld = Prd_agent(dpr->dpr_proc)) != NULL && (err = rd_event_enable(dpr->dpr_rtld, B_TRUE)) == RD_OK) { -#ifdef illumos - dt_proc_rdwatch(dpr, RD_PREINIT, "RD_PREINIT"); -#endif dt_proc_rdwatch(dpr, RD_POSTINIT, "RD_POSTINIT"); -#ifdef illumos - dt_proc_rdwatch(dpr, RD_DLACTIVITY, "RD_DLACTIVITY"); -#endif } else { dt_dprintf("pid %d: failed to enable rtld events: %s\n", (int)dpr->dpr_pid, dpr->dpr_rtld ? rd_errstr(err) : @@ -511,12 +470,6 @@ dt_proc_control(void *arg) dt_proc_hash_t *dph = dtp->dt_procs; struct ps_prochandle *P = dpr->dpr_proc; int pid = dpr->dpr_pid; - -#ifdef illumos - int pfd = Pctlfd(P); - - const long wstop = PCWSTOP; -#endif int notify = B_FALSE; /* @@ -534,44 +487,13 @@ dt_proc_control(void *arg) */ (void) pthread_mutex_lock(&dpr->dpr_lock); -#ifdef illumos - (void) Punsetflags(P, PR_ASYNC); /* require synchronous mode */ - (void) Psetflags(P, PR_BPTADJ); /* always adjust eip on x86 */ - (void) Punsetflags(P, PR_FORK); /* do not inherit on fork */ - - (void) Pfault(P, FLTBPT, B_TRUE); /* always trace breakpoints */ - (void) Pfault(P, FLTTRACE, B_TRUE); /* always trace single-step */ - - /* - * We must trace exit from exec() system calls so that if the exec is - * successful, we can reset our breakpoints and re-initialize libproc. - */ - (void) Psysexit(P, SYS_execve, B_TRUE); - - /* - * We must trace entry and exit for fork() system calls in order to - * disable our breakpoints temporarily during the fork. We do not set - * the PR_FORK flag, so if fork succeeds the child begins executing and - * does not inherit any other tracing behaviors or a control thread. - */ - (void) Psysentry(P, SYS_vfork, B_TRUE); - (void) Psysexit(P, SYS_vfork, B_TRUE); - (void) Psysentry(P, SYS_forksys, B_TRUE); - (void) Psysexit(P, SYS_forksys, B_TRUE); - - Psync(P); /* enable all /proc changes */ -#endif dt_proc_attach(dpr, B_FALSE); /* enable rtld breakpoints */ /* * If PR_KLC is set, we created the process; otherwise we grabbed it. * Check for an appropriate stop request and wait for dt_proc_continue. */ -#ifdef illumos - if (Pstatus(P)->pr_flags & PR_KLC) -#else if (proc_getflags(P) & PR_KLC) -#endif dt_proc_stop(dpr, DT_PROC_STOP_CREATE); else dt_proc_stop(dpr, DT_PROC_STOP_GRAB); @@ -595,33 +517,16 @@ dt_proc_control(void *arg) while (!dpr->dpr_quit) { const lwpstatus_t *psp; -#ifdef illumos - if (write(pfd, &wstop, sizeof (wstop)) == -1 && errno == EINTR) - continue; /* check dpr_quit and continue waiting */ -#else /* Wait for the process to report status. */ proc_wstatus(P); if (errno == EINTR) continue; /* check dpr_quit and continue waiting */ -#endif (void) pthread_mutex_lock(&dpr->dpr_lock); -#ifdef illumos -pwait_locked: - if (Pstopstatus(P, PCNULL, 0) == -1 && errno == EINTR) { - (void) pthread_mutex_unlock(&dpr->dpr_lock); - continue; /* check dpr_quit and continue waiting */ - } -#endif - switch (Pstate(P)) { case PS_STOP: -#ifdef illumos - psp = &Pstatus(P)->pr_lwp; -#else psp = proc_getlwpstatus(P); -#endif dt_dprintf("pid %d: proc stopped showing %d/%d\n", pid, psp->pr_why, psp->pr_what); @@ -666,11 +571,6 @@ pwait_locked: break; case PS_LOST: -#ifdef illumos - if (Preopen(P) == 0) - goto pwait_locked; -#endif - dt_dprintf("pid %d: proc lost: %s\n", pid, strerror(errno)); @@ -749,11 +649,7 @@ dt_proc_t * dt_proc_lookup(dtrace_hdl_t *dtp, struct ps_prochandle *P, int remove) { dt_proc_hash_t *dph = dtp->dt_procs; -#ifdef illumos - pid_t pid = Pstatus(P)->pr_pid; -#else pid_t pid = proc_getpid(P); -#endif dt_proc_t *dpr, **dpp = &dph->dph_hash[pid & (dph->dph_hashlen - 1)]; for (dpr = *dpp; dpr != NULL; dpr = dpr->dpr_hash) { @@ -787,18 +683,10 @@ dt_proc_destroy(dtrace_hdl_t *dtp, struct ps_prochandle *P) * an external debugger and we were waiting in dt_proc_waitrun(). * Leave the process in this condition using PRELEASE_HANG. */ -#ifdef illumos - if (!(Pstatus(dpr->dpr_proc)->pr_flags & (PR_KLC | PR_RLC))) { -#else if (!(proc_getflags(dpr->dpr_proc) & (PR_KLC | PR_RLC))) { -#endif dt_dprintf("abandoning pid %d\n", (int)dpr->dpr_pid); rflag = PRELEASE_HANG; -#ifdef illumos - } else if (Pstatus(dpr->dpr_proc)->pr_flags & PR_KLC) { -#else } else if (proc_getflags(dpr->dpr_proc) & PR_KLC) { -#endif dt_dprintf("killing pid %d\n", (int)dpr->dpr_pid); rflag = PRELEASE_KILL; /* apply kill-on-last-close */ } else { @@ -823,11 +711,7 @@ dt_proc_destroy(dtrace_hdl_t *dtp, struct ps_prochandle *P) */ (void) pthread_mutex_lock(&dpr->dpr_lock); dpr->dpr_quit = B_TRUE; -#ifdef illumos - (void) _lwp_kill(dpr->dpr_tid, SIGCANCEL); -#else pthread_kill(dpr->dpr_tid, SIGTHR); -#endif /* * If the process is currently idling in dt_proc_stop(), re- @@ -895,11 +779,7 @@ dt_proc_create_thread(dtrace_hdl_t *dtp, dt_proc_t *dpr, uint_t stop) (void) sigfillset(&nset); (void) sigdelset(&nset, SIGABRT); /* unblocked for assert() */ -#ifdef illumos - (void) sigdelset(&nset, SIGCANCEL); /* see dt_proc_destroy() */ -#else (void) sigdelset(&nset, SIGUSR1); /* see dt_proc_destroy() */ -#endif data.dpcd_hdl = dtp; data.dpcd_proc = dpr; @@ -927,14 +807,8 @@ dt_proc_create_thread(dtrace_hdl_t *dtp, dt_proc_t *dpr, uint_t stop) * small amount of useful information to help figure it out. */ if (dpr->dpr_done) { -#ifdef illumos - const psinfo_t *prp = Ppsinfo(dpr->dpr_proc); - int stat = prp ? prp->pr_wstat : 0; - int pid = dpr->dpr_pid; -#else int stat = proc_getwstat(dpr->dpr_proc); int pid = proc_getpid(dpr->dpr_proc); -#endif if (proc_state(dpr->dpr_proc) == PS_LOST) { (void) dt_proc_error(dpr->dpr_hdl, dpr, "failed to control pid %d: process exec'd " @@ -978,26 +852,14 @@ dt_proc_create(dtrace_hdl_t *dtp, const char *file, char *const *argv, (void) pthread_mutex_init(&dpr->dpr_lock, NULL); (void) pthread_cond_init(&dpr->dpr_cv, NULL); -#ifdef illumos - dpr->dpr_proc = Pxcreate(file, argv, dtp->dt_proc_env, &err, NULL, 0); - if (dpr->dpr_proc == NULL) { - return (dt_proc_error(dtp, dpr, - "failed to execute %s: %s\n", file, Pcreate_error(err))); - } -#else if ((err = proc_create(file, argv, dtp->dt_proc_env, pcf, child_arg, &dpr->dpr_proc)) != 0) { return (dt_proc_error(dtp, dpr, "failed to execute %s: %s\n", file, Pcreate_error(err))); } -#endif dpr->dpr_hdl = dtp; -#ifdef illumos - dpr->dpr_pid = Pstatus(dpr->dpr_proc)->pr_pid; -#else dpr->dpr_pid = proc_getpid(dpr->dpr_proc); -#endif (void) Punsetflags(dpr->dpr_proc, PR_RLC); (void) Psetflags(dpr->dpr_proc, PR_KLC); @@ -1058,11 +920,7 @@ dt_proc_grab(dtrace_hdl_t *dtp, pid_t pid, int flags, int nomonitor) (void) pthread_mutex_init(&dpr->dpr_lock, NULL); (void) pthread_cond_init(&dpr->dpr_cv, NULL); -#ifdef illumos - if ((dpr->dpr_proc = Pgrab(pid, flags, &err)) == NULL) { -#else if ((err = proc_attach(pid, flags, &dpr->dpr_proc)) != 0) { -#endif return (dt_proc_error(dtp, dpr, "failed to grab pid %d: %s\n", (int)pid, Pgrab_error(err))); } @@ -1237,11 +1095,7 @@ dtrace_proc_create(dtrace_hdl_t *dtp, const char *file, char *const *argv, struct ps_prochandle *P = dt_proc_create(dtp, file, argv, pcf, child_arg); if (P != NULL && idp != NULL && idp->di_id == 0) { -#ifdef illumos - idp->di_id = Pstatus(P)->pr_pid; /* $target = created pid */ -#else idp->di_id = proc_getpid(P); /* $target = created pid */ -#endif } return (P); From nobody Tue Aug 1 17:29:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFhth0H4Zz4pfS5; Tue, 1 Aug 2023 17:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFhtG6dshz4RlJ; Tue, 1 Aug 2023 17:29:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690910951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mFiq7HthptQeY02L9gmMBxAh7fYUBnxDtJZFiUB78Ts=; b=mqUkuB1ywKQaVgLvFscnm/CrfwD1KvNHEtH+Vvt0y4SrgJCfZiPtHQWiMRehNyWToebhPX d1EqCWUbpAQHohjyvMgWmJGx7WIyjQyOVyOLpR/SaD2J75L1sxUCBc67E2C6OF0VppPKUt YS16F+cAPCUnD81p+T5yfIgmWlQTFOhWlOrlh/Oo7B/jel71t4v7/PPwJMdrO/EhV3nhNH ow+ie6GzAm9yGHhldDQS/UBLRWrP4k4Zkxao8QV28iS8qWnld2w/cQY5KyJdOp7lqlnam8 QdSCbeTo+wGHJ/W7G33rrA4OYQ6B5YlvbKnDSXxEoGP8lvJfqf3ZWvS9Vm+raA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690910951; a=rsa-sha256; cv=none; b=sSo1+1XwbgjkP0xhxxffkDDn4m0v+qgvqgWIXAD/QXFL8pUgGvjX9QoD+RYZmBimHVziUJ Z6RDVETey8azu45REfLClbYjgqFa363hM7+p6Sv1ZI1KS/6SRVGCPum50fNWQ9Cm1NiVsF wugjKX3CokpV701Rjea+5v1pbv+I2cpPgXfUS3rCX6Bbqzv2IY9Aw0pcpzmnAR24+lGtv8 1mt/dZl4Bzw0iImr+DcbakABpb+fXq8WmhvHFbX9ScP0gTVyp0hVegjulbx64Cjwpfmsfi 7ReypWZwziL8iONwpFwJUQ14mdSjFfOCzOziN5vsIhslJdXcR6TL/agir/bUxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690910951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mFiq7HthptQeY02L9gmMBxAh7fYUBnxDtJZFiUB78Ts=; b=RyJAP8AHGBLZCVMWpBJW70bU8peMdj3DeryCmAdZIP7jQzY3ozz8ZnwWGXHqzzaAsl12tq gFIpi3OMtsT4BJ3HyEOzGYgSBzXHYOseDldG0vCHW/veg7mH5kpFl00wfjE4EfkzPEOiwi D+q1tWd+GPwAITJO2RN610o+3BeC7zfaxdAfbyVFarKXxVYm0REz/tCr19VDA3f7CuYDMg xvlD/lz7gZL1JDcjsBfKSULXMGeMG78kmMpmqGPNpzsl4Cft3VvOIpsmbu2sJFsdsumXas L9LhTnt6Q9dJI746KrbVB1M3PxAf3n4TWDo62wVeJf/Zu0IiHmDm1Jlm8wWLCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFhtG1kxxzm9H; Tue, 1 Aug 2023 17:29:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371HTAkg046911; Tue, 1 Aug 2023 17:29:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371HTApA046910; Tue, 1 Aug 2023 17:29:10 GMT (envelope-from git) Date: Tue, 1 Aug 2023 17:29:10 GMT Message-Id: <202308011729.371HTApA046910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: bcbce2a29b89 - main - dtrace: do not overload libproc flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bcbce2a29b892ac10291f652b271963e08d641a8 Auto-Submitted: auto-generated The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=bcbce2a29b892ac10291f652b271963e08d641a8 commit bcbce2a29b892ac10291f652b271963e08d641a8 Author: Eric van Gyzen AuthorDate: 2023-07-25 16:59:07 +0000 Commit: Eric van Gyzen CommitDate: 2023-08-01 17:28:50 +0000 dtrace: do not overload libproc flags dtrace stored its PR_RLC and PR_KLC flags in the proc_handle's flags, where they collided with PATTACH_FORCE and PATTACH_RDONLY, respectively. Thus, Psetflags(PR_KLC) effectively also set the PATTACH_RDONLY flag. Since the flags are private to dtrace (at least on FreeBSD), store them in dtrace's own dt_proc structure instead. On FreeBSD, either PR_RLC or PR_KLC was always set, so remove code that would handle the case where neither was set. Reviewed by: markj MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D41121 --- cddl/compat/opensolaris/include/libproc.h | 3 -- .../opensolaris/lib/libdtrace/common/dt_proc.c | 36 +++++++++------------- .../opensolaris/lib/libdtrace/common/dt_proc.h | 6 ++++ cddl/lib/libdtrace/libproc_compat.h | 2 -- 4 files changed, 20 insertions(+), 27 deletions(-) diff --git a/cddl/compat/opensolaris/include/libproc.h b/cddl/compat/opensolaris/include/libproc.h index 428fa6cf53fe..92c6d6ab0323 100644 --- a/cddl/compat/opensolaris/include/libproc.h +++ b/cddl/compat/opensolaris/include/libproc.h @@ -35,9 +35,6 @@ #define ps_prochandle proc_handle #define Lmid_t int -#define PR_RLC 0x0001 -#define PR_KLC 0x0002 - #include_next #endif diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c index 40b1f4108d1a..958d6ca34e85 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c @@ -490,10 +490,11 @@ dt_proc_control(void *arg) dt_proc_attach(dpr, B_FALSE); /* enable rtld breakpoints */ /* - * If PR_KLC is set, we created the process; otherwise we grabbed it. - * Check for an appropriate stop request and wait for dt_proc_continue. + * If DT_CLOSE_KILL is set, we created the process; otherwise we + * grabbed it. Check for an appropriate stop request and wait for + * dt_proc_continue. */ - if (proc_getflags(P) & PR_KLC) + if (dpr->dpr_close == DT_CLOSE_KILL) dt_proc_stop(dpr, DT_PROC_STOP_CREATE); else dt_proc_stop(dpr, DT_PROC_STOP_GRAB); @@ -586,7 +587,7 @@ dt_proc_control(void *arg) } if (Pstate(P) != PS_UNDEAD) { - if (dpr->dpr_quit && (proc_getflags(P) & PR_KLC)) { + if (dpr->dpr_quit && dpr->dpr_close == DT_CLOSE_KILL) { /* * We're about to kill the child, so don't * bother resuming it. In some cases, such as @@ -678,20 +679,15 @@ dt_proc_destroy(dtrace_hdl_t *dtp, struct ps_prochandle *P) assert(dpr != NULL); - /* - * If neither PR_KLC nor PR_RLC is set, then the process is stopped by - * an external debugger and we were waiting in dt_proc_waitrun(). - * Leave the process in this condition using PRELEASE_HANG. - */ - if (!(proc_getflags(dpr->dpr_proc) & (PR_KLC | PR_RLC))) { - dt_dprintf("abandoning pid %d\n", (int)dpr->dpr_pid); - rflag = PRELEASE_HANG; - } else if (proc_getflags(dpr->dpr_proc) & PR_KLC) { + switch (dpr->dpr_close) { + case DT_CLOSE_KILL: dt_dprintf("killing pid %d\n", (int)dpr->dpr_pid); - rflag = PRELEASE_KILL; /* apply kill-on-last-close */ - } else { + rflag = PRELEASE_KILL; + break; + case DT_CLOSE_RUN: dt_dprintf("releasing pid %d\n", (int)dpr->dpr_pid); - rflag = 0; /* apply run-on-last-close */ + rflag = 0; + break; } if (dpr->dpr_tid) { @@ -860,9 +856,7 @@ dt_proc_create(dtrace_hdl_t *dtp, const char *file, char *const *argv, dpr->dpr_hdl = dtp; dpr->dpr_pid = proc_getpid(dpr->dpr_proc); - - (void) Punsetflags(dpr->dpr_proc, PR_RLC); - (void) Psetflags(dpr->dpr_proc, PR_KLC); + dpr->dpr_close = DT_CLOSE_KILL; if (dt_proc_create_thread(dtp, dpr, dtp->dt_prcmode) != 0) return (NULL); /* dt_proc_error() has been called for us */ @@ -927,9 +921,7 @@ dt_proc_grab(dtrace_hdl_t *dtp, pid_t pid, int flags, int nomonitor) dpr->dpr_hdl = dtp; dpr->dpr_pid = pid; - - (void) Punsetflags(dpr->dpr_proc, PR_KLC); - (void) Psetflags(dpr->dpr_proc, PR_RLC); + dpr->dpr_close = DT_CLOSE_RUN; /* * If we are attempting to grab the process without a monitor diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.h index beae6f6d5cda..458e9902881f 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.h +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.h @@ -40,6 +40,11 @@ extern "C" { #endif +enum dt_close_action { + DT_CLOSE_RUN, + DT_CLOSE_KILL, +}; + typedef struct dt_proc { dt_list_t dpr_list; /* prev/next pointers for lru chain */ struct dt_proc *dpr_hash; /* next pointer for pid hash chain */ @@ -60,6 +65,7 @@ typedef struct dt_proc { uint8_t dpr_rdonly; /* proc flag: opened read-only */ pthread_t dpr_tid; /* control thread (or zero if none) */ dt_list_t dpr_bps; /* list of dt_bkpt_t structures */ + enum dt_close_action dpr_close; /* do this to child when exiting */ } dt_proc_t; typedef struct dt_proc_notify { diff --git a/cddl/lib/libdtrace/libproc_compat.h b/cddl/lib/libdtrace/libproc_compat.h index 14f32506bb8f..d2a04d143e7e 100644 --- a/cddl/lib/libdtrace/libproc_compat.h +++ b/cddl/lib/libdtrace/libproc_compat.h @@ -58,10 +58,8 @@ #define Prd_agent proc_rdagent #define Prelease proc_detach #define Psetbkpt proc_bkptset -#define Psetflags proc_setflags #define Pstate proc_state #define Psymbol_iter_by_addr proc_iter_symbyaddr -#define Punsetflags proc_clearflags #define Pupdate_maps proc_rdagent #define Pupdate_syms proc_updatesyms #define Pxecbkpt proc_bkptexec From nobody Tue Aug 1 17:29:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFhtS4gg1z4pf64; Tue, 1 Aug 2023 17:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFhtJ1nYtz4Rj6; Tue, 1 Aug 2023 17:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690910952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bDEQg5XyvECBzCBKmRp8CcB2Qxtk32rRkKajNpoqnvU=; b=fOCfMG5R2ENWPuZEFvhDFmcJ1pfwrqGycZnMdS63Bol5wmNg5pSKSkcVf8pOJitGP8KbCO bZVtd4s7SQUEfKq9jZPgXi61i+eTSgmlrjoMc8ZA14Z5nVHa331+9Wz6385Yo6hxc0CrLs L8y3/owo0+yDTQybJAdt8ipZ0MLoJHiwob2k08tBXCFfT+S9OPG7O/XlPdiatElT1AO0CJ 3avM+G5FulU2rDzaaInVc7AenYCvm4zuHOapXhNZjzlI04VWvMYSrrAQv6IxXXc3DfoG1a 0D5fwLEOJA4Yd4Vh27JAzX7669H8yb0BPJgUHrdBRmvvG/kEFu31DxO8dkQfMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690910952; a=rsa-sha256; cv=none; b=xBhj8pEFXLlPF8EVV8l/u5PVgVxhNlMDVoIuV6c4YnjkHlUbigmTAFwW6BGIRAsbLf2nlF TDMZQnI7MqIXv9NUwbzJbjb147HvzD6iCav0reFU/znsWTT9YfLsMq23M42jW75SQN14VZ NHckNE/31NCFSHuCkrz+bhcHYEGR9bjQP0K55tjMgYJF568v1L6nkTvKn+LS+eqC33zSig V02CpcVN6a1PMJ9DlgpbK9OvPaO2EjsstFV+iBVc1g/9SO0HWK9SyT+4XaA8gDrmjBABce bbjE+jakzbdqRLJ2CUMgGwxHz+Tu0a/2OBi57d9iUKXjldlB3yqueCchwu2SWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690910952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bDEQg5XyvECBzCBKmRp8CcB2Qxtk32rRkKajNpoqnvU=; b=yUEccb/6XFXQqyg8xktn1jGrverOuTcNmfjVi1RSlJZm8SOxCpf+qMRLQwO/gSSNw33nAJ Ha//UqZQR1Ee2xccUG8+pZSndrH3mT2DNKbvCZDiMuF/pTGjdu0DnP295BosZnGSfU02G7 PbXvsZppzyXBt+7EY8xbmqZXQ6Rr/XgWuo6Znm9EnTtFGF2AHcTo1BL3+MueQ54l8f7YS8 Yxg0GIm0YKE6H2CdgRoet3ry6fY8W9FBVGpU76BvnctlzP5sVplTsspTXBlaN9hHv+dMgk qu+xRYpiLAVJeYdRFWjJ5J1d7x7JpfLKZF6PIL3e66pv8ZAZ+RdIU7xkIAVpvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFhtH2KLPzmJx; Tue, 1 Aug 2023 17:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371HTBJs046938; Tue, 1 Aug 2023 17:29:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371HTBqJ046937; Tue, 1 Aug 2023 17:29:11 GMT (envelope-from git) Date: Tue, 1 Aug 2023 17:29:11 GMT Message-Id: <202308011729.371HTBqJ046937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: be1dd8e65bc6 - main - proc_detach: use ptrace(PT_KILL) to kill the tracee List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be1dd8e65bc607aae2e873ad80076a87869f6755 Auto-Submitted: auto-generated The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=be1dd8e65bc607aae2e873ad80076a87869f6755 commit be1dd8e65bc607aae2e873ad80076a87869f6755 Author: Eric van Gyzen AuthorDate: 2023-07-25 16:58:11 +0000 Commit: Eric van Gyzen CommitDate: 2023-08-01 17:28:50 +0000 proc_detach: use ptrace(PT_KILL) to kill the tracee When MFC'ing commit dad11f990e2 to stable/12, the child would dump core when dtrace exited. It was getting SIGTRAP, even though proc_detach sent a SIGKILL. I could not find the reason for this difference in behavior from main (and stable/13). The present change, however, works as expected, probably due the proc_wkilled special case in kern_ptrace. It also seems like a more obvious approach. While I'm here, fix two other issues in the previous code: It would SIGKILL a tracee even in read-only mode. It would SIGSTOP/SIGCONT the tracee if ptrace succeeded but errno happened to be EBUSY for some other reason. Reviewed by: markj MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D41122 --- lib/libproc/proc_util.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/libproc/proc_util.c b/lib/libproc/proc_util.c index 36d0de76e8fe..cd2c0dff3451 100644 --- a/lib/libproc/proc_util.c +++ b/lib/libproc/proc_util.c @@ -85,25 +85,21 @@ int proc_detach(struct proc_handle *phdl, int reason) { int status; + int request; pid_t pid; if (phdl == NULL) return (EINVAL); if (reason == PRELEASE_HANG) return (EINVAL); - if (reason == PRELEASE_KILL) { - kill(proc_getpid(phdl), SIGKILL); - goto free; - } if ((phdl->flags & PATTACH_RDONLY) != 0) goto free; + request = (reason == PRELEASE_KILL) ? PT_KILL : PT_DETACH; pid = proc_getpid(phdl); - if (ptrace(PT_DETACH, pid, 0, 0) != 0 && errno == ESRCH) - goto free; - if (errno == EBUSY) { + if (ptrace(request, pid, 0, 0) != 0 && errno == EBUSY) { kill(pid, SIGSTOP); waitpid(pid, &status, WUNTRACED); - ptrace(PT_DETACH, pid, 0, 0); + ptrace(request, pid, 0, 0); kill(pid, SIGCONT); } free: From nobody Tue Aug 1 17:29:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFhth04tQz4pfQf; Tue, 1 Aug 2023 17:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFhtJ5Zv8z4Rwn; Tue, 1 Aug 2023 17:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690910952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oiv4RjRImAWpD3Mp7nYaSc8w5eYC+5Zt8LvJsG6NVo8=; b=msPWyaAa10OWMZNaw4I34jCK76YZ4cfyXRwn8/p5+eXOdzn6uUPE1C+cG4/51T3a0by0B0 6oND0krefDeKC6LNTfmRK8kev/ixBh5kdukhff/T4OSj8FFJ1PS0LjqCVlJO0RsbBiQjFZ 6Owv/lPEcbh+OnlsXsiVzNI8PgWZ8Su8P5iRO1cXy7q6MYV7jKVClGIb2Jjn2Fagkt3wQN qDvOD2owWIPTzRoGzf+HpKjaiG98RXSbP0yABDPxg+NE78tY/ep/Gmf1Lzy/3hNKlbTuW/ 8sPs/skXzkYygTJxrKiArRDPLYjh3ePff9EAf29Opw6WZgt5kYWx8AJAWhFpig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690910952; a=rsa-sha256; cv=none; b=ctQQX7fRbIa5dDJl8J8AYhrn9MxkYrtcPB4Hx9GGXMkfB6pS2qazDYf8612IzEnr3RqyWR eUyy7z+sjrA/6dzbOczoe7Qn7ZkzSz2j8TnOXXXzO0JnygrfIOftl74XqEsz5fHCE4WHj6 K//rhlXZDczoPL5pC7pW8w57et0GTIfKHt/trEpSEXLWNJ3SFXfPga+M914XCekrp2Vjb8 q2j0xWwGmsv6vo4f23x5iXtKjPphXbNVHy7QAHPqO3oJuWaV0gXZ1mkhqScNy1NffC029z chdv5dgRSBQPTdVl/berhMiJtCi8+I5SToLEsUBOX8eTtgeeKhesFHVhVMgmdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690910952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oiv4RjRImAWpD3Mp7nYaSc8w5eYC+5Zt8LvJsG6NVo8=; b=OBXyY1krZDXfvdsk20wPMcbMUzn4w8eknjWSzTEo7f0H0NPLQJ7Qheknu5d5EDWJhHfVB2 /uYlsngFb2z1K5akpX/sxK0yzBXh64TW09WyM/P6T5/7//BNF5SXxxXe7QQQO6+NTErmMB 7hiq2juOyKW6mF+p4McvrDrwUyCzQRTUnArI9Fp6gKCyK30kW0kxEZPU6mh2GZrzUW+4hg sDZGuwQzMa6qKjzGCNIZV/AJX8ZCPa6eUuXxSJqZALFyCIsMerAGNi4tJaREHzprRC1I29 iUdmPEgmcvGu8UCEmLkFF1lKuAqZFCFhQuJxWmD3uk1TNLz0hZg7E4aVdK8WgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFhtJ3kzWzm73; Tue, 1 Aug 2023 17:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371HTCJ8046962; Tue, 1 Aug 2023 17:29:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371HTCYQ046961; Tue, 1 Aug 2023 17:29:12 GMT (envelope-from git) Date: Tue, 1 Aug 2023 17:29:12 GMT Message-Id: <202308011729.371HTCYQ046961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 1112883e19aa - main - dtrace: remove dead code for PR_REQUESTED List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1112883e19aaef24082f8d24f9b3bc214046caad Auto-Submitted: auto-generated The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=1112883e19aaef24082f8d24f9b3bc214046caad commit 1112883e19aaef24082f8d24f9b3bc214046caad Author: Eric van Gyzen AuthorDate: 2023-07-27 22:06:33 +0000 Commit: Eric van Gyzen CommitDate: 2023-08-01 17:28:50 +0000 dtrace: remove dead code for PR_REQUESTED libproc's PR_REQUESTED is not implemented on FreeBSD. Remove dead code in dtrace that would handle it. Reviewed by: markj MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D41225 --- .../opensolaris/lib/libdtrace/common/dt_proc.c | 95 ---------------------- lib/libproc/libproc.h | 2 +- 2 files changed, 1 insertion(+), 96 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c index 958d6ca34e85..b32dcea1f8ba 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c @@ -366,84 +366,6 @@ dt_proc_attach(dt_proc_t *dpr, int exec) } } -/* - * Wait for a stopped process to be set running again by some other debugger. - * This is typically not required by /proc-based debuggers, since the usual - * model is that one debugger controls one victim. But DTrace, as usual, has - * its own needs: the stop() action assumes that prun(1) or some other tool - * will be applied to resume the victim process. This could be solved by - * adding a PCWRUN directive to /proc, but that seems like overkill unless - * other debuggers end up needing this functionality, so we implement a cheap - * equivalent to PCWRUN using the set of existing kernel mechanisms. - * - * Our intent is really not just to wait for the victim to run, but rather to - * wait for it to run and then stop again for a reason other than the current - * PR_REQUESTED stop. Since PCWSTOP/Pstopstatus() can be applied repeatedly - * to a stopped process and will return the same result without affecting the - * victim, we can just perform these operations repeatedly until Pstate() - * changes, the representative LWP ID changes, or the stop timestamp advances. - * dt_proc_control() will then rediscover the new state and continue as usual. - * When the process is still stopped in the same exact state, we sleep for a - * brief interval before waiting again so as not to spin consuming CPU cycles. - */ -static void -dt_proc_waitrun(dt_proc_t *dpr) -{ - printf("%s:%s(%d): not implemented\n", __FUNCTION__, __FILE__, - __LINE__); -#ifdef DOODAD - struct ps_prochandle *P = dpr->dpr_proc; - const lwpstatus_t *psp = &Pstatus(P)->pr_lwp; - - int krflag = psp->pr_flags & (PR_KLC | PR_RLC); - timestruc_t tstamp = psp->pr_tstamp; - lwpid_t lwpid = psp->pr_lwpid; - - const long wstop = PCWSTOP; - int pfd = Pctlfd(P); - - assert(DT_MUTEX_HELD(&dpr->dpr_lock)); - assert(psp->pr_flags & PR_STOPPED); - assert(Pstate(P) == PS_STOP); - - /* - * While we are waiting for the victim to run, clear PR_KLC and PR_RLC - * so that if the libdtrace client is killed, the victim stays stopped. - * dt_proc_destroy() will also observe this and perform PRELEASE_HANG. - */ - (void) Punsetflags(P, krflag); - Psync(P); - - (void) pthread_mutex_unlock(&dpr->dpr_lock); - - while (!dpr->dpr_quit) { - if (write(pfd, &wstop, sizeof (wstop)) == -1 && errno == EINTR) - continue; /* check dpr_quit and continue waiting */ - - (void) pthread_mutex_lock(&dpr->dpr_lock); - (void) Pstopstatus(P, PCNULL, 0); - psp = &Pstatus(P)->pr_lwp; - - /* - * If we've reached a new state, found a new representative, or - * the stop timestamp has changed, restore PR_KLC/PR_RLC to its - * original setting and then return with dpr_lock held. - */ - if (Pstate(P) != PS_STOP || psp->pr_lwpid != lwpid || - bcmp(&psp->pr_tstamp, &tstamp, sizeof (tstamp)) != 0) { - (void) Psetflags(P, krflag); - Psync(P); - return; - } - - (void) pthread_mutex_unlock(&dpr->dpr_lock); - (void) poll(NULL, 0, MILLISEC / 2); - } - - (void) pthread_mutex_lock(&dpr->dpr_lock); -#endif -} - typedef struct dt_proc_control_data { dtrace_hdl_t *dpcd_hdl; /* DTrace handle */ dt_proc_t *dpcd_proc; /* proccess to control */ @@ -532,23 +454,6 @@ dt_proc_control(void *arg) dt_dprintf("pid %d: proc stopped showing %d/%d\n", pid, psp->pr_why, psp->pr_what); - /* - * If the process stops showing PR_REQUESTED, then the - * DTrace stop() action was applied to it or another - * debugging utility (e.g. pstop(1)) asked it to stop. - * In either case, the user's intention is for the - * process to remain stopped until another external - * mechanism (e.g. prun(1)) is applied. So instead of - * setting the process running ourself, we wait for - * someone else to do so. Once that happens, we return - * to our normal loop waiting for an event of interest. - */ - if (psp->pr_why == PR_REQUESTED) { - dt_proc_waitrun(dpr); - (void) pthread_mutex_unlock(&dpr->dpr_lock); - continue; - } - /* * If the process stops showing one of the events that * we are tracing, perform the appropriate response. diff --git a/lib/libproc/libproc.h b/lib/libproc/libproc.h index e9a2f3935d84..3d46396c6da8 100644 --- a/lib/libproc/libproc.h +++ b/lib/libproc/libproc.h @@ -111,7 +111,7 @@ typedef enum { typedef struct lwpstatus { int pr_why; -#define PR_REQUESTED 1 +#define PR_REQUESTED 1 /* not implemented */ #define PR_FAULTED 2 #define PR_SYSENTRY 3 #define PR_SYSEXIT 4 From nobody Tue Aug 1 17:59:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFjZH2cp8z4pgdh for ; Tue, 1 Aug 2023 18:00:10 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-22.consmr.mail.gq1.yahoo.com (sonic301-22.consmr.mail.gq1.yahoo.com [98.137.64.148]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFjYz4JtHz4TXK for ; Tue, 1 Aug 2023 18:00:07 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=Gu+BHN3V; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.148 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690912805; bh=sptxbZAvn0qxKDiB2PWCRN1VtohbCQfUvQXNOhJpQGo=; h=From:Subject:Date:References:To:In-Reply-To:From:Subject:Reply-To; b=Gu+BHN3VLAOm1+rxuR25lL0HNIo+p4RGm827LjZ2kCEtv9xLSK2jWco0KIVIMnCamnH8rD2WgSbLpX60KsBJ5klkI3xlrXYDtZD1NfDtQtaBaQfrKD9Xd4LXKALzq8CPjWK5ojovvcy9v206kjzqDDGgIp9idvewIVToTBTnad1+ko+qWeY2ZkbiRhmZC9z5yo1P4pbzWwMezWWXccxPR7DbUhvLMGFbgxCfFE1JSWkxjR5hVCFMKfwmJY8Valc+koHXCwuzRfh6KzsVYgfhWKpAJ/lu+MRv7KpOtz3+4phtmz9rQWaSWt5jGLA3KPZU4/0vN43ZZnGG/3r+Q+N1bQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690912805; bh=QuYw8eeGV5pw26JOG8VqGZn86cKuLx9aNWDi6gMjyEl=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=QbSxxHBew7b5bF/wQ+UtnwmIHNSNEJ3xQb5/ixkHRA2dHaNbhv/ybHOX435p3W4UChsBa6aVkk1X2YXE/Ef8rP2EjF+DcLabeeeu8r69iFmnkHcxjZw37o9O4VF9nnu9dQKz6WX/5+S8QGhFf+mzXXAfTo67OePQ7Gj1i1wItcPqWfCQ9xe02lxjdCzjmrg1BCSyEfjS4DNnyvJgTG4DHOCZWskSPSvH5V1ALNu2ZYizqv65ecmYg37czPkXxGbtOIM8m8nlaqoj/oTTraYPsLqdW72iktEcGkc4SuKLD1xtN9Xe7uHfkeer8YvuoXwiq4kxHA3jo+C33uyrbZOukQ== X-YMail-OSG: SorcCqkVM1ljac3F8ZiIjoRvaLzCXxcxRIkiRWC2hO4H6AlVOgta_r0z8Fl4g9Y 1Id0RxbengrV7vcEqc26VfzGwQyDr0sknbY.QtAY.MbwSgGWS0zVQ3J_Kazmt2moys42ERu3kf1R ZHVBefHlgQZSoeO_F0Lu1MUrCmRqJvLO0gBSvx77OsHn0PUxxBtHZI2KyfYODNrsZYa_IkmudXwm tf5hrBwnrRT3ok7Wy0FHCbExjfOibGgXDcdolNmWWZNDszPwXTMqJcsNV8Ji71nnj3BHeXOPzhN4 VI7bBnxKTZcUu7EYvhErgvkolOLR6mWeUhdt6oybPD63WKnXRvbKvMzIXNr7_oXej5E2svRvPaCX 6r89j_aPnZkXVN4eDPGvm4nCQd0Ozb8RhJ.kscGSG9Boib1uPUxAapcWA2Z9IvMYFXIi31PGVOuz cBkghGx8PhNdLO22Mogj7axQqhPGqxqlA3_MYZxGubfdpXEVyVYL3OwAmHgxNJOCUWCMJF.CPM.4 KIQr.aurdm5FSX9OqVFLwtK2L1L45kBX8gkotvebrKGCDH1m3xrkM2pUsfUFnpe22M7Wybp8lSA9 fj787cpfq_qrCWqwrJFexuU7GtDwsTCyHOHF3y895q3Fbwf0v8efJQNN32KJqlFb_z0od9x1.MD5 YRUGTUar8dV0UTx31dZgmZO6ONdw.kEb_mVCS5EcYTJeqendwlqlX1x.1XVPB7wsu8oD4nm1HM64 cROtjYPLtVKYBYXwthsnmrHmDTIvdE3PNiTbB6mQUIMhMxALO.bpPJ5kx.mK8.0Pj_V7CX4LLa4Z Bsy3QLGVGsL00GU_mqTB9OxrsVsIddFemUmSk1T43ryb4E0tBNibxe37Zi4UfKMrsusnUUm7rO7M HWiMZ07ouCvlFlKxkUWj2yajg1d.oIGZL6O7ScKxESNZtw661maFm5Wi1qOxdFUaugPssmN4abnc M.pkVYxPRCGcbwIqK4psqBjTCzOZxSLErzjVf_m.D7X6ZQkQpvXJvtJ748JFdx2DMQF2w.ZAY.BO jCeslLJWXjlVNmOhVNo.e4WXjn4rJiudHYLs8oFKLelS0U0uL..i4Aic_.wAbJFLAbA7XNQzMnVO lDK_Pf.f7nQ9BMfwZFBZ1WgZCtF3W7lItFTRwgCq9gpGzotajfOf9.jIBGp61P40PqN9K4LPTzYI wFrbnSDyLydFterHYFbua6850fMA2WvxPnYjqzsEQZQ3EQ2ZfEGLmFJ.itnWxOGavgVenYx47mww ZBeAeQfJVqjEt7gCt6.RF4Nz_EiNCFd3xOG3StSBREJzkScpRTGaNBTRGhxa2WHSQKdh88hFgBAX O3HYH0ul1rmypCGenS4Q8XyW1EFRYue738iDKjqUL5tsQ786l.JHVD_EQYit39gNUlXHXvaIFzTx wiPikmbuUH2iVjeZ0O4gYizAJuUpjJW8O8hybq80fnjXVIT4uNX8WbBaN0k38fc8W6qJSTdixZN6 0ih6rinuzAJLYaqyCqjBiBRxTgB3lvdWd5ub8h5Eq0lTkF1Jj.pbn1QKNZBaac0x77CaV1ugB9Iv vYwQwWEkuDTS052jt80XWTyq6bSiJOvS3EjHasDSZLqhM6aj14vgGqKy2xs2.hMMQgY_.YRfWDuq 0p66Lc6zV5elpo__rHtoo2M3jKEwFB5l7uIrEwIqfn3pAab7wHB.8Qr_kcBL0yJDGnLeggIgX0gF crGViwoDlhCgbvTVMwTsYovuvILFekKjqNBMf.zcCw_UZWpBvGPUsEf9M5kggXmapAQilzXlkzWS ifnMs2atfrgBhbThvo7vDKAT8YCTHACD1Y2nEegr3bzi8y4ha1YfNG63UCw9fvZizIoEsynhDDnq jxU1j4B.Tr0zYACSoZVfrECbIcQhZTJP8QjpHdBjHNE76CNk4CSNzoSy7VMA9lWGMjOiq1bHe3lU QHeoJLIqxTS8xwQN49wbx2zWUX0XPE6_TMi.zXFZx44acOXa3SSyMnCe7iSVJAQf1Tef3zq8gpGS opRR6RWuErk3BqhLlf3T1kLRmAtkzeadgyQeDTkwcF4wpc.1oHZlkF8xFxNnU_OQkv_j9YiSn3d1 wjbvm0wEYwKa57EDaBRMLYrX2GxJ4ZGM7N8s8AsZs8br0yqwu_4oNqflusCySSMbUTsA0S7_St06 nDpBeI4OyjI8dgwuBOR31.wvxeoyNodbABjzx6Erx.3GQhJK0z8Z6ZgoHBiylPi2m6mhZ.i3itJu nN_y28qyzI.4Xg6x.LKIzTRp0vH_C8q0Ig7RKDUfQ.9jIwg15dGK5O0Z_X1JZUaiPo5ZNcn5Prr8 T X-Sonic-MF: X-Sonic-ID: 4c68232f-9b13-493e-89f7-ed81ef2ababd Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Tue, 1 Aug 2023 18:00:05 +0000 Received: by hermes--production-gq1-7d844d8954-x2hc6 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a65ab952f4b823d659f8f56c2dea5b00; Tue, 01 Aug 2023 18:00:04 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: 98d03dca9ac8 - main - universe: Demote armv6 to an extra architecture. Date: Tue, 1 Aug 2023 10:59:53 -0700 References: <49D6879B-7C6C-401B-A7E1-B60D9B80C4F1@yahoo.com> To: imp@freebsd.org, dev-commits-src-main@freebsd.org In-Reply-To: <49D6879B-7C6C-401B-A7E1-B60D9B80C4F1@yahoo.com> Message-Id: X-Mailer: Apple Mail (2.3731.700.6) X-Spamd-Result: default: False [-3.34 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.974]; NEURAL_HAM_LONG(-0.87)[-0.865]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.148:from]; BLOCKLISTDE_FAIL(0.00)[98.137.64.148:server fail]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.148:from] X-Rspamd-Queue-Id: 4RFjYz4JtHz4TXK X-Spamd-Bar: --- On Jul 27, 2023, at 23:19, Mark Millard wrote: > Warner Losh wrote on > Date: Fri, 28 Jul 2023 04:31:30 UTC : >=20 >> The branch main has been updated by imp: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D98d03dca9ac8e3eb5857c72768e200e2= bb0c3800 >>=20 >> commit 98d03dca9ac8e3eb5857c72768e200e2bb0c3800 >> Author: Warner Losh >> AuthorDate: 2023-07-28 04:21:44 +0000 >> Commit: Warner Losh >> CommitDate: 2023-07-28 04:30:41 +0000 >>=20 >> universe: Demote armv6 to an extra architecture. >>=20 >> Per discussions over how to lighten the load of armv6, move it to an >> extra arch. You can still build TARGET_ARCH=3Darmv6 if you desire, = but >> it won't be built as part of 'make universe' without -DEXTRA_TARGETS. >=20 > Does this stop the automatic builds of FreeBSD-main-armv6-build > on ci.freebsd.org and/or the = https://ci.freebsd.org/tinderbox/ > reporting for armv6 main? >=20 To answer my own question: the FreeBSD-main-armv6-build builds are still automatically on-going. So the "make universe" status does not contribute-to/control the CI builds status. (I had just been curious as I do not know what all the "make universe" status contributes to for automatatic builds, if anything.) =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Tue Aug 1 20:03:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFmJV06kxz4pnvL; Tue, 1 Aug 2023 20:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFmJN2n07z3GC1; Tue, 1 Aug 2023 20:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690920212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZlJtYqbtpmzYNIUjVhLSVcXk4OJPl/1KGhJpmYB7CO4=; b=uSONyW0SMheKddQZwrMLaB6KRLQ+be/x51UPhk/ybeJsFSLIeUH9v5eS2nG2oLSUEkeG4O NWsmJfVPAdieIFdUG9MQbVuZ+IJ8KfDKiA/Idwps7yOQfGHTpJ7uN9VODnbNlZ9jrSUBJU XSNZVg+wNJTV4YKPxHX2yZhbiutTaf46FnyeKRclIQP6kke5b4EFbQrd2vOl68w//Qt7JY Ss9VPoowPjjtZ6//EsmS/QiMiScUSxuddoRX4QsXiHj43NJxmc0U9YiaLRuRtJZtqI3W9w dDcNbiMkkWNGWeX6D5nCQB1Qv1aGyBGLO8kU4p03QY+7N1vXLp+V5Q9pKrWe/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690920212; a=rsa-sha256; cv=none; b=Voa/lwars3421EwAH/Fj8GzgEVidh5VWRUUDpEa6sA1EMmhk1Q2Qa63y7PBm1rKeDbOYKs VOEoQlKboOxgm4WQXmloUwTBike1Q588Ze5j9s5QRIXvWSvP+9UTnP55GfeO4he2dECbR/ ltHcUGmlH0ZEDjP+lfAF+0tKxubJOZAIYYGBVU10F7kW0qJGW5AUhQLpjgTEmZL8lwvUtp qRWvluB/oFoPHmYttwD/qfCP86art7s/Te12gWrrsYvMhhG6UwPen8En1XxQTSzSMZRYVa Suc2S9H/1k6HXf8Y2JKasxMQ9+u2qs3UoKIrh+9YFoLoLig8+xRhWW8/BH13+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690920212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZlJtYqbtpmzYNIUjVhLSVcXk4OJPl/1KGhJpmYB7CO4=; b=As9bgK0MJi6ITfxEt34NmH/l3x4BaUOzMwKl2Qs2rmdx5lJV38XjCWUQdSLQlcy583KGJt 4504LpkQ3hkIB0N4ZGObpS9v1Wur9BcIUuj5PW6HiIJLY/lDxQ0r+DT1BRfDp6odCq1yis DBFboSz1njtaseNyq0Y0vs7VS7QcCn7ADDZuSfPMvyRgfctK2/OWv61iAsBJgyKppo3zsQ YitDWlFWXvLsLEcFYcb60NOKtH6XcSNxwg1avWb+E/NdkFtAkWvgQhrFPhHFWdodRozIQB 5Ckl2JFacCTJBfvo0hnEeNzId5bqJVCLzoJaQTqvQUHiVXiGziQSWTU7Lh8i/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFmJN1Fv7zqvL; Tue, 1 Aug 2023 20:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371K3VcQ012648; Tue, 1 Aug 2023 20:03:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371K3VSo012647; Tue, 1 Aug 2023 20:03:31 GMT (envelope-from git) Date: Tue, 1 Aug 2023 20:03:31 GMT Message-Id: <202308012003.371K3VSo012647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: bed3ae1d7863 - main - bhyve: Fully reset the fwctl state machine if the guest requests a reset. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bed3ae1d7863ac1e0b1e82ae7bf952937e921efe Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bed3ae1d7863ac1e0b1e82ae7bf952937e921efe commit bed3ae1d7863ac1e0b1e82ae7bf952937e921efe Author: John Baldwin AuthorDate: 2023-06-29 18:27:12 +0000 Commit: Mark Johnston CommitDate: 2023-08-01 19:45:41 +0000 bhyve: Fully reset the fwctl state machine if the guest requests a reset. If a guest tries to reset the fwctl device while a pending request was in flight, the fwctl state machine can be left in an incomplete state. Specifically, rinfo is not cleared. Normally the state machine for fwctl alternates between REQ (receiving request) and RESP (sending response) and ignores port writes while in RESP or port reads while in REQ. Once a guest completes the writes to the port to send a request, the state machine transitions to RESP and ignores future writes. However, if a guest writes a full request and then resets the fwctl device, the state would transition to REQ without draining the pending response or discarding the received request. Instead, additional port writes after the reset were treated as new payload bytes, but were appended to the previously-received request and could overflow the fget_str buffer. To fix, fully reset the fwctl state machine if the guest requests a reset. admbugs: 998 Approved by: so Reviewed by: markj Reported by: Omri Ben Bassat Security: FreeBSD-SA-23:07.bhyve Security: CVE-2023-3494 --- usr.sbin/bhyve/fwctl.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bhyve/fwctl.c b/usr.sbin/bhyve/fwctl.c index 5227c06f0da7..24fedfab8885 100644 --- a/usr.sbin/bhyve/fwctl.c +++ b/usr.sbin/bhyve/fwctl.c @@ -67,12 +67,11 @@ __FBSDID("$FreeBSD$"); * Back-end state-machine */ static enum state { - DORMANT, IDENT_WAIT, IDENT_SEND, REQ, RESP -} be_state = DORMANT; +} be_state; static uint8_t sig[] = { 'B', 'H', 'Y', 'V' }; static u_int ident_idx; @@ -200,6 +199,7 @@ static void fget_data(uint32_t data, uint32_t len __unused) { + assert(fget_cnt + sizeof(uint32_t) <= sizeof(fget_str)); memcpy(&fget_str[fget_cnt], &data, sizeof(data)); fget_cnt += sizeof(uint32_t); } @@ -344,7 +344,8 @@ static int fwctl_request_data(uint32_t value) { - /* Make sure remaining size is >= 0 */ + /* Make sure remaining size is > 0 */ + assert(rinfo.req_size > 0); if (rinfo.req_size <= sizeof(uint32_t)) rinfo.req_size = 0; else @@ -441,6 +442,28 @@ fwctl_response(uint32_t *retval) return (0); } +static void +fwctl_reset(void) +{ + + switch (be_state) { + case RESP: + /* If a response was generated but not fully read, discard it. */ + fwctl_response_done(); + break; + case REQ: + /* Discard partially-received request. */ + memset(&rinfo, 0, sizeof(rinfo)); + break; + case IDENT_WAIT: + case IDENT_SEND: + break; + } + + be_state = IDENT_SEND; + ident_idx = 0; +} + /* * i/o port handling. @@ -468,18 +491,13 @@ fwctl_inb(void) static void fwctl_outw(uint16_t val) { - if (be_state == DORMANT) { - return; - } - if (val == 0) { /* * The guest wants to read the signature. It's possible that the * guest is unaware of the fwctl state at this moment. For that * reason, reset the state machine unconditionally. */ - be_state = IDENT_SEND; - ident_idx = 0; + fwctl_reset(); } } From nobody Tue Aug 1 20:03:33 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFmJV0MPsz4pncJ; Tue, 1 Aug 2023 20:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFmJP456Xz3GMw; Tue, 1 Aug 2023 20:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690920213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBSdMj3ITUeKzKIIPtdap8h5nyrO91qimkEag0cldrg=; b=eaEC1GmXrbyzto12P+ettjLSCwFCQvOTZZEpY8gBu/rGKEbKohL/G3DcHKOo/rW9dnGXHL moqTVsE1l3rtGC5rCYY9+iMvhrJ2TiCmnnKU6ZS0EoO/UJyojpGU9sBnHrGqT9Bd4/0ZVX Egm4w42x42D4CBvEQNs+Qau68rtVzesl2+1E0NNd5tDLlaC36yU5HLxZMItcBm4+OCs+Pp Y0wLmV0Rj2OJLQtjDRflYiyHQ0mJ++jmncoHwshDNALDBwVtPRO+XPNQWSz5JA/P+VOpm1 bRIY/5HlQfe/UuD7ALxL6AFv7THm1C8njybm62fPmIfjV5wm03OfjvdunPL4MQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690920213; a=rsa-sha256; cv=none; b=gn5XV5HbRIxsnQw+uEnZ7yW/vpHqbnOPE75YrnKrdC/OE4kHSjGot1MyrtXd6jwzgF9Ugf OHlqfXzYoyn/xhvl5Syq7dvqbxRQRkilo7DGeFD2z/BRg3I0spExg/pODLZwNA+Ce0sZvF TUqdNiOSYQTeUKCpbsms3G3eOXuM1bV1Sxc6+Zss7nJ7Nuj/kKMwiit1wJnPzwhgLOlhgV PzTIr8PwwdIeHW49EbWV3Je0kd3P3kJb94kGYhfgnyV5m7vH3MGUxcnjmXCduT5dPunIVB 0nQNCRiGJPU9+nuEklTnYNN1vnVQaRWfl93ofe/Q1916l30YPFARBl/d2r610A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690920213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBSdMj3ITUeKzKIIPtdap8h5nyrO91qimkEag0cldrg=; b=DLd4iTvkKNYfOdeaXgxlBlmlpQYhqDnjCemTzwD2Wvb7alfvxwXDAr1WKL4PsvP5Ppsp+b 8P4FRlkyP5eGzwsFM+0EDRvC4y+e1TOb2N1M68iNaNCaGDvG3suErT4YWoQ/oR0Bs+xLZv sAn8iLCjaO47hbHtT8IvTEYvt0sHeREGGDXU+/IZVeXS/tt+D+2vWGB7XD6SZRTBa/QYmn ZdwOyC1TNL+G71l5BzVfuqMPsM4gohS7Ztl54V12ILTQBk6aI0cRfwHHy/+IHuwN7WNPsn hU3b6NjouA4jn6jBji2JJI+YNC3SNtX0eZpn5ta2T0ehhWvMtdTg81l8C8rRVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFmJP15DmzrJ4; Tue, 1 Aug 2023 20:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371K3XYd012667; Tue, 1 Aug 2023 20:03:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371K3XrR012666; Tue, 1 Aug 2023 20:03:33 GMT (envelope-from git) Date: Tue, 1 Aug 2023 20:03:33 GMT Message-Id: <202308012003.371K3XrR012666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ff3d1a3f9d71 - main - frag6: Avoid a possible integer overflow in fragment handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff3d1a3f9d71e706f320f51bae258e4e1a51b388 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ff3d1a3f9d71e706f320f51bae258e4e1a51b388 commit ff3d1a3f9d71e706f320f51bae258e4e1a51b388 Author: Jonathan T. Looney AuthorDate: 2023-08-01 14:58:34 +0000 Commit: Mark Johnston CommitDate: 2023-08-01 19:45:41 +0000 frag6: Avoid a possible integer overflow in fragment handling Reviewed by: kp, markj, bz Approved by: so Security: FreeBSD-SA-23:06.ipv6 Security: CVE-2023-3107 --- sys/netinet6/frag6.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index 5acdc1b20981..9837c6662888 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -861,6 +861,11 @@ postinsert: /* Adjust offset to point where the original next header starts. */ offset = ip6af->ip6af_offset - sizeof(struct ip6_frag); free(ip6af, M_FRAG6); + if ((u_int)plen + (u_int)offset - sizeof(struct ip6_hdr) > + IPV6_MAXPACKET) { + frag6_freef(q6, bucket); + goto dropfrag; + } ip6 = mtod(m, struct ip6_hdr *); ip6->ip6_plen = htons((u_short)plen + offset - sizeof(struct ip6_hdr)); if (q6->ip6q_ecn == IPTOS_ECN_CE) From nobody Tue Aug 1 20:17:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFmcQ5FVpz4ppRd; Tue, 1 Aug 2023 20:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFmcP6rgsz3HDB; Tue, 1 Aug 2023 20:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690921046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AnfQzh4EfLmonD1Lr9k4qPOzq2AMRp2XDtf7dq5UJ7Y=; b=PmJYdXKJJVXLUikpV9iA+eSAj3J9LT51ZdJwXPGjqby5UXu5O2sGLA+z+bkid9YPyqbuqX 2EJ0XyduKsQcm079PjGQDdFF0YOKWbBMB6jJlZlkO7ALPbP7SA5TGatWf/5uG1+fEuz5dz D1WFIX3knUTaqT2RnyG8gYZntrUTNbY2O9wvQgP2m4D5Za7hfuyHx4ondkCUa9B/bckTu8 1/jhK+tBrvnKAH4XxBNWSmuKRRvabto2Ut8OuPIE430Xz33wtRaNRb0CH2fr+KHEk+COVG BHsYXLpmd2ezLdtP8IQiIY6Vt2SiQwdcRwNGwjFq5bOzLDooIaRkoZD58Nmbhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690921046; a=rsa-sha256; cv=none; b=LUtXJCX+GpaDfvjkmGpyPLJW/JL79VwS+eKrzABXrzh2g8DHrHG3/C5spDp9SDmuQEseiY y5fT2OQ62V10nqC4jv6TPmFLh1H/5Fj/ca/3CK8gHpXA8NAQvtvqluzxyl0dzkGYp9qru3 vpKJf4CQvavfmzPqg0eVk82Kn/ZKV3Y+2GjIUdv2JPdOyhw9wzcOzuN8QxBNoxW+dfWwz1 tERd2xNPJmhGkGN19uD9/yUw5I6TShGPCJPsVdy1SjfoxAPEwluu5u02M1cKZOlKwq5fhK DmJxl/tOQHzyztG5AFEx24EFK8hjqf2gy23HQ8+IFTXBpbV4IYPb4Rwc8L8/1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690921046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AnfQzh4EfLmonD1Lr9k4qPOzq2AMRp2XDtf7dq5UJ7Y=; b=csuM4XMUqzaEhlfCNlobtcYBS3fHRs+0UbH4bk0yA/9x6W3rR7FxS28U7/Xjn3NINsGi5m Zn/xZr2C4TwUDeQl6kQKCWk2eh0ZnYnM5UcCcbBGQBdb6k++BgpBjRC05uB4VNjp405bL+ jntjLifYr4EVGJtYwmywg486PcbvJe9LXr5e7bCi9Knou5y0GF7qeeGHZ7N7CD0jdZIHwA 7H3Yy7cZqvhozL4Z65KkGTaOWlQYmpa+7xdfrwFbzqzQLgVYqcFPtHL+y6gU7C6GHBzKQ6 k9qbsUziMmf4BBA7dkfvogG7mbGNKVZ6p1dp7Yg4nv9lW44NgIV1tp2z6s4tTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFmcP3FzdzrXY; Tue, 1 Aug 2023 20:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371KHOCP030731; Tue, 1 Aug 2023 20:17:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371KHOEO030730; Tue, 1 Aug 2023 20:17:24 GMT (envelope-from git) Date: Tue, 1 Aug 2023 20:17:24 GMT Message-Id: <202308012017.371KHOEO030730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 344b5bf82528 - main - Support background fsck_ffs(8) on filesystems using journaled soft updates List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 344b5bf82528575ada304f0df356d2f045772328 Auto-Submitted: auto-generated The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=344b5bf82528575ada304f0df356d2f045772328 commit 344b5bf82528575ada304f0df356d2f045772328 Author: Kirk McKusick AuthorDate: 2023-08-01 20:16:11 +0000 Commit: Kirk McKusick CommitDate: 2023-08-01 20:17:02 +0000 Support background fsck_ffs(8) on filesystems using journaled soft updates An earlier addition of code to fsck_ffs(8) allowed it to support snapshots when running with journalled soft updates. Further functionality has now been added to fsck_ffs(8) to allow it to use snapshots to run in background on live filesystems running with journaled soft updates. This commit enables the use of this functionality. Tested-by: Peter Holm Sponsored-by: The FreeBSD Foundation MFC-after: 2 weeks --- sbin/fsck_ffs/main.c | 19 +++++++++++-------- sbin/fsck_ffs/suj.c | 25 +++++++++++++++++++------ 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 0acf7e709180..bfe2901c4053 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -274,9 +274,16 @@ checkfilesys(char *filesys) if (bkgrdcheck) { if (sbreadfailed) exit(3); /* Cannot read superblock */ - /* Earlier background failed or journaled */ - if (sblock.fs_flags & (FS_NEEDSFSCK | FS_SUJ)) - exit(4); + if ((sblock.fs_flags & FS_NEEDSFSCK) == FS_NEEDSFSCK) + exit(4); /* Earlier background failed */ + if ((sblock.fs_flags & FS_SUJ) == FS_SUJ) { + maxino = sblock.fs_ncg * sblock.fs_ipg; + maxfsblock = sblock.fs_size; + bufinit(); + preen = 1; + if (suj_check(filesys) == 0) + exit(4); /* Journal good, run it now */ + } if ((sblock.fs_flags & FS_DOSOFTDEP) == 0) exit(5); /* Not running soft updates */ size = MIBSIZE; @@ -350,7 +357,7 @@ checkfilesys(char *filesys) /* * Determine if we can and should do journal recovery. */ - if ((sblock.fs_flags & FS_SUJ) == FS_SUJ) { + if (bkgrdflag == 0 && (sblock.fs_flags & FS_SUJ) == FS_SUJ) { if ((sblock.fs_flags & FS_NEEDSFSCK) != FS_NEEDSFSCK && skipclean) { sujrecovery = 1; @@ -619,10 +626,6 @@ setup_bkgrdchk(struct statfs *mntp, int sbreadfailed, char **filesys) pwarn("FULL FSCK NEEDED, CANNOT RUN IN BACKGROUND\n"); return (0); } - if ((sblock.fs_flags & FS_SUJ) != 0) { - pwarn("JOURNALED FILESYSTEM, CANNOT RUN IN BACKGROUND\n"); - return (0); - } if (skipclean && ckclean && (sblock.fs_flags & (FS_UNCLEAN|FS_NEEDSFSCK)) == 0) { /* diff --git a/sbin/fsck_ffs/suj.c b/sbin/fsck_ffs/suj.c index e55e3fb1c782..b78123b59678 100644 --- a/sbin/fsck_ffs/suj.c +++ b/sbin/fsck_ffs/suj.c @@ -2135,7 +2135,9 @@ suj_verifyino(union dinode *dp) } if (DIP(dp, di_modrev) != fs->fs_mtime) { - printf("Journal timestamp does not match fs mount time\n"); + if (!bkgrdcheck || debug) + printf("Journal timestamp does not match " + "fs mount time\n"); return (-1); } @@ -2436,7 +2438,9 @@ suj_check(const char *filesys) sujino = idesc.id_parent; irelse(&ip); } else { - printf("Journal inode removed. Use tunefs to re-create.\n"); + if (!bkgrdcheck || debug) + printf("Journal inode removed. " + "Use tunefs to re-create.\n"); sblock.fs_flags &= ~FS_SUJ; sblock.fs_sujfree = 0; irelse(&ip); @@ -2447,7 +2451,8 @@ suj_check(const char *filesys) */ ginode(sujino, &ip); jip = ip.i_dp; - printf("** SU+J Recovering %s\n", filesys); + if (!bkgrdcheck || debug) + printf("** SU+J Recovering %s\n", filesys); if (suj_verifyino(jip) != 0 || (!preen && !reply("USE JOURNAL"))) { irelse(&ip); return (-1); @@ -2456,15 +2461,23 @@ suj_check(const char *filesys) * Build a list of journal blocks in jblocks before parsing the * available journal blocks in with suj_read(). */ - printf("** Reading %jd byte journal from inode %ju.\n", - DIP(jip, di_size), (uintmax_t)sujino); + if (!bkgrdcheck || debug) + printf("** Reading %jd byte journal from inode %ju.\n", + DIP(jip, di_size), (uintmax_t)sujino); suj_jblocks = jblocks_create(); blocks = ino_visit(jip, sujino, suj_add_block, 0); if (blocks != numfrags(fs, DIP(jip, di_size))) { - printf("Sparse journal inode %ju.\n", (uintmax_t)sujino); + if (!bkgrdcheck || debug) + printf("Sparse journal inode %ju.\n", + (uintmax_t)sujino); irelse(&ip); return (-1); } + /* If journal is valid then do journal check rather than background */ + if (bkgrdcheck) { + irelse(&ip); + return (0); + } irelse(&ip); suj_read(); jblocks_destroy(suj_jblocks); From nobody Tue Aug 1 20:24:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFmmW2srhz4pplH; Tue, 1 Aug 2023 20:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFmmC4cRrz3HqD; Tue, 1 Aug 2023 20:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690921451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqiKXMZQu6bz47cp6w6pCU93GBAojxd/m1KJIrmhXNw=; b=r7uQFL+w38hXJWW1TmspfVYQVSXYk2XM2zrO50kGFplXNZlPuDOBuv2lJnHaeXkWgeM2J9 Xy/BhoesSnhsj/m1zPAocxFux0+5udNp0qTV+7kPJ2EfTJw9G5rQXk2nsN8FXZ2kzd8zJF SS0Z3jkWRsjRQXVe1nzUTFgFIpS3lEE/8nWm5zkEWgCHKXRVaAacFjItXZfw5FBmkmxyX8 G6Id6mPiejAzUDGWnyS8s2hAetZBhSGIn2y7ZIV1jimlS5vPTOw2zD3M8kw4wpBJ5bFLok mIfF5gDv7oCswoc1IVaKHDTZAkv0kutE0X02kDAsdQclxAPwVEqmsEAmf0dpUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690921451; a=rsa-sha256; cv=none; b=u+t5YzsUyrmqSWVI3mlwwfb5EIpPDIU6k/qpigXtbjF/EXx5r1GqoGvz1dGDPB4UskD1Qq XIEb1RBcWdOQ9wLOkrSGzSfgW1pc2oK0QIHQlOFyCnlOLhW4tJ7w6j8YPvYEjYaw5ovtkH gMrfYj0d1h2gLjWq/FJjnurfkhvx/s6JI2xMI+LYIEhpTuzQhrniz2Gvd75DBuRBA1x7Ht mNSo1dxxMQwTJg6jkt6Pma0gFZKdLmhL1tukcXiv+Qh+4TdoW8CiYTwQT6cyJ0tpJXL6jE jodLvinBt3PunypTIvWw4kFNBfdHCUFkENCYQc8U5Ya9aZTyIvScva1MTIM/Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690921451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqiKXMZQu6bz47cp6w6pCU93GBAojxd/m1KJIrmhXNw=; b=yi+rK63zb/88jRo6sstjAMLsGOvbCM7OlaAGckM4MJWEX8IqALxQRG/XXmfnSTLK28r4K6 LsM7ZVgB/J5wIrlNdTKk2fXXn4hR0O3ZUKXXNMU+F7c0vdlsLpsIjdEl+I5+NOzrs1E8zf DSyO+VRPH3i7ZjgXo4aKkKfQmanlSJ4JpabqEMMCJooIdXYSgppdeJAskhKh/9SlBa8p8d Nywj3FYDL+2Y/7uwcJ0uPrKKirkpts4ISzfKw13qXGN9aEWeOc0sI+m/da1sZI1I5NEtPZ dSARkKEg+hpAe4R99CVouH9YLr4xa5GBWAxgWp8NQ/+2LJUpllgDLVnRy/sAcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFmmB6hcfzrp3; Tue, 1 Aug 2023 20:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371KOAOS046217; Tue, 1 Aug 2023 20:24:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371KOAHb046216; Tue, 1 Aug 2023 20:24:10 GMT (envelope-from git) Date: Tue, 1 Aug 2023 20:24:10 GMT Message-Id: <202308012024.371KOAHb046216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 5a7e48dddfb5 - main - tests: Add MAP_32BIT flag test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a7e48dddfb5a668ded4742b79e6f6f88b647e6a Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5a7e48dddfb5a668ded4742b79e6f6f88b647e6a commit 5a7e48dddfb5a668ded4742b79e6f6f88b647e6a Author: Dmitry Chagin AuthorDate: 2023-08-01 20:23:15 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-01 20:23:15 +0000 tests: Add MAP_32BIT flag test Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D41236 MFC after: 1 month --- tests/sys/vm/Makefile | 8 ++++++ tests/sys/vm/mmap_map_32bit_helper.c | 51 ++++++++++++++++++++++++++++++++++++ tests/sys/vm/mmap_map_32bit_test.sh | 37 ++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) diff --git a/tests/sys/vm/Makefile b/tests/sys/vm/Makefile index 8ef8a45e5f39..9aac49bc5320 100644 --- a/tests/sys/vm/Makefile +++ b/tests/sys/vm/Makefile @@ -9,4 +9,12 @@ ATF_TESTS_C+= mlock_test \ page_fault_signal \ shared_shadow_inval_test +.if ${MACHINE_ARCH} != "i386" && ${MACHINE} != "arm" && \ + (${MACHINE} != "powerpc" || ${MACHINE_ARCH} != "powerpc") + # MAP_32BIT is only available on 64-bit platforms +BINDIR= ${TESTSDIR} +ATF_TESTS_SH+= mmap_map_32bit_test +PROGS+= mmap_map_32bit_helper +.endif + .include diff --git a/tests/sys/vm/mmap_map_32bit_helper.c b/tests/sys/vm/mmap_map_32bit_helper.c new file mode 100644 index 000000000000..47d4b2c53c20 --- /dev/null +++ b/tests/sys/vm/mmap_map_32bit_helper.c @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2023 Dmitry Chagin + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include +#include + +_Static_assert(sizeof(vm_offset_t) >= 8, "Test is not intended for ILP32"); +#define MAP_32BIT_MAX_ADDR ((vm_offset_t)1 << 31) + +int +main(void) +{ + size_t pagesize; + void *s32; + int fd; + + if ((pagesize = getpagesize()) <= 0) + err(1, "getpagesize"); + + fd = open("/dev/zero", O_RDONLY); + if (fd <= 0) + err(1, "open failed"); + + s32 = mmap(NULL, pagesize, PROT_READ, MAP_32BIT | MAP_PRIVATE, fd, 0); + if (s32 == MAP_FAILED) + err(1, "mmap MAP_32BIT | MAP_PRIVATE failed"); + if (((vm_offset_t)s32 + pagesize) > MAP_32BIT_MAX_ADDR) + errx(1, "mmap invalid result %p", s32); + + close(fd); + if (munmap(s32, pagesize) != 0) + err(1, "munmap failed"); + + s32 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, + MAP_32BIT | MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); + if (s32 == MAP_FAILED) + err(1, "mmap MAP_32BIT | MAP_ANONYMOUS | MAP_PRIVATE failed"); + if (((vm_offset_t)s32 + pagesize) > MAP_32BIT_MAX_ADDR) + errx(1, "mmap invalid result %p", s32); + + if (munmap(s32, pagesize) != 0) + err(1, "munmap failed"); + exit(0); +} diff --git a/tests/sys/vm/mmap_map_32bit_test.sh b/tests/sys/vm/mmap_map_32bit_test.sh new file mode 100644 index 000000000000..2df53e78f1b7 --- /dev/null +++ b/tests/sys/vm/mmap_map_32bit_test.sh @@ -0,0 +1,37 @@ +# +# Copyright (c) 2022 Dmitry Chagin +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Simple test of MAP_32BIT flag w/wo ASLR + +map_32bit_w_aslr_head() +{ + atf_set descr "MAP_32BIT with ASLR" + atf_set require.progs proccontrol +} + +map_32bit_w_aslr_body() +{ + atf_check -s exit:0 -x proccontrol -m aslr -s enable \ + $(atf_get_srcdir)/mmap_map_32bit_helper +} + +map_32bit_wo_aslr_head() +{ + atf_set descr "MAP_32BIT without ASLR" + atf_set require.progs proccontrol +} + +map_32bit_wo_aslr_body() +{ + atf_check -s exit:0 -x proccontrol -m aslr -s disable \ + $(atf_get_srcdir)/mmap_map_32bit_helper +} + + +atf_init_test_cases() +{ + atf_add_test_case map_32bit_w_aslr + atf_add_test_case map_32bit_wo_aslr +} From nobody Tue Aug 1 20:29:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFmtt6GkQz4ppy1 for ; Tue, 1 Aug 2023 20:29:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFmtf6TyKz3HT7 for ; Tue, 1 Aug 2023 20:29:46 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-3fe1fc8768aso27161515e9.1 for ; Tue, 01 Aug 2023 13:29:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690921784; x=1691526584; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fh1+2KAfstOR7YJZHlKrHc2YpFcA/ign+qQLpzMgdCg=; b=kn+6/S8nOujs/Ku1TDujHwQwEE1nut8bdNi68aaQdpWtLztcBu2dVEXDNujtjVpm0f QDrf5B2k+NtTprfBJEOxZSxXj5qBHFnDvmQbNQsYCLHeCheHYEI8V6tPlxkGGdFL+EtB BV1Ay6w+dCXZ/xXAoYFE2BOKPkxi6PFVwQblSRniB/q4uz7lAeAWZk9Yq5LOM9wenNEC ADSDXbcKBgjP9px2JF52W4tEOZuhN54f0mUoIoMrmJsF3V2nLtcaXF9bu5bcg1rOSV4m t5hSWdAIEqMB3NOs8o9J7posKn8RT+KK1szXY5Mxr3+Pe4dV7i2lclEojC5OrgiDb302 1R/g== X-Gm-Message-State: ABy/qLZx2sinCBYVp5a9osGgnHR0xvyo93HaMNYbhbaOr61EhJf3uhqd dmKZfxgTESlxKSrQ1YfiUMBi4g== X-Google-Smtp-Source: APBJJlHBuSPFNe0lV+Jrgt5ED+TDLY7Mi5OO53pl7Dkh40aa/ObjN68d0yUH/hmq+M2d2BtfTG10rQ== X-Received: by 2002:a1c:7c0e:0:b0:3fe:2b69:fc6c with SMTP id x14-20020a1c7c0e000000b003fe2b69fc6cmr1856399wmc.39.1690921784403; Tue, 01 Aug 2023 13:29:44 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id o8-20020a05600c378800b003fe23b10fdfsm4993896wmr.36.2023.08.01.13.29.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Aug 2023 13:29:43 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 5a7e48dddfb5 - main - tests: Add MAP_32BIT flag test From: Jessica Clarke In-Reply-To: <202308012024.371KOAHb046216@gitrepo.freebsd.org> Date: Tue, 1 Aug 2023 21:29:32 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <7A066A1D-9AFA-485F-AEAE-DD88C9537A44@freebsd.org> References: <202308012024.371KOAHb046216@gitrepo.freebsd.org> To: Dmitry Chagin X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4RFmtf6TyKz3HT7 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 1 Aug 2023, at 21:24, Dmitry Chagin wrote: >=20 > The branch main has been updated by dchagin: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5a7e48dddfb5a668ded4742b79e6f6f8= 8b647e6a >=20 > commit 5a7e48dddfb5a668ded4742b79e6f6f88b647e6a > Author: Dmitry Chagin > AuthorDate: 2023-08-01 20:23:15 +0000 > Commit: Dmitry Chagin > CommitDate: 2023-08-01 20:23:15 +0000 >=20 > tests: Add MAP_32BIT flag test >=20 > Reviewed by: kib, markj > Differential Revision: https://reviews.freebsd.org/D41236 > MFC after: 1 month > --- > tests/sys/vm/Makefile | 8 ++++++ > tests/sys/vm/mmap_map_32bit_helper.c | 51 = ++++++++++++++++++++++++++++++++++++ > tests/sys/vm/mmap_map_32bit_test.sh | 37 ++++++++++++++++++++++++++ > 3 files changed, 96 insertions(+) >=20 > diff --git a/tests/sys/vm/Makefile b/tests/sys/vm/Makefile > index 8ef8a45e5f39..9aac49bc5320 100644 > --- a/tests/sys/vm/Makefile > +++ b/tests/sys/vm/Makefile > @@ -9,4 +9,12 @@ ATF_TESTS_C+=3D mlock_test \ > page_fault_signal \ > shared_shadow_inval_test >=20 > +.if ${MACHINE_ARCH} !=3D "i386" && ${MACHINE} !=3D "arm" && \ > + (${MACHINE} !=3D "powerpc" || ${MACHINE_ARCH} !=3D "powerpc") > + # MAP_32BIT is only available on 64-bit platforms So use ${MACHINE_ABI:Mlong64} after including src.opts.mk? Jess From nobody Tue Aug 1 20:54:41 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFnRb52Mnz4pqh7; Tue, 1 Aug 2023 20:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFnRQ5n31z3KnJ; Tue, 1 Aug 2023 20:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690923282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdS7aiTt7pbEKzZs51M5vBtKyDDwJGgxC1Ah0NXTdkc=; b=w3DOMQYVwH8QkLd6t9zMqCXcbMBOC5GiapTzDRrrPOVSUzgQ/XM3jiUBLdB7GhvctiF10l D7RThYVDt7h7gzZCfNtamQdVF2kI5JjpWjzXXpfeRI7X+9/jMOnYtxoEsLqaJ8fb9p1Nwi SGL/aogcI4KUKPLhQQS/kcLw3bKQSqlEdDDhaE85b7cYrq9ItKIDWd/vQr9p6eXASL4MmF QafSGMZ1JqRaAA1nqtyx/do/e6efrBDMXWbiPJYGPQGsyn+QX4c8klEVVpzlI4RGCsavg6 YVy22f4NklubJtjkFJJp4tgoRTcbj6QuFwMw7n2H21uNJsjxo8IIXTKYxlZc6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690923282; a=rsa-sha256; cv=none; b=u+FHwdr4xnWa5KQApjfFo78LtUP3W0lM2LqwfDnnjGCh14DNg/iFULp+wZ0gVBD47HlUgI geu7iVd2CngiEoaykj96yyxLSQj3hvFFWt7AOkkuKJ7eJLFcyIqNxw6eCyCvf9T6tBPid1 hSOqKbtz4yRyXktZJAihl1I3E+fjw9nJPDviYWNsp1nA9U536oKTuZslNq7+Q94LI3a1yI efBB4+Ke/1Npyzlbv08i8e9jFLEa6BgYazGqaNE2GVzbc3CGfA5/WjEFPg2ep5+bLYsDQs Tnn0Agct2PkJo1vZH+KaKTvQp37shx61dxRnASa0Rd/mrHXusDRnH/E2e8J3mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690923282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdS7aiTt7pbEKzZs51M5vBtKyDDwJGgxC1Ah0NXTdkc=; b=qMC4JlwS3aOtWY2zyj2soTP6/7jUkXej+WwjpEGKMsa1YHeppOyTRktlIj8MrXKoBP3lFy mWNud3Jp9/wQdcUtvTf1Szy3LAjcILOTg1MWQrJV0s315y8oBMGA9aUlThNn+/ZtgVJkuN l+4gIhtLrelohdjj76NrK2Kt+X7yy3A1nIlzhqVJjIOIJwN3nF9WHMavpSJ7gWFWgFSphB zxb2D2vfvGCTjlWJjeE9DP/ATeAgfwe8Fa4Ola0y3gAcvlQACyGQF/jmmooI/kt8PdAQ/d Cl6Q9rVnFAQapDVtlEqKsRl4SMjqARxUdSJXA9faAc3WUT78qahJLzaLYGvcbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFnRQ3mDXzsQl; Tue, 1 Aug 2023 20:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371KsfWS095556; Tue, 1 Aug 2023 20:54:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371Ksf59095555; Tue, 1 Aug 2023 20:54:41 GMT (envelope-from git) Date: Tue, 1 Aug 2023 20:54:41 GMT Message-Id: <202308012054.371Ksf59095555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: cf0a543f1f93 - main - cam: Log more error codes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf0a543f1f93f95a1c452d710c67ba42a752a2b1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cf0a543f1f93f95a1c452d710c67ba42a752a2b1 commit cf0a543f1f93f95a1c452d710c67ba42a752a2b1 Author: Warner Losh AuthorDate: 2023-08-01 20:51:10 +0000 Commit: Warner Losh CommitDate: 2023-08-01 20:51:54 +0000 cam: Log more error codes Log CAM_DEV_NOT_THERE status CCBs because they get dropped if a drive disappears and these requests timeout or are cancelled. It's useful to know the outstanding commands for failure analysis. Log CAM_NVME_STATUS_ERROR status CCBs to bring in NVMe errors (this will be more important in future commits that expand the information logged). Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D41168 --- sys/cam/cam_periph.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 1ae994402211..c4c91a395894 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -1909,6 +1909,8 @@ cam_periph_error(union ccb *ccb, cam_flags camflags, case CAM_SCSI_STATUS_ERROR: case CAM_ATA_STATUS_ERROR: case CAM_SMP_STATUS_ERROR: + case CAM_DEV_NOT_THERE: + case CAM_NVME_STATUS_ERROR: devctl_err++; break; default: From nobody Tue Aug 1 21:02:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFnc72S0dz4pqqZ; Tue, 1 Aug 2023 21:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFnc05KMTz3LBV; Tue, 1 Aug 2023 21:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690923728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OVkHiB0A9zVCHEk9A31XwkHf6Du49htytvuRyIoTgwc=; b=D+byyO126ozHvC8OtnexgbFg7Vt3mGfN4OR1hk0KwCYQqUzmY30d9YJDnxs4fMyj1XHbpF fYBC97Qd4CIo13vlGDR71X/0n8/ljmhM1LuZbVYG4lUQ/XvMRPMBFSV5HGAXuZ9whU3mfP xmupPBGYzs94mBtqNdjwS1059wrKLxtJ53xiT0OyFkcoN9Jsfk3MM2gDBvIAobobSGh2mT 7R/sv9+fQuxQuzNRt0Tl+7T5onOIiqcF0gAkOm41JISwxHI7gVCTb44ZCKCTfpzY6uJKYw LnfbddnUVOgZpU5bJoztXqvPV24sIiM+sh75G+PT1+RE6IaVQBqhAZz4p/zj9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690923728; a=rsa-sha256; cv=none; b=sMDv2QhQ+yWDLZwt6cAjJW7/E+wAmFJ4uPp7KV39/urKSSr5w+FRgKbnAaZStoK16JXmEY h8S7HYhVQY7LYQsT0B8/Uycd3LpDTaUHKxystpjyU6VqmSQBSM6ELur2aU22PGmJBi9vz0 /W9Bd+yGlJ2csUHvwwGg8N/SkzR9N4hSUdnyg4Hv0bBbFFPP6JN3ga9LisqvIGsQ/BKF7T wg1yNt44U3h9ween5TCc5IP7lAzcOt1IN0UrG4XhFihn2zKiJJD0yFw2XDr8Wkr2wFHrnz 3DVl3X2ldMZr72l2qnDPJRQO8URN0CU/lH9hVtUJe1SvfAp/B8kBKEe+oDAOFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690923728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OVkHiB0A9zVCHEk9A31XwkHf6Du49htytvuRyIoTgwc=; b=C9T/Ed8yWAdlvpZVS/VeCex2p61gd4uP9HI5Uz40PRrCa7ZPiZekSt3r17sUna8zSlUO7P zXllyJByd51L47loEXF4qU7nR3nCTuxXIQtkBlfa2ChMpjlcjhgBY09yZQEzvMTpIqRwEh abJBzPjO75BLqYntCyxQe67pABVOWaPikCeSwXr/JoIngfud1R/rr9TnHwsDNYjg0Ph360 iC4HZYBAJNBSHtrKv2DaPmtPwif3W0EvLrtzZKWzRKuHQxBPzELRHUiPKhEWKLnMQGeS9D DMzabJOa0rbtwfAKpiFXWP0AtfGGJqLWVREvLhucyeUCPPYFTSxF5uSYiR6KdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFnc03tH4zsjd; Tue, 1 Aug 2023 21:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371L28Y4012828; Tue, 1 Aug 2023 21:02:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371L28MT012827; Tue, 1 Aug 2023 21:02:08 GMT (envelope-from git) Date: Tue, 1 Aug 2023 21:02:08 GMT Message-Id: <202308012102.371L28MT012827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1c02497648bd - main - Makefile.inc1: Enable requesting the universe toolchain. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c02497648bdf61a43dd271f6f9171a037046d8e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1c02497648bdf61a43dd271f6f9171a037046d8e commit 1c02497648bdf61a43dd271f6f9171a037046d8e Author: John Baldwin AuthorDate: 2023-08-01 21:01:57 +0000 Commit: John Baldwin CommitDate: 2023-08-01 21:01:57 +0000 Makefile.inc1: Enable requesting the universe toolchain. make universe builds a cross toolchain under HOST_OBJTMP/tmp via the universe-toolchain target. However, doing a plain 'make buildworld' after a universe/tinderbox run (e.g. to reproduce a failure and test the fix for it), will try to build a new cross toolchain under OBJTMP/tmp which can be tedious. This commit adds a make variable (UNIVERSE_TOOLCHAIN) which can be used similar to CROSS_TOOLCHAIN to request an external toolchain. If this variable is set (value doesn't matter), the the universe toolchain is used as an external toolchain. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40777 --- Makefile.inc1 | 8 ++++++++ Makefile.libcompat | 1 + 2 files changed, 9 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 2e965b603d78..c102348baa6f 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -73,6 +73,12 @@ TIME_ENV ?= time env .error CROSS_TOOLCHAIN ${CROSS_TOOLCHAIN} not found .endif CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" +.elif defined(UNIVERSE_TOOLCHAIN) +UNIVERSE_TOOLCHAIN_PATH?=${HOST_OBJTOP}/tmp/usr/bin +XCC?="${UNIVERSE_TOOLCHAIN_PATH}/cc" +XCXX?="${UNIVERSE_TOOLCHAIN_PATH}/c++" +XCPP?="${UNIVERSE_TOOLCHAIN_PATH}/cpp" +XLD?="${UNIVERSE_TOOLCHAIN_PATH}/ld" .endif .if defined(CROSS_TOOLCHAIN_PREFIX) CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} @@ -718,6 +724,7 @@ BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ BSARGS= DESTDIR= \ OBJTOP='${WORLDTMP}/obj-tools' \ OBJROOT='$${OBJTOP}/' \ + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ MAKEOBJDIRPREFIX= \ BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ BWPHASE=${.TARGET:C,^_,,} \ @@ -789,6 +796,7 @@ KTMAKE= ${TIME_ENV} \ DESTDIR= \ OBJTOP='${WORLDTMP}/obj-kernel-tools' \ OBJROOT='$${OBJTOP}/' \ + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ MAKEOBJDIRPREFIX= \ BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ -DNO_CPU_CFLAGS \ diff --git a/Makefile.libcompat b/Makefile.libcompat index f9fe28e1082b..da9c326756aa 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -37,6 +37,7 @@ LIB${_LIBCOMPAT}WMAKE+= ${TIME_ENV} ${LIB${_LIBCOMPAT}WMAKEENV} ${MAKE} \ ${LIB${_LIBCOMPAT}WMAKEFLAGS} \ OBJTOP=${LIB${_LIBCOMPAT}_OBJTOP} \ OBJROOT='$${OBJTOP}/' \ + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ MAKEOBJDIRPREFIX= \ MK_INCLUDES=no \ MK_MAN=no MK_HTML=no From nobody Tue Aug 1 21:02:09 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFnc72Gh3z4prLh; Tue, 1 Aug 2023 21:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFnc163PSz3Lcp; Tue, 1 Aug 2023 21:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690923729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A512sQ4CAZism0X1FfvR6QQahZUEOO655Vb42uRt+8Q=; b=HN2lM6f6Y+7EhoBAmClfpuPC4z1LSR0R3SrWhZWdEoxdJrwt48YONNyL/toXe6LHvET28W F05uA6O5TxM/b+Oi34znpfyCK7qLPFNrbFHvNHxgNIqQw9NgRNecDzpfNs5ks72YvmBN/6 rxpHHC0XckmlfE8SyecvUMAn1mBd/kA/8I28FBZ+A6v8NnDHMTxKnZmQIEu16+AP3YHdmi +t0uFrTeDeCIT40/OnDaZ6wArICLnvX4yimBgHJIgp1fA0mZxR2BVw2x1vtDuyIiOKrFeN 5Gl38xJJx/RtqgsisHIu6nrJhbrlW8nzy5vv16MKXKvRTHg3xEHFsiQtDxNKeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690923729; a=rsa-sha256; cv=none; b=b45wCnIXPJuBp88ocpcxbmtxCeDD/J7Yps1n9X9cDgAjpEuvVqxQRPHeTs/DP1B6MprX5K qDn2mR2OOJB69JfNnA4mOMRBzMT7RnsXDs32QHjSzZWf+YKCNqNJkEGRZP56ju+7spiY7+ pZ7nopxjZceCPl0tQNIWkwJ5yGTr1pbuWOBW8bsh9825FgzOBWKJFE3YnVKaywTBVS/ay8 KpTtubjb8b7MEmEuwd60cAKeLTQ7Rwv+Hlxou8w1U2UV/A0ufZKqdA9enOaCD5K1oSglNt SZtx5FfT0Kg7kXdLT85RwCzbi4UvKaR2SrysgzM7NM9M5vCc8faumAxDFXpuLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690923729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A512sQ4CAZism0X1FfvR6QQahZUEOO655Vb42uRt+8Q=; b=UmLYFOLHGJdP7neTOyhRsl9tSuhviA+jtMpVF4fz65NVX0fo/Xusbvj925dpIcagtreSsE cgBcRqsDzr72yL9NKm7p2+jdca7VifTEcxRGHyTxCqQVdlQwVzdj4UzAlxiAUHV/SNCYVG nEmI0/tQMMGasImLX3yDXqvSlwQt0QyUBlZsHY3VfSjCA1hoAz7w2oU4BDDsaeRygATCBd JJezPGVrgI/ZSRvwKRNV5zQH44fj7sDbfchIjw2AaaPsJFE/PSqtCBwvF53t+K/7gHHcFi wO/dh1X9uRlIM3XDVrCcsVtvYAmzTZDZf2kZBXTjTN5fPB2Q4aT+tDLHr//nVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFnc14nHgzsvf; Tue, 1 Aug 2023 21:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371L29V6012848; Tue, 1 Aug 2023 21:02:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371L291M012847; Tue, 1 Aug 2023 21:02:09 GMT (envelope-from git) Date: Tue, 1 Aug 2023 21:02:09 GMT Message-Id: <202308012102.371L291M012847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 21ef3591b611 - main - build.7: Document several toolchain make variables. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21ef3591b6119f6972896e6c00cbf9ffb759646e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=21ef3591b6119f6972896e6c00cbf9ffb759646e commit 21ef3591b6119f6972896e6c00cbf9ffb759646e Author: John Baldwin AuthorDate: 2023-08-01 21:01:58 +0000 Commit: John Baldwin CommitDate: 2023-08-01 21:01:58 +0000 build.7: Document several toolchain make variables. Document CROSS_TOOLCHAIN, UNIVERSE_TOOLCHAIN, and USE_GCC_TOOLCHAINS. Differential Revision: https://reviews.freebsd.org/D40778 --- share/man/man7/build.7 | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index a2fb5ea77149..c1ea4e56ccaf 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 10, 2021 +.Dd August 1, 2023 .Dt BUILD 7 .Os .Sh NAME @@ -509,7 +509,23 @@ Additionally, builds in are influenced by the following .Xr make 1 variables: -.Bl -tag -width ".Va SUBDIR_OVERRIDE" +.Bl -tag -width ".Va LOCAL_MODULES_DIR" +.It Va CROSS_TOOLCHAIN +Requests use of an external toolchain to build either the world or kernel. +This value of this variable can either be the full path to a file, +or the base name of a file in +.Pa ${LOCALBASE}/share/toolchains . +The file should be a make file which sets variables to request an external +toolchain such as +.Va XCC . +.Pp +External toolchains are available in ports for both LLVM and GCC/binutils. +For external toolchains available in ports, +.Va CROSS_TOOLCHAIN +should be set to the name of the package. +LLVM toolchain packages use the name llvm. +GCC toolchains provide separate packages for each architecture and use the +name ${MACHINE_ARCH}-gcc. .It Va KERNCONF Overrides which kernel to build and install for the various kernel make targets. @@ -713,7 +729,7 @@ using the .Fl D option of .Xr make 1 : -.Bl -tag -width ".Va -DNO_KERNELCONFIG" +.Bl -tag -width ".Va LOADER_DEFAULT_INTERP" .It Va LOADER_DEFAULT_INTERP Defines what interpreter the default loader program will have. Valid values include @@ -783,6 +799,10 @@ If set, the libraries phase will be skipped. If set, no object directories will be created. This should only be used if object directories were created in a previous build and no new directories are connected. +.It Va UNIVERSE_TOOLCHAIN +Requests use of the toolchain built as part of the +.Cm universe +target as an external toolchain. .It Va WORLDFAST If set, the build target .Cm buildworld @@ -812,7 +832,7 @@ Builds using the and related targets are influenced by the following .Xr make 1 variables: -.Bl -tag -width ".Va MAKE_JUST_KERNELS" +.Bl -tag -width ".Va USE_GCC_TOOLCHAINS" .It Va JFLAG Pass the value of this variable to each .Xr make 1 @@ -834,6 +854,10 @@ target for each supported architecture instead of the default action of building a world and one or more kernels. This variable implies .Va WITHOUT_KERNELS . +.It Va USE_GCC_TOOLCHAINS +Use external GCC toolchains to build the requested targets. +If the required toolchain package for a supported architecture is not installed, +the build for that architecture is skipped. .It Va TARGETS Only build the listed targets instead of each supported architecture. .It Va EXTRA_TARGETS From nobody Tue Aug 1 21:21:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFp2W6SFtz4psQm; Tue, 1 Aug 2023 21:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFp2C355Xz3MrV; Tue, 1 Aug 2023 21:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690924883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwdCRHf7e7yMiX5EWfHeTszXxlOicrr3fb5keuNYEQE=; b=jSK84UD4/RIYzCLZ9TT6v2Qq5iu72LHu+XP6ikZN+TXntwXk8RRVXG1zF2JNFj/MaXQtMn j+JkBFzo7WJ2JrIA8KKOrcZIUjlTCd5glr4fp4EbYP/S97H9Y+lEKbYRPUeMaIIc0UUVzw GTOhnHWCbfPuxXbHAIezbJVVzu8KDh/8zcQkBrKEbMA6XHtethTZyj7IAL3paqCp4yDmUs yjnDkMiDoDn/kZB5lui8kxHcTtLdMJ00h7XhpJ9UQs0IAygWQDJVe89y1J6htAy3mrvgvg DsyR/JXnmbBls+U+UitaFUHy3vLtP8ZMdojYeg+OuYUjh491FafWQe1Nz2xrfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690924883; a=rsa-sha256; cv=none; b=g6Ycqz9LwXkvHYLHi5Ab1QWTH1R+8InMRrwp9bTTimIA4yBPtAymibIDPpAzLK1oN57CQZ KPvLXK0N5jjaS3SgII2W1py2s/oa1jKHW9xO807a3h71xfpw03d/uG+ITEgN7PnhbUDvjQ dj/nB5plrMuVYtXjvXooXMqxD8umgh7e9RPBL9QVkU8skdhxQLu1sKtvfDY+NYrdiS4l8A BPrLz2xX5kqRTnj+edeQihZdgSEJP2m2bRL3fXjkcbIKJl/ku6sfnTYzRxhgE/WGn2xrPu U2gDeOyo518KInnjxU2jrF/WDxWrlCuPRYm+RfqpWyI7OxGSOG1wrpzpSw1Oxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690924883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwdCRHf7e7yMiX5EWfHeTszXxlOicrr3fb5keuNYEQE=; b=V8RqP4pdq3EUKl5bbk5/JNZauu7ij0u/NYg0NzSqXB7r+YOON9TJ15YNv08fDXTWr2EufU dcVk4/E/ZB3FUGZHDQ7A5NLKCdw3lpedrJDvmHgNxDVlk1wXOVqe8MX02H0DUpaM5cr3UP 9A0iFEWhpsT8NASt+TDLqX5GxJ5EvtRzhts+9TLDRk2e2taB2xYzp9MwNMme0lHL5TgXiy /b3wXWLuL7JdyrM71KqsAFRAefWxdAj+MaQUx+OcX1CXkzq0WbZU/JY2mcXdpqJpO4jy0M +gZsb9Ba9lwb/8ln9l5AwdIqz2LkA0atlfo44M06T59H/l9HteKBaAPIqc7d6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFp2C25Dzzt8y; Tue, 1 Aug 2023 21:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371LLNkI040718; Tue, 1 Aug 2023 21:21:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371LLNlr040717; Tue, 1 Aug 2023 21:21:23 GMT (envelope-from git) Date: Tue, 1 Aug 2023 21:21:23 GMT Message-Id: <202308012121.371LLNlr040717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Engberg Subject: git: 323a94afb623 - main - amdsmn(4), amdtemp(4): add support for Zen 4 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 323a94afb6236bcec3a07721566aec6f2ea2b209 Auto-Submitted: auto-generated The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/src/commit/?id=323a94afb6236bcec3a07721566aec6f2ea2b209 commit 323a94afb6236bcec3a07721566aec6f2ea2b209 Author: Akio Morita AuthorDate: 2023-08-01 20:32:12 +0000 Commit: Daniel Engberg CommitDate: 2023-08-01 21:21:17 +0000 amdsmn(4), amdtemp(4): add support for Zen 4 Zen 4 support, tested on Ryzen 9 7900 Reviewed by: imp (previous version), mhorne Approved by: mhorne Obtained from: http://jyurai.ddo.jp/~amorita/diary/?date=20221102#p01 Differential Revision: https://reviews.freebsd.org/D41049 --- sys/dev/amdsmn/amdsmn.c | 7 +++++++ sys/dev/amdtemp/amdtemp.c | 17 +++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c index d2d6f0392cd5..9aa4b5902d01 100644 --- a/sys/dev/amdsmn/amdsmn.c +++ b/sys/dev/amdsmn/amdsmn.c @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 #define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 /* Also M70H, F19H M00H/M20H */ #define PCI_DEVICE_ID_AMD_17H_M60H_ROOT 0x1630 +#define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8 struct pciid; struct amdsmn_softc { @@ -104,6 +105,12 @@ static const struct pciid { .amdsmn_addr_reg = F17H_SMN_ADDR_REG, .amdsmn_data_reg = F17H_SMN_DATA_REG, }, + { + .amdsmn_vendorid = CPU_VENDOR_AMD, + .amdsmn_deviceid = PCI_DEVICE_ID_AMD_19H_M60H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, }; /* diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c index fa58a3a4fc83..e17003bd6927 100644 --- a/sys/dev/amdtemp/amdtemp.c +++ b/sys/dev/amdtemp/amdtemp.c @@ -84,6 +84,7 @@ struct amdtemp_softc { #define AMDTEMP_FLAG_CT_10BIT 0x02 /* CurTmp is 10-bit wide. */ #define AMDTEMP_FLAG_ALT_OFFSET 0x04 /* CurTmp starts at -28C. */ int32_t sc_offset; + int32_t sc_temp_base; int32_t (*sc_gettemp)(device_t, amdsensor_t); struct sysctl_oid *sc_sysctl_cpu[MAXCPU]; struct intr_config_hook sc_ich; @@ -111,6 +112,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_HOSTB17H_M10H_ROOT 0x15d0 #define DEVICEID_AMD_HOSTB17H_M30H_ROOT 0x1480 /* Also M70H, F19H M00H/M20H */ #define DEVICEID_AMD_HOSTB17H_M60H_ROOT 0x1630 +#define DEVICEID_AMD_HOSTB19H_M60H_ROOT 0x14d8 static const struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -135,6 +137,7 @@ static const struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M10H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M30H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M60H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M60H_ROOT, false }, }; /* @@ -180,6 +183,8 @@ static const struct amdtemp_product { #define AMDTEMP_17H_CCD_TMP_BASE 0x59954 #define AMDTEMP_17H_CCD_TMP_VALID (1u << 11) +#define AMDTEMP_ZEN4_CCD_TMP_BASE 0x59b08 + /* * AMD temperature range adjustment, in deciKelvins (i.e., 49.0 Celsius). */ @@ -519,6 +524,8 @@ amdtemp_attach(device_t dev) dev, CORE0_SENSOR0, amdtemp_sysctl, "IK", "Core 0 / Sensor 0 temperature"); + sc->sc_temp_base = AMDTEMP_17H_CCD_TMP_BASE; + if (family == 0x17) amdtemp_probe_ccd_sensors17h(dev, model); else if (family == 0x19) @@ -780,7 +787,7 @@ amdtemp_gettemp17h(device_t dev, amdsensor_t sensor) return (amdtemp_decode_fam17h_tctl(sc->sc_offset, val)); case CCD_BASE ... CCD_MAX: /* Tccd */ - error = amdsmn_read(sc->sc_smn, AMDTEMP_17H_CCD_TMP_BASE + + error = amdsmn_read(sc->sc_smn, sc->sc_temp_base + (((int)sensor - CCD_BASE) * sizeof(val)), &val); KASSERT(error == 0, ("amdsmn_read2")); KASSERT((val & AMDTEMP_17H_CCD_TMP_VALID) != 0, @@ -801,7 +808,7 @@ amdtemp_probe_ccd_sensors(device_t dev, uint32_t maxreg) sc = device_get_softc(dev); for (i = 0; i < maxreg; i++) { - error = amdsmn_read(sc->sc_smn, AMDTEMP_17H_CCD_TMP_BASE + + error = amdsmn_read(sc->sc_smn, sc->sc_temp_base + (i * sizeof(val)), &val); if (error != 0) continue; @@ -846,6 +853,7 @@ amdtemp_probe_ccd_sensors17h(device_t dev, uint32_t model) static void amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model) { + struct amdtemp_softc *sc = device_get_softc(dev); uint32_t maxreg; switch (model) { @@ -854,6 +862,11 @@ amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model) maxreg = 8; _Static_assert((int)NUM_CCDS >= 8, ""); break; + case 0x60 ... 0x6f: /* Zen4 Ryzen "Raphael" */ + sc->sc_temp_base = AMDTEMP_ZEN4_CCD_TMP_BASE; + maxreg = 8; + _Static_assert((int)NUM_CCDS >= 8, ""); + break; default: device_printf(dev, "Unrecognized Family 19h Model: %02xh\n", model); From nobody Tue Aug 1 21:57:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFprQ0bPxz4pvFB; Tue, 1 Aug 2023 21:57:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFprG0DQJz3Qpv; Tue, 1 Aug 2023 21:57:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 371LvaeL069588 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 2 Aug 2023 00:57:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 371LvaeL069588 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 371Lva4b069587; Wed, 2 Aug 2023 00:57:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Aug 2023 00:57:36 +0300 From: Konstantin Belousov To: Jessica Clarke Cc: Dmitry Chagin , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 5a7e48dddfb5 - main - tests: Add MAP_32BIT flag test Message-ID: References: <202308012024.371KOAHb046216@gitrepo.freebsd.org> <7A066A1D-9AFA-485F-AEAE-DD88C9537A44@freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7A066A1D-9AFA-485F-AEAE-DD88C9537A44@freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4RFprG0DQJz3Qpv X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] On Tue, Aug 01, 2023 at 09:29:32PM +0100, Jessica Clarke wrote: > On 1 Aug 2023, at 21:24, Dmitry Chagin wrote: > > > > The branch main has been updated by dchagin: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=5a7e48dddfb5a668ded4742b79e6f6f88b647e6a > > > > commit 5a7e48dddfb5a668ded4742b79e6f6f88b647e6a > > Author: Dmitry Chagin > > AuthorDate: 2023-08-01 20:23:15 +0000 > > Commit: Dmitry Chagin > > CommitDate: 2023-08-01 20:23:15 +0000 > > > > tests: Add MAP_32BIT flag test > > > > Reviewed by: kib, markj > > Differential Revision: https://reviews.freebsd.org/D41236 > > MFC after: 1 month > > --- > > tests/sys/vm/Makefile | 8 ++++++ > > tests/sys/vm/mmap_map_32bit_helper.c | 51 ++++++++++++++++++++++++++++++++++++ > > tests/sys/vm/mmap_map_32bit_test.sh | 37 ++++++++++++++++++++++++++ > > 3 files changed, 96 insertions(+) > > > > diff --git a/tests/sys/vm/Makefile b/tests/sys/vm/Makefile > > index 8ef8a45e5f39..9aac49bc5320 100644 > > --- a/tests/sys/vm/Makefile > > +++ b/tests/sys/vm/Makefile > > @@ -9,4 +9,12 @@ ATF_TESTS_C+= mlock_test \ > > page_fault_signal \ > > shared_shadow_inval_test > > > > +.if ${MACHINE_ARCH} != "i386" && ${MACHINE} != "arm" && \ > > + (${MACHINE} != "powerpc" || ${MACHINE_ARCH} != "powerpc") > > + # MAP_32BIT is only available on 64-bit platforms > > So use ${MACHINE_ABI:Mlong64} after including src.opts.mk? May be we should enable the MAP_32BIT flag on 32bit arches, instead? It requests allocation below 2G, which is half of VA on i386, or 2/3 on arm. Interestingly, it should work already from compat32. From nobody Tue Aug 1 22:26:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqTQ1RCpz4pwpK; Tue, 1 Aug 2023 22:26:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqT03gVXz3hXZ; Tue, 1 Aug 2023 22:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cIbZCzaUw73bM4H0ibcXhtJiGLnI/0Cx1ixeaRhV8f0=; b=RkrYBpHx/7FdtvMudhsjq5LEo2Y/bjrSnB6Q68mNfHB3Vo6o+7SR76306LThxTGlzu95oL jwUdEcJG/+UK9li2NrwM3Awlrj9V16TEn1iOWyO66sYgDpFVZfqDs0Q1tEl10wbxrH53Ex 2QmTDokmRsAf+Vcf6DlY/ByEVXu8I4kPWpCSjifaAcYrp1WI72ZTXpnRXebduztwvkMBCu xyQ5VcrRErc2HR2L/mw9p+ten7ww3RaXKJ5Znlrd+bJFj6xu4Q5GRSwcHMCgFbz6ylUYHW 5l0cCd9eaSSRzePD9dBavzxQm/EPNuVK2opiKGmJTYfkprxNT+eoydWNXbgc5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690928772; a=rsa-sha256; cv=none; b=JQep92uNUhMPu/cOHUsfeVx9+rxSrjIoGALJe6PvbhuYNU/QmdB2qBj6Dk3FgaiRabXHiI NpPVJVf8oEa4NLwQ1wTJM+wVh95cOhkBBU3bWJG/rwjPeq8fZw/LhyAkggvSbmY5wVNZLe LMGmimcqSCuUy4KAJX1kkkJDe8Xz8poXAi/74b07EsNFK49PKAB72t1zQkaJevSTwTwsaL mUq+4By2xeOCGRXPURtTvuJ5KdOHHs2HETEfkyKlJDElFwg1PT22KrRkk/0qFp4b5LQWNm dLOYpFHVRgfBYA232EngJ271DlI/jiSv694/Lq0GGtp/23RTQ4eMKdXZ7pl8Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cIbZCzaUw73bM4H0ibcXhtJiGLnI/0Cx1ixeaRhV8f0=; b=COWwSgQeG58nuUicwiITq/Z96uYJmd2GXJXJ97KEAGBqNbDN+LFZcohaXgWWilG951amSZ 8byauB6lXgPpAJ/pc+CRnBIvW41J6eKn6Vt/3gp3aoagNXTPhQEt8POAFmvJLkkODm2/ir C7/UdPan3h1PO9jX2iOkfvtCXWkrzJD+fCVIJ+1t4nNFlTMNwMeozYPQhfr+UIftBEE6Ia Qx6JBLj++614Wy8znkaSXxGwWQT4tbI5GrMLHzcNXQgnVTSy8EBgDgCgkNwDNwsEDcSQLr O8YZSPtszJD5s4f1WGbB+yus0kZv+aJwQs8pWn7VGv6ij7gxnUO0MJqZtXKfsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFqT02TgNzvd9; Tue, 1 Aug 2023 22:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371MQCOn045647; Tue, 1 Aug 2023 22:26:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371MQC5D045646; Tue, 1 Aug 2023 22:26:12 GMT (envelope-from git) Date: Tue, 1 Aug 2023 22:26:12 GMT Message-Id: <202308012226.371MQC5D045646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 0a57cdd971b2 - main - cam_xpt: Reimplement xpt_*nounce_periph in terms of the _sbuf versions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a57cdd971b24292c48e3a0be08ba5ebf0b54a31 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0a57cdd971b24292c48e3a0be08ba5ebf0b54a31 commit 0a57cdd971b24292c48e3a0be08ba5ebf0b54a31 Author: John Baldwin AuthorDate: 2023-08-01 22:24:36 +0000 Commit: John Baldwin CommitDate: 2023-08-01 22:24:36 +0000 cam_xpt: Reimplement xpt_*nounce_periph in terms of the _sbuf versions Use an sbuf that drains to printf to avoid duplicating code in the two versions of each function. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41263 --- sys/cam/cam_xpt.c | 68 ++++++++++--------------------------------------------- 1 file changed, 12 insertions(+), 56 deletions(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index e7248cf76d19..6ff8a61457fa 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -1045,43 +1045,13 @@ xpt_remove_periph(struct cam_periph *periph) void xpt_announce_periph(struct cam_periph *periph, char *announce_string) { - struct cam_path *path = periph->path; - struct xpt_proto *proto; - - cam_periph_assert(periph, MA_OWNED); - periph->flags |= CAM_PERIPH_ANNOUNCED; + char buf[128]; + struct sbuf sb; - printf("%s%d at %s%d bus %d scbus%d target %d lun %jx\n", - periph->periph_name, periph->unit_number, - path->bus->sim->sim_name, - path->bus->sim->unit_number, - path->bus->sim->bus_id, - path->bus->path_id, - path->target->target_id, - (uintmax_t)path->device->lun_id); - printf("%s%d: ", periph->periph_name, periph->unit_number); - proto = xpt_proto_find(path->device->protocol); - if (proto) - proto->ops->announce(path->device); - else - printf("Unknown protocol device %d\n", path->device->protocol); - if (path->device->serial_num_len > 0) { - /* Don't wrap the screen - print only the first 60 chars */ - printf("%s%d: Serial Number %.60s\n", periph->periph_name, - periph->unit_number, path->device->serial_num); - } - /* Announce transport details. */ - path->bus->xport->ops->announce(periph); - /* Announce command queueing. */ - if (path->device->inq_flags & SID_CmdQue - || path->device->flags & CAM_DEV_TAG_AFTER_COUNT) { - printf("%s%d: Command Queueing enabled\n", - periph->periph_name, periph->unit_number); - } - /* Announce caller's details if they've passed in. */ - if (announce_string != NULL) - printf("%s%d: %s\n", periph->periph_name, - periph->unit_number, announce_string); + (void)sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN | SBUF_INCLUDENUL); + sbuf_set_drain(&sb, sbuf_printf_drain, NULL); + xpt_announce_periph_sbuf(periph, &sb, announce_string); + (void)sbuf_finish(&sb); } void @@ -1151,27 +1121,13 @@ xpt_announce_quirks_sbuf(struct cam_periph *periph, struct sbuf *sb, void xpt_denounce_periph(struct cam_periph *periph) { - struct cam_path *path = periph->path; - struct xpt_proto *proto; + char buf[128]; + struct sbuf sb; - cam_periph_assert(periph, MA_OWNED); - printf("%s%d at %s%d bus %d scbus%d target %d lun %jx\n", - periph->periph_name, periph->unit_number, - path->bus->sim->sim_name, - path->bus->sim->unit_number, - path->bus->sim->bus_id, - path->bus->path_id, - path->target->target_id, - (uintmax_t)path->device->lun_id); - printf("%s%d: ", periph->periph_name, periph->unit_number); - proto = xpt_proto_find(path->device->protocol); - if (proto) - proto->ops->denounce(path->device); - else - printf("Unknown protocol device %d", path->device->protocol); - if (path->device->serial_num_len > 0) - printf(" s/n %.60s", path->device->serial_num); - printf(" detached\n"); + (void)sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN | SBUF_INCLUDENUL); + sbuf_set_drain(&sb, sbuf_printf_drain, NULL); + xpt_denounce_periph_sbuf(periph, &sb); + (void)sbuf_finish(&sb); } void From nobody Tue Aug 1 22:26:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqT16VG9z4pwvF; Tue, 1 Aug 2023 22:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqSx47bmz3hXX; Tue, 1 Aug 2023 22:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8xV6k8lOnpo1BQXFTjchysbb3ib1YY+XNyJ8UJGYBRY=; b=e6YLq+qRsgfyZhMB3c57lrXz80azgqj+1+kKfeolcKaaCz4xS8gXMnyYaz3lK4jfZEUiUm //V0Ydyhj26QhcN4HOVRz+D4aqKB0tRcrbM1WAme6NIANXmbI0JtEj5DfVYr+UjG2HP/wO Ex5H6ysYy00+MHFQQceus3XXGNZQ2EToFxj7EUbXhvNTwSID7O6a3IJmnkguG+4r8j7inL T+cC1wQwLElkRAa2deoofNME4eEANDZg4tiA+wHsLLbQhm69vwbsEdpUh3m3wnV2NEwTuv qjIUw6YcAfxnRUD1e7eKvifhvc/eaYfkLh8ai5PVvGWKJBSE3d42FF301+Q+rQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690928769; a=rsa-sha256; cv=none; b=KyE6qqgDHUnNWluUnU8U7if9CKuzqxh41b/VLNeUErnAKjFJDJeqnavYdo/3srVBqQLAOZ taMsf7GfeMEVpUJA0UJAVhWuJpKXWMdtWBgaPcfntm94GztpXmMVaDvoO4Kz0X7L+QgSzJ iqtDvMWErpHJyZn7uY027vNit4+eQFvpK3FSVd7E9V20Cx3hhsY6/2ayW8ocgS97QkTQch ykxacfOjcuZXFPIZyl1moi5vYTG8nOi5eB6NX52uWQKS9gxeo7sFoYkYpBgNVv1A+5qgZ8 5IJsMuQBoIz9HRAreLNBPvPzy+/xTTiH4rWORj/EbBVUK6tpdeL50NXEoZPHtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8xV6k8lOnpo1BQXFTjchysbb3ib1YY+XNyJ8UJGYBRY=; b=Fr320p7lNl1SVmC3zbKmcHm+U5OnX/noVlZ9BXA23DRLezRpDcuiyav7+zzUwGx5QGKGv+ IoaDktIfbRBlQGhGGpmst6ha5ayg1LJC3up3yBnt5YjrCjT5CJp8U/3XsTTQW9afdWJaXC eT232HR0f0+OJrGgSkBtjG7Z9/Q3LYyqFQSkRo2LgxLXLk345zF/jL8XIZeViy/xvxTC9v nV7GDo5bN3ESwarEBeWnP0PW3QnFI2IdNfZ1f9TQ+MxDtespeY1aT/z9NygyJ25aysETT5 HgbNHT56ZosWdIUJBXZskr2nZ5xlyOLAu9NRLBa+2Cg+87ABcwbIB3YeGbcc2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFqSx07PwzvSl; Tue, 1 Aug 2023 22:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371MQ8jf045585; Tue, 1 Aug 2023 22:26:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371MQ8oa045584; Tue, 1 Aug 2023 22:26:08 GMT (envelope-from git) Date: Tue, 1 Aug 2023 22:26:08 GMT Message-Id: <202308012226.371MQ8oa045584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 32734eb14c5c - main - mmc_xpt: Remove dubious end of mmc_print_ident List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32734eb14c5cc3aa4ad576ba746830c73fb8eb54 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=32734eb14c5cc3aa4ad576ba746830c73fb8eb54 commit 32734eb14c5cc3aa4ad576ba746830c73fb8eb54 Author: John Baldwin AuthorDate: 2023-08-01 22:20:53 +0000 Commit: John Baldwin CommitDate: 2023-08-01 22:20:53 +0000 mmc_xpt: Remove dubious end of mmc_print_ident The end of this function finishes the passed in sbuf, calls printf manually on the contents, and then clears it. The caller then tries to print the resulting sbuf. This works currently but will not work for future callers that pass in an external sbuf to be appended to. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41260 --- sys/cam/mmc/mmc_xpt.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 30b1b7f867e7..8fee7b4cad58 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -466,10 +466,6 @@ mmc_print_ident(struct mmc_params *ident_data, struct sbuf *sb) sbuf_printf(sb, "Number of functions: %u\n", ident_data->sdio_func_count); } - - sbuf_finish(sb); - printf("%s", sbuf_data(sb)); - sbuf_clear(sb); } static void From nobody Tue Aug 1 22:26:06 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqT14rYfz4pwqp; Tue, 1 Aug 2023 22:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqSw0Qvjz3hrw; Tue, 1 Aug 2023 22:26:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vy1mzvYzQ9BAV2HDD54hDTrWw2zinA/J5G/73yNLbEA=; b=VkJcnKCoG3nje5RvuXkN9oXBosjxiBq8+S/2yoa4xETdgtrq9iBlURphw835mDg2vJe656 I4unZL4fJ0pUBZp/3RgPFC3BUq8MoFu7K1IfieUx0IfrvGSqWw9LBHNHsyFMDx4qKEgnWO RqyI7zuhxTIqgEoTPHpFo0mARoEeF34JDjvTP6gAPcM1HoJeHWsY46AAAetSWvXT3cSO8w N4tJ1uS+Uk60f3s6SgXaAjrbLz7INR/lYiJ22/VHoQtkeDjuQ80E5+r6mH1nYNWcL/hVQG sZ7Ll3bMuV6R3mrtKRVB9l+Xhb+1U2UAp0Db+ZudEIv3pJ6fMEbdHO7O6PZmsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690928768; a=rsa-sha256; cv=none; b=GOnMvd6cLuZ37ZN9+7+3gsqDp1AJSF6ITf9C9ZxWuy1kshZNyHDQrJI5vyedyLktSqzTdF ZPbDaxjMWzJy3DQKUIDPcUy4QfVS+kUNMyE9X/j0UINxqY4tSnE1qtlDsQAl0wcpj/3gmC eUjdnhEI39W0Flhtc/zkYmjqhmuV+5Dhiy6+YOkeb0lEmV44ybeCAQ4YKsCEtSuhvto6vp JO9CEY9ax8Xulo1YMDF+kl+4tpZLp7cJtFUHbIhMAZ5h4u7BZrlxmH24YkNJlUomSBEQNN pNbVg7ysvxSrlXXFjO6x36E4aQvcUExYvK55i/EiL6SXbnMuiMVXCv3uf0e3nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vy1mzvYzQ9BAV2HDD54hDTrWw2zinA/J5G/73yNLbEA=; b=vx4RSylIJ/dG9Kq7ADkM8NEg20i1ztGrEJ4Qh5NfAeTRuBPscSYsxUi8Gr32tDq/GPp8M7 TTyf0ar6vPh254oQAm/MMg+FUne9Nek7J0B8oJte6sPUQ2SrZEisxssXm2VzS2a0eIdXxN sjGunmIHFgn3z0NPLnVrI+4nrZy138mCjt2nsMQVTcTV0Qjh7H264aET+CF154zfMokduo ltCweXYRzSfsP+2gVoo8yfAJMPJ7SHqttkl2Eeos/dMBVK1it/vcJFollXP4clYU/u2uYw L8Lmnxpc83QdzMXufDF3WCqmPmG3/bC8uphr5Yx4qQR5JexXfxMYI3FQ/M+YOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFqSv4t98zvd6; Tue, 1 Aug 2023 22:26:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371MQ616045540; Tue, 1 Aug 2023 22:26:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371MQ6wP045539; Tue, 1 Aug 2023 22:26:06 GMT (envelope-from git) Date: Tue, 1 Aug 2023 22:26:06 GMT Message-Id: <202308012226.371MQ6wP045539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 0be27bde5f67 - main - cam/nvme: Remove spurious newline during periph detach announcement List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0be27bde5f673fc89643ea460b9cb94fc3316dd1 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0be27bde5f673fc89643ea460b9cb94fc3316dd1 commit 0be27bde5f673fc89643ea460b9cb94fc3316dd1 Author: John Baldwin AuthorDate: 2023-08-01 22:19:50 +0000 Commit: John Baldwin CommitDate: 2023-08-01 22:19:50 +0000 cam/nvme: Remove spurious newline during periph detach announcement Other protocol denounce routines use a "short" variant of announce that does not include a trailing newline. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41176 --- sys/cam/nvme/nvme_all.c | 9 ++++++++- sys/cam/nvme/nvme_all.h | 2 ++ sys/cam/nvme/nvme_xpt.c | 7 ++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/sys/cam/nvme/nvme_all.c b/sys/cam/nvme/nvme_all.c index 0ab37b861ca2..5350dbd1bcdb 100644 --- a/sys/cam/nvme/nvme_all.c +++ b/sys/cam/nvme/nvme_all.c @@ -89,7 +89,14 @@ void nvme_print_ident(const struct nvme_controller_data *cdata, const struct nvme_namespace_data *data, struct sbuf *sb) { + nvme_print_ident_short(cdata, data, sb); + sbuf_printf(sb, "\n"); +} +void +nvme_print_ident_short(const struct nvme_controller_data *cdata, + const struct nvme_namespace_data *data, struct sbuf *sb) +{ sbuf_printf(sb, "<"); cam_strvis_sbuf(sb, cdata->mn, sizeof(cdata->mn), CAM_STRVIS_FLAG_NONASCII_SPC); @@ -99,7 +106,7 @@ nvme_print_ident(const struct nvme_controller_data *cdata, sbuf_printf(sb, " "); cam_strvis_sbuf(sb, cdata->sn, sizeof(cdata->sn), CAM_STRVIS_FLAG_NONASCII_SPC); - sbuf_printf(sb, ">\n"); + sbuf_printf(sb, ">"); } /* XXX need to do nvme admin opcodes too, but those aren't used yet by nda */ diff --git a/sys/cam/nvme/nvme_all.h b/sys/cam/nvme/nvme_all.h index ef932fd8efc3..9bdbeb219a90 100644 --- a/sys/cam/nvme/nvme_all.h +++ b/sys/cam/nvme/nvme_all.h @@ -42,6 +42,8 @@ int nvme_identify_match(caddr_t identbuffer, caddr_t table_entry); struct sbuf; void nvme_print_ident(const struct nvme_controller_data *, const struct nvme_namespace_data *, struct sbuf *); +void nvme_print_ident_short(const struct nvme_controller_data *, + const struct nvme_namespace_data *, struct sbuf *); const char *nvme_op_string(const struct nvme_command *, int admin); const char *nvme_cmd_string(const struct nvme_command *, char *, size_t); void nvme_cmd_sbuf(const struct nvme_command *, struct sbuf *sb); diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c index 3222ec1e9dc3..0662f476536c 100644 --- a/sys/cam/nvme/nvme_xpt.c +++ b/sys/cam/nvme/nvme_xpt.c @@ -838,8 +838,13 @@ nvme_proto_announce(struct cam_ed *device) static void nvme_proto_denounce(struct cam_ed *device) { + struct sbuf sb; + char buffer[120]; - nvme_proto_announce(device); + sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); + nvme_print_ident_short(device->nvme_cdata, device->nvme_data, &sb); + sbuf_finish(&sb); + sbuf_putbuf(&sb); } static void From nobody Tue Aug 1 22:26:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqTQ4HRFz4pwYb; Tue, 1 Aug 2023 22:26:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqT14MmTz3hZK; Tue, 1 Aug 2023 22:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g/U2Ne4hC5L1/O806r8nYi+VEtaCkRajTgGxKG53cJc=; b=aHMRdM2WgAWqrIFgfMbt+RS3U8bBO0mlYX7C/XKN+bcmCBm5/2l7NTmjpYFD+nCaSiCZkY zWQWfYFx3lZSW2JwwKQPutHOpJe4pWB0qmd7Obi9KZsdqx5lm/kd3wLo1Q6JLR1XIEJJ/S xiBS5CMla5sUKFMcM7bzIYN59mLtQTtq0RD62c+VPyxKBBlgLKCcV4LWwwHOqWRVw3P1IU plLnGXfd0KJUoRnSs3ihficA461mfS+NpO8klshO/cmc1dZdZ92Xy5Ht/9m+J/clPoPRp5 i8+cDlUcWFW+xOreBQk1X1WUJKs9q6vGciyG76jrVuxePDXcHkFue4vsmsDvAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690928773; a=rsa-sha256; cv=none; b=w/mfCzGL79HYKwyG71XCJhTOmhgljauhNFfnf7TmPhlCqfMvrJK858SokqtPIyhz96ak55 nx4D97WngZFB8dKc7987TMxtSebxMTi5HVvRuuZQcxubYnxZcb5Rq2wdD0WIShuDyEVvHg oi2C+O0AywQI/DE1oG1MIG61aZfHVZLIofzobVNO+7YPn5fWQHlo2xBxxdmlLxRKbSeQ4U 4bg7vJHRGI4PF2/7WcweVUwQTCsE+4dt6gq+BRur3cXle35nfI8QQBnZGFmE8HVE6y9ABS nT7Aoi9oPT8j/w20JCO5YEZkz5twp0uBOXX/nlvpk3XWDdspsUIIlb1NOwO8Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g/U2Ne4hC5L1/O806r8nYi+VEtaCkRajTgGxKG53cJc=; b=bFlJxns0tghAbdPeC1wzg2NdJQtTqluIApHkZ4aVBfIM7Z1t1HDRwCCtJAdTB2ouQicVY7 cChPdC/eA14coALUF0wHodXTojB5RF7FTHLZ/ENdtYdsgfD2Z6+x6v3bab/zwiEStrr4E3 LilKVtueaQOnMJ+WfVUktHyVh+FooPr0p/p4qzrnE4c4oUMQjr1EAGm9cltlOZ6MQEQv5R MFd+XIse5TPRkheu95XEG2xTu1hYFZHuyThR/tyzEV9eVQ6JEshiisaLZHeIY87qZJ6c21 g9OadtEaUWSeWX2hADK+KV0Xe02LJqX5WfKUfgOaBIp+qno894wsqdp0yb8s9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFqT13F3lzvkt; Tue, 1 Aug 2023 22:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371MQDO2045668; Tue, 1 Aug 2023 22:26:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371MQDVJ045667; Tue, 1 Aug 2023 22:26:13 GMT (envelope-from git) Date: Tue, 1 Aug 2023 22:26:13 GMT Message-Id: <202308012226.371MQDVJ045667@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b2c44f1fc1c6 - main - cam: Remove non-sbuf announce/denounce proto and xport ops List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2c44f1fc1c68dfb8a0a1f14f035241f6b96f30f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b2c44f1fc1c68dfb8a0a1f14f035241f6b96f30f commit b2c44f1fc1c68dfb8a0a1f14f035241f6b96f30f Author: John Baldwin AuthorDate: 2023-08-01 22:25:38 +0000 Commit: John Baldwin CommitDate: 2023-08-01 22:25:38 +0000 cam: Remove non-sbuf announce/denounce proto and xport ops Reviewed by: mav, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41264 --- sys/cam/ata/ata_xpt.c | 89 ---------------------------------------------- sys/cam/cam_xpt_internal.h | 3 -- sys/cam/mmc/mmc_xpt.c | 48 ------------------------- sys/cam/nvme/nvme_xpt.c | 42 ---------------------- sys/cam/scsi/scsi_xpt.c | 75 -------------------------------------- 5 files changed, 257 deletions(-) diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c index 2b2fec06a06a..55aa5e346daa 100644 --- a/sys/cam/ata/ata_xpt.c +++ b/sys/cam/ata/ata_xpt.c @@ -188,16 +188,11 @@ static void ata_dev_async(uint32_t async_code, struct cam_ed *device, void *async_arg); static void ata_action(union ccb *start_ccb); -static void ata_announce_periph(struct cam_periph *periph); static void ata_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb); -static void ata_proto_announce(struct cam_ed *device); static void ata_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); -static void ata_proto_denounce(struct cam_ed *device); static void ata_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static void ata_proto_debug_out(union ccb *ccb); -static void semb_proto_announce(struct cam_ed *device); static void semb_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); -static void semb_proto_denounce(struct cam_ed *device); static void semb_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static int ata_dma = 1; @@ -210,7 +205,6 @@ static struct xpt_xport_ops ata_xport_ops = { .alloc_device = ata_alloc_device, .action = ata_action, .async = ata_dev_async, - .announce = ata_announce_periph, .announce_sbuf = ata_announce_periph_sbuf, }; #define ATA_XPT_XPORT(x, X) \ @@ -227,9 +221,7 @@ ATA_XPT_XPORT(sata, SATA); #undef ATA_XPORT_XPORT static struct xpt_proto_ops ata_proto_ops_ata = { - .announce = ata_proto_announce, .announce_sbuf = ata_proto_announce_sbuf, - .denounce = ata_proto_denounce, .denounce_sbuf = ata_proto_denounce_sbuf, .debug_out = ata_proto_debug_out, }; @@ -240,9 +232,7 @@ static struct xpt_proto ata_proto_ata = { }; static struct xpt_proto_ops ata_proto_ops_satapm = { - .announce = ata_proto_announce, .announce_sbuf = ata_proto_announce_sbuf, - .denounce = ata_proto_denounce, .denounce_sbuf = ata_proto_denounce_sbuf, .debug_out = ata_proto_debug_out, }; @@ -253,9 +243,7 @@ static struct xpt_proto ata_proto_satapm = { }; static struct xpt_proto_ops ata_proto_ops_semb = { - .announce = semb_proto_announce, .announce_sbuf = semb_proto_announce_sbuf, - .denounce = semb_proto_denounce, .denounce_sbuf = semb_proto_denounce_sbuf, .debug_out = ata_proto_debug_out, }; @@ -2133,59 +2121,6 @@ _ata_announce_periph(struct cam_periph *periph, struct ccb_trans_settings *cts, } } -static void -ata_announce_periph(struct cam_periph *periph) -{ - struct ccb_trans_settings cts; - u_int speed, mb; - - bzero(&cts, sizeof(cts)); - _ata_announce_periph(periph, &cts, &speed); - if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) - return; - - mb = speed / 1000; - if (mb > 0) - printf("%s%d: %d.%03dMB/s transfers", - periph->periph_name, periph->unit_number, - mb, speed % 1000); - else - printf("%s%d: %dKB/s transfers", periph->periph_name, - periph->unit_number, speed); - /* Report additional information about connection */ - if (cts.transport == XPORT_ATA) { - struct ccb_trans_settings_pata *pata = - &cts.xport_specific.ata; - - printf(" ("); - if (pata->valid & CTS_ATA_VALID_MODE) - printf("%s, ", ata_mode2string(pata->mode)); - if ((pata->valid & CTS_ATA_VALID_ATAPI) && pata->atapi != 0) - printf("ATAPI %dbytes, ", pata->atapi); - if (pata->valid & CTS_ATA_VALID_BYTECOUNT) - printf("PIO %dbytes", pata->bytecount); - printf(")"); - } - if (cts.transport == XPORT_SATA) { - struct ccb_trans_settings_sata *sata = - &cts.xport_specific.sata; - - printf(" ("); - if (sata->valid & CTS_SATA_VALID_REVISION) - printf("SATA %d.x, ", sata->revision); - else - printf("SATA, "); - if (sata->valid & CTS_SATA_VALID_MODE) - printf("%s, ", ata_mode2string(sata->mode)); - if ((sata->valid & CTS_ATA_VALID_ATAPI) && sata->atapi != 0) - printf("ATAPI %dbytes, ", sata->atapi); - if (sata->valid & CTS_SATA_VALID_BYTECOUNT) - printf("PIO %dbytes", sata->bytecount); - printf(")"); - } - printf("\n"); -} - static void ata_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) { @@ -2245,18 +2180,6 @@ ata_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) ata_print_ident_sbuf(&device->ident_data, sb); } -static void -ata_proto_announce(struct cam_ed *device) -{ - ata_print_ident(&device->ident_data); -} - -static void -ata_proto_denounce(struct cam_ed *device) -{ - ata_print_ident_short(&device->ident_data); -} - static void ata_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) { @@ -2269,18 +2192,6 @@ semb_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) semb_print_ident_sbuf((struct sep_identify_data *)&device->ident_data, sb); } -static void -semb_proto_announce(struct cam_ed *device) -{ - semb_print_ident((struct sep_identify_data *)&device->ident_data); -} - -static void -semb_proto_denounce(struct cam_ed *device) -{ - semb_print_ident_short((struct sep_identify_data *)&device->ident_data); -} - static void semb_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) { diff --git a/sys/cam/cam_xpt_internal.h b/sys/cam/cam_xpt_internal.h index f30ef2aa81b5..0e8302cb74ed 100644 --- a/sys/cam/cam_xpt_internal.h +++ b/sys/cam/cam_xpt_internal.h @@ -56,7 +56,6 @@ struct xpt_xport_ops { xpt_release_device_func reldev; xpt_action_func action; xpt_dev_async_func async; - xpt_announce_periph_func announce; xpt_announce_periph_sbuf_func announce_sbuf; }; @@ -75,9 +74,7 @@ typedef void (*xpt_proto_announce_sbuf_func)(struct cam_ed *, struct sbuf *); typedef void (*xpt_proto_debug_out_func)(union ccb *); struct xpt_proto_ops { - xpt_proto_announce_func announce; xpt_proto_announce_sbuf_func announce_sbuf; - xpt_proto_announce_func denounce; xpt_proto_announce_sbuf_func denounce_sbuf; xpt_proto_debug_out_func debug_out; }; diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 0930717b0a2a..406b91df2e35 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -73,7 +73,6 @@ static void mmc_dev_async(uint32_t async_code, struct cam_eb *bus, struct cam_et *target, struct cam_ed *device, void *async_arg); static void mmc_action(union ccb *start_ccb); static void mmc_dev_advinfo(union ccb *start_ccb); -static void mmc_announce_periph(struct cam_periph *periph); static void mmc_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb); static void mmc_scan_lun(struct cam_periph *periph, @@ -85,9 +84,7 @@ static void mmcprobe_start(struct cam_periph *periph, union ccb *start_ccb); static void mmcprobe_cleanup(struct cam_periph *periph); static void mmcprobe_done(struct cam_periph *periph, union ccb *done_ccb); -static void mmc_proto_announce(struct cam_ed *device); static void mmc_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); -static void mmc_proto_denounce(struct cam_ed *device); static void mmc_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static void mmc_proto_debug_out(union ccb *ccb); @@ -151,7 +148,6 @@ static struct xpt_xport_ops mmc_xport_ops = { .alloc_device = mmc_alloc_device, .action = mmc_action, .async = mmc_dev_async, - .announce = mmc_announce_periph, .announce_sbuf = mmc_announce_periph_sbuf, }; @@ -166,9 +162,7 @@ static struct xpt_xport_ops mmc_xport_ops = { MMC_XPT_XPORT(mmc, MMCSD); static struct xpt_proto_ops mmc_proto_ops = { - .announce = mmc_proto_announce, .announce_sbuf = mmc_proto_announce_sbuf, - .denounce = mmc_proto_denounce, .denounce_sbuf = mmc_proto_denounce_sbuf, .debug_out = mmc_proto_debug_out, }; @@ -383,29 +377,6 @@ mmc_dev_advinfo(union ccb *start_ccb) start_ccb->ccb_h.status = CAM_REQ_CMP; } -static void -mmc_announce_periph(struct cam_periph *periph) -{ - struct ccb_pathinq cpi; - struct ccb_trans_settings cts; - struct cam_path *path = periph->path; - - cam_periph_assert(periph, MA_OWNED); - - CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("mmc_announce_periph")); - - memset(&cts, 0, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); - cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; - cts.type = CTS_TYPE_CURRENT_SETTINGS; - xpt_action((union ccb*)&cts); - if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) - return; - xpt_path_inq(&cpi, periph->path); - CAM_DEBUG(path, CAM_DEBUG_INFO, - ("XPT info: CLK %04d, ...\n", cts.proto_specific.mmc.ios.clock)); -} - static void mmc_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) { @@ -498,31 +469,12 @@ mmc_print_ident(struct mmc_params *ident_data, struct sbuf *sb) } } -static void -mmc_proto_announce(struct cam_ed *device) -{ - struct sbuf sb; - char buffer[256]; - - sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); - mmc_print_ident(&device->mmc_ident_data, &sb); - sbuf_finish(&sb); - sbuf_putbuf(&sb); -} - static void mmc_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) { mmc_print_ident(&device->mmc_ident_data, sb); } -static void -mmc_proto_denounce(struct cam_ed *device) -{ - - mmc_proto_announce(device); -} - static void mmc_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) { diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c index d2968d1019d1..ad0718bfcf3b 100644 --- a/sys/cam/nvme/nvme_xpt.c +++ b/sys/cam/nvme/nvme_xpt.c @@ -156,13 +156,10 @@ static void nvme_dev_async(uint32_t async_code, struct cam_ed *device, void *async_arg); static void nvme_action(union ccb *start_ccb); -static void nvme_announce_periph(struct cam_periph *periph); static void nvme_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb); -static void nvme_proto_announce(struct cam_ed *device); static void nvme_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); -static void nvme_proto_denounce(struct cam_ed *device); static void nvme_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static void nvme_proto_debug_out(union ccb *ccb); @@ -171,7 +168,6 @@ static struct xpt_xport_ops nvme_xport_ops = { .alloc_device = nvme_alloc_device, .action = nvme_action, .async = nvme_dev_async, - .announce = nvme_announce_periph, .announce_sbuf = nvme_announce_periph_sbuf, }; #define NVME_XPT_XPORT(x, X) \ @@ -187,9 +183,7 @@ NVME_XPT_XPORT(nvme, NVME); #undef NVME_XPT_XPORT static struct xpt_proto_ops nvme_proto_ops = { - .announce = nvme_proto_announce, .announce_sbuf = nvme_proto_announce_sbuf, - .denounce = nvme_proto_denounce, .denounce_sbuf = nvme_proto_denounce_sbuf, .debug_out = nvme_proto_debug_out, }; @@ -827,48 +821,12 @@ nvme_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) sbuf_printf(sb, "\n"); } -static void -nvme_announce_periph(struct cam_periph *periph) -{ - struct sbuf sb; - char buffer[120]; - - sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); - nvme_announce_periph_sbuf(periph, &sb); - sbuf_finish(&sb); - sbuf_putbuf(&sb); -} - -static void -nvme_proto_announce(struct cam_ed *device) -{ - struct sbuf sb; - char buffer[120]; - - sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); - nvme_print_ident(device->nvme_cdata, device->nvme_data, &sb); - sbuf_finish(&sb); - sbuf_putbuf(&sb); -} - static void nvme_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) { nvme_print_ident(device->nvme_cdata, device->nvme_data, sb); } -static void -nvme_proto_denounce(struct cam_ed *device) -{ - struct sbuf sb; - char buffer[120]; - - sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); - nvme_print_ident_short(device->nvme_cdata, device->nvme_data, &sb); - sbuf_finish(&sb); - sbuf_putbuf(&sb); -} - static void nvme_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) { diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index 619841720bb3..734668995299 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -593,12 +593,9 @@ static void scsi_dev_async(uint32_t async_code, struct cam_ed *device, void *async_arg); static void scsi_action(union ccb *start_ccb); -static void scsi_announce_periph(struct cam_periph *periph); static void scsi_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb); -static void scsi_proto_announce(struct cam_ed *device); static void scsi_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); -static void scsi_proto_denounce(struct cam_ed *device); static void scsi_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static void scsi_proto_debug_out(union ccb *ccb); @@ -608,7 +605,6 @@ static struct xpt_xport_ops scsi_xport_ops = { .alloc_device = scsi_alloc_device, .action = scsi_action, .async = scsi_dev_async, - .announce = scsi_announce_periph, .announce_sbuf = scsi_announce_periph_sbuf, }; #define SCSI_XPT_XPORT(x, X) \ @@ -630,9 +626,7 @@ SCSI_XPT_XPORT(ppb, PPB); #undef SCSI_XPORT_XPORT static struct xpt_proto_ops scsi_proto_ops = { - .announce = scsi_proto_announce, .announce_sbuf = scsi_proto_announce_sbuf, - .denounce = scsi_proto_denounce, .denounce_sbuf = scsi_proto_denounce_sbuf, .debug_out = scsi_proto_debug_out, }; @@ -3150,87 +3144,18 @@ scsi_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) sbuf_printf(sb, "\n"); } -static void -scsi_announce_periph(struct cam_periph *periph) -{ - struct ccb_trans_settings cts; - u_int speed, freq, mb; - - memset(&cts, 0, sizeof(cts)); - _scsi_announce_periph(periph, &speed, &freq, &cts); - if (cam_ccb_status((union ccb *)&cts) != CAM_REQ_CMP) - return; - - mb = speed / 1000; - if (mb > 0) - printf("%s%d: %d.%03dMB/s transfers", - periph->periph_name, periph->unit_number, - mb, speed % 1000); - else - printf("%s%d: %dKB/s transfers", periph->periph_name, - periph->unit_number, speed); - /* Report additional information about SPI connections */ - if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SPI) { - struct ccb_trans_settings_spi *spi; - - spi = &cts.xport_specific.spi; - if (freq != 0) { - printf(" (%d.%03dMHz%s, offset %d", freq / 1000, - freq % 1000, - (spi->ppr_options & MSG_EXT_PPR_DT_REQ) != 0 - ? " DT" : "", - spi->sync_offset); - } - if ((spi->valid & CTS_SPI_VALID_BUS_WIDTH) != 0 - && spi->bus_width > 0) { - if (freq != 0) { - printf(", "); - } else { - printf(" ("); - } - printf("%dbit)", 8 * (0x01 << spi->bus_width)); - } else if (freq != 0) { - printf(")"); - } - } - if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_FC) { - struct ccb_trans_settings_fc *fc; - - fc = &cts.xport_specific.fc; - if (fc->valid & CTS_FC_VALID_WWNN) - printf(" WWNN 0x%llx", (long long) fc->wwnn); - if (fc->valid & CTS_FC_VALID_WWPN) - printf(" WWPN 0x%llx", (long long) fc->wwpn); - if (fc->valid & CTS_FC_VALID_PORT) - printf(" PortID 0x%x", fc->port); - } - printf("\n"); -} - static void scsi_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) { scsi_print_inquiry_sbuf(sb, &device->inq_data); } -static void -scsi_proto_announce(struct cam_ed *device) -{ - scsi_print_inquiry(&device->inq_data); -} - static void scsi_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) { scsi_print_inquiry_short_sbuf(sb, &device->inq_data); } -static void -scsi_proto_denounce(struct cam_ed *device) -{ - scsi_print_inquiry_short(&device->inq_data); -} - static void scsi_proto_debug_out(union ccb *ccb) { From nobody Tue Aug 1 22:26:07 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqT16czVz4pwW7; Tue, 1 Aug 2023 22:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqSw1LXQz3hrx; Tue, 1 Aug 2023 22:26:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dU2P6pW/G5Fbi2k2rwSpAGyTWpDjvj3PL2A/5YUSkwg=; b=opD4t0tC6CR73KWOxiU5kP7TaDoB0Vn486bN4mV0mXn5KmY9J1sZuBljJ/BX3DE/kwja+V OhGHE0Qb6Rn7LmuamlCBjCUrCptQsc29r6QWrnENxlOf7mL1L90MyGNNfQ1WB9XjLkLU0t hUA7UG8MrPlr+EDKUSk2GcFXgCV6hRODBbwsdeCtk7p56e08encHS5n4sSCakKxupbOaAl 1V2ZPodMEpUcH28rnQ3hYpTO29yktXjLG/w7jaiOY/q89R6e/B9v1+djavE3fv1z4z66qd Xy+GO7Na3/4wF7OyznE3GwjLN8ulUxMLGSGzjhwKuogxaVUaki7vldPagOluDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690928768; a=rsa-sha256; cv=none; b=puxrGxdA3O3xlzSOoIbuw9wx63EtN/G0u1azfrHryf6qseh5Hxs3fTDXOkH/KUunaqo02C Dx3qgxT0Ai7RmYQgSgrsvUQzOwiOmphgw23BJpp3aq/hz7SRPp8WNmM7/MS0adS05m3jaN S7NKY54buT340q78Bxa6oFMUi3PxnNU/kDShvC1Px3l1hdkDvToFPjkPitC5u+B/rVYF41 ZNXdGhEkgTjZuZwTPb4kJ3JOqsGS1BTVYGDCnuK+h2O4UVVR45kjbbTO7PMWhOf6Ys4J3/ V+9r6BqQS9WSTnPE5Ls6aje79jObjjVCQK9M96ALfc0qpxyG+WeuufAgIfxmEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dU2P6pW/G5Fbi2k2rwSpAGyTWpDjvj3PL2A/5YUSkwg=; b=DyCIbU1Qpr0+oYKqshp4uzNxSL0RzOJ+t3HQKraj7HbwIRWFpUrK4doJS3KsJqrk0bfxFt IPIaANH39PZkIHn2juZTdBA6QBAG1zvqQtpaEcA73BXud5LnpIt1WG4MYXPNx/ycWwmZC6 J9CNNJsqzH5vRs6XV++oJjkkLTB9QTNADFePjBaFggGv8zBhM87kbmyQswUqS1ipXOyd3P B4xwGb/VFYWYK0HPkqwUI5VwQW9PSY+cdVJpq1Mgm4ED0mrdeKUZXn1jmY0731UueIOUbL bg4LFhxbOHfFpEqsqY4ILVCW7wgW3wacQqW3iO01Ze8Gh9pYbJWQXx05E/cH8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFqSv6VgrzvSk; Tue, 1 Aug 2023 22:26:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371MQ7FM045565; Tue, 1 Aug 2023 22:26:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371MQ7Rh045564; Tue, 1 Aug 2023 22:26:07 GMT (envelope-from git) Date: Tue, 1 Aug 2023 22:26:07 GMT Message-Id: <202308012226.371MQ7Rh045564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 76b2e3907ced - main - cam xpt_*nounce_periph*: Various fixes for periphs without a protocol List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76b2e3907cede6456897d2f950911d45ae627d8b Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=76b2e3907cede6456897d2f950911d45ae627d8b commit 76b2e3907cede6456897d2f950911d45ae627d8b Author: John Baldwin AuthorDate: 2023-08-01 22:20:25 +0000 Commit: John Baldwin CommitDate: 2023-08-01 22:20:25 +0000 cam xpt_*nounce_periph*: Various fixes for periphs without a protocol If the periph doesn't have a valid protocol, these routines emit fallback messages. However, the fallback messages duplicated the periph name and unit number, and in the case of *denounce* included a spurious newline. Reviewed by: mav, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41177 --- sys/cam/cam_xpt.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index b85da5f30a3b..61d24c120841 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -1067,9 +1067,7 @@ xpt_announce_periph(struct cam_periph *periph, char *announce_string) if (proto) proto->ops->announce(path->device); else - printf("%s%d: Unknown protocol device %d\n", - periph->periph_name, periph->unit_number, - path->device->protocol); + printf("Unknown protocol device %d\n", path->device->protocol); if (path->device->serial_num_len > 0) { /* Don't wrap the screen - print only the first 60 chars */ printf("%s%d: Serial Number %.60s\n", periph->periph_name, @@ -1124,8 +1122,7 @@ xpt_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb, if (proto) proto->ops->announce_sbuf(path->device, sb); else - sbuf_printf(sb, "%s%d: Unknown protocol device %d\n", - periph->periph_name, periph->unit_number, + sbuf_printf(sb, "Unknown protocol device %d\n", path->device->protocol); if (path->device->serial_num_len > 0) { /* Don't wrap the screen - print only the first 60 chars */ @@ -1191,9 +1188,7 @@ xpt_denounce_periph(struct cam_periph *periph) if (proto) proto->ops->denounce(path->device); else - printf("%s%d: Unknown protocol device %d\n", - periph->periph_name, periph->unit_number, - path->device->protocol); + printf("Unknown protocol device %d", path->device->protocol); if (path->device->serial_num_len > 0) printf(" s/n %.60s", path->device->serial_num); printf(" detached\n"); @@ -1231,8 +1226,7 @@ xpt_denounce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) if (proto) proto->ops->denounce_sbuf(path->device, sb); else - sbuf_printf(sb, "%s%d: Unknown protocol device %d\n", - periph->periph_name, periph->unit_number, + sbuf_printf(sb, "Unknown protocol device %d", path->device->protocol); if (path->device->serial_num_len > 0) sbuf_printf(sb, " s/n %.60s", path->device->serial_num); From nobody Tue Aug 1 22:26:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqTQ1Tdhz4pwpL; Tue, 1 Aug 2023 22:26:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqSz2Szcz3hXY; Tue, 1 Aug 2023 22:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uglN0a4of9G9dUJOkv9w86BWxwd5ZSV75DYnon97YuQ=; b=o7mvuMn7uZARhTCXqzkslfrftAirGUPf1A0+n+0KG7UijQgF1VEcpZS2wbREtZ4ciPa0Vf ykERS70IiDFrlRnfRFKps4UzV/oDO7xQUPMwfRyKJjfr2Uhc20+E5Cj20lNbw3nDqqFeTm ccwOk4Pj5ml5BlUSacbXJBMKCTEEFfcNVpId+Plg3Emo272kUVIPBUQ+WJzG9d+oWQS3s7 ZZZtzB2dohxKOjLn5vHBPlwH5c7UJbgS7ezJlh75cw0l344nK01/hUuqeA48Y/GO1woDmD XUEuZ+wgNDA7SIegmJ5LrtKY2SD+WuPkoycD3Bl417fJdJDzYIQDtsZHRr1s/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690928771; a=rsa-sha256; cv=none; b=Fy0UVuLflev/1UasY5NO0/O9W3K/aW3K0yG5SgilcijAbaIAC7f0CNrD452erZpzw7HWOU y+xi7ZVt0ohiV1oMW7F3mNue5GYEMKhU4TXlupvEYevWPiBAGswiGUHXw+hFnLBY2nI/gm PN6EOuOkTNu6qsUu76xhJnvn4yDW/mHL+KDyGt6KN+WobD2faHu//vxSA902kqy7euBaE6 zLBKf/F4Dh4c1rEIGn1L958g1LXyiPqJWlImJ6gtAfIH3iuU+RkgYBTCGAT0XDY+GfwLsZ iGn2TC6P8B2/Q4dTHi3gZM1nnf6Y9d79c12KAnE7Rgo3pAuXEd6a/ZnXjo3Tbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uglN0a4of9G9dUJOkv9w86BWxwd5ZSV75DYnon97YuQ=; b=gbS4SaJEN5rk/G0Wp08WtV0WeQ0GJdCY1IG9CpXcjzP658xsMIOyRbTCWF3Y0HNP1iTwMI DFOOyr8gDUZ9PwoLLnEceDerNcnTY4ZwB9ymq1QazquNncK0q+/FooQysCwWJDB5psxkEC se84hpuIuOjTIbHE8W+LB542KqSF22gRe6Qm9pdqOfIfeIi2YNAayyKzwudvrUu+6IxHgi f6Vw/z3P0tX4QYrCJk1AGmxfQKyarGRjbR3+K93XQFLGW2bB1sEUFoAXcndEnZU59j7fU2 GTyDq/CJN6fNsP7WHnb6Lo9vp2vVcDGaWnOfOu1OH5AeaJgtwUiDWK+SJIYzIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFqSz1HjZzvd8; Tue, 1 Aug 2023 22:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371MQBKC045628; Tue, 1 Aug 2023 22:26:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371MQBu6045627; Tue, 1 Aug 2023 22:26:11 GMT (envelope-from git) Date: Tue, 1 Aug 2023 22:26:11 GMT Message-Id: <202308012226.371MQBu6045627@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b82711764cd9 - main - cam_xpt: Remove fallbacks for non-sbuf protocol methods List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b82711764cd90e008335dc59280f64820a32cc95 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b82711764cd90e008335dc59280f64820a32cc95 commit b82711764cd90e008335dc59280f64820a32cc95 Author: John Baldwin AuthorDate: 2023-08-01 22:24:10 +0000 Commit: John Baldwin CommitDate: 2023-08-01 22:24:10 +0000 cam_xpt: Remove fallbacks for non-sbuf protocol methods This includes removing the kern.cam.announce_nosbuf sysctl. Reviewed by: mav, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41262 --- sys/cam/cam_xpt.c | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 61d24c120841..e7248cf76d19 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -110,7 +110,6 @@ struct xpt_softc { TAILQ_HEAD(, ccb_hdr) ccb_scanq; int buses_to_config; int buses_config_done; - int announce_nosbuf; /* * Registered buses @@ -168,8 +167,6 @@ SYSCTL_INT(_kern_cam, OID_AUTO, boot_delay, CTLFLAG_RDTUN, &xsoftc.boot_delay, 0, "Bus registration wait time"); SYSCTL_UINT(_kern_cam, OID_AUTO, xpt_generation, CTLFLAG_RD, &xsoftc.xpt_generation, 0, "CAM peripheral generation count"); -SYSCTL_INT(_kern_cam, OID_AUTO, announce_nosbuf, CTLFLAG_RWTUN, - &xsoftc.announce_nosbuf, 0, "Don't use sbuf for announcements"); struct cam_doneq { struct mtx_padalign cam_doneq_mtx; @@ -1097,18 +1094,6 @@ xpt_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb, cam_periph_assert(periph, MA_OWNED); periph->flags |= CAM_PERIPH_ANNOUNCED; - /* Fall back to the non-sbuf method if necessary */ - if (xsoftc.announce_nosbuf != 0) { - xpt_announce_periph(periph, announce_string); - return; - } - proto = xpt_proto_find(path->device->protocol); - if (((proto != NULL) && (proto->ops->announce_sbuf == NULL)) || - (path->bus->xport->ops->announce_sbuf == NULL)) { - xpt_announce_periph(periph, announce_string); - return; - } - sbuf_printf(sb, "%s%d at %s%d bus %d scbus%d target %d lun %jx\n", periph->periph_name, periph->unit_number, path->bus->sim->sim_name, @@ -1118,7 +1103,7 @@ xpt_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb, path->target->target_id, (uintmax_t)path->device->lun_id); sbuf_printf(sb, "%s%d: ", periph->periph_name, periph->unit_number); - + proto = xpt_proto_find(path->device->protocol); if (proto) proto->ops->announce_sbuf(path->device, sb); else @@ -1157,11 +1142,6 @@ void xpt_announce_quirks_sbuf(struct cam_periph *periph, struct sbuf *sb, int quirks, char *bit_string) { - if (xsoftc.announce_nosbuf != 0) { - xpt_announce_quirks(periph, quirks, bit_string); - return; - } - if (quirks != 0) { sbuf_printf(sb, "%s%d: quirks=0x%b\n", periph->periph_name, periph->unit_number, quirks, bit_string); @@ -1202,17 +1182,6 @@ xpt_denounce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) cam_periph_assert(periph, MA_OWNED); - /* Fall back to the non-sbuf method if necessary */ - if (xsoftc.announce_nosbuf != 0) { - xpt_denounce_periph(periph); - return; - } - proto = xpt_proto_find(path->device->protocol); - if ((proto != NULL) && (proto->ops->denounce_sbuf == NULL)) { - xpt_denounce_periph(periph); - return; - } - sbuf_printf(sb, "%s%d at %s%d bus %d scbus%d target %d lun %jx\n", periph->periph_name, periph->unit_number, path->bus->sim->sim_name, @@ -1222,7 +1191,7 @@ xpt_denounce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) path->target->target_id, (uintmax_t)path->device->lun_id); sbuf_printf(sb, "%s%d: ", periph->periph_name, periph->unit_number); - + proto = xpt_proto_find(path->device->protocol); if (proto) proto->ops->denounce_sbuf(path->device, sb); else From nobody Tue Aug 1 22:26:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqTQ0sm8z4pwk6; Tue, 1 Aug 2023 22:26:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqSy2HFHz3hlq; Tue, 1 Aug 2023 22:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OLPTplebUJJuL+4W5XJUjkiRIXoYQ/3gbTpemUuRd8M=; b=VuGjFohkPfMH2fm7SxO3CdR3aGhDLYIiwKM0gvtvRdh7NCvwpaA+55HsQlK/aQwMFWdLti NrlHVX5JAf6syebHb3NkecXGlmuGvmmI31MG49/YE6XX9gq/AcSzOPEKIZ9oieh1OO8uuK 9VJzsQI8HaMG8F1tHpr8owBLCNby8yaHtAKMbY/q+Li9716NsGn8PJ5Fmv2oHIluyolyrH /cLDo4Q+DrNCzt7R6UvZEdrHSIbTLV3q3G8++lJu2k8CaQ5ssETXlEluKm8NJgVzV1bGd7 zzKD6O4T9rvrtZDLUp3XLladTzY43mV31nQl2hcPzJa2bXeXL2udSJTVmpoG8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690928770; a=rsa-sha256; cv=none; b=cZajWQVWo+1Hn5KwugLJShryNLKBCQMlnuKeekHBMNRKxVQs1zUVgZU6odoIBOg/U6it/a hhea9qWIoHoYvRtpF1n8O8PG0kiL+aK2U53l/CJ+aSPX2Q2W+iPA+1otT22GbW9RR4Ns7W EoCuET7LOLlx7AdqGDUja+DxTFDJ9et5wYzt/fv0TuVprEK3K71pWLvo8KDhp0Il/Qnijm MJxb7F1Wz47eaRvPw7zamJGnKqnejhy/W6aZEqpGHKm75byq/13a6PeI9l0v+InPZNUVwr H5sBPdhMRjy96rCUcxNHUlzJtkI7ITTGhc0zqNz9fYPd5Z8HdBo8x1aJQoHt4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OLPTplebUJJuL+4W5XJUjkiRIXoYQ/3gbTpemUuRd8M=; b=aUX2TWKvAnHPiWUBt25UfoY1uYANQDrQK0sUdKev/bVhscvAYi0vz0W4K26leBr8Nc3ZnV Hi1yXSe4oRsXNldd6ZQ6mTytN6s28WLPx4d67ycbZdPfhQzRc7ssXRohASQ6vUDLa39/d0 r83yo2HTjLs0aHGXkBkcdnnYPd2SCXCiSUD+A5AsBexBX+Sjzz1LOY1oWzzxqZQgxzbmuJ 6Xkz6HbjmNMy5/eaqwcmDgnNfS7rZ2zKgPU16vI5r6ow/WtUE8LjG2t7uW/aK+UWVkhiiB VgSgePIVX4QmZfatt1je4QpCZAkcye31kApUeOs8s9TAZ48okroSCAssB8hOug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFqSy18rbzvd7; Tue, 1 Aug 2023 22:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371MQAA9045604; Tue, 1 Aug 2023 22:26:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371MQAKg045603; Tue, 1 Aug 2023 22:26:10 GMT (envelope-from git) Date: Tue, 1 Aug 2023 22:26:10 GMT Message-Id: <202308012226.371MQAKg045603@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7eb538974c49 - main - cam mmc_xpt/nvme_xpt: Add _sbuf variants of {an,de}nounce xport and proto ops List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7eb538974c49857a590c79c91f1e4f1c107b5f7d Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7eb538974c49857a590c79c91f1e4f1c107b5f7d commit 7eb538974c49857a590c79c91f1e4f1c107b5f7d Author: John Baldwin AuthorDate: 2023-08-01 22:23:25 +0000 Commit: John Baldwin CommitDate: 2023-08-01 22:23:25 +0000 cam mmc_xpt/nvme_xpt: Add _sbuf variants of {an,de}nounce xport and proto ops Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41261 --- sys/cam/mmc/mmc_xpt.c | 42 ++++++++++++++++++++++++++++++++++++++++++ sys/cam/nvme/nvme_xpt.c | 42 +++++++++++++++++++++++++++++++++++------- 2 files changed, 77 insertions(+), 7 deletions(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 8fee7b4cad58..0930717b0a2a 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -74,6 +74,8 @@ static void mmc_dev_async(uint32_t async_code, struct cam_eb *bus, static void mmc_action(union ccb *start_ccb); static void mmc_dev_advinfo(union ccb *start_ccb); static void mmc_announce_periph(struct cam_periph *periph); +static void mmc_announce_periph_sbuf(struct cam_periph *periph, + struct sbuf *sb); static void mmc_scan_lun(struct cam_periph *periph, struct cam_path *path, cam_flags flags, union ccb *ccb); @@ -84,7 +86,9 @@ static void mmcprobe_cleanup(struct cam_periph *periph); static void mmcprobe_done(struct cam_periph *periph, union ccb *done_ccb); static void mmc_proto_announce(struct cam_ed *device); +static void mmc_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); static void mmc_proto_denounce(struct cam_ed *device); +static void mmc_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static void mmc_proto_debug_out(union ccb *ccb); typedef enum { @@ -148,6 +152,7 @@ static struct xpt_xport_ops mmc_xport_ops = { .action = mmc_action, .async = mmc_dev_async, .announce = mmc_announce_periph, + .announce_sbuf = mmc_announce_periph_sbuf, }; #define MMC_XPT_XPORT(x, X) \ @@ -162,7 +167,9 @@ MMC_XPT_XPORT(mmc, MMCSD); static struct xpt_proto_ops mmc_proto_ops = { .announce = mmc_proto_announce, + .announce_sbuf = mmc_proto_announce_sbuf, .denounce = mmc_proto_denounce, + .denounce_sbuf = mmc_proto_denounce_sbuf, .debug_out = mmc_proto_debug_out, }; @@ -399,6 +406,29 @@ mmc_announce_periph(struct cam_periph *periph) ("XPT info: CLK %04d, ...\n", cts.proto_specific.mmc.ios.clock)); } +static void +mmc_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) +{ + struct ccb_pathinq cpi; + struct ccb_trans_settings cts; + struct cam_path *path = periph->path; + + cam_periph_assert(periph, MA_OWNED); + + CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("mmc_announce_periph")); + + memset(&cts, 0, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + xpt_action((union ccb*)&cts); + if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) + return; + xpt_path_inq(&cpi, periph->path); + CAM_DEBUG(path, CAM_DEBUG_INFO, + ("XPT info: CLK %04d, ...\n", cts.proto_specific.mmc.ios.clock)); +} + void mmccam_start_discovery(struct cam_sim *sim) { @@ -480,6 +510,12 @@ mmc_proto_announce(struct cam_ed *device) sbuf_putbuf(&sb); } +static void +mmc_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) +{ + mmc_print_ident(&device->mmc_ident_data, sb); +} + static void mmc_proto_denounce(struct cam_ed *device) { @@ -487,6 +523,12 @@ mmc_proto_denounce(struct cam_ed *device) mmc_proto_announce(device); } +static void +mmc_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) +{ + mmc_proto_announce_sbuf(device, sb); +} + static void mmc_proto_debug_out(union ccb *ccb) { diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c index 0662f476536c..d2968d1019d1 100644 --- a/sys/cam/nvme/nvme_xpt.c +++ b/sys/cam/nvme/nvme_xpt.c @@ -157,8 +157,14 @@ static void nvme_dev_async(uint32_t async_code, void *async_arg); static void nvme_action(union ccb *start_ccb); static void nvme_announce_periph(struct cam_periph *periph); +static void nvme_announce_periph_sbuf(struct cam_periph *periph, + struct sbuf *sb); static void nvme_proto_announce(struct cam_ed *device); +static void nvme_proto_announce_sbuf(struct cam_ed *device, + struct sbuf *sb); static void nvme_proto_denounce(struct cam_ed *device); +static void nvme_proto_denounce_sbuf(struct cam_ed *device, + struct sbuf *sb); static void nvme_proto_debug_out(union ccb *ccb); static struct xpt_xport_ops nvme_xport_ops = { @@ -166,6 +172,7 @@ static struct xpt_xport_ops nvme_xport_ops = { .action = nvme_action, .async = nvme_dev_async, .announce = nvme_announce_periph, + .announce_sbuf = nvme_announce_periph_sbuf, }; #define NVME_XPT_XPORT(x, X) \ static struct xpt_xport nvme_xport_ ## x = { \ @@ -181,7 +188,9 @@ NVME_XPT_XPORT(nvme, NVME); static struct xpt_proto_ops nvme_proto_ops = { .announce = nvme_proto_announce, + .announce_sbuf = nvme_proto_announce_sbuf, .denounce = nvme_proto_denounce, + .denounce_sbuf = nvme_proto_denounce_sbuf, .debug_out = nvme_proto_debug_out, }; static struct xpt_proto nvme_proto = { @@ -783,14 +792,12 @@ nvme_dev_async(uint32_t async_code, struct cam_eb *bus, struct cam_et *target, } static void -nvme_announce_periph(struct cam_periph *periph) +nvme_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) { struct ccb_pathinq cpi; struct ccb_trans_settings cts; struct cam_path *path = periph->path; struct ccb_trans_settings_nvme *nvmex; - struct sbuf sb; - char buffer[120]; cam_periph_assert(periph, MA_OWNED); @@ -805,20 +812,29 @@ nvme_announce_periph(struct cam_periph *periph) /* Ask the SIM for its base transfer speed */ xpt_path_inq(&cpi, periph->path); - sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); - sbuf_printf(&sb, "%s%d: nvme version %d.%d", + sbuf_printf(sb, "%s%d: nvme version %d.%d", periph->periph_name, periph->unit_number, NVME_MAJOR(cts.protocol_version), NVME_MINOR(cts.protocol_version)); if (cts.transport == XPORT_NVME) { nvmex = &cts.proto_specific.nvme; if (nvmex->valid & CTS_NVME_VALID_LINK) - sbuf_printf(&sb, + sbuf_printf(sb, " x%d (max x%d) lanes PCIe Gen%d (max Gen%d) link", nvmex->lanes, nvmex->max_lanes, nvmex->speed, nvmex->max_speed); } - sbuf_printf(&sb, "\n"); + sbuf_printf(sb, "\n"); +} + +static void +nvme_announce_periph(struct cam_periph *periph) +{ + struct sbuf sb; + char buffer[120]; + + sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); + nvme_announce_periph_sbuf(periph, &sb); sbuf_finish(&sb); sbuf_putbuf(&sb); } @@ -835,6 +851,12 @@ nvme_proto_announce(struct cam_ed *device) sbuf_putbuf(&sb); } +static void +nvme_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) +{ + nvme_print_ident(device->nvme_cdata, device->nvme_data, sb); +} + static void nvme_proto_denounce(struct cam_ed *device) { @@ -847,6 +869,12 @@ nvme_proto_denounce(struct cam_ed *device) sbuf_putbuf(&sb); } +static void +nvme_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) +{ + nvme_print_ident_short(device->nvme_cdata, device->nvme_data, sb); +} + static void nvme_proto_debug_out(union ccb *ccb) { From nobody Tue Aug 1 22:39:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqmm6ryHz4pxT2; Tue, 1 Aug 2023 22:39:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqmZ30KCz3jPD; Tue, 1 Aug 2023 22:39:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690929582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lhO0/TInffEeaPU6eAJUgRV/b9o2M7YwrG/E/arE5EQ=; b=CK6H2EHEIGqGqgd6feit064EVnOAcbwgCyEAqKAisynWaSl9pa8l/NbKKEJjfxGYSU0adG 14HZm9/kTmyzGclIVisY64L0FUAXJOYC1BjUik6RN9ObcHCkbTKhqPXalAFA/xsleNZ19F YLcYlZxyi2wbn6491SiCCggVvYqYOUOVf40p4I6FsHqctZmmxhcQeDZIP+rNGknenX5kds H1g0/cwSkVVDg2sU6lw6PpNYxzxaspmvkPVM/L09CpIPzDdqltBkju0txDRn1KMdlSeg43 tDtUJuJt8vSbqXciV9nZNqptj05cw4xcLKw+4ux70Sv918FeZKVOsuK76je5Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690929582; a=rsa-sha256; cv=none; b=GZIhjGwFbhEi4qowHEj/qBava+RCv+ttBhjBcC+VMBBC/FsWYnefkpaCsoOcZpmjQiOzIt mvnGoKXkZ076PXqpRra2RH2a9+skkAG89E0fs3ii7RkoO7tbgsAohQ+Aewfy96YZqY7RAR qTkTn5ZuC7+Dyy0T3BMdPZVKKkt84ghYSETCoEMH4NzH+aVyu1LBRUcSRjXqoOg0qUMLS1 FMblUKAaebkjP64HaByZwkd+8dPdcxS8HjYlp+yaq/rBaCEbzqZ+P/Eiy24BaIsJp01/rF /Q3au9RBcbqxPUHcoWVxX6+umpadLrfuc8YaMcGrqIrM8Y1Ra2fh61ThJuidNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690929582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lhO0/TInffEeaPU6eAJUgRV/b9o2M7YwrG/E/arE5EQ=; b=Ov4pTvau0+Ult/Hsl8jQvUt4tOurgPFr0Ks/QFiqnLBxHVac28qU+AejqaCRrNsScxhW8P JL/jZEJ4NkKHfDNKP1Kl0h8FBFIPiV7YA7aQqsZnxLVieWlCLx0Aukatlro7ysSWB218OO ZCOZcjtjP79vulEcqdYK85IDPAzZIW5nQSB9fHaR/ww6Z53Cfwh1qdu6arlVIUtqfZZ537 phmv59gFFfP6YuvxwvchgKU4MIIUtWstHhQRc61NedGvuRuKvxKLerwTRphjttJMuwNAK/ 2vEUD5BA9uGWkthe6Z45M47l7ZzshLgkfBe0EtVNxA/rKsKLssa/juEkdmTFJA== Received: from [IPV6:2601:648:8680:16b0:b0ff:f16f:f461:fc58] (unknown [IPv6:2601:648:8680:16b0:b0ff:f16f:f461:fc58]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RFqmY2DmtzyBD; Tue, 1 Aug 2023 22:39:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <3b8ad00b-0075-889e-2842-73f09426926b@FreeBSD.org> Date: Tue, 1 Aug 2023 15:39:38 -0700 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: git: c65679143f82 - main - arm64: Decode the ID_AA64MMFR3_EL1 register Content-Language: en-US To: Andrew Turner , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202307281208.36SC85hG062153@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202307281208.36SC85hG062153@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/28/23 5:08 AM, Andrew Turner wrote: > The branch main has been updated by andrew: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c65679143f82e28b3aa078f16311350c31a33776 > > commit c65679143f82e28b3aa078f16311350c31a33776 > Author: Andrew Turner > AuthorDate: 2023-07-06 13:28:23 +0000 > Commit: Andrew Turner > CommitDate: 2023-07-28 11:53:02 +0000 > > arm64: Decode the ID_AA64MMFR3_EL1 register > > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D40893 This (and some following commits) broke the aarch64 build jobs on GitHub. I wonder if these registers are unknown by clang versions older than LLVM16 or LLVM15? The cross-build jobs use clang 12/13/14. The errors: bmake[2]: "/home/runner/work/freebsd-src/build/home/runner/work/freebsd-src/freebsd-src/arm64.aarch64/sys/GENERIC/Makefile" line 47: warning: "Compiler is too old to support PERTHREAD_SSP" /home/runner/work/freebsd-src/freebsd-src/sys/arm64/arm64/identcpu.c:2707:23: error: expected readable system register desc->id_aa64mmfr3 = READ_SPECIALREG(id_aa64mmfr3_el1); ^ ./machine/armreg.h:74:19: note: expanded from macro 'READ_SPECIALREG' __asm __volatile("mrs %0, " __STRING(reg) : "=&r" (_val)); \ ^ :1:10: note: instantiated into assembly here mrs x9, id_aa64mmfr3_el1 ^ /home/runner/work/freebsd-src/freebsd-src/sys/arm64/arm64/identcpu.c:2708:23: error: expected readable system register desc->id_aa64mmfr4 = READ_SPECIALREG(id_aa64mmfr4_el1); ^ ./machine/armreg.h:74:19: note: expanded from macro 'READ_SPECIALREG' __asm __volatile("mrs %0, " __STRING(reg) : "=&r" (_val)); \ ^ :1:10: note: instantiated into assembly here mrs x9, id_aa64mmfr4_el1 ^ /home/runner/work/freebsd-src/freebsd-src/sys/arm64/arm64/identcpu.c:2711:22: error: expected readable system register desc->id_aa64pfr2 = READ_SPECIALREG(id_aa64pfr2_el1); ^ ./machine/armreg.h:74:19: note: expanded from macro 'READ_SPECIALREG' __asm __volatile("mrs %0, " __STRING(reg) : "=&r" (_val)); \ ^ :1:10: note: instantiated into assembly here mrs x9, id_aa64pfr2_el1 ^ 3 errors generated. --- identcpu.o --- *** [identcpu.o] Error code 1 bmake[2]: stopped in /home/runner/work/freebsd-src/build/home/runner/work/freebsd-src/freebsd-src/arm64.aarch64/sys/GENERIC 1 error -- John Baldwin From nobody Tue Aug 1 22:48:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqyk50f6z4pxqk for ; Tue, 1 Aug 2023 22:48:27 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqyc30r8z3jcc for ; Tue, 1 Aug 2023 22:48:24 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.47 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-3fbc5d5742eso66883015e9.3 for ; Tue, 01 Aug 2023 15:48:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690930102; x=1691534902; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O87qDr4BOHaUCvs6tiN31l9JVtOjW9QsXANUttWZm58=; b=S1cDSs50yI8l9aS9pCRVjtaCAvDM8TJNEr34vuDxInz86s4Q3B6q7Er8z9Vsq08zCy ZA2Uys2o/wBxo7Lcvhe666QCsErkiM5hUoqJ9nu7aPUm2qkeNvBdttOlOwPM3LTRIPWa Reoqi/qdZ9F52LyP5tHUghCtegKQwzr7RLWX4w4ydPCAqhKBzBl6QyRhNZRkxke4Enh6 vdjqlLfEJRrN1NA2LXSf8gNxzbReNi+swjvVJqnbsWuHQ0phQhWNdIdJHP8DHoNuPDJf Qoq6dPXTW8P52uDTFcE4xl37W6SDN+C8LgtI5knxVPV3Jo0x4RI6vNOaB9RlTLTMY6Wy JOVw== X-Gm-Message-State: ABy/qLZCsM7S87KndFhv5xFIIKl/JhjgBROZaY9N+5hMoHkAKbYT+r3h 5vJuF7dfmhV/UGbiAY4CruTuYQ== X-Google-Smtp-Source: APBJJlGRtv3ta1uwy8uqcbgdoobqvi36PoGfxGFgfUZ566gU/MEhr7WZ4BTvHx3j6kKzt1VdqMQOug== X-Received: by 2002:a7b:cbd4:0:b0:3fe:1232:93fa with SMTP id n20-20020a7bcbd4000000b003fe123293famr3710944wmi.22.1690930102399; Tue, 01 Aug 2023 15:48:22 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id s4-20020a05600c044400b003fe24681b10sm104320wmb.28.2023.08.01.15.48.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Aug 2023 15:48:22 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: c65679143f82 - main - arm64: Decode the ID_AA64MMFR3_EL1 register From: Jessica Clarke In-Reply-To: <202307281208.36SC85hG062153@gitrepo.freebsd.org> Date: Tue, 1 Aug 2023 23:48:11 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202307281208.36SC85hG062153@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.47:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.47:from] X-Rspamd-Queue-Id: 4RFqyc30r8z3jcc X-Spamd-Bar: -- On 28 Jul 2023, at 13:08, Andrew Turner wrote: >=20 > The branch main has been updated by andrew: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc65679143f82e28b3aa078f16311350c= 31a33776 >=20 > commit c65679143f82e28b3aa078f16311350c31a33776 > Author: Andrew Turner > AuthorDate: 2023-07-06 13:28:23 +0000 > Commit: Andrew Turner > CommitDate: 2023-07-28 11:53:02 +0000 >=20 > arm64: Decode the ID_AA64MMFR3_EL1 register >=20 > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D40893 > --- > sys/arm64/arm64/identcpu.c | 39 = +++++++++++++++++++++++++++++++++++++++ > sys/arm64/include/armreg.h | 28 ++++++++++++++++++++++++++++ > 2 files changed, 67 insertions(+) >=20 > diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c > index 7117e48ee061..047bb07dc337 100644 > --- a/sys/arm64/arm64/identcpu.c > +++ b/sys/arm64/arm64/identcpu.c > @@ -139,6 +139,7 @@ struct cpu_desc { > uint64_t id_aa64mmfr0; > uint64_t id_aa64mmfr1; > uint64_t id_aa64mmfr2; > + uint64_t id_aa64mmfr3; > uint64_t id_aa64pfr0; > uint64_t id_aa64pfr1; > uint64_t id_aa64zfr0; > @@ -1265,6 +1266,37 @@ static const struct mrs_field = id_aa64mmfr2_fields[] =3D { > }; >=20 >=20 > +/* ID_AA64MMFR2_EL1 */ You have a copy/paste error here. Jess From nobody Tue Aug 1 22:48:55 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqzX6FgVz4pxsf for ; Tue, 1 Aug 2023 22:49:09 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqzS00tZz3k27 for ; Tue, 1 Aug 2023 22:49:07 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-3fbc1218262so65647875e9.3 for ; Tue, 01 Aug 2023 15:49:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690930146; x=1691534946; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DcRZHV797KlToontmaS9zzp/zgQzwYOBdKgwyh83oS8=; b=ByY+xu2NRFUtUuspnsJIpfI+PBe1FzC3Wm/5fuR9H21PuL1I8OftBGVg1H7u5eXXkJ s6MyU8ITnnvz9KkM5umG3yaQCpEUB5LtIaG+JkvLxhsV3zxc4hUzgfV1dBZ0en3HJhAs Q1x2Sa/W2ZaHrdUTegwoNawg+6GLyvWGNdN+mfhdSdtbp2ctgiSdCDX82Nc9FoANhRQI i7GyaEgtDc9GnFakAlensXjuzsUxa0zBSbZJFkGDWcpE2tHIGKq+bsN/IJKAgJLmqGzz 4jP3Zgh7feE8hhJ5Fq/oL1xDRGU7kLQY3uUOGJjACSErF6UMQWyLoyXlXX9JQlNrFKGI HmiQ== X-Gm-Message-State: ABy/qLbSxCG5m6bYSrjL5unDLdoH/IPjPIakOLmo8E2B4f99fp7n7JfR Vrn8nZDh9GVJBkIUtLDeCW5TEsTqXjTHUTx6EZk= X-Google-Smtp-Source: APBJJlFnHf31B7GeOspasGpJzj5ZWgP68CfBPGx8jjFbIpg4Flw9H6D94dXHneKSclwXNnJy67HEQA== X-Received: by 2002:a1c:f211:0:b0:3f4:d18f:b2fb with SMTP id s17-20020a1cf211000000b003f4d18fb2fbmr3533622wmc.8.1690930146231; Tue, 01 Aug 2023 15:49:06 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id s4-20020a05600c044400b003fe24681b10sm104320wmb.28.2023.08.01.15.49.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Aug 2023 15:49:05 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: c65679143f82 - main - arm64: Decode the ID_AA64MMFR3_EL1 register From: Jessica Clarke In-Reply-To: <3b8ad00b-0075-889e-2842-73f09426926b@FreeBSD.org> Date: Tue, 1 Aug 2023 23:48:55 +0100 Cc: Andrew Turner , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202307281208.36SC85hG062153@gitrepo.freebsd.org> <3b8ad00b-0075-889e-2842-73f09426926b@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4RFqzS00tZz3k27 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 1 Aug 2023, at 23:39, John Baldwin wrote: >=20 > On 7/28/23 5:08 AM, Andrew Turner wrote: >> The branch main has been updated by andrew: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc65679143f82e28b3aa078f16311350c= 31a33776 >> commit c65679143f82e28b3aa078f16311350c31a33776 >> Author: Andrew Turner >> AuthorDate: 2023-07-06 13:28:23 +0000 >> Commit: Andrew Turner >> CommitDate: 2023-07-28 11:53:02 +0000 >> arm64: Decode the ID_AA64MMFR3_EL1 register >> Sponsored by: Arm Ltd >> Differential Revision: https://reviews.freebsd.org/D40893 >=20 > This (and some following commits) broke the aarch64 build jobs on = GitHub. > I wonder if these registers are unknown by clang versions older than = LLVM16 > or LLVM15? The cross-build jobs use clang 12/13/14. 16 for these: = https://github.com/llvm/llvm-project/commit/2050e7ebe18cc4cf906d9b54d17ee8= 85cd868327 Jess From nobody Tue Aug 1 23:15:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFrZL0CV7z4q0F3; Tue, 1 Aug 2023 23:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFrZ94dmwz3lRy; Tue, 1 Aug 2023 23:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690931745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b56zOBRX6ygkYAYAglgauIyyHymFEN6sHpBWhBP6Dg0=; b=xaiDzHmO2HT5zb5QoruUGFBK1xHSibW+glf4kulxEWnazXN+LcLxcFnLjCprWve30QT28W NVgGm6z8kMorxcbTC7iK82PPeqleaoQEy0+8XCIl20Oi23h9eFnoZpJtTpteJHvlWVR76N +XCxrRXt00O40CQGsPy2YQhAU7A6X3mGjwsu1hbQQ043Efx2toZN7BFibqNuY9k8bR5ERZ bnZ2t+NbqdacruwLWXW52zihm7NNlO5m/huxzM4yostii3LphMDmlpDxyETnVx6sGq1VpU VAJ82anUF/7/XLPiNGwZeW76KV9Z9Egp+cWc5wergys4+R3WIFcpoiC5sna8AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690931745; a=rsa-sha256; cv=none; b=fOa26wNSUg3u8wH3GLjc3WQ7mRzGCSmRMpAEpESGDQQwgU0Ms3ndaxioOaIzwN3dNjtwXC JrEadXJMZ586Aw2M6/mCuVE3FzUYoRfAPDnSqnbk77TOtEmZvLGu48kJs6ltnl1dwYttO/ yTtJW5h+kn8dl0Ei8pRQZXyCJZrjCHawtSFz8cgTa3WZjMPNgKrV7d7OcMAJRNtRVJXsiE kF/rMneZLmmAKchJ5L+mgh7rphe+YOlKy3gSUK/5UIJkYpapUuC+3ZltbGlMezE9NvvYXU JZkCshBqxSXFgdsjfC32uGdXxzCX4m3XJqFenBPojs1N07gsnR3dx1G4NvJDzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690931745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b56zOBRX6ygkYAYAglgauIyyHymFEN6sHpBWhBP6Dg0=; b=cvwn2HacGKRL8bN3m5gu56eGvc3pWYJT5Qx1k1XqeEabD39N68m8grgnFPabw94hDsa6T+ Dfe71AW34jSBc4laKC1FO73TXHDQfogfVWugftCobBV7KT72y7KbVkKCJ5wlMph6fcwqkh FjKerV2pIDvkL3tAOEXl2QOnaplxFxvS9c25BBQpu1xtBMs3aU5BzmmXqrGm7bi6CUVXPr gAlXwe85tzyu2LzB8xNUNNOXDUK6K1VBI30OhrfxaWT67PEOWILcd/4BuL+wRtjjS5Z3Cu Lvmd1jmia6t8/GSnif0x0qI/zvXQmYtMvXOeJOQeqve9+8/sjI76yCCZDqFUww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFrZ85DTwzwRS; Tue, 1 Aug 2023 23:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371NFifi029022; Tue, 1 Aug 2023 23:15:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371NFiTV029021; Tue, 1 Aug 2023 23:15:44 GMT (envelope-from git) Date: Tue, 1 Aug 2023 23:15:44 GMT Message-Id: <202308012315.371NFiTV029021@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 83453b46e8c2 - main - mmc_xpt: Update function name in debug trace List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83453b46e8c2cec2d22a7eef029020d353be6007 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=83453b46e8c2cec2d22a7eef029020d353be6007 commit 83453b46e8c2cec2d22a7eef029020d353be6007 Author: John Baldwin AuthorDate: 2023-08-01 23:14:58 +0000 Commit: John Baldwin CommitDate: 2023-08-01 23:14:58 +0000 mmc_xpt: Update function name in debug trace Reported by: mav Fixes: 7eb538974c49 cam mmc_xpt/nvme_xpt: Add _sbuf variants of {an,de}nounce xport and proto ops --- sys/cam/mmc/mmc_xpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 406b91df2e35..fec4981a7734 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -386,7 +386,7 @@ mmc_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) cam_periph_assert(periph, MA_OWNED); - CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("mmc_announce_periph")); + CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("mmc_announce_periph_sbuf")); memset(&cts, 0, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); From nobody Tue Aug 1 23:46:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFsFW18J2z4q1Vy; Tue, 1 Aug 2023 23:46:21 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFsFR04GFz3mhR; Tue, 1 Aug 2023 23:46:18 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; none Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 6B0623200583; Tue, 1 Aug 2023 19:46:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 01 Aug 2023 19:46:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1690933576; x=1691019976; bh=s4bqXjZlX/CGH+CjEW1j4JwKn0A4LpD/5Qa ApqXWE0U=; b=soenB0fYHQhUCMZ5jD9alrfMMVf5vs/uXhX8c6dsN4VXoHhRNz4 074Z5DCXJ2jtBezSZ3lmDpwwXA0QHoICZI7M51AZLlEldTW7DS+aiMbGFQ8+txzq PObrYHvWud8E6qdqcurPEblTrcEvkyhQvrR9icoNi43TTSQuI/nOvXVRMIGDLOjY xNkxTsCi/xYkl2wtLYnBLeRvN28bMvxkIlBvkpIKHSzj5v7UDJMxUkcJLRvh/U9e pFpVoF3cZP6MD1SzixmWwAoBaKK70jqjIZ6Av2UaeNI++c2E0q3TcBDS7Oew9C8Z y3thBbAECdz46aL5gvKt/WyBKicSoiXzrqg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1690933576; x= 1691019976; bh=s4bqXjZlX/CGH+CjEW1j4JwKn0A4LpD/5QaApqXWE0U=; b=Q vCOV1Oes0nruC7PQY557w633wbQRtj/TFbgR2jT0wkm8vYZqIHQDCIzWZfiBnIbF lINsdCajz0YAuuCjUq2EkmZM84EU5mZ8Xg6PoVlOOS0l96RuykQGBeHETHV2XqtK ydx797t9S6Ykp05gkFWHnYineTqGVJARMN2RYSQlBjke3yRPuUv6VvdMV1DhEJnu crP/ySkk0D6Rm4LbAL32QQLUn1/JLKp9CIlq8Ar1fUzCa8gQPJRjvQf6YCHHyUDv zzheBubNlxY/SM7/UKmjN60x9poWw2p699ccVu9LRw7cSiUZqh9KG08tSiZDsF5f mYGpxxSWQTI5wWHfEaBgA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrjeejgddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpegjuhhrihcu oeihuhhrihesrggvthgvrhhnrdhorhhgqeenucggtffrrghtthgvrhhnpefhgeehjeeivd fgfeettdehvdeihfevffffudfgleeuhefhlefggfefjeefudehhfenucffohhmrghinhep fhhrvggvsghsugdrohhrghdpohhpthhsrdhmkhenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrihesrggvthgvrhhnrdhorhhg X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 1 Aug 2023 19:46:15 -0400 (EDT) Message-ID: Date: Wed, 2 Aug 2023 01:46:13 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 5cdaac92e119 - main - dtrace: Revert the addition of WITH_DTRACE_ASAN Content-Language: en-US To: Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202308011703.371H3V7a012823@gitrepo.freebsd.org> From: Yuri In-Reply-To: <202308011703.371H3V7a012823@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4RFsFR04GFz3mhR X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5cdaac92e119d41063d4f0155a78a4abe767f15e > > commit 5cdaac92e119d41063d4f0155a78a4abe767f15e > Author: Mark Johnston > AuthorDate: 2023-08-01 17:01:37 +0000 > Commit: Mark Johnston > CommitDate: 2023-08-01 17:03:10 +0000 > > dtrace: Revert the addition of WITH_DTRACE_ASAN > > The follow-up fix triggers a lib32 build failure, revert everything > until the problem is addressed. > --- > cddl/lib/libdtrace/Makefile | 11 ----------- > cddl/usr.sbin/dtrace/Makefile | 5 ----- > cddl/usr.sbin/lockstat/Makefile | 7 ------- > cddl/usr.sbin/plockstat/Makefile | 7 ------- > share/man/man5/src.conf.5 | 5 ----- > share/mk/src.opts.mk | 1 - > tools/build/options/WITH_DTRACE_ASAN | 4 ---- > 7 files changed, 40 deletions(-) I wonder if we should add the ObsoleteFiles entry removing that unfortunate /usr/lib/libdtrace.so.5? From nobody Wed Aug 2 02:07:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFwNG4g8Yz4q6qH; Wed, 2 Aug 2023 02:07:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFwNG3BbLz3vZt; Wed, 2 Aug 2023 02:07:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690942046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6UpDGn0PIA2ZrLImg7KpFNU7f4KJzfTZWBKSYU+ZU0A=; b=y0utPpGsRzDlh+gBtGvLs0Kcy4QQGQgXOqXR5Z6zCqJZGK7sZohGtw2/w3fTTPOojWqajj lCQCqlmTIlT3B64WAmHpLeCfjwBxt7FoMFd68eoOQVIpKTEbEDmYzI2uSsVKC6/RpEks1R yYz2wMlWYqWfD5CAj/bhKPLY6wIKIFyIBsZSEG2bd8K+QqVrtJmUEZPZRw4/5BliIi+go1 UmXcrdfwpzdsxVzcJbrl8WNYEWIoQIp6IjFzdu+fbJGgTKcD+nQ691RFgL5+8IUujVUJ/C JCU7po4G1PE6Ub26yBZ3g6RfrW2myMHBhuIMUgpYriFV1Ktg51C1IBUy4DVWQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690942046; a=rsa-sha256; cv=none; b=AN6nWO99tPlKcOqQV0EiKB/ww1zoczFIrFbpKLPDolaZntFxg/SGsi4w4eXe8XfQRvSMmD jNjKnX2InmahwV19b5YLEsZoS2NMTAua5Q8WZn1CJm3J85AID2IO/OJIIskjjhCePUFq4s 83+jt74bbcaL61+uXk10DblK7Rnt4ZvDfFRzIm0W1ZhfyXMJJ+nm7Y3d+7TqqJcFsMuZPP VkHUZaoUnm7Ko6JIyGX1VpptzhwVolsl4jyyiYzbGKj5j3bAHYIG+Z6PECV+N8t57i6Ik9 GpQQdY2AZui8YXS4RsoPhfKACRqfwtM46YL8YqCW2RM+LHfhjzIBSjfSyu+Ihg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690942046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6UpDGn0PIA2ZrLImg7KpFNU7f4KJzfTZWBKSYU+ZU0A=; b=mWdjzkxHlijws7v8ccbQor1bZveaik3/5XbNfX05U2MRr1vqN99D51nPDso9zGqUaj6yl1 A+I0gg1K0O3IvQd2kVj8KkUeNJ9eRj4G4tQsmaeR2frauxL9Sl9xi6yIy2x/wZLlvlCpDW h64S/dDMwbxUuAuPtDMxe0hQeKC2Fia494dhvr8T81s5AUvw1We4ZA7OOnNiI4fzBjTG00 SwSy45WVPf3DCVc+uru/1UYbnqOyVBLmnjk+yROBlZy6coKxd25KmqLGoEFO5qBpuZ+oVO aA1LgdnbJGCWQAEJJl1jdMlvAyGvGfyUP41cOVHuk2QEUmaxsgmbfCIxi7tMYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFwNF6pNHz11sn; Wed, 2 Aug 2023 02:07:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37227O9T009824; Wed, 2 Aug 2023 02:07:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37227OFQ009823; Wed, 2 Aug 2023 02:07:24 GMT (envelope-from git) Date: Wed, 2 Aug 2023 02:07:24 GMT Message-Id: <202308020207.37227OFQ009823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 77f6be448408 - main - retire SHARED_TOOLCHAIN knob List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77f6be448408eda1a31b1c98576e6c6bebf6ea6e Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=77f6be448408eda1a31b1c98576e6c6bebf6ea6e commit 77f6be448408eda1a31b1c98576e6c6bebf6ea6e Author: Ed Maste AuthorDate: 2023-08-01 12:48:02 +0000 Commit: Ed Maste CommitDate: 2023-08-02 00:13:22 +0000 retire SHARED_TOOLCHAIN knob Toolchain components were historically statically linked. They became normal dynamically linked executables in commit 6ab18ea64d19. There is no need to keep a special case build option for the toolchain; users who want statically linked toolchain (or any other) components can use the existing NO_SHARED knob. Reviewed by: dim, sjg Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41266 --- share/man/man5/src.conf.5 | 6 ------ share/mk/local.sys.dirdeps.mk | 3 --- share/mk/src.opts.mk | 1 - tools/build/options/WITHOUT_SHARED_TOOLCHAIN | 6 ------ tools/build/options/WITH_SHARED_TOOLCHAIN | 6 ------ usr.bin/ar/Makefile | 3 --- usr.bin/bmake/Makefile.inc | 4 ---- usr.bin/clang/clang/Makefile | 5 ----- usr.bin/clang/lld/Makefile | 4 ---- 9 files changed, 38 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 4554735207c8..3eeb3440e986 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1532,12 +1532,6 @@ as a set-user-ID root program. Do not build the .Bx 4.4 legacy docs. -.It Va WITHOUT_SHARED_TOOLCHAIN -Build the toolchain binaries as statically linked executables. -The set includes -.Xr cc 1 , -.Xr make 1 -and necessary utilities like assembler, linker and library archive manager. .It Va WITH_SORT_THREADS Enable threads in .Xr sort 1 . diff --git a/share/mk/local.sys.dirdeps.mk b/share/mk/local.sys.dirdeps.mk index 00030cb247bb..f06b4a33f1f7 100644 --- a/share/mk/local.sys.dirdeps.mk +++ b/share/mk/local.sys.dirdeps.mk @@ -64,9 +64,6 @@ WITH_META_STATS= t .endif # toolchains can be a pain - especially bootstrappping them -.if ${MACHINE} == "host" -MK_SHARED_TOOLCHAIN= no -.endif TOOLCHAIN_VARS= AS AR CC CLANG_TBLGEN CXX CPP LD NM OBJCOPY RANLIB \ STRINGS SIZE LLVM_TBLGEN _toolchain_bin_CLANG_TBLGEN= /usr/bin/clang-tblgen diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 899d620fb0c1..bed2b718654d 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -168,7 +168,6 @@ __DEFAULT_YES_OPTIONS = \ SENDMAIL \ SERVICESDB \ SETUID_LOGIN \ - SHARED_TOOLCHAIN \ SHAREDOCS \ SOURCELESS \ SOURCELESS_HOST \ diff --git a/tools/build/options/WITHOUT_SHARED_TOOLCHAIN b/tools/build/options/WITHOUT_SHARED_TOOLCHAIN deleted file mode 100644 index 86e309028c21..000000000000 --- a/tools/build/options/WITHOUT_SHARED_TOOLCHAIN +++ /dev/null @@ -1,6 +0,0 @@ -.\" $FreeBSD$ -Build the toolchain binaries as statically linked executables. -The set includes -.Xr cc 1 , -.Xr make 1 -and necessary utilities like assembler, linker and library archive manager. diff --git a/tools/build/options/WITH_SHARED_TOOLCHAIN b/tools/build/options/WITH_SHARED_TOOLCHAIN deleted file mode 100644 index 12956c3ff933..000000000000 --- a/tools/build/options/WITH_SHARED_TOOLCHAIN +++ /dev/null @@ -1,6 +0,0 @@ -.\" $FreeBSD$ -Build the toolchain binaries as dynamically linked executables. -The set includes -.Xr cc 1 , -.Xr make 1 -and necessary utilities like assembler, linker and library archive manager. diff --git a/usr.bin/ar/Makefile b/usr.bin/ar/Makefile index 7a6601a7d043..17b78191794a 100644 --- a/usr.bin/ar/Makefile +++ b/usr.bin/ar/Makefile @@ -11,9 +11,6 @@ NO_WMISSING_VARIABLE_DECLARATIONS= CFLAGS+=-I. -I${.CURDIR} -.if ${MK_SHARED_TOOLCHAIN} == "no" -NO_SHARED?= yes -.endif LINKS= ${BINDIR}/ar ${BINDIR}/ranlib MLINKS= ar.1 ranlib.1 diff --git a/usr.bin/bmake/Makefile.inc b/usr.bin/bmake/Makefile.inc index 22799321f69e..e6ffa4d6f756 100644 --- a/usr.bin/bmake/Makefile.inc +++ b/usr.bin/bmake/Makefile.inc @@ -18,10 +18,6 @@ MLINKS= ${MAN} b${MAN} .endif .endif -.if !defined(MK_SHARED_TOOLCHAIN) || ${MK_SHARED_TOOLCHAIN} == "no" -NO_SHARED?= YES -.endif - # hack to not add tests to tests subdir since this is included from # there and to avoid renaming things that require changes to generated # files. diff --git a/usr.bin/clang/clang/Makefile b/usr.bin/clang/clang/Makefile index 4b1e3735939a..97e6e1fb6996 100644 --- a/usr.bin/clang/clang/Makefile +++ b/usr.bin/clang/clang/Makefile @@ -12,11 +12,6 @@ SRCS+= driver.cpp CFLAGS.driver.cpp+= -Dclang_main=main -.if ${MK_SHARED_TOOLCHAIN} == "no" -NO_SHARED?= yes - -.endif - LINKS= ${BINDIR}/clang ${BINDIR}/clang++ \ ${BINDIR}/clang ${BINDIR}/clang-cpp MLINKS= clang.1 clang++.1 \ diff --git a/usr.bin/clang/lld/Makefile b/usr.bin/clang/lld/Makefile index fb10ca7176d1..94adfceaf728 100644 --- a/usr.bin/clang/lld/Makefile +++ b/usr.bin/clang/lld/Makefile @@ -16,10 +16,6 @@ SYMLINKS= ${PROG_CXX} ${BINDIR}/ld MLINKS= ld.lld.1 ld.1 .endif -.if ${MK_SHARED_TOOLCHAIN} == "no" -NO_SHARED?= yes -.endif - .include "${SRCTOP}/lib/clang/llvm.pre.mk" CFLAGS+= -I${LLD_SRCS}/ELF From nobody Wed Aug 2 03:14:29 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFxtR3Hfzz4q98T; Wed, 2 Aug 2023 03:14:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFxsf39RBz42KV; Wed, 2 Aug 2023 03:14:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690946070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=irDB5M4ha0iPYfUJY9cSX+8Levak7c4/7R1h8MmGcnY=; b=kRjD1/fhJaMOXtx11D7YHEwNHnmhdQB1pKoIQYZMq+xy/jKDW2mwXLEBfrSWS2NFSthbBz TUuuhjgU4p9iWSWaaJIB9lW/yIpOLXKM8oO26dUNyqMk5dqMGejBLLzNtludTJ7StV2O3Q N7a0NhILCm7QFplOX/FafKIeHqmRByZMm3UHVzgUc4fT9wSVCkrU3yv2JuAwb31T8BfI9B 4haC+ceC401S8eaMxOTXsHK5WOAimXgH56An2zd970SsC9mGWZL0AX8Gby8EOMb7do4ZA1 dKLi+0JGfJRw7fMZGbc/kOayD4vGucMlMbCzfkxdYhhAjxubz+69enjKBtTqTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690946070; a=rsa-sha256; cv=none; b=T7lJpvneF4U3nyvoY82BS9xScSMLw36vEmJAXKQHGqnZRqsfLzsALHBDBCVnpQoKLPJW3S BW4aRMpcjBlp2EvBTW9W8Z/G9PlDl9vRQOxow49MGi+XFiET2l49iQYn/Bydq0i6ZjRK0S V0l9cl8eeSBbHrp83Z6pVpsSIoUN1E+mE3gbMAgp0DP7DyweWwzuWiuDQk4iOQOFwnkY2U H1pN01SqrHJUOarMWG08kwr8sGiV5YkoZcB5s3sOyyCkzNVTI7LBfuptlfWXvW66+G6XtS KL5JHp+84BfHjoqbE9BvMxINZ9bL1Q0E3w0CFFaD7YTC8XKda0w/oOYYOl6EUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690946070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=irDB5M4ha0iPYfUJY9cSX+8Levak7c4/7R1h8MmGcnY=; b=QK4q8HMBlW5PRYZ1PoqrU/KXNug3TxqYMFXiURh0tPKHXPJqNtnPFxXhUsm7055eaY4e0X 2sOKGhaRBmiR4XVAzOmvzF1EdG35QsTAyBMfGChTnMH0Lk8OtnqqhwxFy1823BsETzQ8Vw lY/lGoffB2YKIgGHOp+BCRZoGT2XDvCk1QQ8cy035NusJZFc7uBD6L9JiDsyI7WZzqU1c1 tYFuO3WAHlyQJ8K88PP3huswgYswaOkayCteKD/uTC52nRq8QgFuGyj6y8UduAt35NS0VS 5X2h9k8HjH/UbHFjwc5xSALHeu/YJ3XjpUm+rHKNG2aVbCd/X+7ENFm++MgR3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFxsd6fv6z13R9; Wed, 2 Aug 2023 03:14:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3723ETV9027831; Wed, 2 Aug 2023 03:14:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3723ETgj027830; Wed, 2 Aug 2023 03:14:29 GMT (envelope-from git) Date: Wed, 2 Aug 2023 03:14:29 GMT Message-Id: <202308020314.3723ETgj027830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 1a7fcf6d51eb - main - vm_phys_enqueue_contig: handle npages==0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c commit 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c Author: Doug Moore AuthorDate: 2023-08-02 03:12:00 +0000 Commit: Doug Moore CommitDate: 2023-08-02 03:12:00 +0000 vm_phys_enqueue_contig: handle npages==0 By letting vm_phys_enqueue_contig handle the case when npages == 0, the callers can stop checking it, and the compiler can stop zero-checking with every call to ffs(). Letting vm_phys_enqueue_contig call vm_phys_enqueue_contig for part of its work also saves a few bytes. The amd64 object code shrinks by 80 bytes. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D41154 --- sys/vm/vm_phys.c | 74 +++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 28f12231e01c..b2084bdef4e1 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -72,6 +72,8 @@ __FBSDID("$FreeBSD$"); _Static_assert(sizeof(long) * NBBY >= VM_PHYSSEG_MAX, "Too many physsegs."); +_Static_assert(sizeof(long long) >= sizeof(vm_paddr_t), + "vm_paddr_t too big for ffsll, flsll."); #ifdef NUMA struct mem_affinity __read_mostly *mem_affinity; @@ -690,18 +692,16 @@ vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, int order, * * The physical page m's buddy must not be free. */ -static void +static vm_page_t vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) { - u_int n; int order; - KASSERT(npages > 0, ("vm_phys_enq_range: npages is 0")); KASSERT(((VM_PAGE_TO_PHYS(m) + npages * PAGE_SIZE) & ((PAGE_SIZE << (fls(npages) - 1)) - 1)) == 0, ("vm_phys_enq_range: page %p and npages %u are misaligned", m, npages)); - do { + while (npages > 0) { KASSERT(m->order == VM_NFREEORDER, ("vm_phys_enq_range: page %p has unexpected order %d", m, m->order)); @@ -709,10 +709,10 @@ vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) KASSERT(order < VM_NFREEORDER, ("vm_phys_enq_range: order %d is out of range", order)); vm_freelist_add(fl, m, order, tail); - n = 1 << order; - m += n; - npages -= n; - } while (npages > 0); + m += 1 << order; + npages -= 1 << order; + } + return (m); } /* @@ -744,7 +744,7 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) { struct vm_freelist *alt, *fl; vm_page_t m; - int avail, end, flind, freelist, i, need, oind, pind; + int avail, end, flind, freelist, i, oind, pind; KASSERT(domain >= 0 && domain < vm_ndomains, ("vm_phys_alloc_npages: domain %d is out of range", domain)); @@ -762,20 +762,18 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) for (oind = 0; oind < VM_NFREEORDER; oind++) { while ((m = TAILQ_FIRST(&fl[oind].pl)) != NULL) { vm_freelist_rem(fl, m, oind); - avail = 1 << oind; - need = imin(npages - i, avail); - for (end = i + need; i < end;) + avail = i + (1 << oind); + end = imin(npages, avail); + while (i < end) ma[i++] = m++; - if (need < avail) { + if (i == npages) { /* - * Return excess pages to fl. Its - * order [0, oind) queues are empty. + * Return excess pages to fl. Its order + * [0, oind) queues are empty. */ - vm_phys_enq_range(m, avail - need, fl, - 1); - return (npages); - } else if (i == npages) + vm_phys_enq_range(m, avail - i, fl, 1); return (npages); + } } } for (oind = VM_NFREEORDER - 1; oind >= 0; oind--) { @@ -785,21 +783,20 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) NULL) { vm_freelist_rem(alt, m, oind); vm_phys_set_pool(pool, m, oind); - avail = 1 << oind; - need = imin(npages - i, avail); - for (end = i + need; i < end;) + avail = i + (1 << oind); + end = imin(npages, avail); + while (i < end) ma[i++] = m++; - if (need < avail) { + if (i == npages) { /* * Return excess pages to fl. * Its order [0, oind) queues * are empty. */ - vm_phys_enq_range(m, avail - - need, fl, 1); - return (npages); - } else if (i == npages) + vm_phys_enq_range(m, avail - i, + fl, 1); return (npages); + } } } } @@ -1146,7 +1143,7 @@ max_order(vm_page_t m) * because the size of a physical address exceeds the size of * a long. */ - return (min(ffsl(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1, + return (min(ffsll(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1, VM_NFREEORDER - 1)); } @@ -1162,6 +1159,7 @@ vm_phys_enqueue_contig(vm_page_t m, u_long npages) struct vm_freelist *fl; struct vm_phys_seg *seg; vm_page_t m_end; + vm_paddr_t diff, lo; int order; /* @@ -1173,15 +1171,15 @@ vm_phys_enqueue_contig(vm_page_t m, u_long npages) fl = (*seg->free_queues)[m->pool]; m_end = m + npages; /* Free blocks of increasing size. */ - while ((order = max_order(m)) < VM_NFREEORDER - 1 && - m + (1 << order) <= m_end) { - KASSERT(seg == &vm_phys_segs[m->segind], - ("%s: page range [%p,%p) spans multiple segments", - __func__, m_end - npages, m)); - vm_freelist_add(fl, m, order, 1); - m += 1 << order; + lo = VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT; + if (m < m_end && + (diff = lo ^ (lo + npages - 1)) != 0) { + order = min(flsll(diff) - 1, VM_NFREEORDER - 1); + m = vm_phys_enq_range(m, roundup2(-lo, 1 << order), fl, 1); } + /* Free blocks of maximum size. */ + order = VM_NFREEORDER - 1; while (m + (1 << order) <= m_end) { KASSERT(seg == &vm_phys_segs[m->segind], ("%s: page range [%p,%p) spans multiple segments", @@ -1560,10 +1558,8 @@ vm_phys_alloc_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m, oind); } /* Return excess pages to the free lists. */ - if (&m_run[npages] < m) { - fl = (*queues)[VM_FREEPOOL_DEFAULT]; - vm_phys_enq_range(&m_run[npages], m - &m_run[npages], fl, 0); - } + fl = (*queues)[VM_FREEPOOL_DEFAULT]; + vm_phys_enq_range(&m_run[npages], m - &m_run[npages], fl, 0); return (m_run); } From nobody Wed Aug 2 07:10:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG35b3gXxz4qKgb; Wed, 2 Aug 2023 07:10:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG35Y2c5Pz4Lb8; Wed, 2 Aug 2023 07:10:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690960209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mDm4gWXsqxGVRs+Sb8opbBdTmLrhzj6LjOA1suG5iJQ=; b=d7KCY0tQOXABC8cS3enkhrV4fjdX3KvZ6FV3F9wLeQ+2uHcgZGrwP59RrKe2akZuKKPaoX wyscTbZ9+5uZPNMhBglkMJWf/tWPA4M6+Nw8KHNU0zsAZRMLzusbyzHJ2x1D82/GKdVJ8D F2cLZeSXCKhYfTUF8JTrSrmr+2ew9lVvFXD0s333UnK/opvNzHvHL+eXoiv0xD1Fd/gmPp a4nX/Fq9xUgHm2fjZUyDb/H6OARz6KEgZUSr2UKVgjqpodxmUAOD/x6751vnIiPF+TRFob lRzsnKLj8Gw9NeY24cfs8PlcCx//tOAtLSj0yuaGUhj9dq3QeEfElxY8+O+1gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690960209; a=rsa-sha256; cv=none; b=GE9FfCNLLuBIuKhskw8yp6R3fwEP1jyF7wDWs6dsR4ab3MLIztSicMJUmrpwgR5w0qMyGK ivETKMWB4eqbrtoX9uSVlN5aY04yV4495GPASSMVnwumVWIhrtYf4zYDLT+kbfGruklwJA pYbiq520/+FS8lwUQYvFMAMy5DuPa8R9fxMCgCanUsJyrCBxvzCBmKe2ct08x644H1zxrN 6xWJLNQ4SusJbJwOBjyEWtNK29aR253xqks/FoH8bmEV3lkjlWYlKFybDy36vuPKS24HPg PUBTu4BbQRgHMJ2+lFWpyWmsFN1W+EU7bqZXr5cqpwPhfguJ+1YH2Lksb1cnRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690960209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mDm4gWXsqxGVRs+Sb8opbBdTmLrhzj6LjOA1suG5iJQ=; b=pkAxeuYvGFLyYtl9ncm1fobNbnDoypFqO6emEIpzN9fB52+BUPPTkG/z/caZQk9Dgb0xx2 qtjGb7afSB+eZVrY+41demkWvU/GlFXSIzO5uM9hXp1o2T1ACiMNR3lvCIEfKQMQJvlaa5 TV/bjcN2B8V/6Lo590zaEvFsINnMQXGqyX8pyEKv7EM9QB3pvKV3SQv0cYroQkyDGRwO80 ovaLb3ONyx62iY5xuaMEVUu7jnKO9DQLggT72HHzKQvZTq5SYKtkWdcmPX/T9r8tutQkDP TepMt7ikaLp3JQkgMmB6wfTPPSFF/cKY7ne+4Embts/bGrzaWQj1GkZpfAmWsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG35Y08Z4z1936; Wed, 2 Aug 2023 07:10:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3727A8Jt012438; Wed, 2 Aug 2023 07:10:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3727A89J012432; Wed, 2 Aug 2023 07:10:08 GMT (envelope-from git) Date: Wed, 2 Aug 2023 07:10:08 GMT Message-Id: <202308020710.3727A89J012432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 734c9698d9ae - main - et(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 734c9698d9ae83206a47daa40031a4de3bce9c28 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=734c9698d9ae83206a47daa40031a4de3bce9c28 commit 734c9698d9ae83206a47daa40031a4de3bce9c28 Author: Gordon Bergling AuthorDate: 2023-08-02 07:09:56 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 07:09:56 +0000 et(4): Fix a typo in a source code comment - s/diabled/disabled/ MFC after: 3 days --- sys/dev/et/if_et.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/et/if_et.c b/sys/dev/et/if_et.c index 9cce5a3ae883..174cf6ed8b1a 100644 --- a/sys/dev/et/if_et.c +++ b/sys/dev/et/if_et.c @@ -1993,7 +1993,7 @@ et_init_txmac(struct et_softc *sc) */ CSR_WRITE_4(sc, ET_TXMAC_FLOWCTRL, 0 << ET_TXMAC_FLOWCTRL_CFPT_SHIFT); - /* Enable TX MAC but leave FC(?) diabled */ + /* Enable TX MAC but leave FC(?) disabled */ CSR_WRITE_4(sc, ET_TXMAC_CTRL, ET_TXMAC_CTRL_ENABLE | ET_TXMAC_CTRL_FC_DISABLE); } From nobody Wed Aug 2 07:14:14 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG3BJ4QWTz4qMSP; Wed, 2 Aug 2023 07:14:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG3BG3tt6z4Lnc; Wed, 2 Aug 2023 07:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690960454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cm/zhNM+s+pCNspfrAj9FWsIW/QFKB1Qgi6dXzRNFt4=; b=W+LUVx/sz1KbojPPUpg4lSlwdHoSGR0gIEYErph/b76YUrjju+pIhzbb3PUPmqixpMVX7S Z+ZALzfB/F7QDfM9Mk3bDKTPOhuRb08+IQxxL6xJgDktnCC3SLlTv1cbrtowUtXnzZDI7S OdrnRDAMNXz+oKKV77q1Y+M1bfCiihk0YgF1srGRS5tyCenP11nUFMkf3rqW390JaWr+jI 6UcB2bf1UH8Zzi2qLGTSbjRa27xoxzzAEZohKvtCXMWhgMgQE6RMrl7q5OUv07PRfF+ueG 2fmxoEe/RtVQzn/2U8RGkULUSKHfjz2DSSeHztx3Wnt+OtUyb+fq4A38v3NUAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690960454; a=rsa-sha256; cv=none; b=ZObvpSij+bop+wLNlZZEXoxRCTfOs2WC5Z8IySRt6LhdNPmRjhp8VsygYU8zUngJee1XQU Frwjw/3u0cOwUzaFoapMZZcPLFZyaEBEqTPCIHtdZhvIr56GHIOa+aEgVpmUFPD5Dc2/JY SkJS7FumseZkvIesJwmydn+9TZHuDL9jawOO5cHCsXbdiaazyktr4wk72EwZSo7C7Pwq7i 1t0PooqwlbVFwIp0mv6WDHs8/5mh4OZ260pD159j5xk1QVhC6zdgDPWluPXlIQaSRht3Q4 QWC6XV/BmJt+HBjjV5bk0i175mU8pH/hq/zwvxwS0bgJ0yZ1ziniME1axCL2hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690960454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cm/zhNM+s+pCNspfrAj9FWsIW/QFKB1Qgi6dXzRNFt4=; b=nc9K8C2Az7q0aMPjCu2D4vjCFjz4kDMKvlENS1YojiAIFft1f8wgSkOLwcrwv9OrgRGxYJ KrhejrbpYKzlpI37xOvdmIPaCPGdX7dZo8Y2WPBI0/ZiJqx9Ail1eGsNJ/WOIGH9/o+Ozr fWSEIn/vooYtEIGMMt8AIoLC77H+ZWpcL+20g9kFV5cAidPlUynMVNW6yEXQXx5DWhDNFt CX+4Fupdhj9OIGm9Ldk8z8m3fqNlMmZW/K+5r8wJP0Fcn2AL/bfa9wVbUbX+6sA6AwUlTn CB5cbbhgCCmJMSaoR6YGklPwpycn0+N8WZPdZazIdI3+ro6dsEb9COLpPTYzBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG3BG19h4z1984; Wed, 2 Aug 2023 07:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3727EEBU024749; Wed, 2 Aug 2023 07:14:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3727EESh024748; Wed, 2 Aug 2023 07:14:14 GMT (envelope-from git) Date: Wed, 2 Aug 2023 07:14:14 GMT Message-Id: <202308020714.3727EESh024748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 7eb8fbfb0421 - main - psm(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7eb8fbfb0421d38ec83a73f9b8ea13e7c52d3314 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=7eb8fbfb0421d38ec83a73f9b8ea13e7c52d3314 commit 7eb8fbfb0421d38ec83a73f9b8ea13e7c52d3314 Author: Gordon Bergling AuthorDate: 2023-08-02 07:14:04 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 07:14:04 +0000 psm(4): Fix a typo in a source code comment - s/diable/disable/ MFC after: 3 days --- sys/dev/atkbdc/psm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index a308cc81cd3a..9e89f01cbfc2 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -5441,7 +5441,7 @@ enable_kmouse(struct psm_softc *sc, enum probearg arg) if ((status[1] == PSMD_RES_LOW) || (status[2] == rate[i - 1])) return (FALSE); - /* the device appears be enabled by this sequence, diable it for now */ + /* the device appears be enabled by this sequence, disable it for now */ disable_aux_dev(kbdc); empty_aux_buffer(kbdc, 5); From nobody Wed Aug 2 07:20:25 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG3Kc3ZpQz4qNDJ; Wed, 2 Aug 2023 07:20:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG3KS0vb6z4M4r; Wed, 2 Aug 2023 07:20:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690960828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jd2rEJ2TT8/pROpjD4gAoGUgary5X1MoT+Vnu4kP6eA=; b=nRmKfV0N3iBiAL412Hx0vYEEYxWqkzNR4ZWK6v7q29olV6kvGoutSCvPC10Xl6X/0daLmf wwnqQJIDQtTL/MZwLnvOPxatfK3P3/ufR552Hm6GRtrtrt/9sYdXp5Z1EveAoeeSbINNxJ 5J5BjBKbHVyDiLc9zTT9bqpvKz34Opg0j4cbiWVAkM0OaZJ7LdKWYb1bIu9XoDHnBY4xBR rmHy4JVKEAXnecmEIydLsao/e0epmpQSTtX9+y8wBs8zcE1WTvZ3w2ArhWVRlM7y4fPU3X G73UvhP4rRncQ00EwShRrD2sCB/U4r5myCsODKFwGUsiBuRu2b7gwnIfzf7TOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690960828; a=rsa-sha256; cv=none; b=SUCoPLAP0KF+Oxmyz1zhCy9q9tc1urRRVqJ2ebckWuKk5b+9fbFv3UNpz+47XIHvJJXos+ B0yQwCgq6bvIdWVSc+XsT7lOnzks6kaCJvZFBBM11sibxnQY9r9N41zqQsPtjXEc3c6T+w XFeV5AjyQcmP2EKFRNm7oAF6sPqy63b6Tk7xWL5O7I6r4n+UDys/quVA7H+4lhsnuGPoCE bRY3d2S4d8E5HTPI4bxXwJkDXTZ9pMTYl6vspdnFG32nbn4JTTSOCEIrW/0MzET5BsHq7S 6tmRtN843TIdv9EYqBL2NjHM+PEldOi1EWbuwayrV8PBi7sSWuk+7j8Wx+Zkjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690960828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jd2rEJ2TT8/pROpjD4gAoGUgary5X1MoT+Vnu4kP6eA=; b=UiGuhpiS2qWDNDFupQXS6tf2Gvu4SM4gwSwBcxt0qIs88zGviHwc5sygRliXGr+FHAbXvI VwlvhlqUIfHTPAir1CaxQyZCH6xv8ka7L+DgKIilnyzbNuF5R7cYRw7rL7GQSDzma4yv4h Yik8IveSz/xoC0MSUZAR3TH3e7aC0t+oAJTEB0fF7WXf6RqJ7ktEzMONFobks1pzwANsJp 73leE9VBmyt/JHcys83R9B8z6Ey+sVv/BNZfVDocTNDGgjd+topqyK5qPUtMFvx8lxdcqi iwdTq77h1QrWYSFy1+2589+sOGvKqUIdUDHrjt1xGeegM7ju25KkdtdzHvxt5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG3KR5J84z193r; Wed, 2 Aug 2023 07:20:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3727KPNT034075; Wed, 2 Aug 2023 07:20:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3727KPkO034074; Wed, 2 Aug 2023 07:20:25 GMT (envelope-from git) Date: Wed, 2 Aug 2023 07:20:25 GMT Message-Id: <202308020720.3727KPkO034074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 3514686b344d - main - aic7xxx: Fix two typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3514686b344da607515decb500018d25aadacd33 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=3514686b344da607515decb500018d25aadacd33 commit 3514686b344da607515decb500018d25aadacd33 Author: Gordon Bergling AuthorDate: 2023-08-02 07:20:17 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 07:20:17 +0000 aic7xxx: Fix two typos in source code comments - s/reslection/reselection/ MFC after: 3 days --- sys/dev/aic7xxx/aic79xx.c | 2 +- sys/dev/aic7xxx/aic7xxx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index 6f93c6c6e578..e720e89e89f1 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -9442,7 +9442,7 @@ bus_reset: /* * The sequencer will never re-reference the * in-core SCB. To make sure we are notified - * during reslection, set the MK_MESSAGE flag in + * during reselection, set the MK_MESSAGE flag in * the card's copy of the SCB. */ ahd_outb(ahd, SCB_CONTROL, diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index d37f70ca011f..29bef06a3fa1 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -7182,7 +7182,7 @@ bus_reset: * In the non-paging case, the sequencer will * never re-reference the in-core SCB. * To make sure we are notified during - * reslection, set the MK_MESSAGE flag in + * reselection, set the MK_MESSAGE flag in * the card's copy of the SCB. */ if ((ahc->flags & AHC_PAGESCBS) == 0) { From nobody Wed Aug 2 07:33:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG3cp29pKz4qNsk; Wed, 2 Aug 2023 07:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG3cm6CZWz4NGq; Wed, 2 Aug 2023 07:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690961624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btNFCF5hzbzk8cjiDTuPBCQUKlFRkzJvOn4oU4ztDZI=; b=Ka5xQ7lNPX6suIQXW+IhrX+Ij5dEXa1R/uUbEaZwTiNII9kanERwESbgsbVw4JgfIAXhet 5mibYTbylopLfTYtKHs/a5QgtlwZ4uH92fTmlV4OWf7xKe+koIj3BUO1a4NeSWVU46cQx0 rUj63+IUuY9dLwexIpWSwGGIrZwHCb6zmHiUbEplGeXUo/zXDLJjsTIDJiNiHHznvI9DLe Wp5SqRzPrudeGRUXYpqHQRDw5KieVAN+4XbUx+XmLNJ0Wytk5waDDBJrGaZrhl7M22EZfn 70wFptwYgD2KPshVVTugEmJ3yCYXhqHx3JdUS4gHfG2agoTFhh8SoAdpriMKDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690961624; a=rsa-sha256; cv=none; b=JmndEqBxuz49gOP73dZFy2q4iRHa3onxQw54SEEEZLMxD+6Yh1ADKZKnKaWr2Hy5wRUsec PUBYWUm+BQ0JBtmiazhnIsG+IjhDyVd+KknwlVhyKQdLGycJeH0GIJ0XlCJvJXpxQetQAk MKStcN+CxdWhzKW54dUaKAA1VDGKxsRVuUJAzlKEaghO31xb1MaXly2OE28g8XOYj2K5fp usoXcEbgBQGnBOQBIuPiRhKvXMsgPDWFE6YaIv9uESjo9dfY7UxAWpxVMrrZsAwaxB5yQT hmQQovvQ1PGZRsDH5yavOS0FxVnBLZOFeKgi2mrFV03vszWdM9bmeCxnt4iTSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690961624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btNFCF5hzbzk8cjiDTuPBCQUKlFRkzJvOn4oU4ztDZI=; b=di+YnERf3WRJheD4ypMtnt/yBKtDJvgLUzrv4GC3hMJwHruc9Azgc+oLkYNagZEraI+ntP afPd5gTuuFocBFcmcH/Nn9uQYXCJAzbaGLlo1bz/2tsR5i2Ktv0FObR+025teIS4/a+s2u rHIy1QAjWdzM7nNCYEb1bNDfz8aDJoelMW1iLszpw0gbGoNfc3/0lQilmNDz1a/V8lfyJC 8K+LjVHqTH6aUWGOiIhMRvXOi3TyguTSgsn8wkdFhOstng+IkCdUnXDfEjMdIy+yyk53wT hE/BA6/1ThBKNt+r0pXBEV4HsJJwp0Bao0ecvS1vd2ojdRkU25244tJMA2Fkqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG3cm43Vxz19mg; Wed, 2 Aug 2023 07:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3727XiSG057087; Wed, 2 Aug 2023 07:33:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3727XiuZ057086; Wed, 2 Aug 2023 07:33:44 GMT (envelope-from git) Date: Wed, 2 Aug 2023 07:33:44 GMT Message-Id: <202308020733.3727XiuZ057086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: b73763fc10d8 - main - vnic: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b73763fc10d8000ec5c5682abccf6c8489eee8e3 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=b73763fc10d8000ec5c5682abccf6c8489eee8e3 commit b73763fc10d8000ec5c5682abccf6c8489eee8e3 Author: Gordon Bergling AuthorDate: 2023-08-02 07:33:35 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 07:33:35 +0000 vnic: Fix a typo in a source code comment - s/Enabele/Enable/ MFC after: 3 days --- sys/dev/vnic/thunder_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/vnic/thunder_mdio.c b/sys/dev/vnic/thunder_mdio.c index 3e9a8f74e673..63ab7691bf9e 100644 --- a/sys/dev/vnic/thunder_mdio.c +++ b/sys/dev/vnic/thunder_mdio.c @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); #define SMI_CLK_MODE (1UL << 24) #define SMI_EN 0x20 -#define SMI_EN_EN (1UL << 0) /* Enabele interface */ +#define SMI_EN_EN (1UL << 0) /* Enable interface */ #define SMI_DRV_CTL 0x28 From nobody Wed Aug 2 07:41:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG3p049YYz4qPCC; Wed, 2 Aug 2023 07:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG3nt6zPlz4PV5; Wed, 2 Aug 2023 07:41:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690962099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U4i0mjhyyI1CPS3qqNDEiKsAOBACczmz3wQfFPKx214=; b=s1XUOUq5YFoOYB/LgJ5vYDMOEIv22+H0UH2dOBsEh2ljG42adxE3tqA8oCxUV12iNCpVmn Uzu38GUtRixRRzMeg+w26WQFCQy3+WIt44aKCnwG+nuqQMuTZjrTvLFQK8FrKt4q1tMzVp KhtpF8TLt3xoMEK07vMXjEvpfr2pYIbp+23Ypwcvz+KR14kimDesGJ5P+qCCBtyHO4zjoo xGsnwN8nC5aK9upbEFHuU8jpZXlBvTK72aFMN1o3UQwe8rK0uVZWWVOozXO4tdrnDdXMD6 AcAAMEReANI3DJ/WpaqH4NAkFmXU7/1iYUDgtT90g9GIaNKqowlOdRtO9Q68nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690962099; a=rsa-sha256; cv=none; b=ysz7D+FdpzbtMewCF4vanWI78/2pVCkGSUjcDbC0O4CvyaKosRLMQlBQ1CDDvnMXtxZ50V yGVDppru9KCX9WzM2neD+nZTonpa3LcnxWhNxNkH6WKOU4cXtEczFfmxucEVEHx4oxxzHU Z7HPcVGgeVwQUZrnjXNIsVZswVhKD1rol64jkhgdz+jVJyapyE3SzSNJ9aok1c974MPVVb +i9YoK5mzu09Vttj/B1vJdIilzTbGKJkPsKUNTYw6eyMT1neXfOen8Ck2yUV6xc82B+zUK jCIwZni3iqP22Lr9q+aTdofps/9jZPf7K75LgnYmnWhLfvDBAKWy8EMGpPESSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690962099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U4i0mjhyyI1CPS3qqNDEiKsAOBACczmz3wQfFPKx214=; b=lwCU5sGn7KRc7nhN1AY6cItLLOWGTa0l0hWUkLBLby4C63ArM84rkt2JyvqKEbpz23dfdS fS+FzMxOEUE6lZ+DSk7ddrd8hP/LRLLd6R2mmEamfb8n3CZYMSUb9u4qUyZ4YWiX+CMJ0Z IQWNE8AExgS3nRsKW7qaHfrGOBVC1LLkzxPdMvu0qs6UxwQ15mGzJsRvPiqKX53ycOcz2E mTf4Lgo002PIEcBq91fvDWo5TyfjCgJVbzjGf4TYz0qymRYspjii1LXqH9GiU5vwD1YKNp mONfAs3guUjkbOGP68HND4hvE3cXX04HQij2zoW8Gk1mFMAK6eTDSXF1Ozy6pA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG3nt60DBz19qv; Wed, 2 Aug 2023 07:41:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3727fciw070850; Wed, 2 Aug 2023 07:41:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3727fc0P070849; Wed, 2 Aug 2023 07:41:38 GMT (envelope-from git) Date: Wed, 2 Aug 2023 07:41:38 GMT Message-Id: <202308020741.3727fc0P070849@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: cfd05de19467 - main - netpfil: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cfd05de1946799c6353b07da5d351027d8471203 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=cfd05de1946799c6353b07da5d351027d8471203 commit cfd05de1946799c6353b07da5d351027d8471203 Author: Gordon Bergling AuthorDate: 2023-08-02 07:41:29 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 07:41:29 +0000 netpfil: Fix a typo in a source code comment - s/interprted/interpreted/ MFC after: 3 days --- sys/netpfil/ipfilter/netinet/ip_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c index 2e6913db8f88..67023d6de634 100644 --- a/sys/netpfil/ipfilter/netinet/ip_state.c +++ b/sys/netpfil/ipfilter/netinet/ip_state.c @@ -1255,7 +1255,7 @@ ipf_state_matchisps(ipstate_t *is1, ipstate_t *is2) case IPPROTO_TCP : case IPPROTO_UDP : case IPPROTO_GRE : - /* greinfo_t can be also interprted as port pair */ + /* greinfo_t can be also interpreted as port pair */ rv = ipf_state_matchports(&is1->is_ps.is_us, &is2->is_ps.is_us); break; From nobody Wed Aug 2 08:15:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG4YM6VQPz4qQRH; Wed, 2 Aug 2023 08:15:51 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG4YL2z8Fz3JG5; Wed, 2 Aug 2023 08:15:50 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-d2b8437d825so4134115276.3; Wed, 02 Aug 2023 01:15:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690964148; x=1691568948; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BAmSERIaWdepIB2rLzYsE8xLptTw9RXL8nITv9VuDv8=; b=OgQWUB+siocrIrzAxX5FFZJm5dYVJo6CcKp4kCA9FdgC8aReIJ4TXj53vbuJgCYBY7 tWcW2XhB+Jrq29QYz0lB+yybNM8WDGcjgIAcgghUChMz5e1yyQOKpyou16FVWaMAYwr2 0bod4bZURGq8g7nAEMQ5+OFcD9S/Yun4iBJKDKYH7HmiZdnRqrDRUguDaaA/85z7XASd N9WXZMOT5OBBCUY6zJjIQE4UUbjLCy+OpC+AxiOsQtUn+XVsGxZKXveLVk4g8TZqR+GR 6iSvs3SkY6wV+Hmu9qawWOZmgKXXJTrlgTjzFTgCDzjU1bcRMM/krwBd55tUTK8zOyix /Zzw== X-Gm-Message-State: ABy/qLZq2D+ztD5P3xohTCg1E9HcgWdaQ7r1qhabzOVpUHpl3IjxirF8 D9Zaa4U6sxQJOHXxK64JWckA0j6PcS4+v7NYeKnzCnj/ X-Google-Smtp-Source: APBJJlHpXJWj2y4OqIhC4jqyxH5tbkwXHBHE1BqHSVIxsg2crpHniCUUI7S8XtikxaPQ/Xe8BM+/eVvRX2fXF1ft64U= X-Received: by 2002:a25:118a:0:b0:d1c:be0e:b9dd with SMTP id 132-20020a25118a000000b00d1cbe0eb9ddmr13418502ybr.28.1690964148573; Wed, 02 Aug 2023 01:15:48 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202308020314.3723ETgj027830@gitrepo.freebsd.org> In-Reply-To: <202308020314.3723ETgj027830@gitrepo.freebsd.org> From: Dmitry Chagin Date: Wed, 2 Aug 2023 11:15:37 +0300 Message-ID: Subject: Re: git: 1a7fcf6d51eb - main - vm_phys_enqueue_contig: handle npages==0 To: Doug Moore Cc: dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, src-committers@freebsd.org Content-Type: multipart/alternative; boundary="000000000000675be50601ec45f2" X-Rspamd-Queue-Id: 4RG4YL2z8Fz3JG5 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] --000000000000675be50601ec45f2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, With this change, I got a panic: vm_phys_enq_range: page 0xfffffe0000000000 and pages 0 are misaligned =D0=A1=D1=80, 2 =D0=B0=D0=B2=D0=B3. 2023 =D0=B3. =D0=B2 06:22, Doug Moore <= dougm@freebsd.org>: > The branch main has been updated by dougm: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D1a7fcf6d51eb67ee3e05fdbb806f7e6= 8f9f53c9c > > commit 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c > Author: Doug Moore > AuthorDate: 2023-08-02 03:12:00 +0000 > Commit: Doug Moore > CommitDate: 2023-08-02 03:12:00 +0000 > > vm_phys_enqueue_contig: handle npages=3D=3D0 > > By letting vm_phys_enqueue_contig handle the case when npages =3D=3D = 0, > the callers can stop checking it, and the compiler can stop > zero-checking with every call to ffs(). Letting vm_phys_enqueue_conti= g > call vm_phys_enqueue_contig for part of its work also saves a few > bytes. > > The amd64 object code shrinks by 80 bytes. > > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D41154 > --- > sys/vm/vm_phys.c | 74 > +++++++++++++++++++++++++++----------------------------- > 1 file changed, 35 insertions(+), 39 deletions(-) > > diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c > index 28f12231e01c..b2084bdef4e1 100644 > --- a/sys/vm/vm_phys.c > +++ b/sys/vm/vm_phys.c > @@ -72,6 +72,8 @@ __FBSDID("$FreeBSD$"); > > _Static_assert(sizeof(long) * NBBY >=3D VM_PHYSSEG_MAX, > "Too many physsegs."); > +_Static_assert(sizeof(long long) >=3D sizeof(vm_paddr_t), > + "vm_paddr_t too big for ffsll, flsll."); > > #ifdef NUMA > struct mem_affinity __read_mostly *mem_affinity; > @@ -690,18 +692,16 @@ vm_phys_split_pages(vm_page_t m, int oind, struct > vm_freelist *fl, int order, > * > * The physical page m's buddy must not be free. > */ > -static void > +static vm_page_t > vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int > tail) > { > - u_int n; > int order; > > - KASSERT(npages > 0, ("vm_phys_enq_range: npages is 0")); > KASSERT(((VM_PAGE_TO_PHYS(m) + npages * PAGE_SIZE) & > ((PAGE_SIZE << (fls(npages) - 1)) - 1)) =3D=3D 0, > ("vm_phys_enq_range: page %p and npages %u are misaligned", > m, npages)); > - do { > + while (npages > 0) { > KASSERT(m->order =3D=3D VM_NFREEORDER, > ("vm_phys_enq_range: page %p has unexpected order %d"= , > m, m->order)); > @@ -709,10 +709,10 @@ vm_phys_enq_range(vm_page_t m, u_int npages, struct > vm_freelist *fl, int tail) > KASSERT(order < VM_NFREEORDER, > ("vm_phys_enq_range: order %d is out of range", > order)); > vm_freelist_add(fl, m, order, tail); > - n =3D 1 << order; > - m +=3D n; > - npages -=3D n; > - } while (npages > 0); > + m +=3D 1 << order; > + npages -=3D 1 << order; > + } > + return (m); > } > > /* > @@ -744,7 +744,7 @@ vm_phys_alloc_npages(int domain, int pool, int npages= , > vm_page_t ma[]) > { > struct vm_freelist *alt, *fl; > vm_page_t m; > - int avail, end, flind, freelist, i, need, oind, pind; > + int avail, end, flind, freelist, i, oind, pind; > > KASSERT(domain >=3D 0 && domain < vm_ndomains, > ("vm_phys_alloc_npages: domain %d is out of range", domain)); > @@ -762,20 +762,18 @@ vm_phys_alloc_npages(int domain, int pool, int > npages, vm_page_t ma[]) > for (oind =3D 0; oind < VM_NFREEORDER; oind++) { > while ((m =3D TAILQ_FIRST(&fl[oind].pl)) !=3D NUL= L) { > vm_freelist_rem(fl, m, oind); > - avail =3D 1 << oind; > - need =3D imin(npages - i, avail); > - for (end =3D i + need; i < end;) > + avail =3D i + (1 << oind); > + end =3D imin(npages, avail); > + while (i < end) > ma[i++] =3D m++; > - if (need < avail) { > + if (i =3D=3D npages) { > /* > - * Return excess pages to fl. It= s > - * order [0, oind) queues are > empty. > + * Return excess pages to fl. It= s > order > + * [0, oind) queues are empty. > */ > - vm_phys_enq_range(m, avail - need= , > fl, > - 1); > - return (npages); > - } else if (i =3D=3D npages) > + vm_phys_enq_range(m, avail - i, > fl, 1); > return (npages); > + } > } > } > for (oind =3D VM_NFREEORDER - 1; oind >=3D 0; oind--) { > @@ -785,21 +783,20 @@ vm_phys_alloc_npages(int domain, int pool, int > npages, vm_page_t ma[]) > NULL) { > vm_freelist_rem(alt, m, oind); > vm_phys_set_pool(pool, m, oind); > - avail =3D 1 << oind; > - need =3D imin(npages - i, avail); > - for (end =3D i + need; i < end;) > + avail =3D i + (1 << oind); > + end =3D imin(npages, avail); > + while (i < end) > ma[i++] =3D m++; > - if (need < avail) { > + if (i =3D=3D npages) { > /* > * Return excess pages to > fl. > * Its order [0, oind) > queues > * are empty. > */ > - vm_phys_enq_range(m, avai= l > - > - need, fl, 1); > - return (npages); > - } else if (i =3D=3D npages) > + vm_phys_enq_range(m, avai= l > - i, > + fl, 1); > return (npages); > + } > } > } > } > @@ -1146,7 +1143,7 @@ max_order(vm_page_t m) > * because the size of a physical address exceeds the size of > * a long. > */ > - return (min(ffsl(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1, > + return (min(ffsll(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1, > VM_NFREEORDER - 1)); > } > > @@ -1162,6 +1159,7 @@ vm_phys_enqueue_contig(vm_page_t m, u_long npages) > struct vm_freelist *fl; > struct vm_phys_seg *seg; > vm_page_t m_end; > + vm_paddr_t diff, lo; > int order; > > /* > @@ -1173,15 +1171,15 @@ vm_phys_enqueue_contig(vm_page_t m, u_long npages= ) > fl =3D (*seg->free_queues)[m->pool]; > m_end =3D m + npages; > /* Free blocks of increasing size. */ > - while ((order =3D max_order(m)) < VM_NFREEORDER - 1 && > - m + (1 << order) <=3D m_end) { > - KASSERT(seg =3D=3D &vm_phys_segs[m->segind], > - ("%s: page range [%p,%p) spans multiple segments", > - __func__, m_end - npages, m)); > - vm_freelist_add(fl, m, order, 1); > - m +=3D 1 << order; > + lo =3D VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT; > + if (m < m_end && > + (diff =3D lo ^ (lo + npages - 1)) !=3D 0) { > + order =3D min(flsll(diff) - 1, VM_NFREEORDER - 1); > + m =3D vm_phys_enq_range(m, roundup2(-lo, 1 << order), fl,= 1); > } > + > /* Free blocks of maximum size. */ > + order =3D VM_NFREEORDER - 1; > while (m + (1 << order) <=3D m_end) { > KASSERT(seg =3D=3D &vm_phys_segs[m->segind], > ("%s: page range [%p,%p) spans multiple segments", > @@ -1560,10 +1558,8 @@ vm_phys_alloc_contig(int domain, u_long npages, > vm_paddr_t low, vm_paddr_t high, > vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m, oind); > } > /* Return excess pages to the free lists. */ > - if (&m_run[npages] < m) { > - fl =3D (*queues)[VM_FREEPOOL_DEFAULT]; > - vm_phys_enq_range(&m_run[npages], m - &m_run[npages], fl, > 0); > - } > + fl =3D (*queues)[VM_FREEPOOL_DEFAULT]; > + vm_phys_enq_range(&m_run[npages], m - &m_run[npages], fl, 0); > return (m_run); > } > > --000000000000675be50601ec45f2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: base64 PGRpdj48YnI+PC9kaXY+PGRpdiBkaXI9ImF1dG8iPkhpLDwvZGl2PjxkaXYgZGlyPSJhdXRvIj48 YnI+PC9kaXY+PGRpdiBkaXI9ImF1dG8iPjxkaXYgZGlyPSJhdXRvIj5XaXRoIHRoaXMgY2hhbmdl LCBJIGdvdCBhIHBhbmljOjwvZGl2PjxkaXYgZGlyPSJhdXRvIj52bV9waHlzX2VucV9yYW5nZTog cGFnZSAweGZmZmZmZTAwMDAwMDAwMDAgYW5kIHBhZ2VzIDAgYXJlIG1pc2FsaWduZWQ8L2Rpdj48 L2Rpdj48ZGl2IGRpcj0iYXV0byI+PGJyPjxkaXYgY2xhc3M9ImdtYWlsX3F1b3RlIiBkaXI9ImF1 dG8iPjxkaXYgZGlyPSJsdHIiIGNsYXNzPSJnbWFpbF9hdHRyIj7QodGALCAyINCw0LLQsy4gMjAy M8Kg0LMuINCyIDA2OjIyLCBEb3VnIE1vb3JlICZsdDs8YSBocmVmPSJtYWlsdG86ZG91Z21AZnJl ZWJzZC5vcmciPmRvdWdtQGZyZWVic2Qub3JnPC9hPiZndDs6PGJyPjwvZGl2PjxibG9ja3F1b3Rl IGNsYXNzPSJnbWFpbF9xdW90ZSIgc3R5bGU9Im1hcmdpbjowIDAgMCAuOGV4O2JvcmRlci1sZWZ0 OjFweCAjY2NjIHNvbGlkO3BhZGRpbmctbGVmdDoxZXgiPlRoZSBicmFuY2ggbWFpbiBoYXMgYmVl biB1cGRhdGVkIGJ5IGRvdWdtOjxicj4NCjxicj4NClVSTDogPGEgaHJlZj0iaHR0cHM6Ly9jZ2l0 LkZyZWVCU0Qub3JnL3NyYy9jb21taXQvP2lkPTFhN2ZjZjZkNTFlYjY3ZWUzZTA1ZmRiYjgwNmY3 ZTY4ZjlmNTNjOWMiIHJlbD0ibm9yZWZlcnJlciIgdGFyZ2V0PSJfYmxhbmsiPmh0dHBzOi8vY2dp dC5GcmVlQlNELm9yZy9zcmMvY29tbWl0Lz9pZD0xYTdmY2Y2ZDUxZWI2N2VlM2UwNWZkYmI4MDZm N2U2OGY5ZjUzYzljPC9hPjxicj4NCjxicj4NCmNvbW1pdCAxYTdmY2Y2ZDUxZWI2N2VlM2UwNWZk YmI4MDZmN2U2OGY5ZjUzYzljPGJyPg0KQXV0aG9yOsKgIMKgIMKgRG91ZyBNb29yZSAmbHQ7ZG91 Z21ARnJlZUJTRC5vcmcmZ3Q7PGJyPg0KQXV0aG9yRGF0ZTogMjAyMy0wOC0wMiAwMzoxMjowMCAr MDAwMDxicj4NCkNvbW1pdDrCoCDCoCDCoERvdWcgTW9vcmUgJmx0O2RvdWdtQEZyZWVCU0Qub3Jn Jmd0Ozxicj4NCkNvbW1pdERhdGU6IDIwMjMtMDgtMDIgMDM6MTI6MDAgKzAwMDA8YnI+DQo8YnI+ DQrCoCDCoCB2bV9waHlzX2VucXVldWVfY29udGlnOiBoYW5kbGUgbnBhZ2VzPT0wPGJyPg0KPGJy Pg0KwqAgwqAgQnkgbGV0dGluZyB2bV9waHlzX2VucXVldWVfY29udGlnIGhhbmRsZSB0aGUgY2Fz ZSB3aGVuIG5wYWdlcyA9PSAwLDxicj4NCsKgIMKgIHRoZSBjYWxsZXJzIGNhbiBzdG9wIGNoZWNr aW5nIGl0LCBhbmQgdGhlIGNvbXBpbGVyIGNhbiBzdG9wPGJyPg0KwqAgwqAgemVyby1jaGVja2lu ZyB3aXRoIGV2ZXJ5IGNhbGwgdG8gZmZzKCkuIExldHRpbmcgdm1fcGh5c19lbnF1ZXVlX2NvbnRp Zzxicj4NCsKgIMKgIGNhbGwgdm1fcGh5c19lbnF1ZXVlX2NvbnRpZyBmb3IgcGFydCBvZiBpdHMg d29yayBhbHNvIHNhdmVzIGEgZmV3PGJyPg0KwqAgwqAgYnl0ZXMuPGJyPg0KPGJyPg0KwqAgwqAg VGhlIGFtZDY0IG9iamVjdCBjb2RlIHNocmlua3MgYnkgODAgYnl0ZXMuPGJyPg0KPGJyPg0KwqAg wqAgUmV2aWV3ZWQgYnk6wqAgwqAga2liPGJyPg0KwqAgwqAgRGlmZmVyZW50aWFsIFJldmlzaW9u OsKgIDxhIGhyZWY9Imh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9ENDExNTQiIHJlbD0ibm9y ZWZlcnJlciIgdGFyZ2V0PSJfYmxhbmsiPmh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9ENDEx NTQ8L2E+PGJyPg0KLS0tPGJyPg0KwqBzeXMvdm0vdm1fcGh5cy5jIHwgNzQgKysrKysrKysrKysr KysrKysrKysrKysrKysrLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS08YnI+DQrCoDEgZmls ZSBjaGFuZ2VkLCAzNSBpbnNlcnRpb25zKCspLCAzOSBkZWxldGlvbnMoLSk8YnI+DQo8YnI+DQpk aWZmIC0tZ2l0IGEvc3lzL3ZtL3ZtX3BoeXMuYyBiL3N5cy92bS92bV9waHlzLmM8YnI+DQppbmRl eCAyOGYxMjIzMWUwMWMuLmIyMDg0YmRlZjRlMSAxMDA2NDQ8YnI+DQotLS0gYS9zeXMvdm0vdm1f cGh5cy5jPGJyPg0KKysrIGIvc3lzL3ZtL3ZtX3BoeXMuYzxicj4NCkBAIC03Miw2ICs3Miw4IEBA IF9fRkJTRElEKCZxdW90OyRGcmVlQlNEJCZxdW90Oyk7PGJyPg0KPGJyPg0KwqBfU3RhdGljX2Fz c2VydChzaXplb2YobG9uZykgKiBOQkJZICZndDs9IFZNX1BIWVNTRUdfTUFYLDxicj4NCsKgIMKg IMKgJnF1b3Q7VG9vIG1hbnkgcGh5c3NlZ3MuJnF1b3Q7KTs8YnI+DQorX1N0YXRpY19hc3NlcnQo c2l6ZW9mKGxvbmcgbG9uZykgJmd0Oz0gc2l6ZW9mKHZtX3BhZGRyX3QpLDxicj4NCivCoCDCoCAm cXVvdDt2bV9wYWRkcl90IHRvbyBiaWcgZm9yIGZmc2xsLCBmbHNsbC4mcXVvdDspOzxicj4NCjxi cj4NCsKgI2lmZGVmIE5VTUE8YnI+DQrCoHN0cnVjdCBtZW1fYWZmaW5pdHkgX19yZWFkX21vc3Rs eSAqbWVtX2FmZmluaXR5Ozxicj4NCkBAIC02OTAsMTggKzY5MiwxNiBAQCB2bV9waHlzX3NwbGl0 X3BhZ2VzKHZtX3BhZ2VfdCBtLCBpbnQgb2luZCwgc3RydWN0IHZtX2ZyZWVsaXN0ICpmbCwgaW50 IG9yZGVyLDxicj4NCsKgICo8YnI+DQrCoCAqIFRoZSBwaHlzaWNhbCBwYWdlIG0mIzM5O3MgYnVk ZHkgbXVzdCBub3QgYmUgZnJlZS48YnI+DQrCoCAqLzxicj4NCi1zdGF0aWMgdm9pZDxicj4NCitz dGF0aWMgdm1fcGFnZV90PGJyPg0KwqB2bV9waHlzX2VucV9yYW5nZSh2bV9wYWdlX3QgbSwgdV9p bnQgbnBhZ2VzLCBzdHJ1Y3Qgdm1fZnJlZWxpc3QgKmZsLCBpbnQgdGFpbCk8YnI+DQrCoHs8YnI+ DQotwqAgwqAgwqAgwqB1X2ludCBuOzxicj4NCsKgIMKgIMKgIMKgIGludCBvcmRlcjs8YnI+DQo8 YnI+DQotwqAgwqAgwqAgwqBLQVNTRVJUKG5wYWdlcyAmZ3Q7IDAsICgmcXVvdDt2bV9waHlzX2Vu cV9yYW5nZTogbnBhZ2VzIGlzIDAmcXVvdDspKTs8YnI+DQrCoCDCoCDCoCDCoCBLQVNTRVJUKCgo Vk1fUEFHRV9UT19QSFlTKG0pICsgbnBhZ2VzICogUEFHRV9TSVpFKSAmYW1wOzxicj4NCsKgIMKg IMKgIMKgIMKgIMKgICgoUEFHRV9TSVpFICZsdDsmbHQ7IChmbHMobnBhZ2VzKSAtIDEpKSAtIDEp KSA9PSAwLDxicj4NCsKgIMKgIMKgIMKgIMKgIMKgICgmcXVvdDt2bV9waHlzX2VucV9yYW5nZTog cGFnZSAlcCBhbmQgbnBhZ2VzICV1IGFyZSBtaXNhbGlnbmVkJnF1b3Q7LDxicj4NCsKgIMKgIMKg IMKgIMKgIMKgIG0sIG5wYWdlcykpOzxicj4NCi3CoCDCoCDCoCDCoGRvIHs8YnI+DQorwqAgwqAg wqAgwqB3aGlsZSAobnBhZ2VzICZndDsgMCkgezxicj4NCsKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IEtBU1NFUlQobS0mZ3Q7b3JkZXIgPT0gVk1fTkZSRUVPUkRFUiw8YnI+DQrCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCAoJnF1b3Q7dm1fcGh5c19lbnFfcmFuZ2U6IHBhZ2UgJXAgaGFzIHVu ZXhwZWN0ZWQgb3JkZXIgJWQmcXVvdDssPGJyPg0KwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgbSwgbS0mZ3Q7b3JkZXIpKTs8YnI+DQpAQCAtNzA5LDEwICs3MDksMTAgQEAgdm1fcGh5c19l bnFfcmFuZ2Uodm1fcGFnZV90IG0sIHVfaW50IG5wYWdlcywgc3RydWN0IHZtX2ZyZWVsaXN0ICpm bCwgaW50IHRhaWwpPGJyPg0KwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgS0FTU0VSVChvcmRlciAm bHQ7IFZNX05GUkVFT1JERVIsPGJyPg0KwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgKCZx dW90O3ZtX3BoeXNfZW5xX3JhbmdlOiBvcmRlciAlZCBpcyBvdXQgb2YgcmFuZ2UmcXVvdDssIG9y ZGVyKSk7PGJyPg0KwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgdm1fZnJlZWxpc3RfYWRkKGZsLCBt LCBvcmRlciwgdGFpbCk7PGJyPg0KLcKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgbiA9IDEgJmx0OyZs dDsgb3JkZXI7PGJyPg0KLcKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgbSArPSBuOzxicj4NCi3CoCDC oCDCoCDCoCDCoCDCoCDCoCDCoG5wYWdlcyAtPSBuOzxicj4NCi3CoCDCoCDCoCDCoH0gd2hpbGUg KG5wYWdlcyAmZ3Q7IDApOzxicj4NCivCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoG0gKz0gMSAmbHQ7 Jmx0OyBvcmRlcjs8YnI+DQorwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqBucGFnZXMgLT0gMSAmbHQ7 Jmx0OyBvcmRlcjs8YnI+DQorwqAgwqAgwqAgwqB9PGJyPg0KK8KgIMKgIMKgIMKgcmV0dXJuICht KTs8YnI+DQrCoH08YnI+DQo8YnI+DQrCoC8qPGJyPg0KQEAgLTc0NCw3ICs3NDQsNyBAQCB2bV9w aHlzX2FsbG9jX25wYWdlcyhpbnQgZG9tYWluLCBpbnQgcG9vbCwgaW50IG5wYWdlcywgdm1fcGFn ZV90IG1hW10pPGJyPg0KwqB7PGJyPg0KwqAgwqAgwqAgwqAgc3RydWN0IHZtX2ZyZWVsaXN0ICph bHQsICpmbDs8YnI+DQrCoCDCoCDCoCDCoCB2bV9wYWdlX3QgbTs8YnI+DQotwqAgwqAgwqAgwqBp bnQgYXZhaWwsIGVuZCwgZmxpbmQsIGZyZWVsaXN0LCBpLCBuZWVkLCBvaW5kLCBwaW5kOzxicj4N CivCoCDCoCDCoCDCoGludCBhdmFpbCwgZW5kLCBmbGluZCwgZnJlZWxpc3QsIGksIG9pbmQsIHBp bmQ7PGJyPg0KPGJyPg0KwqAgwqAgwqAgwqAgS0FTU0VSVChkb21haW4gJmd0Oz0gMCAmYW1wOyZh bXA7IGRvbWFpbiAmbHQ7IHZtX25kb21haW5zLDxicj4NCsKgIMKgIMKgIMKgIMKgIMKgICgmcXVv dDt2bV9waHlzX2FsbG9jX25wYWdlczogZG9tYWluICVkIGlzIG91dCBvZiByYW5nZSZxdW90Oywg ZG9tYWluKSk7PGJyPg0KQEAgLTc2MiwyMCArNzYyLDE4IEBAIHZtX3BoeXNfYWxsb2NfbnBhZ2Vz KGludCBkb21haW4sIGludCBwb29sLCBpbnQgbnBhZ2VzLCB2bV9wYWdlX3QgbWFbXSk8YnI+DQrC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCBmb3IgKG9pbmQgPSAwOyBvaW5kICZsdDsgVk1fTkZSRUVP UkRFUjsgb2luZCsrKSB7PGJyPg0KwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg d2hpbGUgKChtID0gVEFJTFFfRklSU1QoJmFtcDtmbFtvaW5kXS5wbCkpICE9IE5VTEwpIHs8YnI+ DQrCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCB2bV9mcmVl bGlzdF9yZW0oZmwsIG0sIG9pbmQpOzxicj4NCi3CoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoGF2YWlsID0gMSAmbHQ7Jmx0OyBvaW5kOzxicj4NCi3CoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoG5lZWQgPSBpbWluKG5wYWdl cyAtIGksIGF2YWlsKTs8YnI+DQotwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqBmb3IgKGVuZCA9IGkgKyBuZWVkOyBpICZsdDsgZW5kOyk8YnI+DQorwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqBhdmFpbCA9IGkgKyAoMSAm bHQ7Jmx0OyBvaW5kKTs8YnI+DQorwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqBlbmQgPSBpbWluKG5wYWdlcywgYXZhaWwpOzxicj4NCivCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoHdoaWxlIChpICZsdDsgZW5kKTxicj4N CsKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIG1hW2krK10gPSBtKys7PGJyPg0KLcKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgaWYgKG5lZWQgJmx0OyBhdmFpbCkgezxicj4NCivCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoGlmIChpID09IG5wYWdlcykgezxicj4N CsKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIC8qPGJyPg0KLcKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgICogUmV0dXJuIGV4Y2VzcyBwYWdlcyB0byBmbC7CoCBJdHM8YnI+DQot wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgKiBvcmRlciBbMCwgb2luZCkgcXVldWVzIGFyZSBlbXB0eS48YnI+DQorwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgKiBSZXR1cm4g ZXhjZXNzIHBhZ2VzIHRvIGZsLsKgIEl0cyBvcmRlcjxicj4NCivCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCAqIFswLCBvaW5kKSBxdWV1 ZXMgYXJlIGVtcHR5Ljxicj4NCsKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgKi88YnI+DQotwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqB2bV9waHlzX2VucV9yYW5nZShtLCBh dmFpbCAtIG5lZWQsIGZsLDxicj4NCi3CoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoDEpOzxicj4NCi3CoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoHJldHVybiAobnBhZ2Vz KTs8YnI+DQotwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqB9 IGVsc2UgaWYgKGkgPT0gbnBhZ2VzKTxicj4NCivCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoHZtX3BoeXNfZW5xX3JhbmdlKG0sIGF2YWls IC0gaSwgZmwsIDEpOzxicj4NCsKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgIMKgIHJldHVybiAobnBhZ2VzKTs8YnI+DQorwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqB9PGJyPg0KwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgfTxicj4NCsKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIH08YnI+ DQrCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCBmb3IgKG9pbmQgPSBWTV9ORlJFRU9SREVSIC0gMTsg b2luZCAmZ3Q7PSAwOyBvaW5kLS0pIHs8YnI+DQpAQCAtNzg1LDIxICs3ODMsMjAgQEAgdm1fcGh5 c19hbGxvY19ucGFnZXMoaW50IGRvbWFpbiwgaW50IHBvb2wsIGludCBucGFnZXMsIHZtX3BhZ2Vf dCBtYVtdKTxicj4NCsKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIE5VTEwpIHs8YnI+DQrCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCB2bV9mcmVlbGlzdF9yZW0oYWx0LCBtLCBvaW5kKTs8 YnI+DQrCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCB2bV9waHlzX3NldF9wb29sKHBvb2wsIG0sIG9pbmQpOzxicj4NCi3CoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoGF2YWlsID0g MSAmbHQ7Jmx0OyBvaW5kOzxicj4NCi3CoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoG5lZWQgPSBpbWluKG5wYWdlcyAtIGksIGF2YWlsKTs8 YnI+DQotwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqBmb3IgKGVuZCA9IGkgKyBuZWVkOyBpICZsdDsgZW5kOyk8YnI+DQorwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqBhdmFpbCA9 IGkgKyAoMSAmbHQ7Jmx0OyBvaW5kKTs8YnI+DQorwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqBlbmQgPSBpbWluKG5wYWdlcywgYXZhaWwp Ozxicj4NCivCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoHdoaWxlIChpICZsdDsgZW5kKTxicj4NCsKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIG1hW2krK10g PSBtKys7PGJyPg0KLcKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgaWYgKG5lZWQgJmx0OyBhdmFpbCkgezxicj4NCivCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoGlmIChpID09IG5w YWdlcykgezxicj4NCsKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIC8qPGJyPg0KwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAqIFJl dHVybiBleGNlc3MgcGFnZXMgdG8gZmwuPGJyPg0KwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAqIEl0cyBvcmRl ciBbMCwgb2luZCkgcXVldWVzPGJyPg0KwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAqIGFyZSBlbXB0eS48YnI+ DQrCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCovPGJyPg0KLcKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgdm1fcGh5c19lbnFfcmFu Z2UobSwgYXZhaWwgLTxicj4NCi3CoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoG5lZWQsIGZsLCAxKTs8YnI+ DQotwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqByZXR1cm4gKG5wYWdlcyk7PGJyPg0KLcKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgfSBlbHNlIGlmIChpID09 IG5wYWdlcyk8YnI+DQorwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqB2bV9waHlzX2VucV9yYW5nZShtLCBhdmFpbCAt IGksPGJyPg0KK8KgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgZmwsIDEpOzxicj4NCsKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IHJldHVybiAobnBhZ2VzKTs8YnI+DQorwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqB9PGJyPg0KwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgfTxicj4NCsKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgIH08YnI+DQrCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCB9PGJyPg0KQEAgLTExNDYs NyArMTE0Myw3IEBAIG1heF9vcmRlcih2bV9wYWdlX3QgbSk8YnI+DQrCoCDCoCDCoCDCoCDCoCog YmVjYXVzZSB0aGUgc2l6ZSBvZiBhIHBoeXNpY2FsIGFkZHJlc3MgZXhjZWVkcyB0aGUgc2l6ZSBv Zjxicj4NCsKgIMKgIMKgIMKgIMKgKiBhIGxvbmcuPGJyPg0KwqAgwqAgwqAgwqAgwqAqLzxicj4N Ci3CoCDCoCDCoCDCoHJldHVybiAobWluKGZmc2woVk1fUEFHRV9UT19QSFlTKG0pICZndDsmZ3Q7 IFBBR0VfU0hJRlQpIC0gMSw8YnI+DQorwqAgwqAgwqAgwqByZXR1cm4gKG1pbihmZnNsbChWTV9Q QUdFX1RPX1BIWVMobSkgJmd0OyZndDsgUEFHRV9TSElGVCkgLSAxLDxicj4NCsKgIMKgIMKgIMKg IMKgIMKgIFZNX05GUkVFT1JERVIgLSAxKSk7PGJyPg0KwqB9PGJyPg0KPGJyPg0KQEAgLTExNjIs NiArMTE1OSw3IEBAIHZtX3BoeXNfZW5xdWV1ZV9jb250aWcodm1fcGFnZV90IG0sIHVfbG9uZyBu cGFnZXMpPGJyPg0KwqAgwqAgwqAgwqAgc3RydWN0IHZtX2ZyZWVsaXN0ICpmbDs8YnI+DQrCoCDC oCDCoCDCoCBzdHJ1Y3Qgdm1fcGh5c19zZWcgKnNlZzs8YnI+DQrCoCDCoCDCoCDCoCB2bV9wYWdl X3QgbV9lbmQ7PGJyPg0KK8KgIMKgIMKgIMKgdm1fcGFkZHJfdCBkaWZmLCBsbzs8YnI+DQrCoCDC oCDCoCDCoCBpbnQgb3JkZXI7PGJyPg0KPGJyPg0KwqAgwqAgwqAgwqAgLyo8YnI+DQpAQCAtMTE3 MywxNSArMTE3MSwxNSBAQCB2bV9waHlzX2VucXVldWVfY29udGlnKHZtX3BhZ2VfdCBtLCB1X2xv bmcgbnBhZ2VzKTxicj4NCsKgIMKgIMKgIMKgIGZsID0gKCpzZWctJmd0O2ZyZWVfcXVldWVzKVtt LSZndDtwb29sXTs8YnI+DQrCoCDCoCDCoCDCoCBtX2VuZCA9IG0gKyBucGFnZXM7PGJyPg0KwqAg wqAgwqAgwqAgLyogRnJlZSBibG9ja3Mgb2YgaW5jcmVhc2luZyBzaXplLiAqLzxicj4NCi3CoCDC oCDCoCDCoHdoaWxlICgob3JkZXIgPSBtYXhfb3JkZXIobSkpICZsdDsgVk1fTkZSRUVPUkRFUiAt IDEgJmFtcDsmYW1wOzxicj4NCi3CoCDCoCDCoCDCoCDCoCDCoG0gKyAoMSAmbHQ7Jmx0OyBvcmRl cikgJmx0Oz0gbV9lbmQpIHs8YnI+DQotwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqBLQVNTRVJUKHNl ZyA9PSAmYW1wO3ZtX3BoeXNfc2Vnc1ttLSZndDtzZWdpbmRdLDxicj4NCi3CoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCgmcXVvdDslczogcGFnZSByYW5nZSBbJXAsJXApIHNwYW5zIG11bHRp cGxlIHNlZ21lbnRzJnF1b3Q7LDxicj4NCi3CoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoF9f ZnVuY19fLCBtX2VuZCAtIG5wYWdlcywgbSkpOzxicj4NCi3CoCDCoCDCoCDCoCDCoCDCoCDCoCDC oHZtX2ZyZWVsaXN0X2FkZChmbCwgbSwgb3JkZXIsIDEpOzxicj4NCi3CoCDCoCDCoCDCoCDCoCDC oCDCoCDCoG0gKz0gMSAmbHQ7Jmx0OyBvcmRlcjs8YnI+DQorwqAgwqAgwqAgwqBsbyA9IFZNX1BB R0VfVE9fUEhZUyhtKSAmZ3Q7Jmd0OyBQQUdFX1NISUZUOzxicj4NCivCoCDCoCDCoCDCoGlmICht ICZsdDsgbV9lbmQgJmFtcDsmYW1wOzxicj4NCivCoCDCoCDCoCDCoCDCoCDCoChkaWZmID0gbG8g XiAobG8gKyBucGFnZXMgLSAxKSkgIT0gMCkgezxicj4NCivCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oG9yZGVyID0gbWluKGZsc2xsKGRpZmYpIC0gMSwgVk1fTkZSRUVPUkRFUiAtIDEpOzxicj4NCivC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoG0gPSB2bV9waHlzX2VucV9yYW5nZShtLCByb3VuZHVwMigt bG8sIDEgJmx0OyZsdDsgb3JkZXIpLCBmbCwgMSk7PGJyPg0KwqAgwqAgwqAgwqAgfTxicj4NCis8 YnI+DQrCoCDCoCDCoCDCoCAvKiBGcmVlIGJsb2NrcyBvZiBtYXhpbXVtIHNpemUuICovPGJyPg0K K8KgIMKgIMKgIMKgb3JkZXIgPSBWTV9ORlJFRU9SREVSIC0gMTs8YnI+DQrCoCDCoCDCoCDCoCB3 aGlsZSAobSArICgxICZsdDsmbHQ7IG9yZGVyKSAmbHQ7PSBtX2VuZCkgezxicj4NCsKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgIEtBU1NFUlQoc2VnID09ICZhbXA7dm1fcGh5c19zZWdzW20tJmd0O3Nl Z2luZF0sPGJyPg0KwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgKCZxdW90OyVzOiBwYWdl IHJhbmdlIFslcCwlcCkgc3BhbnMgbXVsdGlwbGUgc2VnbWVudHMmcXVvdDssPGJyPg0KQEAgLTE1 NjAsMTAgKzE1NTgsOCBAQCB2bV9waHlzX2FsbG9jX2NvbnRpZyhpbnQgZG9tYWluLCB1X2xvbmcg bnBhZ2VzLCB2bV9wYWRkcl90IGxvdywgdm1fcGFkZHJfdCBoaWdoLDxicj4NCsKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIHZtX3BoeXNfc2V0X3Bvb2woVk1fRlJFRVBPT0xfREVG QVVMVCwgbSwgb2luZCk7PGJyPg0KwqAgwqAgwqAgwqAgfTxicj4NCsKgIMKgIMKgIMKgIC8qIFJl dHVybiBleGNlc3MgcGFnZXMgdG8gdGhlIGZyZWUgbGlzdHMuICovPGJyPg0KLcKgIMKgIMKgIMKg aWYgKCZhbXA7bV9ydW5bbnBhZ2VzXSAmbHQ7IG0pIHs8YnI+DQotwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqBmbCA9ICgqcXVldWVzKVtWTV9GUkVFUE9PTF9ERUZBVUxUXTs8YnI+DQotwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqB2bV9waHlzX2VucV9yYW5nZSgmYW1wO21fcnVuW25wYWdlc10sIG0gLSAm YW1wO21fcnVuW25wYWdlc10sIGZsLCAwKTs8YnI+DQotwqAgwqAgwqAgwqB9PGJyPg0KK8KgIMKg IMKgIMKgZmwgPSAoKnF1ZXVlcylbVk1fRlJFRVBPT0xfREVGQVVMVF07PGJyPg0KK8KgIMKgIMKg IMKgdm1fcGh5c19lbnFfcmFuZ2UoJmFtcDttX3J1bltucGFnZXNdLCBtIC0gJmFtcDttX3J1bltu cGFnZXNdLCBmbCwgMCk7PGJyPg0KwqAgwqAgwqAgwqAgcmV0dXJuIChtX3J1bik7PGJyPg0KwqB9 PGJyPg0KPGJyPg0KPC9ibG9ja3F1b3RlPjwvZGl2PjwvZGl2Pg0K --000000000000675be50601ec45f2-- From nobody Wed Aug 2 09:04:33 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG5pl4bmpz4qRyt; Wed, 2 Aug 2023 09:12:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG5dc44yvz3rkF; Wed, 2 Aug 2023 09:04:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690967076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ctL+FxbJ1DcVn8LRgLwsAQ1Be+G1thkAsHe9R7WGfwc=; b=qJrLTvV7z0qKz2whF9hvPPb7f8YQ5rCsVq8YfinpuFHlhg8Tt4Qq0AnU4PXBzrQUwWdxig QaAIvciJxnxsfeMcWtge56qAR3whhZKI4B+KAD3glJVFjmPxbr76PAh3BjDqg0vOPzw3Bl pGn9mGCyPG4+C8oaDjpkc/mwSoOYg8TmHUF608uWMzG1S0T35h7JqfvdybuFtdJEJgrXzo FpnMGcRQXZt/CnRSaC9Y16+H7dVsMasxVJBppTGOYBBeV26defR+RQwoX8/LU2hUE/8Yvb TLqCksZLxxPhEQgp6JUoPAFoD4x8gVPsDMP3H8htaWUuyQRiBoCDOMHRjJNQhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690967076; a=rsa-sha256; cv=none; b=gfhRqWqSjOFHMmJOWmduxCmwMYLQ/uwLa8OtTXMUCUIC30gYNdvp180umtkewGKxlxuiIH 8YeEAFgAgiNzvm4XQbwP2lG2N14/2e/JXIlfSc2MccV3y6usnKgrg/dnghzffXuYFW/dDs ENrWJSJ1iiF6H3uQUJJnhRQjlpBJcy1cM8DW94KCATo1P12PvXb9+1JP1zrvtYDfvf45d/ wdm/3iwhX0BtktIt1gZhx2HTX2/2fpl5Rw6RvOPayC6EvT2BbAQp4lhOgy3eiQ2t2UulTJ bxCadHYAphm9UFR2xB0fxgTODiW78JntRXn9awAl+lpuRPgh0qdDH8+RwE0y7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690967076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ctL+FxbJ1DcVn8LRgLwsAQ1Be+G1thkAsHe9R7WGfwc=; b=C3Ki033zZJEe1QuPzPzthoBK0bumoHqqZq4tg+4dpYlyz6S+Rmqocy6nFzcNOiWN0/sQ9h +Ys73qnLxVaE4cBI99j11kyaetpNAjTcFeCzDVw+uxIGEBdAb4Ykwku9Z2h2e5td97XH/p NpWko8PZdA3VauvgAS7Xr7Y5GpE5iy4iJkEEMPPxLFR258eCfIEinkEQLusnuGK3v+v3sm z27Cb2kE/ieqnCA9mXtekmhdUdAMNVYZCZhpimuiReDz7hGdlsmbQUY71R36O/JEJuScX8 zWezOaNsrWhh357CyNgIvn33J3YTZt/ZdyIPlnix0ox0J+F3AIZznQEi9bBakQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG5dc1Xg0zDh8; Wed, 2 Aug 2023 09:04:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37294X6p007931; Wed, 2 Aug 2023 09:04:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37294XP3007930; Wed, 2 Aug 2023 09:04:33 GMT (envelope-from git) Date: Wed, 2 Aug 2023 09:04:33 GMT Message-Id: <202308020904.37294XP3007930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: a924b48579c7 - main - usb(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a924b48579c7a0c794431fbd3f540ce56c4cd662 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=a924b48579c7a0c794431fbd3f540ce56c4cd662 commit a924b48579c7a0c794431fbd3f540ce56c4cd662 Author: Gordon Bergling AuthorDate: 2023-08-02 09:04:24 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 09:04:24 +0000 usb(4): Fix a typo in a source code comment - s/determin/determine/ MFC after: 3 days --- sys/dev/usb/video/udl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/video/udl.c b/sys/dev/usb/video/udl.c index da0b7a201a5e..5d4c3f87e5ec 100644 --- a/sys/dev/usb/video/udl.c +++ b/sys/dev/usb/video/udl.c @@ -786,7 +786,7 @@ udl_select_chip(struct udl_softc *sc, struct usb_attach_arg *uaa) /* * WS Tech DVI is DL120 or DL160. All deviced uses the * same revision (0.04) so iSerialNumber must be used - * to determin which chip it is. + * to determine which chip it is. */ if (strlen(pserial) > 7) { From nobody Wed Aug 2 09:27:39 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG6JZ0Hljz4qSjZ; Wed, 2 Aug 2023 09:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG68D4nkLz3xwZ; Wed, 2 Aug 2023 09:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690968461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ax1m7H8Tc9lbIerZapjaUJ2FtEND2vds520CaYlgtPQ=; b=YIBGiWBseKjqfgPXhr1WB9Ea36lzoRkeNOk1VnYHpOWc76bXa+9sBpKGFb1y35E4tANaRR pkC3NkDnul1D1qs+wVUzIiI6+LTb7Pbdbys9i8ss2j68BXhwTEsI70obSezm0Yn3PXpPft v8AZlX2luSpMur4wGcxBW+ROtXY7RfSQO089wnq1eFuP4HtAHwzRjcKQESselkqoYEGCSs Ouk43X8w2QTr2al82PeLEHbn0LXwm8sKIHMPNjZA2rCe/sFKr4oRMkJCPjPIV8uXN/ExpU CPTRZwAQ2zlxBht0iOOI24FVO5fNdT3arCteXkVLB2FVufQd3l/am36SEs/LPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690968461; a=rsa-sha256; cv=none; b=OMaAcgKGqLA1nIHg/GeDJDpa+iMCpA5ZTzAg193jl41VLB4MFjPYJTox2UlEl7W5PUb2RF OpX8dKhs09EW0foYt9QTkZmaSR5El1GhoJtyNI/DiH74nh5vGw27VLuwdWys/dJdfn2a+r VLUKrqtVdGfn0zM+CFGB6/PqUfT6hVIyrGdeOGRGb/DgalIDkXwdP2eqL3I15wPJIPU/AM 8PhP1qAd6nYjhNBU7ImVNhb0k7IbytHe4mZwve398ZvIWolRixi51rKRJ7pruM00baT2Zt 76tI+EAnOmsjtTXDWTsykimKQaEP/Yjmkr5FQRYQGmahpTQvCPHO3v7pw3wdWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690968461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ax1m7H8Tc9lbIerZapjaUJ2FtEND2vds520CaYlgtPQ=; b=l+5T8TBuYH8pVQPc0rzFHADb36wxGv0PK8jsfHhkxlD9oD5plcFz5Blykv8D4T56imLius B0tEDeZDWD1AsCnGTLF+aX7F4kzw76vT7yAq21rxWsCg3Qo0peDV1lKO+nAsw8o0qYoxUV mpja7uFxmtHHCQc7MhrI1nxj408/UXoAsInnZXKvKJAvtbqpnu1hTH5848g5H6ZwBocHyD 5XzmgkzR98+pBW98AL6uKrQMegL+aEOPl7IkraMbnHXmL1njiZYkutdh4sniLSSOxwaLYf JwQeVxHNxCk5wgN/qIuj9gfMCVCfUldarOCpyWHA4KDpmdpJsYg+GHM/9rGESw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG68C5DHhzDrp; Wed, 2 Aug 2023 09:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3729RdM3040778; Wed, 2 Aug 2023 09:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3729RdvU040777; Wed, 2 Aug 2023 09:27:39 GMT (envelope-from git) Date: Wed, 2 Aug 2023 09:27:39 GMT Message-Id: <202308020927.3729RdvU040777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 11892bc710a7 - main - nfsserver: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11892bc710a741a03735b164dc089d40d7d80374 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=11892bc710a741a03735b164dc089d40d7d80374 commit 11892bc710a741a03735b164dc089d40d7d80374 Author: Gordon Bergling AuthorDate: 2023-08-02 09:27:30 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 09:27:30 +0000 nfsserver: Fix a typo in a source code comment - s/restared/restarted/ MFC after: 3 days --- sys/fs/nfsserver/nfs_nfsdstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 57bc4a6e5940..ff228554f191 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -4642,7 +4642,7 @@ nfsrv_docallback(struct nfsclient *clp, int procnum, nfsv4stateid_t *stateidp, * client somehow does an RPC without a * SequenceID Op that causes a callback just * after the nfsd threads have been terminated - * and restared we could conceivably get here + * and restarted we could conceivably get here * without a backchannel xprt. */ printf("nfsrv_docallback: no xprt\n"); From nobody Wed Aug 2 08:52:06 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG6N55XGjz4qSnC; Wed, 2 Aug 2023 09:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG5MC1jwjz3m4n; Wed, 2 Aug 2023 08:52:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690966327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3JFoO62h8epZgdXV0FcJv8/8twsUmgB/ESY7/MbRHFw=; b=GUSsLJZgLH6xChjwpD89aBFQpDCEorFMqjmzHMASwmq8qHVnWc35vUBCb+NFIJTY9PdDZC G32do3TBmE2W4BlTsDhSH2ns0kv9qtlenYeqDrBLq5cfgEsihrUxKHqC9cuTPT+yOoQN8J nnJse0cYKdYNoJX8+Drda6ZbIFkPdJekSC1YWuydX+JxhLYnfwf8bevZ/HL+7BfuvK5YLP pufTh4q9n8RXPM9MlcGUYPdqzErjFWw3TXA4xvolIkd6DhFKVfaGZNU2Oh+IaUrgx3XVzj k+2xMXYVstiuGCQquGD5kk25LicPatmLfl0eKh8XDtBAzSM+Dk48uBqxbl+OnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690966327; a=rsa-sha256; cv=none; b=Lln/+wahGjQ+CD4TpeT0YvCM6HoOR/OiTiL+PpAjUud/M8WRBFmidBjybpqZIcSkHt+aVZ bexh/ktaY8GRSzI5GjoN3xLX8FEriOp/dTrG3XN5VYcj2BBeqobiT0eBs+CNM2P69eOW1Z joWOQCOkWycTGtDiYHtpOcttBgS21dBVKAS8HmCPf7SKsS1YJ3KJRsqVtKwDaEcfJjHcsF 41AppBJNJR0eQwBdCaXlwSVkn4QwR8rN9k9VYkla4Bh16Sx/mcLO1QRYjUaXXraGd+z6LR J5kwZGeTUJVE4Ll5ayA/Gf/16jlJAeWJbbwgqMAXy5V7y9QW+ck2LJ9xASNKHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690966327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3JFoO62h8epZgdXV0FcJv8/8twsUmgB/ESY7/MbRHFw=; b=QiJU/D46f3dHL8lPFuWXb2AWsH69Mdjg/o2o3cPnRtPVE2QK82eK/S99fu7sSWuNySMCjs gwj+vyQdjmzIMqi8funt51d2+Doo+lzsQj/41ctm8Swb61CXVMU8kMXx5bRRK21LPW0XxS bqpblCVoLmx5VqOnwb5YyHdAfulik/dR1TBlcRo5iURGe0L/XlbAg8wGaptxcEXnCKhTO+ znoYpQ3bv/sb3C46rjCeodEPnVM0BIWGgwBruLSdx9I1UNgm1o7hmXR0n9iM5/HWN2NpI9 TM7Y+UgCj9xR58sj72ClYrfzRtezhIdlRLyMu7W5j9RReeHjPhfVFyWqFUUhNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG5MC0Bnlz1Cdf; Wed, 2 Aug 2023 08:52:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3728q6bY088183; Wed, 2 Aug 2023 08:52:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3728q6SZ088182; Wed, 2 Aug 2023 08:52:06 GMT (envelope-from git) Date: Wed, 2 Aug 2023 08:52:06 GMT Message-Id: <202308020852.3728q6SZ088182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 67365116239d - main - arm64: enable kern.conftxt List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67365116239d14bef225e7c5c63757ed805d48a0 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=67365116239d14bef225e7c5c63757ed805d48a0 commit 67365116239d14bef225e7c5c63757ed805d48a0 Author: Kristof Provost AuthorDate: 2023-08-01 15:22:52 +0000 Commit: Kristof Provost CommitDate: 2023-08-02 08:51:44 +0000 arm64: enable kern.conftxt Match other platforms, include the kernel config in the build. Reviewed by: emaste Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41284 --- sys/arm64/conf/std.arm64 | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index 6480ca6530e4..c8d407e8df8a 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -61,6 +61,7 @@ options MAC # TrustedBSD MAC Framework options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data +options INCLUDE_CONFIG_FILE # Include this file in kernel options VFP # Floating-point support options RACCT # Resource accounting framework options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default From nobody Wed Aug 2 09:23:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG6T56xRpz4qT5B; Wed, 2 Aug 2023 09:42:14 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from mx-out-01.fh-muenster.de (mx-out-01.fh-muenster.de [185.149.214.63]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mx.fh-muenster.de", Issuer "GEANT OV RSA CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG64R0gYBz3wyW; Wed, 2 Aug 2023 09:24:23 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Authentication-Results: mx1.freebsd.org; none Received: from mail-director-01.fh-muenster.de (mail-director-01.fh-muenster.de [185.149.215.227]) by mx-out-01.fh-muenster.de (Postfix) with ESMTPS id 5DE1720746; Wed, 2 Aug 2023 11:23:50 +0200 (CEST) Received: from smtpclient.apple (ip4d15f6ca.dynamic.kabel-deutschland.de [77.21.246.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: tuexen) by mail-director-01.fh-muenster.de (Postfix) with ESMTPSA id B4AB51A004B; Wed, 2 Aug 2023 11:23:49 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_EE90BED6-27D5-418F-BB28-2CEC87741BBE"; protocol="application/pkcs7-signature"; micalg=sha-256 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: 1a7fcf6d51eb - main - vm_phys_enqueue_contig: handle npages==0 From: tuexen@fh-muenster.de In-Reply-To: Date: Wed, 2 Aug 2023 11:23:48 +0200 Cc: Doug Moore , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, src-committers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202308020314.3723ETgj027830@gitrepo.freebsd.org> To: Dmitry Chagin X-Mailer: Apple Mail (2.3731.700.6) X-Rspamd-Queue-Id: 4RG64R0gYBz3wyW X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:185.149.212.0/22, country:DE] --Apple-Mail=_EE90BED6-27D5-418F-BB28-2CEC87741BBE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 2. Aug 2023, at 10:15, Dmitry Chagin wrote: >=20 >=20 > Hi, >=20 > With this change, I got a panic: > vm_phys_enq_range: page 0xfffffe0000000000 and pages 0 are misaligned My arm64 system also panics: panic: vm_phys_enq_range: page 0xffffa000796a7000 and npages 4294443008 = are misaligned Best regards Michael >=20 > =D0=A1=D1=80, 2 =D0=B0=D0=B2=D0=B3. 2023 =D0=B3. =D0=B2 06:22, Doug = Moore : > The branch main has been updated by dougm: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D1a7fcf6d51eb67ee3e05fdbb806f7e68= f9f53c9c >=20 > commit 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c > Author: Doug Moore > AuthorDate: 2023-08-02 03:12:00 +0000 > Commit: Doug Moore > CommitDate: 2023-08-02 03:12:00 +0000 >=20 > vm_phys_enqueue_contig: handle npages=3D=3D0 >=20 > By letting vm_phys_enqueue_contig handle the case when npages =3D=3D= 0, > the callers can stop checking it, and the compiler can stop > zero-checking with every call to ffs(). Letting = vm_phys_enqueue_contig > call vm_phys_enqueue_contig for part of its work also saves a few > bytes. >=20 > The amd64 object code shrinks by 80 bytes. >=20 > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D41154 > --- > sys/vm/vm_phys.c | 74 = +++++++++++++++++++++++++++----------------------------- > 1 file changed, 35 insertions(+), 39 deletions(-) >=20 > diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c > index 28f12231e01c..b2084bdef4e1 100644 > --- a/sys/vm/vm_phys.c > +++ b/sys/vm/vm_phys.c > @@ -72,6 +72,8 @@ __FBSDID("$FreeBSD$"); >=20 > _Static_assert(sizeof(long) * NBBY >=3D VM_PHYSSEG_MAX, > "Too many physsegs."); > +_Static_assert(sizeof(long long) >=3D sizeof(vm_paddr_t), > + "vm_paddr_t too big for ffsll, flsll."); >=20 > #ifdef NUMA > struct mem_affinity __read_mostly *mem_affinity; > @@ -690,18 +692,16 @@ vm_phys_split_pages(vm_page_t m, int oind, = struct vm_freelist *fl, int order, > * > * The physical page m's buddy must not be free. > */ > -static void > +static vm_page_t > vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, = int tail) > { > - u_int n; > int order; >=20 > - KASSERT(npages > 0, ("vm_phys_enq_range: npages is 0")); > KASSERT(((VM_PAGE_TO_PHYS(m) + npages * PAGE_SIZE) & > ((PAGE_SIZE << (fls(npages) - 1)) - 1)) =3D=3D 0, > ("vm_phys_enq_range: page %p and npages %u are = misaligned", > m, npages)); > - do { > + while (npages > 0) { > KASSERT(m->order =3D=3D VM_NFREEORDER, > ("vm_phys_enq_range: page %p has unexpected order = %d", > m, m->order)); > @@ -709,10 +709,10 @@ vm_phys_enq_range(vm_page_t m, u_int npages, = struct vm_freelist *fl, int tail) > KASSERT(order < VM_NFREEORDER, > ("vm_phys_enq_range: order %d is out of range", = order)); > vm_freelist_add(fl, m, order, tail); > - n =3D 1 << order; > - m +=3D n; > - npages -=3D n; > - } while (npages > 0); > + m +=3D 1 << order; > + npages -=3D 1 << order; > + } > + return (m); > } >=20 > /* > @@ -744,7 +744,7 @@ vm_phys_alloc_npages(int domain, int pool, int = npages, vm_page_t ma[]) > { > struct vm_freelist *alt, *fl; > vm_page_t m; > - int avail, end, flind, freelist, i, need, oind, pind; > + int avail, end, flind, freelist, i, oind, pind; >=20 > KASSERT(domain >=3D 0 && domain < vm_ndomains, > ("vm_phys_alloc_npages: domain %d is out of range", = domain)); > @@ -762,20 +762,18 @@ vm_phys_alloc_npages(int domain, int pool, int = npages, vm_page_t ma[]) > for (oind =3D 0; oind < VM_NFREEORDER; oind++) { > while ((m =3D TAILQ_FIRST(&fl[oind].pl)) !=3D = NULL) { > vm_freelist_rem(fl, m, oind); > - avail =3D 1 << oind; > - need =3D imin(npages - i, avail); > - for (end =3D i + need; i < end;) > + avail =3D i + (1 << oind); > + end =3D imin(npages, avail); > + while (i < end) > ma[i++] =3D m++; > - if (need < avail) { > + if (i =3D=3D npages) { > /* > - * Return excess pages to fl. = Its > - * order [0, oind) queues are = empty. > + * Return excess pages to fl. = Its order > + * [0, oind) queues are empty. > */ > - vm_phys_enq_range(m, avail - = need, fl, > - 1); > - return (npages); > - } else if (i =3D=3D npages) > + vm_phys_enq_range(m, avail - = i, fl, 1); > return (npages); > + } > } > } > for (oind =3D VM_NFREEORDER - 1; oind >=3D 0; oind--) = { > @@ -785,21 +783,20 @@ vm_phys_alloc_npages(int domain, int pool, int = npages, vm_page_t ma[]) > NULL) { > vm_freelist_rem(alt, m, oind); > vm_phys_set_pool(pool, m, = oind); > - avail =3D 1 << oind; > - need =3D imin(npages - i, = avail); > - for (end =3D i + need; i < = end;) > + avail =3D i + (1 << oind); > + end =3D imin(npages, avail); > + while (i < end) > ma[i++] =3D m++; > - if (need < avail) { > + if (i =3D=3D npages) { > /* > * Return excess pages = to fl. > * Its order [0, oind) = queues > * are empty. > */ > - vm_phys_enq_range(m, = avail - > - need, fl, 1); > - return (npages); > - } else if (i =3D=3D npages) > + vm_phys_enq_range(m, = avail - i, > + fl, 1); > return (npages); > + } > } > } > } > @@ -1146,7 +1143,7 @@ max_order(vm_page_t m) > * because the size of a physical address exceeds the size of > * a long. > */ > - return (min(ffsl(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1, > + return (min(ffsll(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1, > VM_NFREEORDER - 1)); > } >=20 > @@ -1162,6 +1159,7 @@ vm_phys_enqueue_contig(vm_page_t m, u_long = npages) > struct vm_freelist *fl; > struct vm_phys_seg *seg; > vm_page_t m_end; > + vm_paddr_t diff, lo; > int order; >=20 > /* > @@ -1173,15 +1171,15 @@ vm_phys_enqueue_contig(vm_page_t m, u_long = npages) > fl =3D (*seg->free_queues)[m->pool]; > m_end =3D m + npages; > /* Free blocks of increasing size. */ > - while ((order =3D max_order(m)) < VM_NFREEORDER - 1 && > - m + (1 << order) <=3D m_end) { > - KASSERT(seg =3D=3D &vm_phys_segs[m->segind], > - ("%s: page range [%p,%p) spans multiple segments", > - __func__, m_end - npages, m)); > - vm_freelist_add(fl, m, order, 1); > - m +=3D 1 << order; > + lo =3D VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT; > + if (m < m_end && > + (diff =3D lo ^ (lo + npages - 1)) !=3D 0) { > + order =3D min(flsll(diff) - 1, VM_NFREEORDER - 1); > + m =3D vm_phys_enq_range(m, roundup2(-lo, 1 << order), = fl, 1); > } > + > /* Free blocks of maximum size. */ > + order =3D VM_NFREEORDER - 1; > while (m + (1 << order) <=3D m_end) { > KASSERT(seg =3D=3D &vm_phys_segs[m->segind], > ("%s: page range [%p,%p) spans multiple segments", > @@ -1560,10 +1558,8 @@ vm_phys_alloc_contig(int domain, u_long npages, = vm_paddr_t low, vm_paddr_t high, > vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m, = oind); > } > /* Return excess pages to the free lists. */ > - if (&m_run[npages] < m) { > - fl =3D (*queues)[VM_FREEPOOL_DEFAULT]; > - vm_phys_enq_range(&m_run[npages], m - &m_run[npages], = fl, 0); > - } > + fl =3D (*queues)[VM_FREEPOOL_DEFAULT]; > + vm_phys_enq_range(&m_run[npages], m - &m_run[npages], fl, 0); > return (m_run); > } >=20 --Apple-Mail=_EE90BED6-27D5-418F-BB28-2CEC87741BBE Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCEfMw ggUSMIID+qADAgECAgkA4wvV+K8l2YEwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAkRFMSsw KQYDVQQKDCJULVN5c3RlbXMgRW50ZXJwcmlzZSBTZXJ2aWNlcyBHbWJIMR8wHQYDVQQLDBZULVN5 c3RlbXMgVHJ1c3QgQ2VudGVyMSUwIwYDVQQDDBxULVRlbGVTZWMgR2xvYmFsUm9vdCBDbGFzcyAy MB4XDTE2MDIyMjEzMzgyMloXDTMxMDIyMjIzNTk1OVowgZUxCzAJBgNVBAYTAkRFMUUwQwYDVQQK EzxWZXJlaW4genVyIEZvZXJkZXJ1bmcgZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMg ZS4gVi4xEDAOBgNVBAsTB0RGTi1QS0kxLTArBgNVBAMTJERGTi1WZXJlaW4gQ2VydGlmaWNhdGlv biBBdXRob3JpdHkgMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMtg1/9moUHN0vqH l4pzq5lN6mc5WqFggEcVToyVsuXPztNXS43O+FZsFVV2B+pG/cgDRWM+cNSrVICxI5y+NyipCf8F XRgPxJiZN7Mg9mZ4F4fCnQ7MSjLnFp2uDo0peQcAIFTcFV9Kltd4tjTTwXS1nem/wHdN6r1ZB+Ba L2w8pQDcNb1lDY9/Mm3yWmpLYgHurDg0WUU2SQXaeMpqbVvAgWsRzNI8qIv4cRrKO+KA3Ra0Z3qL NupOkSk9s1FcragMvp0049ENF4N1xDkesJQLEvHVaY4l9Lg9K7/AjsMeO6W/VRCrKq4Xl14zzsjz 9AkH4wKGMUZrAcUQDBHHWekCAwEAAaOCAXQwggFwMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU k+PYMiba1fFKpZFK4OpL4qIMz+EwHwYDVR0jBBgwFoAUv1kgNgB5oKAia4zV8mHSuCzLgkowEgYD VR0TAQH/BAgwBgEB/wIBAjAzBgNVHSAELDAqMA8GDSsGAQQBga0hgiwBAQQwDQYLKwYBBAGBrSGC LB4wCAYGZ4EMAQICMEwGA1UdHwRFMEMwQaA/oD2GO2h0dHA6Ly9wa2kwMzM2LnRlbGVzZWMuZGUv cmwvVGVsZVNlY19HbG9iYWxSb290X0NsYXNzXzIuY3JsMIGGBggrBgEFBQcBAQR6MHgwLAYIKwYB BQUHMAGGIGh0dHA6Ly9vY3NwMDMzNi50ZWxlc2VjLmRlL29jc3ByMEgGCCsGAQUFBzAChjxodHRw Oi8vcGtpMDMzNi50ZWxlc2VjLmRlL2NydC9UZWxlU2VjX0dsb2JhbFJvb3RfQ2xhc3NfMi5jZXIw DQYJKoZIhvcNAQELBQADggEBAIcL/z4Cm2XIVi3WO5qYi3FP2ropqiH5Ri71sqQPrhE4eTizDnS6 dl2e6BiClmLbTDPo3flq3zK9LExHYFV/53RrtCyD2HlrtrdNUAtmB7Xts5et6u5/MOaZ/SLick0+ hFvu+c+Z6n/XUjkurJgARH5pO7917tALOxrN5fcPImxHhPalR6D90Bo0fa3SPXez7vTXTf/D6OWS T1k+kEcQSrCFWMBvf/iu7QhCnh7U3xQuTY+8npTD5+32GPg8SecmqKc22CzeIs2LgtjZeOJVEqM7 h0S2EQvVDFKvaYwPBt/QolOLV5h7z/0HJPT8vcP9SpIClxvyt7bPZYoaorVyGTkwggWsMIIElKAD AgECAgcbY7rQHiw9MA0GCSqGSIb3DQEBCwUAMIGVMQswCQYDVQQGEwJERTFFMEMGA1UEChM8VmVy ZWluIHp1ciBGb2VyZGVydW5nIGVpbmVzIERldXRzY2hlbiBGb3JzY2h1bmdzbmV0emVzIGUuIFYu MRAwDgYDVQQLEwdERk4tUEtJMS0wKwYDVQQDEyRERk4tVmVyZWluIENlcnRpZmljYXRpb24gQXV0 aG9yaXR5IDIwHhcNMTYwNTI0MTEzODQwWhcNMzEwMjIyMjM1OTU5WjCBjTELMAkGA1UEBhMCREUx RTBDBgNVBAoMPFZlcmVpbiB6dXIgRm9lcmRlcnVuZyBlaW5lcyBEZXV0c2NoZW4gRm9yc2NodW5n c25ldHplcyBlLiBWLjEQMA4GA1UECwwHREZOLVBLSTElMCMGA1UEAwwcREZOLVZlcmVpbiBHbG9i YWwgSXNzdWluZyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ07eRxH3h+Gy8Zp 1xCeOdfZojDbchwFfylfS2jxrRnWTOFrG7ELf6Gr4HuLi9gtzm6IOhDuV+UefwRRNuu6cG1joL6W LkDh0YNMZj0cZGnlm6Stcq5oOVGHecwX064vXWNxSzl660Knl5BpBb+Q/6RAcL0D57+eGIgfn5mI TQ5HjUhfZZkQ0tkqSe3BuS0dnxLLFdM/fx5ULzquk1enfnjK1UriGuXtQX1TX8izKvWKMKztFwUk P7agCwf9TRqaA1KgNpzeJIdl5Of6x5ZzJBTN0OgbaJ4YWa52fvfRCng8h0uwN89Tyjo4EPPLR22M ZD08WkVKusqAfLjz56dMTM0CAwEAAaOCAgUwggIBMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYDVR0P AQH/BAQDAgEGMCkGA1UdIAQiMCAwDQYLKwYBBAGBrSGCLB4wDwYNKwYBBAGBrSGCLAEBBDAdBgNV HQ4EFgQUazqYi/nyU4na4K2yMh4JH+iqO3QwHwYDVR0jBBgwFoAUk+PYMiba1fFKpZFK4OpL4qIM z+EwgY8GA1UdHwSBhzCBhDBAoD6gPIY6aHR0cDovL2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9v dC1nMi1jYS9wdWIvY3JsL2NhY3JsLmNybDBAoD6gPIY6aHR0cDovL2NkcDIucGNhLmRmbi5kZS9n bG9iYWwtcm9vdC1nMi1jYS9wdWIvY3JsL2NhY3JsLmNybDCB3QYIKwYBBQUHAQEEgdAwgc0wMwYI KwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2ZXIvT0NTUDBKBggrBgEF BQcwAoY+aHR0cDovL2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9vdC1nMi1jYS9wdWIvY2FjZXJ0 L2NhY2VydC5jcnQwSgYIKwYBBQUHMAKGPmh0dHA6Ly9jZHAyLnBjYS5kZm4uZGUvZ2xvYmFsLXJv b3QtZzItY2EvcHViL2NhY2VydC9jYWNlcnQuY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQCBeEWkTqR/ DlXwCbFqPnjMaDWpHPOVnj/z+N9rOHeJLI21rT7H8pTNoAauusyosa0zCLYkhmI2THhuUPDVbmCN T1IxQ5dGdfBi5G5mUcFCMWdQ5UnnOR7Ln8qGSN4IFP8VSytmm6A4nwDO/afr0X9XLchMX9wQEZc+ lgQCXISoKTlslPwQkgZ7nu7YRrQbtQMMONncsKk/cQYLsgMHM8KNSGMlJTx6e1du94oFOO+4oK4v 9NsH1VuEGMGpuEvObJAaguS5Pfp38dIfMwK/U+d2+dwmJUFvL6Yb+qQTkPp8ftkLYF3sv8pBoGH7 EUkp2KgtdRXYShjqFu9VNCIaE40GMIIHKTCCBhGgAwIBAgIMJrRClNKRzetB0jc/MA0GCSqGSIb3 DQEBCwUAMIGNMQswCQYDVQQGEwJERTFFMEMGA1UECgw8VmVyZWluIHp1ciBGb2VyZGVydW5nIGVp bmVzIERldXRzY2hlbiBGb3JzY2h1bmdzbmV0emVzIGUuIFYuMRAwDgYDVQQLDAdERk4tUEtJMSUw IwYDVQQDDBxERk4tVmVyZWluIEdsb2JhbCBJc3N1aW5nIENBMB4XDTIyMDUzMDEzMjIxNVoXDTI1 MDUyOTEzMjIxNVowgcQxCzAJBgNVBAYTAkRFMRwwGgYDVQQIDBNOb3JkcmhlaW4tV2VzdGZhbGVu MREwDwYDVQQHDAhNdWVuc3RlcjEUMBIGA1UECgwLRkggTXVlbnN0ZXIxMjAwBgNVBAsMKUZhY2hi ZXJlaWNoIEVsZWt0cm90ZWNobmlrIHVuZCBJbmZvcm1hdGlrMQ8wDQYDVQQEDAZUdWV4ZW4xEDAO BgNVBCoMB01pY2hhZWwxFzAVBgNVBAMMDk1pY2hhZWwgVHVleGVuMIICIjANBgkqhkiG9w0BAQEF AAOCAg8AMIICCgKCAgEA2QZ7Uheto325SEnX2BTxBvYnz7u/BVmzxKlogaR4K0MA8ZcfNIdQkiJU efjL6imq21BSFsr/tXcODFZmPrvx9aIxjntCxmEFr7qFaw3e3mUIxJyj5n6BxjzZ/hyJte8LBDbj zj+e8WPUzXmYbSxtrh9kgw8NMx3+bo3Hslic+PkKEGx9JJp2I2TEs88xD0rHC2Ljwcfk6bS9jC+/ BAuY/TsbJoq+8d64DYSLGiIYbvMMuxM2C8BlpHLIOLx2FaH+uMqdH2dLVvCacZJ9YzHvvZY8O2nQ OBFCG1UMpX5YLHN8g/t02a+IBt+oe97JMdJ/kZsPjolI98dcRdzz0hTXZql2xvp6zlocm9iGTRcv dCSxy+0x4CIZD1EkVX9zCPGpzdTXnrU+zvnz14Uq3Wbfl3GiVgK0Avr1enfZepruAxAy7KGIm2zi /qY3XSkN8fvWJmYnomOjCRjaPtqS/azmnyeodsxlVhqQKbES65u/PbOXjOlhiYAvemS0IbK4iR76 3iSmkpwSNpJt6BCtFJN+w3Y8tztCP66KPPC1Fri1oj27KPaf04J66MkSjlQdpI7POS6lDyN7X2Hw tgZKRVA94h/JvZp4ld7mTzXTEW2tdO5azPILsL9xOYjSS5VIyUFF4MoxSbfZtXWaZFsMC1fXDNNL uRDrISotdwADuU75Fe0CAwEAAaOCAk4wggJKMD4GA1UdIAQ3MDUwDwYNKwYBBAGBrSGCLAEBBDAQ Bg4rBgEEAYGtIYIsAQEECjAQBg4rBgEEAYGtIYIsAgEECjAJBgNVHRMEAjAAMA4GA1UdDwEB/wQE AwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwHQYDVR0OBBYEFFDbROYIxDr3fvlX tkXqx7T8lihxMB8GA1UdIwQYMBaAFGs6mIv58lOJ2uCtsjIeCR/oqjt0MCAGA1UdEQQZMBeBFXR1 ZXhlbkBmaC1tdWVuc3Rlci5kZTCBjQYDVR0fBIGFMIGCMD+gPaA7hjlodHRwOi8vY2RwMS5wY2Eu ZGZuLmRlL2Rmbi1jYS1nbG9iYWwtZzIvcHViL2NybC9jYWNybC5jcmwwP6A9oDuGOWh0dHA6Ly9j ZHAyLnBjYS5kZm4uZGUvZGZuLWNhLWdsb2JhbC1nMi9wdWIvY3JsL2NhY3JsLmNybDCB2wYIKwYB BQUHAQEEgc4wgcswMwYIKwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2 ZXIvT0NTUDBJBggrBgEFBQcwAoY9aHR0cDovL2NkcDEucGNhLmRmbi5kZS9kZm4tY2EtZ2xvYmFs LWcyL3B1Yi9jYWNlcnQvY2FjZXJ0LmNydDBJBggrBgEFBQcwAoY9aHR0cDovL2NkcDIucGNhLmRm bi5kZS9kZm4tY2EtZ2xvYmFsLWcyL3B1Yi9jYWNlcnQvY2FjZXJ0LmNydDANBgkqhkiG9w0BAQsF AAOCAQEALubmL854icQMxKxOxQK+deXTjC6CLYnUDwB8MvnDC+BSeh3tUHT37fSgsK1ShNUSNJX0 YF0VYLfZ6+lPyaFYLArVrAIHqvDiVURaulB9NA+3gck/VSuRz4ILYBy61XbcGQQ8Wx+g6TcqsjsF oOhqEBycj5QuITj+EFmX8nvfo0dJtVa2OPDk1N9beLfQBcLhspJ/nv0pKhpNWv5YETG26YqYfsC7 FA/ZNGvRcoOPkjkDhBTtG+qq9DDD75XtGEBZhYXbnG15tn4/UV07B+UyK4/cqQSA+My5FML3YsQw EYrV9klVD/mLMOdZV5+95xt7O8IdYeHrBapVlhANH5bFazGCBJ0wggSZAgEBMIGeMIGNMQswCQYD VQQGEwJERTFFMEMGA1UECgw8VmVyZWluIHp1ciBGb2VyZGVydW5nIGVpbmVzIERldXRzY2hlbiBG b3JzY2h1bmdzbmV0emVzIGUuIFYuMRAwDgYDVQQLDAdERk4tUEtJMSUwIwYDVQQDDBxERk4tVmVy ZWluIEdsb2JhbCBJc3N1aW5nIENBAgwmtEKU0pHN60HSNz8wDQYJYIZIAWUDBAIBBQCgggHPMBgG CSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTIzMDgwMjA5MjM0OFowLwYJ KoZIhvcNAQkEMSIEIFlkHAkZLMsB2d+dzsLrCYsUa+QYF/Y5gs3fnbkYZN4UMIGvBgkrBgEEAYI3 EAQxgaEwgZ4wgY0xCzAJBgNVBAYTAkRFMUUwQwYDVQQKDDxWZXJlaW4genVyIEZvZXJkZXJ1bmcg ZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMgZS4gVi4xEDAOBgNVBAsMB0RGTi1QS0kx JTAjBgNVBAMMHERGTi1WZXJlaW4gR2xvYmFsIElzc3VpbmcgQ0ECDCa0QpTSkc3rQdI3PzCBsQYL KoZIhvcNAQkQAgsxgaGggZ4wgY0xCzAJBgNVBAYTAkRFMUUwQwYDVQQKDDxWZXJlaW4genVyIEZv ZXJkZXJ1bmcgZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMgZS4gVi4xEDAOBgNVBAsM B0RGTi1QS0kxJTAjBgNVBAMMHERGTi1WZXJlaW4gR2xvYmFsIElzc3VpbmcgQ0ECDCa0QpTSkc3r QdI3PzANBgkqhkiG9w0BAQsFAASCAgCRgRprCsXMKlRBhGE+lU4gEnNUBfWGXERJQn15DC/gRg+8 9cJNZ5MGMKtRzX8P8Abc9coA/tnhn8jjDk4Q9lyqkQqKz9ZeilkGTLyEYcQxqi+3todHgyB9CSbD 2zoipGT4DurqStepOkuRkKqCk3uXDiTWWDLnf2AfU65hQugKHoZdeN+xFYcgazX8Ytdun8el6T9F OWcN1z52WAY0HjPYO+pkJ9JJtLNz8SKViwdk5OSTYKNO4k75BPySRrLr/hnT439e/eLNOpDIzPYX NDWmcfqWrcmHpijfrkwdurslEhsHZiu8tW4l4nzdT0GqAnDFruxq2RmOdxWZAY4SMfjmjhK6WDpx qcwKg7O0pBpHgwAApdV36lmbsIq5PEGgnO/7oNbbPclHdor/G/eJFAVgHoY/Cjsgi+E7t1lKb7tn EmofQtbxWuRVHRcCZ0umztbYGZ4/MNS56Sfujp0L7uP8E1wpevLEUBVThxXyFufgVMo8pvnWtXW+ oWthg8foyDxdp5G+VbpLPKQE10PJ61jycoFo5u+15WHrfpbO8YJmf0xtnah125AMyx6zW9+ojfXf HR6+ryAbpLXkJUQCCWVIig4pJO791B8nERZcZzF9UcdvrWvfQMojVoiut0Xvt/YXc+RGjuvWhD11 Ysa//EZCS7mq6NPl/eTfMoBuhoV0ggAAAAAAAA== --Apple-Mail=_EE90BED6-27D5-418F-BB28-2CEC87741BBE-- From nobody Wed Aug 2 09:36:00 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG6Y04nFfz4qStw; Wed, 2 Aug 2023 09:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG6Ks49NJz41Hs; Wed, 2 Aug 2023 09:36:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690968962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7y5/7xKqPvWyXKbMmFSCXt44zPYkY7U2ojCRAqkQakU=; b=VOXCZyFO5AS9bC/MifcWvpXYcTRYJGE/B9YV5v1zgTZQkxpLGVsrNgSt1BwgfxtJBW2KS6 NndGPWtVcL33TbyOFG+GyS6tljWbPfZliC4bASzJ9qQ0b09dyc4ZVwDwwH3jbZsII9BnMy bbD9bRWW/4kG17s0GlAPDyWtOmy/12+teuEP0WYaKYlvuYIeL57aYKlF1WiKKoKimusUmL 1A7id9pkV8tWx/G/9ASp56/W2bKzaHXEqN6BF6wiPsunIlCaKiIFnoFojzm4hQnle/FdJn PebB+pbIFoyYSjben9zWphoF69GXGmcGpDTAge3eTHM3MWl8Xt1rTBrZsVz1Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690968962; a=rsa-sha256; cv=none; b=taSChbZ2116FjbAHVepLPEcfKdX8WoPHMwGrqnSmK8wcAqXPlnPIc7dy1mKE4a8dNZb74o V8HI0xClu3Xz0pTXrOfwZy3g3s18wid9IFdA7kV/VpGL0j6MHjFUHn+sB4A+rtMcUmQvEa q4UafZajwSeoncQuGDsMDXrTmkoVYxAy5ibAVo2gxNKw8HS8mZDXehtQBGDIC8W4gcyA+K IJBgW0RfQu3ltcu0FK1OjxwfezMboRArg2+UmE1F0KEHJRNaqcQFhIWlW1ZC6odZoWYpiL jjSKWC0xZiEoKClzro3Hu7g5ULPqRT4VNEv9U+ngp6HVKM8XEB6VXU1Yqb2qWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690968962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7y5/7xKqPvWyXKbMmFSCXt44zPYkY7U2ojCRAqkQakU=; b=m6Gdun8b0jeJ98PWVNNI6Sk3i86AD8fZvViDHJEuTNwCbKyJ7u8T1ziJ17PJZE9Txqt3bY WCo0voHWDgLvTjFwfRc8yRpQo5j77doO8WC+nujpzCVR5I2uSftbJiXq4sIoVkBrmpFv8f fkVcUT8Eg9skVsoemhdvq27US42OLCULfO87Sep3YnBFEq+utYLgmVVqqMWbHr7cEa/zOC P9RnsjUzZLdrcwQyPpKpHkwukbjSptZW6Vl7WZ0wh0714pFjrWxxUKRYVJJXYk3G/JcbLH D5wj7CYng5ejMTk3w4T/LwDigYFKY4i9tGzPMJCPyZMVQzHs7/4sOkG5XZ6/Rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG6Ks0gb4zF9G; Wed, 2 Aug 2023 09:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3729a03O056938; Wed, 2 Aug 2023 09:36:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3729a0sm056936; Wed, 2 Aug 2023 09:36:00 GMT (envelope-from git) Date: Wed, 2 Aug 2023 09:36:00 GMT Message-Id: <202308020936.3729a0sm056936@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 34db0134a6fd - main - kboot: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34db0134a6fdcfc637a81eb09c2e63c3cb225068 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=34db0134a6fdcfc637a81eb09c2e63c3cb225068 commit 34db0134a6fdcfc637a81eb09c2e63c3cb225068 Author: Gordon Bergling AuthorDate: 2023-08-02 09:35:50 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 09:35:50 +0000 kboot: Fix a typo in a source code comment - s/descriptoin/description/ MFC after: 3 days --- stand/kboot/seg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/kboot/seg.c b/stand/kboot/seg.c index 4da53e2bc75d..558cac501224 100644 --- a/stand/kboot/seg.c +++ b/stand/kboot/seg.c @@ -227,7 +227,7 @@ parse_line(const char *line, uint64_t *startp, uint64_t *endp) uint64_t start, end; /* - * Each line is a range followed by a descriptoin of the form: + * Each line is a range followed by a description of the form: * * Bail if we have any parsing errors. */ From nobody Wed Aug 2 09:49:07 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG7B01LvLz4qTw9; Wed, 2 Aug 2023 10:14:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG6d04TyZz430G; Wed, 2 Aug 2023 09:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690969748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iGQn75m90A995m45CG6m4pdJi9qd25qJarfepFSYq2k=; b=TGJVMFxUbjRliTRHy8yOuX7F1lk7m78bED9KiIgNr3vK4eAjz4sbmBWpC1q+ToNrqHrB75 ex8ANt4cD/4TmF9tGw9VuNspqhEmpM33Bg5xyTY1nRGCMcUgekcF+CQ+5ufvr+5x5vmFds PGbFxPHhvJmTIgPo33sEqfUj79F2p0i3eEjSuYqCTxZ4odijXQlk99lFtuBh1XJxpZvLui Co1mzp3uATeftHt2MtIfTfxTiyTrmQOO8HbtB2Et3J99dE1gpSckyVjGEnZmcrWnUzvDRX UqnyHrw7LQa2bDoRlohNSpCPf+FxOx7LEnMj83zmGzZ+2+2ZYwlbxzYmVDrG5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690969748; a=rsa-sha256; cv=none; b=sGA0+8SwCPFq37BDrjuwoc+zY1fNm7v5Rerp3kUm1ESZ/ofZY0f/oR3mD+DecBHDfaZQ8u kGYsbrlT08lSzD+SZ+AEHGNp9S9h6iDtMslmK6X869vxWtF3BcoB4FZqiSQOVXjWepTVlB /+jsTZvJsamNm8bE56PxhxV87S2MXORryMGW+/4bvzbf5BRhoDN0lWfdu/bBRoLFs3CntC pKruRcmwiO0I+UKOGXKc0HtY7KgcmIDzD+K7IuI9kxoFsgp7Q5gjeq76GPp48OlesweP4T aK01pRMZZY9Z8sGZPxsaH3YQC97uHD52mULlrupThKWftqTFuIZ+KXRpCz5j8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690969748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iGQn75m90A995m45CG6m4pdJi9qd25qJarfepFSYq2k=; b=ykhFyME/Tr9ehknQLgyo9zD6jQP9SXbzKKoA9ZchXHlYU1lQErSQKB6TAJA9f6VOuVFKl9 MpUSlumEgqe4zC+f/hJW3p+QSbl83teu7u447zXiPPXa12R27xoeiKdSHTqo0EWL+0CzG0 RC1Ror97CcQKByHBKYPK+c+O622PDDBMZUkJflYGo6pI6w/5BA/y4xVE/FIQuAmmqf6PZN 1gCqjuroZna4d021jgG0huk9gJeaIhQhYJHF6S15g8/mj8/k/PJMV3tQWz7eW5QbTGGl35 wYGGmc682yonQCMEU2GnmzsDG3yeVMH6uRI6h5UPtsHNThBOSLQEfITOubasTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG6d004WNzFPL; Wed, 2 Aug 2023 09:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3729n7Bp074567; Wed, 2 Aug 2023 09:49:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3729n7pr074566; Wed, 2 Aug 2023 09:49:07 GMT (envelope-from git) Date: Wed, 2 Aug 2023 09:49:07 GMT Message-Id: <202308020949.3729n7pr074566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: d3367c35cb12 - main - isp(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d3367c35cb12d4acde62ffbb72740801352cd3fc Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=d3367c35cb12d4acde62ffbb72740801352cd3fc commit d3367c35cb12d4acde62ffbb72740801352cd3fc Author: Gordon Bergling AuthorDate: 2023-08-02 09:48:46 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 09:48:46 +0000 isp(4): Fix a typo in a source code comment - s/Constatns/Constants/ Obtained from: NetBSD MFC after: 3 days --- sys/dev/isp/isp_target.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/isp/isp_target.h b/sys/dev/isp/isp_target.h index 1650c4f4dd54..8c09a54cb04c 100644 --- a/sys/dev/isp/isp_target.h +++ b/sys/dev/isp/isp_target.h @@ -71,7 +71,7 @@ typedef struct isp_notify { } isp_notify_t; /* - * Special Constatns + * Special Constants */ #define INI_ANY ((uint64_t) -1) #define VALID_INI(ini) (ini != INI_NONE && ini != INI_ANY) From nobody Wed Aug 2 09:33:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG7N10Tt9z4qV3D; Wed, 2 Aug 2023 10:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG6HL5W3Wz40h5; Wed, 2 Aug 2023 09:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690968831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bzu6IhKTcvpMh4CnhEKwZLZJIp6EhLwTGs74D+m1kQI=; b=AjsBsEEGt5We9aBIYNfAbELYiGKLIMpgQt1z6pkzf71GqFBiVmQsJCpRCQwtzucsUOcHRU jKwtyoKK3uUcqssmFEQZHeDLnH6axNvQXzJeUDYSiiIumE83qUDDn/3kIQ73Fwo5C+rcb5 tKT2ZZHF3VUvj6U3SJaQ8nhA+y60uO7hLEozSmHhBQjBxHXdC234zHpTNKzVyvUej80ctr pX81aEJVGGkQITtexnFXc8MpKw4XU2wpRAr2i0Lr2Ouyp/2khKTc1vQ4ezpzXNz7eE0Zq9 BLd99kLDA3g9pe4OKDv2TBt34ZHAuP+WE8aJEyfTI8iLRMfG/UcvLyBDYez9jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690968831; a=rsa-sha256; cv=none; b=G6TR6JQgbMx1Ih1C8PTRO7AXXDlisRScvHtNbS9LcQxbkE1+ePREOz2WOZYqSr3HmvSAim 2sP1gpcaLfJNWp1eQqTKnVvwIfsz9BdCoEc96HvzMDRP8LgoXOjASk9oHgUEERJV2ewN3z Vdq5ZZCDjmlggKtTKkvzyD2cg0qdncF1VuBoqroDmiyC7iODkt8xe1M11XRXqzUAgJndgQ MOutBin2UFUSgepsfPLlau9mT1VaUaNN4wnXWmX86ECoUhYWQoQ9u21hYU+9XqGvbPRPK9 1VjpWY/rdXGxMVi2v3kYl3KxF9vOq3gocxe3IjPz+tneAg6KJNXYd15vYHvZrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690968831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bzu6IhKTcvpMh4CnhEKwZLZJIp6EhLwTGs74D+m1kQI=; b=a6FmNhK1xoo6fT3NpuIdkRsiwSDlZ3/dNyT65digMDF8x/2H0a1zC38/x499/6EBQKWvJS AWraMPVSFjnDSyJtM2YZ0Ezu1r9cNOsB6lp64sw5G0zJKJ0gHVjV0W/FgRNoaVmR0osL7p N/ieAaelbAnVeHyOXb5eG3O/kHEFtKaIi3okxsqPpX4e4SQ/yrd05M2E/5Htx/1S7cDQo3 px7M663XbHStqymyjjEAT5h2f6UIDibrFNvZoFfL8yPHpsHgZhnqIOZ//IuBiMbb3BryqX ZToYITQf+i39i75/+y0xEsRS4iFuhi4nR8V0yW7FmsEVi0tFf76pA7ncLhOrPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG6HL2138zDxJ; Wed, 2 Aug 2023 09:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3729XoXt056544; Wed, 2 Aug 2023 09:33:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3729XolR056543; Wed, 2 Aug 2023 09:33:50 GMT (envelope-from git) Date: Wed, 2 Aug 2023 09:33:50 GMT Message-Id: <202308020933.3729XolR056543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: b7370efade86 - main - Revert "vm_phys_enqueue_contig: handle npages==0" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7370efade8667b7025c27470163601255ac21f4 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=b7370efade8667b7025c27470163601255ac21f4 commit b7370efade8667b7025c27470163601255ac21f4 Author: Doug Moore AuthorDate: 2023-08-02 09:32:08 +0000 Commit: Doug Moore CommitDate: 2023-08-02 09:33:40 +0000 Revert "vm_phys_enqueue_contig: handle npages==0" This reverts commit 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c. Peter Holm reported a problem, so I'm reverting now and looking for the problem later. --- sys/vm/vm_phys.c | 74 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index b2084bdef4e1..28f12231e01c 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -72,8 +72,6 @@ __FBSDID("$FreeBSD$"); _Static_assert(sizeof(long) * NBBY >= VM_PHYSSEG_MAX, "Too many physsegs."); -_Static_assert(sizeof(long long) >= sizeof(vm_paddr_t), - "vm_paddr_t too big for ffsll, flsll."); #ifdef NUMA struct mem_affinity __read_mostly *mem_affinity; @@ -692,16 +690,18 @@ vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, int order, * * The physical page m's buddy must not be free. */ -static vm_page_t +static void vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) { + u_int n; int order; + KASSERT(npages > 0, ("vm_phys_enq_range: npages is 0")); KASSERT(((VM_PAGE_TO_PHYS(m) + npages * PAGE_SIZE) & ((PAGE_SIZE << (fls(npages) - 1)) - 1)) == 0, ("vm_phys_enq_range: page %p and npages %u are misaligned", m, npages)); - while (npages > 0) { + do { KASSERT(m->order == VM_NFREEORDER, ("vm_phys_enq_range: page %p has unexpected order %d", m, m->order)); @@ -709,10 +709,10 @@ vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) KASSERT(order < VM_NFREEORDER, ("vm_phys_enq_range: order %d is out of range", order)); vm_freelist_add(fl, m, order, tail); - m += 1 << order; - npages -= 1 << order; - } - return (m); + n = 1 << order; + m += n; + npages -= n; + } while (npages > 0); } /* @@ -744,7 +744,7 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) { struct vm_freelist *alt, *fl; vm_page_t m; - int avail, end, flind, freelist, i, oind, pind; + int avail, end, flind, freelist, i, need, oind, pind; KASSERT(domain >= 0 && domain < vm_ndomains, ("vm_phys_alloc_npages: domain %d is out of range", domain)); @@ -762,18 +762,20 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) for (oind = 0; oind < VM_NFREEORDER; oind++) { while ((m = TAILQ_FIRST(&fl[oind].pl)) != NULL) { vm_freelist_rem(fl, m, oind); - avail = i + (1 << oind); - end = imin(npages, avail); - while (i < end) + avail = 1 << oind; + need = imin(npages - i, avail); + for (end = i + need; i < end;) ma[i++] = m++; - if (i == npages) { + if (need < avail) { /* - * Return excess pages to fl. Its order - * [0, oind) queues are empty. + * Return excess pages to fl. Its + * order [0, oind) queues are empty. */ - vm_phys_enq_range(m, avail - i, fl, 1); + vm_phys_enq_range(m, avail - need, fl, + 1); + return (npages); + } else if (i == npages) return (npages); - } } } for (oind = VM_NFREEORDER - 1; oind >= 0; oind--) { @@ -783,20 +785,21 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) NULL) { vm_freelist_rem(alt, m, oind); vm_phys_set_pool(pool, m, oind); - avail = i + (1 << oind); - end = imin(npages, avail); - while (i < end) + avail = 1 << oind; + need = imin(npages - i, avail); + for (end = i + need; i < end;) ma[i++] = m++; - if (i == npages) { + if (need < avail) { /* * Return excess pages to fl. * Its order [0, oind) queues * are empty. */ - vm_phys_enq_range(m, avail - i, - fl, 1); + vm_phys_enq_range(m, avail - + need, fl, 1); + return (npages); + } else if (i == npages) return (npages); - } } } } @@ -1143,7 +1146,7 @@ max_order(vm_page_t m) * because the size of a physical address exceeds the size of * a long. */ - return (min(ffsll(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1, + return (min(ffsl(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1, VM_NFREEORDER - 1)); } @@ -1159,7 +1162,6 @@ vm_phys_enqueue_contig(vm_page_t m, u_long npages) struct vm_freelist *fl; struct vm_phys_seg *seg; vm_page_t m_end; - vm_paddr_t diff, lo; int order; /* @@ -1171,15 +1173,15 @@ vm_phys_enqueue_contig(vm_page_t m, u_long npages) fl = (*seg->free_queues)[m->pool]; m_end = m + npages; /* Free blocks of increasing size. */ - lo = VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT; - if (m < m_end && - (diff = lo ^ (lo + npages - 1)) != 0) { - order = min(flsll(diff) - 1, VM_NFREEORDER - 1); - m = vm_phys_enq_range(m, roundup2(-lo, 1 << order), fl, 1); + while ((order = max_order(m)) < VM_NFREEORDER - 1 && + m + (1 << order) <= m_end) { + KASSERT(seg == &vm_phys_segs[m->segind], + ("%s: page range [%p,%p) spans multiple segments", + __func__, m_end - npages, m)); + vm_freelist_add(fl, m, order, 1); + m += 1 << order; } - /* Free blocks of maximum size. */ - order = VM_NFREEORDER - 1; while (m + (1 << order) <= m_end) { KASSERT(seg == &vm_phys_segs[m->segind], ("%s: page range [%p,%p) spans multiple segments", @@ -1558,8 +1560,10 @@ vm_phys_alloc_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m, oind); } /* Return excess pages to the free lists. */ - fl = (*queues)[VM_FREEPOOL_DEFAULT]; - vm_phys_enq_range(&m_run[npages], m - &m_run[npages], fl, 0); + if (&m_run[npages] < m) { + fl = (*queues)[VM_FREEPOOL_DEFAULT]; + vm_phys_enq_range(&m_run[npages], m - &m_run[npages], fl, 0); + } return (m_run); } From nobody Wed Aug 2 09:47:03 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG7V96nxxz4qTy1; Wed, 2 Aug 2023 10:28:13 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG6Zj6D6sz42n4; Wed, 2 Aug 2023 09:47:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690969630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iTsOADh88cgTa2AwqThcK+2xo8djfUnWgoNN5WdHVL8=; b=TCmoPeam3SEPFC7ljEVSaT1qJ0dOG41tvUTqa+HNKHfY+spLGC/EETJWffPR5+4oTrEeCn c1k3/8eexkrf+gqGC3Hp2wgto6tv1nse/JLeask8Z3ExRrxwMcS36bNnklMlUCt7p9+uIN Kl+D2Gu7rrPXLBpqYsdN+A3u/av4kPOhDErT+r+YlUM31RZFoi0BtzF843j0cjVuU9ywI3 9GqrYZPh7Gzo75wF/lbpZ0wpyobfGVy91oBSM571tq7WLJaSaWfsojZvaWYuJHEy3oPV6g UbrVe8+hu8Vk9ur9IUQ64KrhPN6A8t2jTHMzQ3F8be42E5uRX4xMptFcPUqFHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690969630; a=rsa-sha256; cv=none; b=OBMzRn8wzLQG9LGKjuMLGLpVXv3zPpoQpa02uIIvnSQr7oPeFJLkcdFNtSkHN5ZouSlfqG Qqag7tvjiVl3DJ1PaS7wRNyF3GS1PMw/dqI8iQGipkCoqJV3X8Wt9uitRvBaLPGfMlygDx wJup1e8ECE13OJweg9l0oQr7mcbpd3PukOihD5syM2wHbqdb7/uwLekW3L2DU+Y0AFwGxn p+nL7U8oKAsj6p0Q8bJQFn0gsx54DmpnfUbAbaY5gLO+KwOW/w5VZwKCLw5Ko4IteyAS2c 8Yj2cFU1kBTPxs5GjtfH0QqIdLAY1mm6JyXd1ImYk0zcwyuBF8im1lvEGcACxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690969630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iTsOADh88cgTa2AwqThcK+2xo8djfUnWgoNN5WdHVL8=; b=A31ZayPIqyGvjNZ7SHJcelxGkjzs8tZc7jVv6yxdXnqqYodp9wx3D76xYkGYBPAFbXjMYA DY7ZL2GFw8mC0OJHT6yolaPEB90D0m35ZfT5zl1ioZZZP8Rm1IrEsjtw8Jfrqu4eYc985h Enm5NjC7rvC+zCsw8qrEHrjNrWccar8ZFqfqAAuAwMstij5gIqNF/0pF9KbmqgUsRfvIWR Pv/zrX3yR/4rXkPXBjNmgQhLou8jwpa+rff2KKSV0M4ilRmsxtudTs34hQWBwrDkfqKCxu 2l0Od1nzQFXZb1+ty3aplxm+furJlpaVoN9xP9UgATbgNVkhpOJr4Cb5Qwdx8A== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RG6Zg690Tz19x1; Wed, 2 Aug 2023 09:47:06 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 48A064D561; Wed, 2 Aug 2023 11:47:04 +0200 (CEST) From: Kristof Provost To: Doug Moore Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1a7fcf6d51eb - main - vm_phys_enqueue_contig: handle npages==0 Date: Wed, 02 Aug 2023 11:47:03 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: <5A7123CD-C471-4DAA-8CFA-20BC3E9B1A64@FreeBSD.org> In-Reply-To: References: <202308020314.3723ETgj027830@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2 Aug 2023, at 11:36, Kristof Provost wrote: > On 2 Aug 2023, at 5:14, Doug Moore wrote: >> The branch main has been updated by dougm: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D1a7fcf6d51eb67ee3e05fdb= b806f7e68f9f53c9c >> >> commit 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c >> Author: Doug Moore >> AuthorDate: 2023-08-02 03:12:00 +0000 >> Commit: Doug Moore >> CommitDate: 2023-08-02 03:12:00 +0000 >> >> vm_phys_enqueue_contig: handle npages=3D=3D0 >> >> By letting vm_phys_enqueue_contig handle the case when npages =3D=3D= 0, >> the callers can stop checking it, and the compiler can stop >> zero-checking with every call to ffs(). Letting vm_phys_enqueue_co= ntig >> call vm_phys_enqueue_contig for part of its work also saves a few >> bytes. >> >> The amd64 object code shrinks by 80 bytes. >> >> Reviewed by: kib >> Differential Revision: https://reviews.freebsd.org/D41154 > > I suspect this commit caused my machine to fail to boot: > > WARNING: WITNESS option enabled, expect reduced performance.c data=3D= 0x180 data=3D0x > panic: vm_phys_enq_range: page 0xfffffe0000006180 and npages 429496= 7040 are misaligned > cpuid =3D 0onfigured modules... > time =3D 1rnel/if_bnxt.ko size 0x3efe8 at 0x1f50000 > KDB: stack backtrace:ize 0x6f2698 at 0x1f8f000 > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffff= fff82c03e20 > vpanic() at vpanic+0x149/frame 0xffffffff82c03e70 > panic() at panic+0x43/frame 0xffffffff82c03ed00 > vm_phys_enq_range() at vm_phys_enq_range+0x11d/frame 0xffffffff82c0= 3ee0 > vm_phys_enqueue_contig() at vm_phys_enqueue_contig+0xdd/frame 0xfff= fffff82c03f20 > vm_page_startup() at vm_page_startup+0xf3d/frame 0xffffffff82c03f90= > vm_mem_init() at vm_mem_init+0x1a/frame 0xffffffff82c03fa0 > mi_startup() at mi_startup+0x1f1/frame 0xffffffff82c03ff0 > btext() at btext+0x23 > KDB: enter: panic > > This is sufficiently early in boot that I don=E2=80=99t get a core dump= , so I hope the backtrace helps you. > > I=E2=80=99ll back out the commit locally and confirm. > And confirmed. With this commit reverted the machine boots again. Best regards, Kristof From nobody Wed Aug 2 09:15:01 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG7j14pshz4qVN0; Wed, 2 Aug 2023 10:37:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG5sg0XxNz3vwG; Wed, 2 Aug 2023 09:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690967703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cGtTnBX9ShjhOKrlppM/f4W71Rb4PYrKNzNGLTzCg6g=; b=SSIL48gbs1DJRxT0DkvHjcgreMmO54YgicRP1QZa8dFSY1UgR/NVVFxabLe8OlWU0x5r9/ XMPnEIZ1AEcJDLM2yaAaGgh24/UJ3UjC1YR19hMeS3o+pq6cWqdIUa4MTQws3lMp5ZtBCN I8Fr+iUbyEb9gXVB4H1YAIwJf4D4KW92M4a1UZvvf8/kIjOpRjWsS5kR53x9fa+25a/Lj0 ANfxmE3rDCg2PQrDMH6s/E4VYsT2xyKdKzQpV32FeKZDBbpXEU7AGd8C+9RJtyqibPv63V Dg+L5OlZUpjF9j3/Wo2Ehp1Qb+hfpzV4lcR1U5fFpMXtDHf7+g9OnnDg0DXsPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690967703; a=rsa-sha256; cv=none; b=RJ1OgPMUDlapNuV3EYlKdTr3XplqR9F0YUsWXv/8sdqeg4nHXYUr0LTPtTJ34gVmWowdmJ 7WoCjKCVdrD9seSwGl7QbYaz0sE89/PcVziMdZAGsgU1gxYp6wK5r25eONpUNwDFeufP6p /3gjtoYGJj6eHOOZz1EveuM9Iuie/zfq2fRYL78gHJf67cwKIb2I12c5IYyDVZRDhkOnas Xh/rPHE+0SKu2AohGeYtXAMcGqd4Tw7vz7EpPmlCOIN5wR8BwVZ8o4d1CAH+/YaImY1qAA R5pKqaJaIzSRiiQgHIQyc0WFXmDozHmsdQawpxo6W7pIWjy6kITqRdqEiVuDZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690967703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cGtTnBX9ShjhOKrlppM/f4W71Rb4PYrKNzNGLTzCg6g=; b=nBB8HQqJ3ZJHjBFEecCeIK1tb+sGmaVW4DQtLCXxLBqrAUhszh9WZZWc30Z3QEPtaQbHd1 uAGpS6YmE6vnbh3NI8mMrizqMf3QHs0mbf5Su9XJ+bzeY1J446mOj6XEZb5eBkWKuo0eSJ deIqPge8duBJSh6/NzBaPOkAJ53swBq5XphLBO+YQDkDD78uIUvC9ZFAM+oR4Fz+tYhYB9 HIGBRMjPk5lqBYlC22x9wWMxbn+2y5mJRGU3GlzBpXmsl14hT6XsIpyg83ADdU2tQwpcu+ hdA8gW5xFDaje1TtiPSyw8dOnHQ0eT98ca7o0xY0x8cxiSDBGq6uU0KJmSLuEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG5sd4lbPz1CtS; Wed, 2 Aug 2023 09:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3729F1Z8024259; Wed, 2 Aug 2023 09:15:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3729F1eE024258; Wed, 2 Aug 2023 09:15:01 GMT (envelope-from git) Date: Wed, 2 Aug 2023 09:15:01 GMT Message-Id: <202308020915.3729F1eE024258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 586eda6b2446 - main - cam(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 586eda6b244632d28d740e417133227b14324e3d Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=586eda6b244632d28d740e417133227b14324e3d commit 586eda6b244632d28d740e417133227b14324e3d Author: Gordon Bergling AuthorDate: 2023-08-02 09:14:53 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 09:14:53 +0000 cam(4): Fix a typo in a source code comment - s/uppper/upper/ MFC after: 3 days --- sys/cam/cam_iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index b351453b2460..215e9781f472 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -1636,7 +1636,7 @@ cam_iosched_queue_work(struct cam_iosched_softc *isc, struct bio *bp) { /* - * A BIO_SPEEDUP from the uppper layers means that they have a block + * A BIO_SPEEDUP from the upper layers means that they have a block * shortage. At the present, this is only sent when we're trying to * allocate blocks, but have a shortage before giving up. bio_length is * the size of their shortage. We will complete just enough BIO_DELETEs From nobody Wed Aug 2 09:52:06 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG7jN6zrHz4qVBY; Wed, 2 Aug 2023 10:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG6hR2JxXz43nf; Wed, 2 Aug 2023 09:52:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690969927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=InzpH1NmlCxljWLnEuJ+/DwC/bAiByZI4mbiDMRxtV8=; b=agrfdVvEJR3h8fwdzXPAiE8OaPUlhBmQRI08ImPpz/azn1GVEwjZIexUDzeFObIThexo1W PUnSQw9S82Yny8IaobIbmaos28HSqACKktmzswec2Me3YIbGEHgQfrcMRkWXkV2aExxCw9 WqOHPoO1kAc1shYPZYYh54Qh2fbzrsbHptjUmPZ4JpxNMeyKgeRLTbYBPRJ4eAjdKsy5Qa rBLTELHhpYPQlyqwsY5cI+wBRUpUsgMQimxdTkbw17vNrCTmE1LRIiq7QcCISFM34CJHhS Gc9hu4G6tiHM0KJz4C6+4mBqOkSmPD3CkcpSs2uMUWrMZu9KYFCX5E/gnJShzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690969927; a=rsa-sha256; cv=none; b=WCTZ5qNGnc7V80z7gUbHgys3w/nIVokyX/AU6Lp6ZktLxFwThgvrydnifYVUQ/+13NWZF4 3vairu19UucdyMn0FjuMd9c7GngS8AjYQ6x7Hc2ZbYhpr8gCfbpfwFdT0YKpc97M0SjOti gKXZE3M4zLHc81FsvNkugb1+gRpUWxUpasB6U5qNxMFny6cI+EOcHHaQE8RLb1b9yaeAXo dvuQG4gvNg0KmIiV9IdKY9BymfWJ8YJ/K3QYf/zOFhZGYWpgIEZCOHLfruFDy/6qP75r+s 2zfKQmJxYwaDD9UkjB/EJmg+07mJh2ePoGA2FdvtgEfQ3epf6aqDBIsKbclWjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690969927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=InzpH1NmlCxljWLnEuJ+/DwC/bAiByZI4mbiDMRxtV8=; b=eMusdEtKPRMBGaQ8bkkQMmCe7TjlLb7FndHsdPg/3oNb+q1GavtQKQTpwSB99s8fUpTmyl aS5jioes7BaGslUMZEuEG8kSu8aY8WGeLIToELp1xbE4dXwqqeUoUp+rT4vKSOF/VRtkUY 8RiakMHm7YYotLjDmLiUgWa8YIsRpSKV4RT+gfuzFdalF2Bei1xlPC9Uk1/sSuD58V6sI1 KQfShycjQmT4G6BNj10uEyS7xkLecW9Idaq/gQi3A6k84G7sb8C5Ar9O/16MWMC6q6hzyI 7EI9NYOVMPazQZQPQDT1nH2wH2UAWHJvCdh8hiBXOKkWr4dr5DAu4tuSNtta7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG6hQ1wF6zFWp; Wed, 2 Aug 2023 09:52:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3729q6ca088692; Wed, 2 Aug 2023 09:52:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3729q6cv088691; Wed, 2 Aug 2023 09:52:06 GMT (envelope-from git) Date: Wed, 2 Aug 2023 09:52:06 GMT Message-Id: <202308020952.3729q6cv088691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 2f0e0bd50633 - main - elf(3): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f0e0bd50633eafdfda503ec388151911e7383af Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=2f0e0bd50633eafdfda503ec388151911e7383af commit 2f0e0bd50633eafdfda503ec388151911e7383af Author: Gordon Bergling AuthorDate: 2023-08-02 09:51:56 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 09:51:56 +0000 elf(3): Fix a typo in a source code comment - s/speciaal/special/ MFC after: 3 days --- sys/sys/elf_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 45f0e61c33cc..1ed762e4209c 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -1161,7 +1161,7 @@ typedef struct { #define R_IA_64_PCREL22 0x7a /* immediate22 S + A - P */ #define R_IA_64_PCREL64I 0x7b /* immediate64 S + A - P */ #define R_IA_64_IPLTMSB 0x80 /* function descriptor MSB special */ -#define R_IA_64_IPLTLSB 0x81 /* function descriptor LSB speciaal */ +#define R_IA_64_IPLTLSB 0x81 /* function descriptor LSB special */ #define R_IA_64_SUB 0x85 /* immediate64 A - S */ #define R_IA_64_LTOFF22X 0x86 /* immediate22 special */ #define R_IA_64_LDXMOV 0x87 /* immediate22 special */ From nobody Wed Aug 2 09:36:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG7jr1M6fz4qVN2; Wed, 2 Aug 2023 10:38:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG6Ly3KHmz41h4; Wed, 2 Aug 2023 09:36:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690969018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7bAf8yy25riDDvmEH8ZWIRli49jXArbPTrukOX6ir8Q=; b=INxrfxQWA9WGoC5us0Y4HerMEDvCF/Tn+kNcLCP0Hn4eo5kgIpUOhuo88kbcoQBdN44d0/ WNoeQBJIeSVTQows5rAbcKuKrc4wirHet8QEUNz5rJu1rL3AAoC4bxhTo2JS4phpw32GLz WwMnuhpuPH1A/qa+jPPoCxvyPXh2+26zI0OJ8R+E57tP1o0fZQSX5Nbmzc8Q+FU5mbKIGR gOmcHchGgoD4xIuwPro8IC5gVLcdcYeR9M9ONdzD33xEk6BoYIdMY036nGldoJ38qhQ9fm vGHbg9PKvSTs4/oEUEPPKHWK4MNmFomaR5JUdSt9mP1+0oyAslBsixTCm+rtIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690969018; a=rsa-sha256; cv=none; b=r5UsUOXolzcCwvMIz7UZe7l9RJpBWFnqEML9De1lhe2GaFLMVk23pYA7NxDuV658lyuDkI +L14dO9qUnZDnw+/unCT+7yRoZTrQZ+OThkt9gjVjPko0kGeax0z32cz2NP3yVACHyVc8z SVU4ikLl7KkISTs6sbPsI/xCDfH6P/l/M6qk7iyMXwf66Tnl7xNWduNQDj2c+TBbSae3S/ VrGXrwg53AblLNOltudwFgvI0zR6tN2Yfg1ZLgqxErnTcOyaFQyQQdnY7WHE3ZQA+nSI7e cWy4+8vEYzPOEWI3AFtn3q7GXu0i4gMI9k3qWZxEOVWhALFbyP8My2dxoMuTCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690969018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7bAf8yy25riDDvmEH8ZWIRli49jXArbPTrukOX6ir8Q=; b=NbNrLEHpWoYCO86Dd822IYpVYk8+KoWlf+rg00YVifzAWDu2PIFYxO/SZyEuuLyKHSMtbR zCBhIfni6dO3TIodM3x3h6Z2BoVJ9osaBGJGnu+R8Vrs8pCnA3YjXZq+hjuFiZdydTmG2U 7bXJufP72yvwFjNprJ3ywnPwRfX8xlCLBbtPnJX5v0Dpq1pmo6f8j6pL5PQk7+/T+aYphJ 3Uy/bBMIx/HImN9t/O+N072TnDvh9y/OsdLHAMk9l09Evj/f0b70VcyU3lj5XQ/UZZf/xS R3Qp2p34XIdc1oEC9bYPHSK1mPVxfc+4FBHcfCt1fwNcaZkEMPAWge2J/zQXvA== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RG6Lw4PP5z19gH; Wed, 2 Aug 2023 09:36:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id DDB144D36B; Wed, 2 Aug 2023 11:36:51 +0200 (CEST) From: Kristof Provost To: Doug Moore Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1a7fcf6d51eb - main - vm_phys_enqueue_contig: handle npages==0 Date: Wed, 02 Aug 2023 11:36:50 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: <202308020314.3723ETgj027830@gitrepo.freebsd.org> References: <202308020314.3723ETgj027830@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_3CFB4513-DD12-42D8-BD35-4A61295ECD51_=" --=_MailMate_3CFB4513-DD12-42D8-BD35-4A61295ECD51_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2 Aug 2023, at 5:14, Doug Moore wrote: > The branch main has been updated by dougm: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D1a7fcf6d51eb67ee3e05fdbb806f7= e68f9f53c9c > > commit 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c > Author: Doug Moore > AuthorDate: 2023-08-02 03:12:00 +0000 > Commit: Doug Moore > CommitDate: 2023-08-02 03:12:00 +0000 > > vm_phys_enqueue_contig: handle npages=3D=3D0 > > By letting vm_phys_enqueue_contig handle the case when npages =3D=3D= = > 0, > the callers can stop checking it, and the compiler can stop > zero-checking with every call to ffs(). Letting = > vm_phys_enqueue_contig > call vm_phys_enqueue_contig for part of its work also saves a few > bytes. > > The amd64 object code shrinks by 80 bytes. > > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D41154 I suspect this commit caused my machine to fail to boot: WARNING: WITNESS option enabled, expect reduced performance.c = data=3D0x180 data=3D0x panic: vm_phys_enq_range: page 0xfffffe0000006180 and npages 4294967040 = are misaligned cpuid =3D 0onfigured modules... time =3D 1rnel/if_bnxt.ko size 0x3efe8 at 0x1f50000 KDB: stack backtrace:ize 0x6f2698 at 0x1f8f000 db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xffffffff82c03e20 vpanic() at vpanic+0x149/frame 0xffffffff82c03e70 panic() at panic+0x43/frame 0xffffffff82c03ed00 vm_phys_enq_range() at vm_phys_enq_range+0x11d/frame 0xffffffff82c03ee0 vm_phys_enqueue_contig() at vm_phys_enqueue_contig+0xdd/frame = 0xffffffff82c03f20 vm_page_startup() at vm_page_startup+0xf3d/frame 0xffffffff82c03f90 vm_mem_init() at vm_mem_init+0x1a/frame 0xffffffff82c03fa0 mi_startup() at mi_startup+0x1f1/frame 0xffffffff82c03ff0 btext() at btext+0x23 KDB: enter: panic This is sufficiently early in boot that I don=E2=80=99t get a core dump, = so I = hope the backtrace helps you. I=E2=80=99ll back out the commit locally and confirm. Best regards, Kristof --=_MailMate_3CFB4513-DD12-42D8-BD35-4A61295ECD51_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 2 Aug 2023, at 5:14, Doug Moore wrote:

The branch main has been updated by= dougm:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3D1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c

commit 1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c
Author: Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2023-08-02 03:12:00 +0000
Commit: Doug Moore <dougm@FreeBSD.org>
CommitDate: 2023-08-02 03:12:00 +0000

vm_phys_enqueue_contig: handle npages=3D=3D0

By letting vm_phys_enqueue_contig handle the case whe= n npages =3D=3D 0,
the callers can stop checking it, and the compiler can stop
zero-checking with every call to ffs(). Letting vm_phys_enqueue_conti= g
call vm_phys_enqueue_contig for part of its work also saves a few
bytes.

The amd64 object code shrinks by 80 bytes.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D41154

I suspect this commit caused my machine to fail to boot:<= /p>

WA=
RNING: WITNESS option enabled, expect reduced performance.c data=3D0x180 =
data=3D0x
panic: vm_phys_enq_range: page 0xfffffe0000006180 and npages 4294967040 a=
re misaligned
cpuid =3D 0onfigured modules...
time =3D 1rnel/if_bnxt.ko size 0x3efe8 at 0x1f50000
KDB: stack backtrace:ize 0x6f2698 at 0x1f8f000
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff82c=
03e20
vpanic() at vpanic+0x149/frame 0xffffffff82c03e70
panic() at panic+0x43/frame 0xffffffff82c03ed00
vm_phys_enq_range() at vm_phys_enq_range+0x11d/frame 0xffffffff82c03ee0
vm_phys_enqueue_contig() at vm_phys_enqueue_contig+0xdd/frame 0xffffffff8=
2c03f20
vm_page_startup() at vm_page_startup+0xf3d/frame 0xffffffff82c03f90
vm_mem_init() at vm_mem_init+0x1a/frame 0xffffffff82c03fa0
mi_startup() at mi_startup+0x1f1/frame 0xffffffff82c03ff0
btext() at btext+0x23
KDB: enter: panic

This is sufficiently early in boot that I don=E2=80=99t g= et a core dump, so I hope the backtrace helps you.

I=E2=80=99ll back out the commit locally and confirm.

=

Best regards,
Kristof

--=_MailMate_3CFB4513-DD12-42D8-BD35-4A61295ECD51_=-- From nobody Wed Aug 2 09:55:39 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RG86X0rnYz4qVvm; Wed, 2 Aug 2023 10:55:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RG6mY5Pplz44S7; Wed, 2 Aug 2023 09:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690970142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8wBW0GAuYLHR6KDRL3AN0dHfRUlFFMnLmGExXU8YNP4=; b=OpLjMpD5vYtUen0JVnxoqg9Hmc/7wC1zs9jBRib9N2Ygakd/WOiMtVD+ycN1JcFExMopT9 eySBy3g/rW7v0mp4r154m/cy/yHMgO6FksswpQsnBEU8GPnz8tWmU4OeshRSysnhNIxrYx rbOcIJkbSZS+FLztnJU7QtEpCXhZnJWjSC5IbN8xmZOOT5zURfvEIGpGiI+Giv3RBqq7TV w0UJFnRi+R1dwex3fRfBKKkFMkAsVLz89Ae0UfW/LGCCQ/43pSS5+00R6xt9PV5TbPyzUu 94n5BoALIs2SsXCbqSKGxdIWIVGcDzZiTsj6k6FQtJ44AE21Sdxu3eeTqS/jkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690970142; a=rsa-sha256; cv=none; b=yXRIfC+AmzP2nx1kskj3RiHHa3rXEaOpI1Cp3qbFYPm0Yt+V83/ExfXcHvSMv8S+G4Aqce DMx5p77we1fdksMhVlfVBUA7ZyxUDYo48HT0B36WIUS2kdSA+7A4l+ldAWm+4Uk5rVtoFp AdjzoeeSvqgJSFuQf6o7ll6Vo0XgBnzjweK9ekbDF5NZirvElfC4DqbB+xEzjl8zTcWLzu LYtiW8dDwrhnhxQgX/kjD/SjOpFqatJBuVHBJo7ojUO2+p7t4qounjxfDKM0FN9v6N3An0 0q+gUnE2/kA2X0zU4kiYyDJu0kcWUWRFl/nmXS5d5ch6pLaGUXtW0U/zRfxNxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690970142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8wBW0GAuYLHR6KDRL3AN0dHfRUlFFMnLmGExXU8YNP4=; b=r30Q52TND9O4t0BO4WbxKWJxrxsoMHS2GsjCjBrCsLydHBYIJdOsOXQU7rqzTVyCa4COqj Vrshm44GnKXoVxVOZlAYD1PBQiSTrbARUO1u7xD7WyQb71goZEuiHSm0DtOYv6XZjm6B2O WuDBJV5CAcaUD31XOOBWiJKcz6DVaCguKgx9EEpQ+fdh/EfXOXnh2NcolrhRcYtbg2t+Qu 2D3SlaQ9Y6beqGzuLvIRrECDn5dwsGbb4A6f+vdXzcaVP3qz71V4IoJn8K8qUxyw0IWV3P mWOJtD+dKmp4aGCpNrdKJht3EkfNalDMABlcQFUj7YxoJ3doJds/gEuVakYQYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RG6mW4mCdzFcY; Wed, 2 Aug 2023 09:55:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3729tdFN090141; Wed, 2 Aug 2023 09:55:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3729tdga090140; Wed, 2 Aug 2023 09:55:39 GMT (envelope-from git) Date: Wed, 2 Aug 2023 09:55:39 GMT Message-Id: <202308020955.3729tdga090140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 29eab3e4e0c9 - main - linux(4): Fix two typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29eab3e4e0c9a6e954b0ee858e3d4c2a9f283ea4 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=29eab3e4e0c9a6e954b0ee858e3d4c2a9f283ea4 commit 29eab3e4e0c9a6e954b0ee858e3d4c2a9f283ea4 Author: Gordon Bergling AuthorDate: 2023-08-02 09:55:30 +0000 Commit: Gordon Bergling CommitDate: 2023-08-02 09:55:30 +0000 linux(4): Fix two typos in source code comments - s/decriptors/descriptors/ MFC after: 3 days --- sys/amd64/linux32/linux32_machdep.c | 2 +- sys/i386/linux/linux_machdep.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index bcbf51082c64..29b3b99bc483 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -603,7 +603,7 @@ linux_set_thread_area(struct thread *td, /* * Semantics of Linux version: every thread in the system has array * of three TLS descriptors. 1st is GLIBC TLS, 2nd is WINE, 3rd unknown. - * This syscall loads one of the selected TLS decriptors with a value + * This syscall loads one of the selected TLS descriptors with a value * and also loads GDT descriptors 6, 7 and 8 with the content of * the per-thread descriptors. * diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index 92b37646d28d..08124202c90a 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -519,7 +519,7 @@ linux_set_thread_area(struct thread *td, struct linux_set_thread_area_args *args /* * Semantics of Linux version: every thread in the system has array of * 3 tls descriptors. 1st is GLIBC TLS, 2nd is WINE, 3rd unknown. This - * syscall loads one of the selected tls decriptors with a value and + * syscall loads one of the selected tls descriptors with a value and * also loads GDT descriptors 6, 7 and 8 with the content of the * per-thread descriptors. * From nobody Wed Aug 2 13:15:43 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGCHP6Wf9z4qbD4; Wed, 2 Aug 2023 13:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGCCQ0GLbz3jCB; Wed, 2 Aug 2023 13:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690982146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lXZ4iARTntSaqu0hOLNvCFmA1EZOm+hv7d8OTMoSkvY=; b=YhCkHlREYqGDIbr3YFoeUmEMtWzINXO5MYRuHfSQAtIQ/1MIZwU1CdhcrzVP1m23GXh3Rj DMX7ct3uVqN+L/6zzeEEBCpOJgPdSSO4HHtraxpRSvZQLgohEytMs55wjMgHyOLe/mwdhL GFSa9vqD7+HV8tgGGrA9hzkzx8iEt19Hq3OKhfRAslqWZHfzMK+kVi2mvVy0Fo0Q2093y+ iV/6XMB1LwLgFqFiMUIzUQKtWjyGPk+gRvazQbE2i8FTxgCMKDzPeEc8OuWA5fVHcI6nF9 AJOLwDePIdLEOxFKs5HOnQ0m8OTUpugCN+2cTWbQ7QUwXRbQDNev78GyXA1S6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690982146; a=rsa-sha256; cv=none; b=yasqS4PEjcHtj67fD+5GD5BNlEcBfA+L/s+pKPeu9K8Tuj+3d7aScBhjL0cBxIz55Gd62l RBWnZnJcavqwX27XzURkHiBltDyhqLEkei2uJZkuRaiZKKepkprQ5jyh/g37/rBX+TUqnc W1FM5bvzNyqHI++Qke/c0VogkjeUlrYWP/lAFmj1HR12ZrW1ZICp0iu2vpKOkRmGntYU0H 6ZweRg3TbHlUP552wUZswKDyy03qZHqZdAdnpKc8bvH9tyIiuE2GU9DvQcSJ26ozBcYQg0 iIhuuHQmkS/65BtW0oGnaBOSzT0oCVmKymGdBG0ZP2Jhnzc7FAOAbOnnnceFuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690982146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lXZ4iARTntSaqu0hOLNvCFmA1EZOm+hv7d8OTMoSkvY=; b=d+oqAV0ap2PAa5Yv85JiaPtXqMxl4VYjtHHJs3+RgzN6PS3eIRc4gkK4tuDuJaXWXj6+AQ CjAncVqDikJFtMA9wP/v9y6hXbu6McL2KeIcDYPJTJdwXi6f0F4vXXbTTbLpiHN1XZJbL/ Ktjuhqm/vsHz3JYN1D/Kq1/kBjKjgaC9kq+qTjYw1asf2FZoV1O7xyjmvASQU0HAoYS4gs AAdfFVjRBSpDWiIf7GcUbeDdoXc7DJKHMdpOwXZrjnnN5z/5HugT8gQBU0ezHZgrdb32o6 rEakOz/13dBEUFs4K31hCQ2gNF1e268a4FM65JXUwvacM5ip8wJfXvMyeiqRew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGCCP4wmKzLMq; Wed, 2 Aug 2023 13:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 372DFhrR021597; Wed, 2 Aug 2023 13:15:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 372DFhNs021596; Wed, 2 Aug 2023 13:15:43 GMT (envelope-from git) Date: Wed, 2 Aug 2023 13:15:43 GMT Message-Id: <202308021315.372DFhNs021596@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: bd16c274c382 - main - kdb: Permit a NULL thread credential in kdb_backend_permitted() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd16c274c3826926108f0539b5043c5a811cad43 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bd16c274c3826926108f0539b5043c5a811cad43 commit bd16c274c3826926108f0539b5043c5a811cad43 Author: Mark Johnston AuthorDate: 2023-08-01 21:58:42 +0000 Commit: Mark Johnston CommitDate: 2023-08-02 13:15:08 +0000 kdb: Permit a NULL thread credential in kdb_backend_permitted() Early during boot, thread0 runs with td->td_ucred == NULL. This is fixed up in proc0_init() at SI_SUB_INTRINSIC. If a panic occurs before then, rather than dereference a NULL pointer, simply allow the thread to enter KDB. Reported by: stevek Reviewed by: mhorne, stevek MFC after: 1 week Fixes: cab1056105e3 ("kdb: Modify securelevel policy") Differential Revision: https://reviews.freebsd.org/D41280 --- sys/kern/subr_kdb.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index 2f419b4d8ad5..dda21d53b6a5 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -503,11 +503,19 @@ kdb_dbbe_select(const char *name) } static bool -kdb_backend_permitted(struct kdb_dbbe *be, struct ucred *cred) +kdb_backend_permitted(struct kdb_dbbe *be, struct thread *td) { + struct ucred *cred; int error; - error = securelevel_gt(cred, kdb_enter_securelevel); + cred = td->td_ucred; + if (cred == NULL) { + KASSERT(td == &thread0 && cold, + ("%s: missing cred for %p", __func__, td)); + error = 0; + } else { + error = securelevel_gt(cred, kdb_enter_securelevel); + } #ifdef MAC /* * Give MAC a chance to weigh in on the policy: if the securelevel is @@ -776,7 +784,7 @@ kdb_trap(int type, int code, struct trapframe *tf) cngrab(); for (;;) { - if (!kdb_backend_permitted(be, curthread->td_ucred)) { + if (!kdb_backend_permitted(be, curthread)) { /* Unhandled breakpoint traps are fatal. */ handled = 1; break; From nobody Wed Aug 2 13:15:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGCVZ0GyXz4qbHF; Wed, 2 Aug 2023 13:28:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGCCP6df2z3j8f; Wed, 2 Aug 2023 13:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690982146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JrhaKXhNlaGQEf6eGRMyaarJkfJbVxAYJPXDQIQ8mJk=; b=Bc8V9RV9MWtrvwlGF7cpWuZiVRTfKNDC5kZhBcypV+3b4U93ApuoO13LnEMSIsMIggqxQt SuRt4PckkkssLXhIDBjdwka4cfq8hafIfUsSpE9tqBLnyxy4XxliFCj2Jhdpbbz7cTtRxG RrkALy6iamPrhFGqDo7ZIefR+JxegO2TYXg/Iv15xzeuylLtICnzFs6l6akJBbCBPVWD6T Nv5dxblKp5/dQutR9195Uy3V+UE5J1CmAIHkybWPqmkyaUKTdWC4qEQ6fOWmImv1WZAXAA m8368e7Ijh64yH0kugOPBgKUFALv7j28IWatQnTz0mMwWhcvz8nv5rlORal18A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690982146; a=rsa-sha256; cv=none; b=RG8/TCi//FsL1AA6bQd54bwf8MZ1jrcUS6clnH/tWy+19Dzxhm3LHuWqNvQN01M9DKCzbv amA3+reivxlI5/tn0/XwxmPVe8+zGCCuRbCxap4KnE71pQ+6xVVk5InyPCgm9/Pwz0voif zy0mqfhAevu5re08vk1ZgjMIuKqF5SDWGw7DwW8Kp4EPC7Ual0dRcrpXDYi2HOohVlkAeS fEtgnCw0AIItZgA80jgsSKi2enaj0VNyudbGE7vbbn0fF0sYx0nQ2qZLpNtxYmAcT05Cpn RY9PAA1wcyurTfS7qqh5oxKcyun2yUyTcBPndL7kZRnzUBBmv/vgseSe/b1vWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690982146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JrhaKXhNlaGQEf6eGRMyaarJkfJbVxAYJPXDQIQ8mJk=; b=m3WA5tdb9GbLRtl/8MzCXYuix+vjuRJgigCOIGIxnqppMcozSUavHoOMyfYdD1G5CS43rj agtIPGLG44ZbWA816ge2KCcoFOfdv1sEnhKelKLW6Qkaki2JmfADzDWm1rbuJ0uPpd4F3E YzcL1SaM/BGBFrRQ/onVF+zZpxQMrkKF9CLik34NRigHedlKM6X63GK4m4nDV6hQKYQ4fo aVZ8xQaxmO17LbvG5cf5WW8jEx0J2uNYzOYqjM24oUxPryYxKA8KvdSq2MGV/eB5e6LeeP jauZqkqDRqsTrLdstqAlvxXDi5AKD4//n6m+jf0eVhO0ZCB+SkKlur/8NyaVdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGCCP4wmyzLQH; Wed, 2 Aug 2023 13:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 372DFing021616; Wed, 2 Aug 2023 13:15:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 372DFig3021615; Wed, 2 Aug 2023 13:15:44 GMT (envelope-from git) Date: Wed, 2 Aug 2023 13:15:44 GMT Message-Id: <202308021315.372DFig3021615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6de02228409f - main - dtrace: Add WITH_DTRACE_ASAN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6de02228409fd2b7ca1d7e3b8d9043a105093cdd Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6de02228409fd2b7ca1d7e3b8d9043a105093cdd commit 6de02228409fd2b7ca1d7e3b8d9043a105093cdd Author: Domagoj Stolfa AuthorDate: 2023-08-02 00:10:46 +0000 Commit: Mark Johnston CommitDate: 2023-08-02 13:15:08 +0000 dtrace: Add WITH_DTRACE_ASAN See commit 4ae6991228105eb34989c870194ae7b0a1e23be4. This version of the commit avoids inadvertently changing SHLIBDIR for libdtrace.so. --- cddl/lib/libdtrace/Makefile | 10 ++++++++++ cddl/usr.sbin/dtrace/Makefile | 5 +++++ cddl/usr.sbin/lockstat/Makefile | 7 +++++++ cddl/usr.sbin/plockstat/Makefile | 7 +++++++ share/man/man5/src.conf.5 | 5 +++++ share/mk/src.opts.mk | 1 + tools/build/options/WITH_DTRACE_ASAN | 4 ++++ 7 files changed, 39 insertions(+) diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index 23cc8d2db574..da31618f581e 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -1,10 +1,15 @@ # $FreeBSD$ +SHLIBDIR?= /lib + +.include + .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libgen/common PACKAGE= dtrace LIB= dtrace + SRCS= dt_aggregate.c \ dt_as.c \ dt_buf.c \ @@ -138,6 +143,11 @@ DSRCS+= regs_aarch64.d YFLAGS+=-d +.if ${MK_DTRACE_ASAN} != "no" +CFLAGS+= -fsanitize=address -fsanitize=undefined +LDFLAGS+= -fsanitize=address -fsanitize=undefined +.endif + LIBADD= ctf elf proc pthread rtld_db CLEANFILES= dt_errtags.c dt_names.c diff --git a/cddl/usr.sbin/dtrace/Makefile b/cddl/usr.sbin/dtrace/Makefile index d8510e62fb29..fcc0668f1b1d 100644 --- a/cddl/usr.sbin/dtrace/Makefile +++ b/cddl/usr.sbin/dtrace/Makefile @@ -30,6 +30,11 @@ CFLAGS+= -DHAVE_ISSETUGID #CFLAGS+= -DNEED_ERRLOC #YFLAGS+= -d +.if ${MK_DTRACE_ASAN} != "no" +CFLAGS+= -fsanitize=address -fsanitize=undefined +LDFLAGS+= -fsanitize=address -fsanitize=undefined +.endif + LIBADD= dtrace ctf elf proc spl .if ${MK_DTRACE_TESTS} != "no" diff --git a/cddl/usr.sbin/lockstat/Makefile b/cddl/usr.sbin/lockstat/Makefile index a4bec42df367..72cedbdb20ed 100644 --- a/cddl/usr.sbin/lockstat/Makefile +++ b/cddl/usr.sbin/lockstat/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/lockstat PACKAGE= dtrace @@ -26,6 +28,11 @@ CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/sys CFLAGS+= -DHAVE_ISSETUGID +.if ${MK_DTRACE_ASAN} != "no" +CFLAGS+= -fsanitize=address -fsanitize=undefined +LDFLAGS+= -fsanitize=address -fsanitize=undefined +.endif + CFLAGS+= -DNEED_ERRLOC -g #YFLAGS+= -d diff --git a/cddl/usr.sbin/plockstat/Makefile b/cddl/usr.sbin/plockstat/Makefile index 22610870c846..41ef446c111b 100644 --- a/cddl/usr.sbin/plockstat/Makefile +++ b/cddl/usr.sbin/plockstat/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/plockstat PACKAGE= dtrace @@ -26,6 +28,11 @@ CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/sys CFLAGS+= -DHAVE_ISSETUGID +.if ${MK_DTRACE_ASAN} != "no" +CFLAGS+= -fsanitize=address -fsanitize=undefined +LDFLAGS+= -fsanitize=address -fsanitize=undefined +.endif + LIBADD= dtrace proc .include diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 3eeb3440e986..15c80af095e6 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -594,6 +594,11 @@ When set, it enforces these options: .It .Va WITHOUT_CTF .El +.It Va WITH_DTRACE_ASAN +Compile userspace DTrace code (libdtrace, dtrace(1), lockstat(1), plockstat(1)) +with address and undefined behavior sanitizers. +Requires that Clang be used as the base system compiler +and that the runtime support library is available. .It Va WITH_DTRACE_TESTS Build and install the DTrace test suite in .Pa /usr/tests/cddl/usr.sbin/dtrace . diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index bed2b718654d..155ce97e88c4 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -200,6 +200,7 @@ __DEFAULT_NO_OPTIONS = \ CLANG_FORMAT \ DETECT_TZ_CHANGES \ DISK_IMAGE_TOOLS_BOOTSTRAP \ + DTRACE_ASAN \ DTRACE_TESTS \ EXPERIMENTAL \ HESIOD \ diff --git a/tools/build/options/WITH_DTRACE_ASAN b/tools/build/options/WITH_DTRACE_ASAN new file mode 100644 index 000000000000..4240aee4b89b --- /dev/null +++ b/tools/build/options/WITH_DTRACE_ASAN @@ -0,0 +1,4 @@ +Compile userspace DTrace code (libdtrace, dtrace(1), lockstat(1), plockstat(1)) +with address and undefined behavior sanitizers. +Requires that Clang be used as the base system compiler +and that the runtime support library is available. From nobody Wed Aug 2 13:29:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGCXF5KGTz4qbd4; Wed, 2 Aug 2023 13:29:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGCWj5NY2z3jtH; Wed, 2 Aug 2023 13:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690982993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gPCPR1uJuOqOQWwQfEHe5UK9qeV9BWIPcL3uwS0CyW8=; b=DDWlG4+rKFHLnsQoH7WU4OQUitPPfNs+MH+knCCEyeG2WMGt7bo2ng3Zgj7zh+R1R7Es1w VkhCiXyCuf9kM8QoN3vaa8l5atDLa/Kt90H096nBsM8pivfPLfNEo4cThitvAklEbut4cE 6krRxlsXonXcZnFFoGfhPeAZDE17vk3C+xbVKdnWwBQThNk4bHGIT2BNm4UqSzjTtYcDbW jhiaHVax2/8g/fVZx/TLfX1WPO4PtZl1rZEDI1xwm1T4SdyPF+8W4uE1AuTFIg4KwZ8tVC MdcyEHjl0l5EwMweMSZMqbsgRt1+zkgSy2ZX3m2qFjdaNTvGC3SOuHxlOqAy2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690982993; a=rsa-sha256; cv=none; b=MV/lkYOr8diWy0tPdO8Zrcus2cheJDsDQNmHQ1w+4RlEqIec7q3+1jGJURDl9l0/IgWdZp 2ZyepOzPwVb1j08i2hWTV7ePHeqQZXx18KfLs3XBnlm/jXKeDufVWjRgYHKBWzBpnH69w2 ZMuQXpGlkaumWf86mV1TWqIl1a0Ymv+hMQ+mrculGPRfgoBDIeugKp4w7tx/XituJIbZww 2+N7V5pdIQNGCeh0zdi+cgRm9YBPpBc/JiJ8r5us2im3Qb8lVx2x+vocYxcwXrCA3VqAqK XxE2rWiyUIqWAe6Tl0J83LnO2a2/rL5FEJi6PBCA9hV8GEHbIZdRr9DeOW/G+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690982993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gPCPR1uJuOqOQWwQfEHe5UK9qeV9BWIPcL3uwS0CyW8=; b=TTBwNhPSpoalfftyhcdad5m5m6Gt+F1oQq/ZY5FAg66hI/9mPfswGp5/I5Sfb99aH23gx/ oM9xX5w69ZBjL9iqVHrfcg6NQ8xWswzQYebXnAhB/phrzb0kY9EIU3vAX5SELBaWGCB5uy De70MYML4aZ0gsSafYAbpTCVq6K8lwMnhfOUlAjg3srDSbDw0d6n4UVF0D6j5nuFjw2Ifa cSODDrYwN5Ccyr2jobsdU8+qWd6mzLBRNh9cSMWeSttI1+1BY+ZkYvVAb3nlZciOyeHgzW KWeqVwg02U9KG6PIsdzO0oEWWelbqrSFFbZyBm7L0V8t3r08v+lvn5V05K8L6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGCWj2FYCzLS8; Wed, 2 Aug 2023 13:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 372DTohw038059; Wed, 2 Aug 2023 13:29:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 372DTot5038058; Wed, 2 Aug 2023 13:29:50 GMT (envelope-from git) Date: Wed, 2 Aug 2023 13:29:50 GMT Message-Id: <202308021329.372DTot5038058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5fd1da4d8501 - main - ObsoleteFiles.inc: Add an entry for libdtrace.so.2 in /usr/lib List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fd1da4d8501a30ae3848c19f24205d4ee1e43f6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5fd1da4d8501a30ae3848c19f24205d4ee1e43f6 commit 5fd1da4d8501a30ae3848c19f24205d4ee1e43f6 Author: Mark Johnston AuthorDate: 2023-08-02 13:24:06 +0000 Commit: Mark Johnston CommitDate: 2023-08-02 13:24:06 +0000 ObsoleteFiles.inc: Add an entry for libdtrace.so.2 in /usr/lib There was a window between commits 4ae699122810 ("dtrace: Add WITH_DTRACE_ASAN") and 848ff9bc1b97 ("libdtrace: Explicitly set SHLIBDIR and SHLIB_MAJOR") where libdtrace.so.2 was being installed to /usr/lib instead of /lib. --- ObsoleteFiles.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 295d718932e9..6e93c9381c52 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,6 +52,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20230802: Remove a copy of libdtrace.so installed to the wrong path +OLD_FILES+=usr/lib/libdtrace.so.2 + # 20230726: Removal of support for the VTOC8 partitioning scheme OLD_FILES+=usr/include/sys/disk/vtoc.h OLD_FILES+=usr/include/sys/vtoc.h From nobody Wed Aug 2 13:30:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGCXF69Xfz4qbPR; Wed, 2 Aug 2023 13:30:14 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGCX529fpz3jyl; Wed, 2 Aug 2023 13:30:13 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-40fd276621aso14402451cf.2; Wed, 02 Aug 2023 06:30:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690983012; x=1691587812; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=reDbQ6z83RutWKaDY4a90USg23otLyxDM0pDp5uOHAw=; b=HKPUiGnY5ehIpSwmbt93BdKW45D2jUS2nNBiIrs3yE8kC5OReBtkXK9gNmnhdE4Z7X hNdMGhKCI4bUHUoVLT/toKGLl2w6hTRMtHVdj2adFe64SWMq3uRWSBCUi/l4yUSUFg/i JMzJ79oVXb8xnXBAmUMc4PjtxJ/Cxj+UjaAQ9XYcRYY29gXK6yloXN17wy93taQSsO+p ahnwTXmD6nxGCzCHOA6doGJE6u0h+kkBSM5mMBlDWajapxmWsceca1LotoDDgNMdwXAM cZ8WDFlgoHc6DDcQT+KajewofCret9wMI2uQqEjZ9lzWHxh4XWc+BFrGPDVvGy5kSHEv qZPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690983012; x=1691587812; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=reDbQ6z83RutWKaDY4a90USg23otLyxDM0pDp5uOHAw=; b=hAQJy8P8tyxuAkGKbDyo3JmU63zQY+lfW1FKm7XBiKhoEC9z9kzrRabe6dtfddN2CL z3JX8Vl6PJOlPpFOkLDf9fc+iBhec1L64n0kkvxxARgjP00bxKkIBoPYdnCLHlVj0lkB hTIOOwCoPQsDj04CPIZggbZZfTkpxwou9ZXThSQ0JIySqYUkFHiNygxmFbaqCio8Etaw 1S6DobvI/XumcLDkYwpm7vU8okg3cnLDBY7m02158DUXnKla+AYOyFKGteXJwifZHkw2 ueusCIhEewLIKEU8E7BSH7nPcZgenPZuy4Q5CW3pZZPU/v58sxL4TtokUPvdJ3bnQEYG 3gKw== X-Gm-Message-State: ABy/qLZS+EAdiWB7TmJs7LTZLT/RGMPMBRv+X8T3kJAIRkg3Dz7AqzWx ORgwPHxQGFHJeBs47nf4CzUmsucHb8w= X-Google-Smtp-Source: APBJJlFgzaqNl2msBIG/c9kpP/4/R1HvDO3ZltkgFpV43ICLPY0wiMjaWRkyRCXG9oler9WvtRcvHQ== X-Received: by 2002:a05:620a:809:b0:76c:99a0:46 with SMTP id s9-20020a05620a080900b0076c99a00046mr13184477qks.43.1690983011770; Wed, 02 Aug 2023 06:30:11 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id w21-20020a05620a149500b00767e62bcf0csm5027185qkj.65.2023.08.02.06.30.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 06:30:11 -0700 (PDT) Date: Wed, 2 Aug 2023 09:30:08 -0400 From: Mark Johnston To: Yuri Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5cdaac92e119 - main - dtrace: Revert the addition of WITH_DTRACE_ASAN Message-ID: References: <202308011703.371H3V7a012823@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4RGCX529fpz3jyl X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] On Wed, Aug 02, 2023 at 01:46:13AM +0200, Yuri wrote: > Mark Johnston wrote: > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=5cdaac92e119d41063d4f0155a78a4abe767f15e > > > > commit 5cdaac92e119d41063d4f0155a78a4abe767f15e > > Author: Mark Johnston > > AuthorDate: 2023-08-01 17:01:37 +0000 > > Commit: Mark Johnston > > CommitDate: 2023-08-01 17:03:10 +0000 > > > > dtrace: Revert the addition of WITH_DTRACE_ASAN > > > > The follow-up fix triggers a lib32 build failure, revert everything > > until the problem is addressed. > > --- > > cddl/lib/libdtrace/Makefile | 11 ----------- > > cddl/usr.sbin/dtrace/Makefile | 5 ----- > > cddl/usr.sbin/lockstat/Makefile | 7 ------- > > cddl/usr.sbin/plockstat/Makefile | 7 ------- > > share/man/man5/src.conf.5 | 5 ----- > > share/mk/src.opts.mk | 1 - > > tools/build/options/WITH_DTRACE_ASAN | 4 ---- > > 7 files changed, 40 deletions(-) > > I wonder if we should add the ObsoleteFiles entry removing that > unfortunate /usr/lib/libdtrace.so.5? Presumably you meant /usr/lib/libdtrace.so.2? I added an entry to ObsoleteFiles.inc. From nobody Wed Aug 2 14:22:29 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGDl057SLz4qcnj; Wed, 2 Aug 2023 14:24:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGDhQ4xtXz3tX3; Wed, 2 Aug 2023 14:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690986151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ay4zAfNq8jPu+fTGRQD5WdU3DcAMgCmP9Nkd/d7pvsE=; b=M6rWGFW9O51UxFgUUQvqFSfdgMKVb/qzQcAXyb9Q3fPa9SmgNF3ioodOpPqCD6mbxGYT+v zlH8Qv9mhjCsymyJJuG6lyGJXO3yx6Q/R0j+TjaJM2v3Ixg/rGG2ZKFfEpnQcL+T3QHhwq 9dCMbU9P2965YWHquSRWAu6W/uiixVdtrTdB/wydXlUMN2jWkv73A7D0ig2VDRPh44K2NN eotdz4WIL5gXOzEmyjUsB0ny7sdWfSSKsU6/IsJymEtIY9x0m8KKhE/UHbe5OYXUHyfuqI T+C/1DC4KkK9ntUDBoIe51AXSKsPSuk34RXZ7LKwpdnHGAbriGNxcb7hatW9+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690986151; a=rsa-sha256; cv=none; b=nvCCQCn1+RyjbC+L/FjMiv8k87CEtqOI8PO6EJrZdIcnqvkwDOC2sKWYJolMN7WP6BVdDW MVL2JLa6Jf0d52uSJVwW8bKzHrmJXSdfWIVLRmmXJzM0CSOun68MP7Jr527U2sp9A216MO KCynKL2bqI+YbDw8CXA6dy+2WXWOhR/9GGwJA/Kvsc7Ae9nlgdnkfnR39CfBFctmnozTbM +B6L61/CXSITNus3e5m9TypyN9Zr6cx3crpwbYi1gA38rHbHwGMPwTbQ/tsgVIxX+YoOho r9IKOHwvRi2Z7XhFU+E+++oHa9nOM7+x/kHEm3hKRbfxLDq7kybWFH0qAFAjlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690986151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ay4zAfNq8jPu+fTGRQD5WdU3DcAMgCmP9Nkd/d7pvsE=; b=LkMG3AKtSpjVS5Tk8wFLjrSFi6ptG8JSc2S4stcupzTaOuqhd8cIRJW0No+89nCNsaeMCL 2MDsFnpL+In4RfCdoZYYcDBjexx412GKITgmm9HKm7Rd6DRDQ3olJUNiTObaUoJ1AkAwTS Uu6r98HLdOYzOEJq6Njg0NCTtPn24aABZV3HYddCWkYGKLYv51EsF5AaXphtoh0USgM9XM Q4QhegF5MRtfX7T3FBnhw3QhmNHGHO4A1gSP8KsmIahB1F2ZH3rrZftR/AoyVBsJUu/gM7 ZHKy2nC9erypn9x1dx2d8qPilNM8jZEUtbmnT4ptX7z0U7ma0JYLKi5boSp3cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGDhP142CzMbY; Wed, 2 Aug 2023 14:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 372EMTAr037522; Wed, 2 Aug 2023 14:22:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 372EMTpp037521; Wed, 2 Aug 2023 14:22:29 GMT (envelope-from git) Date: Wed, 2 Aug 2023 14:22:29 GMT Message-Id: <202308021422.372EMTpp037521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a93cbba2deed - main - ssh: comment deprecated option handling for retired local patches List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a93cbba2deed209a30da1ecffa637bf5c61b7641 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a93cbba2deed209a30da1ecffa637bf5c61b7641 commit a93cbba2deed209a30da1ecffa637bf5c61b7641 Author: Ed Maste AuthorDate: 2023-08-02 14:18:33 +0000 Commit: Ed Maste CommitDate: 2023-08-02 14:21:34 +0000 ssh: comment deprecated option handling for retired local patches Older versions of FreeBSD included the HPN patch set and provided client-side VersionAddendum. Both of these changes have been retired but we've retained the option parsing for backwards compatibility to avoid breaking upgrades. Add comment references to the relevant commits. Sponsored by: The FreeBSD Foundation --- crypto/openssh/readconf.c | 2 ++ crypto/openssh/servconf.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/crypto/openssh/readconf.c b/crypto/openssh/readconf.c index 2cbbe8d48522..616a6e8b9bd4 100644 --- a/crypto/openssh/readconf.c +++ b/crypto/openssh/readconf.c @@ -323,12 +323,14 @@ static struct { { "requiredrsasize", oRequiredRSASize }, { "enableescapecommandline", oEnableEscapeCommandline }, + /* HPN patch - retired in 60c59fad8806 */ { "hpndisabled", oDeprecated }, { "hpnbuffersize", oDeprecated }, { "tcprcvbufpoll", oDeprecated }, { "tcprcvbuf", oDeprecated }, { "noneenabled", oUnsupported }, { "noneswitch", oUnsupported }, + /* Client VersionAddendum - retired in bffe60ead024 */ { "versionaddendum", oDeprecated }, { NULL, oBadOption } diff --git a/crypto/openssh/servconf.c b/crypto/openssh/servconf.c index 53c3ee05b9cf..de45475dbc33 100644 --- a/crypto/openssh/servconf.c +++ b/crypto/openssh/servconf.c @@ -707,10 +707,13 @@ static struct { { "unusedconnectiontimeout", sUnusedConnectionTimeout, SSHCFG_ALL }, { "useblacklist", sUseBlacklist, SSHCFG_GLOBAL }, { "useblocklist", sUseBlacklist, SSHCFG_GLOBAL }, /* alias */ + + /* HPN patch - retired in 60c59fad8806 */ { "noneenabled", sUnsupported, SSHCFG_ALL }, { "hpndisabled", sDeprecated, SSHCFG_ALL }, { "hpnbuffersize", sDeprecated, SSHCFG_ALL }, { "tcprcvbufpoll", sDeprecated, SSHCFG_ALL }, + { NULL, sBadOption, 0 } }; From nobody Wed Aug 2 14:48:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGFGK3gtmz4qf34; Wed, 2 Aug 2023 14:48:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGFGB4gS4z3xjZ; Wed, 2 Aug 2023 14:48:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690987698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zm2ansvPfzwC7kD217Zr4mBqyE5crbanj0WZRGrTlNg=; b=Q27gVaKdsbNeUqoymwAX0aJ0TyGfiU10ahmzDNiffliQ46MCncidrGNHyeUUX75FipOckk unHx42XjDrUbwV2VbPPTQnBiAcg2FMwlgu/J4D5MbSORQcCfiXRIYHPotPMu1cnjD+wFm6 eXdCbolsCaFGPhW2AacL9ZvJxIbvLHi2o8b/ywwsLHebs3AhkqrzlbVQEpK0B0ooyC0hRB HC2w61/db4LqM688ERlvr9YoRkRf2ZOm74rMMrjEHad9poAGR8xithRuUnf9Wma08eWXgI NQFmddZGqcJB/eZF2npV/tCy7ojGueZ7BPhJXf9bjTOlCIGfzsZ629nUHQZvMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690987698; a=rsa-sha256; cv=none; b=XGO0bQ4dexCNH3gECe4R0m/cW4SmrQUsmLSxWAqIDB02CiNVuFkpPiz24rb6lVgrtbPHbC kSp4eAL0dUPSkeStWVaLUSODLSwsfr6+2oMM2g2XhJ6RT9+QqCgAt5cn3/MpIBW9vdatHS fOZOX24r8XfNI9jnTehBfvCo8K11wElIxTr5MuPVBuePm9E+CEUfLxo9WOSohDX+JL/gp4 SFwCi5lDqWBDZM5DijQEM95d9em5nr3pISo9u3dpboi05QjHQoIhukhh1edDGpY/DCk9b4 fJoiA7qlYNoA94YClJQxcGpovD2ckhJW41mDzxm3v5j1ebZxte3LIrsGmtVAVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690987698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zm2ansvPfzwC7kD217Zr4mBqyE5crbanj0WZRGrTlNg=; b=W9C0nX0fyRFfRAZncvJUtaS4cK91MirZYIbbUce12mYK9e2dKdXztdCFwpLl+K2aiYoDlN 9nA5zSdzjWSkR8VC7b1O5TyqUrXBNPr65u7SXAQSdxEiUV+X0MF+YrCCiN/n3TC5qSrbP6 MNm2YDzp05sJ1yY5hmKZ9lOv89xk22B5CZu9jqrOMQU36QD8LMcI/fk9yFQeNeolp0kPJw vusVsm5YMd8AzVnjXuSjq9KylrJ4sUoH4AIGTXE5XYysIp28W1eUesradw7BMlDRAuBlEk KFwjC6vXlKAtr23z8EUZVE41f2PYiNRx98zFkla3UVLgR0tWX9SkGQ/GtII4Mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGFGB1CqdzNlL; Wed, 2 Aug 2023 14:48:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 372EmHht071088; Wed, 2 Aug 2023 14:48:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 372EmHZa071087; Wed, 2 Aug 2023 14:48:17 GMT (envelope-from git) Date: Wed, 2 Aug 2023 14:48:17 GMT Message-Id: <202308021448.372EmHZa071087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 0c783a37d5d5 - main - mii: Add the Broadcom BCM54616S ID to the list List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c783a37d5d52af8cd706eb462e73801e77c6b35 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=0c783a37d5d52af8cd706eb462e73801e77c6b35 commit 0c783a37d5d52af8cd706eb462e73801e77c6b35 Author: Justin Hibbits AuthorDate: 2023-08-02 14:05:21 +0000 Commit: Justin Hibbits CommitDate: 2023-08-02 14:47:40 +0000 mii: Add the Broadcom BCM54616S ID to the list Obtained from: Juniper Networks, Inc. Sponsored by: Juniper Networks, Inc. --- sys/dev/mii/brgphy.c | 1 + sys/dev/mii/miidevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index 74f1dbbfe5b7..4bd028041971 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -151,6 +151,7 @@ static const struct mii_phydesc brgphys[] = { #ifdef notyet /* better handled by ukphy(4) until WARs are implemented */ MII_PHY_DESC(BROADCOM2, BCM5785), #endif + MII_PHY_DESC(BROADCOM3, BCM54616S), MII_PHY_DESC(BROADCOM3, BCM54618SE), MII_PHY_DESC(BROADCOM3, BCM5717C), MII_PHY_DESC(BROADCOM3, BCM5719C), diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs index c6e1226687bb..6e2f83263e4f 100644 --- a/sys/dev/mii/miidevs +++ b/sys/dev/mii/miidevs @@ -193,6 +193,7 @@ model BROADCOM2 BCM5709C 0x003c BCM5709 10/100/1000baseT PHY model BROADCOM2 BCM5761 0x003d BCM5761 10/100/1000baseT PHY model BROADCOM2 BCM5709S 0x003f BCM5709S/5720S 1000/2500baseSX PHY model BROADCOM3 BCM54618SE 0x000d BCM54618SE 10/100/1000BASE-T PHY +model BROADCOM3 BCM54616S 0x0011 BCM54616S 10/100/1000BASE-T PHY model BROADCOM3 BCM57780 0x0019 BCM57780 1000BASE-T media interface model BROADCOM3 BCM5717C 0x0020 BCM5717C 1000BASE-T media interface model BROADCOM3 BCM5719C 0x0022 BCM5719C 1000BASE-T media interface From nobody Wed Aug 2 20:48:00 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGPFQ1c9MzZmRV; Wed, 2 Aug 2023 20:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGPFK2j7Qz3HnB; Wed, 2 Aug 2023 20:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691009285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sqPtXOAgdfF/CmOzNhEpBjswqW33dL0SAk0Xef2SvoA=; b=dlDoQX+fzuSI2sc2XMi6pIRSKNyTLJtqAdVGrzmGd+BUiji1WYK54dcxVYrbTEx762s+3d fMYS71dIx8NEd1dJnL1iP9Kot8twC9hGGEFNMubC0aUA35oORx7EeoNpg9G6g/R5DTYD4m MmCVgu8K9vciMccvl+CK0NCfzKBVhjEw9uIDNC3vt1iewPrYNpfEXgI3sWLdNo1CnqdDRI /RVpHF7jqpq/j5WpuEErIFPX1HmziGQhIdBB9ClNAnhLBQ9sGrHL3eBfWpgE5f+mDvbceP HQPb1+t+zfg9stFhrJFo0sNVEDzbJ7AftetsFN9YzudfK0KSBuzhTWZZD42Saw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691009285; a=rsa-sha256; cv=none; b=NhwrSh3Xv5XeC43tVCDRHTPLWaX/kgkWa6wPrarJmpFYhx6HGJLkol31Pj2M9q2oSy0T97 Q0R8HX0ptPQR4dCO7IxTAMxf5/4eHGdYPn6nnJN2s52q+4tagCC6avpqdhx9pGrU3RFHPX Uq7509Wt1eiUvklF60FMfyF40pbl83FmkxLODNlZMmms/LoY5dlFQ8SSsbthqoN89O4X/9 D4U9J7Ocr2msNpsYfVbP0uygJ6pT49BUCrfBccCvCJMdhOxVBd0RKFCONsOod17bTRQGoW Q2c2NXdL9xgF9rW8AdjhVkWgq3N+GHETXGW6+Vj/5tRgGIRZ+6FMETHrmwlfdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691009285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sqPtXOAgdfF/CmOzNhEpBjswqW33dL0SAk0Xef2SvoA=; b=sZZuXE57CrFnhnB2UX26S2IDllGidyz3qyr/GMA6ODiCnwjt5AdRjqmwj9lIMKnbTRtYTi HSlY6bP4rxR++pTGGSZhuykdEQChgzcN3M6CjuwwBMhT4NoT52lw/IdQLqtObkFPjWKejq pPTeUe6CClwnXq4SiOJK76ID437U5nkWK4zzm7i2lcYyhwXZSnM0day03BeAAaRH49sLKQ qZc/1Y5sDoLPKpfstMa38N1/+PZ2oCUPfOdbJrTL+eVugVeKXNqTnG4uJ6GtXYESeOCnI1 bUAAxRd10681RCQVKRQM04ZPzEVzL2GlR5Zhh8mQM6VhrUtR5k1UYhnKp3uM1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGPFJ3GP9zYLP; Wed, 2 Aug 2023 20:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 372Km0EM067045; Wed, 2 Aug 2023 20:48:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 372Km0sp067044; Wed, 2 Aug 2023 20:48:00 GMT (envelope-from git) Date: Wed, 2 Aug 2023 20:48:00 GMT Message-Id: <202308022048.372Km0sp067044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 8a5c836b51ce - main - man: fix `man -K` search List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a5c836b51ce29fb22e0692c03fbc1e405c6522f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8a5c836b51ce29fb22e0692c03fbc1e405c6522f commit 8a5c836b51ce29fb22e0692c03fbc1e405c6522f Author: Ed Maste AuthorDate: 2023-08-01 18:00:48 +0000 Commit: Ed Maste CommitDate: 2023-08-02 20:46:57 +0000 man: fix `man -K` search Quote re arg to grep in case it has spaces, and quote [:blank:] tr arg to avoid the shell interpreting []. PR: 272729 Reviewed by: Mina Galić Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41282 --- usr.bin/man/man.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 4fd6f886e87f..c95b47e2ee62 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -1000,11 +1000,11 @@ do_full_search() { gflags="${gflags} --label" set +f - for mpath in $(echo "${MANPATH}" | tr : [:blank:]); do - for section in $(echo "${MANSECT}" | tr : [:blank:]); do + for mpath in $(echo "${MANPATH}" | tr : '[:blank:]'); do + for section in $(echo "${MANSECT}" | tr : '[:blank:]'); do for manfile in ${mpath}/man${section}/*.${section}*; do mandoc "${manfile}" 2>/dev/null | - grep -E ${gflags} "${manfile}" -e ${re} + grep -E ${gflags} "${manfile}" -e "${re}" done done done From nobody Thu Aug 3 05:09:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGcN9424mz4ny94; Thu, 3 Aug 2023 05:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGcN90scPz3tTR; Thu, 3 Aug 2023 05:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691039385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cwblRsfmaLd4EQdOTy7yy5QDZ2+Pstlun1Tthgxwm78=; b=K7R+iBqgDF1QjSMGJKUsg4JvXEt2KNH460ievgYRMWxROi7LNNPRtXH4N3NRnBt7UUhN4Z D/njCVhMz29aDheBtLVSzu2q97LDWpj/g07jm7kXZNcuo2xKuJqDJY9Ny730M6aOqJLgSR AKjoZzz3Aivw+XVI3I/EU2a7+sp23pbBODWbYErpvL4Zd5Pty7Tl4TNG7QI94xMKt+tyKO 7IC326l4ErrED9jsS0H8rr1PgfPw26Y7fFj+7J9vVbJpW8raBpqI3K3rkH+phI8wGFZ1ZL +uCXhg76DKaI41S4DIDMpCCuqfup0r2i+j3dwsPr2EG4lrdv4zrhwLBTfQ7DWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691039385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cwblRsfmaLd4EQdOTy7yy5QDZ2+Pstlun1Tthgxwm78=; b=hcAp57dEndhoXEU6QpYfnPeGayKBiaiRlRvnHpXR7q/GTsuHlnEInyC9py+X2AQ3VpPYNr UA+q2L/npS+ljgzQr/YLQLzIIWTkPYcMKISnCpQcF5Pz+oTWeMiGfaGJTw8qLUJkTMw/9K qQHoWw8SsDVHmku7XYfudjnoT3C+pmxLTGfX7cLyo6lL2m1Am+FrlVgMTuRl68F6bnRQOw DGYjOExPpK5gs/OAGXEo/wj0WRL5w9RKyAGl/oXgOcWjo8Q9Emu2xOA551LrLOI5S0wW5o /WGOxmmxtsSS9wHzez8zP7ZhYw5G991WmAauu3XvuYTYjdo6K6M/UsCPMuGGxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691039385; a=rsa-sha256; cv=none; b=jLNSa52738h0DKN7B961S3ppQHfuL7M5vcwrD3tPAjM6FZsPSAb1iQSZ3dgYFAaPexkgH7 CRQG8gpS0uUXLkKuhiJvK2CJGk5bnBZDBSz5c7Khgry+c3zHYuBabgnD/j95cLhmS/yeLE XLewMD3WK+SM8kVwplE3JndSsoZMm5hoXMpeNb9ceRmpAI0X1UWwk/A7TAdbujxj9j+Bdu N/h2sTUspva8PlYT0DZOnbL1YwtYOZr9/hIbSD83yrkJkXNyXdyPKCohFd8GBbJMvl7PeZ gyUekaiGpF1PySFRTb1ISy1/G/VwZ31unKEZ4gUIZaFX8/CIfY/6KUmKjbV86g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGcN8747DzGs8; Thu, 3 Aug 2023 05:09:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37359iEm096603; Thu, 3 Aug 2023 05:09:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37359iCP096602; Thu, 3 Aug 2023 05:09:44 GMT (envelope-from git) Date: Thu, 3 Aug 2023 05:09:44 GMT Message-Id: <202308030509.37359iCP096602@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c66a499e037e - main - Cleanup debugging code in libm List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c66a499e037efd268a744e487e7d0c45a4944a9b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c66a499e037efd268a744e487e7d0c45a4944a9b commit c66a499e037efd268a744e487e7d0c45a4944a9b Author: Steve Kargl AuthorDate: 2023-07-31 22:32:54 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-03 04:27:58 +0000 Cleanup debugging code in libm David Das (das@) committed Bruce Evan's (bde's) WIP code for expl() and logl() in git revision 25a4d6bfda29119. That code included instrumentation that allowed bde to generate pari scripts used in testing/debugging. This patch removes that instrumentation as it is unlikely that others will ever use it. * math/libm/msun/src/math_private.h: . Remove bde's macros for the generation of pari scripts. * math/libm/msun/ld128/s_expl.c: * math/libm/msun/ld128/s_logl.c: * math/libm/msun/ld80/s_expl.c: * math/libm/msun/ld80/s_logl.c: . Remove bde's DOPRINT_START macro. . Change RETURNP to RETURNF. . Change RETURN2P to RETURNF. Adjust arguments as needed. . Change RETURNPI to RETURNI. . Change RETURN2PI to RETURNI. Adjust arguments as needed. PR: 272765 MFC after: 1 week --- lib/msun/ld128/s_expl.c | 28 +++++------ lib/msun/ld128/s_logl.c | 24 ++++----- lib/msun/ld80/s_expl.c | 28 +++++------ lib/msun/ld80/s_logl.c | 26 +++++----- lib/msun/src/math_private.h | 115 ++------------------------------------------ 5 files changed, 49 insertions(+), 172 deletions(-) diff --git a/lib/msun/ld128/s_expl.c b/lib/msun/ld128/s_expl.c index 5fc43802b950..0274a8f302db 100644 --- a/lib/msun/ld128/s_expl.c +++ b/lib/msun/ld128/s_expl.c @@ -65,8 +65,6 @@ expl(long double x) int k; uint16_t hx, ix; - DOPRINT_START(&x); - /* Filter out exceptional cases. */ u.e = x; hx = u.xbits.expsign; @@ -74,15 +72,15 @@ expl(long double x) if (ix >= BIAS + 13) { /* |x| >= 8192 or x is NaN */ if (ix == BIAS + LDBL_MAX_EXP) { if (hx & 0x8000) /* x is -Inf or -NaN */ - RETURNP(-1 / x); - RETURNP(x + x); /* x is +Inf or +NaN */ + RETURNF(-1 / x); + RETURNF(x + x); /* x is +Inf or +NaN */ } if (x > o_threshold) - RETURNP(huge * huge); + RETURNF(huge * huge); if (x < u_threshold) - RETURNP(tiny * tiny); + RETURNF(tiny * tiny); } else if (ix < BIAS - 114) { /* |x| < 0x1p-114 */ - RETURN2P(1, x); /* 1 with inexact iff x != 0 */ + RETURNF(1 + x); /* 1 with inexact iff x != 0 */ } ENTERI(); @@ -210,8 +208,6 @@ expm1l(long double x) int k, n, n2; uint16_t hx, ix; - DOPRINT_START(&x); - /* Filter out exceptional cases. */ u.e = x; hx = u.xbits.expsign; @@ -219,11 +215,11 @@ expm1l(long double x) if (ix >= BIAS + 7) { /* |x| >= 128 or x is NaN */ if (ix == BIAS + LDBL_MAX_EXP) { if (hx & 0x8000) /* x is -Inf or -NaN */ - RETURNP(-1 / x - 1); - RETURNP(x + x); /* x is +Inf or +NaN */ + RETURNF(-1 / x - 1); + RETURNF(x + x); /* x is +Inf or +NaN */ } if (x > o_threshold) - RETURNP(huge * huge); + RETURNF(huge * huge); /* * expm1l() never underflows, but it must avoid * unrepresentable large negative exponents. We used a @@ -232,7 +228,7 @@ expm1l(long double x) * in the same way as large ones here. */ if (hx & 0x8000) /* x <= -128 */ - RETURN2P(tiny, -1); /* good for x < -114ln2 - eps */ + RETURNF(tiny - 1); /* good for x < -114ln2 - eps */ } ENTERI(); @@ -244,7 +240,7 @@ expm1l(long double x) if (x < T3) { if (ix < BIAS - 113) { /* |x| < 0x1p-113 */ /* x (rounded) with inexact if x != 0: */ - RETURNPI(x == 0 ? x : + RETURNI(x == 0 ? x : (0x1p200 * x + fabsl(x)) * 0x1p-200); } q = x * x2 * C3 + x2 * x2 * (C4 + x * (C5 + x * (C6 + @@ -265,9 +261,9 @@ expm1l(long double x) hx2_hi = x_hi * x_hi / 2; hx2_lo = x_lo * (x + x_hi) / 2; if (ix >= BIAS - 7) - RETURN2PI(hx2_hi + x_hi, hx2_lo + x_lo + q); + RETURNI((hx2_hi + x_hi) + (hx2_lo + x_lo + q)); else - RETURN2PI(x, hx2_lo + q + hx2_hi); + RETURNI(x + (hx2_lo + q + hx2_hi)); } /* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */ diff --git a/lib/msun/ld128/s_logl.c b/lib/msun/ld128/s_logl.c index 40a22c0f1a8c..bc538840a760 100644 --- a/lib/msun/ld128/s_logl.c +++ b/lib/msun/ld128/s_logl.c @@ -573,24 +573,23 @@ log1pl(long double x) int i, k; int16_t ax, hx; - DOPRINT_START(&x); EXTRACT_LDBL128_WORDS(hx, lx, llx, x); if (hx < 0x3fff) { /* x < 1, or x neg NaN */ ax = hx & 0x7fff; if (ax >= 0x3fff) { /* x <= -1, or x neg NaN */ if (ax == 0x3fff && (lx | llx) == 0) - RETURNP(-1 / zero); /* log1p(-1) = -Inf */ + RETURNF(-1 / zero); /* log1p(-1) = -Inf */ /* log1p(x < 1, or x NaN) = qNaN: */ - RETURNP((x - x) / (x - x)); + RETURNF((x - x) / (x - x)); } if (ax <= 0x3f8d) { /* |x| < 2**-113 */ if ((int)x == 0) - RETURNP(x); /* x with inexact if x != 0 */ + RETURNF(x); /* x with inexact if x != 0 */ } f_hi = 1; f_lo = x; } else if (hx >= 0x7fff) { /* x +Inf or non-neg NaN */ - RETURNP(x + x); /* log1p(Inf or NaN) = Inf or qNaN */ + RETURNF(x + x); /* log1p(Inf or NaN) = Inf or qNaN */ } else if (hx < 0x40e1) { /* 1 <= x < 2**226 */ f_hi = x; f_lo = 1; @@ -669,7 +668,7 @@ log1pl(long double x) #endif _3sumF(val_hi, val_lo, F_hi(i) + dk * ln2_hi); - RETURN2PI(val_hi, val_lo); + RETURNI(val_hi + val_lo); } #ifdef STRUCT_RETURN @@ -680,7 +679,6 @@ logl(long double x) struct ld r; ENTERI(); - DOPRINT_START(&x); k_logl(x, &r); RETURNSPI(&r); } @@ -708,15 +706,13 @@ log10l(long double x) long double hi, lo; ENTERI(); - DOPRINT_START(&x); k_logl(x, &r); if (!r.lo_set) - RETURNPI(r.hi); + RETURNI(r.hi); _2sumF(r.hi, r.lo); hi = (float)r.hi; lo = r.lo + (r.hi - hi); - RETURN2PI(invln10_hi * hi, - invln10_lo_plus_hi * lo + invln10_lo * hi); + RETURNI(invln10_hi * hi + (invln10_lo_plus_hi * lo + invln10_lo * hi)); } long double @@ -726,15 +722,13 @@ log2l(long double x) long double hi, lo; ENTERI(); - DOPRINT_START(&x); k_logl(x, &r); if (!r.lo_set) - RETURNPI(r.hi); + RETURNI(r.hi); _2sumF(r.hi, r.lo); hi = (float)r.hi; lo = r.lo + (r.hi - hi); - RETURN2PI(invln2_hi * hi, - invln2_lo_plus_hi * lo + invln2_lo * hi); + RETURNI(invln2_hi * hi + (invln2_lo_plus_hi * lo + invln2_lo * hi)); } #endif /* STRUCT_RETURN */ diff --git a/lib/msun/ld80/s_expl.c b/lib/msun/ld80/s_expl.c index 0571377a3f8d..a41de4d6d1d8 100644 --- a/lib/msun/ld80/s_expl.c +++ b/lib/msun/ld80/s_expl.c @@ -77,8 +77,6 @@ expl(long double x) int k; uint16_t hx, ix; - DOPRINT_START(&x); - /* Filter out exceptional cases. */ u.e = x; hx = u.xbits.expsign; @@ -86,15 +84,15 @@ expl(long double x) if (ix >= BIAS + 13) { /* |x| >= 8192 or x is NaN */ if (ix == BIAS + LDBL_MAX_EXP) { if (hx & 0x8000) /* x is -Inf, -NaN or unsupported */ - RETURNP(-1 / x); - RETURNP(x + x); /* x is +Inf, +NaN or unsupported */ + RETURNF(-1 / x); + RETURNF(x + x); /* x is +Inf, +NaN or unsupported */ } if (x > o_threshold) - RETURNP(huge * huge); + RETURNF(huge * huge); if (x < u_threshold) - RETURNP(tiny * tiny); + RETURNF(tiny * tiny); } else if (ix < BIAS - 75) { /* |x| < 0x1p-75 (includes pseudos) */ - RETURN2P(1, x); /* 1 with inexact iff x != 0 */ + RETURNF(1 + x); /* 1 with inexact iff x != 0 */ } ENTERI(); @@ -168,8 +166,6 @@ expm1l(long double x) int k, n, n2; uint16_t hx, ix; - DOPRINT_START(&x); - /* Filter out exceptional cases. */ u.e = x; hx = u.xbits.expsign; @@ -177,11 +173,11 @@ expm1l(long double x) if (ix >= BIAS + 6) { /* |x| >= 64 or x is NaN */ if (ix == BIAS + LDBL_MAX_EXP) { if (hx & 0x8000) /* x is -Inf, -NaN or unsupported */ - RETURNP(-1 / x - 1); - RETURNP(x + x); /* x is +Inf, +NaN or unsupported */ + RETURNF(-1 / x - 1); + RETURNF(x + x); /* x is +Inf, +NaN or unsupported */ } if (x > o_threshold) - RETURNP(huge * huge); + RETURNF(huge * huge); /* * expm1l() never underflows, but it must avoid * unrepresentable large negative exponents. We used a @@ -190,7 +186,7 @@ expm1l(long double x) * in the same way as large ones here. */ if (hx & 0x8000) /* x <= -64 */ - RETURN2P(tiny, -1); /* good for x < -65ln2 - eps */ + RETURNF(tiny - 1); /* good for x < -65ln2 - eps */ } ENTERI(); @@ -198,7 +194,7 @@ expm1l(long double x) if (T1 < x && x < T2) { if (ix < BIAS - 74) { /* |x| < 0x1p-74 (includes pseudos) */ /* x (rounded) with inexact if x != 0: */ - RETURNPI(x == 0 ? x : + RETURNI(x == 0 ? x : (0x1p100 * x + fabsl(x)) * 0x1p-100); } @@ -219,9 +215,9 @@ expm1l(long double x) hx2_hi = x_hi * x_hi / 2; hx2_lo = x_lo * (x + x_hi) / 2; if (ix >= BIAS - 7) - RETURN2PI(hx2_hi + x_hi, hx2_lo + x_lo + q); + RETURNI((hx2_hi + x_hi) + (hx2_lo + x_lo + q)); else - RETURN2PI(x, hx2_lo + q + hx2_hi); + RETURNI(x + (hx2_lo + q + hx2_hi)); } /* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */ diff --git a/lib/msun/ld80/s_logl.c b/lib/msun/ld80/s_logl.c index dac5bfb9e25e..abe778249549 100644 --- a/lib/msun/ld80/s_logl.c +++ b/lib/msun/ld80/s_logl.c @@ -560,24 +560,23 @@ log1pl(long double x) int i, k; int16_t ax, hx; - DOPRINT_START(&x); EXTRACT_LDBL80_WORDS(hx, lx, x); if (hx < 0x3fff) { /* x < 1, or x neg NaN */ ax = hx & 0x7fff; if (ax >= 0x3fff) { /* x <= -1, or x neg NaN */ if (ax == 0x3fff && lx == 0x8000000000000000ULL) - RETURNP(-1 / zero); /* log1p(-1) = -Inf */ + RETURNF(-1 / zero); /* log1p(-1) = -Inf */ /* log1p(x < 1, or x [pseudo-]NaN) = qNaN: */ - RETURNP((x - x) / (x - x)); + RETURNF((x - x) / (x - x)); } if (ax <= 0x3fbe) { /* |x| < 2**-64 */ if ((int)x == 0) - RETURNP(x); /* x with inexact if x != 0 */ + RETURNF(x); /* x with inexact if x != 0 */ } f_hi = 1; f_lo = x; } else if (hx >= 0x7fff) { /* x +Inf or non-neg NaN */ - RETURNP(x + x); /* log1p(Inf or NaN) = Inf or qNaN */ + RETURNF(x + x); /* log1p(Inf or NaN) = Inf or qNaN */ /* log1p(pseudo-Inf) = qNaN */ /* log1p(pseudo-NaN) = qNaN */ /* log1p(unnormal) = qNaN */ @@ -658,7 +657,7 @@ log1pl(long double x) #endif _3sumF(val_hi, val_lo, F_hi(i) + dk * ln2_hi); - RETURN2PI(val_hi, val_lo); + RETURNI(val_hi + val_lo); } #ifdef STRUCT_RETURN @@ -669,7 +668,6 @@ logl(long double x) struct ld r; ENTERI(); - DOPRINT_START(&x); k_logl(x, &r); RETURNSPI(&r); } @@ -690,15 +688,14 @@ log10l(long double x) long double hi, lo; ENTERI(); - DOPRINT_START(&x); k_logl(x, &r); if (!r.lo_set) - RETURNPI(r.hi); + RETURNI(r.hi); _2sumF(r.hi, r.lo); hi = (float)r.hi; lo = r.lo + (r.hi - hi); - RETURN2PI(invln10_hi * hi, - invln10_lo_plus_hi * lo + invln10_lo * hi); + RETURNI(invln10_hi * hi + + (invln10_lo_plus_hi * lo + invln10_lo * hi)); } long double @@ -708,15 +705,14 @@ log2l(long double x) long double hi, lo; ENTERI(); - DOPRINT_START(&x); k_logl(x, &r); if (!r.lo_set) - RETURNPI(r.hi); + RETURNI(r.hi); _2sumF(r.hi, r.lo); hi = (float)r.hi; lo = r.lo + (r.hi - hi); - RETURN2PI(invln2_hi * hi, - invln2_lo_plus_hi * lo + invln2_lo * hi); + RETURNI(invln2_hi * hi + + (invln2_lo_plus_hi * lo + invln2_lo * hi)); } #endif /* STRUCT_RETURN */ diff --git a/lib/msun/src/math_private.h b/lib/msun/src/math_private.h index ec2da21f955c..a853ad4f9b4c 100644 --- a/lib/msun/src/math_private.h +++ b/lib/msun/src/math_private.h @@ -698,127 +698,22 @@ irintl(long double x) #endif #endif -/* Write a pari script to test things externally. */ -#ifdef DOPRINT -#include - -#ifndef DOPRINT_SWIZZLE -#define DOPRINT_SWIZZLE 0 -#endif - -#ifdef DOPRINT_LD80 - -#define DOPRINT_START(xp) do { \ - uint64_t __lx; \ - uint16_t __hx; \ - \ - /* Hack to give more-problematic args. */ \ - EXTRACT_LDBL80_WORDS(__hx, __lx, *xp); \ - __lx ^= DOPRINT_SWIZZLE; \ - INSERT_LDBL80_WORDS(*xp, __hx, __lx); \ - printf("x = %.21Lg; ", (long double)*xp); \ -} while (0) -#define DOPRINT_END1(v) \ - printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v)) -#define DOPRINT_END2(hi, lo) \ - printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n", \ - (long double)(hi), (long double)(lo)) - -#elif defined(DOPRINT_D64) - -#define DOPRINT_START(xp) do { \ - uint32_t __hx, __lx; \ - \ - EXTRACT_WORDS(__hx, __lx, *xp); \ - __lx ^= DOPRINT_SWIZZLE; \ - INSERT_WORDS(*xp, __hx, __lx); \ - printf("x = %.21Lg; ", (long double)*xp); \ -} while (0) -#define DOPRINT_END1(v) \ - printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v)) -#define DOPRINT_END2(hi, lo) \ - printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n", \ - (long double)(hi), (long double)(lo)) - -#elif defined(DOPRINT_F32) - -#define DOPRINT_START(xp) do { \ - uint32_t __hx; \ - \ - GET_FLOAT_WORD(__hx, *xp); \ - __hx ^= DOPRINT_SWIZZLE; \ - SET_FLOAT_WORD(*xp, __hx); \ - printf("x = %.21Lg; ", (long double)*xp); \ -} while (0) -#define DOPRINT_END1(v) \ - printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v)) -#define DOPRINT_END2(hi, lo) \ - printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n", \ - (long double)(hi), (long double)(lo)) - -#else /* !DOPRINT_LD80 && !DOPRINT_D64 (LD128 only) */ - -#ifndef DOPRINT_SWIZZLE_HIGH -#define DOPRINT_SWIZZLE_HIGH 0 -#endif - -#define DOPRINT_START(xp) do { \ - uint64_t __lx, __llx; \ - uint16_t __hx; \ - \ - EXTRACT_LDBL128_WORDS(__hx, __lx, __llx, *xp); \ - __llx ^= DOPRINT_SWIZZLE; \ - __lx ^= DOPRINT_SWIZZLE_HIGH; \ - INSERT_LDBL128_WORDS(*xp, __hx, __lx, __llx); \ - printf("x = %.36Lg; ", (long double)*xp); \ -} while (0) -#define DOPRINT_END1(v) \ - printf("y = %.36Lg; z = 0; show(x, y, z);\n", (long double)(v)) -#define DOPRINT_END2(hi, lo) \ - printf("y = %.36Lg; z = %.36Lg; show(x, y, z);\n", \ - (long double)(hi), (long double)(lo)) - -#endif /* DOPRINT_LD80 */ - -#else /* !DOPRINT */ -#define DOPRINT_START(xp) -#define DOPRINT_END1(v) -#define DOPRINT_END2(hi, lo) -#endif /* DOPRINT */ - -#define RETURNP(x) do { \ - DOPRINT_END1(x); \ - RETURNF(x); \ -} while (0) -#define RETURNPI(x) do { \ - DOPRINT_END1(x); \ - RETURNI(x); \ -} while (0) -#define RETURN2P(x, y) do { \ - DOPRINT_END2((x), (y)); \ - RETURNF((x) + (y)); \ -} while (0) -#define RETURN2PI(x, y) do { \ - DOPRINT_END2((x), (y)); \ - RETURNI((x) + (y)); \ -} while (0) #ifdef STRUCT_RETURN #define RETURNSP(rp) do { \ if (!(rp)->lo_set) \ - RETURNP((rp)->hi); \ - RETURN2P((rp)->hi, (rp)->lo); \ + RETURNF((rp)->hi); \ + RETURNF((rp)->hi + (rp)->lo); \ } while (0) #define RETURNSPI(rp) do { \ if (!(rp)->lo_set) \ - RETURNPI((rp)->hi); \ - RETURN2PI((rp)->hi, (rp)->lo); \ + RETURNI((rp)->hi); \ + RETURNI((rp)->hi + (rp)->lo); \ } while (0) #endif + #define SUM2P(x, y) ({ \ const __typeof (x) __x = (x); \ const __typeof (y) __y = (y); \ - \ - DOPRINT_END2(__x, __y); \ __x + __y; \ }) From nobody Thu Aug 3 05:09:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGcNB37xPz4nyYL; Thu, 3 Aug 2023 05:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGcNB1ZJgz3tbc; Thu, 3 Aug 2023 05:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691039386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nxi+nYsTsNLFomGA42iTIqppBJBeSStRfyAOn/12fcg=; b=a6L+aQfZ4EgJySnx1juYUHZWdGUfpxHjNE3fAgV1JDtPkr8Xq+FdDW91XizjBgF5+dhVWL 18juoosEJRF3xCOF2xbnoYEh4ZWjZ3VMUWvfoVslsjpd71S/NlDBjBRIp+eRNRpPBEGkNL U60RC0ShtTDfOB74vRxw7UqRqNRObHaPvd5B5Xkv5dwkhcl86zZlnolrOGCCXgbOg97pV7 UA+NFhz4nKRVgtt+qoL5MRP/rZxm2z0bdMbcrbG97HDTLaLdraJu5pA2FGR0HVOJHoEHyY PAZWyshsr7F0Vf+6sQvbJAgxKJosFQDHFnLWT9boxlA1WVJ+CV/d0K9XS2Qffw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691039386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nxi+nYsTsNLFomGA42iTIqppBJBeSStRfyAOn/12fcg=; b=v8zNKHEGngNLkPfJiFoGV4q2gta7zEVR4vtUJqMXI4CbH/alqr3HAUFJMfWV20+Ubi1h8h zoKFOmLAinPl4BWC154npayz/0ve8zgHz0aHo0tFVJGk3XDOLlhlDUSOcPUxFVVwmnX9PY pFUfsJaIrBpeSsIlBot4sDmwMG6dwYBnKd7oAUMatIPA4kGKfv7YyewGu6JxUG/qSohakr xUrfWQxyhEzqv8SiBS/Vj0ceXZ7wvRVtvdYPK9tP+tdbf1RuoSDLup1gi6mrGFA2OASDoz 9sWZ8BpZsr5/W3tuvs/AJC1fRJGazh9Jw+lEuRce+3xMMz+UVLG1EdSBUiem3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691039386; a=rsa-sha256; cv=none; b=ZI/Qmp64kb1DfbZjchEywvtSCGAzfzTLDaqTfIAYwHZ9vuBn6ZAfGHVnE5fqDgv02mN7Fd 2aHGkakpDkQacQHOJG/Wmpl2J1soMzZkHk1ne4S/6ax8YjGN2Yyi90z64KeInMwxXQdYa0 dtqk0FDtkpqiqmh02s1disgPyz9/Yskam6zfTClO1Dztt+kvF/O1qVGUV8pzFGaK9WUH9B XZjYOKMtwsVVF/I53DzV1ovbke0QCL18QzCogqfl5Z0Gh0XLOOCgPIRaekDn/C0Dz5iOso p0VTm7qiSU7k7s94b+2yxIi9bNR0NiWZbnbVpO/J3bZtUHG8hPfudJaeUPBQBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGcNB0dS5zH6B; Thu, 3 Aug 2023 05:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37359kIQ096622; Thu, 3 Aug 2023 05:09:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37359kCI096621; Thu, 3 Aug 2023 05:09:46 GMT (envelope-from git) Date: Thu, 3 Aug 2023 05:09:46 GMT Message-Id: <202308030509.37359kCI096621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 2d3b0a687b91 - main - Fixes for bugs in sinpi/cospi/tanpi List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d3b0a687b910c84606e4bc36176945ad5c60406 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2d3b0a687b910c84606e4bc36176945ad5c60406 commit 2d3b0a687b910c84606e4bc36176945ad5c60406 Author: Steve Kargl AuthorDate: 2023-07-31 22:34:48 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-03 04:27:58 +0000 Fixes for bugs in sinpi/cospi/tanpi patch to fix half-cycle trigonometric functions Paul Zimmermann, a MPFR developer, contacted me about large errors in the half-cycle trigonometric functions. I've have investigated these issues and developed the attached patch. The float, double, and ld80 (long double) changes have been tested. Caveat emptor: The ld128 changes have not been compiled. The ld128 changes have not been tested. I do not have access to a system that uses ld128 floating point. Here is an itemized list of changes: * lib/msun/src/math_private.h: . Add fast floor macros to compute the integer part of |x| for 0 <= |x| 01xp(N-1), where N is the precision of the type of x. These macros are used in the half-cycle trigonometric functions (e.g., sinpi(x)). . The FFLOOR80 macros is used with the Intel 80-bit extended double functions. This macors corrects an off-by-one error, which led to enormous error for |x| > 0x1p32. * lib/msun/src/s_cospif.c: * lib/msun/src/s_cospi.c: * lib/msun/ld80/s_cospil.c: . Update Copyright years. . Use FFLOOR*() macro to get integer part of |x|. . Correct handle the range 0x1p(N-1) <= |x| < 0x1pN. Here, one needs to determine if the integral value of |x| is even or odd to choose +1 or -1. If |x| >= 0x1pN, always return +1. * lib/msun/src/s_sinpif.c: * lib/msun/src/s_sinpi.c: * lib/msun/ld80/s_sinpil.c: . Update Copyright years. . Use FFLOOR*() macro to get integer part of |x|. * lib/msun/src/s_tanpif.c: * lib/msun/src/s_tanpi.c: * lib/msun/ld80/s_tanpil.c: . Update Copyright years. . For +-0.5, return +-inf. Previously, tanpi[fl]() returned an NaN. . Use FFLOOR*() to get integer part of |x|. Need to determine if the integer part is even or odd. This is used to set +-0 for |x| integral and +-inf for (n+1/2). . For 0x1p(N-1) <= |x| < 0x1pN need to determine if x is an even or odd integer to select +0 or -0. For |x| >= 0x1pN, it is always an even integer, select 0. . Note, tanpi[fl](x) is an odd function, so one needs to consider tanpi[fl](-|x|) = - tanpi[fl](|x|). * lib/msun/ld128/s_cospil.c: * lib/msun/ld128/s_sinpil.c: * lib/msun/ld128/s_tanpil.c: . Update Copyright years. . These routines use an FFLOOR128 macros, which likely should be replaced by a bit twiddling algorithm. . The same considerations above are applied to 0x1p112 <= |x| < 0x1p113, and |x| >= 0x1p113 cases. . Note, even and odd determination used fmodl(x,2.), which is likely slow. PR: 272742 MFC after: 1 week --- lib/msun/ld128/s_cospil.c | 50 ++++++++++++++++++++---------------------- lib/msun/ld128/s_sinpil.c | 38 ++++++++++++-------------------- lib/msun/ld128/s_tanpil.c | 39 ++++++++++++++++----------------- lib/msun/ld80/s_cospil.c | 22 ++++++------------- lib/msun/ld80/s_sinpil.c | 16 +++----------- lib/msun/ld80/s_tanpil.c | 34 ++++++++++++----------------- lib/msun/src/math_private.h | 53 +++++++++++++++++++++++++++++++++++++++++++++ lib/msun/src/s_cospi.c | 20 +++++------------ lib/msun/src/s_cospif.c | 16 ++++++-------- lib/msun/src/s_sinpi.c | 13 ++--------- lib/msun/src/s_sinpif.c | 10 +++------ lib/msun/src/s_tanpi.c | 41 +++++++++++++++++------------------ lib/msun/src/s_tanpif.c | 24 ++++++++++---------- 13 files changed, 183 insertions(+), 193 deletions(-) diff --git a/lib/msun/ld128/s_cospil.c b/lib/msun/ld128/s_cospil.c index 71acc4485f7b..b21f879c3e84 100644 --- a/lib/msun/ld128/s_cospil.c +++ b/lib/msun/ld128/s_cospil.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017-2021 Steven G. Kargl + * Copyright (c) 2017-2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,7 @@ * See ../src/s_cospi.c for implementation details. */ +#include "fpmath.h" #include "math.h" #include "math_private.h" @@ -46,8 +47,7 @@ volatile static const double vzero = 0; long double cospil(long double x) { - long double ax, c, xf; - uint32_t ix; + long double ai, ar, ax, c; ax = fabsl(x); @@ -72,41 +72,37 @@ cospil(long double x) } if (ax < 0x1p112) { - /* Split x = n + r with 0 <= r < 1. */ - xf = (ax + 0x1p112L) - 0x1p112L; /* Integer part */ - ax -= xf; /* Remainder */ - if (ax < 0) { - ax += 1; - xf -= 1; - } + /* Split ax = ai + ar with 0 <= ar < 1. */ + FFLOORL128(ax, ai, ar); - if (ax < 0.5) { - if (ax < 0.25) - c = ax == 0 ? 1 : __kernel_cospil(ax); + if (ar < 0.5) { + if (ar < 0.25) + c = ar == 0 ? 1 : __kernel_cospil(ar); else - c = __kernel_sinpil(0.5 - ax); + c = __kernel_sinpil(0.5 - ar); } else { - if (ax < 0.75) { - if (ax == 0.5) + if (ar < 0.75) { + if (ar == 0.5) return (0); - c = -__kernel_sinpil(ax - 0.5); + c = -__kernel_sinpil(ar - 0.5); } else - c = -__kernel_cospil(1 - ax); + c = -__kernel_cospil(1 - ar); } - - if (xf > 0x1p64) - xf -= 0x1p64; - if (xf > 0x1p32) - xf -= 0x1p32; - ix = (uint32_t)xf; - return (ix & 1 ? -c : c); + return (fmodl(ai, 2.L) == 0 ? c : -c); } if (isinf(x) || isnan(x)) return (vzero / vzero); /* - * |x| >= 0x1p112 is always an even integer, so return 1. + * For |x| >= 0x1p113, it is always an even integer, so return 1. */ - return (1); + if (ax >= 0x1p113) + return (1); + /* + * For 0x1p112 <= |x| < 0x1p113 need to determine if x is an even + * or odd integer to return 1 or -1. + */ + + return (fmodl(ax, 2.L) == 0 ? 1 : -1); } diff --git a/lib/msun/ld128/s_sinpil.c b/lib/msun/ld128/s_sinpil.c index cdfa2bcac3ef..c8c205449557 100644 --- a/lib/msun/ld128/s_sinpil.c +++ b/lib/msun/ld128/s_sinpil.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017-2021 Steven G. Kargl + * Copyright (c) 2017-2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,7 @@ * See ../src/s_sinpi.c for implementation details. */ +#include "fpmath.h" #include "math.h" #include "math_private.h" @@ -46,8 +47,7 @@ volatile static const double vzero = 0; long double sinpil(long double x) { - long double ax, hi, lo, s, xf, xhi, xlo; - uint32_t ix; + long double ai, ar, ax, hi, lo, s, xhi, xlo; ax = fabsl(x); @@ -78,35 +78,25 @@ sinpil(long double x) } if (ax < 0x1p112) { - /* Split x = n + r with 0 <= r < 1. */ - xf = (ax + 0x1p112L) - 0x1p112L; /* Integer part */ - ax -= xf; /* Remainder */ - if (ax < 0) { - ax += 1; - xf -= 1; - } + /* Split ax = ai + ar with 0 <= ar < 1. */ + FFLOORL128(ax, ai, ar); - if (ax == 0) { + if (ar == 0) { s = 0; } else { - if (ax < 0.5) { - if (ax <= 0.25) - s = __kernel_sinpil(ax); + if (ar < 0.5) { + if (ar <= 0.25) + s = __kernel_sinpil(ar); else - s = __kernel_cospil(0.5 - ax); + s = __kernel_cospil(0.5 - ar); } else { - if (ax < 0.75) - s = __kernel_cospil(ax - 0.5); + if (ar < 0.75) + s = __kernel_cospil(ar - 0.5); else - s = __kernel_sinpil(1 - ax); + s = __kernel_sinpil(1 - ar); } - if (xf > 0x1p64) - xf -= 0x1p64; - if (xf > 0x1p32) - xf -= 0x1p32; - ix = (uint32_t)xf; - if (ix & 1) s = -s; + s = fmodl(ai, 2.L) == 0 ? s : -s; } return (x < 0 ? -s : s); } diff --git a/lib/msun/ld128/s_tanpil.c b/lib/msun/ld128/s_tanpil.c index 90f4aea5c629..2d253bb9f478 100644 --- a/lib/msun/ld128/s_tanpil.c +++ b/lib/msun/ld128/s_tanpil.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017-2021 Steven G. Kargl + * Copyright (c) 2017-2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,7 @@ * See ../src/s_tanpi.c for implementation details. */ +#include "fpmath.h" #include "math.h" #include "math_private.h" @@ -69,8 +70,8 @@ volatile static const double vzero = 0; long double tanpil(long double x) { - long double ax, hi, lo, xf, t; - uint32_t ix; + long double ai, ar, ax, hi, lo, t; + double odd; ax = fabsl(x); @@ -88,27 +89,22 @@ tanpil(long double x) } t = __kernel_tanpil(ax); } else if (ax == 0.5) - return ((ax - ax) / (ax - ax)); + t = 1 / vzero; else t = -__kernel_tanpil(1 - ax); return (x < 0 ? -t : t); } - if (ix < 0x1p112) { - /* Split x = n + r with 0 <= r < 1. */ - xf = (ax + 0x1p112L) - 0x1p112L; /* Integer part */ - ax -= xf; /* Remainder */ - if (ax < 0) { - ax += 1; - xf -= 1; - } - - if (ax < 0.5) - t = ax == 0 ? 0 : __kernel_tanpil(ax); - else if (ax == 0.5) - return ((ax - ax) / (ax - ax)); + if (ax < 0x1p112) { + /* Split ax = ai + ar with 0 <= ar < 1. */ + FFLOORL128(ax, ai, ar); + odd = fmodl(ai, 2.L) == 0 ? 1 : -1; + if (ar < 0.5) + t = ar == 0 ? copysign(0., odd) : __kernel_tanpil(ar); + else if (ar == 0.5) + t = odd / vzero; else - t = -__kernel_tanpil(1 - ax); + t = -__kernel_tanpil(1 - ar); return (x < 0 ? -t : t); } @@ -117,7 +113,10 @@ tanpil(long double x) return (vzero / vzero); /* - * |x| >= 0x1p112 is always an integer, so return +-0. + * For 0x1p112 <= |x| < 0x1p113 need to determine if x is an even + * or odd integer to set t = +0 or -0. + * For |x| >= 0x1p113, it is always an even integer, so t = 0. */ - return (copysignl(0, x)); + t = fmodl(ax,2.L) == 0 ? 0 : copysign(0., -1.); + return (copysignl(t, x)); } diff --git a/lib/msun/ld80/s_cospil.c b/lib/msun/ld80/s_cospil.c index 199479e9eaf9..69620d2f2f33 100644 --- a/lib/msun/ld80/s_cospil.c +++ b/lib/msun/ld80/s_cospil.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Steven G. Kargl + * Copyright (c) 2017, 2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -80,18 +80,8 @@ cospil(long double x) RETURNI(c); } - if (ix < 0x403e) { /* 1 <= |x| < 0x1p63 */ - /* Determine integer part of ax. */ - j0 = ix - 0x3fff + 1; - if (j0 < 32) { - lx = (lx >> 32) << 32; - lx &= ~(((lx << 32)-1) >> j0); - } else { - m = (uint64_t)-1 >> (j0 + 1); - if (lx & m) lx &= ~m; - } - INSERT_LDBL80_WORDS(x, ix, lx); - + if (ix < 0x403e) { /* 1 <= |x| < 0x1p63 */ + FFLOORL80(x, j0, ix, lx); /* Integer part of ax. */ ax -= x; EXTRACT_LDBL80_WORDS(ix, lx, ax); @@ -123,7 +113,9 @@ cospil(long double x) RETURNI(vzero / vzero); /* - * |x| >= 0x1p63 is always an even integer, so return 1. + * For 0x1p63 <= |x| < 0x1p64 need to determine if x is an even + * or odd integer to return t = +1 or -1. + * For |x| >= 0x1p64, it is always an even integer, so t = 1. */ - RETURNI(1); + RETURNI(ix >= 0x403f ? 1 : ((lx & 1) ? -1 : 1)); } diff --git a/lib/msun/ld80/s_sinpil.c b/lib/msun/ld80/s_sinpil.c index 4cefa92352e1..7d9008f9e18f 100644 --- a/lib/msun/ld80/s_sinpil.c +++ b/lib/msun/ld80/s_sinpil.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Steven G. Kargl + * Copyright (c) 2017, 2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -88,18 +88,8 @@ sinpil(long double x) RETURNI((hx & 0x8000) ? -s : s); } - if (ix < 0x403e) { /* 1 <= |x| < 0x1p63 */ - /* Determine integer part of ax. */ - j0 = ix - 0x3fff + 1; - if (j0 < 32) { - lx = (lx >> 32) << 32; - lx &= ~(((lx << 32)-1) >> j0); - } else { - m = (uint64_t)-1 >> (j0 + 1); - if (lx & m) lx &= ~m; - } - INSERT_LDBL80_WORDS(x, ix, lx); - + if (ix < 0x403e) { /* 1 <= |x| < 0x1p63 */ + FFLOORL80(x, j0, ix, lx); /* Integer part of ax. */ ax -= x; EXTRACT_LDBL80_WORDS(ix, lx, ax); diff --git a/lib/msun/ld80/s_tanpil.c b/lib/msun/ld80/s_tanpil.c index 02451e562025..2d640413af6c 100644 --- a/lib/msun/ld80/s_tanpil.c +++ b/lib/msun/ld80/s_tanpil.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Steven G. Kargl + * Copyright (c) 2017, 2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -72,7 +72,7 @@ volatile static const double vzero = 0; long double tanpil(long double x) { - long double ax, hi, lo, t; + long double ax, hi, lo, odd, t; uint64_t lx, m; uint32_t j0; uint16_t hx, ix; @@ -98,31 +98,22 @@ tanpil(long double x) } t = __kernel_tanpil(ax); } else if (ax == 0.5) - RETURNI((ax - ax) / (ax - ax)); + t = 1 / vzero; else t = -__kernel_tanpil(1 - ax); RETURNI((hx & 0x8000) ? -t : t); } - if (ix < 0x403e) { /* 1 <= |x| < 0x1p63 */ - /* Determine integer part of ax. */ - j0 = ix - 0x3fff + 1; - if (j0 < 32) { - lx = (lx >> 32) << 32; - lx &= ~(((lx << 32)-1) >> j0); - } else { - m = (uint64_t)-1 >> (j0 + 1); - if (lx & m) lx &= ~m; - } - INSERT_LDBL80_WORDS(x, ix, lx); - + if (ix < 0x403e) { /* 1 <= |x| < 0x1p63 */ + FFLOORL80(x, j0, ix, lx); /* Integer part of ax. */ + odd = (uint64_t)x & 1 ? -1 : 1; ax -= x; EXTRACT_LDBL80_WORDS(ix, lx, ax); if (ix < 0x3ffe) /* |x| < 0.5 */ - t = ax == 0 ? 0 : __kernel_tanpil(ax); - else if (ax == 0.5) - RETURNI((ax - ax) / (ax - ax)); + t = ix == 0 ? copysignl(0, odd) : __kernel_tanpil(ax); + else if (ax == 0.5L) + t = odd / vzero; else t = -__kernel_tanpil(1 - ax); RETURNI((hx & 0x8000) ? -t : t); @@ -133,7 +124,10 @@ tanpil(long double x) RETURNI(vzero / vzero); /* - * |x| >= 0x1p63 is always an integer, so return +-0. + * For 0x1p63 <= |x| < 0x1p64 need to determine if x is an even + * or odd integer to set t = +0 or -0. + * For |x| >= 0x1p64, it is always an even integer, so t = 0. */ - RETURNI(copysignl(0, x)); + t = ix >= 0x403f ? 0 : (copysignl(0, (lx & 1) ? -1 : 1)); + RETURNI((hx & 0x8000) ? -t : t); } diff --git a/lib/msun/src/math_private.h b/lib/msun/src/math_private.h index a853ad4f9b4c..63aa3f603a5e 100644 --- a/lib/msun/src/math_private.h +++ b/lib/msun/src/math_private.h @@ -688,6 +688,59 @@ irintl(long double x) } #endif +/* + * The following are fast floor macros for 0 <= |x| < 0x1p(N-1), where + * N is the precision of the type of x. These macros are used in the + * half-cycle trignometric functions (e.g., sinpi(x)). + */ +#define FFLOORF(x, j0, ix) do { \ + (j0) = (((ix) >> 23) & 0xff) - 0x7f; \ + (ix) &= ~(0x007fffff >> (j0)); \ + SET_FLOAT_WORD((x), (ix)); \ +} while (0) + +#define FFLOOR(x, j0, ix, lx) do { \ + (j0) = (((ix) >> 20) & 0x7ff) - 0x3ff; \ + if ((j0) < 20) { \ + (ix) &= ~(0x000fffff >> (j0)); \ + (lx) = 0; \ + } else { \ + (lx) &= ~((uint32_t)0xffffffff >> ((j0) - 20)); \ + } \ + INSERT_WORDS((x), (ix), (lx)); \ +} while (0) + +#define FFLOORL80(x, j0, ix, lx) do { \ + j0 = ix - 0x3fff + 1; \ + if ((j0) < 32) { \ + (lx) = ((lx) >> 32) << 32; \ + (lx) &= ~((((lx) << 32)-1) >> (j0)); \ + } else { \ + uint64_t _m; \ + _m = (uint64_t)-1 >> (j0); \ + if ((lx) & _m) (lx) &= ~_m; \ + } \ + INSERT_LDBL80_WORDS((x), (ix), (lx)); \ +} while (0) + +#define FFLOORL128(x, ai, ar) do { \ + union IEEEl2bits u; \ + uint64_t m; \ + int e; \ + u.e = (x); \ + e = u.bits.exp - 16383; \ + if (e < 48) { \ + m = ((1llu << 49) - 1) >> (e + 1); \ + u.bits.manh &= ~m; \ + u.bits.manl = 0; \ + } else { \ + m = (uint64_t)-1 >> (e - 48); \ + u.bits.manl &= ~m; \ + } \ + (ai) = u.e; \ + (ar) = (x) - (ai); \ +} while (0) + #ifdef DEBUG #if defined(__amd64__) || defined(__i386__) #define breakpoint() asm("int $3") diff --git a/lib/msun/src/s_cospi.c b/lib/msun/src/s_cospi.c index 2e2f92733a86..f97570dc8792 100644 --- a/lib/msun/src/s_cospi.c +++ b/lib/msun/src/s_cospi.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Steven G. Kargl + * Copyright (c) 2017, 2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -104,20 +104,10 @@ cospi(double x) } if (ix < 0x43300000) { /* 1 <= |x| < 0x1p52 */ - /* Determine integer part of ax. */ - j0 = ((ix >> 20) & 0x7ff) - 0x3ff; - if (j0 < 20) { - ix &= ~(0x000fffff >> j0); - lx = 0; - } else { - lx &= ~((uint32_t)0xffffffff >> (j0 - 20)); - } - INSERT_WORDS(x, ix, lx); - + FFLOOR(x, j0, ix, lx); /* Integer part of ax. */ ax -= x; EXTRACT_WORDS(ix, lx, ax); - if (ix < 0x3fe00000) { /* |x| < 0.5 */ if (ix < 0x3fd00000) /* |x| < 0.25 */ c = ix == 0 ? 1 : __kernel_cospi(ax); @@ -143,9 +133,11 @@ cospi(double x) return (vzero / vzero); /* - * |x| >= 0x1p52 is always an even integer, so return 1. + * For 0x1p52 <= |x| < 0x1p53 need to determine if x is an even + * or odd integer to return +1 or -1. + * For |x| >= 0x1p53, it is always an even integer, so return 1. */ - return (1); + return (ix < 0x43400000 ? ((lx & 1) ? -1 : 1) : 1); } #if LDBL_MANT_DIG == 53 diff --git a/lib/msun/src/s_cospif.c b/lib/msun/src/s_cospif.c index 4dd881395baf..44d19f165025 100644 --- a/lib/msun/src/s_cospif.c +++ b/lib/msun/src/s_cospif.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Steven G. Kargl + * Copyright (c) 2017,2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -71,12 +71,8 @@ cospif(float x) return (c); } - if (ix < 0x4b000000) { /* 1 <= |x| < 0x1p23 */ - /* Determine integer part of ax. */ - j0 = ((ix >> 23) & 0xff) - 0x7f; - ix &= ~(0x007fffff >> j0); - SET_FLOAT_WORD(x, ix); - + if (ix < 0x4b000000) { /* 1 <= |x| < 0x1p23 */ + FFLOORF(x, j0, ix); /* Integer part of ax. */ ax -= x; GET_FLOAT_WORD(ix, ax); @@ -103,7 +99,9 @@ cospif(float x) return (vzero / vzero); /* - * |x| >= 0x1p23 is always an even integer, so return 1. + * For 0x1p23 <= |x| < 0x1p24 need to determine if x is an even + * or odd integer to return +1 or -1. + * For |x| >= 0x1p24, it is always an even integer, so return 1. */ - return (1); + return (ix < 0x4b800000 ? ((ix & 1) ? -1 : 1) : 1); } diff --git a/lib/msun/src/s_sinpi.c b/lib/msun/src/s_sinpi.c index bc3759e567a3..8b388de863c3 100644 --- a/lib/msun/src/s_sinpi.c +++ b/lib/msun/src/s_sinpi.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Steven G. Kargl + * Copyright (c) 2017, 2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -118,16 +118,7 @@ sinpi(double x) } if (ix < 0x43300000) { /* 1 <= |x| < 0x1p52 */ - /* Determine integer part of ax. */ - j0 = ((ix >> 20) & 0x7ff) - 0x3ff; - if (j0 < 20) { - ix &= ~(0x000fffff >> j0); - lx = 0; - } else { - lx &= ~((uint32_t)0xffffffff >> (j0 - 20)); - } - INSERT_WORDS(x, ix, lx); - + FFLOOR(x, j0, ix, lx); /* Integer part of ax. */ ax -= x; EXTRACT_WORDS(ix, lx, ax); diff --git a/lib/msun/src/s_sinpif.c b/lib/msun/src/s_sinpif.c index c9f76f8a2358..21082dee7d9c 100644 --- a/lib/msun/src/s_sinpif.c +++ b/lib/msun/src/s_sinpif.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Steven G. Kargl + * Copyright (c) 2017,2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -81,12 +81,8 @@ sinpif(float x) return ((hx & 0x80000000) ? -s : s); } - if (ix < 0x4b000000) { /* 1 <= |x| < 0x1p23 */ - /* Determine integer part of ax. */ - j0 = ((ix >> 23) & 0xff) - 0x7f; - ix &= ~(0x007fffff >> j0); - SET_FLOAT_WORD(x, ix); - + if (ix < 0x4b000000) { /* 1 <= |x| < 0x1p23 */ + FFLOORF(x, j0, ix); /* Integer part of ax. */ ax -= x; GET_FLOAT_WORD(ix, ax); diff --git a/lib/msun/src/s_tanpi.c b/lib/msun/src/s_tanpi.c index f911d56156b3..cd00adbcb86e 100644 --- a/lib/msun/src/s_tanpi.c +++ b/lib/msun/src/s_tanpi.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Steven G. Kargl + * Copyright (c) 2017, 2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,11 +56,15 @@ * 5. Special cases: * * tanpi(+-0) = +-0 - * tanpi(+-n) = +-0, for positive integers n. + * tanpi(n) = +0 for positive even and negative odd integer n. + * tanpi(n) = -0 for positive odd and negative even integer n. * tanpi(+-n+1/4) = +-1, for positive integers n. - * tanpi(+-n+1/2) = NaN, for positive integers n. - * tanpi(+-inf) = NaN. Raises the "invalid" floating-point exception. - * tanpi(nan) = NaN. Raises the "invalid" floating-point exception. + * tanpi(n+1/2) = +inf and raises the FE_DIVBYZERO exception for + * even integers n. + * tanpi(n+1/2) = -inf and raises the FE_DIVBYZERO exception for + * odd integers n. + * tanpi(+-inf) = NaN and raises the FE_INVALID exception. + * tanpi(nan) = NaN and raises the FE_INVALID exception. */ #include @@ -106,7 +110,7 @@ volatile static const double vzero = 0; double tanpi(double x) { - double ax, hi, lo, t; + double ax, hi, lo, odd, t; uint32_t hx, ix, j0, lx; EXTRACT_WORDS(hx, lx, x); @@ -132,30 +136,22 @@ tanpi(double x) } t = __kernel_tanpi(ax); } else if (ax == 0.5) - return ((ax - ax) / (ax - ax)); + t = 1 / vzero; else t = - __kernel_tanpi(1 - ax); return ((hx & 0x80000000) ? -t : t); } if (ix < 0x43300000) { /* 1 <= |x| < 0x1p52 */ - /* Determine integer part of ax. */ - j0 = ((ix >> 20) & 0x7ff) - 0x3ff; - if (j0 < 20) { - ix &= ~(0x000fffff >> j0); - lx = 0; - } else { - lx &= ~(((uint32_t)(0xffffffff)) >> (j0 - 20)); - } - INSERT_WORDS(x,ix,lx); - + FFLOOR(x, j0, ix, lx); /* Integer part of ax. */ + odd = (uint64_t)x & 1 ? -1 : 1; ax -= x; EXTRACT_WORDS(ix, lx, ax); if (ix < 0x3fe00000) /* |x| < 0.5 */ - t = ax == 0 ? 0 : __kernel_tanpi(ax); + t = ix == 0 ? copysign(0, odd) : __kernel_tanpi(ax); else if (ax == 0.5) - return ((ax - ax) / (ax - ax)); + t = odd / vzero; else t = - __kernel_tanpi(1 - ax); @@ -167,9 +163,12 @@ tanpi(double x) return (vzero / vzero); /* - * |x| >= 0x1p52 is always an integer, so return +-0. + * For 0x1p52 <= |x| < 0x1p53 need to determine if x is an even + * or odd integer to set t = +0 or -0. + * For |x| >= 0x1p54, it is always an even integer, so t = 0. */ - return (copysign(0, x)); + t = ix >= 0x43400000 ? 0 : (copysign(0, (lx & 1) ? -1 : 1)); + return ((hx & 0x80000000) ? -t : t); } #if LDBL_MANT_DIG == 53 diff --git a/lib/msun/src/s_tanpif.c b/lib/msun/src/s_tanpif.c index 6d4b627d1cf9..12dd8f838976 100644 --- a/lib/msun/src/s_tanpif.c +++ b/lib/msun/src/s_tanpif.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Steven G. Kargl + * Copyright (c) 2017,2023 Steven G. Kargl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -58,7 +58,7 @@ volatile static const float vzero = 0; float tanpif(float x) { - float ax, hi, lo, t; + float ax, hi, lo, odd, t; uint32_t hx, ix, j0; GET_FLOAT_WORD(hx, x); @@ -79,25 +79,22 @@ tanpif(float x) } t = __kernel_tanpif(ax); } else if (ix == 0x3f000000) - return ((ax - ax) / (ax - ax)); + t = 1 / vzero; else t = - __kernel_tanpif(1 - ax); return ((hx & 0x80000000) ? -t : t); } if (ix < 0x4b000000) { /* 1 <= |x| < 0x1p23 */ - /* Determine integer part of ax. */ - j0 = ((ix >> 23) & 0xff) - 0x7f; - ix &= ~(0x007fffff >> j0); - SET_FLOAT_WORD(x, ix); - + FFLOORF(x, j0, ix); /* Integer part of ax. */ + odd = (uint32_t)x & 1 ? -1 : 1; ax -= x; GET_FLOAT_WORD(ix, ax); if (ix < 0x3f000000) /* |x| < 0.5 */ - t = ix == 0 ? 0 : __kernel_tanpif(ax); + t = ix == 0 ? copysignf(0, odd) : __kernel_tanpif(ax); else if (ix == 0x3f000000) - return ((ax - ax) / (ax - ax)); + t = odd / vzero; else t = - __kernel_tanpif(1 - ax); return ((hx & 0x80000000) ? -t : t); @@ -108,7 +105,10 @@ tanpif(float x) return (vzero / vzero); /* - * |x| >= 0x1p23 is always an integer, so return +-0. + * For 0x1p23 <= |x| < 0x1p24 need to determine if x is an even + * or odd integer to set t = +0 or -0. + * For |x| >= 0x1p24, it is always an even integer, so t = 0. */ - return (copysignf(0, x)); + t = ix >= 0x4b800000 ? 0 : (copysignf(0, (ix & 1) ? -1 : 1)); + return ((hx & 0x80000000) ? -t : t); } From nobody Thu Aug 3 05:53:04 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGdL92LSpz4n5b8; Thu, 3 Aug 2023 05:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGdL91TnDz4GYX; Thu, 3 Aug 2023 05:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691041985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WaxKydkxFpJ93P7mgJsYp34BV1GdY+l6YqoazrQjMd4=; b=dHy08n4qCRKERoLSA+a0z+frgv/5JSsHWMf18T7kdkef6HO/KEOdEij8UPcHyyKxpXFVLD i37POq/F+wg40QQT8psY2LbaqXTV6EBe446tAwZx/TmBc0WV2z14ZNwrVZ9llgnURU2hN1 asD1X3Vlt4hbmuele601i7Hk8HxUhwJtUcMdJnLjJhRImBX43hWXXYej1J2mQO4HvAtxhU 610I5M/ANL01KXIRAbUzEzBNywuvyJe6TilKZ3aUaPVVUr0vYrF1fCmTJGTjqLl/AKKw3U Cnbt+NXW7O44pCWP7yW3mqv8H2acA6pi50tA/fguVYkk84UPVkH3mstJsVc1nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691041985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WaxKydkxFpJ93P7mgJsYp34BV1GdY+l6YqoazrQjMd4=; b=xUN/x7SM8WmuGv2frgzIA+UYioosWzqgdE+WdzHLkkk9iZ70k9lGisSvwGlmPQsAFBLJ9Z KcoTuDnZ2A3GNgq6EF8EoYAVgzkMZCbTL6Pdu6kklZUiVy64vlINVPHsITg1F5iC4mKrMA ZbiDYHAIfeHe3wsVJjBGS+xIgr1iZ84qcs0ItGBaRPdZgksLs7ZW1gU9HVqeaVZaDk0CCs x1X07/q8NAgWcJ+a99vYi1BG1jVM90tXMb8vLNUpz1yqFxg4SH5ECyP4xQ/M+m+vLCL20b ZEcCwIPx5XhsFizWjWNthlh3WiTde+9lZ+7CcvlhckfC7J73Bg1yfZjLRKQSIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691041985; a=rsa-sha256; cv=none; b=hsHDLa+GmozjvRwGxbSyjkMk0in0HuwSDNW6YdaJORq8DE/MuyCrRAonyiIA1OhngGi9Rr QwfdCPZusTcDkxEycKYtHNTTJkiX28RyVRRl8nzy/EBYlSPke95Z/AdrG9tCSyg/m7m19r vTOGyrpNuZoIjEqzPycPuEPUrfx4F+2YIb9faIUTEZPwftmrFagSgf3VG44ZHMJCMTMRsp Om/r5VJmU16oy1MO7nEvIKqnbG5b2yTJBdRCBawf+y4p+LW+fum+BNMh/JrdD8NGCIeXeT ioqLHFQ43E1592iLEJsa9fymqK8JAs6bKfXnswSDYbxhQdYt/hmBskx08vcvoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGdL90bfczJ3m; Thu, 3 Aug 2023 05:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3735r4FY077409; Thu, 3 Aug 2023 05:53:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3735r44L077408; Thu, 3 Aug 2023 05:53:04 GMT (envelope-from git) Date: Thu, 3 Aug 2023 05:53:04 GMT Message-Id: <202308030553.3735r44L077408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 2ddf24f8f525 - main - e1000: Automask TSO on lem(4)/em(4) 10/100 Ethernet List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ddf24f8f52559b08da700ab044c33d0a9ed5601 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2ddf24f8f52559b08da700ab044c33d0a9ed5601 commit 2ddf24f8f52559b08da700ab044c33d0a9ed5601 Author: Kevin Bowling AuthorDate: 2023-08-03 05:47:15 +0000 Commit: Kevin Bowling CommitDate: 2023-08-03 05:52:55 +0000 e1000: Automask TSO on lem(4)/em(4) 10/100 Ethernet This feature masks TSO capability when a link comes up at 10 or 100mbit due to errata on the chips. This behavior matches previous versions of FreeBSD as well as NetBSD and Linux. A tunable, hw.em.unsupported_tso may be set if the admin desires to disabling automasking and configure TSO settings manually. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41170 --- sys/dev/e1000/if_em.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- sys/dev/e1000/if_em.h | 1 + 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 40579b0a5a55..1da0579cdce9 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -330,6 +330,7 @@ static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS); static int em_get_rs(SYSCTL_HANDLER_ARGS); static void em_print_debug_info(struct e1000_softc *); static int em_is_valid_ether_addr(u8 *); +static bool em_automask_tso(if_ctx_t); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); static void em_add_int_delay_sysctl(struct e1000_softc *, const char *, const char *, struct em_int_delay_info *, int, int); @@ -533,6 +534,10 @@ static int em_smart_pwr_down = false; SYSCTL_INT(_hw_em, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, &em_smart_pwr_down, 0, "Set to true to leave smart power down enabled on newer adapters"); +static bool em_unsupported_tso = false; +SYSCTL_BOOL(_hw_em, OID_AUTO, unsupported_tso, CTLFLAG_RDTUN, + &em_unsupported_tso, 0, "Allow unsupported em(4) TSO configurations"); + /* Controls whether promiscuous also shows bad packets */ static int em_debug_sbp = false; SYSCTL_INT(_hw_em, OID_AUTO, sbp, CTLFLAG_RDTUN, &em_debug_sbp, 0, @@ -937,6 +942,8 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_tso_size_max = EM_TSO_SIZE; scctx->isc_tx_tso_segsize_max = EM_TSO_SEG_SIZE; scctx->isc_capabilities = scctx->isc_capenable = LEM_CAPS; + if (em_unsupported_tso) + scctx->isc_capabilities |= IFCAP_TSO6; /* * For LEM-class devices, don't enable IFCAP_{TSO4,VLAN_HWTSO} * by default as we don't have workarounds for all associated @@ -1079,6 +1086,9 @@ em_if_attach_pre(if_ctx_t ctx) goto err_late; } + /* Clear the IFCAP_TSO auto mask */ + sc->tso_automasked = 0; + /* Check SOL/IDER usage */ if (e1000_check_reset_block(hw)) device_printf(dev, "PHY reset is blocked" @@ -1817,6 +1827,7 @@ em_if_update_admin_status(if_ctx_t ctx) struct e1000_hw *hw = &sc->hw; device_t dev = iflib_get_dev(ctx); u32 link_check, thstat, ctrl; + bool automasked = false; link_check = thstat = ctrl = 0; /* Get the cached link value or read phy for real */ @@ -1894,8 +1905,14 @@ em_if_update_admin_status(if_ctx_t ctx) sc->flags |= IGB_MEDIA_RESET; em_reset(ctx); } - iflib_link_state_change(ctx, LINK_STATE_UP, - IF_Mbps(sc->link_speed)); + /* Only do TSO on gigabit Ethernet for older chips due to errata */ + if (hw->mac.type < igb_mac_min) + automasked = em_automask_tso(ctx); + + /* Automasking resets the interface, so don't mark it up yet */ + if (!automasked) + iflib_link_state_change(ctx, LINK_STATE_UP, + IF_Mbps(sc->link_speed)); } else if (!link_check && (sc->link_active == 1)) { sc->link_speed = 0; sc->link_duplex = 0; @@ -3876,6 +3893,35 @@ em_is_valid_ether_addr(u8 *addr) return (true); } +static bool +em_automask_tso(if_ctx_t ctx) +{ + struct e1000_softc *sc = iflib_get_softc(ctx); + if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx); + if_t ifp = iflib_get_ifp(ctx); + + if (!em_unsupported_tso && sc->link_speed && + sc->link_speed != SPEED_1000 && scctx->isc_capenable & IFCAP_TSO) { + device_printf(sc->dev, "Disabling TSO for 10/100 Ethernet.\n"); + sc->tso_automasked = scctx->isc_capenable & IFCAP_TSO; + scctx->isc_capenable &= ~IFCAP_TSO; + if_setcapenablebit(ifp, 0, IFCAP_TSO); + /* iflib_init_locked handles ifnet hwassistbits */ + iflib_request_reset(ctx); + return true; + } else if (sc->link_speed == SPEED_1000 && sc->tso_automasked) { + device_printf(sc->dev, "Re-enabling TSO for GbE.\n"); + scctx->isc_capenable |= sc->tso_automasked; + if_setcapenablebit(ifp, sc->tso_automasked, 0); + sc->tso_automasked = 0; + /* iflib_init_locked handles ifnet hwassistbits */ + iflib_request_reset(ctx); + return true; + } + + return false; +} + /* ** Parse the interface capabilities with regard ** to both system management and wake-on-lan for diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 8c5abf5b48cb..d3c3bc0da097 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -509,6 +509,7 @@ struct e1000_softc { u32 smartspeed; u32 dmac; int link_mask; + int tso_automasked; u64 que_mask; From nobody Thu Aug 3 06:01:24 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGdWm5NTmz4nG2b; Thu, 3 Aug 2023 06:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGdWm4WrGz4Ktc; Thu, 3 Aug 2023 06:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691042484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jF1hq0+CrqtwXw7Iyl1Ue3shpTr/Knfxr1M4dRvimto=; b=QZBwBvQzRxIixz9OLg29xZaURk7aLA8n/rqbzo10jxZQc8RTrUbX79w+wDcmjAtLHSxvna jGBQp50tA6bV+klT0kQvPODh+tQBJIaVokveQuli7MXXoAWbeSggx1djNTHsB92hDxs2KP X2GNvyIM/o6dvL+RdD2EwjRNqYqsBIlFIKKZZ6W4wm2dVtD8VJuLihdSOq8pezo34p8YFl Q1vtGzJ8ufXIx7+dhj96n08NZJ17Bpsh0tQOXVkJ9FOvCo1G4Oj/eKQsIR+kQc49u0bXuN fxhMjxoxuQpVT8RBzJt/5HiXHYA/nK0KQRp7Rr0D3t0E0M6FfSDdbEjO33n8uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691042484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jF1hq0+CrqtwXw7Iyl1Ue3shpTr/Knfxr1M4dRvimto=; b=XuD8MldGOI1rkdgy7BNTx63eGEi3Tu82SAy8U6nmdmJ/MwXOHedOde0dEAQUOJ1JLuT1tT JZLbHCtgrGV+5HT447jx6eywtIc75kNumvS9A66XY3rfjOZe82mPnkXCm/yuJaXRZ0kfAs EjD62gvSYnRHYGgegtGQuN2cK63aoOju2P8PO1+FUePWQ4rqRZsrrlKT76G+uAOTPXAtTz S/N7dQVE1Jbg2ZuSsi7jJ12OItQP07+kyX3sKwYUFiLk0RlyWerdBtaLRAQYB5g/fHAU7T 2rUL1m4yXqbEFHTjVCXN5IkJA6z3s0x32MsDmBVEIWtWQhXUbDF0eEXkP+BDuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691042484; a=rsa-sha256; cv=none; b=fQeZ2NrrGuop3KwbMoaavA3HT77hUsJFIswJmQO8w8PHpLRk6Ifg3J55oD5k6T7R87jrul 6m9v42bV0fH+isnnSPU4PXF0IK7H6dq/BNeaZ5SGThs3qdsqcoixApCaBotEwJq1gSx4Km J9d3IpFjneD4wRLO8iyJBehTh4DlIAeQgBaxG09ZE+wBVU/mVVVLqhPz16UDIwlNU8ArE8 wyi6GmoRvg3VWVzYUEYSr1jTW9vVfUZMWbhwwXd4+eFLxSqt/LM2MzDnDhdc2p+y0Jnf/O qKFd1pTvsf8qMkKRzP3eoSxQyhVWERbJY5+ekocgjsR3rC1Q7jaCKsm6thfDWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGdWm3db7zJfn; Thu, 3 Aug 2023 06:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37361OHa093234; Thu, 3 Aug 2023 06:01:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37361Op9093233; Thu, 3 Aug 2023 06:01:24 GMT (envelope-from git) Date: Thu, 3 Aug 2023 06:01:24 GMT Message-Id: <202308030601.37361Op9093233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: a93409fc3cd7 - main - ixgbe: Warn once for unsupported SFPs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a93409fc3cd7b4d4aeb35d7ef27f84c1ae13a42d Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a93409fc3cd7b4d4aeb35d7ef27f84c1ae13a42d commit a93409fc3cd7b4d4aeb35d7ef27f84c1ae13a42d Author: Kevin Bowling AuthorDate: 2023-08-03 05:59:37 +0000 Commit: Kevin Bowling CommitDate: 2023-08-03 06:00:58 +0000 ixgbe: Warn once for unsupported SFPs The driver belabors the point about unsupported SFPs, printing multiple times on link up. Limit it to once. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39785 --- sys/dev/ixgbe/ixgbe_phy.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index eef1d40448d3..1ab4f057f810 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1302,6 +1302,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) u8 cable_tech = 0; u8 cable_spec = 0; u16 enforce_sfp = 0; + static bool warned_once = false; DEBUGFUNC("ixgbe_identify_sfp_module_generic"); @@ -1536,13 +1537,16 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) status = IXGBE_SUCCESS; } else { if (hw->allow_unsupported_sfp == true) { - EWARN(hw, - "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " - "Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " - "Intel Corporation is not responsible for any harm caused by using untested modules.\n"); + if (!warned_once) + EWARN(hw, + "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " + "Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " + "Intel Corporation is not responsible for any harm caused by using untested modules.\n"); + warned_once = true; status = IXGBE_SUCCESS; } else { - DEBUGOUT("SFP+ module not supported\n"); + DEBUGOUT + ("SFP+ module not supported\n"); hw->phy.type = ixgbe_phy_sfp_unsupported; status = IXGBE_ERR_SFP_NOT_SUPPORTED; @@ -1647,6 +1651,7 @@ s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw) u8 cable_length = 0; u8 device_tech = 0; bool active_cable = false; + static bool warned_once = false; DEBUGFUNC("ixgbe_identify_qsfp_module_generic"); @@ -1792,10 +1797,12 @@ s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw) status = IXGBE_SUCCESS; } else { if (hw->allow_unsupported_sfp == true) { - EWARN(hw, - "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " - "Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " - "Intel Corporation is not responsible for any harm caused by using untested modules.\n"); + if (!warned_once) + EWARN(hw, + "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " + "Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " + "Intel Corporation is not responsible for any harm caused by using untested modules.\n"); + warned_once = true; status = IXGBE_SUCCESS; } else { DEBUGOUT("QSFP module not supported\n"); From nobody Thu Aug 3 07:52:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGh0W0spWz4mPDn; Thu, 3 Aug 2023 07:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGh0V6jD3z3KlJ; Thu, 3 Aug 2023 07:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691049178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VEgOg8/YRBa8rMhUcklCjHZ3m1EQkpQa6KqUyjO1PNc=; b=paR3/JBSzD4gXt8gNGQG1YDEY20G3uklOQjxW9cg0nk4aIr+hYBxhzcCGujHSkhZHAeGp+ H8Fj2de6XAX5ICbKqj3ur71O6KA0vdWCPJ3dvIAy2RQUuR5n/Zk8tI725+0dtVSfJyExFn kvKvkgm7On8drSrPz8dzCdpsxaG9uaBAGa6vRuDzhdAEGXomtv/PGvynRSUDbEA86Vq4FL 68Med9/iW5HzD2gagSH+wQWaII4/jU/PbPsZGxW2QB82vbGfvEEoJCN8jxne1ZqCECvfi1 +10VQlu47tzykx6c3LC8D2Tuk7IAzJKiGrQ6iFFSzJplNlEnNjUM24A7v16SWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691049178; a=rsa-sha256; cv=none; b=DwisbjeTO4wMJM4u3TQjCj4wOAZ8Go58KINIfyjQsuZseNMnDxiEJSNnkkpPHGA9NV0dDZ zB+wc1lWEMnooWxqQkVV1JuXRFZaQ56JiZB1cx62OJ8hBCi8SqTKvozm+t8Dn0oXpeUl4w v9jK38+Ids4cIjd4YQVe29ozFnZwj9dEwBI6hjWZD7DcUJw8cpY7Z12S5EFeB5lX6uv49y 5UgjQdbFBmACx5dC4fWd7a85UKgtgk9TjwHDkEdhXMp5Fuwd8NMd/3A1Kxi0Hk8VsxFQ/l aLibuV+tlLI2vgc376jiTkzxOqILn+oD3lRkdcQj+6qAqmogaTpPv/WLryhMUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691049178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VEgOg8/YRBa8rMhUcklCjHZ3m1EQkpQa6KqUyjO1PNc=; b=Z/0YYqGf6jDyUMguqLVFvWxfhjqGPWin6GChc+fHA0qYl3AaIShv9cxWhQ/2cGj5Ae1c2M UB/dUbKxCcQ+YQXv03bj1+Cid7rSRhogPB98f8zzwXymgJEPt4M3ItnZsnfWE10LPOXrL0 Xz5pqNvq76Zwa1v9YEFxh+h6ZHtbosMF9PCo56XUZJMPYp8Hvx3YkeGS13jvT9osipyKDA DZq1sf4uEL3VWqjoEycIm+BbT8UrA8VGjb1ccgU1cTrC7Qsq141ONunobmOB/SFUCIXcEh LeiKJGY0uxTUXRcnFJsRp/2PzUNjrRzMpiTlntZnfsKhTNhNX4p5KK3CWsozJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGh0V5nzszX9s; Thu, 3 Aug 2023 07:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3737qweF078120; Thu, 3 Aug 2023 07:52:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3737qup4078110; Thu, 3 Aug 2023 07:52:56 GMT (envelope-from git) Date: Thu, 3 Aug 2023 07:52:56 GMT Message-Id: <202308030752.3737qup4078110@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 1f3ced26d494 - main - MFV: xz 5.4.4. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f3ced26d4946ff2e24472432a275efb9ba1f2ca Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=1f3ced26d4946ff2e24472432a275efb9ba1f2ca commit 1f3ced26d4946ff2e24472432a275efb9ba1f2ca Merge: a93409fc3cd7 42df52d15694 Author: Xin LI AuthorDate: 2023-08-03 07:52:36 +0000 Commit: Xin LI CommitDate: 2023-08-03 07:52:36 +0000 MFV: xz 5.4.4. MFC-after: 2 weeks contrib/xz/ChangeLog | 704 +++++++++++++++++++++ contrib/xz/README | 4 + contrib/xz/THANKS | 3 + contrib/xz/src/common/mythread.h | 2 +- contrib/xz/src/liblzma/api/lzma/container.h | 9 +- contrib/xz/src/liblzma/api/lzma/filter.h | 4 +- contrib/xz/src/liblzma/api/lzma/lzma12.h | 4 +- contrib/xz/src/liblzma/api/lzma/version.h | 2 +- .../xz/src/liblzma/common/block_buffer_encoder.c | 2 +- contrib/xz/src/liblzma/common/common.h | 2 +- contrib/xz/src/liblzma/common/file_info.c | 2 +- contrib/xz/src/liblzma/common/lzip_decoder.c | 2 +- contrib/xz/src/liblzma/common/memcmplen.h | 10 +- contrib/xz/src/liblzma/common/stream_decoder_mt.c | 8 +- contrib/xz/src/liblzma/common/stream_encoder_mt.c | 2 +- contrib/xz/src/liblzma/common/string_conversion.c | 10 +- contrib/xz/src/liblzma/lz/lz_encoder.h | 2 +- contrib/xz/src/liblzma/lzma/lzma_encoder.c | 4 +- contrib/xz/src/xz/args.c | 5 +- contrib/xz/src/xz/coder.c | 8 +- contrib/xz/src/xz/file_io.c | 8 +- contrib/xz/src/xz/hardware.c | 4 +- contrib/xz/src/xz/list.c | 11 +- contrib/xz/src/xz/message.c | 2 +- contrib/xz/src/xz/xz.1 | 9 +- lib/liblzma/config.h | 6 +- 26 files changed, 774 insertions(+), 55 deletions(-) diff --cc lib/liblzma/config.h index e0ff56d43a56,000000000000..c3fa947ec5fb mode 100644,000000..100644 --- a/lib/liblzma/config.h +++ b/lib/liblzma/config.h @@@ -1,618 -1,0 +1,618 @@@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* How many MiB of RAM to assume if the real amount cannot be determined. */ +#define ASSUME_RAM 128 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* FreeBSD - disabled intentionally */ +/* #undef ENABLE_NLS */ + +/* Define to 1 if bswap_16 is available. */ +/* #undef HAVE_BSWAP_16 */ + +/* Define to 1 if bswap_32 is available. */ +/* #undef HAVE_BSWAP_32 */ + +/* Define to 1 if bswap_64 is available. */ +/* #undef HAVE_BSWAP_64 */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +#ifndef WITHOUT_CAPSICUM +/* Define to 1 if Capsicum is available. */ +#define HAVE_CAPSICUM 1 +#endif + +/* Define to 1 if the system has the type `CC_SHA256_CTX'. */ +/* #undef HAVE_CC_SHA256_CTX */ + +/* Define to 1 if you have the `CC_SHA256_Init' function. */ +/* #undef HAVE_CC_SHA256_INIT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define to 1 if crc32 integrity check is enabled. */ +#define HAVE_CHECK_CRC32 1 + +/* Define to 1 if crc64 integrity check is enabled. */ +#define HAVE_CHECK_CRC64 1 + +/* Define to 1 if sha256 integrity check is enabled. */ +#define HAVE_CHECK_SHA256 1 + +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if `CLOCK_MONOTONIC' is declared in . */ +#define HAVE_CLOCK_MONOTONIC 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_COMMONCRYPTO_COMMONDIGEST_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_CPUID_H 1 + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* FreeBSD - disabled intentionally */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if any of HAVE_DECODER_foo have been defined. */ +#define HAVE_DECODERS 1 + +/* Define to 1 if arm decoder is enabled. */ +#define HAVE_DECODER_ARM 1 + +/* Define to 1 if arm64 decoder is enabled. */ +#define HAVE_DECODER_ARM64 1 + +/* Define to 1 if armthumb decoder is enabled. */ +#define HAVE_DECODER_ARMTHUMB 1 + +/* Define to 1 if delta decoder is enabled. */ +#define HAVE_DECODER_DELTA 1 + +/* Define to 1 if ia64 decoder is enabled. */ +#define HAVE_DECODER_IA64 1 + +/* Define to 1 if lzma1 decoder is enabled. */ +#define HAVE_DECODER_LZMA1 1 + +/* Define to 1 if lzma2 decoder is enabled. */ +#define HAVE_DECODER_LZMA2 1 + +/* Define to 1 if powerpc decoder is enabled. */ +#define HAVE_DECODER_POWERPC 1 + +/* Define to 1 if sparc decoder is enabled. */ +#define HAVE_DECODER_SPARC 1 + +/* Define to 1 if x86 decoder is enabled. */ +#define HAVE_DECODER_X86 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if any of HAVE_ENCODER_foo have been defined. */ +#define HAVE_ENCODERS 1 + +/* Define to 1 if arm encoder is enabled. */ +#define HAVE_ENCODER_ARM 1 + +/* Define to 1 if arm64 encoder is enabled. */ +#define HAVE_ENCODER_ARM64 1 + +/* Define to 1 if armthumb encoder is enabled. */ +#define HAVE_ENCODER_ARMTHUMB 1 + +/* Define to 1 if delta encoder is enabled. */ +#define HAVE_ENCODER_DELTA 1 + +/* Define to 1 if ia64 encoder is enabled. */ +#define HAVE_ENCODER_IA64 1 + +/* Define to 1 if lzma1 encoder is enabled. */ +#define HAVE_ENCODER_LZMA1 1 + +/* Define to 1 if lzma2 encoder is enabled. */ +#define HAVE_ENCODER_LZMA2 1 + +/* Define to 1 if powerpc encoder is enabled. */ +#define HAVE_ENCODER_POWERPC 1 + +/* Define to 1 if sparc encoder is enabled. */ +#define HAVE_ENCODER_SPARC 1 + +/* Define to 1 if x86 encoder is enabled. */ +#define HAVE_ENCODER_X86 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if __attribute__((__constructor__)) is supported for functions. + */ +#define HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR 1 + +/* Define to 1 if you have the `futimens' function. */ +#define HAVE_FUTIMENS 1 + +/* Define to 1 if you have the `futimes' function. */ +/* #undef HAVE_FUTIMES */ + +/* Define to 1 if you have the `futimesat' function. */ +/* #undef HAVE_FUTIMESAT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* FreeBSD - disabled intentionally */ +/* #undef HAVE_GETTEXT */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +/* FreeBSD - only with clang because the base gcc does not support it */ +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) +#define HAVE_IMMINTRIN_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if .lz (lzip) decompression support is enabled. */ +#define HAVE_LZIP_DECODER 1 + +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ +#define HAVE_MBRTOWC 1 + +/* Define to 1 to enable bt2 match finder. */ +#define HAVE_MF_BT2 1 + +/* Define to 1 to enable bt3 match finder. */ +#define HAVE_MF_BT3 1 + +/* Define to 1 to enable bt4 match finder. */ +#define HAVE_MF_BT4 1 + +/* Define to 1 to enable hc3 match finder. */ +#define HAVE_MF_HC3 1 + +/* Define to 1 to enable hc4 match finder. */ +#define HAVE_MF_HC4 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if getopt.h declares extern int optreset. */ +#define HAVE_OPTRESET 1 + +/* Define to 1 if you have the `pledge' function. */ +/* #undef HAVE_PLEDGE */ + +/* Define to 1 if you have the `posix_fadvise' function. */ +#define HAVE_POSIX_FADVISE 1 + +/* Define to 1 if `program_invocation_name' is declared in . */ +/* #undef HAVE_PROGRAM_INVOCATION_NAME */ + +/* Define to 1 if you have the `pthread_condattr_setclock' function. */ +#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have the `SHA256Init' function. */ +/* #undef HAVE_SHA256INIT */ + +/* Define to 1 if the system has the type `SHA256_CTX'. */ +#define HAVE_SHA256_CTX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SHA256_H 1 + +/* Define to 1 if you have the `SHA256_Init' function. */ +#define HAVE_SHA256_INIT 1 + +/* Define to 1 if the system has the type `SHA2_CTX'. */ +/* #undef HAVE_SHA2_CTX */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SHA2_H */ + +/* Define to 1 if optimizing for size. */ +/* #undef HAVE_SMALL */ + +/* Define to 1 if stdbool.h conforms to C99. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 + +/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 + +/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ + +/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 + +/* Define to 1 if `st_uatime' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_UATIME */ + +/* Define to 1 to if GNU/Linux-specific details are unconditionally wanted for + symbol versioning. Define to 2 to if these are wanted only if also PIC is + defined (allows building both shared and static liblzma at the same time + with Libtool if neither --with-pic nor --without-pic is used). This define + must be used together with liblzma_linux.map. */ +/* #undef HAVE_SYMBOL_VERSIONS_LINUX */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BYTEORDER_H */ + +#ifndef WITHOUT_CAPSICUM +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_CAPSICUM_H 1 +#endif + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_ENDIAN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if the system has the type `uintptr_t'. */ +#define HAVE_UINTPTR_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if _mm_set_epi64x and _mm_clmulepi64_si128 are usable. See + configure.ac for details. */ +#if defined(__FreeBSD__) && defined(__amd64__) +#define HAVE_USABLE_CLMUL 1 +#endif + +/* Define to 1 if you have the `utime' function. */ +/* #undef HAVE_UTIME */ + +/* Define to 1 if you have the `utimes' function. */ +/* #undef HAVE_UTIMES */ + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#define HAVE_VISIBILITY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the `wcwidth' function. */ +#define HAVE_WCWIDTH 1 + +/* Define to 1 if the system has the type `_Bool'. */ +#define HAVE__BOOL 1 + +/* Define to 1 if you have the `_futime' function. */ +/* #undef HAVE__FUTIME */ + +/* Define to 1 if _mm_movemask_epi8 is available. */ +#if defined(__FreeBSD__) && defined(__amd64__) +#define HAVE__MM_MOVEMASK_EPI8 1 +#endif + +/* Define to 1 if the GNU C extension __builtin_assume_aligned is supported. + */ +#define HAVE___BUILTIN_ASSUME_ALIGNED 1 + +/* Define to 1 if the GNU C extensions __builtin_bswap16/32/64 are supported. + */ +#define HAVE___BUILTIN_BSWAPXX 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to 1 when using POSIX threads (pthreads). */ +#define MYTHREAD_POSIX 1 + +/* Define to 1 when using Windows Vista compatible threads. This uses features + that are not available on Windows XP. */ +/* #undef MYTHREAD_VISTA */ + +/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This + avoids use of features that were added in Windows Vista. */ +/* #undef MYTHREAD_WIN95 */ + +/* Define to 1 to disable debugging code. */ +#define NDEBUG 1 + +/* Name of package */ +#define PACKAGE "xz" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "xz@tukaani.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "XZ Utils" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "XZ Utils 5.4.3" ++#define PACKAGE_STRING "XZ Utils 5.4.4" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "xz" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://tukaani.org/xz/" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "5.4.3" ++#define PACKAGE_VERSION "5.4.4" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Define to 1 if the number of available CPU cores can be detected with + cpuset(2). */ +#define TUKLIB_CPUCORES_CPUSET 1 + +/* Define to 1 if the number of available CPU cores can be detected with + pstat_getdynamic(). */ +/* #undef TUKLIB_CPUCORES_PSTAT_GETDYNAMIC */ + +/* Define to 1 if the number of available CPU cores can be detected with + sched_getaffinity() */ +/* #undef TUKLIB_CPUCORES_SCHED_GETAFFINITY */ + +/* Define to 1 if the number of available CPU cores can be detected with + sysconf(_SC_NPROCESSORS_ONLN) or sysconf(_SC_NPROC_ONLN). */ +/* #undef TUKLIB_CPUCORES_SYSCONF */ + +/* Define to 1 if the number of available CPU cores can be detected with + sysctl(). */ +/* #undef TUKLIB_CPUCORES_SYSCTL */ + +/* Define to 1 if the system supports fast unaligned access to 16-bit, 32-bit, + and 64-bit integers. */ +/* FreeBSD - derive from __NO_STRICT_ALIGNMENT */ +/* #undef TUKLIB_FAST_UNALIGNED_ACCESS */ + +/* Define to 1 if the amount of physical memory can be detected with + _system_configuration.physmem. */ +/* #undef TUKLIB_PHYSMEM_AIX */ + +/* Define to 1 if the amount of physical memory can be detected with + getinvent_r(). */ +/* #undef TUKLIB_PHYSMEM_GETINVENT_R */ + +/* Define to 1 if the amount of physical memory can be detected with + getsysinfo(). */ +/* #undef TUKLIB_PHYSMEM_GETSYSINFO */ + +/* Define to 1 if the amount of physical memory can be detected with + pstat_getstatic(). */ +/* #undef TUKLIB_PHYSMEM_PSTAT_GETSTATIC */ + +/* Define to 1 if the amount of physical memory can be detected with + sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES). */ +#define TUKLIB_PHYSMEM_SYSCONF 1 + +/* Define to 1 if the amount of physical memory can be detected with sysctl(). + */ +/* #undef TUKLIB_PHYSMEM_SYSCTL */ + +/* Define to 1 if the amount of physical memory can be detected with Linux + sysinfo(). */ +/* #undef TUKLIB_PHYSMEM_SYSINFO */ + +/* Define to 1 to use unsafe type punning, e.g. char *x = ...; *(int *)x = + 123; which violates strict aliasing rules and thus is undefined behavior + and might result in broken code. */ +/* #undef TUKLIB_USE_UNSAFE_TYPE_PUNNING */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Version number of package */ - #define VERSION "5.4.3" ++#define VERSION "5.4.4" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined(__FreeBSD__) +#include +#if defined(__NO_STRICT_ALIGNMENT) +#define TUKLIB_FAST_UNALIGNED_ACCESS 1 +#endif +#include +#if _BYTE_ORDER == _BIG_ENDIAN +# define WORDS_BIGENDIAN 1 +#endif +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + +/* Define for Solaris 2.5.1 so the uint64_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT64_T */ + +/* Define for Solaris 2.5.1 so the uint8_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT8_T */ + +/* Define to rpl_ if the getopt replacement functions and variables should be + used. */ +/* #undef __GETOPT_PREFIX */ + +/* Define to the type of a signed integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int32_t */ + +/* Define to the type of a signed integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int64_t */ + +/* Define to the type of an unsigned integer type of width exactly 16 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint16_t */ + +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + +/* Define to the type of an unsigned integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint64_t */ + +/* Define to the type of an unsigned integer type of width exactly 8 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint8_t */ + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +/* #undef uintptr_t */ From nobody Thu Aug 3 11:14:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGmSV5PFMzZZSj; Thu, 3 Aug 2023 11:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGmSV3Nxtz3Slr; Thu, 3 Aug 2023 11:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691061242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=isJSpmSgrG+5PQH3D3aSNREt3gAZOeOf6KUcJezQ978=; b=XjLbqn8MaQ1n71ENKxVNRBcdwTDnI2jhn++9xV+DL5pfLNlBjRQdCRc3pvlA6YGHnwFwJ0 Rw0424/hgjQtRUTiQ4WXpeI4NDFzy4OwOfwQCwqn4UC5WATA2dl8XPSm1T+Ght+Kfra5+q 3bdIECphskocIbXqUDyFLuigSnq5tcK+qxZ+AE0T4A3/C3iD0+26ZBcBS0WY11YKzwCyu+ w3sh6GYUFFlgHhk+pN7MgAo8HP6vPlcITmJrvlWwUGdhzaDELR73hRGH2WT7H9LZ8OcS0Z +bf0K3zS6MtJXY2rjlPY1epTibmsB1QSwbBgK/OP31kNdwE31YPq0un1aH5viA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691061242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=isJSpmSgrG+5PQH3D3aSNREt3gAZOeOf6KUcJezQ978=; b=kecEOtBiLfZAuP06MlhkK/a47zH/B+MFj3jGm156wZbldOBhuSLlzzGDfKO7YGwVX4TU7u IJqGdHljSN02545Bdv5NtdjVbUHwbUgwjfxuWhwu9JY/3YWqybCbBm0eXjJebMdVn7JEDy XVGt/UuPDKiO2BgSuVvLPWPgunyFs05Mu37kmLX13YtudzwfPUyxnr2hjY6mmn17ZAGNui Fm8twTE7ZI60lEyXwDYt0n4MUUJG52z4l74dBLfqezBwk8AfK7yR7Vqxqz03WpVJmSBfJJ q17HS5p6/bGTc0oS5rqIytlSfBHamIft3xv5svO4D9H4RgsfJ5+pDGORkr+U9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691061242; a=rsa-sha256; cv=none; b=H5wJJPBjJ7ICtVb0C+E3pwEf/JdqsnDtw+LgGAnfbZJXiMiF0UiIzOlpfzhHxkxRZBifvn dLO573abpADN87k5YrxRmpAJ27dS33YxMxGczSByphFQN8yJbbygfbVt0RhwpC4E0C7znh /wfoTsB29mbApDWUxxCZRYFeylCscO5r88rENHdUoS7ZW7D0KmG60Z0pACjAYSmZaoKgUC Ww833rSPIxnRVB05S7AjbO/dvTwDyQ1yezg1XdIsds34gVx/BrtP5htAMeI1DqXEhgjQQ9 pvAqqIx60vke2xd0EZFzfOK5tR6/s7NBymvzuZMBv/R9ALnyiFQv28j4jW1GMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGmSV2TKfz3t7; Thu, 3 Aug 2023 11:14:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373BE2Ar009571; Thu, 3 Aug 2023 11:14:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373BE2O1009570; Thu, 3 Aug 2023 11:14:02 GMT (envelope-from git) Date: Thu, 3 Aug 2023 11:14:02 GMT Message-Id: <202308031114.373BE2O1009570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: abe10d21b4ed - main - nvmecontrol: fix typos List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: abe10d21b4edf23ddc52f85a95ecd4cb62e5f1be Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=abe10d21b4edf23ddc52f85a95ecd4cb62e5f1be commit abe10d21b4edf23ddc52f85a95ecd4cb62e5f1be Author: Andrius V AuthorDate: 2023-08-03 10:14:19 +0000 Commit: Kristof Provost CommitDate: 2023-08-03 10:14:19 +0000 nvmecontrol: fix typos PR: 261911 Reviewed by: kp --- sbin/nvmecontrol/logpage.c | 2 +- sbin/nvmecontrol/modules/wdc/wdc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/nvmecontrol/logpage.c b/sbin/nvmecontrol/logpage.c index f5c7af8c535c..ae5bcc3a5aa6 100644 --- a/sbin/nvmecontrol/logpage.c +++ b/sbin/nvmecontrol/logpage.c @@ -811,7 +811,7 @@ logpage(const struct cmd *f, int argc, char *argv[]) NVME_CTRLR_DATA_LPA_NS_SMART_MASK; /* - * The log page attribtues indicate whether or not the controller + * The log page attributes indicate whether or not the controller * supports the SMART/Health information log page on a per * namespace basis. */ diff --git a/sbin/nvmecontrol/modules/wdc/wdc.c b/sbin/nvmecontrol/modules/wdc/wdc.c index 1cae15a1e54c..8936a74bab9a 100644 --- a/sbin/nvmecontrol/modules/wdc/wdc.c +++ b/sbin/nvmecontrol/modules/wdc/wdc.c @@ -591,7 +591,7 @@ print_hgst_info_background_scan(void *buf, uint16_t subtype __unused, uint8_t re return; } if (code != 0) { - printf("Expceted code 0, found code %#x\n", code); + printf("Expected code 0, found code %#x\n", code); return; } pom = le32dec(walker); From nobody Thu Aug 3 11:50:57 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGnH93CXMz2thfJ; Thu, 3 Aug 2023 11:51:01 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGnH84f96z3WGm; Thu, 3 Aug 2023 11:51:00 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.2/8.16.1) with ESMTP id 373BoviM000874; Thu, 3 Aug 2023 14:50:57 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 373BovQb000873; Thu, 3 Aug 2023 14:50:57 +0300 (MSK) (envelope-from dchagin) Date: Thu, 3 Aug 2023 14:50:57 +0300 From: Dmitry Chagin To: Konstantin Belousov Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 5a7e48dddfb5 - main - tests: Add MAP_32BIT flag test Message-ID: References: <202308012024.371KOAHb046216@gitrepo.freebsd.org> <7A066A1D-9AFA-485F-AEAE-DD88C9537A44@freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4RGnH84f96z3WGm X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] On Wed, Aug 02, 2023 at 12:57:36AM +0300, Konstantin Belousov wrote: > On Tue, Aug 01, 2023 at 09:29:32PM +0100, Jessica Clarke wrote: > > On 1 Aug 2023, at 21:24, Dmitry Chagin wrote: > > > > > > The branch main has been updated by dchagin: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=5a7e48dddfb5a668ded4742b79e6f6f88b647e6a > > > > > > commit 5a7e48dddfb5a668ded4742b79e6f6f88b647e6a > > > Author: Dmitry Chagin > > > AuthorDate: 2023-08-01 20:23:15 +0000 > > > Commit: Dmitry Chagin > > > CommitDate: 2023-08-01 20:23:15 +0000 > > > > > > tests: Add MAP_32BIT flag test > > > > > > Reviewed by: kib, markj > > > Differential Revision: https://reviews.freebsd.org/D41236 > > > MFC after: 1 month > > > --- > > > tests/sys/vm/Makefile | 8 ++++++ > > > tests/sys/vm/mmap_map_32bit_helper.c | 51 ++++++++++++++++++++++++++++++++++++ > > > tests/sys/vm/mmap_map_32bit_test.sh | 37 ++++++++++++++++++++++++++ > > > 3 files changed, 96 insertions(+) > > > > > > diff --git a/tests/sys/vm/Makefile b/tests/sys/vm/Makefile > > > index 8ef8a45e5f39..9aac49bc5320 100644 > > > --- a/tests/sys/vm/Makefile > > > +++ b/tests/sys/vm/Makefile > > > @@ -9,4 +9,12 @@ ATF_TESTS_C+= mlock_test \ > > > page_fault_signal \ > > > shared_shadow_inval_test > > > > > > +.if ${MACHINE_ARCH} != "i386" && ${MACHINE} != "arm" && \ > > > + (${MACHINE} != "powerpc" || ${MACHINE_ARCH} != "powerpc") > > > + # MAP_32BIT is only available on 64-bit platforms > > > > So use ${MACHINE_ABI:Mlong64} after including src.opts.mk? > > May be we should enable the MAP_32BIT flag on 32bit arches, instead? > It requests allocation below 2G, which is half of VA on i386, or 2/3 > on arm. Interestingly, it should work already from compat32. It's disturbing that no none has requested this, I can do that From nobody Thu Aug 3 14:08:09 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGrKP2qbnz2ttyd; Thu, 3 Aug 2023 14:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGrKP20Yyz4Dwv; Thu, 3 Aug 2023 14:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691071689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+HFC6mrEGHW6yc5WQjK+2Xn5dpTYkh3Z4ASgmB4MNAU=; b=j7KDIjsWVQqWi/3daH8JCoYGP1f6EVQctSCqRe6Sy4r0IzxFqJB9mwPWGPnqPHRgX16OZE zHioXOOsgpjfRRDbpkMRp5UMR46kMXtAsoHdt+rWKV5huFPPTzmT0THojpGVqfk9DCIWpg OgCOFOdOI+SwFzHHSt8rAYxSxVsp7Wa+zqh2V9nb3G/7o6WI14O+Ou64PMpX26jVW2lRV6 hIgh8jQKPmFQkRN4CTTd3Lt5KjPKEqoEuQoOuoYYePtQchZp43UMa6cdsRYkRNA68ZAykw OBMZxvTJwb0hFSQPyAnv4tUBqcpxCkQ6RVUtjMJS4pm8GD5/pifm/0ElSSEvZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691071689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+HFC6mrEGHW6yc5WQjK+2Xn5dpTYkh3Z4ASgmB4MNAU=; b=De7w0dZSugY8dnwSCj9tcV/eoopuP5wUo8RpizlK1iNo4t9NpODDuqBhzkz1DxNAnFwy/g 3+JScNKkulMf0Z5xNnSs26AefJRxrrdirT2R17KtEsq/kK+yrNerhPSPGs/Bf7Ivbd+jPQ zDgugBVCIYMcptZhuPgLGrJhex5GHOu+m4VrxmmTXzdLkLYIrnkHJGy/JEs/4JRTCRXZhD YzR6CeuYKUQ2KfIRMmMOqHILY+dDBn0UxqwZjNiYGsvSLNebPbdakyxJK1v32prAllBmzv x3mE52QAQe1UjHZXBoTL6BYdGqaicb6mb3wqSp4a4GtWXhILLASLt5KGfuMQvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691071689; a=rsa-sha256; cv=none; b=UjAgInt44V0T551I987m4rLNWYT5bx9O1Tl9iQfqx4lh0+zv1+jE5Jvw9eRPvzLYyM81hM QGTkw/BCXGQDwib+N7QKj8MWJ0sHRu2GfsX3PMZq7X/AXebD+lmVvzRpqKmAmO7o7oT+zC Yy4Dm9cFctrffrPYqWBiT6j8WZIwc7dJuADJxNaQpj/nyJsuXZ5g3XOPXJDUyv64aIeJEa FRx+wVFA7nnORrzCBy9CJKyasZuAqgUievozc2sXTFjFl3JdaNDWTuOR1HXtwyLzBXxO6B sIPYyyR7xi/szzU1sB0ersKoYq2ZZOEVtBaCzfflmYuvPVY2wLj1+50Vrn/Ikg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGrKP15xgz8VF; Thu, 3 Aug 2023 14:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373E89wW091467; Thu, 3 Aug 2023 14:08:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373E89SA091466; Thu, 3 Aug 2023 14:08:09 GMT (envelope-from git) Date: Thu, 3 Aug 2023 14:08:09 GMT Message-Id: <202308031408.373E89SA091466@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: d441ec1c2189 - main - g_bio(9): add link to bio(9) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d441ec1c218991421d08ac4661878ed5c182cd64 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d441ec1c218991421d08ac4661878ed5c182cd64 commit d441ec1c218991421d08ac4661878ed5c182cd64 Author: Mitchell Horne AuthorDate: 2023-08-03 13:48:11 +0000 Commit: Mitchell Horne CommitDate: 2023-08-03 14:07:31 +0000 g_bio(9): add link to bio(9) This page documents 'struct bio', so this can be helpful with finding or referencing it. Reviewed by: imp, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41252 --- share/man/man9/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index ab373e22b185..2758f44f0911 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1118,7 +1118,8 @@ MLINKS+=fpu_kern.9 fpu_kern_alloc_ctx.9 \ fpu_kern.9 fpu_kern_thread.9 \ fpu_kern.9 is_fpu_kern_thread.9 MLINKS+=g_attach.9 g_detach.9 -MLINKS+=g_bio.9 g_alloc_bio.9 \ +MLINKS+=g_bio.9 bio.9 \ + g_bio.9 g_alloc_bio.9 \ g_bio.9 g_clone_bio.9 \ g_bio.9 g_destroy_bio.9 \ g_bio.9 g_duplicate_bio.9 \ From nobody Thu Aug 3 14:08:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGrKQ51N4z2ttwh; Thu, 3 Aug 2023 14:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGrKQ2cFzz4FJw; Thu, 3 Aug 2023 14:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691071690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YWNTF+DIhGiLi3cnldUFbR/qQNqJW6XxCHFEDrjnf+A=; b=SZ8Rc6jMk6uRYB+68DgsS6x2jgeifo6SH/NklkHQ+/LVfa7CCWjl5fV6I0Qal8lw8keqKY deKbhM5TeEE8AySG/CJ97Ebp8397hvscRXfuYewqVfKnZYDD9HmewvLPR+UjNCRdHMrk+l D7rXMDuxu6li8EmRljouKH/XaPnd94mVLKW3AoaLQrqr/GV6RI4hmFmFXM1407fPiZEh5l ScmZYVP3Nst3OuuGUeUR6gU6o76zUmgCTJoWF2Coiuf0rJvWK2utIqNjFyN7tEsw1xjliK to7mGAduI3Q+3BbVzF5+HSy7UWQWQHmpHS0EI7V9c6MO3OPXIsDBDjAuJK+XQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691071690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YWNTF+DIhGiLi3cnldUFbR/qQNqJW6XxCHFEDrjnf+A=; b=nV6aovK9s2DCphlIbeHOdWDPgZS9MCkpUZfwG/Jk8e/l9yQt+Pgs2xGY4SpUWGN/0zcoBl 6DMojE5aUfuLFMN9kVqeWNfh+c3UKZhlBfUUlJK2ZDd11zUms1T4XyaDmmUVSGCzzI199v px+3YLf/ULAnYaiUQ0dHz8uvAAyhnccxc5Ud7uN69x77562Kwje30AL2rgzxrtgb1Vo5lM Y2HYk1e3KAQvQHLpD42iZaNp+Bz/Jp1wZNX3gKvYTymWN+dvrbW2bkWzfl1ElY3gwEcVY6 cR2Mx+T0SoCuEUe5JvFkkIQo7IC+iPXHLQ9O3vjrKikJ4xjzaNJXhjW5I7WA/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691071690; a=rsa-sha256; cv=none; b=VHPaVhkgHGB+qtiYJsfeN7k4wMTtFTdHxa+CsmoiruW36EXqBpg92LEmMesKXtuswY9kPY 9QgNBWr8gga1fGrrOL8oEfDIwBVz/lc/2D08ii5OPI9ogMzB2d5sYHg8I4h/VdqCx7svaq Y+UJqmFtrka9IEculrAeF99AauI9EXOdmtuoE3cT4TZGMh2+9EeKHVdwpLPIdtI6PoHYPz y3HccjaHlPfW1yzEiuJT1+Muf7Ur6CQduLLKG5W96L97MDHDbzBXboFT/36q6FLbv4jF74 qs/hqrG8xl3RgZ82DWUqR4Fi7L03btszp7K3fUy14aPz2tG5s9VblsLvgqMCFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGrKQ1VBwz8QX; Thu, 3 Aug 2023 14:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373E8A9c091487; Thu, 3 Aug 2023 14:08:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373E8AZS091486; Thu, 3 Aug 2023 14:08:10 GMT (envelope-from git) Date: Thu, 3 Aug 2023 14:08:10 GMT Message-Id: <202308031408.373E8AZS091486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 84f9f2c5cf78 - main - intro(9): rewrite from scratch List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84f9f2c5cf7841fffc03ccb1833814892ae15132 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=84f9f2c5cf7841fffc03ccb1833814892ae15132 commit 84f9f2c5cf7841fffc03ccb1833814892ae15132 Author: Mitchell Horne AuthorDate: 2023-08-03 13:48:15 +0000 Commit: Mitchell Horne CommitDate: 2023-08-03 14:07:41 +0000 intro(9): rewrite from scratch This page has existed as a placeholder since its creation in 1995. It does not provide a useful introduction to the content in this section. Reimagine it as a top-level overview page containing brief descriptions and links to existing pages in section 9. It is roughly organized into sub-sections, grouped by topic or subsystem. In other words, the page is meant to function as a map to other content. There is a balance to be found here between providing as many links as possible and keeping the page concise and searchable. In general the aim is to reference pages which provide the best entry point to a particular topic. For example, a link is given to locking(9), but not to the specific lock pages such as mutex(9) or rwlock(9). NetBSD has done something similar with their intro(9), so some inspiration has been taken from there, although their content doesn't align that closely with what we have. I have done a thorough review of our existing pages and formed these subsections around them, but they are meant to evolve. PR: 270481 Reviewed by: imp, emaste MFC after: 3 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41104 --- share/man/man9/intro.9 | 594 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 504 insertions(+), 90 deletions(-) diff --git a/share/man/man9/intro.9 b/share/man/man9/intro.9 index 83956c0bbccf..458ee0ab4697 100644 --- a/share/man/man9/intro.9 +++ b/share/man/man9/intro.9 @@ -1,105 +1,519 @@ -.\" Copyright (c) 1983, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. .\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. +.\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. +.\" Copyright (c) 2023 The FreeBSD Foundation .\" -.\" $FreeBSD$ +.\" This manual page was written by Mitchell Horne under +.\" sponsorship from the FreeBSD Foundation. .\" -.Dd December 13, 1995 +.Dd August 2, 2023 .Dt INTRO 9 .Os .Sh NAME .Nm intro -.Nd "introduction to system kernel interfaces" +.Nd "introduction to kernel programming interfaces" .Sh DESCRIPTION -This section contains information about the interfaces and -subroutines in the kernel. -.Sh PROTOTYPES ANSI-C AND ALL THAT -Yes please. -.Pp -We would like all code to be fully prototyped. -.Pp -If your code compiles cleanly with -.Nm cc -.Ar -Wall -we would feel happy about it. -It is important to understand that this is not a question of just shutting up -.Nm cc , -it is a question about avoiding the things it complains about. -To put it bluntly, do not hide the problem by casting and other -obfuscating practices, solve the problem. -.Sh INDENTATION AND STYLE -Believe it or not, there actually exists a guide for indentation and style. -It is not generally applied though. -.Pp -We would appreciate if people would pay attention to it, and at least not -violate it blatantly. -.Pp -We do not mind it too badly if you have your own style, but please make -sure we can read it too. -.Pp -Please take time to read +Welcome to the +.Fx +kernel documentation. +Outside of the source code itself, this set of +.Xr man 1 +pages is the primary resource for information on usage of the numerous +programming interfaces available within the kernel. +In some cases, it is also a source of truth for the implementation details +and/or design decisions behind a particular subsystem or piece of code. +.Pp +The intended audience of this documentation is developers, and the primary +authors are also developers. +It is written assuming a certain familiarity with common programming or +OS-level concepts and practices. +However, this documentation should also attempt to provide enough background +information that readers approaching a particular subsystem or interface for +the first time will be able to understand. +.Pp +To further set expectations, we acknowledge that kernel documentation, like the +source code itself, is forever a work-in-progress. +There will be large sections of the codebase whose documentation is subtly or +severely outdated, or missing altogether. +This documentation is a supplement to the source code, and can not always be +taken at face value. +.Pp +At its best, section 9 documentation will provide a description of a particular +piece of code that, paired with its implementation, fully informs the reader of +the intended and realized effects. +.Pp +.Xr man 1 +pages in this section most frequently describe functions, but may also +describe types, global variables, macros, or high-level concepts. +.Sh CODING GUIDELINES +Code written for the +.Fx +kernel is expected to conform to the established style and coding conventions. +Please see .Xr style 9 -for more information. -.Sh NAMING THINGS -Some general rules exist: -.Bl -enum -.It -If a function is meant as a debugging aid in DDB, it should be enclosed -in -.Bd -literal -offset indent -#ifdef DDB - -#endif /* DDB */ +for a detailed set of rules and guidelines. +.Sh OVERVIEW +Below is presented various subsystems. +.Ss Data Structures +There are implementations for many well-known data structures available in the +kernel. +.Bl -tag -width "Xr bitstring 3" +.It Xr bitstring 3 +Simple bitmap implementation. +.It Xr counter 9 +An SMP-safe general-purpose counter implementation. +.It Xr hash 9 +Hash map implementation. +.It Xr nv 9 +Name/value pairs. +.It Xr queue 3 +Singly-linked and doubly-linked lists, and queues. +.It Xr refcount 9 +An SMP-safe implementation of reference counts. +.It Xr sbuf 9 +Dynamic string composition. +.It Xr sglist 9 +A scatter/gather list implementation. +.El +.Ss Utility Functions +Functions or facilities of general usefulness or convenience. +See also the +.Sx Testing and Debugging Tools +or +.Sx Miscellaneous +sub-sections below. +.Pp +Formatted output and logging functions are described by +.Xr printf 9 . +.Pp +Endian-swapping functions: +.Xr byteorder 9 . +.Pp +Data output in hexadecimal format: +.Xr hexdump 9 . +.Pp +A rich set of macros for declaring +.Xr sysctl 8 +variables and functions is described by +.Xr sysctl 9 . +.Pp +Non-recoverable errors in the kernel should trigger a +.Xr panic 9 . +Run-time assertions can be verified using the +.Xr KASSERT 9 +macros. +Compile-time assertions should use +.Fn _Static_assert . +.Pp +The SYSINIT framework provides macros for declaring functions that will be +executed during start-up and shutdown; see +.Xr SYSINIT 9 . +.Pp +Deprecation messages may be emitted with +.Xr gone_in 9 . +.Pp +A unit number facility is provided by +.Xr unr 9 . +.Ss Synchronization Primitives +The +.Xr locking 9 +man page gives an overview of the various types of locks available in the +kernel and advice on their usage. +.Pp +Atomic primitives are described by +.Xr atomic 9 . +.Pp +The +.Xr epoch 9 +and +.Xr smr 9 +facilities are used to create lock-free data structures. +There is also +.Xr seqc 9 . +.Ss Memory Management +Dynamic memory allocations inside the kernel are generally done using +.Xr malloc 9 . +Frequently allocated objects may prefer to use +.Xr uma 9 . +.Pp +.\" MHTODO: It would be useful to have a vm_page(9) or similar +.\" high-level page which points to the following contents instead. +Much of the virtual memory system operates on +.Vt vm_page_t +structures. +The following functions are documented: +.Bd -ragged -offset indent +.Xr vm_page_advise 9 , +.Xr vm_page_alloc 9 , +.Xr vm_page_bits 9 , +.Xr vm_page_aflag 9 , +.Xr vm_page_alloc 9 , +.Xr vm_page_bits 9 , +.Xr vm_page_busy 9 , +.Xr vm_page_deactivate 9 , +.Xr vm_page_free 9 , +.Xr vm_page_grab 9 , +.Xr vm_page_insert 9 , +.Xr vm_page_lookup 9 , +.Xr vm_page_rename 9 , +.Xr vm_page_sbusy 9 , +.Xr vm_page_wire 9 .Ed .Pp -And the name of the procedure should start with the prefix -.Li DDB_ -to clearly identify the procedure as a debugger routine. +Virtual address space maps are managed with the +.Xr vm_map 9 +API. +.Pp +The machine-dependent portion of the virtual memory stack is the +.Xr pmap 9 +module. +.Pp +Allocation policies for NUMA memory domains are managed with the +.Xr domainset 9 +API. +.Ss File Systems +The kernel interface for file systems is +.Xr VFS 9 . +File system implementations register themselves with +.Xr vfsconf 9 . +.Pp +The abstract and filesystem-independent representation of a file, directory, or +other file-like entity within the kernel is the +.Xr vnode 9 . +.Pp +The implementation of access control lists for filesystems is described by +.Xr acl 9 . +Also +.Xr vaccess 9 . +.Ss I/O and Storage +.\" TODO: This page needs to be rewritten before it can be included here. +.\" The buffer cache is described by: +.\" .Xr buf 9 +.\" .Pp +The GEOM framework represents I/O requests using the +.Xr bio 9 +structure. +.Pp +Disk drivers connect themselves to GEOM using the +.Xr disk 9 +API. +.Pp +The +.Xr devstat 9 +facility provides an interface for recording device statistics in disk drivers. +.Ss Networking +Much of the networking stack uses the +.Xr mbuf 9 , +a flexible memory management unit commonly used to store network packets. +.Pp +Network interfaces are implemented using the +.Xr ifnet 9 +API, which has functions for drivers and consumers. +.Pp +A framework for managing packet output queues is described by +.Xr altq 9 . +.Pp +To receive incoming packets, network protocols register themselves with +.Xr netisr 9 . +.Pp +Virtualization of the network stack is provided by +.Xr VNET 9 . +.Pp +The front-end for interfacing with network sockets from within the kernel is +described by +.Xr socket 9 . +The back-end interface for socket implementations is +.Xr domain 9 . +.Pp +The low-level packet filter interface is described by +.Xr pfil 9 . +.Pp +The +.Xr bpf 9 +interface provides a mechanism to redirect packets to userspace. +.Pp +The subsystem for IEEE 802.11 wireless networking is described by +.Xr ieee80211 9 . +.Pp +A framework for modular TCP implementations is described by +.Xr tcp_functions 9 . +.Pp +A framework for modular congestion control algorithms is described by +.Xr mod_cc 9 . +.Ss Device Drivers +.\" TODO: a bus(9) or newbus(9) page, as well as updates to existing pages +.\" would be helpful in laying out the high-level concepts of FreeBSD's device +.\" structure, and explaining the organization of existing documentation. +Consult the +.Xr device 9 +and +.Xr driver 9 +pages first. +.Pp +Most drivers act as devices, and provide a set of methods implementing the +device interface. +This includes methods such as +.Xr DEVICE_PROBE 9 , +.Xr DEVICE_ATTACH 9 , +and +.Xr DEVICE_DETACH 9 . +.Pp +In addition to devices, there are buses. +Buses may have children, in the form of devices or other buses. +Bus drivers will implement additional methods, such as +.Xr BUS_ADD_CHILD 9 , +.Xr BUS_READ_IVAR 9 , +or +.Xr BUS_RESCAN 9 . +.Pp +Buses often perform resource accounting on behalf of their children. +For this there is the +.Xr rman 9 +API. +.Pp +Drivers can request and manage their resources (e.g. memory-space or IRQ +number) from their parent using the following sets of functions: +.Bd -ragged -offset indent +.Xr bus_alloc_resource 9 , +.Xr bus_adjust_resource 9 , +.Xr bus_get_resource 9 , +.Xr bus_map_resource 9 , +.Xr bus_release_resource 9 , +.Xr bus_set_resource 9 +.Ed +.Pp +Direct Memory Access (DMA) is handled using the +.Xr busdma 9 +framework. +.Pp +Functions for accessing bus space (i.e. read/write) are provided by +.Xr bus_space 9 . +.Ss Clocks and Timekeeping +The kernel clock frequency and overall system time model is described by +.Xr hz 9 . +.Pp +A few global time variables, such as system up-time, are described by +.Xr time 9 . +.Pp +Raw CPU cycles are provided by +.Xr get_cyclecount 9 . +.Ss Userspace Memory Access +Direct read/write access of userspace memory from the kernel is not permitted, +and memory transactions that cross the kernel/user boundary must go through one +of several interfaces built for this task. +.Pp +Most device drivers use the +.Xr uiomove 9 +set of routines. +.Pp +Simpler primitives for reading or writing smaller chunks of memory are +described by +.Xr casuword 9 , +.Xr copy 9 , +.Xr fetch 9 , +and +.Xr store 9 . +.Ss Kernel Threads, Tasks, and Callbacks +Kernel threads and processes are created using the +.Xr kthread 9 +and +.Xr kproc 9 +interfaces, respectively. +.Pp +Where dedicated kernel threads are too heavyweight, there is also the +.Xr taskqueue 9 +interface. +.Pp +For low-latency callback handling, the +.Xr callout 9 +framework should be used. +.Pp +Dynamic handlers for pre-defined event hooks are registered and invoked using +the +.Xr EVENTHANDLER 9 +API. +.Ss Thread Switching and Scheduling +The machine-independent interface to a context switch is +.Xr mi_switch 9 . +.Pp +To prevent preemption, use a +.Xr critical 9 +section. +.Pp +To voluntarily yield the processor, use +.Xr kern_yield 9 . +.Pp +The various functions which will deliberately put a thread to sleep are +described by +.Xr sleep 9 . +Sleeping threads are removed from the scheduler and placed on a +.Xr sleepqueue 9 . +.\" TODO: This page is outdated and can't be included here yet. +.\".Pp +.\"The thread scheduler interface is described by +.\".Xr scheduler 9 . +.Ss Processes and Signals +To locate a process or process group by its identifier, use +.Xr pfind 9 +and +.Xr pgfind 9 . +Alternatively, the +.Xr pget 9 +function provides additional search specificity. +.Pp +The "hold count" of a process can be manipulated with +.Xr PHOLD 9 . +.Pp +The kernel interface for signals is described by +.Xr signal 9 . +.Pp +Signals can be sent to processes or process groups using the functions +described by +.Xr psignal 9 . +.Ss Security +See the generic security overview in +.Xr security 7 . +.Pp +The basic structure for user credentials is +.Vt struct ucred , +managed by the +.Xr ucred 9 +API. +Thread credentials are verified using +.Xr priv 9 +to allow or deny certain privileged actions. +.Pp +Policies influenced by +.Va kern.securelevel +must use the +.Xr securelevel_gt 9 +or +.Xr securelevel_ge 9 +functions. +.Pp +The Mandatory Access Control (MAC) framework provides a wide set of hooks, +supporting dynamically-registered security modules; +see +.Xr mac 9 . +.Pp +Cryptographic services are provided by the OpenCrypto framework. +This API provides and interface for both consumers and crypto drivers; +see +.Xr crypto 9 . +.Pp +For information on random number generation, see +.Xr random 9 +and +.Xr prng 9 . +.Ss Kernel Modules +The interfaces for declaring loadable kernel modules are described by +.Xr module 9 . +.Ss Interrupts +The machine-independent portion of the interrupt framework supporting the +registration and execution of interrupt handlers is described by +.Xr intr_event 9 . +.Pp +Software interrupts are provided by +.Xr swi 9 . +.Pp +Device drivers register their interrupt handlers using the +.Xr bus_setup_intr 9 +function. +.Ss Testing and Debugging Tools +A kernel test framework: +.Xr kern_testfrwk 9 +.Pp +A facility for defining configurable fail points is described by +.Xr fail 9 . +.Pp +Commands for the +.Xr ddb 4 +kernel debugger are defined with the +.Xr DB_COMMAND 9 +family of macros. +.Pp +The +.Xr ktr 4 +tracing facility adds static tracepoints to many areas of the kernel. +These tracepoints are defined using the macros described by +.Xr ktr 9 . +.Pp +Static probes for DTrace are defined using the +.Xr SDT 9 +macros. +.Pp +Stack traces can be captured and printed with the +.Xr stack 9 +API. +.Pp +Kernel sanitizers can perform additional compiler-assisted checks against +memory use/access. +These runtimes are capable of detecting difficult-to-identify classes of bugs, +at the cost of a large overhead. +Supported is the Kernel Address Sanitizer +.Xr KASAN 9 , +and the Kernel Memory Sanitizer +.Xr KMSAN 9 . +.Pp +The +.Cd LOCK_PROFILING +kernel config option enables extra code to assist with profiling and/or +debugging lock performance; +see +.Xr LOCK_PROFILING 9 . +.Ss Driver Tools +Defined functions/APIs for specific types of devices. +.Bl -tag -width "Xr usbdi 9" +.It Xr iflib 9 +Programming interface for +.Xr iflib 4 +based network drivers. +.It Xr pci 9 +Peripheral Component Interconnect (PCI) and PCI Express (PCIe) programming API. +.It Xr pwmbus 9 +Pulse-Width Modulation (PWM) bus interface methods. +.It Xr usbdi 9 +Universal Serial Bus programming interface. +.It Xr superio 9 +Functions for Super I/O controller devices. .El -.Sh SCOPE OF SYMBOLS -It is important to carefully consider the scope of symbols in the kernel. -The default is to make everything static, unless some reason requires -the opposite. -.Pp -There are several reasons for this policy, -the main one is that the kernel is one monolithic name-space, -and pollution is not a good idea here either. -.Pp -For device drivers and other modules that do not add new internal interfaces -to the kernel, the entire source should be in one file if possible. -That way all symbols can be made static. -.Pp -If for some reason a module is split over multiple source files, then try -to split the module along some major fault-line and consider using the -number of global symbols as your guide. -The fewer the better. +.Ss Miscellaneous +Dynamic per-CPU variables: +.Xr dpcpu 9 . +.Pp +CPU bitmap management: +.Xr cpuset 9 . +.Pp +Kernel environment management: +.Xr getenv 9 . +.Pp +Contexts for CPU floating-point registers are managed by the +.Xr fpu_kern 9 +facility. +.Pp +For details on the shutdown/reboot procedure and available shutdown hooks, see +.Xr reboot 9 . +.Pp +A facility for asynchronous logging to files from within the kernel is provided +by +.Xr alq 9 . +.Pp +The +.Xr osd 9 +framework provides a mechanism to dynamically extend core structures in a way +that preserves KBI. +See the +.Xr hhook 9 +and +.Xr khelp 9 +APIs for information on how this is used. +.Pp +The kernel object implementation is described by +.Xr kobj 9 . .Sh SEE ALSO +.Xr man 1 , .Xr style 9 -.Sh HISTORY -The -.Nm -section manual page appeared in -.Fx 2.2 . +.Rs +.%T "The FreeBSD Architecture Handbook" +.%U "https://docs.freebsd.org/en/books/arch-handbook/" +.Re From nobody Thu Aug 3 14:08:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGrKR5L4nz2ttbR; Thu, 3 Aug 2023 14:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGrKR3XQ3z4F0n; Thu, 3 Aug 2023 14:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691071691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qlz8zHX/zKZJ7tCwweiL1Tm18mj6HhlJuFcWY64JdsA=; b=RKW5yGEi/623jkJ+j4lYfngK/lWtzN1WXlJ0zzQhF+zqp8ArYmptOtuusPAvv+Se+EZIcU or9tgwyEtHaM/9XLyRBf8V7W4lOfim8qxHj0mijEjSjgFEdhjiHQUTCqhPdjeDALn0MILk ns31ejYf5UNVHM0BbCopbwnuK0OH1b57Pb9Hs4qYI5xRdQYZMpZrKpR2LpztaYnTXjzxSU +YvdoZNvD/x5s6+UNSb0XiJ4Lku5SpgXe/JaIwoBTfjYIwGWPNrIBR5k3+L6PV+1x2qW/q 2OG0Hu9Z00YvdWSRdt1qNVaBkSb0B/2DPHaWPRQuaHjYRh7W8dxREpj54rvk9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691071691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qlz8zHX/zKZJ7tCwweiL1Tm18mj6HhlJuFcWY64JdsA=; b=DY2rfTvdUfoQ7NSP9D0a6ktdkWyiZ6CUVAd/YAM8hhv3PYDRNs4eTyPO6l9YbHSkrWSCGW aWZYUB9Sbc+IDd0P3YPJDfe/pYASpSccYpIZOfoEKQV75oqk40Yt0DXHbVQ1u9g8OGc24B xQ/AZGY0Qt+lMpLZWrWfXTfpIYAGSYLciTv8De3hb3/X5At0ZuHhKC+ECfiBp6I9S7kDuv PKx+75Zbh+aFzm+BvrtrIFiGHZUk3OJbGz0eneay/s8TbYAMUNp8AmbAg1t7Ikx8WibWl2 oA8Q9zocUT2VAuHJKLjcNHNbB+0tBi03iqij0UjLy2SvZ4oSBoRMHFeqqpmxvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691071691; a=rsa-sha256; cv=none; b=sQLvpIjk9vk/TVyJKD8S4e6b9ddlOCHUycWA4qb1uVAWd5TnOUY78uzQl8bRQHXOG+lkXU kK+ORDyVKPc2WG4JRvz85PgctZvsdtMenUAk3Q4IFth3WrXCMkpIi1StQy05pDeWmVFvAu 5vkl2gvSNDYjFJuc1r3U7JLJzyDqCp9p2ADD9/C3e4+v3o1L+VSG6skjE8b0QfZc0bogYH XXuBNhSL3S/aZyN8ovVDpDaW0HfHHk570WX8B36Twbzplp9uLWMhGOGMdE92LS8smcV2vg Y4FP4Q7jJ/YkPBZn6Mr5YnUPqkAZu2zCTHdDaqLInOjjwP/i4q/7iGDgv/JzhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGrKR2fCXz7tT; Thu, 3 Aug 2023 14:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373E8Bc5091506; Thu, 3 Aug 2023 14:08:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373E8B0R091505; Thu, 3 Aug 2023 14:08:11 GMT (envelope-from git) Date: Thu, 3 Aug 2023 14:08:11 GMT Message-Id: <202308031408.373E8B0R091505@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 32e47f62724e - main - sys/README.md: Add a section for documentation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32e47f62724e6cce2df0bc69d6ceba2d058d3585 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=32e47f62724e6cce2df0bc69d6ceba2d058d3585 commit 32e47f62724e6cce2df0bc69d6ceba2d058d3585 Author: Mitchell Horne AuthorDate: 2023-08-03 13:48:17 +0000 Commit: Mitchell Horne CommitDate: 2023-08-03 14:07:41 +0000 sys/README.md: Add a section for documentation Add web links to intro(9) and the Architecture Handbook. Reviewed by: lwhsu, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41253 --- sys/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/README.md b/sys/README.md index 77db5026eff3..10c9f183f7e1 100644 --- a/sys/README.md +++ b/sys/README.md @@ -9,6 +9,17 @@ architecture. `GENERIC` is the configuration used in release builds. `NOTES` contains documentation of all possible entries. `LINT` is a compile-only configuration used to maximize build coverage and detect regressions. +Documentation: +-------------- + +Source code documentation is maintained in a set of man pages, under section 9. +These pages are located in [`share/man/man9`](../share/man/man9), from the +top-level of the src tree. Consult [`intro(9)`](https://man.freebsd.org/intro/9) +for an overview of existing pages. + +Some additional high-level documentation of the kernel is maintained in the +[Architecture Handbook](https://docs.freebsd.org/en/books/arch-handbook/). + Source Roadmap: --------------- | Directory | Description | From nobody Thu Aug 3 14:13:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGrRP4fp2z2tvlK; Thu, 3 Aug 2023 14:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGrRP4CHzz4Gk2; Thu, 3 Aug 2023 14:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691072001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gr+MalKw32rRtQ/pWQAkWAj6BG/tLJmyVNJgBJQ1gPc=; b=v1STJHhyYdGICOeBHlUJ4M8eXjDi5Xr7A85fIzeE77Xa2uhEUzPW5co+29ktqvqQcxJXe6 2a79B2B0Dw+kp+4HCyC6AOEqLIsWvRoEnpXXKWVrHy+OAeAmvL/htT90epUDZhVTS1YPsl dhkkrYazW92Y9631RhbuBkOrpOHykk+GbdjirJ8Hpca6A/wr4ZmHxW8JQOHKH+MiKgVqT+ sjUJ4CK+3N79iShxD5huS78IxdUiDkZGuU/NASpjGgeQzh7l3rXwGls/mQw8svLB98PnqZ a+C9t6awQvqpVwXqzr3KOynW7qFdcoqKzNzN1OWYgaPas0KfapL8sZ1ngA8e7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691072001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gr+MalKw32rRtQ/pWQAkWAj6BG/tLJmyVNJgBJQ1gPc=; b=OQHY/sq7EUm8JFo19KIpMzAh4t/66xNQzjW1IwKhL+Hol/C3r6z/vQQ9duE72MmrRmywX5 vsXtX95atJxjNI99knCx7teotaXlaGyEskG0kGdekOLm+ZovzcL4Ck/f4sphP9tE+xCqPb cT0M8blYmckMYeANnUkXu+rfGbS+2o7nzIh9KbMOtWEtwwZ6TvQ8CYklPIkMIpylGDckim Ki1RM46/RsQ5jjtQjQ3054A4wLmvc19/19VEBhfkND45uCe4/QHyI3nJ61S1CyyHmBS+98 rmKUpEZMmSLxD1cMyGSs/GkR8PFbsr96Dw+xjzWxVgDM8S0toMLVB7P2l3WRXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691072001; a=rsa-sha256; cv=none; b=hNwKSVpRDyN3QPnP5WcQvHaiZ58CrqicMxAFMZnt9f7KEmdoRHAJTTCl6y+52O2BMmdDa4 VMnSPxsVYS9PW5Szp248Pfme13ewdrkTkI24jeLyuskkfD+rKwibU1Ig754c/7aBW7pfog IfWkd/kvVgYPUZD075eqFlol9DflGvrTgEozWfHH2T2ry0U/MyCq0qWMkrv/gx6IKTJ335 A5uynLDhqmy2SIaarvl5IeC4yh1ODAqVXepaQBiTVxETMH3Kc7ZChHAxsI4rTgkbvF6eye 547mFv0pyCLS4R6mnpmILSMDqMvlYU2wyrQ4DrMO4a+Q9P8PKpgGvkkjy/mVpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGrRP3GyTz8By; Thu, 3 Aug 2023 14:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373EDLE9007577; Thu, 3 Aug 2023 14:13:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373EDLRJ007576; Thu, 3 Aug 2023 14:13:21 GMT (envelope-from git) Date: Thu, 3 Aug 2023 14:13:21 GMT Message-Id: <202308031413.373EDLRJ007576@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 8bdceaecabd9 - main - hwpmc_arm64: plug memory leak List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8bdceaecabd91ce5ed23646d91cef878681e19d6 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8bdceaecabd91ce5ed23646d91cef878681e19d6 commit 8bdceaecabd91ce5ed23646d91cef878681e19d6 Author: Mitchell Horne AuthorDate: 2023-08-03 14:09:48 +0000 Commit: Mitchell Horne CommitDate: 2023-08-03 14:13:03 +0000 hwpmc_arm64: plug memory leak Free allocated per-CPU structures in the pcpu_fini and finalize methods. While here, add debug trace entries to these methods. Reviewed by: jkoshy, andrew MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41268 --- sys/dev/hwpmc/hwpmc_arm64.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index bbd3edf84ea0..90a35456feb7 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -450,7 +450,7 @@ arm64_pcpu_init(struct pmc_mdep *md, int cpu) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[arm64,%d] wrong cpu number %d", __LINE__, cpu)); - PMCDBG1(MDP, INI, 1, "arm64-init cpu=%d", cpu); + PMCDBG0(MDP, INI, 1, "arm64-pcpu-init"); arm64_pcpu[cpu] = pac = malloc(sizeof(struct arm64_cpu), M_PMC, M_WAITOK | M_ZERO); @@ -491,10 +491,16 @@ arm64_pcpu_fini(struct pmc_mdep *md, int cpu) { uint32_t pmcr; + PMCDBG0(MDP, INI, 1, "arm64-pcpu-fini"); + pmcr = arm64_pmcr_read(); pmcr &= ~PMCR_E; arm64_pmcr_write(pmcr); + free(arm64_pcpu[cpu]->pc_arm64pmcs, M_PMC); + free(arm64_pcpu[cpu], M_PMC); + arm64_pcpu[cpu] = NULL; + return (0); } @@ -605,5 +611,7 @@ pmc_arm64_initialize(void) void pmc_arm64_finalize(struct pmc_mdep *md) { + PMCDBG0(MDP, INI, 1, "arm64-finalize"); + free(arm64_pcpu, M_PMC); } From nobody Thu Aug 3 14:13:22 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGrRQ62B9z2tvhl; Thu, 3 Aug 2023 14:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGrRQ5S9Gz4HBm; Thu, 3 Aug 2023 14:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691072002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hc3u8geD4EIWSi2pySFKM0lu8B7oUCnSbwbizsXBGPA=; b=K9aYZcoYpx96y3WK5SBPboeqG/7cv1MkmEsteHw8NKn/KAGtU0257f8aitklWSRSxEeLhc yeFiea+8bj+7712mXZtQFyBMEycmwthNz32iqymm24gWPNwGmA5SOT3cLI34RJzBqMsr7I IDucnA+qtS6gjMvufqsT8MCDMp4vq2iS/2oPf3Xd4Y5FqOQald28oGMPF0IuMzrhNpndTS bwnAM21kZ7r2tS62h78yOS+wHKg9eENoOMEeNnjMes6c6KlP1l5hVKmObRHu+ESN4tttBZ atElux/uu2LsNAo5lNhq/lOQFsFYkrrb03leOv4I82uLcK5YZpJmJ34xYkrfaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691072002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hc3u8geD4EIWSi2pySFKM0lu8B7oUCnSbwbizsXBGPA=; b=QovEs3ZiYcIVxG4uSBvteiTuwip9+ze/p1UOVq91B6OUuMppLN4mCv6vKfirkm1DeF7ufh rW4WSSRqlNWqDJYcC4PzbJB6r74s1LZSSmidgKOtGaa08UhOqe21UMaBkofHKzMtuh+Wzl LCnL9EV5Q6kclYO5dEYWUotQVSBHMSsMiC6sIHqcWn8ZKD/T3riImbAOkBk+LmEvzFcgiD lu1vyZP9bCmavsp6AQ4tRR+L5pxtwuuym65V9zPA0yNPOaug+rVOBf6SsoavoV6bQOyQ+y m9EJ+qxua5yp0keULZb+UtWjXgV6P/6xrekTmj3YeB0Yi7x2/kFthS6kFzC5rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691072002; a=rsa-sha256; cv=none; b=KDODMKstxycwzJYKJUSkWLSnIxtMx+A5LLPljbEGEYK9ec4tDSC6v+5QTPlucbQoymiecq vdGPT2/E3pQ7uYC8zltbfTQF1JnyE5227BIklgHenv8qYjPaDPhkW6yxoKswuP231NXNNe qXMDetErqYqXUEokZWYaRmV9ZzHSGeVGGrrpMUDP+uN28NG9R1OcRWlPVp72VaIInBbUJ3 CPf6I7Q+TS2wJXV/cY31Bq2/DSsKxhiBiPQAYDmLrXXvHouYFibNpBJDiqM330gAirosW4 KmcOKonT3K8wiYd5bjOTXUFSpOGSPWEPLo98B+K8rvvs0xsvqGkK22Z9nQpSjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGrRQ4RbCz8hr; Thu, 3 Aug 2023 14:13:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373EDMIf007596; Thu, 3 Aug 2023 14:13:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373EDMZQ007595; Thu, 3 Aug 2023 14:13:22 GMT (envelope-from git) Date: Thu, 3 Aug 2023 14:13:22 GMT Message-Id: <202308031413.373EDMZQ007595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 9c0a2d522f3a - main - hwpmc_armv7: plug memory leak List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=9c0a2d522f3a18fc795a7dd6266d2be2aff4b084 commit 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084 Author: Mitchell Horne AuthorDate: 2023-08-03 14:10:26 +0000 Commit: Mitchell Horne CommitDate: 2023-08-03 14:13:10 +0000 hwpmc_armv7: plug memory leak Free allocated per-CPU structures in the pcpu_fini and finalize methods. While here, add debug trace entries to these methods. Reviewed by: jkoshy, andrew MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41269 --- sys/dev/hwpmc/hwpmc_armv7.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c index 89cb27457bd2..6275e0f98c8b 100644 --- a/sys/dev/hwpmc/hwpmc_armv7.c +++ b/sys/dev/hwpmc/hwpmc_armv7.c @@ -414,7 +414,7 @@ armv7_pcpu_init(struct pmc_mdep *md, int cpu) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[armv7,%d] wrong cpu number %d", __LINE__, cpu)); - PMCDBG1(MDP, INI, 1, "armv7-init cpu=%d", cpu); + PMCDBG0(MDP, INI, 1, "armv7-pcpu-init"); armv7_pcpu[cpu] = pac = malloc(sizeof(struct armv7_cpu), M_PMC, M_WAITOK|M_ZERO); @@ -450,6 +450,8 @@ armv7_pcpu_fini(struct pmc_mdep *md, int cpu) { uint32_t pmnc; + PMCDBG0(MDP, INI, 1, "armv7-pcpu-fini"); + pmnc = cp15_pmcr_get(); pmnc &= ~ARMV7_PMNC_ENABLE; cp15_pmcr_set(pmnc); @@ -459,6 +461,10 @@ armv7_pcpu_fini(struct pmc_mdep *md, int cpu) cp15_pminten_clr(pmnc); cp15_pmovsr_set(pmnc); + free(armv7_pcpu[cpu]->pc_armv7pmcs, M_PMC); + free(armv7_pcpu[cpu], M_PMC); + armv7_pcpu[cpu] = NULL; + return 0; } @@ -529,5 +535,7 @@ pmc_armv7_initialize(void) void pmc_armv7_finalize(struct pmc_mdep *md) { + PMCDBG0(MDP, INI, 1, "armv7-finalize"); + free(armv7_pcpu, M_PMC); } From nobody Thu Aug 3 14:21:52 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGrdD3TKkz2twSC; Thu, 3 Aug 2023 14:21:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGrdD32BYz4LWj; Thu, 3 Aug 2023 14:21:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691072512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M0gOLdNUrFiXGi/SVRpxrsxWOd6BQIcxd6Spga8FIYQ=; b=wTXB37NzctkukZrDld6ORcgJyc+lejZJwi4tYKQaJYa9Vjk64gtRsNxX3yddzqaG9ER1Zr vhzp6pd8Z9Hq1SYlQrwHNejyY3pDU+cg5VUYB8TbBcgup9/ckKBTSZnGZsoyq3bSSDz7GA NIQoriCT0g0PK3BaIptK5cjsNXTKux7dzCyH9L2uVSZk63po0BJPGxNQod8nBuSdlJsT1N HWmHNNp8MGbh5dsl2lJPQVKqTrGbbtaEai19rbv8hfUhtzto/lgPxt3e4b6Um9gPIo7GES XTlpGrjIgjouo4QWQmcsHRx9MaBBsw/D2QFWVdLAquKRiRRnfie6PEiT9WSmmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691072512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M0gOLdNUrFiXGi/SVRpxrsxWOd6BQIcxd6Spga8FIYQ=; b=rGlMOkH5WxwML3JGtk6SVyrZhcaQVtBvdHS2ZH69K5adTOnEOxWPv+7y2Ifn7/tU+nff63 1b2ajLx5/iABrZfNNvJg+/nq4glJ0TpfjdtooB1bOzldbcFXu4OeVRapjroewZw9mO3nIZ IRQZy9TQJfujHD4bKyDemFlbO758Vq8HCMd5j4z7QVYKjco5363fDYfyKZf65qetbgJURe /Vcq+2Ep6Ca5oUruhyn4leJ/toWJE3D4m9L+u3KZQn9XCYL2lsuW/KVVk1AMUGfMO68hx/ IYAfeS5DKjSsLOpkGFhIXoKT26alW3k4idky4DhdJlzlv85CSnJloG+yeHQm3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691072512; a=rsa-sha256; cv=none; b=sNRtG/wUdEBLePet3PX/emc3e2/0YO9mmw2+7kF+xyrR38j7TcUTHKOx+gNbzMawHaUVUp xjpYT2OquOpPEXmzyYa0njzSilw8lpKZlOezkTUfv8idee2Czy/7PqV4CXhfvSM3t7v/cY RCiR/3VfDZW6N/ocs7NkX0fPFxDHG2ZdUr9r1x1bgN0gNUYakZS5CESqSfWYl9c65RqIOR 8rcizNSzddQ1kkflG8RUO863CWM4eKs1so1kwn2b3DTlRRmyUDkssgUesPUGPLfdhOyd3S t9sIbC9OAnw1M4F7emFISZjeW3A8IX1Dw+foB8SNcdjZegT8+1Fiezqv0rQSsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGrdD25Q8z90j; Thu, 3 Aug 2023 14:21:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373ELqaB022333; Thu, 3 Aug 2023 14:21:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373ELqS8022332; Thu, 3 Aug 2023 14:21:52 GMT (envelope-from git) Date: Thu, 3 Aug 2023 14:21:52 GMT Message-Id: <202308031421.373ELqS8022332@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: c9b06fa52776 - main - vm_phys_enqueue_contig: handle npages==0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9b06fa52776fbf555b9397a8d28a54c957108ec Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=c9b06fa52776fbf555b9397a8d28a54c957108ec commit c9b06fa52776fbf555b9397a8d28a54c957108ec Author: Doug Moore AuthorDate: 2023-08-03 14:19:48 +0000 Commit: Doug Moore CommitDate: 2023-08-03 14:19:48 +0000 vm_phys_enqueue_contig: handle npages==0 By letting vm_phys_enqueue_contig handle the case when npages == 0, the callers can stop checking it, and the compiler can stop zero-checking with every call to ffs(). Letting vm_phys_enqueue_contig call vm_phys_enqueue_contig for part of its work also saves a few bytes. The amd64 object code shrinks by 128 bytes. Reviewed by: kib (previous version) Tested by: pho Differential Revision: https://reviews.freebsd.org/D41154 --- sys/vm/vm_phys.c | 76 +++++++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 40 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 28f12231e01c..ed358d7cd4a9 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -72,6 +72,8 @@ __FBSDID("$FreeBSD$"); _Static_assert(sizeof(long) * NBBY >= VM_PHYSSEG_MAX, "Too many physsegs."); +_Static_assert(sizeof(long long) >= sizeof(vm_paddr_t), + "vm_paddr_t too big for ffsll, flsll."); #ifdef NUMA struct mem_affinity __read_mostly *mem_affinity; @@ -690,18 +692,16 @@ vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, int order, * * The physical page m's buddy must not be free. */ -static void +static vm_page_t vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) { - u_int n; int order; - KASSERT(npages > 0, ("vm_phys_enq_range: npages is 0")); KASSERT(((VM_PAGE_TO_PHYS(m) + npages * PAGE_SIZE) & - ((PAGE_SIZE << (fls(npages) - 1)) - 1)) == 0, + ((PAGE_SIZE << fls(npages / 2)) - 1)) == 0, ("vm_phys_enq_range: page %p and npages %u are misaligned", m, npages)); - do { + while (npages > 0) { KASSERT(m->order == VM_NFREEORDER, ("vm_phys_enq_range: page %p has unexpected order %d", m, m->order)); @@ -709,10 +709,10 @@ vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) KASSERT(order < VM_NFREEORDER, ("vm_phys_enq_range: order %d is out of range", order)); vm_freelist_add(fl, m, order, tail); - n = 1 << order; - m += n; - npages -= n; - } while (npages > 0); + m += 1 << order; + npages -= 1 << order; + } + return (m); } /* @@ -744,7 +744,7 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) { struct vm_freelist *alt, *fl; vm_page_t m; - int avail, end, flind, freelist, i, need, oind, pind; + int avail, end, flind, freelist, i, oind, pind; KASSERT(domain >= 0 && domain < vm_ndomains, ("vm_phys_alloc_npages: domain %d is out of range", domain)); @@ -762,20 +762,18 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) for (oind = 0; oind < VM_NFREEORDER; oind++) { while ((m = TAILQ_FIRST(&fl[oind].pl)) != NULL) { vm_freelist_rem(fl, m, oind); - avail = 1 << oind; - need = imin(npages - i, avail); - for (end = i + need; i < end;) + avail = i + (1 << oind); + end = imin(npages, avail); + while (i < end) ma[i++] = m++; - if (need < avail) { + if (i == npages) { /* - * Return excess pages to fl. Its - * order [0, oind) queues are empty. + * Return excess pages to fl. Its order + * [0, oind) queues are empty. */ - vm_phys_enq_range(m, avail - need, fl, - 1); - return (npages); - } else if (i == npages) + vm_phys_enq_range(m, avail - i, fl, 1); return (npages); + } } } for (oind = VM_NFREEORDER - 1; oind >= 0; oind--) { @@ -785,21 +783,20 @@ vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) NULL) { vm_freelist_rem(alt, m, oind); vm_phys_set_pool(pool, m, oind); - avail = 1 << oind; - need = imin(npages - i, avail); - for (end = i + need; i < end;) + avail = i + (1 << oind); + end = imin(npages, avail); + while (i < end) ma[i++] = m++; - if (need < avail) { + if (i == npages) { /* * Return excess pages to fl. * Its order [0, oind) queues * are empty. */ - vm_phys_enq_range(m, avail - - need, fl, 1); - return (npages); - } else if (i == npages) + vm_phys_enq_range(m, avail - i, + fl, 1); return (npages); + } } } } @@ -1146,7 +1143,7 @@ max_order(vm_page_t m) * because the size of a physical address exceeds the size of * a long. */ - return (min(ffsl(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1, + return (min(ffsll(VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT) - 1, VM_NFREEORDER - 1)); } @@ -1162,6 +1159,7 @@ vm_phys_enqueue_contig(vm_page_t m, u_long npages) struct vm_freelist *fl; struct vm_phys_seg *seg; vm_page_t m_end; + vm_paddr_t diff, lo; int order; /* @@ -1173,15 +1171,15 @@ vm_phys_enqueue_contig(vm_page_t m, u_long npages) fl = (*seg->free_queues)[m->pool]; m_end = m + npages; /* Free blocks of increasing size. */ - while ((order = max_order(m)) < VM_NFREEORDER - 1 && - m + (1 << order) <= m_end) { - KASSERT(seg == &vm_phys_segs[m->segind], - ("%s: page range [%p,%p) spans multiple segments", - __func__, m_end - npages, m)); - vm_freelist_add(fl, m, order, 1); - m += 1 << order; + lo = VM_PAGE_TO_PHYS(m) >> PAGE_SHIFT; + if (m < m_end && + (diff = lo ^ (lo + npages - 1)) != 0) { + order = min(flsll(diff) - 1, VM_NFREEORDER - 1); + m = vm_phys_enq_range(m, roundup2(lo, 1 << order) - lo, fl, 1); } + /* Free blocks of maximum size. */ + order = VM_NFREEORDER - 1; while (m + (1 << order) <= m_end) { KASSERT(seg == &vm_phys_segs[m->segind], ("%s: page range [%p,%p) spans multiple segments", @@ -1560,10 +1558,8 @@ vm_phys_alloc_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m, oind); } /* Return excess pages to the free lists. */ - if (&m_run[npages] < m) { - fl = (*queues)[VM_FREEPOOL_DEFAULT]; - vm_phys_enq_range(&m_run[npages], m - &m_run[npages], fl, 0); - } + fl = (*queues)[VM_FREEPOOL_DEFAULT]; + vm_phys_enq_range(&m_run[npages], m - &m_run[npages], fl, 0); return (m_run); } From nobody Thu Aug 3 16:11:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4F0Drnz3cNq0; Thu, 3 Aug 2023 16:11:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4D6fLWz4WNK; Thu, 3 Aug 2023 16:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+giGBKHb3n2UUjpo/5NTc84tV8L1S+qes2SwONp2+38=; b=IYAMqBV7y5Dl1h/r27JU24SCxtWnV8kZyJnMbAT0BVI6jCx44hi8umRkYgalhMhOZIOrHN RyG3wH0dOeDfc6zQ3YlDrfxiJXLu9shRV0HqGwwUDTr8tZe2+6LN/ku9cFIe1ZZROGu1MH jg5CG/5txDzUe4u/a1RtynvRVaJ+EM3sNPYGbMUcx3XRQEF3Fc9DJU2lxhfbI+qaCTFH9m qigW0uHhBYJQu+gG/3miGTTQtaMlbLJOSp2h0IVxsQaLXK9Hv49RMfsmpQyuuMRyvUoZuu +bGApskWN8UVMiDFWbKobHKt2IFBqApAtMBMFb7q3SJo3p/NCeXR5lso9S04Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+giGBKHb3n2UUjpo/5NTc84tV8L1S+qes2SwONp2+38=; b=C/xq3YXms+8FpmutoF7zquLBATh8XMQ5SjbnuVf03xfDSv/734SoGFY1WRd0J+OL8MJEfm qEsbqRWV1wPFsYWJizhqH8+9hT2lsRp5o+z79nDD9H6sa7phCemB2FGkj1IvQV+W2ylVQ8 g4TDGhz5h3wtyAJ72lpm9KybuPfWhgVmmBrso5rUQ8xMniariUFHwk61Kn/i4en8NSDq/q Z2L6d9MX72CqEO1UBMZHqWY1xGLTXRTR8bsqahW15HO/211tZilYc3URBsRFwYThTH/FTB qGK2592lktqw4e4C7ddcrvrdlM/b3pOSO64JzniJWLORjtJaJOZyPXisPAOZIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079116; a=rsa-sha256; cv=none; b=w/Iwu1eAnCdOKN1gXwKMeCOsGAO2DUnnhRqj1jCtfCUbIpzLJhyVkcZIZQ4fzvJ5Zj5hmd Phmuju3Ay3wpviWRkTmvBzTHHC1Tq1zJ7bUIUGkFfOgCx4xfDA3OMNrvPZ+ROingwjy1Tg RLBgdB9AEQYGGToeloj4pLItEGIglSygqhJrnDmVTsdqWjFDaIGPtv2UdRUw24gMUiQ9Gs GUoyky0qZh+zPvFu1QQLHwIhloOSOHgJa3gXBQF8c87rDYWHOREZNWW4xYPH0XqkbUI59S I0cTUGOe1o4dKxGMN6vrCMktkDw7LwD4kmz2cXS2nVULMZY+72a8rvwtfrQ78A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4D5jPnzCXr; Thu, 3 Aug 2023 16:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GBubw005962; Thu, 3 Aug 2023 16:11:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GBuVJ005961; Thu, 3 Aug 2023 16:11:56 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:11:56 GMT Message-Id: <202308031611.373GBuVJ005961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 1e55a130620e - main - spibus(4): Skip bus_generic_detach() on device detach List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e55a130620e5bef3570c4e1d326412c614fba84 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=1e55a130620e5bef3570c4e1d326412c614fba84 commit 1e55a130620e5bef3570c4e1d326412c614fba84 Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:49 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:49 +0000 spibus(4): Skip bus_generic_detach() on device detach device_delete_children() detaches all children too. MFC after: 1 month Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41240 --- sys/dev/spibus/spibus.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/dev/spibus/spibus.c b/sys/dev/spibus/spibus.c index 40ebb916a649..b9b3e8d28b83 100644 --- a/sys/dev/spibus/spibus.c +++ b/sys/dev/spibus/spibus.c @@ -70,13 +70,7 @@ spibus_attach(device_t dev) static int spibus_detach(device_t dev) { - int err; - - if ((err = bus_generic_detach(dev)) != 0) - return (err); - device_delete_children(dev); - - return (0); + return (device_delete_children(dev)); } static int From nobody Thu Aug 3 16:11:57 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4G1Rdjz3cPDn; Thu, 3 Aug 2023 16:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4G0YRrz4VqF; Thu, 3 Aug 2023 16:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E+b4SlnBZwO3RMkcaCX5g8h+Sn+1wDvjyW/uG1kN05k=; b=DiyQu7h02m87AQb7ilETvaGn4J3g7btI1H1SJ3velrxSHtT9qfCCLUvy9nsxyPDW41az+M vKlVtZ/VtXJn7DMluLHKMI8FM+m6KI6UAnsj54ZnMDKcF19dQUEXWUuzXc4gDT7X2kfpDK wjNP97WI8WRJ9L2O/Fq0GVai30eibc+tmJ++9/SefVGHBit62Qw2tkvREecJDJYi+2M7NB JdcolJiOxv5FX+uWg+v3J+nlBUALYVlCC0SrXGaZCc8xSkiDcaPlL4kplJCLI3MIsDoBd3 VIFs/wbDu9yJkNF7T09LzRcR7q+o4ztf3NRVaNHSsqFtadElwXOoywqMq5oVdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E+b4SlnBZwO3RMkcaCX5g8h+Sn+1wDvjyW/uG1kN05k=; b=Mls6S4IinHic4yi904ZvR7RASiUg9LlpdHxpbqz9Il7v/C+84w8uyLNpQNFct8kupSlEhf GH6bApyQ2Lcxrn5k8/v001caGxuRqRkTpL74UV0uKZa394r+iJrNBPYTp2FB6YWKLV3HqF fMuIJ6tqW6KJgtqPugMHfXYy46+fzy+E2txLu25nHzcN30XOhFRj3IsmpiLrAoozNCi0z0 pOiet/gRofyPDkl9cmrhaV+/kKjJxSXwQJ+eGzPx9NxoMANxhe19DBlEfF9RMjKdJukZZL 18lf9CpnIKgi8FxCE3a3+MZEtDsSyVPxnMQ2gzqelUJkfgI+LSmACr9dvb3Abw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079118; a=rsa-sha256; cv=none; b=Y/KFEreXQg1VDdGWgH5ujT11uIURg3hV0PfF56864a24dcazyoTyONglJ6BkKj43ABoiJ/ rzgJvpJUNs7KmbblxD56TAXEcIFREiscNB7Y2bFGQtLtkuVZaxEn+ky883b8PoGioLczeB aABJhYi14m5l4Khrk1WIIGLFzPby4IvgLQEv8wFb6JaBdrRbVocng6p+OaJCn6gFSODNNL wT+MW3iv7g/6obcoxHcr4VgvFvNLdi8hrNT7slMgpTcXSbTx6hf+3osKsgCvXsy3SUAZJz YUbO8dJSbSk4G8j2rJTNJhejiRyCKNRLgeJLrLGG6+PA5GQGbDYEcvxUZp7afg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4F6mBrzCJx; Thu, 3 Aug 2023 16:11:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GBvdn005981; Thu, 3 Aug 2023 16:11:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GBvYa005980; Thu, 3 Aug 2023 16:11:57 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:11:57 GMT Message-Id: <202308031611.373GBvYa005980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 16ab2c318d93 - main - intelspi: don't leak spibus on detach. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16ab2c318d93e7730c4cdaaca9c47e2f58c601c7 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=16ab2c318d93e7730c4cdaaca9c47e2f58c601c7 commit 16ab2c318d93e7730c4cdaaca9c47e2f58c601c7 Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:49 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:49 +0000 intelspi: don't leak spibus on detach. MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41241 --- sys/dev/intel/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/intel/spi.c b/sys/dev/intel/spi.c index 0ac7a3b5e9bb..c2308c20f8cd 100644 --- a/sys/dev/intel/spi.c +++ b/sys/dev/intel/spi.c @@ -508,7 +508,7 @@ intelspi_detach(device_t dev) bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irq_rid, sc->sc_irq_res); - return (bus_generic_detach(dev)); + return (device_delete_children(dev)); } int From nobody Thu Aug 3 16:11:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4H1pkwz3cNmw; Thu, 3 Aug 2023 16:11:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4H1LlPz4WMh; Thu, 3 Aug 2023 16:11:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vg2SK37/QZXBCY6ujxfGnhdgcHLmkumIVziwSGTAXdM=; b=vZu5UrvtoXd9Cbf636PtRi+R+PgroRY+g6OsVjos+8ZN3fgDuksReVwbroaGkUts6mNEEv 2wcBCT1/sKj04kGNBztrhaiK2DeoSbD5FUbNTXSn4l4x80zv6pM+2YC0K85LE4hfIebnIk o2y04uvm9J1NBtBEo08TORBoHSskClyywKJnzqzk87uqWJYleoEjCJBWysY+dN6LT8gKh5 JbrzrrD1bXQZY0As5X0A10wwHE8+W0huc80AHZoVgDf39vUOgmpw0pIkI0JwY9UzsMmdKF r8KtJQayqykqJgY/CJvvsCKXXnYGiMHeQfhT/hCGW9ssezxZWKlT0G/oQ+QJdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vg2SK37/QZXBCY6ujxfGnhdgcHLmkumIVziwSGTAXdM=; b=AaHakKB0j1gyZ6Zh272KuLKHmrTp8Pyok4EhNEi5b9XB7tjsx6oW/3uovWy25b2Tc3S635 1IdhJxcGyY+Y66b5Boft2K9NEkp+cAY47EMRCZmvKd6Zt8qiOBs0N3O28gJxD2/I1pB4g2 FNIIjhrIxF3mbG2yhsL1bxcPCd52GlW0ldMZD+YEjlp0lS9JI6xEGcYhmqUBj5GhT4Mk+f NUjsHJfPP22DIcmn4y/afbvulbsFBAOCJ+vesjegdeyNNF4VRRX9JEynZnWh6EVlv8hlh6 SYUqEZMvnEkO7HJfhwExlSFV2b5gzqJp0SI+VTCxCUe/5fAtQOaDDmluNip4Eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079119; a=rsa-sha256; cv=none; b=EUvtA/Dp90EaSCUnx2ExQKIURp4ljDGmoB2MEhCsCCymhYn/ebKVtIjitfpCRznLjVo5Xh OPO17oOjRIazMOH0Q+zcsFGyJ0kgpkSBJeYFWnb0EGfsHnqSvtdSxtSolENK4owkQpRQgm gFYvsRtn1SOMjjeUnLgRxa/a8k/2FaeDVYHC+Vk+0uEiScErBDzHG2BGXzlUqYwk53ou8z zdfU4gMJyArK4ixIiakyIV+PhMq+HT2JM4OMVvmYt058UIF829tWaiDkhTSTr7cWZfqARj /og4VE1NNoQDU5dAIoSXP+l0YI/UF3XuhruXQTe4hkuiVyE4BDygdCg6vx0O/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4H0RV8zCJy; Thu, 3 Aug 2023 16:11:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GBwB7006000; Thu, 3 Aug 2023 16:11:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GBw27005999; Thu, 3 Aug 2023 16:11:58 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:11:58 GMT Message-Id: <202308031611.373GBw27005999@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 2a04c3a47b74 - main - intelspi: Add generic resource methods to bus interface List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a04c3a47b74aa1114787fe24bbddf180ac57a5a Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=2a04c3a47b74aa1114787fe24bbddf180ac57a5a commit 2a04c3a47b74aa1114787fe24bbddf180ac57a5a Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:50 +0000 intelspi: Add generic resource methods to bus interface That allows intelspi grandchildren to allocate IRQs MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41242 --- sys/dev/intel/spi_acpi.c | 9 +++++++++ sys/dev/intel/spi_pci.c | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/sys/dev/intel/spi_acpi.c b/sys/dev/intel/spi_acpi.c index 015694f4a008..4c22d7a351c4 100644 --- a/sys/dev/intel/spi_acpi.c +++ b/sys/dev/intel/spi_acpi.c @@ -93,6 +93,15 @@ static device_method_t intelspi_acpi_methods[] = { DEVMETHOD(device_suspend, intelspi_suspend), DEVMETHOD(device_resume, intelspi_resume), + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + /* SPI interface */ DEVMETHOD(spibus_transfer, intelspi_transfer), diff --git a/sys/dev/intel/spi_pci.c b/sys/dev/intel/spi_pci.c index c55b5a12228e..cb2b8bd82bfb 100644 --- a/sys/dev/intel/spi_pci.c +++ b/sys/dev/intel/spi_pci.c @@ -119,6 +119,15 @@ static device_method_t intelspi_pci_methods[] = { DEVMETHOD(device_suspend, intelspi_suspend), DEVMETHOD(device_resume, intelspi_resume), + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + /* SPI interface */ DEVMETHOD(spibus_transfer, intelspi_transfer), From nobody Thu Aug 3 16:12:00 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4J34jxz3cNvR; Thu, 3 Aug 2023 16:12:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4J2Fb5z4WQG; Thu, 3 Aug 2023 16:12:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bej3tlRmE+7nXnSiKE8PkXYirRqz2ZXcsLdn+nDf1b4=; b=NDEMKwzxZm+Wbl6dwyow6+FsO9ipjkvKO5LnNyppG+EVh1gIfANaEr3ulmfkW9t0jKD8jP GsVkrO+jj4vk1RXnn1AXXuOnxmMhqC17b26tTkMcSDOCRs5JVq2/LdSfmI2f5jdYzDPFyQ jEBqH6fPKFCrBqAeqHxB/XrxxjDxHzMmVRXDRyHuchgw9aYK7V/S63B6hIwua49fYUAOqS GBfW+TQ64DahHCg/dshrkEBGOQVTnQMsBUka+episH6jSyB/P2ZSc2GCHtwe+7HX2C20QH GjHtJzmgdgskz2qzHuTvbjbumpAJPBOr6MeDzY0QGuxq528Rwq1z9S70iI4MJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bej3tlRmE+7nXnSiKE8PkXYirRqz2ZXcsLdn+nDf1b4=; b=YuMg5dJj91HAOdk+wyfK/W3wTJwKxyucKqawn44sg46WvdOscLQ0BeIux17L3HgXDbtpJC MQ7LWDNmJzrh2NnkQQW43qawsC6CoRSAUpWlGjQQO3ZxclKmuflntmQJN3piXExzcdjafp kPAtyPDLoaRNDZVSpgr4mEkIsV+bImXt+g7CCTWFDvtFeXXW11jUDPeLmRWC5hRX7tM6Ef BFSTnI0UpdAF3CO1VF21qHFObz3cxQz1wTG3ByyYoWMZwZ2zdbPaCdzWsbPqPxLBGFeNzg 5LxcqpooNFl+YSacTx0IoU2LHLw5zffdksvJorv3OHHkDcvRH0Dl25UM4BQvsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079120; a=rsa-sha256; cv=none; b=JKcX/U9jR7J0gkKdl89gSCdegl8T3C4hKQK0GOS2eSxsraBHOMODW5XcqGx6nMDZVLBRlO d4MJqyq0+HAiKa2ien+3BnksbaCQTSDib9KiIumZ9eu0YYlouNl8U8Cr3WOlAsSVPEDsUo njQE4FrU9PhsgB2g5d3DGblArQ1pMzbFFK0uTKqwEVHtBpbd9UfZzEpiFgwnP05JJugMA3 8OvcopReQEsTe3cuVz05ZFSQMjJ3x7Ajo9fo48NgAgup2MqU4wUuoqw6lwMJBgZYijk2Ej 33QECZ9atS7IMj3BghrUqoPTNWpX6O8Z6ZVNomBY9Vrd06FZzAKmJE3sm0j5Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4J1FpkzCBR; Thu, 3 Aug 2023 16:12:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GC0YB006032; Thu, 3 Aug 2023 16:12:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GC003006031; Thu, 3 Aug 2023 16:12:00 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:12:00 GMT Message-Id: <202308031612.373GC003006031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: c6889cbf664e - main - spibus(4): Allow IRQ resource to be released List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6889cbf664ecddf7fdce7c6d3c90a282c1b5d98 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=c6889cbf664ecddf7fdce7c6d3c90a282c1b5d98 commit c6889cbf664ecddf7fdce7c6d3c90a282c1b5d98 Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:50 +0000 spibus(4): Allow IRQ resource to be released IRQ Resource is allocated on spibus(4). We must release it here too rather than propagate request down the tree. Fixes: 4dd8db62e9d3 ("Add IRQ resource to SPIBUS") MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41243 --- sys/dev/spibus/spibus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/spibus/spibus.c b/sys/dev/spibus/spibus.c index b9b3e8d28b83..af4b1402cee4 100644 --- a/sys/dev/spibus/spibus.c +++ b/sys/dev/spibus/spibus.c @@ -247,11 +247,11 @@ static device_method_t spibus_methods[] = { /* Bus interface */ DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_get_resource_list, spibus_get_resource_list), From nobody Thu Aug 3 16:12:01 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4K3BRmz3cNqD; Thu, 3 Aug 2023 16:12:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4K2fhqz4WYp; Thu, 3 Aug 2023 16:12:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7pTxIZwAww5wrlY0aWLDv6fRobPkzHPKNhEdzTH7BIQ=; b=tLGMb5Wr20bb2HsQYv0zsEJ+21in4I9XDM0dr73jYySAjRhweBjcY02DHLrHxw2s2rWnjm ZGsbG7SAjFcVUkiCQ5IMpPojfDN5Mi83w8Ql9eQHiz5IY2VWmv16m+llO4qgfCXx++ANn3 zIqj2HW94kAZyBoLoB6WHx65cE0rDozZuV2qtYg9Rs+JHc5gGQovNY/9hjBOTcR9uRMd7G CDMy89NinspD2wNikdEo8AT6vHcUZdl2NguXhsuOVqIFmIMJvd4gkLyxJ9hDZJUNDdKgJV HZsiTCfvmqo3Gju7OderESs6tLNoqHiUrwxfmZ4gENjw/2JpiL38Hqydib6SlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7pTxIZwAww5wrlY0aWLDv6fRobPkzHPKNhEdzTH7BIQ=; b=OsmG8f5Vl/cpbY0LNJNLKMCZoxhp4Nxq1NnqE95tHPhOmcdtd4eAKhIjsos+ZXg56EQj/k Kj2zHGXG+Ah01I2Ppl30H3mKVdDDtXP0wkC8NTdfgMyFi9c7ys6xuGV9lNmhtG9mvXlLNf Whq/p8VADfO8K0P0/6eoFbDAZ58yfI5msWdsVsR/wniUwSiGa5fJbrqwLsrC6v4Gk5GjpT fkBuGdzAw+6RyEz4bi8ngstL8KUbr/SipsHKS6Lu+zoaLodRCUkNNlXiJS/nnmZEPx+GcJ 1NfkTmUHZwYb/QSqzOGvyr1s4+5pHpJv5Q0HOAfl5cOo1drnrFwPyKZH0a60pA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079121; a=rsa-sha256; cv=none; b=UIfse6ETHxo0K/U59dMreSCsslSduaK6b4ksQleUOdXzbROt4MDiz3QOr2sbicR8XyO/eA NowuH2qRJ1xG7FzyiOnGRN7rVmzwnd2BIT2YJOrbN675CB5B2DdmOvcLKv1HO/7zCIOzly zSqjVBK5b2wkaJZZxbrX4P6B+P0h+zF1VPwgA60I31bbhUJfjnGJYrqVUwMmYavVj4oQEB bUCuWAC2XCXvgMxYZZBOpVXao8IvXG7RiXMLdADf307yPF19BZ4GB60jL2HPWVLFttTenz GrV1h+UXNzuOEKOyiuqCKlk3Z9Pm5+WZUQZdDnJ21m5FVplDPrIjQ/CwdHcS7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4K1m7PzCK2; Thu, 3 Aug 2023 16:12:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GC17g006054; Thu, 3 Aug 2023 16:12:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GC1VB006053; Thu, 3 Aug 2023 16:12:01 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:12:01 GMT Message-Id: <202308031612.373GC1VB006053@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: f56dbe7ad92f - main - intelspi: Move ACPI/PCI ids table out of header file. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f56dbe7ad92f97394690dca21f105d3a44fb7701 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=f56dbe7ad92f97394690dca21f105d3a44fb7701 commit f56dbe7ad92f97394690dca21f105d3a44fb7701 Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:50 +0000 intelspi: Move ACPI/PCI ids table out of header file. There is no reason to store it multiple times. MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41244 --- sys/dev/intel/spi.c | 23 +++++++++++++++++++++++ sys/dev/intel/spi.h | 30 +----------------------------- sys/dev/intel/spi_acpi.c | 7 ++++--- sys/dev/intel/spi_pci.c | 27 ++++++++++++++------------- 4 files changed, 42 insertions(+), 45 deletions(-) diff --git a/sys/dev/intel/spi.c b/sys/dev/intel/spi.c index c2308c20f8cd..42caed0c1c02 100644 --- a/sys/dev/intel/spi.c +++ b/sys/dev/intel/spi.c @@ -109,6 +109,29 @@ #define SPI_CS_CTRL_HW_MODE (1 << 0) #define SPI_CS_CTRL_CS_HIGH (1 << 1) +/* Same order as intelspi_vers */ +static const struct intelspi_info { + uint32_t reg_lpss_base; + uint32_t reg_cs_ctrl; +} intelspi_infos[] = { + [SPI_BAYTRAIL] = { + .reg_lpss_base = 0x400, + .reg_cs_ctrl = 0x18, + }, + [SPI_BRASWELL] = { + .reg_lpss_base = 0x400, + .reg_cs_ctrl = 0x18, + }, + [SPI_LYNXPOINT] = { + .reg_lpss_base = 0x800, + .reg_cs_ctrl = 0x18, + }, + [SPI_SUNRISEPOINT] = { + .reg_lpss_base = 0x200, + .reg_cs_ctrl = 0x24, + }, +}; + static void intelspi_intr(void *); static int diff --git a/sys/dev/intel/spi.h b/sys/dev/intel/spi.h index 31b708572630..bd79ec1e812a 100644 --- a/sys/dev/intel/spi.h +++ b/sys/dev/intel/spi.h @@ -41,38 +41,10 @@ enum intelspi_vers { SPI_SUNRISEPOINT, }; -/* Same order as intelspi_vers */ -static const struct intelspi_info { - const char *desc; - uint32_t reg_lpss_base; - uint32_t reg_cs_ctrl; -} intelspi_infos[] = { - [SPI_BAYTRAIL] = { - .desc = "Intel Bay Trail SPI Controller", - .reg_lpss_base = 0x400, - .reg_cs_ctrl = 0x18, - }, - [SPI_BRASWELL] = { - .desc = "Intel Braswell SPI Controller", - .reg_lpss_base = 0x400, - .reg_cs_ctrl = 0x18, - }, - [SPI_LYNXPOINT] = { - .desc = "Intel Lynx Point / Wildcat Point SPI Controller", - .reg_lpss_base = 0x800, - .reg_cs_ctrl = 0x18, - }, - [SPI_SUNRISEPOINT] = { - .desc = "Intel Sunrise Point SPI Controller", - .reg_lpss_base = 0x200, - .reg_cs_ctrl = 0x24, - }, -}; - struct intelspi_softc { ACPI_HANDLE sc_handle; device_t sc_dev; - enum intelspi_vers sc_vers; + enum intelspi_vers sc_vers; struct mtx sc_mtx; int sc_mem_rid; struct resource *sc_mem_res; diff --git a/sys/dev/intel/spi_acpi.c b/sys/dev/intel/spi_acpi.c index 4c22d7a351c4..033eb047cb29 100644 --- a/sys/dev/intel/spi_acpi.c +++ b/sys/dev/intel/spi_acpi.c @@ -42,9 +42,10 @@ static const struct intelspi_acpi_device { const char *hid; enum intelspi_vers vers; + const char *desc; } intelspi_acpi_devices[] = { - { "80860F0E", SPI_BAYTRAIL }, - { "8086228E", SPI_BRASWELL }, + { "80860F0E", SPI_BAYTRAIL, "Intel Bay Trail SPI Controller" }, + { "8086228E", SPI_BRASWELL, "Intel Braswell SPI Controller" }, }; static char *intelspi_ids[] = { "80860F0E", "8086228E", NULL }; @@ -66,7 +67,7 @@ intelspi_acpi_probe(device_t dev) if (strcmp(intelspi_acpi_devices[i].hid, hid) == 0) { sc->sc_vers = intelspi_acpi_devices[i].vers; sc->sc_handle = acpi_get_handle(dev); - device_set_desc(dev, intelspi_infos[sc->sc_vers].desc); + device_set_desc(dev, intelspi_acpi_devices[i].desc); return (BUS_PROBE_DEFAULT); } } diff --git a/sys/dev/intel/spi_pci.c b/sys/dev/intel/spi_pci.c index cb2b8bd82bfb..c2c118ca1eae 100644 --- a/sys/dev/intel/spi_pci.c +++ b/sys/dev/intel/spi_pci.c @@ -45,19 +45,20 @@ static struct intelspi_pci_device { uint32_t devid; enum intelspi_vers vers; + const char *desc; } intelspi_pci_devices[] = { - { 0x9c658086, SPI_LYNXPOINT }, - { 0x9c668086, SPI_LYNXPOINT }, - { 0x9ce58086, SPI_LYNXPOINT }, - { 0x9ce68086, SPI_LYNXPOINT }, - { 0x9d298086, SPI_SUNRISEPOINT }, - { 0x9d2a8086, SPI_SUNRISEPOINT }, - { 0xa1298086, SPI_SUNRISEPOINT }, - { 0xa12a8086, SPI_SUNRISEPOINT }, - { 0xa2a98086, SPI_SUNRISEPOINT }, - { 0xa2aa8086, SPI_SUNRISEPOINT }, - { 0xa3a98086, SPI_SUNRISEPOINT }, - { 0xa3aa8086, SPI_SUNRISEPOINT }, + { 0x9c658086, SPI_LYNXPOINT, "Intel Lynx Point-LP SPI Controller-0" }, + { 0x9c668086, SPI_LYNXPOINT, "Intel Lynx Point-LP SPI Controller-1" }, + { 0x9ce58086, SPI_LYNXPOINT, "Intel Wildcat Point SPI Controller-0" }, + { 0x9ce68086, SPI_LYNXPOINT, "Intel Wildcat Point SPI Controller-1" }, + { 0x9d298086, SPI_SUNRISEPOINT, "Intel Sunrise Point-LP SPI Controller-0" }, + { 0x9d2a8086, SPI_SUNRISEPOINT, "Intel Sunrise Point-LP SPI Controller-1" }, + { 0xa1298086, SPI_SUNRISEPOINT, "Intel Sunrise Point-H SPI Controller-0" }, + { 0xa12a8086, SPI_SUNRISEPOINT, "Intel Sunrise Point-H SPI Controller-1" }, + { 0xa2a98086, SPI_SUNRISEPOINT, "Intel Kaby Lake-H SPI Controller-0" }, + { 0xa2aa8086, SPI_SUNRISEPOINT, "Intel Kaby Lake-H SPI Controller-1" }, + { 0xa3a98086, SPI_SUNRISEPOINT, "Intel Comet Lake-V SPI Controller-0" }, + { 0xa3aa8086, SPI_SUNRISEPOINT, "Intel Comet Lake-V SPI Controller-1" }, }; static int @@ -73,7 +74,7 @@ intelspi_pci_probe(device_t dev) /* The PCI device is listed in ACPI too. * Not that we use the handle for anything... */ sc->sc_handle = acpi_get_handle(dev); - device_set_desc(dev, intelspi_infos[sc->sc_vers].desc); + device_set_desc(dev, intelspi_pci_devices[i].desc); return (BUS_PROBE_DEFAULT); } } From nobody Thu Aug 3 16:12:02 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4L69RXz3cPF3; Thu, 3 Aug 2023 16:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4L3hFxz4WwC; Thu, 3 Aug 2023 16:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L2dFZFONzUNnP3hF2Vq/JjfPtCptilKJULB3wLB1O8A=; b=vr/0OSaphK5/zuUmy5DG9Pd7JhEos5ephHXUOsnm92yJ71ueUv53efl0UDu75Y0oh3aJNa cjjC7HVUbU6OfMvfpSTZ7zOU03wxTn6it1zQXKCgbf4GIhjcP9Wmg3JRPnoD7iv1irBNMZ Zso/IPgsbUMFPwNpyIqv9wG5UDWyFVuA5x8jQ+mid4L+sezCeazcDh4IQlFkRn8psgC6Ej zOhUSDlXIxLgLUlm20biZlsKzPWBN9XiGW2KGjPQikA7zofnsu6MrmEj15a+DEecr+daf8 Ifg3gDoZd0g0SW7mY9lvOxbNTOhEk0aAJvWYOPzo6gUibmo/upzGIl0QjGn8xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L2dFZFONzUNnP3hF2Vq/JjfPtCptilKJULB3wLB1O8A=; b=Xl/BfQoZqeG2l3I08GTpfmvgAfnvR9EbXaKG2VlxhH27TcCmnrn1wJmwP3SllQ00nHmAVC Oy0da+WIG/EUc1cjp2/zDQqr4sjgo2Xtk6PUaPjs9hfhrLkKmLn0PoovTwF+pixH/Bi4iY QS9afaXtSkArLz+ZXbDqyacCKexZLnkddUn1n/tfJ5ZkPPDXmTpoVnv5BhG2296AiWJph0 ts6PMsBqyeyV5D/OWMVaj/J6LtJBq8j0RLXjfcJqzYx2NOV0/mFCiBjQpdHXA8W6cskZZF JQM9h/a4gx/P0MrrLju0UyqHjHpsWAgC6rih3hfMnykt59ivsES5jSPUwYbcJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079122; a=rsa-sha256; cv=none; b=jJkgJoZC9J5UIcnmbSz8hjFORDZJG/xc4ywpb67wQdTnYIlU83HxNjwF+qwItf7cRoNARo 5OdCkg3x0mD2qOk2H85c97EQ3c9pXNfn2VPxyubGieOuTfUop3wLB/2CPZpCDUKb0ZWWyT 4Tcf2C9jMX1Pqc1HxHjmfIFFWttl4TmvF1Pn/rMKt5LT6IbifAK0bAPLBC8wPRwABKkvyo 45LeqRAaup+WA0NmiEDTdiVmwU/QoZX8n1EnuZ45gHsc7wR514tGv3ffidL4ijj8QXNWVc sbG9g32wmktFN6qpvl9cMQSjajiSX5+d+MIkFlQO74tR+QOaTcrhIGEYt0PzMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4L2hCqzCBS; Thu, 3 Aug 2023 16:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GC2ID006075; Thu, 3 Aug 2023 16:12:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GC2Uu006074; Thu, 3 Aug 2023 16:12:02 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:12:02 GMT Message-Id: <202308031612.373GC2Uu006074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: b109946d7564 - main - intelspi: Release LPSS reset on Sunrise Point controllers. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b109946d7564afde6f3d3b3a78f428c8da14e17c Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b109946d7564afde6f3d3b3a78f428c8da14e17c commit b109946d7564afde6f3d3b3a78f428c8da14e17c Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:50 +0000 intelspi: Release LPSS reset on Sunrise Point controllers. MacBookPro 14.1 SPI controller requires that to start functioning. MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41245 --- sys/dev/intel/spi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/intel/spi.c b/sys/dev/intel/spi.c index 42caed0c1c02..6dd063511e26 100644 --- a/sys/dev/intel/spi.c +++ b/sys/dev/intel/spi.c @@ -109,6 +109,10 @@ #define SPI_CS_CTRL_HW_MODE (1 << 0) #define SPI_CS_CTRL_CS_HIGH (1 << 1) +#define INTELSPI_RESETS 0x204 +#define INTELSPI_RESET_HOST (1 << 0) | (1 << 1) +#define INTELSPI_RESET_DMA (1 << 2) + /* Same order as intelspi_vers */ static const struct intelspi_info { uint32_t reg_lpss_base; @@ -477,6 +481,11 @@ intelspi_attach(device_t dev) goto error; } + /* Release LPSS reset */ + if (sc->sc_vers == SPI_SUNRISEPOINT) + INTELSPI_WRITE(sc, INTELSPI_RESETS, + (INTELSPI_RESET_HOST | INTELSPI_RESET_DMA)); + sc->sc_irq_res = bus_alloc_resource_any(sc->sc_dev, SYS_RES_IRQ, &sc->sc_irq_rid, RF_ACTIVE | RF_SHAREABLE); if (sc->sc_irq_res == NULL) { From nobody Thu Aug 3 16:12:03 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4M5pCfz3cNkf; Thu, 3 Aug 2023 16:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4M40xmz4WwZ; Thu, 3 Aug 2023 16:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wiYB2Tv4+bv1PVf6955cUM6n9jXODsScZI8TdBRULhE=; b=qSKkmSuB/ujMZGBNn/Vj0xqn+H73vxq7jZtCAgUBdnyfY8HV7dG23m4ZWvlIHvLC0Mwhfi 0eMLe1LTXMujzVTtReU+AODg+SlyN9N7BZ9WmtLqrZQefp7uc3Hl4uxI5AOoDwmo9DyJPL ZEAE3jbLwA7MGI+7Fdcehl91uS/2EfRvOJdUOEh+Ac4qlcmJhEsKd0JsgGqQ5+XH/DgAeg 4BI+CfINaodLgArIc75m3LM+j6LLc0i13rtKBoUa1J9caoXYSfq3pCVxp1yBP0ctt2iPYs Pk3tsfUYFsptyteKqEVVBnjyap7FZG/1FxA8m1L5ySZ2CGYnd0e2IOOtc9zfSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wiYB2Tv4+bv1PVf6955cUM6n9jXODsScZI8TdBRULhE=; b=AeUzs9wjsWR41MCq0NMDyUBddHNxEyELdNPSaueNiKmPDQ3BrWSV3Vhe6PfoY9jNP0m6L2 VjCJguZ0BfaZhbRneysEysJbdFCfw+3DNiuYFjZLuCnV9cBxRBz30n/roRqjCjXuWOr5q3 ad7EzQGlcp3YzPuXIlRu2JXQO3kWKRm2A9TGzNS57ew2Ft7DW2DCNkV77YNDf1AwJVO4OC D6fQBILG2giu0yv8uva7njsrQl/yT8WSPtz5Az2ZD4r4jpO+YdWSLq+qHoFNthSg+yFuB0 fH5yFB3hb8PdCXZXTv8dbJvCpxV30cjLPLlTON4Oojvl5R+q9Z9B3A6t3880fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079123; a=rsa-sha256; cv=none; b=n+tmiPvdpdRA2PsUSJpsrp3BRN+0rXoXiohO6MSpOVkcE+GvAYfmaVLCa0JtU4okYrDc3J bEOYucbhEppu8PKO8kl4DEm1p8747PgKFUiqlSMaUjek9+WewrVsdSKSsPL/oXXsKep40x zwD/J0J/uqt10qbynoK+keR0M3EuxYjeiuOdr+Y5aGduowopkkWVKCnA+VfwYekYL5W8Pp eHYsv2URDAAZwVCeRWEWAEngOg2uuJ4bx2XUzReS52MJOhsLQ3YUaP/KdsIXnM3Prwf3YT CzFbmmhuCNishc5Rg80BSdUCAo00DeZzaqMo7Xw1BREkC9d4op6Mq3a/ok+nwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4M35dXzC2S; Thu, 3 Aug 2023 16:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GC3dP006107; Thu, 3 Aug 2023 16:12:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GC3Io006106; Thu, 3 Aug 2023 16:12:03 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:12:03 GMT Message-Id: <202308031612.373GC3Io006106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 4b1712817e56 - main - hid: Add child device parameter to HID methods List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b1712817e56840acc5e9fd59028ef79007ff579 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=4b1712817e56840acc5e9fd59028ef79007ff579 commit 4b1712817e56840acc5e9fd59028ef79007ff579 Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:50 +0000 hid: Add child device parameter to HID methods Some devices like Apple HID-over-SPI may contain more than one report descriptors necessitating creation of multiple hidbus children. Add indentificator of child devices to distinct them. No functional changes intended. Differential Revision: https://reviews.freebsd.org/D41246 --- sys/dev/hid/hid.c | 19 ++++++----- sys/dev/hid/hid_if.m | 13 ++++++++ sys/dev/hid/hidbus.c | 78 +++++++++++++++++++++++++++++++++++-------- sys/dev/hyperv/input/hv_hid.c | 13 ++++---- sys/dev/iicbus/iichid.c | 37 +++++++++++--------- sys/dev/usb/input/usbhid.c | 37 +++++++++++--------- 6 files changed, 136 insertions(+), 61 deletions(-) diff --git a/sys/dev/hid/hid.c b/sys/dev/hid/hid.c index cd7fb6bf8778..7fa6e34be22a 100644 --- a/sys/dev/hid/hid.c +++ b/sys/dev/hid/hid.c @@ -1031,52 +1031,53 @@ hid_quirk_unload(void *arg) int hid_get_rdesc(device_t dev, void *data, hid_size_t len) { - return (HID_GET_RDESC(device_get_parent(dev), data, len)); + return (HID_GET_RDESC(device_get_parent(dev), dev, data, len)); } int hid_read(device_t dev, void *data, hid_size_t maxlen, hid_size_t *actlen) { - return (HID_READ(device_get_parent(dev), data, maxlen, actlen)); + return (HID_READ(device_get_parent(dev), dev, data, maxlen, actlen)); } int hid_write(device_t dev, const void *data, hid_size_t len) { - return (HID_WRITE(device_get_parent(dev), data, len)); + return (HID_WRITE(device_get_parent(dev), dev, data, len)); } int hid_get_report(device_t dev, void *data, hid_size_t maxlen, hid_size_t *actlen, uint8_t type, uint8_t id) { - return (HID_GET_REPORT(device_get_parent(dev), data, maxlen, actlen, - type, id)); + return (HID_GET_REPORT(device_get_parent(dev), dev, data, maxlen, + actlen, type, id)); } int hid_set_report(device_t dev, const void *data, hid_size_t len, uint8_t type, uint8_t id) { - return (HID_SET_REPORT(device_get_parent(dev), data, len, type, id)); + return (HID_SET_REPORT(device_get_parent(dev), dev, data, len, type, + id)); } int hid_set_idle(device_t dev, uint16_t duration, uint8_t id) { - return (HID_SET_IDLE(device_get_parent(dev), duration, id)); + return (HID_SET_IDLE(device_get_parent(dev), dev, duration, id)); } int hid_set_protocol(device_t dev, uint16_t protocol) { - return (HID_SET_PROTOCOL(device_get_parent(dev), protocol)); + return (HID_SET_PROTOCOL(device_get_parent(dev), dev, protocol)); } int hid_ioctl(device_t dev, unsigned long cmd, uintptr_t data) { - return (HID_IOCTL(device_get_parent(dev), cmd, data)); + return (HID_IOCTL(device_get_parent(dev), dev, cmd, data)); } MODULE_VERSION(hid, 1); diff --git a/sys/dev/hid/hid_if.m b/sys/dev/hid/hid_if.m index 38a053b8744e..9050620ccea6 100644 --- a/sys/dev/hid/hid_if.m +++ b/sys/dev/hid/hid_if.m @@ -49,6 +49,7 @@ INTERFACE hid; # METHOD void intr_setup { device_t dev; + device_t child; hid_intr_t intr; void *context; struct hid_rdesc_info *rdesc; @@ -59,6 +60,7 @@ METHOD void intr_setup { # METHOD void intr_unsetup { device_t dev; + device_t child; }; # @@ -66,6 +68,7 @@ METHOD void intr_unsetup { # METHOD int intr_start { device_t dev; + device_t child; }; # @@ -73,6 +76,7 @@ METHOD int intr_start { # METHOD int intr_stop { device_t dev; + device_t child; }; # @@ -82,6 +86,7 @@ METHOD int intr_stop { # METHOD void intr_poll { device_t dev; + device_t child; }; # HID interface @@ -91,6 +96,7 @@ METHOD void intr_poll { # METHOD int get_rdesc { device_t dev; + device_t child; void *data; hid_size_t len; }; @@ -102,6 +108,7 @@ METHOD int get_rdesc { # METHOD int read { device_t dev; + device_t child; void *data; hid_size_t maxlen; hid_size_t *actlen; @@ -113,6 +120,7 @@ METHOD int read { # METHOD int write { device_t dev; + device_t child; const void *data; hid_size_t len; }; @@ -127,6 +135,7 @@ METHOD int write { # METHOD int get_report { device_t dev; + device_t child; void *data; hid_size_t maxlen; hid_size_t *actlen; @@ -142,6 +151,7 @@ METHOD int get_report { # METHOD int set_report { device_t dev; + device_t child; const void *data; hid_size_t len; uint8_t type; @@ -153,6 +163,7 @@ METHOD int set_report { # METHOD int set_idle { device_t dev; + device_t child; uint16_t duration; uint8_t id; }; @@ -162,6 +173,7 @@ METHOD int set_idle { # METHOD int set_protocol { device_t dev; + device_t child; uint16_t protocol; }; @@ -171,6 +183,7 @@ METHOD int set_protocol { # METHOD int ioctl { device_t dev; + device_t child; unsigned long cmd; uintptr_t data; }; diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c index 6ecc7455cc5d..fe6c4df060a3 100644 --- a/sys/dev/hid/hidbus.c +++ b/sys/dev/hid/hidbus.c @@ -257,7 +257,8 @@ hidbus_attach_children(device_t dev) struct hidbus_softc *sc = device_get_softc(dev); int error; - HID_INTR_SETUP(device_get_parent(dev), hidbus_intr, sc, &sc->rdesc); + HID_INTR_SETUP(device_get_parent(dev), dev, hidbus_intr, sc, + &sc->rdesc); error = hidbus_enumerate_children(dev, sc->rdesc.data, sc->rdesc.len); if (error != 0) @@ -327,7 +328,7 @@ hidbus_detach_children(device_t dev) free(children, M_TEMP); } - HID_INTR_UNSETUP(device_get_parent(bus)); + HID_INTR_UNSETUP(device_get_parent(bus), bus); return (error); } @@ -479,7 +480,7 @@ hidbus_write_ivar(device_t bus, device_t child, int which, uintptr_t value) tlc->flags = value; if ((value & HIDBUS_FLAG_CAN_POLL) != 0) HID_INTR_SETUP( - device_get_parent(bus), NULL, NULL, NULL); + device_get_parent(bus), bus, NULL, NULL, NULL); break; case HIDBUS_IVAR_DRIVER_INFO: tlc->driver_info = value; @@ -623,7 +624,7 @@ hidbus_intr_start(device_t child) mtx_unlock(tlc->mtx); } } - error = refcnted ? 0 : HID_INTR_START(device_get_parent(bus)); + error = refcnted ? 0 : HID_INTR_START(device_get_parent(bus), bus); sx_unlock(&sc->sx); return (error); @@ -650,7 +651,7 @@ hidbus_intr_stop(device_t child) } refcnted |= (tlc->refcnt != 0); } - error = refcnted ? 0 : HID_INTR_STOP(device_get_parent(bus)); + error = refcnted ? 0 : HID_INTR_STOP(device_get_parent(bus), bus); sx_unlock(&sc->sx); return (error); @@ -661,7 +662,7 @@ hidbus_intr_poll(device_t child) { device_t bus = device_get_parent(child); - HID_INTR_POLL(device_get_parent(bus)); + HID_INTR_POLL(device_get_parent(bus), bus); } struct hid_rdesc_info * @@ -761,7 +762,22 @@ hid_set_report_descr(device_t dev, const void *data, hid_size_t len) } static int -hidbus_write(device_t dev, const void *data, hid_size_t len) +hidbus_get_rdesc(device_t dev, device_t child __unused, void *data, + hid_size_t len) +{ + return (hid_get_rdesc(dev, data, len)); +} + +static int +hidbus_read(device_t dev, device_t child __unused, void *data, + hid_size_t maxlen, hid_size_t *actlen) +{ + return (hid_read(dev, data, maxlen, actlen)); +} + +static int +hidbus_write(device_t dev, device_t child __unused, const void *data, + hid_size_t len) { struct hidbus_softc *sc; uint8_t id; @@ -780,6 +796,40 @@ hidbus_write(device_t dev, const void *data, hid_size_t len) return (hid_write(dev, data, len)); } +static int +hidbus_get_report(device_t dev, device_t child __unused, void *data, + hid_size_t maxlen, hid_size_t *actlen, uint8_t type, uint8_t id) +{ + return (hid_get_report(dev, data, maxlen, actlen, type, id)); +} + +static int +hidbus_set_report(device_t dev, device_t child __unused, const void *data, + hid_size_t len, uint8_t type, uint8_t id) +{ + return (hid_set_report(dev, data, len, type, id)); +} + +static int +hidbus_set_idle(device_t dev, device_t child __unused, uint16_t duration, + uint8_t id) +{ + return (hid_set_idle(dev, duration, id)); +} + +static int +hidbus_set_protocol(device_t dev, device_t child __unused, uint16_t protocol) +{ + return (hid_set_protocol(dev, protocol)); +} + +static int +hidbus_ioctl(device_t dev, device_t child __unused, unsigned long cmd, + uintptr_t data) +{ + return (hid_ioctl(dev, cmd, data)); +} + /*------------------------------------------------------------------------* * hidbus_lookup_id * @@ -904,14 +954,14 @@ static device_method_t hidbus_methods[] = { DEVMETHOD(bus_child_location, hidbus_child_location), /* hid interface */ - DEVMETHOD(hid_get_rdesc, hid_get_rdesc), - DEVMETHOD(hid_read, hid_read), + DEVMETHOD(hid_get_rdesc, hidbus_get_rdesc), + DEVMETHOD(hid_read, hidbus_read), DEVMETHOD(hid_write, hidbus_write), - DEVMETHOD(hid_get_report, hid_get_report), - DEVMETHOD(hid_set_report, hid_set_report), - DEVMETHOD(hid_set_idle, hid_set_idle), - DEVMETHOD(hid_set_protocol, hid_set_protocol), - DEVMETHOD(hid_ioctl, hid_ioctl), + DEVMETHOD(hid_get_report, hidbus_get_report), + DEVMETHOD(hid_set_report, hidbus_set_report), + DEVMETHOD(hid_set_idle, hidbus_set_idle), + DEVMETHOD(hid_set_protocol, hidbus_set_protocol), + DEVMETHOD(hid_ioctl, hidbus_ioctl), DEVMETHOD_END }; diff --git a/sys/dev/hyperv/input/hv_hid.c b/sys/dev/hyperv/input/hv_hid.c index d576b292e12e..b8fc9605bf67 100644 --- a/sys/dev/hyperv/input/hv_hid.c +++ b/sys/dev/hyperv/input/hv_hid.c @@ -473,8 +473,8 @@ hv_hid_detach(device_t dev) } static void -hv_hid_intr_setup(device_t dev, hid_intr_t intr, void *ctx, - struct hid_rdesc_info *rdesc) +hv_hid_intr_setup(device_t dev, device_t child __unused, hid_intr_t intr, + void *ctx, struct hid_rdesc_info *rdesc) { hv_hid_sc *sc; @@ -489,7 +489,7 @@ hv_hid_intr_setup(device_t dev, hid_intr_t intr, void *ctx, } static void -hv_hid_intr_unsetup(device_t dev) +hv_hid_intr_unsetup(device_t dev, device_t child __unused) { hv_hid_sc *sc; @@ -500,7 +500,7 @@ hv_hid_intr_unsetup(device_t dev) } static int -hv_hid_intr_start(device_t dev) +hv_hid_intr_start(device_t dev, device_t child __unused) { hv_hid_sc *sc; @@ -512,7 +512,7 @@ hv_hid_intr_start(device_t dev) } static int -hv_hid_intr_stop(device_t dev) +hv_hid_intr_stop(device_t dev, device_t child __unused) { hv_hid_sc *sc; @@ -524,7 +524,8 @@ hv_hid_intr_stop(device_t dev) } static int -hv_hid_get_rdesc(device_t dev, void *buf, hid_size_t len) +hv_hid_get_rdesc(device_t dev, device_t child __unused, void *buf, + hid_size_t len) { hv_hid_sc *sc; diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index 3e481ccd4417..a5da6df5eba3 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -791,8 +791,8 @@ iichid_sysctl_sampling_rate_handler(SYSCTL_HANDLER_ARGS) #endif /* IICHID_SAMPLING */ static void -iichid_intr_setup(device_t dev, hid_intr_t intr, void *context, - struct hid_rdesc_info *rdesc) +iichid_intr_setup(device_t dev, device_t child __unused, hid_intr_t intr, + void *context, struct hid_rdesc_info *rdesc) { struct iichid_softc *sc; @@ -820,7 +820,7 @@ iichid_intr_setup(device_t dev, hid_intr_t intr, void *context, } static void -iichid_intr_unsetup(device_t dev) +iichid_intr_unsetup(device_t dev, device_t child __unused) { struct iichid_softc *sc; @@ -832,7 +832,7 @@ iichid_intr_unsetup(device_t dev) } static int -iichid_intr_start(device_t dev) +iichid_intr_start(device_t dev, device_t child __unused) { struct iichid_softc *sc; @@ -844,7 +844,7 @@ iichid_intr_start(device_t dev) } static int -iichid_intr_stop(device_t dev) +iichid_intr_stop(device_t dev, device_t child __unused) { struct iichid_softc *sc; @@ -862,7 +862,7 @@ iichid_intr_stop(device_t dev) } static void -iichid_intr_poll(device_t dev) +iichid_intr_poll(device_t dev, device_t child __unused) { struct iichid_softc *sc; iichid_size_t actual; @@ -878,7 +878,8 @@ iichid_intr_poll(device_t dev) * HID interface */ static int -iichid_get_rdesc(device_t dev, void *buf, hid_size_t len) +iichid_get_rdesc(device_t dev, device_t child __unused, void *buf, + hid_size_t len) { struct iichid_softc *sc; int error; @@ -892,7 +893,8 @@ iichid_get_rdesc(device_t dev, void *buf, hid_size_t len) } static int -iichid_read(device_t dev, void *buf, hid_size_t maxlen, hid_size_t *actlen) +iichid_read(device_t dev, device_t child __unused, void *buf, + hid_size_t maxlen, hid_size_t *actlen) { struct iichid_softc *sc; device_t parent; @@ -911,7 +913,8 @@ iichid_read(device_t dev, void *buf, hid_size_t maxlen, hid_size_t *actlen) } static int -iichid_write(device_t dev, const void *buf, hid_size_t len) +iichid_write(device_t dev, device_t child __unused, const void *buf, + hid_size_t len) { struct iichid_softc *sc; @@ -922,8 +925,8 @@ iichid_write(device_t dev, const void *buf, hid_size_t len) } static int -iichid_get_report(device_t dev, void *buf, hid_size_t maxlen, - hid_size_t *actlen, uint8_t type, uint8_t id) +iichid_get_report(device_t dev, device_t child __unused, void *buf, + hid_size_t maxlen, hid_size_t *actlen, uint8_t type, uint8_t id) { struct iichid_softc *sc; @@ -935,8 +938,8 @@ iichid_get_report(device_t dev, void *buf, hid_size_t maxlen, } static int -iichid_set_report(device_t dev, const void *buf, hid_size_t len, uint8_t type, - uint8_t id) +iichid_set_report(device_t dev, device_t child __unused, const void *buf, + hid_size_t len, uint8_t type, uint8_t id) { struct iichid_softc *sc; @@ -947,19 +950,21 @@ iichid_set_report(device_t dev, const void *buf, hid_size_t len, uint8_t type, } static int -iichid_set_idle(device_t dev, uint16_t duration, uint8_t id) +iichid_set_idle(device_t dev, device_t child __unused, + uint16_t duration, uint8_t id) { return (ENOTSUP); } static int -iichid_set_protocol(device_t dev, uint16_t protocol) +iichid_set_protocol(device_t dev, device_t child __unused, uint16_t protocol) { return (ENOTSUP); } static int -iichid_ioctl(device_t dev, unsigned long cmd, uintptr_t data) +iichid_ioctl(device_t dev, device_t child __unused, unsigned long cmd, + uintptr_t data) { int error; diff --git a/sys/dev/usb/input/usbhid.c b/sys/dev/usb/input/usbhid.c index 95be0b647da9..a88d2cfac1c2 100644 --- a/sys/dev/usb/input/usbhid.c +++ b/sys/dev/usb/input/usbhid.c @@ -333,8 +333,8 @@ usbhid_xfer_check_len(struct usbhid_softc* sc, int xfer_idx, hid_size_t len) } static void -usbhid_intr_setup(device_t dev, hid_intr_t intr, void *context, - struct hid_rdesc_info *rdesc) +usbhid_intr_setup(device_t dev, device_t child __unused, hid_intr_t intr, + void *context, struct hid_rdesc_info *rdesc) { struct usbhid_softc* sc = device_get_softc(dev); uint16_t n; @@ -406,7 +406,7 @@ usbhid_intr_setup(device_t dev, hid_intr_t intr, void *context, } static void -usbhid_intr_unsetup(device_t dev) +usbhid_intr_unsetup(device_t dev, device_t child __unused) { struct usbhid_softc* sc = device_get_softc(dev); @@ -419,7 +419,7 @@ usbhid_intr_unsetup(device_t dev) } static int -usbhid_intr_start(device_t dev) +usbhid_intr_start(device_t dev, device_t child __unused) { struct usbhid_softc* sc = device_get_softc(dev); @@ -450,7 +450,7 @@ usbhid_intr_start(device_t dev) } static int -usbhid_intr_stop(device_t dev) +usbhid_intr_stop(device_t dev, device_t child __unused) { struct usbhid_softc* sc = device_get_softc(dev); @@ -463,7 +463,7 @@ usbhid_intr_stop(device_t dev) } static void -usbhid_intr_poll(device_t dev) +usbhid_intr_poll(device_t dev, device_t child __unused) { struct usbhid_softc* sc = device_get_softc(dev); @@ -538,7 +538,8 @@ usbhid_sync_xfer(struct usbhid_softc* sc, int xfer_idx, } static int -usbhid_get_rdesc(device_t dev, void *buf, hid_size_t len) +usbhid_get_rdesc(device_t dev, device_t child __unused, void *buf, + hid_size_t len) { struct usbhid_softc* sc = device_get_softc(dev); int error; @@ -553,8 +554,8 @@ usbhid_get_rdesc(device_t dev, void *buf, hid_size_t len) } static int -usbhid_get_report(device_t dev, void *buf, hid_size_t maxlen, - hid_size_t *actlen, uint8_t type, uint8_t id) +usbhid_get_report(device_t dev, device_t child __unused, void *buf, + hid_size_t maxlen, hid_size_t *actlen, uint8_t type, uint8_t id) { struct usbhid_softc* sc = device_get_softc(dev); union usbhid_device_request req; @@ -579,8 +580,8 @@ usbhid_get_report(device_t dev, void *buf, hid_size_t maxlen, } static int -usbhid_set_report(device_t dev, const void *buf, hid_size_t len, uint8_t type, - uint8_t id) +usbhid_set_report(device_t dev, device_t child __unused, const void *buf, + hid_size_t len, uint8_t type, uint8_t id) { struct usbhid_softc* sc = device_get_softc(dev); union usbhid_device_request req; @@ -602,7 +603,8 @@ usbhid_set_report(device_t dev, const void *buf, hid_size_t len, uint8_t type, } static int -usbhid_read(device_t dev, void *buf, hid_size_t maxlen, hid_size_t *actlen) +usbhid_read(device_t dev, device_t child __unused, void *buf, + hid_size_t maxlen, hid_size_t *actlen) { struct usbhid_softc* sc = device_get_softc(dev); union usbhid_device_request req; @@ -621,7 +623,8 @@ usbhid_read(device_t dev, void *buf, hid_size_t maxlen, hid_size_t *actlen) } static int -usbhid_write(device_t dev, const void *buf, hid_size_t len) +usbhid_write(device_t dev, device_t child __unused, const void *buf, + hid_size_t len) { struct usbhid_softc* sc = device_get_softc(dev); union usbhid_device_request req; @@ -637,7 +640,8 @@ usbhid_write(device_t dev, const void *buf, hid_size_t len) } static int -usbhid_set_idle(device_t dev, uint16_t duration, uint8_t id) +usbhid_set_idle(device_t dev, device_t child __unused, uint16_t duration, + uint8_t id) { struct usbhid_softc* sc = device_get_softc(dev); union usbhid_device_request req; @@ -659,7 +663,7 @@ usbhid_set_idle(device_t dev, uint16_t duration, uint8_t id) } static int -usbhid_set_protocol(device_t dev, uint16_t protocol) +usbhid_set_protocol(device_t dev, device_t child __unused, uint16_t protocol) { struct usbhid_softc* sc = device_get_softc(dev); union usbhid_device_request req; @@ -680,7 +684,8 @@ usbhid_set_protocol(device_t dev, uint16_t protocol) } static int -usbhid_ioctl(device_t dev, unsigned long cmd, uintptr_t data) +usbhid_ioctl(device_t dev, device_t child __unused, unsigned long cmd, + uintptr_t data) { struct usbhid_softc* sc = device_get_softc(dev); struct usb_ctl_request *ucr; From nobody Thu Aug 3 16:12:04 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4P0Qlhz3cNvd; Thu, 3 Aug 2023 16:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4N4khWz4Www; Thu, 3 Aug 2023 16:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jpx8EDvbGvsuFtfo3vrYx+xBQyYolaFY3VlRuA3Quew=; b=OzwpK1eNJoIbvvUNc3QRx6L2YbBiHgAyfqB/AQIgL+S5kNfPBJgzk4PDRm/t+t/2lhTRbT bTpV0Z5YkrMRy5S8/PsJhvOo68K122E2+JJL/nDWF+Qc6ic4vnLeJ3qSqX3CcEMNo7FWXG RyH6JbSAyjdZFEVvpU/eu+xr1AyBqRoQjWsnnsjeREkZJKJtJ6YiMOLjk2x5jjliI8UTRK j80AiotHsfxV00l+57ThqfQ9SHIK9lNFBFi/okF49VmrlhqKVegKYAW0lyYxh3xFPMZ+op gVc/fhdFyBsgLsJxoH/20mXjcBlV5neZEc55/V7okkFdntCyHGKM8tV1gNDb5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jpx8EDvbGvsuFtfo3vrYx+xBQyYolaFY3VlRuA3Quew=; b=YRWDFCYRRv1eO+H7G1Id0ZYKJDoGkFVOlGWzMoxKAn1cKwWZHgWUxnVVcEFAXwXyqJYMs1 cTevr8ZMpsAPpwGBUHhN/Fyo3UiSD9euinxJaTL9X4A7yB70N9Ik075qhdLyJr5VRfHpUo G7UwtjIerp6WsyJI2/FG5mxfEdjSe5+rraOdMzxcrtBYbQ6QwUcKMYHaqROcXWWO/Amzid JtR9Hzeq/KDe/lB4819uEvASSKM+707xO5VRQQUnFYEJvRf9/iZDhVWPm+OqRFAK8NXGJm CX9XIlbICb0MD6N7B5zuO4D/0EmA8Itp4/scOJ8k69oZff7uTJfRh5lBSqM3ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079124; a=rsa-sha256; cv=none; b=T4U299pmD/cOxPXlnQbbvfjRQxATKUq4pyjrruKhsDftxZ72+zhbPeuZXtm8jtRwzAfLro NvOUMyYcwlOZH8q0JCyHLaOVMOvA7rXG+oTwPHN6sjg/eFHMn5i4mDPEl5mgzz3+teCPlf KbPqjzg7ob7OtzjFqpwNemW4/rAnCliBwQMuAx5GM70HIiiqgAMfsTGbMs7m1i2mJ0zx5j 6J3ssMj3YrVtxP32mYIj1jY10oyn0/iAAnvvi/mzi2ppHOC+kQ1i3Trv9TsWWvI8ItvWuC nN9GKwGY4avfDcBsw248zzTrVTdjGlzw+ljgfed3AeiqPMg/kH8gDglSQ86xsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4N3qsdzC2T; Thu, 3 Aug 2023 16:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GC4s0006126; Thu, 3 Aug 2023 16:12:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GC4Os006125; Thu, 3 Aug 2023 16:12:04 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:12:04 GMT Message-Id: <202308031612.373GC4Os006125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 4151ac9f1292 - main - hidbus(4): Use generic hid methods to start and stop interrupts List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4151ac9f1292b524ae3eeb6f6c9561913bbe444c Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=4151ac9f1292b524ae3eeb6f6c9561913bbe444c commit 4151ac9f1292b524ae3eeb6f6c9561913bbe444c Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:50 +0000 hidbus(4): Use generic hid methods to start and stop interrupts --- sys/dev/hid/bcm5974.c | 4 ++-- sys/dev/hid/hid.c | 18 ++++++++++++++++++ sys/dev/hid/hid.h | 3 +++ sys/dev/hid/hidbus.c | 27 ++++++++++++++------------- sys/dev/hid/hidbus.h | 3 --- sys/dev/hid/hidmap.c | 4 ++-- sys/dev/hid/hidraw.c | 4 ++-- sys/dev/hid/hkbd.c | 6 +++--- sys/dev/hid/hmt.c | 4 ++-- sys/dev/hid/ietp.c | 8 ++++---- 10 files changed, 50 insertions(+), 31 deletions(-) diff --git a/sys/dev/hid/bcm5974.c b/sys/dev/hid/bcm5974.c index fdfc29e6b678..9a927aaffc5b 100644 --- a/sys/dev/hid/bcm5974.c +++ b/sys/dev/hid/bcm5974.c @@ -837,7 +837,7 @@ bcm5974_ev_open(struct evdev_dev *evdev) return (err); } - return (hidbus_intr_start(sc->sc_dev)); + return (hid_intr_start(sc->sc_dev)); } static int @@ -846,7 +846,7 @@ bcm5974_ev_close(struct evdev_dev *evdev) struct bcm5974_softc *sc = evdev_get_softc(evdev); int err; - err = hidbus_intr_stop(sc->sc_dev); + err = hid_intr_stop(sc->sc_dev); if (err != 0) return (err); diff --git a/sys/dev/hid/hid.c b/sys/dev/hid/hid.c index 7fa6e34be22a..6ed72dbe5a00 100644 --- a/sys/dev/hid/hid.c +++ b/sys/dev/hid/hid.c @@ -1028,6 +1028,24 @@ hid_quirk_unload(void *arg) pause("WAIT", hz); } +int +hid_intr_start(device_t dev) +{ + return (HID_INTR_START(device_get_parent(dev), dev)); +} + +int +hid_intr_stop(device_t dev) +{ + return (HID_INTR_STOP(device_get_parent(dev), dev)); +} + +void +hid_intr_poll(device_t dev) +{ + HID_INTR_POLL(device_get_parent(dev), dev); +} + int hid_get_rdesc(device_t dev, void *data, hid_size_t len) { diff --git a/sys/dev/hid/hid.h b/sys/dev/hid/hid.h index 5af470df61d1..a267207e49db 100644 --- a/sys/dev/hid/hid.h +++ b/sys/dev/hid/hid.h @@ -333,6 +333,9 @@ int hid_add_dynamic_quirk(struct hid_device_info *dev_info, uint16_t quirk); void hid_quirk_unload(void *arg); +int hid_intr_start(device_t); +int hid_intr_stop(device_t); +void hid_intr_poll(device_t); int hid_get_rdesc(device_t, void *, hid_size_t); int hid_read(device_t, void *, hid_size_t, hid_size_t *); int hid_write(device_t, const void *, hid_size_t); diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c index fe6c4df060a3..6dd8ff9b8e6f 100644 --- a/sys/dev/hid/hidbus.c +++ b/sys/dev/hid/hidbus.c @@ -604,10 +604,10 @@ hidbus_set_intr(device_t child, hid_intr_t *handler, void *context) tlc->intr_ctx = context; } -int -hidbus_intr_start(device_t child) +static int +hidbus_intr_start(device_t bus, device_t child) { - device_t bus = device_get_parent(child); + MPASS(bus = device_get_parent(child)); struct hidbus_softc *sc = device_get_softc(bus); struct hidbus_ivars *ivar = device_get_ivars(child); struct hidbus_ivars *tlc; @@ -624,16 +624,16 @@ hidbus_intr_start(device_t child) mtx_unlock(tlc->mtx); } } - error = refcnted ? 0 : HID_INTR_START(device_get_parent(bus), bus); + error = refcnted ? 0 : hid_intr_start(bus); sx_unlock(&sc->sx); return (error); } -int -hidbus_intr_stop(device_t child) +static int +hidbus_intr_stop(device_t bus, device_t child) { - device_t bus = device_get_parent(child); + MPASS(bus = device_get_parent(child)); struct hidbus_softc *sc = device_get_softc(bus); struct hidbus_ivars *ivar = device_get_ivars(child); struct hidbus_ivars *tlc; @@ -651,18 +651,16 @@ hidbus_intr_stop(device_t child) } refcnted |= (tlc->refcnt != 0); } - error = refcnted ? 0 : HID_INTR_STOP(device_get_parent(bus), bus); + error = refcnted ? 0 : hid_intr_stop(bus); sx_unlock(&sc->sx); return (error); } -void -hidbus_intr_poll(device_t child) +static void +hidbus_intr_poll(device_t bus, device_t child __unused) { - device_t bus = device_get_parent(child); - - HID_INTR_POLL(device_get_parent(bus), bus); + hid_intr_poll(bus); } struct hid_rdesc_info * @@ -954,6 +952,9 @@ static device_method_t hidbus_methods[] = { DEVMETHOD(bus_child_location, hidbus_child_location), /* hid interface */ + DEVMETHOD(hid_intr_start, hidbus_intr_start), + DEVMETHOD(hid_intr_stop, hidbus_intr_stop), + DEVMETHOD(hid_intr_poll, hidbus_intr_poll), DEVMETHOD(hid_get_rdesc, hidbus_get_rdesc), DEVMETHOD(hid_read, hidbus_read), DEVMETHOD(hid_write, hidbus_write), diff --git a/sys/dev/hid/hidbus.h b/sys/dev/hid/hidbus.h index b2744add8658..3de4a6291511 100644 --- a/sys/dev/hid/hidbus.h +++ b/sys/dev/hid/hidbus.h @@ -160,9 +160,6 @@ struct hid_rdesc_info *hidbus_get_rdesc_info(device_t); int hidbus_lookup_driver_info(device_t, const struct hid_device_id *, int); void hidbus_set_intr(device_t, hid_intr_t*, void *); -int hidbus_intr_start(device_t); -int hidbus_intr_stop(device_t); -void hidbus_intr_poll(device_t); void hidbus_set_desc(device_t, const char *); device_t hidbus_find_child(device_t, int32_t); diff --git a/sys/dev/hid/hidmap.c b/sys/dev/hid/hidmap.c index 8951f14a2361..b97558ad33ef 100644 --- a/sys/dev/hid/hidmap.c +++ b/sys/dev/hid/hidmap.c @@ -118,13 +118,13 @@ _hidmap_set_debug_var(struct hidmap *hm, int *debug_var) static int hidmap_ev_close(struct evdev_dev *evdev) { - return (hidbus_intr_stop(evdev_get_softc(evdev))); + return (hid_intr_stop(evdev_get_softc(evdev))); } static int hidmap_ev_open(struct evdev_dev *evdev) { - return (hidbus_intr_start(evdev_get_softc(evdev))); + return (hid_intr_start(evdev_get_softc(evdev))); } void diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c index dd20aba3e588..c18d039286ee 100644 --- a/sys/dev/hid/hidraw.c +++ b/sys/dev/hid/hidraw.c @@ -379,7 +379,7 @@ hidraw_open(struct cdev *dev, int flag, int mode, struct thread *td) sc->sc_head = sc->sc_tail = 0; sc->sc_fflags = flag; - hidbus_intr_start(sc->sc_dev); + hid_intr_start(sc->sc_dev); return (0); } @@ -392,7 +392,7 @@ hidraw_dtor(void *data) DPRINTF("sc=%p\n", sc); /* Disable interrupts. */ - hidbus_intr_stop(sc->sc_dev); + hid_intr_stop(sc->sc_dev); sc->sc_tail = sc->sc_head = 0; sc->sc_async = 0; diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c index 922256a8f23b..b0aa5be11a1e 100644 --- a/sys/dev/hid/hkbd.c +++ b/sys/dev/hid/hkbd.c @@ -435,7 +435,7 @@ hkbd_do_poll(struct hkbd_softc *sc, uint8_t wait) } while (sc->sc_inputhead == sc->sc_inputtail) { - hidbus_intr_poll(sc->sc_dev); + hid_intr_poll(sc->sc_dev); /* Delay-optimised support for repetition of keys */ if (hkbd_any_key_pressed(sc)) { @@ -1004,7 +1004,7 @@ hkbd_attach(device_t dev) } /* start the keyboard */ - hidbus_intr_start(dev); + hid_intr_start(dev); return (0); /* success */ @@ -1035,7 +1035,7 @@ hkbd_detach(device_t dev) /* kill any stuck keys */ if (sc->sc_flags & HKBD_FLAG_ATTACHED) { /* stop receiving events from the USB keyboard */ - hidbus_intr_stop(dev); + hid_intr_stop(dev); /* release all leftover keys, if any */ memset(&sc->sc_ndata, 0, bitstr_size(HKBD_NKEYCODE)); diff --git a/sys/dev/hid/hmt.c b/sys/dev/hid/hmt.c index cb9de6f24f88..b190772e2498 100644 --- a/sys/dev/hid/hmt.c +++ b/sys/dev/hid/hmt.c @@ -252,13 +252,13 @@ static const struct hid_device_id hmt_devs[] = { static int hmt_ev_close(struct evdev_dev *evdev) { - return (hidbus_intr_stop(evdev_get_softc(evdev))); + return (hid_intr_stop(evdev_get_softc(evdev))); } static int hmt_ev_open(struct evdev_dev *evdev) { - return (hidbus_intr_start(evdev_get_softc(evdev))); + return (hid_intr_start(evdev_get_softc(evdev))); } static int diff --git a/sys/dev/hid/ietp.c b/sys/dev/hid/ietp.c index cdc5491b2c6d..1eaf95f17364 100644 --- a/sys/dev/hid/ietp.c +++ b/sys/dev/hid/ietp.c @@ -220,13 +220,13 @@ static const struct evdev_methods ietp_evdev_methods = { static int ietp_ev_open(struct evdev_dev *evdev) { - return (hidbus_intr_start(evdev_get_softc(evdev))); + return (hid_intr_start(evdev_get_softc(evdev))); } static int ietp_ev_close(struct evdev_dev *evdev) { - return (hidbus_intr_stop(evdev_get_softc(evdev))); + return (hid_intr_stop(evdev_get_softc(evdev))); } static int @@ -595,7 +595,7 @@ ietp_iic_set_absolute_mode(device_t dev, bool enable) } } - if (require_wakeup && hidbus_intr_start(dev) != 0) { + if (require_wakeup && hid_intr_start(dev) != 0) { device_printf(dev, "failed writing poweron command\n"); return (EIO); } @@ -606,7 +606,7 @@ ietp_iic_set_absolute_mode(device_t dev, bool enable) error = EIO; } - if (require_wakeup && hidbus_intr_stop(dev) != 0) { + if (require_wakeup && hid_intr_stop(dev) != 0) { device_printf(dev, "failed writing poweroff command\n"); error = EIO; } From nobody Thu Aug 3 16:12:05 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4P69TMz3cP1Q; Thu, 3 Aug 2023 16:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4P5KMTz4WtQ; Thu, 3 Aug 2023 16:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ay3RDEO14dloUAsZm8H+fXCsRuujVOEglAr3tcFRkIQ=; b=RN3hceIXSSx1p2ze7R7Gpc7KHCr/PN/TxJzm/K96kqZbmf17KuMGrIkTt6dWRLzrbtZnD8 SDEtGrg6QgcnQcTOUEWFblcYlnkbyIF/JZmqgCRz1khU+a8qUqOY4iCWjFw7QFXxxjXlxQ 4pKy6BFMzAKHEWVwiWQYUwfvMMOZTOqJIBixyhtdxxkjX294MjIK+P7PSQx+Ww6I4y7wi7 NQKP23psJGZR8lF6fDu/zU80NYOaWL69kLZ0ZGcdk+QExPylQdKrAvhk7BGR+a3IRNSBwa DhvO/5kIW2cV6G8k6fYP0SuOC/4Z0+PtpqW293savB6gdXFyx3As8q65mxFmlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ay3RDEO14dloUAsZm8H+fXCsRuujVOEglAr3tcFRkIQ=; b=bLuA3APjs5vJU5qUax3BQlDv6H94VZU+qhaO4C7JRmck/G4oG4keH1ap1M/vMKPU3STkWc 1EY/tc8o26ejRN4QWG6gSrmzHEgV1v/LrxExT8wONH4204PHeIsEJ/mCWog+37PxpegQ6Y TBK3Zm6T9vhL8RvH+N0B6PrWJwcA+NkF6XvH8QlLNAYRrh5a2tS8UWbL50/qyZywt1BzES uDyw63HbCzwT3mDl0LpvgJbsbR+J8Wa/hese4AudnuaVOAI1Q2G1sFwjYtge85a7EARxSJ Gj8NlXLIyK8QjkfMSyCVpBMnND8FjZb7PDKQMAbfOGZdfQEx54Row9dDPL2MWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079125; a=rsa-sha256; cv=none; b=nGPH8CfyVBM/GsHh5pDrMuubORPjAHUWauvpcN4enJdwYAjneok8xKIVHaHhOlMJqB4FtT a0tLyWu+a+Yxm5RXjg3V1yznTB1VtekrAErrz8zpDQqjoSjFuNeAMNEMh3ZO8dJOuOlIWB SLhpdzPvXszCbKkqgluTiJqPFEX4wee9lCTTujAEcdTcbN58E/YrPr/uLwz5k+NtziE01B ZX23Ng79lcI4cyZ4RBC9RRckGNCjIORPyJi/6yGJpM4Q/4UDyDXOEizq3aXmy4i186qW8n KhXWWDZdvhYTbEn9A3pXew9k5ZxQyO6e8t+eCNsVs9aEGmfVMALSMtp2dyrwdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4P4QnlzCS1; Thu, 3 Aug 2023 16:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GC52b006148; Thu, 3 Aug 2023 16:12:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GC5pK006147; Thu, 3 Aug 2023 16:12:05 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:12:05 GMT Message-Id: <202308031612.373GC5pK006147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 5adcec04b5ab - main - intelspi: Add support for ddb/kdb -compatible polled mode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5adcec04b5abd4971f1678d6ee1369cc9ecaa90d Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=5adcec04b5abd4971f1678d6ee1369cc9ecaa90d commit 5adcec04b5abd4971f1678d6ee1369cc9ecaa90d Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:50 +0000 intelspi: Add support for ddb/kdb -compatible polled mode Required for Apple and Microsoft -compatible HID-over-SPI drivers. Most logic was already implemented in commit 3c0867343819 "spibus: extend API: add cs_delay ivar, KEEP_CS and NO_SLEEP flags". It dissallowed driver sleeps in the interrupt context. This commit extends this feature to handle ddb/kdb context with following: - Skip driver locking if SPI functions were called from kdb/ddb. - Reinitialize controller if kdb/ddb initiated SPI transfer has interrupted another already running one. Does not work very reliable yet. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41247 --- sys/dev/intel/spi.c | 57 ++++++++++++++++++++++++++++++++++++++--------------- sys/dev/intel/spi.h | 2 +- 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/sys/dev/intel/spi.c b/sys/dev/intel/spi.c index 6dd063511e26..3bcbd8fbd4f4 100644 --- a/sys/dev/intel/spi.c +++ b/sys/dev/intel/spi.c @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -46,14 +47,27 @@ /** * Macros for driver mutex locking */ -#define INTELSPI_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define INTELSPI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define INTELSPI_IN_POLLING_MODE() (SCHEDULER_STOPPED() || kdb_active) +#define INTELSPI_LOCK(_sc) do { \ + if(!INTELSPI_IN_POLLING_MODE()) \ + mtx_lock(&(_sc)->sc_mtx); \ +} while (0) +#define INTELSPI_UNLOCK(_sc) do { \ + if(!INTELSPI_IN_POLLING_MODE()) \ + mtx_unlock(&(_sc)->sc_mtx); \ +} while (0) #define INTELSPI_LOCK_INIT(_sc) \ mtx_init(&_sc->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ "intelspi", MTX_DEF) #define INTELSPI_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) -#define INTELSPI_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) -#define INTELSPI_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) +#define INTELSPI_ASSERT_LOCKED(_sc) do { \ + if(!INTELSPI_IN_POLLING_MODE()) \ + mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ +} while (0) +#define INTELSPI_ASSERT_UNLOCKED(_sc) do { \ + if(!INTELSPI_IN_POLLING_MODE()) \ + mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED);\ +} while (0) #define INTELSPI_WRITE(_sc, _off, _val) \ bus_write_4((_sc)->sc_mem_res, (_off), (_val)) @@ -342,17 +356,26 @@ intelspi_transfer(device_t dev, device_t child, struct spi_command *cmd) INTELSPI_LOCK(sc); - /* If the controller is in use wait until it is available. */ - while (sc->sc_flags & INTELSPI_BUSY) { - if ((cmd->flags & SPI_FLAG_NO_SLEEP) == SPI_FLAG_NO_SLEEP) { - INTELSPI_UNLOCK(sc); - return (EBUSY); - } - err = mtx_sleep(dev, &sc->sc_mtx, 0, "intelspi", 0); - if (err == EINTR) { - INTELSPI_UNLOCK(sc); - return (err); + if (!INTELSPI_IN_POLLING_MODE()) { + /* If the controller is in use wait until it is available. */ + while (sc->sc_flags & INTELSPI_BUSY) { + if ((cmd->flags & SPI_FLAG_NO_SLEEP) != 0) { + INTELSPI_UNLOCK(sc); + return (EBUSY); + } + err = mtx_sleep(dev, &sc->sc_mtx, 0, "intelspi", 0); + if (err == EINTR) { + INTELSPI_UNLOCK(sc); + return (err); + } } + } else { + /* + * Now we are in the middle of other transfer. Try to reset + * controller state to get predictable context. + */ + if ((sc->sc_flags & INTELSPI_BUSY) != 0) + intelspi_init(sc); } /* Now we have control over SPI controller. */ @@ -411,7 +434,8 @@ intelspi_transfer(device_t dev, device_t child, struct spi_command *cmd) DELAY(cs_delay); /* Transfer as much as possible to FIFOs */ - if ((cmd->flags & SPI_FLAG_NO_SLEEP) == SPI_FLAG_NO_SLEEP) { + if ((cmd->flags & SPI_FLAG_NO_SLEEP) != 0 || + INTELSPI_IN_POLLING_MODE() || cold) { /* We cannot wait with mtx_sleep if we're called from e.g. an ithread */ poll_limit = 2000; while (!intelspi_transact(sc) && poll_limit-- > 0) @@ -449,7 +473,8 @@ intelspi_transfer(device_t dev, device_t child, struct spi_command *cmd) /* Release the controller and wakeup the next thread waiting for it. */ sc->sc_flags = 0; - wakeup_one(dev); + if (!INTELSPI_IN_POLLING_MODE()) + wakeup_one(dev); INTELSPI_UNLOCK(sc); /* diff --git a/sys/dev/intel/spi.h b/sys/dev/intel/spi.h index bd79ec1e812a..fa145f8f73d7 100644 --- a/sys/dev/intel/spi.h +++ b/sys/dev/intel/spi.h @@ -54,7 +54,7 @@ struct intelspi_softc { struct spi_command *sc_cmd; uint32_t sc_len; uint32_t sc_read; - uint32_t sc_flags; + volatile uint32_t sc_flags; uint32_t sc_written; uint32_t sc_clock; uint32_t sc_mode; From nobody Thu Aug 3 16:12:06 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4Q6k9xz3cNvl; Thu, 3 Aug 2023 16:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4Q6GBbz4X4r; Thu, 3 Aug 2023 16:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OJiy8PP4LkCOKNHFShtFByZJpIOw/uWCkPgnEMJsqNc=; b=OSNQM26AE7VCHuWie/qja6wQol7xr053+krSPormDl1pSa1UHLp9o/tP/mMRFGtBKIkypC ysxviWdviNLWA9CaQea9zMnOHjgtdP72bI6dl+xka+/DPCQWWQkCo5upc5g/irZTZMZUc8 3CXk2aqh1kt74fcMnmTL3W1pBrq6tAXlCIZtkIZBCFW/CghX8Xv2mwyTjKX2vXEosGLe0x b2RARBCv02MMAAVmRSCj8whNAakscYo3U4i7d35AtClvyU8A4GaLR9P2fJ7mxMfu21+W6T SwlKtliVsqPtcGr+Tl2Mq0x/UFs975YdLlVRtKz/FubKicLmFkgJ7jwCquOKfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OJiy8PP4LkCOKNHFShtFByZJpIOw/uWCkPgnEMJsqNc=; b=XQTEa4N1p8eaFbLlBB30Da3O+pDkYFMcqgr7Qq1a4m4SAXB/oOXVTs/OQ5VsBVrJpkO7IW itNe2NbLDU9IHJ9oG/YCMsKnP7fnM/JYDTgiXuK5O+JVTVO88v3WE2TAFy9L2FsMW62tHM pgAiLxcQvd1hk6TWH9eB2Ro5rztNBYwWe1CQI7x+LxspyUk6ZQNaXK286fkp7vaO3qwK0Q TOsoFUp4WpdyCqXouqg9PDRbu3tFdajQrI422Rq6Oq+8kaaZ2GzpTZRyOvg1ed0oCsZ0Qu VL9GS8DyuOF787uxAFZsA+y6+lWv057X+d7isDirg15k9cxWItVTzbyEnuqKVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079126; a=rsa-sha256; cv=none; b=He2UNUrrcgYt91qjIJ3kdpl7H1s0Skf+3uIbNykGwNeHYOxV5VerFS7TXO9ca7QPqf3d9g A+RsOUn13uqcBz/iwzFMPtxybfoXbUGUhQrBdG+7PdBEFutesi4Bf4GW06xwKmCgseFkoK kqSvXWN71oiRlJ1dEuRgLCuvJKdh+BN9oyA5jCHxgJeCcZ/pkTaLCGNJq3xKJqqifaT6gh 3sJ8i7vpw2z22956Ge6GeG77fnO+DnF3WaklSZh0oXWUUNdhS9KroDrfysrOCqIGFxU6v6 LdmbI7EUYGT7eCc3CawCFuXEO0S88rfQri7q6Wvt7IXQTwxdYrvNxx8qvLjs/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4Q5B4TzC2V; Thu, 3 Aug 2023 16:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GC6n3006173; Thu, 3 Aug 2023 16:12:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GC6u2006172; Thu, 3 Aug 2023 16:12:06 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:12:06 GMT Message-Id: <202308031612.373GC6u2006172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 7d380b986a18 - main - spibus(4): Add support for ACPI-based children enumeration List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d380b986a1808164846cfd9afb5ae3f99921fcf Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=7d380b986a1808164846cfd9afb5ae3f99921fcf commit 7d380b986a1808164846cfd9afb5ae3f99921fcf Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:50 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:50 +0000 spibus(4): Add support for ACPI-based children enumeration When spibus is attached as child of Intel SPI controller it scans all ACPI nodes for "SPI Serial Bus Connection Resource Descriptor" described in section 19.6.126 of ACPI specs. If such a descriptor is found, SPI child is added to spibus, it's SPI chip select, mode, clock, IRQ resource and ACPI handle are added to ivars. Existing ACPI bus-hosted child is deleted afterwards. Apple ACPI SPI extensions are supported. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41248 --- sys/conf/files | 1 + sys/dev/spibus/acpi_spibus.c | 580 ++++++++++++++++++++++++++++++++++++++++ sys/dev/spibus/spibus.c | 26 +- sys/dev/spibus/spibusvar.h | 10 +- sys/modules/spi/spibus/Makefile | 5 + 5 files changed, 612 insertions(+), 10 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index ae83722eaca5..1ec165537128 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3143,6 +3143,7 @@ dev/sound/midi/mpu_if.m optional sound dev/sound/midi/mpufoi_if.m optional sound dev/sound/midi/sequencer.c optional sound dev/sound/midi/synth_if.m optional sound +dev/spibus/acpi_spibus.c optional acpi spibus dev/spibus/ofw_spibus.c optional fdt spibus dev/spibus/spibus.c optional spibus \ dependency "spibus_if.h" diff --git a/sys/dev/spibus/acpi_spibus.c b/sys/dev/spibus/acpi_spibus.c new file mode 100644 index 000000000000..c7b897937eea --- /dev/null +++ b/sys/dev/spibus/acpi_spibus.c @@ -0,0 +1,580 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Vladimir Kondratyev + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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 +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +/* + * Make a copy of ACPI_RESOURCE_SPI_SERIALBUS type and replace "pointer to ACPI + * object name string" field with pointer to ACPI object itself. + * This saves us extra strdup()/free() pair on acpi_spibus_get_acpi_res call. + */ +typedef ACPI_RESOURCE_SPI_SERIALBUS ACPI_SPIBUS_RESOURCE_SPI_SERIALBUS; +#define ResourceSource_Handle ResourceSource.StringPtr + +/* Hooks for the ACPI CA debugging infrastructure. */ +#define _COMPONENT ACPI_BUS +ACPI_MODULE_NAME("SPI") + +#if defined (__amd64__) || defined (__i386__) +static bool is_apple; +#endif + +struct acpi_spibus_ivar { + struct spibus_ivar super_ivar; + ACPI_HANDLE handle; +}; + +static inline bool +acpi_resource_is_spi_serialbus(ACPI_RESOURCE *res) +{ + return (res->Type == ACPI_RESOURCE_TYPE_SERIAL_BUS && + res->Data.CommonSerialBus.Type == ACPI_RESOURCE_SERIAL_TYPE_SPI); +} + +static ACPI_STATUS +acpi_spibus_get_acpi_res_cb(ACPI_RESOURCE *res, void *context) +{ + ACPI_SPIBUS_RESOURCE_SPI_SERIALBUS *sb = context; + ACPI_STATUS status; + ACPI_HANDLE handle; + + if (acpi_resource_is_spi_serialbus(res)) { + status = AcpiGetHandle(ACPI_ROOT_OBJECT, + res->Data.SpiSerialBus.ResourceSource.StringPtr, &handle); + if (ACPI_FAILURE(status)) + return (status); + memcpy(sb, &res->Data.SpiSerialBus, + sizeof(ACPI_SPIBUS_RESOURCE_SPI_SERIALBUS)); + /* + * replace "pointer to ACPI object name string" field + * with pointer to ACPI object itself. + */ + sb->ResourceSource_Handle = handle; + return (AE_CTRL_TERMINATE); + } else if (res->Type == ACPI_RESOURCE_TYPE_END_TAG) + return (AE_NOT_FOUND); + + return (AE_OK); +} + +static void +acpi_spibus_dump_res(device_t dev, ACPI_SPIBUS_RESOURCE_SPI_SERIALBUS *sb) +{ + device_printf(dev, "found ACPI child\n"); + printf(" DeviceSelection: 0x%04hx\n", sb->DeviceSelection); + printf(" ConnectionSpeed: %uHz\n", sb->ConnectionSpeed); + printf(" WireMode: %s\n", + sb->WireMode == ACPI_SPI_4WIRE_MODE ? + "FourWireMode" : "ThreeWireMode"); + printf(" DevicePolarity: %s\n", + sb->DevicePolarity == ACPI_SPI_ACTIVE_LOW ? + "PolarityLow" : "PolarityHigh"); + printf(" DataBitLength: %uBit\n", sb->DataBitLength); + printf(" ClockPhase: %s\n", + sb->ClockPhase == ACPI_SPI_FIRST_PHASE ? + "ClockPhaseFirst" : "ClockPhaseSecond"); + printf(" ClockPolarity: %s\n", + sb->ClockPolarity == ACPI_SPI_START_LOW ? + "ClockPolarityLow" : "ClockPolarityHigh"); + printf(" SlaveMode: %s\n", + sb->SlaveMode == ACPI_CONTROLLER_INITIATED ? + "ControllerInitiated" : "DeviceInitiated"); + printf(" ConnectionSharing: %s\n", sb->ConnectionSharing == 0 ? + "Exclusive" : "Shared"); +} + +static int +acpi_spibus_get_acpi_res(device_t spibus, ACPI_HANDLE dev, + struct spibus_ivar *res) +{ + ACPI_SPIBUS_RESOURCE_SPI_SERIALBUS sb; + + /* + * Read "SPI Serial Bus Connection Resource Descriptor" + * described in p.19.6.126 of ACPI specification. + */ + bzero(&sb, sizeof(ACPI_SPIBUS_RESOURCE_SPI_SERIALBUS)); + if (ACPI_FAILURE(AcpiWalkResources(dev, "_CRS", + acpi_spibus_get_acpi_res_cb, &sb))) + return (ENXIO); + if (sb.ResourceSource_Handle != + acpi_get_handle(device_get_parent(spibus))) + return (ENXIO); + if (bootverbose) + acpi_spibus_dump_res(spibus, &sb); + /* + * The Windows Baytrail and Braswell SPI host controller + * drivers uses 1 as the first (and only) value for ACPI + * DeviceSelection. + */ + if (sb.DeviceSelection != 0 && + (acpi_MatchHid(sb.ResourceSource_Handle, "80860F0E") || + acpi_MatchHid(sb.ResourceSource_Handle, "8086228E"))) + res->cs = sb.DeviceSelection - 1; + else + res->cs = sb.DeviceSelection; + res->mode = + (sb.ClockPhase != ACPI_SPI_FIRST_PHASE ? SPIBUS_MODE_CPHA : 0) | + (sb.ClockPolarity != ACPI_SPI_START_LOW ? SPIBUS_MODE_CPOL : 0); + res->clock = sb.ConnectionSpeed; + + return (0); +} + +#if defined (__amd64__) || defined (__i386__) +static int +acpi_spibus_get_apple_res(device_t spibus, ACPI_HANDLE dev, + struct spibus_ivar *ivar) +{ + /* a0b5b7c6-1318-441c-b0c9-fe695eaf949b */ + static const uint8_t apple_guid[ACPI_UUID_LENGTH] = { + 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, + 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B, + }; + ACPI_BUFFER buf; + ACPI_OBJECT *pkg, *comp; + ACPI_HANDLE parent; + char *k; + uint64_t val; + + /* Apple does not use _CRS but nested devices for SPI slaves */ + if (ACPI_FAILURE(AcpiGetParent(dev, &parent))) + return (ENXIO); + if (parent != acpi_get_handle(device_get_parent(spibus))) + return (ENXIO); + if (ACPI_FAILURE(acpi_EvaluateDSMTyped(dev, apple_guid, + 1, 1, NULL, &buf, ACPI_TYPE_PACKAGE))) + return (ENXIO); + + pkg = ((ACPI_OBJECT *)buf.Pointer); + if (pkg->Package.Count % 2 != 0) { + device_printf(spibus, "_DSM length %d not even\n", + pkg->Package.Count); + AcpiOsFree(pkg); + return (ENXIO); + } + + if (bootverbose) + device_printf(spibus, "found ACPI child\n"); + + for (comp = pkg->Package.Elements; + comp < pkg->Package.Elements + pkg->Package.Count; + comp += 2) { + + if (comp[0].Type != ACPI_TYPE_STRING || + comp[1].Type != ACPI_TYPE_BUFFER) { + device_printf(spibus, "expected string+buffer, " + "got %d+%d\n", comp[0].Type, comp[1].Type); + continue; + } + k = comp[0].String.Pointer; + val = comp[1].Buffer.Length >= 8 ? + *(uint64_t *)comp[1].Buffer.Pointer : 0; + + if (bootverbose) + printf(" %s: %zu\n", k, (intmax_t)val); + + if (strcmp(k, "spiSclkPeriod") == 0) { + if (val != 0) + ivar->clock = 1000000000 / val; + } else if (strcmp(k, "spiSPO") == 0) { + if (val != 0) + ivar->mode |= SPIBUS_MODE_CPOL; + } else if (strcmp(k, "spiSPH") == 0) { + if (val != 0) + ivar->mode |= SPIBUS_MODE_CPHA; + } else if (strcmp(k, "spiCSDelay") == 0) { + ivar->cs_delay = val; + } + } + + AcpiOsFree(pkg); + + return (0); +} +#endif + +static int +acpi_spibus_delete_acpi_child(ACPI_HANDLE handle) +{ + device_t acpi_child, acpi0; + + /* Delete existing child of acpi bus */ + acpi_child = acpi_get_device(handle); + if (acpi_child != NULL) { + acpi0 = devclass_get_device(devclass_find("acpi"), 0); + if (device_get_parent(acpi_child) != acpi0) + return (ENXIO); + + if (device_is_attached(acpi_child)) + return (ENXIO); + + if (device_delete_child(acpi0, acpi_child) != 0) + return (ENXIO); + } + + return (0); +} + +static device_t +acpi_spibus_add_child(device_t dev, u_int order, const char *name, int unit) +{ + return (spibus_add_child_common( + dev, order, name, unit, sizeof(struct acpi_spibus_ivar))); +} + +static ACPI_STATUS +acpi_spibus_enumerate_child(ACPI_HANDLE handle, UINT32 level, + void *context, void **result) +{ + device_t spibus, child; + struct spibus_ivar res; + ACPI_STATUS status; + UINT32 sta; + bool found = false; + + spibus = context; + + /* + * If no _STA method or if it failed, then assume that + * the device is present. + */ + if (!ACPI_FAILURE(acpi_GetInteger(handle, "_STA", &sta)) && + !ACPI_DEVICE_PRESENT(sta)) + return (AE_OK); + + if (!acpi_has_hid(handle)) + return (AE_OK); + + bzero(&res, sizeof(res)); + if (acpi_spibus_get_acpi_res(spibus, handle, &res) == 0) + found = true; +#if defined (__amd64__) || defined (__i386__) + if (!found && is_apple && + acpi_spibus_get_apple_res(spibus, handle, &res) == 0) + found = true; +#endif + if (!found || res.clock == 0) + return (AE_OK); + + /* Delete existing child of acpi bus */ + if (acpi_spibus_delete_acpi_child(handle) != 0) + return (AE_OK); + + child = BUS_ADD_CHILD(spibus, 0, NULL, -1); + if (child == NULL) { + device_printf(spibus, "add child failed\n"); + return (AE_OK); + } + + spibus_set_cs(child, res.cs); + spibus_set_mode(child, res.mode); + spibus_set_clock(child, res.clock); + spibus_set_cs_delay(child, res.cs_delay); + acpi_set_handle(child, handle); + acpi_parse_resources(child, handle, &acpi_res_parse_set, NULL); + + /* + * Update ACPI-CA to use the IIC enumerated device_t for this handle. + */ + status = AcpiAttachData(handle, acpi_fake_objhandler, child); + if (ACPI_FAILURE(status)) + printf("WARNING: Unable to attach object data to %s - %s\n", + acpi_name(handle), AcpiFormatException(status)); + + return (AE_OK); +} + +static ACPI_STATUS +acpi_spibus_enumerate_children(device_t dev) +{ + return (AcpiWalkNamespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, acpi_spibus_enumerate_child, NULL, dev, NULL)); +} + +static void +acpi_spibus_set_power_children(device_t dev, int state, bool all_children) +{ + device_t *devlist; + int i, numdevs; + + if (device_get_children(dev, &devlist, &numdevs) != 0) + return; + + for (i = 0; i < numdevs; i++) + if (all_children || device_is_attached(devlist[i]) != 0) + acpi_set_powerstate(devlist[i], state); + + free(devlist, M_TEMP); +} + +static int +acpi_spibus_probe(device_t dev) +{ + ACPI_HANDLE handle; + device_t controller; + + if (acpi_disabled("spibus")) + return (ENXIO); + + controller = device_get_parent(dev); + if (controller == NULL) + return (ENXIO); + + handle = acpi_get_handle(controller); + if (handle == NULL) + return (ENXIO); + + device_set_desc(dev, "SPI bus (ACPI-hinted)"); + return (BUS_PROBE_DEFAULT + 1); +} + +static int +acpi_spibus_attach(device_t dev) +{ + +#if defined (__amd64__) || defined (__i386__) + char *vendor = kern_getenv("smbios.bios.vendor"); + if (vendor != NULL && + (strcmp(vendor, "Apple Inc.") == 0 || + strcmp(vendor, "Apple Computer, Inc.") == 0)) + is_apple = true; +#endif + + if (ACPI_FAILURE(acpi_spibus_enumerate_children(dev))) + device_printf(dev, "children enumeration failed\n"); + + acpi_spibus_set_power_children(dev, ACPI_STATE_D0, true); + return (spibus_attach(dev)); +} + +static int +acpi_spibus_detach(device_t dev) +{ + acpi_spibus_set_power_children(dev, ACPI_STATE_D3, false); + + return (spibus_detach(dev)); +} + +static int +acpi_spibus_suspend(device_t dev) +{ + acpi_spibus_set_power_children(dev, ACPI_STATE_D3, false); + + return (bus_generic_suspend(dev)); +} + +static int +acpi_spibus_resume(device_t dev) +{ + acpi_spibus_set_power_children(dev, ACPI_STATE_D0, false); + + return (bus_generic_resume(dev)); +} + +#ifndef INTRNG +/* Mostly copy of acpi_alloc_resource() */ +static struct resource * +acpi_spibus_alloc_resource(device_t dev, device_t child, int type, int *rid, + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ + ACPI_RESOURCE ares; + struct resource_list *rl; + struct resource *res; + + if (device_get_parent(child) != dev) + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, + type, rid, start, end, count, flags)); + + rl = BUS_GET_RESOURCE_LIST(dev, child); + if (rl == NULL) + return (NULL); + + res = resource_list_alloc(rl, dev, child, type, rid, + start, end, count, flags); + if (res != NULL && type == SYS_RES_IRQ && + ACPI_SUCCESS(acpi_lookup_irq_resource(child, *rid, res, &ares))) + acpi_config_intr(child, &ares); + + return (res); +} +#endif + +/* + * If this device is an ACPI child but no one claimed it, attempt + * to power it off. We'll power it back up when a driver is added. + */ +static void +acpi_spibus_probe_nomatch(device_t bus, device_t child) +{ + spibus_probe_nomatch(bus, child); + acpi_set_powerstate(child, ACPI_STATE_D3); +} + +/* + * If a new driver has a chance to probe a child, first power it up. + */ +static void +acpi_spibus_driver_added(device_t dev, driver_t *driver) +{ + device_t child, *devlist; + int i, numdevs; + + DEVICE_IDENTIFY(driver, dev); + if (device_get_children(dev, &devlist, &numdevs) != 0) + return; + + for (i = 0; i < numdevs; i++) { + child = devlist[i]; + if (device_get_state(child) == DS_NOTPRESENT) { + acpi_set_powerstate(child, ACPI_STATE_D0); + if (device_probe_and_attach(child) != 0) + acpi_set_powerstate(child, ACPI_STATE_D3); + } + } + free(devlist, M_TEMP); +} + +static void +acpi_spibus_child_deleted(device_t bus, device_t child) +{ + struct acpi_spibus_ivar *devi = device_get_ivars(child); + + if (acpi_get_device(devi->handle) == child) + AcpiDetachData(devi->handle, acpi_fake_objhandler); +} + +static int +acpi_spibus_read_ivar(device_t bus, device_t child, int which, uintptr_t *res) +{ + struct acpi_spibus_ivar *devi = device_get_ivars(child); + + switch (which) { + case ACPI_IVAR_HANDLE: + *res = (uintptr_t)devi->handle; + break; + default: + return (spibus_read_ivar(bus, child, which, res)); + } + + return (0); +} + +static int +acpi_spibus_write_ivar(device_t bus, device_t child, int which, uintptr_t val) +{ + struct acpi_spibus_ivar *devi = device_get_ivars(child); + + switch (which) { + case ACPI_IVAR_HANDLE: + if (devi->handle != NULL) + return (EINVAL); + devi->handle = (ACPI_HANDLE)val; + break; + default: + return (spibus_write_ivar(bus, child, which, val)); + } + + return (0); +} + +/* Location hint for devctl(8). Concatenate IIC and ACPI hints. */ +static int +acpi_spibus_child_location(device_t bus, device_t child, struct sbuf *sb) +{ + struct acpi_spibus_ivar *devi = device_get_ivars(child); + int error; + + /* read SPI location hint string into the buffer. */ + error = spibus_child_location(bus, child, sb); + if (error != 0) + return (error); + + /* Place ACPI string right after IIC one's terminating NUL. */ + if (devi->handle != NULL) + sbuf_printf(sb, " handle=%s", acpi_name(devi->handle)); + + return (0); +} + +/* PnP information for devctl(8). */ +static int +acpi_spibus_child_pnpinfo(device_t bus, device_t child, struct sbuf *sb) +{ + struct acpi_spibus_ivar *devi = device_get_ivars(child); + + return ( + devi->handle == NULL ? ENOTSUP : acpi_pnpinfo(devi->handle, sb)); +} + +static device_method_t acpi_spibus_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, acpi_spibus_probe), + DEVMETHOD(device_attach, acpi_spibus_attach), + DEVMETHOD(device_detach, acpi_spibus_detach), + DEVMETHOD(device_suspend, acpi_spibus_suspend), + DEVMETHOD(device_resume, acpi_spibus_resume), + + /* Bus interface */ +#ifndef INTRNG + DEVMETHOD(bus_alloc_resource, acpi_spibus_alloc_resource), +#endif + DEVMETHOD(bus_add_child, acpi_spibus_add_child), + DEVMETHOD(bus_probe_nomatch, acpi_spibus_probe_nomatch), + DEVMETHOD(bus_driver_added, acpi_spibus_driver_added), + DEVMETHOD(bus_child_deleted, acpi_spibus_child_deleted), + DEVMETHOD(bus_read_ivar, acpi_spibus_read_ivar), + DEVMETHOD(bus_write_ivar, acpi_spibus_write_ivar), + DEVMETHOD(bus_child_location, acpi_spibus_child_location), + DEVMETHOD(bus_child_pnpinfo, acpi_spibus_child_pnpinfo), + DEVMETHOD(bus_get_device_path, acpi_get_acpi_device_path), + + DEVMETHOD_END, +}; + +DEFINE_CLASS_1(spibus, acpi_spibus_driver, acpi_spibus_methods, + sizeof(struct spibus_softc), spibus_driver); +DRIVER_MODULE(acpi_spibus, spi, acpi_spibus_driver, NULL, NULL); +MODULE_VERSION(acpi_spibus, 1); +MODULE_DEPEND(acpi_spibus, acpi, 1, 1, 1); diff --git a/sys/dev/spibus/spibus.c b/sys/dev/spibus/spibus.c index af4b1402cee4..96c4cd7283e9 100644 --- a/sys/dev/spibus/spibus.c +++ b/sys/dev/spibus/spibus.c @@ -53,7 +53,7 @@ spibus_probe(device_t dev) return (BUS_PROBE_DEFAULT); } -static int +int spibus_attach(device_t dev) { struct spibus_softc *sc = SPIBUS_SOFTC(dev); @@ -67,7 +67,7 @@ spibus_attach(device_t dev) * Since this is not a self-enumerating bus, and since we always add * children in attach, we have to always delete children here. */ -static int +int spibus_detach(device_t dev) { return (device_delete_children(dev)); @@ -102,7 +102,7 @@ spibus_print_child(device_t dev, device_t child) return (retval); } -static void +void spibus_probe_nomatch(device_t bus, device_t child) { struct spibus_ivar *devi = SPIBUS_IVAR(child); @@ -112,7 +112,7 @@ spibus_probe_nomatch(device_t bus, device_t child) return; } -static int +int spibus_child_location(device_t bus, device_t child, struct sbuf *sb) { struct spibus_ivar *devi = SPIBUS_IVAR(child); @@ -123,7 +123,7 @@ spibus_child_location(device_t bus, device_t child, struct sbuf *sb) return (0); } -static int +int spibus_read_ivar(device_t bus, device_t child, int which, uintptr_t *result) { struct spibus_ivar *devi = SPIBUS_IVAR(child); @@ -147,7 +147,7 @@ spibus_read_ivar(device_t bus, device_t child, int which, uintptr_t *result) return (0); } -static int +int spibus_write_ivar(device_t bus, device_t child, int which, uintptr_t value) { struct spibus_ivar *devi = SPIBUS_IVAR(child); @@ -181,8 +181,9 @@ spibus_write_ivar(device_t bus, device_t child, int which, uintptr_t value) return (0); } -static device_t -spibus_add_child(device_t dev, u_int order, const char *name, int unit) +device_t +spibus_add_child_common(device_t dev, u_int order, const char *name, int unit, + size_t ivars_size) { device_t child; struct spibus_ivar *devi; @@ -190,7 +191,7 @@ spibus_add_child(device_t dev, u_int order, const char *name, int unit) child = device_add_child_ordered(dev, order, name, unit); if (child == NULL) return (child); - devi = malloc(sizeof(struct spibus_ivar), M_DEVBUF, M_NOWAIT | M_ZERO); + devi = malloc(ivars_size, M_DEVBUF, M_NOWAIT | M_ZERO); if (devi == NULL) { device_delete_child(dev, child); return (0); @@ -200,6 +201,13 @@ spibus_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static device_t +spibus_add_child(device_t dev, u_int order, const char *name, int unit) +{ + return (spibus_add_child_common( + dev, order, name, unit, sizeof(struct spibus_ivar))); +} + static void spibus_hinted_child(device_t bus, const char *dname, int dunit) { diff --git a/sys/dev/spibus/spibusvar.h b/sys/dev/spibus/spibusvar.h index db94d30831e6..8c5c122750db 100644 --- a/sys/dev/spibus/spibusvar.h +++ b/sys/dev/spibus/spibusvar.h @@ -73,7 +73,15 @@ spibus_set_ ## A(device_t dev, T t) \ SPIBUS_ACCESSOR(cs, CS, uint32_t) SPIBUS_ACCESSOR(mode, MODE, uint32_t) SPIBUS_ACCESSOR(clock, CLOCK, uint32_t) -SPIBUS_ACCESSOR(cs_delay, CS_DELAY, uint32_t) +SPIBUS_ACCESSOR(cs_delay, CS_DELAY, uint32_t) extern driver_t spibus_driver; extern driver_t ofw_spibus_driver; + +int spibus_attach(device_t); +int spibus_detach(device_t); +device_t spibus_add_child_common(device_t, u_int, const char *, int, size_t); +void spibus_probe_nomatch(device_t, device_t); +int spibus_child_location(device_t, device_t, struct sbuf *); +int spibus_read_ivar(device_t, device_t, int, uintptr_t *); +int spibus_write_ivar(device_t, device_t, int, uintptr_t); diff --git a/sys/modules/spi/spibus/Makefile b/sys/modules/spi/spibus/Makefile index 01386d39e118..7ba80d50e0ff 100644 --- a/sys/modules/spi/spibus/Makefile +++ b/sys/modules/spi/spibus/Makefile @@ -9,6 +9,11 @@ SRCS= spibus.c SRCS+= ofw_spibus.c ofw_bus_if.h .endif +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "i386" +SRCS+= acpi_spibus.c opt_acpi.h acpi_if.h +.endif + # Generated files... SRCS+= \ bus_if.h \ From nobody Thu Aug 3 16:12:07 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGv4S230Hz3cP1Z; Thu, 3 Aug 2023 16:12:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGv4S04Tnz4X58; Thu, 3 Aug 2023 16:12:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jX7MZOiUTfXmVUggKYTy1veVbul4Sx1GBEj/mtUSWiA=; b=KuTNngDaebAnzx8Irg8CisaC5XPcPbm2pX68j9QDFn4j2CWxLS9bVTim6eJjag1BYqqzSQ Gw5GjgnmzwNLtjUsZwEnUHdGz/2bxYZ/Ptq+OQh+Q2Gu7wF+7MaMyq4p/aOGmO7qPmiNDH ynVPUXDKyz7IU97bPOLVns3f6i5MobPUVCzjWTLo4ReWU0R3OZ/Xog5gocKJRvk9A3diDT TESFb9/ctItqMnadNa+ov1TFkGSvSrBesSQxJbmm/Tgiu+9AFcWkj4TzEg+GjOsJL5/WMt E7RjblqBdCKU/0YRGAEl/cEXL/mKuRbN6/kOoPx0+750q7vkexZg+UbCkaiZdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691079128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jX7MZOiUTfXmVUggKYTy1veVbul4Sx1GBEj/mtUSWiA=; b=t/Yc94BY1R3+rN4tnd9H6BPT/NABBNQnWSU9rQhWLxmuI9pIMJs7TrhRpPKVf06zGqPmS1 bVm5Ywwq+SUZpcd3tqXCM1eJGfkk87a7GXCDlhNjEWBBD3rZnTSQOXZhFKnLoOKZqJlOok LZexWBMlzMpXYiUchCYLNeywxYV8i+fAgNZj0fUUFqAPUY/K3xnkqZsK5pcq16KxEN6Djl m1nOGk4GiEZ9izeK95HSGZ6YXbsZ2rVxa1ryc3GIQ7E1vkQZfISAc7VOWTshkK0KpC8B00 nodquBttwPYUxgajOGsB/Y1kSGCZ8CSq+CdiDAkhR3pgztSxHYHuV8UdHxhyGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691079128; a=rsa-sha256; cv=none; b=qi4HCBwaU/9/ntKf/olh77huAwCCKMeG1Aq9oDA90TCaJeODNnFiwIK1FGl8umAG3njtpj irlLcprzzC8YosLwpjVHl2Ez2kxD6Y/w/Qsf5SCNalaxAjxwVFgn8flkTfaSrOYOiFlKEW ukstNIfzR06NxMTRXDOb2I/R1RoWmY0Fzz3wFuzMQt5EXorYshZmsS9jCrW3qtyfeEvFY6 6vp2SXbkMosbEpJHHR04yT4/nD0E3oeOQFnDWVsocFiBNcTtHpLzEPHCQeM9XObKY01WEi C1qIKRThPOUfkpPAE2QdFO53NLPOJHMAWmpQqDg3E1TtjdzaAzB2AjKCOFhOzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGv4R6G8BzCBT; Thu, 3 Aug 2023 16:12:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373GC7Hv006193; Thu, 3 Aug 2023 16:12:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373GC7Qf006192; Thu, 3 Aug 2023 16:12:07 GMT (envelope-from git) Date: Thu, 3 Aug 2023 16:12:07 GMT Message-Id: <202308031612.373GC7Qf006192@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: ed77b896706b - main - Bump __FreeBSD_version to 1400094 for HID KPI changes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed77b896706b4b4b2a19b74968ef95cc1b0062e6 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=ed77b896706b4b4b2a19b74968ef95cc1b0062e6 commit ed77b896706b4b4b2a19b74968ef95cc1b0062e6 Author: Vladimir Kondratyev AuthorDate: 2023-08-03 16:10:51 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-08-03 16:10:51 +0000 Bump __FreeBSD_version to 1400094 for HID KPI changes --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 137bd80c77cb..d068780d8007 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400093 +#define __FreeBSD_version 1400094 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Thu Aug 3 18:14:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGxnm0Dkbz4TmDW; Thu, 3 Aug 2023 18:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGxnl6pfdz4pM9; Thu, 3 Aug 2023 18:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691086476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UxsRhNX46E2/AEUWOmknrJfzhvYM/Om9r1nCwmUo/3Q=; b=PGxfXvjstiuttRdF4LTzT308wf+j0t/p6XgRNgHtJuU1Sx76spaW7VyyEHDYRgmJlxWPF1 EEF0Ty8t4P9UNBzhE4L8otKJ1RV8R1cf4D05Fhs4cWQEoha2tAFN9KA9k0mlItqROrEamP 4ruF4ZCfgqvby1NMNENvS1RUfaG5nNp/sDCs64gmOqrbwlik7H09lHGeDwf1z6YsnCuMqw 4u9sZu+3qWLY22A7fRSg83mf5O1LdiF8I8langKG+Z1KQiaAp34IdPr7BVc95GOBwW7sZ5 ZCvVLaLnS0KrCi3HyJWnlxJh/koumwRww1fnOkwqSfk5/aLehlxWkFMg+q9W4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691086476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UxsRhNX46E2/AEUWOmknrJfzhvYM/Om9r1nCwmUo/3Q=; b=kV07C/fX6tPuTDtT3ZrI6J07vMqUEmzcY0+MAoigarvGA3dR9JHInPEZWwzs1qj2C1iBKj M8w9D7lNCOYq5WktTo0g0M2MXhqfUgT+Zhzk0ItofuTBp4qqCzXqlZyi6rbv++2XdPa+vl bczVwIph0Anj5I9dWQ3kZsFSHkV+HxXZhGkmyDALl/db535eH/brge9MjrzB72S2Sh6LJ4 0f3rGByUJHUlqISlZDgPpX+BY3wP7JgOWFb5A/ly7cKfLH2JttRRqee4c5AP3HI93GfGtQ JrH9+Kaz27ilKD0744ScJTacaCEU71Q5V2m/nw6xkFVL2/oVRijjE2qWxiUzFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691086476; a=rsa-sha256; cv=none; b=B7/I16fotfz0UGTe479P7y+T3+5nL4OIAIFQv6oKinX54+jD7m/Jell7btMjChRijJorko Tho4JnEBpYTjtx89d4OwYTK7m2sAwYIIQH9sVcbfOlp+wK9As8Ic3bFOoLDcGiBvyiqWXL WvVYUGHXZaWivlZLY8R9XZbTdavRSxwnNKuA+dvOMfrza4DOYNomNalPHhGBYpM0UvzhUG Cc7Lub/pjj2xHFVrCvUgiYEF48kaYwQtw67Bjf++IbQelpFO+VU2AytjiClSTgTNrKu6t0 UZkNT61qeDiNE8VTvwuUn8rnNX3cFIuybEnaKyFSgJxLVlxDtCm0FDXmL5W6qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGxnl5X54zVf8; Thu, 3 Aug 2023 18:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373IEZRW005173; Thu, 3 Aug 2023 18:14:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373IEZpr005172; Thu, 3 Aug 2023 18:14:35 GMT (envelope-from git) Date: Thu, 3 Aug 2023 18:14:35 GMT Message-Id: <202308031814.373IEZpr005172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: f12952eaeeba - main - arm64: Comment out some ID registers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f12952eaeeba706725d888a46ff24baa2ac420d7 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f12952eaeeba706725d888a46ff24baa2ac420d7 commit f12952eaeeba706725d888a46ff24baa2ac420d7 Author: Andrew Turner AuthorDate: 2023-08-03 18:02:25 +0000 Commit: Andrew Turner CommitDate: 2023-08-03 18:13:17 +0000 arm64: Comment out some ID registers Older toolchains don't support reading these registers. Until a fix is added comment them out. Reported by: jhb Sponsored by: Arm Ltd --- sys/arm64/arm64/identcpu.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 2347d27c69e1..4beb34b04381 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -139,11 +139,15 @@ struct cpu_desc { uint64_t id_aa64mmfr0; uint64_t id_aa64mmfr1; uint64_t id_aa64mmfr2; +#ifdef NOTYET uint64_t id_aa64mmfr3; uint64_t id_aa64mmfr4; +#endif uint64_t id_aa64pfr0; uint64_t id_aa64pfr1; +#ifdef NOTYET uint64_t id_aa64pfr2; +#endif uint64_t id_aa64zfr0; uint64_t ctr; #ifdef COMPAT_FREEBSD32 @@ -1268,6 +1272,7 @@ static const struct mrs_field id_aa64mmfr2_fields[] = { }; +#ifdef NOTYET /* ID_AA64MMFR2_EL1 */ static const struct mrs_field_value id_aa64mmfr3_spec_fpacc[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR3, Spec_FPACC, NONE, IMPL), @@ -1303,6 +1308,7 @@ static const struct mrs_field id_aa64mmfr3_fields[] = { static const struct mrs_field id_aa64mmfr4_fields[] = { MRS_FIELD_END, }; +#endif /* ID_AA64PFR0_EL1 */ @@ -1543,10 +1549,12 @@ static const struct mrs_field id_aa64pfr1_fields[] = { }; +#ifdef NOTYET /* ID_AA64PFR2_EL1 */ static const struct mrs_field id_aa64pfr2_fields[] = { MRS_FIELD_END, }; +#endif /* ID_AA64ZFR0_EL1 */ @@ -1846,12 +1854,16 @@ static const struct mrs_user_reg user_regs[] = { USER_REG(ID_AA64MMFR0_EL1, id_aa64mmfr0), USER_REG(ID_AA64MMFR1_EL1, id_aa64mmfr1), USER_REG(ID_AA64MMFR2_EL1, id_aa64mmfr2), +#ifdef NOTYET USER_REG(ID_AA64MMFR3_EL1, id_aa64mmfr3), USER_REG(ID_AA64MMFR4_EL1, id_aa64mmfr4), +#endif USER_REG(ID_AA64PFR0_EL1, id_aa64pfr0), USER_REG(ID_AA64PFR1_EL1, id_aa64pfr1), +#ifdef NOTYET USER_REG(ID_AA64PFR2_EL1, id_aa64pfr2), +#endif USER_REG(ID_AA64ZFR0_EL1, id_aa64zfr0), @@ -2560,10 +2572,12 @@ print_cpu_features(u_int cpu, struct cpu_desc *desc, print_id_register(sb, "Processor Features 1", desc->id_aa64pfr1, id_aa64pfr1_fields); +#ifdef NOTYET /* AArch64 Processor Feature Register 2 */ if (SHOULD_PRINT_REG(id_aa64pfr2)) print_id_register(sb, "Processor Features 2", desc->id_aa64pfr2, id_aa64pfr2_fields); +#endif /* AArch64 Memory Model Feature Register 0 */ if (SHOULD_PRINT_REG(id_aa64mmfr0)) @@ -2580,6 +2594,7 @@ print_cpu_features(u_int cpu, struct cpu_desc *desc, print_id_register(sb, "Memory Model Features 2", desc->id_aa64mmfr2, id_aa64mmfr2_fields); +#ifdef NOTYET /* AArch64 Memory Model Feature Register 3 */ if (SHOULD_PRINT_REG(id_aa64mmfr3)) print_id_register(sb, "Memory Model Features 3", @@ -2589,6 +2604,7 @@ print_cpu_features(u_int cpu, struct cpu_desc *desc, if (SHOULD_PRINT_REG(id_aa64mmfr4)) print_id_register(sb, "Memory Model Features 4", desc->id_aa64mmfr4, id_aa64mmfr4_fields); +#endif /* AArch64 Debug Feature Register 0 */ if (SHOULD_PRINT_REG(id_aa64dfr0)) @@ -2704,11 +2720,15 @@ identify_cpu(u_int cpu) desc->id_aa64mmfr0 = READ_SPECIALREG(id_aa64mmfr0_el1); desc->id_aa64mmfr1 = READ_SPECIALREG(id_aa64mmfr1_el1); desc->id_aa64mmfr2 = READ_SPECIALREG(id_aa64mmfr2_el1); +#ifdef NOTYET desc->id_aa64mmfr3 = READ_SPECIALREG(id_aa64mmfr3_el1); desc->id_aa64mmfr4 = READ_SPECIALREG(id_aa64mmfr4_el1); +#endif desc->id_aa64pfr0 = READ_SPECIALREG(id_aa64pfr0_el1); desc->id_aa64pfr1 = READ_SPECIALREG(id_aa64pfr1_el1); +#ifdef NOTYET desc->id_aa64pfr2 = READ_SPECIALREG(id_aa64pfr2_el1); +#endif /* * ID_AA64ZFR0_EL1 is only valid when at least one of: From nobody Thu Aug 3 19:50:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGzw33khTz4TtF0; Thu, 3 Aug 2023 19:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGzw336V5z3Bns; Thu, 3 Aug 2023 19:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691092211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ej1uY4cuXa+i2AA39svobvD1b6cEbhO8p/LiLjKFYfE=; b=PAEgJfIqlv5QAdvCQ4gKnUFN/nWMsNG72E8CaRaJNOywxrNev4GhdhIsH6ZKF6KXBA7ymF 3Wc2kuVf+cB/cUmGGtUvDXWPuO+sZuwk7L1Zdc/pdbL7Hw9SXhGJcrFRzVrH4ooyisfZ/w wTtFTEDUsE4NIUs15J3tovXGV5Ms+uU0XqaTNSihfJ8+6IWQm2S5luOtaTTe/mD7k8Sius i0dIJttXZ/rS047WfxY1Cv+WJDGdP+qGN+YIcxlhvfWN4bpdB2e+gmm9QkG+nq1KsRMlIR 3xV9Tor4SjcSglSNasanV7oJdkyIPsLoWQFeLFaCPldJ3VZ3gdY0xRVNONgxNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691092211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ej1uY4cuXa+i2AA39svobvD1b6cEbhO8p/LiLjKFYfE=; b=hKs+GJK9EdeEou9eRY3xY+b9ZQRoC2cY1E3Y9KV9N9Cjw+8mjwGCY9naOxfk+vh030OV7R YQWTureuHAqDNpSStj9XsU8mRlqJbqKaLFq4avHMwo8fumtrIcm8Nsd93XHWTsdzunqixP ITIjUPfx68C0/JU5Sj+oLyHTQC/spNCIUVoGjA6ar59HnHcAHSJm8n0TBL6E4nnlhzMuB7 8N42Y97CXc9FUvd0hdGMIZs+psj9RSzR4oLL+1xoCYDfeVtQhTOiQbub9VyzOft20ZWqSp X7BwQojk5vYXcjbp/kjKZCx/9t6cnkNbdJ3rb61ZjGRHH5RlAuJf0UZ1U490cA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691092211; a=rsa-sha256; cv=none; b=LV5nwAr3lTxYrNww99hLfY/zuWHGPZdO6dPRwcExkeKHQOKnCEu7CHbWpBWf09GWOw2a1J Xzl7rhv7evYufoWI9mg/owevjJI79Auxanjwu6lxYxS4/4nCnMFstkGmw4rkn7UaXMf995 Z9Nc9DKwwgNxh+WiFz72TWNxxDhSMGktcWCGOyYcEkulJa4AvCVj/zLsWNJbFd2CL9dzcM FlyYDr4PfQDfM7UlDvn5W6d4VAcssDYeFEnTiF6Iq4beDOkLn96Zk9vXIMzLH68o2BHhhI g7ievAeRbHlSJJqTnre1t1qninzJSf6uEi5+Rljvc3nu/MA4OB8cHIITI0HSlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGzw32BhvzYw5; Thu, 3 Aug 2023 19:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373JoBFB058791; Thu, 3 Aug 2023 19:50:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373JoBpb058788; Thu, 3 Aug 2023 19:50:11 GMT (envelope-from git) Date: Thu, 3 Aug 2023 19:50:11 GMT Message-Id: <202308031950.373JoBpb058788@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 7bcdbacf8437 - main - em(4): add link to lem(4) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bcdbacf8437ea710f2e7526f225ffa36e504d29 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=7bcdbacf8437ea710f2e7526f225ffa36e504d29 commit 7bcdbacf8437ea710f2e7526f225ffa36e504d29 Author: Kevin Bowling AuthorDate: 2023-08-03 19:49:12 +0000 Commit: Kevin Bowling CommitDate: 2023-08-03 19:49:12 +0000 em(4): add link to lem(4) --- share/man/man4/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 6abe9375e606..047f3b1aeba7 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -662,7 +662,9 @@ MLINKS+=disc.4 if_disc.4 MLINKS+=edsc.4 if_edsc.4 MLINKS+=em.4 if_em.4 \ em.4 igb.4 \ - em.4 if_igb.4 + em.4 if_igb.4 \ + em.4 lem.4 \ + em.4 if_lem.4 MLINKS+=enc.4 if_enc.4 MLINKS+=epair.4 if_epair.4 MLINKS+=et.4 if_et.4 From nobody Thu Aug 3 19:50:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGzw44Nf7z4TtK0; Thu, 3 Aug 2023 19:50:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGzw43vzqz3C1w; Thu, 3 Aug 2023 19:50:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691092212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MkooKx3YSVmC7/+u/HfZ1xuPu4fBqG54ZSOOmnIXAgs=; b=FE75bz7Kt3Z2eljZEGHNPeYI8sGySn2h6gANyRB+8jn7jx+Wyweb5qRmnK0S6xbRXSspO7 x/6GZF4GEuqWRZaepiLzJuAyfe1Dk7LF3V26KpLuQjpNpss/pI1Hr1fbVKUZ2KypHAptEM 5tEBZMZQKbKp6Mdv0UJE+I9b7LzCtoU+7+SpPt0usBFCif4S0r10f5koaYpzWBJWm7/aOV cIvjsaxt3sLXN9yBWmZSfEpnfXxGqD92mGC5zH2cwWtZXIuBFBkhptKHr54cOMxkqhBiAu rZa4HmsFhJyq88p99RfUHUcM6XYaSC+cWXjtlU5Hww1sCyAZIYge6TyUL+ms/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691092212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MkooKx3YSVmC7/+u/HfZ1xuPu4fBqG54ZSOOmnIXAgs=; b=PUI+avWxMWcowxigMFwpM0U4FXXgMM367S/uJ3pgzZJItEBkMIp7w5MFcuaWJCw52RPQt+ OZc1LYB03xp7uEC3XQxE3pzTT/SrymVHD/DEPNOLh3bM8J54yOppiGzywrgdCF6m7d+dLy opRsJXF3pjb2rxufCMYIxDID0mZt7uWyqMNFZMjl0Pu15fyiymtPVSfXdonUI2PJ+sFzfC 5AtXnkY1eFizJ7KCyodTr2e5vB6AXK2lLY/Ok+wz9FDq9h7HlLFFtlKO1P8PNwTpw/Aa88 VjIU5qKY9X3ebPXN4fAPUzceehnZkFm3Y8PRGSVqeIrjU+3p7mHOw8HQXaEGKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691092212; a=rsa-sha256; cv=none; b=ADAdsHRyyzx3FBySvVxIT1o2afr/Zx+PYNt8YjWtUA+6YFj4axR2CQP0hJpA6mCNR+Q+Ib g3FcIP+ZnnVnn8/Q38uXyYcukkGZx12FvZvHqyVfw9PIcCgv7WnK1la8++O3hPCy/wc9+Q nXYGYq2dV2bL119ueEmMhy7e2W/wC/YSW2+lLk+QUu628SfbJE/TgvuhnyZ3ltogGxau4c EJjhTzDToa9WZYhXhTMqYxmaSgXtaWAL54RfLNcNdwhiNpu4fSvTS4bQ/kQyGpeASgUJG5 uPleJpAUmol2z9fHSkGzx8apUO3Y+pQy+zNT4+NDaWXiX4DdZVwqkleRJIX/iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGzw42wSgzZ1S; Thu, 3 Aug 2023 19:50:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373JoCds059401; Thu, 3 Aug 2023 19:50:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373JoCka059398; Thu, 3 Aug 2023 19:50:12 GMT (envelope-from git) Date: Thu, 3 Aug 2023 19:50:12 GMT Message-Id: <202308031950.373JoCka059398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 42ce724d8021 - main - em(4): Update and expand on hardware support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42ce724d8021132b5ebcf8cc944f14e19c1c439f Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=42ce724d8021132b5ebcf8cc944f14e19c1c439f commit 42ce724d8021132b5ebcf8cc944f14e19c1c439f Author: Kevin Bowling AuthorDate: 2023-08-03 19:49:42 +0000 Commit: Kevin Bowling CommitDate: 2023-08-03 19:49:42 +0000 em(4): Update and expand on hardware support --- share/man/man4/em.4 | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/share/man/man4/em.4 b/share/man/man4/em.4 index c4395a89699b..f81703f1a727 100644 --- a/share/man/man4/em.4 +++ b/share/man/man4/em.4 @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2023 +.Dd August 3, 2023 .Dt EM 4 .Os .Sh NAME @@ -55,21 +55,36 @@ if_em_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for PCI Gigabit Ethernet adapters based on +driver provides support for PCI/PCI-X Gigabit Ethernet adapters based on the Intel 82540, 82541ER, 82541PI, 82542, 82543, 82544, 82545, 82546, -82546EB, 82546GB, 82547, 82571, 81572, 82573, and 82574 Ethernet +82546EB, 82546GB, 82547 controller chips. +.Pp +The +.Nm +driver provides support for PCI Express Gigabit Ethernet adapters +based on the Intel 82571, 81572, 82573, 82574, and 82583 Ethernet controller chips. .Pp The .Nm -driver also provides support for PCI Express Gigabit Ethernet adapters -based on the Intel 82575, 82576, 82580, i21x and i35x. +driver provides support for Gigabit Ethernet adapters connected to I/O +Controller Hub (ICH), Platform Controller Hub (PCH) and Connectivity +Integrated (CNVi) including Intel 80003ES2LAN, 82562, 82566, 82567, +82577, 82578, 82579, i217, i218, and i219. +.Pp +The +.Nm +driver provides support for PCI Express Gigabit Ethernet adapters +based on the Intel 82575, 82576, 82580, i210, i211, and i35x. These +appear as +.Cm igb +interfaces to maintain compatibility with existing infrastructure. .Pp The driver supports Transmit/Receive checksum offload and Jumbo Frames on all but 82542-based adapters. .Pp Furthermore it supports TCP segmentation offload (TSO) on all adapters but -those based on the 82543, 82544 and 82547 controller chips. +those based on the 82542, 82543, 82544 and 82547 controller chips. The identification LEDs of the adapters supported by the .Nm driver can be controlled via the @@ -307,7 +322,8 @@ The device driver first appeared in .Fx 4.4 . .Nm -was merged with the igb device driver and converted to the iflib framework in +was merged with the lem and igb device driver and converted to the iflib +framework in .Fx 12.0 . .Sh AUTHORS .An -nosplit From nobody Thu Aug 3 19:51:27 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGzxX24VSz4TtSM; Thu, 3 Aug 2023 19:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGzxW5gGnz3ClH; Thu, 3 Aug 2023 19:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691092287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KkrEex0t54ity/5mnyATNCufFaTTtpbHu9gCUDdS550=; b=Uzo/srhryP9YvzWICE7nS/xGEgutoWeZmM6lhJsGenPSheRd510LtF3QQ+z7003h5G8Bm3 xCaXm1ujO30mOTlhBHl6FWhvQdgAs/CA2uBo5Rfx7NbuS8OXR8V00CyM9eFbcdcyH/CePq s1ASvgkcsyXjSENDgKRfmgdiNurbRfjjw7sAHfROeyTyTNA770aWGRJyYCefOjA/0XyaxE lhhiQ5r0ZpRWKm4FFESR2LU4NUpGcAYzgSxpKZVzS3UausD24NqXbeyUsLxJ0INe1+u5q7 QRWcSp1VjK7Y4sU6p9NHmqlfv9dmx1zmfFbXTeuyEEV6G1Y3RJD4oDteDNUOlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691092287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KkrEex0t54ity/5mnyATNCufFaTTtpbHu9gCUDdS550=; b=wkf3nxnQSYnHE5e5M2Or8t2jPpdo7QCLIISJRl8dj/Vp33tg5H6Qw6szU7vM1IRfyiyr8V H16sVLzR3zw00TgJ9Xos4mWTpDqnNduyDqIioyMvwABQukXWkywv2/Sp2olQOMmJj1cU+y +bTU6MFFo5P7RSEvScR5EPUh8EMLqf8N2By5NJ8llyj9aLnxkySTrEeU9uFPjeVEbw3gsS AWZexSRNfheG8oaojZvHvttHSlwmVRILoWy3j9FFr9llWDtdqEHQEPQNBvZtBXpSso0rGP VCCTjtwshY8d8FPSH1hIUaklTXYOpErqIDNvYZvBf8PlfKHEOwaT/ZJEVaQ/UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691092287; a=rsa-sha256; cv=none; b=niEkd1cqPFeu1wKgX60DVGOF0eC4vyI3Vg+kiGs7MZ0JXtcu/YP5voC/CypC1syDHFOPY9 fGvp3CZszJFPf+32r+7aQJAA5x/aglQsFYJJI/yC/Qt1ta34ipThAkx184rMiRZYEGXO7n ccE7Sya8QrFueEmFbPHqSsolFVOpy9PE127tUMdibbJbtz1w6MAV4hiNdzYgnYvbkDde63 /3WEp6gl3h/FV/ELv3xY3R5LCkn/NpzyA9UV2TdY1R1svmCDfNPoy5P8EfY2rZdRS5ij6c nAm6FN2knUjQvQ70mERnHBWDPufueh+AOmmYrlFo7IzkPlbS4vKlbRpZ5CbyHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGzxW4jr9zZBG; Thu, 3 Aug 2023 19:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373JpRjd063729; Thu, 3 Aug 2023 19:51:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373JpRAP063728; Thu, 3 Aug 2023 19:51:27 GMT (envelope-from git) Date: Thu, 3 Aug 2023 19:51:27 GMT Message-Id: <202308031951.373JpRAP063728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 56b9145cd00f - main - em(4): correct a typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56b9145cd00f183e8526015030e2c2d75abcc12f Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=56b9145cd00f183e8526015030e2c2d75abcc12f commit 56b9145cd00f183e8526015030e2c2d75abcc12f Author: Kevin Bowling AuthorDate: 2023-08-03 19:51:12 +0000 Commit: Kevin Bowling CommitDate: 2023-08-03 19:51:12 +0000 em(4): correct a typo --- share/man/man4/em.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/em.4 b/share/man/man4/em.4 index f81703f1a727..ebf04b4d8941 100644 --- a/share/man/man4/em.4 +++ b/share/man/man4/em.4 @@ -62,7 +62,7 @@ the Intel 82540, 82541ER, 82541PI, 82542, 82543, 82544, 82545, 82546, The .Nm driver provides support for PCI Express Gigabit Ethernet adapters -based on the Intel 82571, 81572, 82573, 82574, and 82583 Ethernet +based on the Intel 82571, 82572, 82573, 82574, and 82583 Ethernet controller chips. .Pp The From nobody Thu Aug 3 19:52:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGzyr1vhcz4TtYg; Thu, 3 Aug 2023 19:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGzyr1Qpzz3D4q; Thu, 3 Aug 2023 19:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691092356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R2qIUEv9NSWFJjnWc03nUrUghT/kchA4dQOgNOzzZKs=; b=Rr7q2p/dcUuBBnIr5W4AZThmckVq5jXHokIvU3SjpxOTgUUrlNL3M8UiL0Xlwjc4OLu38w ILXB89gP2NqHRhReGWAtaIab/B8DfxEhlc8js36wdYj9xar1p4bgIjL8fDlwalwAXuGYhY pgMWtWBFcK/bnSKiOvoA3utvO3O24R7OBjd6le2uAfJu20vlgstoesT/FUj06GHmamQD2k dpexvydNm25lAk4989pZVl0rzTY5/DsTN/vwxlmivS/Yku2niQy9c7kGHyaTPKb8cwvL09 bnCkkLMX6rSO+OrwdVwy2xQWZ6cxAGwC/5VaDUeUWVX1s50lf6C62xZkVGPKLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691092356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R2qIUEv9NSWFJjnWc03nUrUghT/kchA4dQOgNOzzZKs=; b=Fe6WGNlx8BgcG294uQioqQ4yuvb5hA0L9RW8VoS9+VjvWtF8uvkYwTDHEUntNiWENMCyKu zgPMClbEOnA9uI5752SlOcAasGjkkVEiObsF8PHQ7XiHee/8g25HWnAkJoOn/57H9LGvDB CjpJPaOIoLaqvj8TAGeP7kIPaUARlhZK90RSV5kbJdsXrJ69a6wKff85am9cs7uXhk7k6N 38ga5guVUq7IqlZ7a/v42PoJemHbI4xaFkJkNqnpV3NWEFQLx1+KreN1RqbIJ3dZiIu32T hlkLlp2VFUrIvgLx2D59gdawrVvUm/zsh1Gsf5G+6KsIvnmPSynaRvrPENX72w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691092356; a=rsa-sha256; cv=none; b=ZC8yISmgHzHOZhB+wotb+pi8G04MEV3nDHHfLcpwuGfHO1bL/sETSKiKLpDiI5sRf38Wmt l1kpwELPG798zTEVoWmz5eUXCTrU3nWP93AXNcQ/WkF2UaD7m8a0RuvqBP5dOt4uFa9rPa W4l8GMbmtT+zwqW84opOD5i2hkFdCPC3qKjFf5D+jT0QlSHoO8c/h8dKngzB9nKWFErhEt RmqdNTpkoQvuzYiAV38/+iJ/zBDNdnj909wP2Fd/Q6oBK2LZ7ctIJsOJmV5YSky2vLfb+p vgXOQCvTtQYvxas+F1e6kqJykg/wVr+BspVuO7W8R8SKLSm3qy7m7jC9bbNBJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGzyr0Tj6zZBT; Thu, 3 Aug 2023 19:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373Jqadm070173; Thu, 3 Aug 2023 19:52:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373JqZEd070172; Thu, 3 Aug 2023 19:52:35 GMT (envelope-from git) Date: Thu, 3 Aug 2023 19:52:35 GMT Message-Id: <202308031952.373JqZEd070172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 99843eb89954 - main - Clean up libm use of the __ieee754_ prefix List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99843eb89954dac76afe7cf18d962eddfe7a7987 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=99843eb89954dac76afe7cf18d962eddfe7a7987 commit 99843eb89954dac76afe7cf18d962eddfe7a7987 Author: Steve Kargl AuthorDate: 2023-08-03 19:51:17 +0000 Commit: Dimitry Andric CommitDate: 2023-08-03 19:51:53 +0000 Clean up libm use of the __ieee754_ prefix This removes the __ieee754_ prefix from a number of the math functions. msun/src/math_private.h contains the statement that /* * ieee style elementary functions * * We rename functions here to improve other sources' diffability * against fdlibm. */ #define __ieee754_sqrt sqrt ... Here, fdlibm refers to https://netlib.org/fdlibm. It is seen from https://netlib.org/fdlibm/readme that this prefix was used to differentiate between different standards: Wrapper functions will twist the result of the ieee754 function to comply to the standard specified by the value of _LIB_VERSION if _LIB_VERSION = _IEEE_, return the ieee754 result; if _LIB_VERSION = _SVID_, return SVID result; if _LIB_VERSION = _XOPEN_, return XOPEN result; if _LIB_VERSION = _POSIX_, return POSIX/ANSI result. (These are macros, see fdlibm.h for their definition.) AFAICT, FreeBSD has never supported these wrappers. In addition, as C99, principally the long double, functions were added to libm, this convention was not maintained. Given that only 148 of 324 files under lib/msun contain a "Copyright (C) 1993 by Sun Microsystems" statement, the removal of the __ieee754_ prefix provides consistency across all source files. The last time someone compared lib/msun to fdlibm appears to be commit 3f70824172feb82ea3dcdb3866b54fe0eb7cd890 Author: David Schultz Date: Fri Feb 4 18:26:06 2005 +0000 Reduce diffs against vendor source (Sun fdlibm 5.3). The most recent fdlibm RCS string that appears in a Sun Microsystem copyrighted file is date "95/01/18". With Oracle Corporation's acquisition of Sun Microsystems in 2009, it is unlikely that fdlibm will ever be updated. A search for fdlibm at https://opensource.oracle.com/ yields no hits. Finally, OpenBSD removed the use of this prefix over 21 years ago. pSee revision 1.6 of OpenBSD's math_private.h. Note: this does not drop the __ieee754_ prefix from the trigonometric argument reduction functions, e.g., __ieee754_rem_pio2. These functions are internal to the libm and exported through Symbol.map; and thus, reserved for the implementation. PR: 272783 MFC after: 1 week --- lib/msun/src/e_acos.c | 4 +-- lib/msun/src/e_acosf.c | 2 +- lib/msun/src/e_acosh.c | 8 +++--- lib/msun/src/e_acoshf.c | 8 +++--- lib/msun/src/e_asin.c | 4 +-- lib/msun/src/e_asinf.c | 2 +- lib/msun/src/e_atan2.c | 4 +-- lib/msun/src/e_atan2f.c | 2 +- lib/msun/src/e_atanh.c | 4 +-- lib/msun/src/e_atanhf.c | 2 +- lib/msun/src/e_cosh.c | 8 +++--- lib/msun/src/e_coshf.c | 6 ++--- lib/msun/src/e_exp.c | 4 +-- lib/msun/src/e_expf.c | 2 +- lib/msun/src/e_fmod.c | 4 +-- lib/msun/src/e_fmodf.c | 4 +-- lib/msun/src/e_gamma.c | 8 +++--- lib/msun/src/e_gamma_r.c | 8 +++--- lib/msun/src/e_gammaf.c | 8 +++--- lib/msun/src/e_gammaf_r.c | 8 +++--- lib/msun/src/e_hypot.c | 4 +-- lib/msun/src/e_hypotf.c | 6 ++--- lib/msun/src/e_j0.c | 10 +++---- lib/msun/src/e_j0f.c | 8 +++--- lib/msun/src/e_j1.c | 8 +++--- lib/msun/src/e_j1f.c | 6 ++--- lib/msun/src/e_jn.c | 28 ++++++++++---------- lib/msun/src/e_jnf.c | 26 +++++++++--------- lib/msun/src/e_lgamma.c | 8 +++--- lib/msun/src/e_lgamma_r.c | 16 ++++++------ lib/msun/src/e_lgammaf.c | 8 +++--- lib/msun/src/e_lgammaf_r.c | 14 +++++----- lib/msun/src/e_log.c | 4 +-- lib/msun/src/e_log10.c | 2 +- lib/msun/src/e_log10f.c | 2 +- lib/msun/src/e_log2.c | 2 +- lib/msun/src/e_log2f.c | 2 +- lib/msun/src/e_logf.c | 2 +- lib/msun/src/e_pow.c | 4 +-- lib/msun/src/e_powf.c | 4 +-- lib/msun/src/e_remainder.c | 6 ++--- lib/msun/src/e_remainderf.c | 4 +-- lib/msun/src/e_scalb.c | 6 ++--- lib/msun/src/e_scalbf.c | 4 +-- lib/msun/src/e_sinh.c | 6 ++--- lib/msun/src/e_sinhf.c | 4 +-- lib/msun/src/e_sqrt.c | 6 ++--- lib/msun/src/e_sqrtf.c | 4 +-- lib/msun/src/math_private.h | 61 ------------------------------------------- lib/msun/src/s_asinh.c | 6 ++--- lib/msun/src/s_asinhf.c | 6 ++--- lib/msun/src/s_erf.c | 4 +-- lib/msun/src/s_significand.c | 2 +- lib/msun/src/s_significandf.c | 2 +- 54 files changed, 162 insertions(+), 223 deletions(-) diff --git a/lib/msun/src/e_acos.c b/lib/msun/src/e_acos.c index 1f6dca5bb5cb..6623355baa7c 100644 --- a/lib/msun/src/e_acos.c +++ b/lib/msun/src/e_acos.c @@ -14,7 +14,7 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_acos(x) +/* acos(x) * Method : * acos(x) = pi/2 - asin(x) * acos(-x) = pi/2 + asin(x) @@ -62,7 +62,7 @@ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ double -__ieee754_acos(double x) +acos(double x) { double z,p,q,r,w,s,c,df; int32_t hx,ix; diff --git a/lib/msun/src/e_acosf.c b/lib/msun/src/e_acosf.c index c9f62cc40f5c..64f1c5afb182 100644 --- a/lib/msun/src/e_acosf.c +++ b/lib/msun/src/e_acosf.c @@ -32,7 +32,7 @@ pS2 = -8.6563630030e-03, qS1 = -7.0662963390e-01; float -__ieee754_acosf(float x) +acosf(float x) { float z,p,q,r,w,s,c,df; int32_t hx,ix; diff --git a/lib/msun/src/e_acosh.c b/lib/msun/src/e_acosh.c index 358c8bd6a636..7947995820d0 100644 --- a/lib/msun/src/e_acosh.c +++ b/lib/msun/src/e_acosh.c @@ -15,7 +15,7 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_acosh(x) +/* acosh(x) * Method : * Based on * acosh(x) = log [ x + sqrt(x*x-1) ] @@ -39,7 +39,7 @@ one = 1.0, ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */ double -__ieee754_acosh(double x) +acosh(double x) { double t; int32_t hx; @@ -51,12 +51,12 @@ __ieee754_acosh(double x) if(hx >=0x7ff00000) { /* x is inf of NaN */ return x+x; } else - return __ieee754_log(x)+ln2; /* acosh(huge)=log(2x) */ + return log(x)+ln2; /* acosh(huge)=log(2x) */ } else if(((hx-0x3ff00000)|lx)==0) { return 0.0; /* acosh(1) = 0 */ } else if (hx > 0x40000000) { /* 2**28 > x > 2 */ t=x*x; - return __ieee754_log(2.0*x-one/(x+sqrt(t-one))); + return log(2.0*x-one/(x+sqrt(t-one))); } else { /* 1=0x7f800000) { /* x is inf of NaN */ return x+x; } else - return __ieee754_logf(x)+ln2; /* acosh(huge)=log(2x) */ + return logf(x)+ln2; /* acosh(huge)=log(2x) */ } else if (hx==0x3f800000) { return 0.0; /* acosh(1) = 0 */ } else if (hx > 0x40000000) { /* 2**28 > x > 2 */ t=x*x; - return __ieee754_logf((float)2.0*x-one/(x+__ieee754_sqrtf(t-one))); + return logf((float)2.0*x-one/(x+sqrtf(t-one))); } else { /* 1 __FBSDID("$FreeBSD$"); -/* __ieee754_asin(x) +/* asin(x) * Method : * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ... * we approximate asin(x) on [0,0.5] by @@ -68,7 +68,7 @@ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ double -__ieee754_asin(double x) +asin(double x) { double t=0.0,w,p,q,c,r,s; int32_t hx,ix; diff --git a/lib/msun/src/e_asinf.c b/lib/msun/src/e_asinf.c index deaabb6a326e..db4b9b6034f7 100644 --- a/lib/msun/src/e_asinf.c +++ b/lib/msun/src/e_asinf.c @@ -32,7 +32,7 @@ static const double pio2 = 1.570796326794896558e+00; float -__ieee754_asinf(float x) +asinf(float x) { double s; float t,w,p,q; diff --git a/lib/msun/src/e_atan2.c b/lib/msun/src/e_atan2.c index 231a1611ee12..0b2e72102edb 100644 --- a/lib/msun/src/e_atan2.c +++ b/lib/msun/src/e_atan2.c @@ -15,7 +15,7 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_atan2(y,x) +/* atan2(y,x) * Method : * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x). * 2. Reduce x to positive by (if x and y are unexceptional): @@ -58,7 +58,7 @@ static volatile double pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ double -__ieee754_atan2(double y, double x) +atan2(double y, double x) { double z; int32_t k,m,hx,hy,ix,iy; diff --git a/lib/msun/src/e_atan2f.c b/lib/msun/src/e_atan2f.c index 346d76746c05..4ea001df974a 100644 --- a/lib/msun/src/e_atan2f.c +++ b/lib/msun/src/e_atan2f.c @@ -30,7 +30,7 @@ static volatile float pi_lo = -8.7422776573e-08; /* 0xb3bbbd2e */ float -__ieee754_atan2f(float y, float x) +atan2f(float y, float x) { float z; int32_t k,m,hx,hy,ix,iy; diff --git a/lib/msun/src/e_atanh.c b/lib/msun/src/e_atanh.c index 422ff2698067..41f3bcaca26d 100644 --- a/lib/msun/src/e_atanh.c +++ b/lib/msun/src/e_atanh.c @@ -15,7 +15,7 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_atanh(x) +/* atanh(x) * Method : * 1.Reduced x to positive by atanh(-x) = -atanh(x) * 2.For x>=0.5 @@ -42,7 +42,7 @@ static const double one = 1.0, huge = 1e300; static const double zero = 0.0; double -__ieee754_atanh(double x) +atanh(double x) { double t; int32_t hx,ix; diff --git a/lib/msun/src/e_atanhf.c b/lib/msun/src/e_atanhf.c index 4bd6a8f9b9c6..46643beb5ab0 100644 --- a/lib/msun/src/e_atanhf.c +++ b/lib/msun/src/e_atanhf.c @@ -24,7 +24,7 @@ static const float one = 1.0, huge = 1e30; static const float zero = 0.0; float -__ieee754_atanhf(float x) +atanhf(float x) { float t; int32_t hx,ix; diff --git a/lib/msun/src/e_cosh.c b/lib/msun/src/e_cosh.c index 246b5fbec860..071663eb4e15 100644 --- a/lib/msun/src/e_cosh.c +++ b/lib/msun/src/e_cosh.c @@ -14,7 +14,7 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_cosh(x) +/* cosh(x) * Method : * mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2 * 1. Replace x by |x| (cosh(x) = cosh(-x)). @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); static const double one = 1.0, half=0.5, huge = 1.0e300; double -__ieee754_cosh(double x) +cosh(double x) { double t,w; int32_t ix; @@ -65,12 +65,12 @@ __ieee754_cosh(double x) /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */ if (ix < 0x40360000) { - t = __ieee754_exp(fabs(x)); + t = exp(fabs(x)); return half*t+half/t; } /* |x| in [22, log(maxdouble)] return half*exp(|x|) */ - if (ix < 0x40862E42) return half*__ieee754_exp(fabs(x)); + if (ix < 0x40862E42) return half*exp(fabs(x)); /* |x| in [log(maxdouble), overflowthresold] */ if (ix<=0x408633CE) diff --git a/lib/msun/src/e_coshf.c b/lib/msun/src/e_coshf.c index 95a0d6ee68ba..1673315d7b31 100644 --- a/lib/msun/src/e_coshf.c +++ b/lib/msun/src/e_coshf.c @@ -22,7 +22,7 @@ __FBSDID("$FreeBSD$"); static const float one = 1.0, half=0.5, huge = 1.0e30; float -__ieee754_coshf(float x) +coshf(float x) { float t,w; int32_t ix; @@ -43,12 +43,12 @@ __ieee754_coshf(float x) /* |x| in [0.5*ln2,9], return (exp(|x|)+1/exp(|x|))/2; */ if (ix < 0x41100000) { - t = __ieee754_expf(fabsf(x)); + t = expf(fabsf(x)); return half*t+half/t; } /* |x| in [9, log(maxfloat)] return half*exp(|x|) */ - if (ix < 0x42b17217) return half*__ieee754_expf(fabsf(x)); + if (ix < 0x42b17217) return half*expf(fabsf(x)); /* |x| in [log(maxfloat), overflowthresold] */ if (ix<=0x42b2d4fc) diff --git a/lib/msun/src/e_exp.c b/lib/msun/src/e_exp.c index dd04d8e839d5..59da39217391 100644 --- a/lib/msun/src/e_exp.c +++ b/lib/msun/src/e_exp.c @@ -13,7 +13,7 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_exp(x) +/* exp(x) * Returns the exponential of x. * * Method @@ -102,7 +102,7 @@ huge = 1.0e+300, twom1000= 9.33263618503218878990e-302; /* 2**-1000=0x01700000,0*/ double -__ieee754_exp(double x) /* default IEEE double exp */ +exp(double x) /* default IEEE double exp */ { double y,hi=0.0,lo=0.0,c,t,twopk; int32_t k=0,xsb; diff --git a/lib/msun/src/e_expf.c b/lib/msun/src/e_expf.c index 4903d55c5ab3..620d341be274 100644 --- a/lib/msun/src/e_expf.c +++ b/lib/msun/src/e_expf.c @@ -43,7 +43,7 @@ huge = 1.0e+30, twom100 = 7.8886090522e-31; /* 2**-100=0x0d800000 */ float -__ieee754_expf(float x) +expf(float x) { float y,hi=0.0,lo=0.0,c,t,twopk; int32_t k=0,xsb; diff --git a/lib/msun/src/e_fmod.c b/lib/msun/src/e_fmod.c index 3a28dc4ff1f3..6d5f5332cb85 100644 --- a/lib/msun/src/e_fmod.c +++ b/lib/msun/src/e_fmod.c @@ -15,7 +15,7 @@ __FBSDID("$FreeBSD$"); /* - * __ieee754_fmod(x,y) + * fmod(x,y) * Return x mod y in exact arithmetic * Method: shift and subtract */ @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); static const double one = 1.0, Zero[] = {0.0, -0.0,}; double -__ieee754_fmod(double x, double y) +fmod(double x, double y) { int32_t n,hx,hy,hz,ix,iy,sx,i; u_int32_t lx,ly,lz; diff --git a/lib/msun/src/e_fmodf.c b/lib/msun/src/e_fmodf.c index 1b6bf36f9cba..3cef9213c1e5 100644 --- a/lib/msun/src/e_fmodf.c +++ b/lib/msun/src/e_fmodf.c @@ -17,7 +17,7 @@ __FBSDID("$FreeBSD$"); /* - * __ieee754_fmodf(x,y) + * fmodf(x,y) * Return x mod y in exact arithmetic * Method: shift and subtract */ @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); static const float one = 1.0, Zero[] = {0.0, -0.0,}; float -__ieee754_fmodf(float x, float y) +fmodf(float x, float y) { int32_t n,hx,hy,hz,ix,iy,sx,i; diff --git a/lib/msun/src/e_gamma.c b/lib/msun/src/e_gamma.c index 28fb5ccba6d6..a13f3e22c08b 100644 --- a/lib/msun/src/e_gamma.c +++ b/lib/msun/src/e_gamma.c @@ -15,10 +15,10 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_gamma(x) +/* gamma(x) * Return the logarithm of the Gamma function of x. * - * Method: call __ieee754_gamma_r + * Method: call gamma_r */ #include "math.h" @@ -27,7 +27,7 @@ __FBSDID("$FreeBSD$"); extern int signgam; double -__ieee754_gamma(double x) +gamma(double x) { - return __ieee754_gamma_r(x,&signgam); + return gamma_r(x,&signgam); } diff --git a/lib/msun/src/e_gamma_r.c b/lib/msun/src/e_gamma_r.c index 2c423dce8558..2d996cabca20 100644 --- a/lib/msun/src/e_gamma_r.c +++ b/lib/msun/src/e_gamma_r.c @@ -15,18 +15,18 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_gamma_r(x, signgamp) +/* gamma_r(x, signgamp) * Reentrant version of the logarithm of the Gamma function * with user provide pointer for the sign of Gamma(x). * - * Method: See __ieee754_lgamma_r + * Method: See lgamma_r */ #include "math.h" #include "math_private.h" double -__ieee754_gamma_r(double x, int *signgamp) +gamma_r(double x, int *signgamp) { - return __ieee754_lgamma_r(x,signgamp); + return lgamma_r(x,signgamp); } diff --git a/lib/msun/src/e_gammaf.c b/lib/msun/src/e_gammaf.c index c1b1668df975..563c1482282d 100644 --- a/lib/msun/src/e_gammaf.c +++ b/lib/msun/src/e_gammaf.c @@ -16,10 +16,10 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_gammaf(x) +/* gammaf(x) * Return the logarithm of the Gamma function of x. * - * Method: call __ieee754_gammaf_r + * Method: call gammaf_r */ #include "math.h" @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); extern int signgam; float -__ieee754_gammaf(float x) +gammaf(float x) { - return __ieee754_gammaf_r(x,&signgam); + return gammaf_r(x,&signgam); } diff --git a/lib/msun/src/e_gammaf_r.c b/lib/msun/src/e_gammaf_r.c index 9d7831b5501b..d7fc2db1e96c 100644 --- a/lib/msun/src/e_gammaf_r.c +++ b/lib/msun/src/e_gammaf_r.c @@ -16,18 +16,18 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_gammaf_r(x, signgamp) +/* gammaf_r(x, signgamp) * Reentrant version of the logarithm of the Gamma function * with user provide pointer for the sign of Gamma(x). * - * Method: See __ieee754_lgammaf_r + * Method: See lgammaf_r */ #include "math.h" #include "math_private.h" float -__ieee754_gammaf_r(float x, int *signgamp) +gammaf_r(float x, int *signgamp) { - return __ieee754_lgammaf_r(x,signgamp); + return lgammaf_r(x,signgamp); } diff --git a/lib/msun/src/e_hypot.c b/lib/msun/src/e_hypot.c index 7c455bb6652f..8e3f9317b3a6 100644 --- a/lib/msun/src/e_hypot.c +++ b/lib/msun/src/e_hypot.c @@ -14,7 +14,7 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_hypot(x,y) +/* hypot(x,y) * * Method : * If (assume round-to-nearest) z=x*x+y*y @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" double -__ieee754_hypot(double x, double y) +hypot(double x, double y) { double a,b,t1,t2,y1,y2,w; int32_t j,k,ha,hb; diff --git a/lib/msun/src/e_hypotf.c b/lib/msun/src/e_hypotf.c index 00610268fafb..a3b8c866697b 100644 --- a/lib/msun/src/e_hypotf.c +++ b/lib/msun/src/e_hypotf.c @@ -20,7 +20,7 @@ __FBSDID("$FreeBSD$"); #include "math_private.h" float -__ieee754_hypotf(float x, float y) +hypotf(float x, float y) { float a,b,t1,t2,y1,y2,w; int32_t j,k,ha,hb; @@ -67,14 +67,14 @@ __ieee754_hypotf(float x, float y) if (w>b) { SET_FLOAT_WORD(t1,ha&0xfffff000); t2 = a-t1; - w = __ieee754_sqrtf(t1*t1-(b*(-b)-t2*(a+t1))); + w = sqrtf(t1*t1-(b*(-b)-t2*(a+t1))); } else { a = a+a; SET_FLOAT_WORD(y1,hb&0xfffff000); y2 = b - y1; SET_FLOAT_WORD(t1,(ha+0x00800000)&0xfffff000); t2 = a - t1; - w = __ieee754_sqrtf(t1*y1-(w*(-w)-(t1*y2+t2*b))); + w = sqrtf(t1*y1-(w*(-w)-(t1*y2+t2*b))); } if(k!=0) { SET_FLOAT_WORD(t1,(127+k)<<23); diff --git a/lib/msun/src/e_j0.c b/lib/msun/src/e_j0.c index 5d862b6f834d..c43ab6996b4a 100644 --- a/lib/msun/src/e_j0.c +++ b/lib/msun/src/e_j0.c @@ -13,7 +13,7 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_j0(x), __ieee754_y0(x) +/* j0(x), y0(x) * Bessel function of the first and second kinds of order zero. * Method -- j0(x): * 1. For tiny x, we use j0(x) = 1 - x^2/4 + x^4/64 - ... @@ -83,7 +83,7 @@ S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */ static const double zero = 0, qrtr = 0.25; double -__ieee754_j0(double x) +j0(double x) { double z, s,c,ss,cc,r,u,v; int32_t hx,ix; @@ -143,7 +143,7 @@ v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */ v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */ double -__ieee754_y0(double x) +y0(double x) { double z, s,c,ss,cc,u,v; int32_t hx,ix,lx; @@ -192,12 +192,12 @@ __ieee754_y0(double x) return z; } if(ix<=0x3e400000) { /* x < 2**-27 */ - return(u00 + tpi*__ieee754_log(x)); + return(u00 + tpi*log(x)); } z = x*x; u = u00+z*(u01+z*(u02+z*(u03+z*(u04+z*(u05+z*u06))))); v = one+z*(v01+z*(v02+z*(v03+z*v04))); - return(u/v + tpi*(__ieee754_j0(x)*__ieee754_log(x))); + return(u/v + tpi*(j0(x)*log(x))); } /* The asymptotic expansions of pzero is diff --git a/lib/msun/src/e_j0f.c b/lib/msun/src/e_j0f.c index 1c5ef4da1b49..290be04fc900 100644 --- a/lib/msun/src/e_j0f.c +++ b/lib/msun/src/e_j0f.c @@ -45,7 +45,7 @@ S04 = 1.1661400734e-09; /* 0x30a045e8 */ static const float zero = 0, qrtr = 0.25; float -__ieee754_j0f(float x) +j0f(float x) { float z, s,c,ss,cc,r,u,v; int32_t hx,ix; @@ -105,7 +105,7 @@ v03 = 2.5915085189e-07, /* 0x348b216c */ v04 = 4.4111031494e-10; /* 0x2ff280c2 */ float -__ieee754_y0f(float x) +y0f(float x) { float z, s,c,ss,cc,u,v; int32_t hx,ix; @@ -147,12 +147,12 @@ __ieee754_y0f(float x) return z; } if(ix<=0x39000000) { /* x < 2**-13 */ - return(u00 + tpi*__ieee754_logf(x)); + return(u00 + tpi*logf(x)); } z = x*x; u = u00+z*(u01+z*(u02+z*(u03+z*(u04+z*(u05+z*u06))))); v = one+z*(v01+z*(v02+z*(v03+z*v04))); - return(u/v + tpi*(__ieee754_j0f(x)*__ieee754_logf(x))); + return(u/v + tpi*(j0f(x)*logf(x))); } /* The asymptotic expansions of pzero is diff --git a/lib/msun/src/e_j1.c b/lib/msun/src/e_j1.c index fb4462738368..ee3f6fcc69d4 100644 --- a/lib/msun/src/e_j1.c +++ b/lib/msun/src/e_j1.c @@ -13,7 +13,7 @@ #include __FBSDID("$FreeBSD$"); -/* __ieee754_j1(x), __ieee754_y1(x) +/* j1(x), y1(x) * Bessel function of the first and second kinds of order zero. * Method -- j1(x): * 1. For tiny x, we use j1(x) = x/2 - x^3/16 + x^5/384 - ... @@ -84,7 +84,7 @@ s05 = 1.23542274426137913908e-11; /* 0x3DAB2ACF, 0xCFB97ED8 */ static const double zero = 0.0; double -__ieee754_j1(double x) +j1(double x) { double z, s,c,ss,cc,r,u,v,y; int32_t hx,ix; @@ -140,7 +140,7 @@ static const double V0[5] = { }; double -__ieee754_y1(double x) +y1(double x) { double z, s,c,ss,cc,u,v; int32_t hx,ix,lx; @@ -190,7 +190,7 @@ __ieee754_y1(double x) z = x*x; u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4]))); v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4])))); - return(x*(u/v) + tpi*(__ieee754_j1(x)*__ieee754_log(x)-one/x)); + return(x*(u/v) + tpi*(j1(x)*log(x)-one/x)); } /* For x >= 8, the asymptotic expansions of pone is diff --git a/lib/msun/src/e_j1f.c b/lib/msun/src/e_j1f.c index c6c45c107afa..e1f4498b71af 100644 --- a/lib/msun/src/e_j1f.c +++ b/lib/msun/src/e_j1f.c @@ -46,7 +46,7 @@ s05 = 1.2354227016e-11; /* 0x2d59567e */ static const float zero = 0.0; float -__ieee754_j1f(float x) +j1f(float x) { float z, s,c,ss,cc,r,u,v,y; int32_t hx,ix; @@ -102,7 +102,7 @@ static const float V0[5] = { }; float -__ieee754_y1f(float x) +y1f(float x) { float z, s,c,ss,cc,u,v; int32_t hx,ix; @@ -145,7 +145,7 @@ __ieee754_y1f(float x) z = x*x; u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4]))); v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4])))); - return(x*(u/v) + tpi*(__ieee754_j1f(x)*__ieee754_logf(x)-one/x)); + return(x*(u/v) + tpi*(j1f(x)*logf(x)-one/x)); } /* For x >= 8, the asymptotic expansions of pone is diff --git a/lib/msun/src/e_jn.c b/lib/msun/src/e_jn.c index 5aaebd400065..6b876ce69554 100644 --- a/lib/msun/src/e_jn.c +++ b/lib/msun/src/e_jn.c @@ -14,7 +14,7 @@ __FBSDID("$FreeBSD$"); /* - * __ieee754_jn(n, x), __ieee754_yn(n, x) + * jn(n, x), yn(n, x) * floating point Bessel's function of the 1st and 2nd kind * of order n * @@ -51,7 +51,7 @@ one = 1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */ static const double zero = 0.00000000000000000000e+00; double -__ieee754_jn(int n, double x) +jn(int n, double x) { int32_t i,hx,ix,lx, sgn; double a, b, c, s, temp, di; @@ -69,8 +69,8 @@ __ieee754_jn(int n, double x) x = -x; hx ^= 0x80000000; } - if(n==0) return(__ieee754_j0(x)); - if(n==1) return(__ieee754_j1(x)); + if(n==0) return(j0(x)); + if(n==1) return(j1(x)); sgn = (n&1)&(hx>>31); /* even n -- 0, odd n -- sign(x) */ x = fabs(x); if((ix|lx)==0||ix>=0x7ff00000) /* if x is 0 or inf */ @@ -100,8 +100,8 @@ __ieee754_jn(int n, double x) } b = invsqrtpi*temp/sqrt(x); } else { - a = __ieee754_j0(x); - b = __ieee754_j1(x); + a = j0(x); + b = j1(x); for(i=1;i0;i--){ temp = b; @@ -201,8 +201,8 @@ __ieee754_jn(int n, double x) } } } - z = __ieee754_j0(x); - w = __ieee754_j1(x); + z = j0(x); + w = j1(x); if (fabs(z) >= fabs(w)) b = (t*z/b); else @@ -213,7 +213,7 @@ __ieee754_jn(int n, double x) } double -__ieee754_yn(int n, double x) +yn(int n, double x) { int32_t i,hx,ix,lx; int32_t sign; @@ -232,8 +232,8 @@ __ieee754_yn(int n, double x) n = -n; sign = 1 - ((n&1)<<1); } - if(n==0) return(__ieee754_y0(x)); - if(n==1) return(sign*__ieee754_y1(x)); + if(n==0) return(y0(x)); + if(n==1) return(sign*y1(x)); if(ix==0x7ff00000) return zero; if(ix>=0x52D00000) { /* x > 2**302 */ /* (x >> n**2) @@ -259,8 +259,8 @@ __ieee754_yn(int n, double x) b = invsqrtpi*temp/sqrt(x); } else { u_int32_t high; - a = __ieee754_y0(x); - b = __ieee754_y1(x); + a = y0(x); + b = y1(x); /* quit if b is -inf */ GET_HIGH_WORD(high,b); for(i=1;i>31); /* even n -- 0, odd n -- sign(x) */ x = fabsf(x); if(ix==0||ix>=0x7f800000) /* if x is 0 or inf */ b = zero; else if((float)n<=x) { /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */ - a = __ieee754_j0f(x); - b = __ieee754_j1f(x); + a = j0f(x); + b = j1f(x); for(i=1;i0;i--){ temp = b; @@ -158,8 +158,8 @@ __ieee754_jnf(int n, float x) } } } - z = __ieee754_j0f(x); - w = __ieee754_j1f(x); + z = j0f(x); + w = j1f(x); if (fabsf(z) >= fabsf(w)) b = (t*z/b); else @@ -170,7 +170,7 @@ __ieee754_jnf(int n, float x) } float -__ieee754_ynf(int n, float x) +ynf(int n, float x) { int32_t i,hx,ix,ib; int32_t sign; @@ -186,12 +186,12 @@ __ieee754_ynf(int n, float x) n = -n; sign = 1 - ((n&1)<<1); } - if(n==0) return(__ieee754_y0f(x)); - if(n==1) return(sign*__ieee754_y1f(x)); + if(n==0) return(y0f(x)); + if(n==1) return(sign*y1f(x)); if(ix==0x7f800000) return zero; - a = __ieee754_y0f(x); - b = __ieee754_y1f(x); + a = y0f(x); + b = y1f(x); /* quit if b is -inf */ GET_FLOAT_WORD(ib,b); for(i=1;i __FBSDID("$FreeBSD$"); -/* __ieee754_lgamma(x) +/* lgamma(x) * Return the logarithm of the Gamma function of x. * - * Method: call __ieee754_lgamma_r + * Method: call lgamma_r */ #include @@ -29,9 +29,9 @@ __FBSDID("$FreeBSD$"); extern int signgam; double *** 656 LINES SKIPPED *** From nobody Thu Aug 3 20:28:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH0lv5RXfz4Tx1X; Thu, 3 Aug 2023 20:28:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH0lv4wxZz3HCV; Thu, 3 Aug 2023 20:28:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691094491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1j6d5/8S5P9uk0p7j+cPnOTq/AbsDKuLI5rGiPkuCs=; b=sLQ/fDeHd3l7pfKmakVUdZYFHHxfJsQQgOGOGtRC5Zo0rlm2rfC8UsqKflhnOJiQzk/sia Gu9v7ns9kXsoQDmBHIsvM2xoo1vISlTewwv/N81EbP7hI2H1Zgk0RKPPegBZBUQH11zWKY rhxV8goZtV7rmhjSpLbnxQybFfyWPh4G5z3NAmHvQkoYuV2XVwVX7BS9IuvdiPzvfBHj9+ xOla/MA2iWRV4Bx+p3youUzaGULrSjAOAe5HwrcaITjH9tT21Zme59XI2dOCZwMubVQbrI zPIXjdfcgbI9JYoPjfq69XDAa51FoIbGDCMD/y8OmCt2JNE0m+iu7ClttCjycQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691094491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1j6d5/8S5P9uk0p7j+cPnOTq/AbsDKuLI5rGiPkuCs=; b=C7mSDducTM0DNgqODeSjfLNshcOAFun6rsV/Dls42KnPprSg2mTPb2SZbWjp4M9jtnZ+3u 18E4f0u3V/8d6XG3KC4bxVL6FTj+wq/ycOO7hxs34wZS1KWgUJKneiVvcYH3CPYSDLgrnx /nP6ub6nkqnGkUpPwd6aPRgVuB9Vil+MYH3IVY6ZrWa8LROpzgJ6PvFIg2BV2MY+zZfk8p 3h84h3ZG55W8mFI0TLxwN3I2hrJ1BlE3+WfVKChk0HUu0eRsERGfe0+mDDWNHVYavJ+aoj IHJNvXKutc/q7tpX0/rXdRAWscWZ/QCshmppkMUQqGz0wa6b7ADpcNtaZID9AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691094491; a=rsa-sha256; cv=none; b=c5Yw5uewKF22PfTAP4VSFma9q3hxUqbEjsqoMZHGqiPGGyhS8qHP+U1lcpOHar+mrfVS80 RVXAitgHIfohgea0y/aYtuL5G35pjE+ZKG1Dj83d1Rcce7LMweOasq2zOduh33Gs3VKNdq iuZzQLdRYI0sauHz1g4qSkeaKLLJgoXFgl+CbihrB05/cQM6nsC9yfGNHIHBZoMqabPSnZ EfhhBnUccodtmCWnCmoF+dmIU/FYJNed1XkpKHx9eFP9bGaghVY7h2ODMJ5pnW0ZtHrGj5 dxYKjR/xSJyRKV/N0/pcM24fIvggHiP+XD01xKMw6WS9lu+bk/JRBv6ApJeutQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH0lv41kNzZk5; Thu, 3 Aug 2023 20:28:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373KSBKT020965; Thu, 3 Aug 2023 20:28:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373KSBHa020964; Thu, 3 Aug 2023 20:28:11 GMT (envelope-from git) Date: Thu, 3 Aug 2023 20:28:11 GMT Message-Id: <202308032028.373KSBHa020964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 1b01772f0185 - main - em(4): remove reference to CNVi List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b01772f0185bb6476ec76d1d66c26373cebc391 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1b01772f0185bb6476ec76d1d66c26373cebc391 commit 1b01772f0185bb6476ec76d1d66c26373cebc391 Author: Kevin Bowling AuthorDate: 2023-08-03 20:26:28 +0000 Commit: Kevin Bowling CommitDate: 2023-08-03 20:26:28 +0000 em(4): remove reference to CNVi I misread the newer PCH datasheet, these are still refered to as PCH. --- share/man/man4/em.4 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/share/man/man4/em.4 b/share/man/man4/em.4 index ebf04b4d8941..0948acf66951 100644 --- a/share/man/man4/em.4 +++ b/share/man/man4/em.4 @@ -57,7 +57,7 @@ The .Nm driver provides support for PCI/PCI-X Gigabit Ethernet adapters based on the Intel 82540, 82541ER, 82541PI, 82542, 82543, 82544, 82545, 82546, -82546EB, 82546GB, 82547 controller chips. +82546EB, 82546GB, and 82547 controller chips. .Pp The .Nm @@ -68,9 +68,8 @@ controller chips. The .Nm driver provides support for Gigabit Ethernet adapters connected to I/O -Controller Hub (ICH), Platform Controller Hub (PCH) and Connectivity -Integrated (CNVi) including Intel 80003ES2LAN, 82562, 82566, 82567, -82577, 82578, 82579, i217, i218, and i219. +Controller Hub (ICH) and Platform Controller Hub (PCH) including Intel +80003ES2LAN, 82562, 82566, 82567, 82577, 82578, 82579, i217, i218, and i219. .Pp The .Nm From nobody Thu Aug 3 20:38:00 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH0zF1Vyxz4Txf2; Thu, 3 Aug 2023 20:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH0zD6BYCz3JWZ; Thu, 3 Aug 2023 20:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691095080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BC2tl8ndtZ2q8G1+Ynt7ROKgeVyqGUkVdECtgcSJD2E=; b=PwuTzxXBupVVA4KAHX6/r/HTZHqjPbaB/+H7rQEPp/PtGxQ0IwPIr5Cp+QR/uck82SxcNm LR4HIq5aLbeL9OpJV8DJ5FO2OTdbyeW9YNFAIMflVfyjpUUxwyLEvZy5lQcrs75Ft7qM8b Ffug3+cegPJhjowt3I+AFb9elEquVRnkqWvConnBTirh6YV/4+N+PliwcPmHjVhM7+Nhic +PnkYm5py4U3yOli1l15XZOjf1bFVmO1A8+vVNkpNbf8NjFomplwZLSCecv/ZRjAFNCkI9 +EpdDic3RDscDFmhm9DjNVdSureU80Hgne1UxL6Wm9+I73pm8LzXWVXRIaeiFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691095080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BC2tl8ndtZ2q8G1+Ynt7ROKgeVyqGUkVdECtgcSJD2E=; b=F9ElEx73cXkEnvUwJ9ZdzEkqbCNcYfddGzkKObTPBM656/9etrJ39qlICXWC/wcGnow1Y1 dZETL68OIDteNvbCE0RL1PC/RWI8Xerjo7PwLjnXvAbKgCD8MoAVNkNy13ZIjayVxrF8Sh oWMxdaNTNhidWJFKIkoPrDjD5R+/xjcasUuSuvDyoZ+rYgTtAW+f/82GP4Xyc4PhF/1uhX w8aNYHQWV5uDlkTVDgkpOlMZYuuQ8sG7yTw/kPNhJKCfK1aV6gYHlylTk3FsWi5dT/0Q0g mmGrLqKK37TQEzqb8WznwM5wHB1pWLHRDrfC9vOJmAJPMWB88KIr8VQXsE3xLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691095080; a=rsa-sha256; cv=none; b=mKLtmZ+P005kNDzNWZmXg/k2Y/VimO02UisDDfLFsdo7+mnb9raaRpWy6BlpAVkxubAvT6 QuqSm0Ng11vvmTYyJ76mXrVyTOt07tQUQbru19L/UurJFO0g7opmt2C7vPCQrtjb65iGTH hAppFLCtjtYvdMykjRAoSHUceCAbFT+KrdMwS6A4Z0pOjWAs9btGxWKVF8nvOBhOpMVTSl cgh4hv/32qSX3ByDhAhcogfFk+iFprVJssxEpTnSGNVocuC1lTNW3hBPwh5uTj5UomtLcK 5hBts8JPfwmVVCSAiAldARlT3cCotL8n2taE/eZ8QGhICylwETMypiEdkE9Wow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH0zD5HhMzbNK; Thu, 3 Aug 2023 20:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373Kc0Yp038201; Thu, 3 Aug 2023 20:38:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373Kc09w038200; Thu, 3 Aug 2023 20:38:00 GMT (envelope-from git) Date: Thu, 3 Aug 2023 20:38:00 GMT Message-Id: <202308032038.373Kc09w038200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 61a8231d152c - main - ixv: Separate VFTA table for each interface List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61a8231d152c38ac96b697ea3ca8ff220f3aa536 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=61a8231d152c38ac96b697ea3ca8ff220f3aa536 commit 61a8231d152c38ac96b697ea3ca8ff220f3aa536 Author: Yuichiro Naito AuthorDate: 2023-08-03 20:36:21 +0000 Commit: Kevin Bowling CommitDate: 2023-08-03 20:36:21 +0000 ixv: Separate VFTA table for each interface The vlan setting is independent for each interface. Use VFTA table in 'struct ixgbe_softc' that is already defined. This pull request fixes following bug scenario. create ixv0.10 create ixv1.10 destroy ixv1.10 create ixv0.11 ixv0.10 no longer receives vlan 10 packets. In this case, destroying ixv1.10 affects to ixv0. MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/774 --- sys/dev/ixgbe/if_ixv.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c index cf5c8f92c450..e4da1f32cd0e 100644 --- a/sys/dev/ixgbe/if_ixv.c +++ b/sys/dev/ixgbe/if_ixv.c @@ -197,12 +197,6 @@ TUNABLE_INT("hw.ixv.flow_control", &ixv_flow_control); static int ixv_header_split = false; TUNABLE_INT("hw.ixv.hdr_split", &ixv_header_split); -/* - * Shadow VFTA table, this is needed because - * the real filter table gets cleared during - * a soft reset and we need to repopulate it. - */ -static u32 ixv_shadow_vfta[IXGBE_VFTA_SIZE]; extern struct if_txrx ixgbe_txrx; static struct if_shared_ctx ixv_sctx_init = { @@ -1541,9 +1535,9 @@ ixv_setup_vlan_support(if_ctx_t ctx) * we need to repopulate it now. */ for (int i = 0; i < IXGBE_VFTA_SIZE; i++) { - if (ixv_shadow_vfta[i] == 0) + if (sc->shadow_vfta[i] == 0) continue; - vfta = ixv_shadow_vfta[i]; + vfta = sc->shadow_vfta[i]; /* * Reconstruct the vlan id's * based on the bits set in each @@ -1579,7 +1573,7 @@ ixv_if_register_vlan(if_ctx_t ctx, u16 vtag) index = (vtag >> 5) & 0x7F; bit = vtag & 0x1F; - ixv_shadow_vfta[index] |= (1 << bit); + sc->shadow_vfta[index] |= (1 << bit); ++sc->num_vlans; } /* ixv_if_register_vlan */ @@ -1597,7 +1591,7 @@ ixv_if_unregister_vlan(if_ctx_t ctx, u16 vtag) index = (vtag >> 5) & 0x7F; bit = vtag & 0x1F; - ixv_shadow_vfta[index] &= ~(1 << bit); + sc->shadow_vfta[index] &= ~(1 << bit); --sc->num_vlans; } /* ixv_if_unregister_vlan */ From nobody Thu Aug 3 20:58:47 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH1RN1lfJz4TyTC; Thu, 3 Aug 2023 20:58:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH1RM2rVgz3Lf5; Thu, 3 Aug 2023 20:58:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 373Kwl3g030181 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 3 Aug 2023 23:58:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 373Kwl3g030181 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 373Kwle9030180; Thu, 3 Aug 2023 23:58:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Aug 2023 23:58:47 +0300 From: Konstantin Belousov To: Dmitry Chagin Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 5a7e48dddfb5 - main - tests: Add MAP_32BIT flag test Message-ID: References: <202308012024.371KOAHb046216@gitrepo.freebsd.org> <7A066A1D-9AFA-485F-AEAE-DD88C9537A44@freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4RH1RM2rVgz3Lf5 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] On Thu, Aug 03, 2023 at 02:50:57PM +0300, Dmitry Chagin wrote: > On Wed, Aug 02, 2023 at 12:57:36AM +0300, Konstantin Belousov wrote: > > On Tue, Aug 01, 2023 at 09:29:32PM +0100, Jessica Clarke wrote: > > > On 1 Aug 2023, at 21:24, Dmitry Chagin wrote: > > > > > > > > The branch main has been updated by dchagin: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=5a7e48dddfb5a668ded4742b79e6f6f88b647e6a > > > > > > > > commit 5a7e48dddfb5a668ded4742b79e6f6f88b647e6a > > > > Author: Dmitry Chagin > > > > AuthorDate: 2023-08-01 20:23:15 +0000 > > > > Commit: Dmitry Chagin > > > > CommitDate: 2023-08-01 20:23:15 +0000 > > > > > > > > tests: Add MAP_32BIT flag test > > > > > > > > Reviewed by: kib, markj > > > > Differential Revision: https://reviews.freebsd.org/D41236 > > > > MFC after: 1 month > > > > --- > > > > tests/sys/vm/Makefile | 8 ++++++ > > > > tests/sys/vm/mmap_map_32bit_helper.c | 51 ++++++++++++++++++++++++++++++++++++ > > > > tests/sys/vm/mmap_map_32bit_test.sh | 37 ++++++++++++++++++++++++++ > > > > 3 files changed, 96 insertions(+) > > > > > > > > diff --git a/tests/sys/vm/Makefile b/tests/sys/vm/Makefile > > > > index 8ef8a45e5f39..9aac49bc5320 100644 > > > > --- a/tests/sys/vm/Makefile > > > > +++ b/tests/sys/vm/Makefile > > > > @@ -9,4 +9,12 @@ ATF_TESTS_C+= mlock_test \ > > > > page_fault_signal \ > > > > shared_shadow_inval_test > > > > > > > > +.if ${MACHINE_ARCH} != "i386" && ${MACHINE} != "arm" && \ > > > > + (${MACHINE} != "powerpc" || ${MACHINE_ARCH} != "powerpc") > > > > + # MAP_32BIT is only available on 64-bit platforms > > > > > > So use ${MACHINE_ABI:Mlong64} after including src.opts.mk? > > > > May be we should enable the MAP_32BIT flag on 32bit arches, instead? > > It requests allocation below 2G, which is half of VA on i386, or 2/3 > > on arm. Interestingly, it should work already from compat32. > > It's disturbing that no none has requested this, I can do that Please do. The largest part of the work is to recheck the man page and tests. From nobody Thu Aug 3 21:02:42 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH1Wk6JwLz4V0Wj; Thu, 3 Aug 2023 21:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH1Wk5RgVz3M6X; Thu, 3 Aug 2023 21:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691096562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//i2k8hxaGu2Tgl1dROQSGAMhsBBBful+u8vMM7IiG8=; b=NmBzWxDE8uSNOl+cB2/rCu9bpY7M5e1zezbKhp+P2aMPWP2X40IANHzKOnXdfqxtJEfbek xcr4Di6CJG0CAuSrQuGwtwGNqbeidYshHHW5+KTyKg0XVTgqU+var0lTdDwSWEJ9bKypix peYzmVAcq0sm1shrEThT7koOYu9+/sSWhlnrgyR6eMuRSJFxZ+Za43jcWKKUEq0Itp/Z51 0c9w5Z0iu2X+zC16EeRU4kYXy3zOW9UtK1f++Zl9KqY9TBvGwVlg8kC/PYCp1Ty2tQBX3X ZAMJTBQRsWBH4xawy0ghCJLk1OMQXCGQMETxt1DsWA6b8WksDcLNNOSMIGjzGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691096562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//i2k8hxaGu2Tgl1dROQSGAMhsBBBful+u8vMM7IiG8=; b=r1XsbXytHS1EdcsdQSe8gDHv08ro3cETuVEHn4sxLKic1M2vLsbhf3fl1m58ITjxSeBaS3 8OUCdxm2d+tXWx/WAhL6wJ4AvCj1/oH+TZgZ343MInROx6QLpamHLTrA3IGrkvrvx54AQz 874m3e3da4doATgRcKtRCHj0QL0XMd80m7jlLVIW6blsa69yCg4r43yDB2Wc+F9FYgHOPn VS0dTh43aSgMNuJusNh+g6Cjxk1bgsFs0uayLKC814xOWl00x9sB4bNd7zDbALjmdCLZ+d AcDShCyw8MS3/sDlEz2+OtuJ2eiYXzbo7wGpfHSK8dIh+i7liE5OToL8A3aCiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691096562; a=rsa-sha256; cv=none; b=xmZKcmquEeFALySIHu0v/9LBuWJ++PQAPsSypXo9Z4AacIOQJHU4bQ2EYeABLC/bv2Kkla ma1Ibb6ShU1DhCoVIfVnKbYr1goYcNPtysMFNrmmjddi94alAwsADFPwPXC/zxMxfMWcR/ vlX+VFwo341Qio6ULPvPhOoB4q7/CC64KnaHKCS6W/mGYS/L2z6u2mLiPOQ2mnCiQh9Cpr 854SjufXLDDYw4CrR9e1T5Ed29UQ2oGw/gWuPUoA0eMjQglKdMmTyJMxbCvHs0Pd9QKWLt 8c4niKx9WtLCoks6gpzUeHaPf1571tPjooI3BCRyeaM0W1ntPjsyFZ1OniaaTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH1Wk4WwPzbyV; Thu, 3 Aug 2023 21:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373L2gbB087732; Thu, 3 Aug 2023 21:02:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373L2gaS087731; Thu, 3 Aug 2023 21:02:42 GMT (envelope-from git) Date: Thu, 3 Aug 2023 21:02:42 GMT Message-Id: <202308032102.373L2gaS087731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2bb16c635249 - main - x86: retire use of intr_bind List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2bb16c6352494bf7aba92be700908ddf01e0c08b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2bb16c6352494bf7aba92be700908ddf01e0c08b commit 2bb16c6352494bf7aba92be700908ddf01e0c08b Author: Elliott Mitchell AuthorDate: 2022-10-07 03:23:34 +0000 Commit: Ed Maste CommitDate: 2023-08-03 21:01:18 +0000 x86: retire use of intr_bind `intr_bind(u_int vector, u_char cpu);` looked suspicious since everywhere else "cpu" is a u_int and >256 processors isn't unreasonable now. Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D36901 --- sys/x86/x86/nexus.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c index 332b1527efbd..b57bda82453c 100644 --- a/sys/x86/x86/nexus.c +++ b/sys/x86/x86/nexus.c @@ -615,7 +615,12 @@ nexus_resume_intr(device_t dev, device_t child, struct resource *irq) static int nexus_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu) { - return (intr_bind(rman_get_start(irq), cpu)); + struct intsrc *isrc; + + isrc = intr_lookup_source(rman_get_start(irq)); + if (isrc == NULL) + return (EINVAL); + return (intr_event_bind(isrc->is_event, cpu)); } #endif From nobody Thu Aug 3 21:02:43 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH1Wm1Rx8z4V0gB; Thu, 3 Aug 2023 21:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH1Wl6N1Gz3ML2; Thu, 3 Aug 2023 21:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691096563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VVC1vLWqP1ETS3MGmg8wYSX7rjiSbqhbmalQqgUk1ts=; b=unLsZCmQBlQ0/RL+aeid9sEL3ZOokpxox+pbDWtcGYSy3RyFGwVefytB0915w5YSWKL7KT NNFTDiayw8fNjaKlIMV3SkVoy0ZM3tbxF2Pjt9a1CFH8MUAvBkZJz31B+4C5wxVA17IBsX mlcPKxrtBRxHXa/8nh15JUrA9ynvn+M8sKrpnrNQVCYT0fuPF6buCedSatOx4JjVJrYD3o mPVYWwcxhtN6OGIjgvekNGukg8PnaAdoEls/AOqz3twIRyGEbUydzHs5NsdC0vdqRGXR4q XLzbbmMtUaAL8CY07FoX5nZLXRLimZ9BU2yIzCi3fRUlaaQKplJB07W06vWGRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691096563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VVC1vLWqP1ETS3MGmg8wYSX7rjiSbqhbmalQqgUk1ts=; b=TAReZp2L+ScrYHDwMT/62Q1HROAk0p0H6Tvm0WNIlvaZLgJX4BKFkWJZxFf3ncVOBSsUbh 5fIB7SgbowW3JCurryqdF51IzwBFPjEhMMKLKVQroVJP+u7jrzrDE+nWYeY0BHWX5XVr1m 9U0h+WaEfK+kpVO6t9k4Mbczpr3KnPXtQtY3j84XpTI3x2AC7harToZ3b6r5R2wu/j4seg QTT3izujUFfN47Tlrk1K2tRZxmPmwKpq+zqlq2Dt5L4ZVWMXH23f99bTBamhFJ4jfqlqtD DGsF2hTgY5eA1Lz5QXRlmv3sloDCI7gX/P9p5McJtWcQrchk2/G4KuE2mXKlIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691096563; a=rsa-sha256; cv=none; b=A8Q4qUmPZqCT2X0ZXpZsA4VSWSwn4v78EjGuetENiKWwAw1DyKLcFGGK/FxJT49k7LdT6O UuArc+5leS6ifBAatY+I5ZP9+68fmtP0/4iRWDZiYZuIJL6WLk+mZ9S10dkIUcvYvu2MEG xJ//8gYeX8YNvaZe/CowlGK92ZdiEpdvVY5UHhT8Lgd0JNx7rpgYGG0p4rcI7wF31DNGAi KKJ0Zn1rvGCNLuYFj5shTB9ivv+IOoRPtX/ijkSWIYunJ8Nz3X9Y4XUb/Yh5rAFaac+t1K 7xFVDvUurZRp4k7GWlDoUz9S24njDXuqqHXE37PURK/J/oTS9f1BJ2sbt/Qchg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH1Wl5QgFzbxm; Thu, 3 Aug 2023 21:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373L2hUW087753; Thu, 3 Aug 2023 21:02:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373L2h14087752; Thu, 3 Aug 2023 21:02:43 GMT (envelope-from git) Date: Thu, 3 Aug 2023 21:02:43 GMT Message-Id: <202308032102.373L2h14087752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: eee6537665ae - main - x86: remove intr_bind List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eee6537665ae9830e831d7473dedd6b2cc81c2ea Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=eee6537665ae9830e831d7473dedd6b2cc81c2ea commit eee6537665ae9830e831d7473dedd6b2cc81c2ea Author: Elliott Mitchell AuthorDate: 2022-10-07 03:23:34 +0000 Commit: Ed Maste CommitDate: 2023-08-03 21:01:56 +0000 x86: remove intr_bind `intr_bind(u_int vector, u_char cpu);` looked suspicious since everywhere else "cpu" is a u_int and >256 processors isn't unreasonable now. `intr_bind()` is not used anywhere in FreeBSD (now, after commit bf42f3738087). Time to remove. Relnotes: Yes Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D36901 --- sys/x86/include/intr_machdep.h | 3 --- sys/x86/x86/intr_machdep.c | 12 ------------ 2 files changed, 15 deletions(-) diff --git a/sys/x86/include/intr_machdep.h b/sys/x86/include/intr_machdep.h index 933552c7dd7e..69d626d9874b 100644 --- a/sys/x86/include/intr_machdep.h +++ b/sys/x86/include/intr_machdep.h @@ -143,9 +143,6 @@ void intr_add_cpu(u_int cpu); int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep, int domain); -#ifdef SMP -int intr_bind(u_int vector, u_char cpu); -#endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); int intr_describe(u_int vector, void *ih, const char *descr); diff --git a/sys/x86/x86/intr_machdep.c b/sys/x86/x86/intr_machdep.c index 6413d8aadd73..524258ef7dc8 100644 --- a/sys/x86/x86/intr_machdep.c +++ b/sys/x86/x86/intr_machdep.c @@ -630,18 +630,6 @@ intr_next_cpu(int domain) return (apic_id); } -/* Attempt to bind the specified IRQ to the specified CPU. */ -int -intr_bind(u_int vector, u_char cpu) -{ - struct intsrc *isrc; - - isrc = intr_lookup_source(vector); - if (isrc == NULL) - return (EINVAL); - return (intr_event_bind(isrc->is_event, cpu)); -} - /* * Add a CPU to our mask of valid CPUs that can be destinations of * interrupts. From nobody Thu Aug 3 21:06:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH1bz6mZ8z4V0pD; Thu, 3 Aug 2023 21:06:23 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH1bz1Khkz3N98; Thu, 3 Aug 2023 21:06:23 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.208.179 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=none Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2b9f48b6796so21244051fa.3; Thu, 03 Aug 2023 14:06:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691096780; x=1691701580; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rsKMKyjs7ILgfIkw+jPVYdwA14SoAs7wR8l2E6WzlLs=; b=TCDW3QMjiufq4nETlQ6Ksh+RNJN1igTGdHxE1FKmAHsCGEK27iqBLH+JGC2Fo8Fibx 72pmXYC/OIuYGLyzEB8HJOH1IkKUt1OCiEDx/3eNnVABtS0Pbf58GNLfik9k0/4gIq/k x75XBI60FsQvc6oN+48JxNhp2lqGJq9+HlQ5XSwDMR92tF1VJawl7b4yFHUmQhhD7vGv 39rr7GqjMbwVyFOmbFWYCfxVn/mfHo0J/oI4Oq3eQ0plwAnDUDgizPoKezu7+yJd1iAb vLylZyxfqkB40B1JXlWbpWrK0xSK/8Iy2JOHZ1ldPP1OIChNul4CeXMhKo44pFgw9mvJ KdZA== X-Gm-Message-State: ABy/qLa0m9ZR7uLkjgDe62MNY1eEagXWI8N3aCnItxubz7UxNXQ1DVr8 XN4bvMovpnlTFFglGq6bIEMXmsjYhoRF3Fbl2P9gTe7TVMuo7Q== X-Google-Smtp-Source: APBJJlFZCFzC9I3VzRMptGlN21Dc5aARaYmvcM5YOgCKf2vLS7Zk2G6vgHmvHsiaqWZcAG/TikibhnOiZcI4+x/caYc= X-Received: by 2002:a2e:88d1:0:b0:2b6:df6b:84c0 with SMTP id a17-20020a2e88d1000000b002b6df6b84c0mr7973096ljk.25.1691096780313; Thu, 03 Aug 2023 14:06:20 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202308032102.373L2h14087752@gitrepo.freebsd.org> In-Reply-To: <202308032102.373L2h14087752@gitrepo.freebsd.org> From: Ed Maste Date: Thu, 3 Aug 2023 17:06:08 -0400 Message-ID: Subject: Re: git: eee6537665ae - main - x86: remove intr_bind To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [0.83 / 15.00]; NEURAL_SPAM_SHORT(0.83)[0.833]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; R_DKIM_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.179:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.179:from]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[carpeddiem]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com] X-Spamd-Bar: / X-Rspamd-Queue-Id: 4RH1bz1Khkz3N98 On Thu, 3 Aug 2023 at 17:02, Ed Maste wrote: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=eee6537665ae9830e831d7473dedd6b2cc81c2ea > > commit eee6537665ae9830e831d7473dedd6b2cc81c2ea > Author: Elliott Mitchell > AuthorDate: 2022-10-07 03:23:34 +0000 > Commit: Ed Maste > CommitDate: 2023-08-03 21:01:56 +0000 > > x86: remove intr_bind > > `intr_bind(u_int vector, u_char cpu);` looked suspicious since > everywhere else "cpu" is a u_int and >256 processors isn't unreasonable > now. `intr_bind()` is not used anywhere in FreeBSD (now, after commit > bf42f3738087). Time to remove. Sigh, this changed after a rebase. The associated commit should be 2bb16c6352494bf7aba92be700908d. From nobody Thu Aug 3 21:10:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH1hp3QjQz4V0sS; Thu, 3 Aug 2023 21:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH1hp3Bnzz3NWM; Thu, 3 Aug 2023 21:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691097034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=McjKLJF4V8ep4gV5Re+Wlox+/aXA3t1m2fswAvfEXlU=; b=Lb/7VxGA1ghECoUztqWhVv8VTvvJEKp0I+p7g5/ZzphGHBlbAwDlrlqMQR9Q8SqIW9yt33 5Q52B6Zu1+yU3uNjPhmBMRwwE+WlUelhW2ujjSIZQ6Hn4q3wDhGv4oRsizoIubsn4zM6Ov ACx0dyKD9DcSVmf4VtKaaHpsCvK2jokHaIOLCJwWQrihQ8+kc8+trRjBE/IEB+PmpgaIqT 1eNJbN79D/nhZLNn4ldSeztjaB1dxiAlODBM5kBIBBNnAW3oHEzr3P0a8WO39wRb7BjuX4 41BN43aBkMzK6MR2jbuRI9CiduDDVjUV6RXZkCD0ehQ6fxp9C55m6xpQTSybgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691097034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=McjKLJF4V8ep4gV5Re+Wlox+/aXA3t1m2fswAvfEXlU=; b=MY0vRgP39T0Ybc7OeJ+h5Ea9qjcKbvqJ6TmTLGCr7Vd7vdeHl38n3uI4Xg90fd56bGA2d1 binv3N5wnt5EUSjHEOVQK25oocWu+O1E3mUcd4emm0HkZlUEG2Y1zcEVZqkbkBym7skxGx Amr0fMx3zUiIGVA9Qtqbs+yUSoNzRR+CKMfun+AHhU5YGNztrgQI3zQf7AT+YOWd1WdPoZ 12AU+UpgnBn+f4mDVFS2ml/7g/F2PTDbzaiMFPGg54xLKPnucw6jnT+yOABFc7e93R9665 c2bFRklqnIkyvyzVOrBwrdIXmmdRGg2JIYwIm4Ldmcm8K2lpCNRSflYQQNs78g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691097034; a=rsa-sha256; cv=none; b=Wx3tOOkDLNcgB4M91YVblyOs2DM3euJ/DROUCYEW411sL+fS/R7vFx2iSJl14kXDm+5XrK DUqBZ48AHATXqPqMoclIU9k7OJtdFf/tvvq1QVyz9ZsNg0Fgp5JQcn/P+yzXV6kOkjHK6U ik/7jUv/MitXLljIk3n1X+qSmgj75UgRRY+0ONDD5l+OoXEqXYLAWLXYufDEacD1w4CnxT MunMk/G+WP4mBn9IirTGQNs5R18Gd5uEJNsVBNJPp59Jdcg7zgYae39yX2dSE24mjcBOlw stwPqZbpOA+ciF5jzFoReHoPEkgC6c/kg74S6IV8f03QlQe4w1suugKH7Z8/7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH1hp1kBqzbkm; Thu, 3 Aug 2023 21:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373LAYE9097499; Thu, 3 Aug 2023 21:10:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373LAYqC097498; Thu, 3 Aug 2023 21:10:34 GMT (envelope-from git) Date: Thu, 3 Aug 2023 21:10:34 GMT Message-Id: <202308032110.373LAYqC097498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 7ff9ae90f0bd - main - iflib(9): Remove support for cloning pseudo interfaces List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ff9ae90f0bd133f56930858bb478a309da3982b Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=7ff9ae90f0bd133f56930858bb478a309da3982b commit 7ff9ae90f0bd133f56930858bb478a309da3982b Author: Marius Strobl AuthorDate: 2023-08-03 20:23:42 +0000 Commit: Marius Strobl CommitDate: 2023-08-03 21:10:18 +0000 iflib(9): Remove support for cloning pseudo interfaces This code was used by the first incarnation of wg(4) and is dead ever since f187d6dfbf633665ba6740fe22742aec60ce02a2 has removed the latter again. Moreover, this code matched iflib(4) like a square peg fits in a round hole, was incomplete and despite some hacks still tailored to VPC and wg(4) but not generic. In effect, this reverts the following: 09f6ff4f1a47c3009dc16fdc609a44f2341bc7ac (w/ its "ancillary changes") 9aeca21324f481f57f2ecb7009f461f4f51b62b3 1f93e931d9f0c688f43f98ef777e04636a325526 0f9544d03e89d180f94a7a84b110ec7d2b6c625a 0dd691b41276ce13d25ffb1443af27f85038aa3f Reviewed by: erj, kbowling Differential Revision: --- ObsoleteFiles.inc | 3 + sys/compat/linux/linux_netlink.c | 1 - sys/conf/files | 1 - sys/modules/iflib/Makefile | 1 - sys/net/if.h | 2 +- sys/net/if_clone.c | 28 +--- sys/net/if_clone.h | 8 +- sys/net/ifdi_if.m | 125 ++-------------- sys/net/iflib.c | 297 +++----------------------------------- sys/net/iflib.h | 53 ++----- sys/net/iflib_clone.c | 303 --------------------------------------- sys/net/iflib_private.h | 70 --------- 12 files changed, 46 insertions(+), 846 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 6e93c9381c52..67bdb1f3d8e0 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,6 +52,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20230803: Removal of support for cloning pseudo interfaces from iflib(9) +OLD_FILES+=usr/include/net/iflib_private.h + # 20230802: Remove a copy of libdtrace.so installed to the wrong path OLD_FILES+=usr/lib/libdtrace.so.2 diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c index dc3c40aa2dc6..e793885c30c2 100644 --- a/sys/compat/linux/linux_netlink.c +++ b/sys/compat/linux/linux_netlink.c @@ -325,7 +325,6 @@ rtnl_if_flags_to_linux(unsigned int if_flags) case IFF_STICKYARP: case IFF_DYING: case IFF_RENAMING: - case IFF_NOGROUP: /* No Linux analogue */ break; case IFF_MULTICAST: diff --git a/sys/conf/files b/sys/conf/files index 1ec165537128..8838137f6989 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4147,7 +4147,6 @@ net/if_vlan.c optional vlan net/if_vxlan.c optional vxlan inet | vxlan inet6 net/ifdi_if.m optional ether pci iflib net/iflib.c optional ether pci iflib -net/iflib_clone.c optional ether pci iflib net/mp_ring.c optional ether iflib net/mppcc.c optional netgraph_mppc_compression net/mppcd.c optional netgraph_mppc_compression diff --git a/sys/modules/iflib/Makefile b/sys/modules/iflib/Makefile index f598db2743dd..2c010ac951db 100644 --- a/sys/modules/iflib/Makefile +++ b/sys/modules/iflib/Makefile @@ -5,7 +5,6 @@ KMOD= iflib SRCS= \ iflib.c \ - iflib_clone.c \ mp_ring.c SRCS+= ifdi_if.c SRCS+= device_if.h bus_if.h pci_if.h pci_iov_if.h ifdi_if.h diff --git a/sys/net/if.h b/sys/net/if.h index bd2787516f01..2b05c14f8920 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -163,7 +163,7 @@ struct if_data { #define IFF_STICKYARP 0x100000 /* (n) sticky ARP */ #define IFF_DYING 0x200000 /* (n) interface is winding down */ #define IFF_RENAMING 0x400000 /* (n) interface is being renamed */ -#define IFF_NOGROUP 0x800000 /* (n) interface is not part of any groups */ +#define IFF_SPARE 0x800000 #define IFF_NETLINK_1 0x1000000 /* (n) used by netlink */ /* diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c index 3dd577850f82..15327084e025 100644 --- a/sys/net/if_clone.c +++ b/sys/net/if_clone.c @@ -308,8 +308,7 @@ void ifc_link_ifp(struct if_clone *ifc, struct ifnet *ifp) { - if ((ifc->ifc_flags & IFC_NOGROUP) == 0) - if_addgroup(ifp, ifc->ifc_name); + if_addgroup(ifp, ifc->ifc_name); IF_CLONE_LOCK(ifc); IFC_IFLIST_INSERT(ifc, ifp); @@ -336,7 +335,7 @@ ifc_unlink_ifp(struct if_clone *ifc, struct ifnet *ifp) } IF_CLONE_UNLOCK(ifc); - if (ifcifp != NULL && (ifc->ifc_flags & IFC_F_NOGROUP) == 0) + if (ifcifp != NULL) if_delgroup(ifp, ifc->ifc_name); return (ifcifp != NULL); @@ -536,7 +535,7 @@ ifc_attach_cloner(const char *name, struct if_clone_addreq *req) ifc->ifc_match = req->match_f != NULL ? req->match_f : ifc_simple_match; ifc->ifc_create = req->create_f; ifc->ifc_destroy = req->destroy_f; - ifc->ifc_flags = (req->flags & (IFC_F_AUTOUNIT | IFC_F_NOGROUP)); + ifc->ifc_flags = (req->flags & IFC_F_AUTOUNIT); if (req->version == 2) { struct if_clone_addreq_v2 *req2 = (struct if_clone_addreq_v2 *)req; @@ -782,8 +781,7 @@ if_clone_restoregroup(struct ifnet *ifp) } CURVNET_RESTORE(); LIST_FOREACH(ifc, &V_if_cloners, ifc_list) - if (strcmp(ifc->ifc_name, ifc_name) == 0 && - ((ifc->ifc_flags & IFC_NOGROUP) == 0)) + if (strcmp(ifc->ifc_name, ifc_name) == 0) break; IF_CLONERS_UNLOCK(); @@ -957,21 +955,3 @@ ifc_copyin(const struct ifc_data *ifd, void *target, size_t len) } else return (copyin(ifd->params, target, len)); } - -const char * -ifc_name(struct if_clone *ifc) -{ - return (ifc->ifc_name); -} - -void -ifc_flags_set(struct if_clone *ifc, int flags) -{ - ifc->ifc_flags = flags; -} - -int -ifc_flags_get(struct if_clone *ifc) -{ - return (ifc->ifc_flags); -} diff --git a/sys/net/if_clone.h b/sys/net/if_clone.h index 8b52c375addb..5d5b8a5141a4 100644 --- a/sys/net/if_clone.h +++ b/sys/net/if_clone.h @@ -99,15 +99,12 @@ struct if_clone_addreq_v2 { ifc_dump_nl_f *dump_nl_f; }; - -#define IFC_F_NOGROUP 0x01 /* Creation flag: don't add unit group */ +#define IFC_F_SPARE 0x01 #define IFC_F_AUTOUNIT 0x02 /* Creation flag: automatically select unit */ #define IFC_F_SYSSPACE 0x04 /* Cloner callback: params pointer is in kernel memory */ #define IFC_F_FORCE 0x08 /* Deletion flag: force interface deletion */ #define IFC_F_CREATE 0x10 /* Creation flag: indicate creation request */ -#define IFC_NOGROUP IFC_F_NOGROUP - struct if_clone *ifc_attach_cloner(const char *name, struct if_clone_addreq *req); void ifc_detach_cloner(struct if_clone *ifc); int ifc_create_ifp(const char *name, struct ifc_data *ifd, struct ifnet **ifpp); @@ -143,9 +140,6 @@ void if_clone_detach(struct if_clone *); int ifc_name2unit(const char *name, int *unit); int ifc_alloc_unit(struct if_clone *, int *); void ifc_free_unit(struct if_clone *, int); -const char *ifc_name(struct if_clone *); -void ifc_flags_set(struct if_clone *, int flags); -int ifc_flags_get(struct if_clone *); /* Interface clone event. */ typedef void (*if_clone_event_handler_t)(void *, struct if_clone *); diff --git a/sys/net/ifdi_if.m b/sys/net/ifdi_if.m index 3a17f24fdf91..f07a79624e86 100644 --- a/sys/net/ifdi_if.m +++ b/sys/net/ifdi_if.m @@ -1,5 +1,5 @@ # -# Copyright (c) 2014-2018, Matthew Macy (mmacy@mattmacy.io) +# Copyright (c) 2014, Matthew Macy (mmacy@mattmacy.io) # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -39,10 +39,7 @@ #include #include #include -#include -#include #include -#include INTERFACE ifdi; @@ -53,18 +50,6 @@ CODE { { } - static int - null_knlist_add(if_ctx_t _ctx __unused, struct knote *_kn) - { - return (0); - } - - static int - null_knote_event(if_ctx_t _ctx __unused, struct knote *_kn, int _hint) - { - return (0); - } - static void null_timer_op(if_ctx_t _ctx __unused, uint16_t _qsidx __unused) { @@ -76,12 +61,6 @@ CODE { return (0); } - static int - null_int_int_op(if_ctx_t _ctx __unused, int arg0 __unused) - { - return (ENOTSUP); - } - static int null_queue_intr_enable(if_ctx_t _ctx __unused, uint16_t _qid __unused) { @@ -134,43 +113,6 @@ CODE { return (ENOTSUP); } - static void - null_media_status(if_ctx_t ctx __unused, struct ifmediareq *ifmr) - { - ifmr->ifm_status = IFM_AVALID | IFM_ACTIVE; - ifmr->ifm_active = IFM_ETHER | IFM_25G_ACC | IFM_FDX; - } - - static int - null_cloneattach(if_ctx_t ctx __unused, struct if_clone *ifc __unused, - const char *name __unused, caddr_t params __unused) - { - return (0); - } - - static void - null_rx_clset(if_ctx_t _ctx __unused, uint16_t _flid __unused, - uint16_t _qid __unused, caddr_t *_sdcl __unused) - { - } - static void - null_object_info_get(if_ctx_t ctx __unused, void *data __unused, int size __unused) - { - } - static int - default_mac_set(if_ctx_t ctx, const uint8_t *mac) - { - struct ifnet *ifp = iflib_get_ifp(ctx); - struct sockaddr_dl *sdl; - - if (ifp && ifp->if_addr) { - sdl = (struct sockaddr_dl *)ifp->if_addr->ifa_addr; - MPASS(sdl->sdl_type == IFT_ETHER); - memcpy(LLADDR(sdl), mac, ETHER_ADDR_LEN); - } - return (0); - } - static bool null_needs_restart(if_ctx_t _ctx __unused, enum iflib_restart_event _event __unused) { @@ -178,58 +120,25 @@ CODE { } }; -# -# kevent interfaces -# - -METHOD int knlist_add { - if_ctx_t _ctx; - struct knote *_kn; -} DEFAULT null_knlist_add; - -METHOD int knote_event { - if_ctx_t _ctx; - struct knote *_kn; - int hint; -} DEFAULT null_knote_event; - - -# -# query -# - -METHOD int object_info_get { - if_ctx_t _ctx; - void *data; - int size; -} DEFAULT null_object_info_get; - # # bus interfaces # METHOD int attach_pre { if_ctx_t _ctx; -} DEFAULT null_int_op; +}; METHOD int attach_post { if_ctx_t _ctx; -} DEFAULT null_int_op; +}; METHOD int reinit_pre { if_ctx_t _ctx; -} DEFAULT null_int_op; +}; METHOD int reinit_post { if_ctx_t _ctx; -} DEFAULT null_int_op; - -METHOD int cloneattach { - if_ctx_t _ctx; - struct if_clone *_ifc; - const char *_name; - caddr_t params; -} DEFAULT null_cloneattach; +}; METHOD int detach { if_ctx_t _ctx; @@ -270,14 +179,7 @@ METHOD int rx_queues_alloc { METHOD void queues_free { if_ctx_t _ctx; -} DEFAULT null_void_op; - -METHOD void rx_clset { - if_ctx_t _ctx; - uint16_t _fl; - uint16_t _qsetid; - caddr_t *_sdcl; -} DEFAULT null_rx_clset; +}; # # interface reset / stop @@ -298,7 +200,7 @@ METHOD void stop { METHOD int msix_intr_assign { if_ctx_t _sctx; int msix; -} DEFAULT null_int_int_op; +}; METHOD void intr_enable { if_ctx_t _ctx; @@ -338,10 +240,6 @@ METHOD int mtu_set { if_ctx_t _ctx; uint32_t _mtu; }; -METHOD int mac_set { - if_ctx_t _ctx; - const uint8_t *_mac; -} DEFAULT default_mac_set; METHOD void media_set{ if_ctx_t _ctx; @@ -394,11 +292,11 @@ METHOD void update_admin_status { METHOD void media_status { if_ctx_t _ctx; struct ifmediareq *_ifm; -} DEFAULT null_media_status; +}; METHOD int media_change { if_ctx_t _ctx; -} DEFAULT null_int_op; +}; METHOD uint64_t get_counter { if_ctx_t _ctx; @@ -439,11 +337,6 @@ METHOD void watchdog_reset { if_ctx_t _ctx; } DEFAULT null_void_op; -METHOD void watchdog_reset_queue { - if_ctx_t _ctx; - uint16_t _q; -} DEFAULT null_timer_op; - METHOD void led_func { if_ctx_t _ctx; int _onoff; diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 4dd6349f6be1..9e6964d73764 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -87,7 +87,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "ifdi_if.h" @@ -127,7 +126,7 @@ __FBSDID("$FreeBSD$"); * * */ -MALLOC_DEFINE(M_IFLIB, "iflib", "ifnet library"); +static MALLOC_DEFINE(M_IFLIB, "iflib", "ifnet library"); #define IFLIB_RXEOF_MORE (1U << 0) #define IFLIB_RXEOF_EMPTY (2U << 0) @@ -245,12 +244,6 @@ iflib_get_media(if_ctx_t ctx) return (ctx->ifc_mediap); } -uint32_t -iflib_get_flags(if_ctx_t ctx) -{ - return (ctx->ifc_flags); -} - void iflib_set_mac(if_ctx_t ctx, uint8_t mac[ETHER_ADDR_LEN]) { @@ -310,6 +303,21 @@ typedef struct iflib_sw_tx_desc_array { #define IFLIB_RESTART_BUDGET 8 +#define IFC_LEGACY 0x001 +#define IFC_QFLUSH 0x002 +#define IFC_MULTISEG 0x004 +#define IFC_SPARE1 0x008 +#define IFC_SC_ALLOCATED 0x010 +#define IFC_INIT_DONE 0x020 +#define IFC_PREFETCH 0x040 +#define IFC_DO_RESET 0x080 +#define IFC_DO_WATCHDOG 0x100 +#define IFC_SPARE0 0x200 +#define IFC_SPARE2 0x400 +#define IFC_IN_DETACH 0x800 + +#define IFC_NETMAP_TX_IRQ 0x80000000 + #define CSUM_OFFLOAD (CSUM_IP_TSO|CSUM_IP6_TSO|CSUM_IP| \ CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP) @@ -495,16 +503,6 @@ pkt_info_zero(if_pkt_info_t pi) #endif } -static device_method_t iflib_pseudo_methods[] = { - DEVMETHOD(device_attach, noop_attach), - DEVMETHOD(device_detach, iflib_pseudo_detach), - DEVMETHOD_END -}; - -driver_t iflib_pseudodriver = { - "iflib_pseudo", iflib_pseudo_methods, sizeof(struct iflib_ctx), -}; - static inline void rxd_info_zero(if_rxd_info_t ri) { @@ -544,14 +542,6 @@ rxd_info_zero(if_rxd_info_t ri) #define CALLOUT_LOCK(txq) mtx_lock(&txq->ift_mtx) #define CALLOUT_UNLOCK(txq) mtx_unlock(&txq->ift_mtx) -void -iflib_set_detach(if_ctx_t ctx) -{ - STATE_LOCK(ctx); - ctx->ifc_flags |= IFC_IN_DETACH; - STATE_UNLOCK(ctx); -} - /* Our boot-time initialization hook */ static int iflib_module_event_handler(module_t, int, void *); @@ -718,6 +708,7 @@ static void iflib_add_device_sysctl_pre(if_ctx_t ctx); static void iflib_add_device_sysctl_post(if_ctx_t ctx); static void iflib_ifmp_purge(iflib_txq_t txq); static void _iflib_pre_assert(if_softc_ctx_t scctx); +static void iflib_stop(if_ctx_t ctx); static void iflib_if_init_locked(if_ctx_t ctx); static void iflib_free_intr_mem(if_ctx_t ctx); #ifndef __NO_STRICT_ALIGNMENT @@ -5447,237 +5438,6 @@ fail_ctx_free: return (err); } -int -iflib_pseudo_register(device_t dev, if_shared_ctx_t sctx, if_ctx_t *ctxp, - struct iflib_cloneattach_ctx *clctx) -{ - int num_txd, num_rxd; - int err; - if_ctx_t ctx; - if_t ifp; - if_softc_ctx_t scctx; - int i; - void *sc; - - ctx = malloc(sizeof(*ctx), M_IFLIB, M_WAITOK|M_ZERO); - sc = malloc(sctx->isc_driver->size, M_IFLIB, M_WAITOK|M_ZERO); - ctx->ifc_flags |= IFC_SC_ALLOCATED; - if (sctx->isc_flags & (IFLIB_PSEUDO|IFLIB_VIRTUAL)) - ctx->ifc_flags |= IFC_PSEUDO; - - ctx->ifc_sctx = sctx; - ctx->ifc_softc = sc; - ctx->ifc_dev = dev; - - if ((err = iflib_register(ctx)) != 0) { - device_printf(dev, "%s: iflib_register failed %d\n", __func__, err); - goto fail_ctx_free; - } - iflib_add_device_sysctl_pre(ctx); - - scctx = &ctx->ifc_softc_ctx; - ifp = ctx->ifc_ifp; - - iflib_reset_qvalues(ctx); - CTX_LOCK(ctx); - if ((err = IFDI_ATTACH_PRE(ctx)) != 0) { - device_printf(dev, "IFDI_ATTACH_PRE failed %d\n", err); - goto fail_unlock; - } - if (sctx->isc_flags & IFLIB_GEN_MAC) - ether_gen_addr(ifp, &ctx->ifc_mac); - if ((err = IFDI_CLONEATTACH(ctx, clctx->cc_ifc, clctx->cc_name, - clctx->cc_params)) != 0) { - device_printf(dev, "IFDI_CLONEATTACH failed %d\n", err); - goto fail_unlock; - } -#ifdef INVARIANTS - if (scctx->isc_capabilities & IFCAP_TXCSUM) - MPASS(scctx->isc_tx_csum_flags); -#endif - - if_setcapabilities(ifp, scctx->isc_capabilities | IFCAP_HWSTATS | IFCAP_LINKSTATE); - if_setcapenable(ifp, scctx->isc_capenable | IFCAP_HWSTATS | IFCAP_LINKSTATE); - - if_setflagbits(ifp, IFF_NOGROUP, 0); - if (sctx->isc_flags & IFLIB_PSEUDO) { - ifmedia_add(ctx->ifc_mediap, IFM_ETHER | IFM_AUTO, 0, NULL); - ifmedia_set(ctx->ifc_mediap, IFM_ETHER | IFM_AUTO); - if (sctx->isc_flags & IFLIB_PSEUDO_ETHER) { - ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac.octet); - } else { - if_attach(ctx->ifc_ifp); - bpfattach(ctx->ifc_ifp, DLT_NULL, sizeof(u_int32_t)); - } - - if ((err = IFDI_ATTACH_POST(ctx)) != 0) { - device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err); - goto fail_detach; - } - *ctxp = ctx; - - /* - * Tell the upper layer(s) if IFCAP_VLAN_MTU is supported. - * This must appear after the call to ether_ifattach() because - * ether_ifattach() sets if_hdrlen to the default value. - */ - if (if_getcapabilities(ifp) & IFCAP_VLAN_MTU) - if_setifheaderlen(ifp, - sizeof(struct ether_vlan_header)); - - if_setgetcounterfn(ctx->ifc_ifp, iflib_if_get_counter); - iflib_add_device_sysctl_post(ctx); - ctx->ifc_flags |= IFC_INIT_DONE; - CTX_UNLOCK(ctx); - return (0); - } - ifmedia_add(ctx->ifc_mediap, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); - ifmedia_add(ctx->ifc_mediap, IFM_ETHER | IFM_AUTO, 0, NULL); - ifmedia_set(ctx->ifc_mediap, IFM_ETHER | IFM_AUTO); - - _iflib_pre_assert(scctx); - ctx->ifc_txrx = *scctx->isc_txrx; - - if (scctx->isc_ntxqsets == 0 || (scctx->isc_ntxqsets_max && scctx->isc_ntxqsets_max < scctx->isc_ntxqsets)) - scctx->isc_ntxqsets = scctx->isc_ntxqsets_max; - if (scctx->isc_nrxqsets == 0 || (scctx->isc_nrxqsets_max && scctx->isc_nrxqsets_max < scctx->isc_nrxqsets)) - scctx->isc_nrxqsets = scctx->isc_nrxqsets_max; - - num_txd = iflib_num_tx_descs(ctx); - num_rxd = iflib_num_rx_descs(ctx); - - /* XXX change for per-queue sizes */ - device_printf(dev, "Using %d TX descriptors and %d RX descriptors\n", - num_txd, num_rxd); - - if (scctx->isc_tx_nsegments > num_txd / MAX_SINGLE_PACKET_FRACTION) - scctx->isc_tx_nsegments = max(1, num_txd / - MAX_SINGLE_PACKET_FRACTION); - if (scctx->isc_tx_tso_segments_max > num_txd / - MAX_SINGLE_PACKET_FRACTION) - scctx->isc_tx_tso_segments_max = max(1, - num_txd / MAX_SINGLE_PACKET_FRACTION); - - /* TSO parameters - dig these out of the data sheet - simply correspond to tag setup */ - if (if_getcapabilities(ifp) & IFCAP_TSO) { - /* - * The stack can't handle a TSO size larger than IP_MAXPACKET, - * but some MACs do. - */ - if_sethwtsomax(ifp, min(scctx->isc_tx_tso_size_max, - IP_MAXPACKET)); - /* - * Take maximum number of m_pullup(9)'s in iflib_parse_header() - * into account. In the worst case, each of these calls will - * add another mbuf and, thus, the requirement for another DMA - * segment. So for best performance, it doesn't make sense to - * advertize a maximum of TSO segments that typically will - * require defragmentation in iflib_encap(). - */ - if_sethwtsomaxsegcount(ifp, scctx->isc_tx_tso_segments_max - 3); - if_sethwtsomaxsegsize(ifp, scctx->isc_tx_tso_segsize_max); - } - if (scctx->isc_rss_table_size == 0) - scctx->isc_rss_table_size = 64; - scctx->isc_rss_table_mask = scctx->isc_rss_table_size-1; - - GROUPTASK_INIT(&ctx->ifc_admin_task, 0, _task_fn_admin, ctx); - /* XXX format name */ - taskqgroup_attach(qgroup_if_config_tqg, &ctx->ifc_admin_task, ctx, - NULL, NULL, "admin"); - - /* XXX --- can support > 1 -- but keep it simple for now */ - scctx->isc_intr = IFLIB_INTR_LEGACY; - - /* Get memory for the station queues */ - if ((err = iflib_queues_alloc(ctx))) { - device_printf(dev, "Unable to allocate queue memory\n"); - goto fail_iflib_detach; - } - - if ((err = iflib_qset_structures_setup(ctx))) { - device_printf(dev, "qset structure setup failed %d\n", err); - goto fail_queues; - } - - /* - * XXX What if anything do we want to do about interrupts? - */ - ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac.octet); - if ((err = IFDI_ATTACH_POST(ctx)) != 0) { - device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err); - goto fail_detach; - } - - /* - * Tell the upper layer(s) if IFCAP_VLAN_MTU is supported. - * This must appear after the call to ether_ifattach() because - * ether_ifattach() sets if_hdrlen to the default value. - */ - if (if_getcapabilities(ifp) & IFCAP_VLAN_MTU) - if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); - - /* XXX handle more than one queue */ - for (i = 0; i < scctx->isc_nrxqsets; i++) - IFDI_RX_CLSET(ctx, 0, i, ctx->ifc_rxqs[i].ifr_fl[0].ifl_sds.ifsd_cl); - - *ctxp = ctx; - - if_setgetcounterfn(ctx->ifc_ifp, iflib_if_get_counter); - iflib_add_device_sysctl_post(ctx); - ctx->ifc_flags |= IFC_INIT_DONE; - CTX_UNLOCK(ctx); - - return (0); -fail_detach: - ether_ifdetach(ctx->ifc_ifp); -fail_queues: - iflib_tqg_detach(ctx); - iflib_tx_structures_free(ctx); - iflib_rx_structures_free(ctx); -fail_iflib_detach: - IFDI_DETACH(ctx); - IFDI_QUEUES_FREE(ctx); -fail_unlock: - CTX_UNLOCK(ctx); - iflib_deregister(ctx); -fail_ctx_free: - free(ctx->ifc_softc, M_IFLIB); - free(ctx, M_IFLIB); - return (err); -} - -int -iflib_pseudo_deregister(if_ctx_t ctx) -{ - if_t ifp = ctx->ifc_ifp; - if_shared_ctx_t sctx = ctx->ifc_sctx; - - /* Unregister VLAN event handlers early */ - iflib_unregister_vlan_handlers(ctx); - - if ((sctx->isc_flags & IFLIB_PSEUDO) && - (sctx->isc_flags & IFLIB_PSEUDO_ETHER) == 0) { - bpfdetach(ifp); - if_detach(ifp); - } else { - ether_ifdetach(ifp); - } - - iflib_tqg_detach(ctx); - iflib_tx_structures_free(ctx); - iflib_rx_structures_free(ctx); - IFDI_DETACH(ctx); - IFDI_QUEUES_FREE(ctx); - - iflib_deregister(ctx); - - if (ctx->ifc_flags & IFC_SC_ALLOCATED) - free(ctx->ifc_softc, M_IFLIB); - free(ctx, M_IFLIB); - return (0); -} - int iflib_device_attach(device_t dev) { @@ -5977,22 +5737,12 @@ iflib_register(if_ctx_t ctx) driver_t *driver = sctx->isc_driver; device_t dev = ctx->ifc_dev; if_t ifp; - u_char type; - int iflags; - if ((sctx->isc_flags & IFLIB_PSEUDO) == 0) - _iflib_assert(sctx); + _iflib_assert(sctx); CTX_LOCK_INIT(ctx); STATE_LOCK_INIT(ctx, device_get_nameunit(ctx->ifc_dev)); - if (sctx->isc_flags & IFLIB_PSEUDO) { - if (sctx->isc_flags & IFLIB_PSEUDO_ETHER) - type = IFT_ETHER; - else - type = IFT_PPP; - } else - type = IFT_ETHER; - ifp = ctx->ifc_ifp = if_alloc(type); + ifp = ctx->ifc_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { device_printf(dev, "can not allocate ifnet structure\n"); return (ENOMEM); @@ -6017,14 +5767,7 @@ iflib_register(if_ctx_t ctx) if_settransmitfn(ifp, iflib_if_transmit); #endif if_setqflushfn(ifp, iflib_if_qflush); - iflags = IFF_MULTICAST; - - if ((sctx->isc_flags & IFLIB_PSEUDO) && - (sctx->isc_flags & IFLIB_PSEUDO_ETHER) == 0) - iflags |= IFF_POINTOPOINT; - else - iflags |= IFF_BROADCAST | IFF_SIMPLEX; - if_setflags(ifp, iflags); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); ctx->ifc_vlan_attach_event = EVENTHANDLER_REGISTER(vlan_config, iflib_vlan_register, ctx, EVENTHANDLER_PRI_FIRST); diff --git a/sys/net/iflib.h b/sys/net/iflib.h index 9f60085ce4d6..21630297981f 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -36,8 +36,6 @@ #include #include -struct if_clone; - /* * The value type for indexing, limits max descriptors * to 65535 can be conditionally redefined to uint32_t @@ -52,8 +50,6 @@ struct if_shared_ctx; typedef const struct if_shared_ctx *if_shared_ctx_t; struct if_int_delay_info; typedef struct if_int_delay_info *if_int_delay_info_t; -struct if_pseudo; -typedef struct if_pseudo *if_pseudo_t; /* * File organization: @@ -280,7 +276,6 @@ struct if_shared_ctx { int __spare0__; int isc_tx_reclaim_thresh; int isc_flags; - const char *isc_name; }; typedef struct iflib_dma_info { @@ -354,35 +349,13 @@ typedef enum { * Driver needs frames padded to some minimum length */ #define IFLIB_NEED_ETHER_PAD 0x100 -/* - * Packets can be freed immediately after encap - */ -#define IFLIB_TXD_ENCAP_PIO 0x00200 -/* - * Use RX completion handler - */ -#define IFLIB_RX_COMPLETION 0x00400 -/* - * Skip refilling cluster free lists - */ -#define IFLIB_SKIP_CLREFILL 0x00800 -/* - * Don't reset on hang - */ -#define IFLIB_NO_HANG_RESET 0x01000 -/* - * Don't need/want most of the niceties of - * queue management - */ -#define IFLIB_PSEUDO 0x02000 -/* - * No DMA support needed / wanted - */ -#define IFLIB_VIRTUAL 0x04000 -/* - * autogenerate a MAC address - */ -#define IFLIB_GEN_MAC 0x08000 +#define IFLIB_SPARE7 0x200 +#define IFLIB_SPARE6 0x400 +#define IFLIB_SPARE5 0x800 +#define IFLIB_SPARE4 0x1000 +#define IFLIB_SPARE3 0x2000 +#define IFLIB_SPARE2 0x4000 +#define IFLIB_SPARE1 0x8000 /* * Interface needs admin task to ignore interface up/down status */ @@ -396,11 +369,7 @@ typedef enum { * interrupts instead of doing combined RX/TX processing. */ #define IFLIB_SINGLE_IRQ_RX_ONLY 0x40000 -/* - * Don't need/want most of the niceties of - * emulating ethernet - */ -#define IFLIB_PSEUDO_ETHER 0x80000 +#define IFLIB_SPARE0 0x80000 /* * Interface has an admin completion queue */ @@ -520,10 +489,4 @@ void iflib_led_create(if_ctx_t ctx); void iflib_add_int_delay_sysctl(if_ctx_t, const char *, const char *, if_int_delay_info_t, int, int); -/* - * Pseudo device support - */ -if_pseudo_t iflib_clone_register(if_shared_ctx_t); -void iflib_clone_deregister(if_pseudo_t); - #endif /* __IFLIB_H_ */ diff --git a/sys/net/iflib_clone.c b/sys/net/iflib_clone.c deleted file mode 100644 index 32ec0119d33b..000000000000 --- a/sys/net/iflib_clone.c +++ /dev/null @@ -1,303 +0,0 @@ -/*- - * Copyright (c) 2014-2018, Matthew Macy - * Copyright (C) 2017-2018 Joyent Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Neither the name of Matthew Macy nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (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 -__FBSDID("$FreeBSD$"); - -#include "opt_inet.h" -#include "opt_inet6.h" -#include "opt_acpi.h" -#include "opt_sched.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include "ifdi_if.h" - -int -noop_attach(device_t dev) -{ - return (0); -} - -int -iflib_pseudo_detach(device_t dev) -{ - if_ctx_t ctx; - - ctx = device_get_softc(dev); - if ((iflib_get_flags(ctx) & (IFC_INIT_DONE | IFC_IN_DETACH)) == - IFC_INIT_DONE) *** 291 LINES SKIPPED *** From nobody Thu Aug 3 21:46:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH2Tv12frz4V3pt; Thu, 3 Aug 2023 21:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH2Tv0Clwz3YBP; Thu, 3 Aug 2023 21:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691099171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=68ZO0oImg7vwCGJfksOjjSIJUlDyjIe9hA20NgINqRc=; b=OVljv0nFOtWDnUDzdch6OgztwpP83mwAVuWXS+Aza2EH+tVINYKl/ojGf+Uur9kQ0Evdib LiiGja6LNMJ0f+5WhcyVD7N+9rkkTF3+RoITVS3fxtK16mTqSo6QDWZEV3qEQuUnMaduaf mQ6O9jtl1j4MsMCLOjNfQMQihGPl8dCa8jhs8+MdV09T0nuYAwIgo34mvf2UvBmLYD+j15 oIlh/Y4yO9qhhEWLTxryGNLp73FhWaSciB80XuO//qR51ZclCyoaHnALcv9P5keXG8+DTY V6fYrk4GirSW9/00wO9CvBxtjbkK4iCjD0OOSghhSVKf7+dY87eyQjfrtPWfBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691099171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=68ZO0oImg7vwCGJfksOjjSIJUlDyjIe9hA20NgINqRc=; b=GBQayO251csN2p9PFxmS6ObryexICqllnBvhSr84beczLj/3c5cfUkxCJbse37n9TRBshB y/eeFjM9Wn0Qq+alx2+ItOuV0IqjH6iFzlaPkc/QBYdkP1FSeyRgwrvvD6H4png1pDLMAk VtQpKYXOqUo0KBAnNi1HSBlXwOZAlHDUht6o/b6PNfgzIML0iDCz+XNlSSiI7X+dRhboSB h/ZLbOm7mj2NadghSBcLKBSAKp2XqdL5etLE9IvPZ047UuBalrEH53fC6SWbkdS6rvZCKt CWRcVPufZpSlrvwVpMybql7VLDhjV0fHTVFYQDD4QPCdY3+A3nxrGrv2uShu9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691099171; a=rsa-sha256; cv=none; b=NzhtcdbFlVpgT9z4LTEXIwQ3W1T334/CGeTAlBQr01UabhY+zMpZRx0rRQS7dYWX04hOQk f5RrM8lz8YaqAvM9yohWZsfVHCtYEQHFScIhabQMIil+WCth/wiBMRD1R642IsBxHwRqpU j1KTScFkt8Q3PwBqTPATl2rlWzACTeAkoD6JIp0IgwQch91gIan2bo+s9U/LI/5w8M8vUL hOjVlq79qL2qMYp3hUU6+IsUPByxEsyvNGrt30W737r4xuw7C5EzgNbd5Eo9XbZrGAvwkd BzVBWQ63oc6vYUusOPKGY81z//RpCWFGEk+Rz9IkRjUJk/41YqLsNx7NrQfgQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH2Tt6MBjzd6C; Thu, 3 Aug 2023 21:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373LkA5T054896; Thu, 3 Aug 2023 21:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373LkA7i054895; Thu, 3 Aug 2023 21:46:10 GMT (envelope-from git) Date: Thu, 3 Aug 2023 21:46:10 GMT Message-Id: <202308032146.373LkA7i054895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 9051987e40c5 - main - amd64: Bump MAXCPU to 1024 (from 256) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9051987e40c5a1f2396c5ceecff119fb4da28160 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9051987e40c5a1f2396c5ceecff119fb4da28160 commit 9051987e40c5a1f2396c5ceecff119fb4da28160 Author: Ed Maste AuthorDate: 2022-09-30 12:14:22 +0000 Commit: Ed Maste CommitDate: 2023-08-03 21:41:26 +0000 amd64: Bump MAXCPU to 1024 (from 256) Hardware with more than 256 CPU cores is currently available and will become increasingly common over FreeBSD 14's lifetime. Increase MAXCPU in the amd64 GENERIC kernel configuration to 1024. Earlier commits increased some related limits. These prerequisite commits include at least: - d7ed40243769 Increase MAX_APIC_ID safeguard to 0x800 - d1639e43c589 cpuset: increase userland maximum size to 1024 Global and allocated arrays sized by MAXCPU result in excessive bloat on systems with lower core counts. In addition, some code used u_char (8 bits) to hold a CPU index, which is not valid if MAXCPU is greater than 256. A number of recent commits addressed these sorts of issues, including at least: - 133935d26f20 pf: atomically increment state ids - 74ac712f72cf vmm: Dynamically allocate a couple of per-CPU state save areas - 78cfa762ebf2 callout: Move per-CPU callout state into the dpcpu region - 42f722e721cd amd64: store pcids pmap data in pcpu zone - 9801e7c275f6 smp_topo: dynamically allocate group array - 9fb6718d1b18 smp: Dynamically allocate the stoppcbs array - 2bb16c635249 x86: retire use of intr_bind There are some additional allocations still to be converted and more scalability work is required to make effective use of very high core count systems, but this change allows us to boot on these systems and provides a Kernel Binary Interface (KBI) for the FreeBSD 14 release that supports these configurations. Special thanks to AMD for providing hardware to test these changes. PR: 269572 Reviewed by: des Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36838 --- UPDATING | 4 ++++ sys/amd64/include/param.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 8e1b3e8555ba..5889c0ac9903 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20230803: + MAXCPU has been increased to 1024 in the amd64 GENERIC kernel config. + Out-of-tree kernel modules will need to be rebuilt. + 20230724: CAM has been mechanically updated s/u_int(64|32|16|8)_t/uint\1_t/g to move to the standard uintXX_t types from the old, traditional diff --git a/sys/amd64/include/param.h b/sys/amd64/include/param.h index a76be23bbe91..c7e5a5c7fc42 100644 --- a/sys/amd64/include/param.h +++ b/sys/amd64/include/param.h @@ -65,7 +65,7 @@ #ifdef SMP #ifndef MAXCPU -#define MAXCPU 256 +#define MAXCPU 1024 #endif #else #define MAXCPU 1 From nobody Thu Aug 3 22:36:05 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH3bT4b0Jz4V7TS; Thu, 3 Aug 2023 22:36:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH3bT46RWz3dPT; Thu, 3 Aug 2023 22:36:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691102165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=boV0jpb89AK+3nzernSYTHJO+aEfcDeQKM8b068znOo=; b=fgFUV6XZX9HCh6jyB/ExKsZi90eWunDu9R8qM6CRVZ2/f7mFVa9bYv3uj+KOvG3tr6LQq0 /H7OSfXLE9xyaVbGppKOb+Wu6lg9BLIyg8Jb6543/ZbcKfx7ocENC5BR9caL2fW+qIo6GO ETgdm7ZNrFpbThamQesJiqAc2nltyKO2OBxwqh5UAn3OF2zKikgjYY57i+cKt6sexdd+kZ WvUGFjxCKvYBvlQU9M0V+dHM2XrOfNswsSY44nlry42Kisq682SI/O4Nfy1lGIR8iOkLZO W/hcZU0LKPJhLteC+9DsAXzJbeQq0yRqoEjH+waaFjzxknD5+Hj4sjecc4Tb2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691102165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=boV0jpb89AK+3nzernSYTHJO+aEfcDeQKM8b068znOo=; b=iYspPJsxAAJdGHfoRlDjYeDVAkpur1H7p1kgDK2S5apmATqcWSaJUIHwq8RsdFD6on2UjP EKXyLKo2LPegBEUOrEem2MouTYoZu+WmSizie3HIAwVruGhcZlN6mSZtScFDCDLo+IqLRh hRCFY0fbC5ca4pBMEpAZIEQHNk/Kp6hIeiPO0K0tL4NdaudUUZKaWlsBy5/aWDNHGUwooW I9eqfcOXvIMT0WNfNnTFP3zgkSv8K7yRLJwzTXQ+V8Y1RBFhhKhLK1sFt7v5Xrcc2nkLT1 F0w7tCex2rv2H7YhTT3/TyRqtNVgZQ1KtLOCql/8DVvEojDSllwY4FBfa63/Zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691102165; a=rsa-sha256; cv=none; b=njXFFn9SHKfkdIVKWwcjJtb5we5Z/iarA0T3m5fjHM6mJDZTJ34A0M0+aV/IHgjJ7Nxu4/ UhLFiyFAcWCLvFMgAUYfBX4NE0mA/I83uAnkWQuY4DhGdpar31ZZKV0emhxCDZFdewwQxb hXAVMKR9Puk0tNIDw1HLuMY0x7fwZdJlBJbcOGO3gtJ3OyuAJfV0hp1ttadjpN47TJaE0A QsZDi0uDfF8q43w/hpVXvibC5jLxHXh7gU3k84YwkR8iv0r1UJzkAG9Wllo/RdGn1K6ErW f6AmbpaTiUuH3C2nQERRHX1xvvaDHkLX+YRsW060FEanQNbbokTJ6m+jKgNhiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH3bT2nX1zf1g; Thu, 3 Aug 2023 22:36:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373Ma5RS038273; Thu, 3 Aug 2023 22:36:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373Ma5EM038272; Thu, 3 Aug 2023 22:36:05 GMT (envelope-from git) Date: Thu, 3 Aug 2023 22:36:05 GMT Message-Id: <202308032236.373Ma5EM038272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: f1b5488f7bba - main - e1000: Enable TSO for lem(4) and em(4) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1b5488f7bba7f25a57750f87cbcbccbd5b9d16b Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f1b5488f7bba7f25a57750f87cbcbccbd5b9d16b commit f1b5488f7bba7f25a57750f87cbcbccbd5b9d16b Author: Kevin Bowling AuthorDate: 2023-08-03 20:49:15 +0000 Commit: Kevin Bowling CommitDate: 2023-08-03 22:35:28 +0000 e1000: Enable TSO for lem(4) and em(4) Most em(4) devices now enjoy TSO and TSO6, matching NetBSD and Linux defaults. A prior commit automasks TSO on 10/100 Ethernet due to errata and other bugs for IPv6 were fixed recently allowing this. Mike Karels identified a performance anomaly on Intel 82574L devices. These are multiqueue enabled on FreeBSD since the conversion to iflib. I am investigating whether this can be fixed, in the mean time MSI-X with checksum offloads remain default. i219 SPT devices have an errata that downclocks the DMA engine, which results in TSO not being able to acheive line rate. Therefore, it is disabled on: * Intel(R) I219-LM and I219-V SPT * Intel(R) I219-LM and I219-V SPT-H (2) * Intel(R) I219-LM and I219-V LBG (3) * Intel(R) I219-LM and I219-V SPT (4) * Intel(R) I219-LM and I219-V SPT (5) Many lem(4) devices enjoy TSO, exceptions being 82542, 82543, 82547. TSO6 may be possible for some chipsets but I am still working through my testing matrix and that is hidden behind hw.em.unsupported_tso. If you encounter issues, you may disable TSO with for example: ifconfig em0 -tso -tso6. I ask to be informed of any deviations from normal operation requiring this. Thanks to cc@ for access to emulab.net. On a sample I219 system it saves about 16% CPU on IPv4 and 19% on IPv6. iperf3 -Vc reported numbers: total% user% system% IPv4 TSO 21.3 7 14.4 21.4 6 15.4 21.5 6 15.5 IPv4 no TSO 36.8 5.4 31.4 38.5 5.1 33.5 38.2 5.7 32.6 IPv4 no TSO no TXCSUM 45.1 5.8 39.3 46 6.3 39.7 46.2 5.9 40.4 IPv6 TSO6 21.7 5.4 16.3 21.6 5.1 16.5 21.9 5.6 16.3 IPv6 no TSO6 41.2 5.2 36 41 5.1 36 40.8 5.2 35.7 IPv6 no TSO6 no TXCSUM6 49 5.9 43.1 48.8 4.9 43.9 49 5.6 43.4 Tested by: cc (lem(4)), karels (82574L) MFC after: 3 months Relnotes: yes Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D41170 --- sys/dev/e1000/if_em.c | 66 +++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 1da0579cdce9..fefd1e3f411c 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -903,25 +903,19 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_tso_size_max = EM_TSO_SIZE; scctx->isc_tx_tso_segsize_max = EM_TSO_SEG_SIZE; scctx->isc_capabilities = scctx->isc_capenable = EM_CAPS; - /* - * For EM-class devices, don't enable IFCAP_{TSO4,VLAN_HWTSO,TSO6} - * by default as we don't have workarounds for all associated - * silicon errata. E. g., with several MACs such as 82573E, - * TSO only works at Gigabit speed and otherwise can cause the - * hardware to hang (which also would be next to impossible to - * work around given that already queued TSO-using descriptors - * would need to be flushed and vlan(4) reconfigured at runtime - * in case of a link speed change). Moreover, MACs like 82579 - * still can hang at Gigabit even with all publicly documented - * TSO workarounds implemented. Generally, the penality of - * these workarounds is rather high and may involve copying - * mbuf data around so advantages of TSO lapse. Still, TSO may - * work for a few MACs of this class - at least when sticking - * with Gigabit - in which case users may enable TSO manually. - */ - scctx->isc_capenable &= ~(IFCAP_TSO4 | IFCAP_VLAN_HWTSO | IFCAP_TSO6); scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; + + /* Disable TSO on 82574L due to performance loss being investigated */ + if (hw->mac.type == e1000_82574) + scctx->isc_capenable &= ~IFCAP_TSO; + /* + * Disable TSO on SPT due to errata that downclocks DMA performance + * i218-i219 Specification Update 1.5.4.5 + */ + if (hw->mac.type == e1000_pch_spt) + scctx->isc_capenable &= ~IFCAP_TSO; + /* * We support MSI-X with 82574 only, but indicate to iflib(4) * that it shall give MSI at least a try with other devices. @@ -944,24 +938,38 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_capabilities = scctx->isc_capenable = LEM_CAPS; if (em_unsupported_tso) scctx->isc_capabilities |= IFCAP_TSO6; - /* - * For LEM-class devices, don't enable IFCAP_{TSO4,VLAN_HWTSO} - * by default as we don't have workarounds for all associated - * silicon errata. TSO4 may work on > 82544 but its status - * is unknown by the authors. Please report any success or failures. - */ - scctx->isc_capenable &= ~(IFCAP_TSO4 | IFCAP_VLAN_HWTSO); scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; + /* 82541ER doesn't do HW tagging */ + if (hw->device_id == E1000_DEV_ID_82541ER || + hw->device_id == E1000_DEV_ID_82541ER_LOM) { + scctx->isc_capabilities &= ~IFCAP_VLAN_HWTAGGING; + scctx->isc_capenable = scctx->isc_capabilities; + } + /* This is the first e1000 chip and it does not do offloads */ + if (hw->mac.type == e1000_82542) { + scctx->isc_capabilities &= ~(IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | + IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_HWFILTER | IFCAP_TSO | IFCAP_VLAN_HWTSO); + scctx->isc_capenable = scctx->isc_capabilities; + } + /* These can't do TSO for various reasons */ + if (hw->mac.type < e1000_82544 || hw->mac.type == e1000_82547 || + hw->mac.type == e1000_82547_rev_2) { + scctx->isc_capabilities &= ~(IFCAP_TSO | IFCAP_VLAN_HWTSO); + scctx->isc_capenable = scctx->isc_capabilities; + } + /* XXXKB: No IPv6 before this? */ + if (hw->mac.type < e1000_82545){ + scctx->isc_capabilities &= ~IFCAP_HWCSUM_IPV6; + scctx->isc_capenable = scctx->isc_capabilities; + } /* "PCI/PCI-X SDM 4.0" page 33 (b) - FDX requirement on these chips */ - if (hw->mac.type == e1000_82542 || hw->mac.type == e1000_82547 || - hw->mac.type == e1000_82547_rev_2) + if (hw->mac.type == e1000_82547 || hw->mac.type == e1000_82547_rev_2) scctx->isc_capenable &= ~(IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_HWCSUM_IPV6); - /* 82541ER doesn't do HW tagging */ - if (hw->device_id == E1000_DEV_ID_82541ER || hw->device_id == E1000_DEV_ID_82541ER_LOM) - scctx->isc_capenable &= ~IFCAP_VLAN_HWTAGGING; + /* INTx only */ scctx->isc_msix_bar = 0; } From nobody Thu Aug 3 22:55:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH42G0BD1z4V9Gj; Thu, 3 Aug 2023 22:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH42F6gpSz3gXM; Thu, 3 Aug 2023 22:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691103349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xw5au0iCs8fkBJKLl2TrZmqNh+J52CDU7A458yZ9ugg=; b=BrU/q0OFzQpJX0N35yhSz6Onw5bKXAEvUefoB4VBG0UVFyicLyYEmZaThiYk+t1/rDUA7Z RXnMhlco5U4L4rX0nJk9QycFcYDvC2Biv865soFKZch+JPmVBQOch/F1E6O6aDb9QDrXj2 77bEP75Ugd6B/B4bEQpLi+KWO0a5742566/lugRqVq5dX+dzykvOtRJWk4OKN0mvPgEVmE L6fJcg5PBArIviHjICRi/TldNaPhfeHlyN8aqX/Ev+TPuLq4R1KYB+tf4utXEPNtx2428s RE58q5oK6p6sSZmifgQezvL+cuRIr1rNEVP7JVRzfm/m7RR0Lk6ZM09EcVWnOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691103349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xw5au0iCs8fkBJKLl2TrZmqNh+J52CDU7A458yZ9ugg=; b=GqovicpfWVMfN0Mrqo0BQrVwPag4Z6d/iav+wsNYiAdwceD99yH3khdcQ5M//SLP3GAt12 OmrnKen7xjeZ5PMI+CaLMwpbtr7kf73QpaoLPst2vak8GuJ+QIZKDsLwmIAsum5ttpmyAB NckhqFQ0qTg82LMzMBXpx9+PnDCn8dzcG7C2tYPzEzjtQfj6k4pxWsEdR9AfQe0Ej0nqHu SC3ygJYnhsZ796r9saCGbz87HIfLvF0LIomnvv1eWgr3HVYsqcY9psRwMG/iFp7Krr6qAk dmxpXKMczBFbMXBAWKOUq6rm22HEEIxrxmdkvXSfcj6qQVHgefyt2en16EvF5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691103349; a=rsa-sha256; cv=none; b=Mr2E8aaJz2b+e/72h8NweuAW6/pIeoiNQQ/sTLSxq4bhTtD4WOKs8raNznaTPas8oROLMm GoQnsK185fL1tNe0ZZmMRNk/YknmaPVmwynv3IHxq38rGjBBqf2slxL/WqeltlPPhX+J5I JCcQdH6B0y2n/zCnTR8TaCwzoTLVHD1mCiBp/3nxcYUrl2CdU4x70CFsE/fo1TfrjHDWy4 fsVwnFdIO5xo1UIvm1Ma3glbgDh1KC6MypiDM7+c04XAuQJFojiaXfD+DHmUnn4weaaZRP rzb7Sd0jIUcw0HmhpRK+HYkg28cZMhvblFmgyyyBJJLzE1I2fJc1fhbskauENA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH42F5kTTzfmW; Thu, 3 Aug 2023 22:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373Mtn7R072012; Thu, 3 Aug 2023 22:55:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373MtnOY072011; Thu, 3 Aug 2023 22:55:49 GMT (envelope-from git) Date: Thu, 3 Aug 2023 22:55:49 GMT Message-Id: <202308032255.373MtnOY072011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: ad2fac552c3f - main - lib/libc/amd64: add archlevel-based simd dispatch framework List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad2fac552c3fcb577feb3055fa083f2d256c06ed Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=ad2fac552c3fcb577feb3055fa083f2d256c06ed commit ad2fac552c3fcb577feb3055fa083f2d256c06ed Author: Robert Clausecker AuthorDate: 2023-08-03 22:47:31 +0000 Commit: Robert Clausecker CommitDate: 2023-08-03 22:53:43 +0000 lib/libc/amd64: add archlevel-based simd dispatch framework Add a framework for selecting from one of multiple implementations of a function based on amd64 architecture level (cf. amd64 SysV ABI supplement). Sponsored by: The FreeBSD Foundation Approved by: kib Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D40693 --- lib/libc/amd64/amd64_archlevel.h | 90 ++++++++++++ lib/libc/amd64/string/Makefile.inc | 1 + lib/libc/amd64/string/amd64_archlevel.c | 241 ++++++++++++++++++++++++++++++++ 3 files changed, 332 insertions(+) diff --git a/lib/libc/amd64/amd64_archlevel.h b/lib/libc/amd64/amd64_archlevel.h new file mode 100644 index 000000000000..047beb9855d1 --- /dev/null +++ b/lib/libc/amd64/amd64_archlevel.h @@ -0,0 +1,90 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE + */ + +/* must be macros so they can be accessed from assembly */ +#define X86_64_SCALAR 0 /* disable SIMD optimisations */ +#define X86_64_BASELINE 1 /* CMOV, CX8, FPU, FXSR, MMX, OSFXSR, SSE, SSE2 */ +#define X86_64_V2 2 /* CMPXCHG16B, LAHF-SAHF, POPCNT, SSE3, SSSE3, SSE4_1, SSE4_2 */ +#define X86_64_V3 3 /* AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE */ +#define X86_64_V4 4 /* AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL */ + +#define X86_64_MAX X86_64_V4 /* highest supported architecture level */ +#define X86_64_UNDEFINED -1 /* architecture level not set yet */ + +#ifndef __ASSEMBLER__ +#include + +dlfunc_t __archlevel_resolve(u_int, u_int, u_int, u_int, + int32_t[X86_64_MAX + 1]) __hidden; +#else +#include + +#define ARCHRESOLVE(func) \ + .globl CNAME(func); \ + .type CNAME(func), @gnu_indirect_function; \ + .set CNAME(func), __CONCAT(func,_resolver); \ + ARCHENTRY(func, resolver); \ + lea __CONCAT(func,_funcs)(%rip), %r8; \ + jmp CNAME(__archlevel_resolve); \ + ARCHEND(func, resolver) + +/* + * The func_funcs array stores the location of the implementations + * as the distance from the func_funcs array to the function. Due + * to compiling for the medium code model, a 32 bit integer suffices + * to hold the distance. + * + * Doing it this way both saves storage and avoids giving rtld + * relocations to process at load time. + */ +#define ARCHFUNCS(func) \ + ARCHRESOLVE(func); \ + .section .rodata; \ + .align 4; \ + __CONCAT(func,_funcs): + +#define NOARCHFUNC \ + .4byte 0 + +#define ARCHFUNC(func, level) \ + .4byte __CONCAT(__CONCAT(func,_),level) - __CONCAT(func,_funcs) + +#define ENDARCHFUNCS(func) \ + .zero 4*(X86_64_MAX+1)-(.-__CONCAT(func,_funcs)); \ + .size __CONCAT(func,_funcs), .-__CONCAT(func,_funcs) + +#define ARCHENTRY(func, level) \ + _START_ENTRY; \ + .type __CONCAT(__CONCAT(func,_),level), @function; \ + __CONCAT(__CONCAT(func,_),level):; \ + .cfi_startproc + +#define ARCHEND(func, level) \ + END(__CONCAT(__CONCAT(func,_),level)) + +#endif /* __ASSEMBLER__ */ diff --git a/lib/libc/amd64/string/Makefile.inc b/lib/libc/amd64/string/Makefile.inc index cb370bc6be1c..1bfefa7be98c 100644 --- a/lib/libc/amd64/string/Makefile.inc +++ b/lib/libc/amd64/string/Makefile.inc @@ -1,6 +1,7 @@ # $FreeBSD$ MDSRCS+= \ + amd64_archlevel.c \ bcmp.S \ memcmp.S \ memcpy.S \ diff --git a/lib/libc/amd64/string/amd64_archlevel.c b/lib/libc/amd64/string/amd64_archlevel.c new file mode 100644 index 000000000000..c06566658c59 --- /dev/null +++ b/lib/libc/amd64/string/amd64_archlevel.c @@ -0,0 +1,241 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (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 + +#include "amd64_archlevel.h" +#include "libc_private.h" + +#define ARCHLEVEL_ENV "ARCHLEVEL" + +static volatile int amd64_archlevel = X86_64_UNDEFINED; + +static const struct archlevel { + char name[10]; + /* CPUID feature bits that need to be present */ + u_int feat_edx, feat_ecx, amd_ecx, ext_ebx; +} levels[] = { + { + .name = "scalar", + .feat_edx = 0, + .feat_ecx = 0, + .amd_ecx = 0, + .ext_ebx = 0, + }, { +#define FEAT_EDX_BASELINE (CPUID_FPU | CPUID_CX8 | CPUID_CMOV | CPUID_MMX | \ + CPUID_FXSR | CPUID_SSE | CPUID_SSE2) + .name = "baseline", + .feat_edx = FEAT_EDX_BASELINE, + .feat_ecx = 0, + .amd_ecx = 0, + .ext_ebx = 0, + }, { +#define FEAT_ECX_V2 (CPUID2_SSE3 | CPUID2_SSSE3 | CPUID2_CX16 | CPUID2_SSE41 | \ + CPUID2_SSE42 | CPUID2_POPCNT) +#define AMD_ECX_V2 AMDID2_LAHF + .name = "x86-64-v2", + .feat_edx = FEAT_EDX_BASELINE, + .feat_ecx = FEAT_ECX_V2, + .amd_ecx = AMD_ECX_V2, + .ext_ebx = 0, + }, { +#define FEAT_ECX_V3 (FEAT_ECX_V2 | CPUID2_FMA | CPUID2_MOVBE | \ + CPUID2_OSXSAVE | CPUID2_AVX | CPUID2_F16C) +#define AMD_ECX_V3 (AMD_ECX_V2 | AMDID2_ABM) +#define EXT_EBX_V3 (CPUID_STDEXT_BMI1 | CPUID_STDEXT_AVX2 | CPUID_STDEXT_BMI2) + .name = "x86-64-v3", + .feat_edx = FEAT_EDX_BASELINE, + .feat_ecx = FEAT_ECX_V3, + .amd_ecx = AMD_ECX_V3, + .ext_ebx = EXT_EBX_V3, + }, { +#define EXT_EBX_V4 (EXT_EBX_V3 | CPUID_STDEXT_AVX512F | \ + CPUID_STDEXT_AVX512DQ | CPUID_STDEXT_AVX512CD | \ + CPUID_STDEXT_AVX512BW | CPUID_STDEXT_AVX512VL) + .name = "x86-64-v4", + .feat_edx = FEAT_EDX_BASELINE, + .feat_ecx = FEAT_ECX_V3, + .amd_ecx = AMD_ECX_V3, + .ext_ebx = EXT_EBX_V4, + } +}; + +static int +supported_archlevel(u_int feat_edx, u_int feat_ecx, u_int ext_ebx, u_int ext_ecx) +{ + int level; + u_int p[4], max_leaf; + u_int amd_ecx = 0; + + (void)ext_ecx; + + do_cpuid(0x80000000, p); + max_leaf = p[0]; + + if (max_leaf >= 0x80000001) { + do_cpuid(0x80000001, p); + amd_ecx = p[2]; + } + + for (level = X86_64_BASELINE; level <= X86_64_MAX; level++) { + const struct archlevel *lvl = &levels[level]; + + if ((lvl->feat_edx & feat_edx) != lvl->feat_edx || + (lvl->feat_ecx & feat_ecx) != lvl->feat_ecx || + (lvl->amd_ecx & amd_ecx) != lvl->amd_ecx || + (lvl->ext_ebx & ext_ebx) != lvl->ext_ebx) + return (level - 1); + } + + return (X86_64_MAX); +} + +static int +match_archlevel(const char *str, int *force) +{ + int level, want_force = 0; + + *force = 0; + + if (str[0] == '!') { + str++; + want_force = 1; + } + + for (level = 0; level <= X86_64_MAX; level++) { + size_t i; + const char *candidate = levels[level].name; + + /* can't use strcmp here: would recurse during ifunc resolution */ + for (i = 0; str[i] == candidate[i]; i++) + /* suffixes starting with : or + are ignored for future extensions */ + if (str[i] == '\0' || str[i] == ':' || str[i] == '+') { + if (want_force) + *force = 1; + + return (level); + } + } + + return (X86_64_UNDEFINED); +} + +/* + * We can't use getenv(), strcmp(), and a bunch of other functions here as + * they may in turn call SIMD-optimised string functions. + * + * *force is set to 1 if the architecture level is valid and begins with a ! + * and to 0 otherwise. + */ +static int +env_archlevel(int *force) +{ + size_t i; + + if (environ == NULL) + return (X86_64_UNDEFINED); + + for (i = 0; environ[i] != NULL; i++) { + size_t j; + + for (j = 0; environ[i][j] == ARCHLEVEL_ENV "="[j]; j++) + if (environ[i][j] == '=') + return (match_archlevel(&environ[i][j + 1], force)); + } + + *force = 0; + + return (X86_64_UNDEFINED); + +} + +/* + * Determine the architecture level by checking the CPU capabilities + * and the environment: + * + * 1. If environment variable ARCHLEVEL starts with a ! and is followed + * by a valid architecture level, that level is returned. + * 2. Else if ARCHLEVEL is set to a valid architecture level that is + * supported by the CPU, that level is returned. + * 3. Else the highest architecture level supported by the CPU is + * returned. + * + * Valid architecture levels are those defined in the levels array. + * The architecture level "scalar" indicates that SIMD enhancements + * shall not be used. + */ +static int +archlevel(u_int feat_edx, u_int feat_ecx, u_int ext_ebx, u_int ext_ecx) +{ + int islevel, wantlevel, hwlevel, force; + + islevel = atomic_load_int(&amd64_archlevel); + if (islevel != X86_64_UNDEFINED) + return (islevel); + + wantlevel = env_archlevel(&force); + if (!force) { + hwlevel = supported_archlevel(feat_edx, feat_ecx, ext_ebx, ext_ecx); + if (wantlevel == X86_64_UNDEFINED || wantlevel > hwlevel) + wantlevel = hwlevel; + } + + /* + * Ensure amd64_archlevel is set only once and + * all calls agree on what it was set to. + */ + if (atomic_cmpset_int(&amd64_archlevel, islevel, wantlevel)) + return (wantlevel); + else + return (atomic_load_int(&amd64_archlevel)); +} + +/* + * Helper function for SIMD ifunc dispatch: select the highest level + * implementation up to the current architecture level. + */ +dlfunc_t +__archlevel_resolve(u_int feat_edx, u_int feat_ecx, u_int ext_ebx, + u_int ext_ecx, int32_t funcs[static X86_64_MAX + 1]) +{ + int level; + + for (level = archlevel(feat_edx, feat_ecx, ext_ebx, ext_ecx); level >= 0; level--) + if (funcs[level] != 0) + return (dlfunc_t)((uintptr_t)funcs + (ptrdiff_t)funcs[level]); + + /* no function is present -- what now? */ + __builtin_trap(); +} From nobody Thu Aug 3 22:55:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH42H25TZz4V9DY; Thu, 3 Aug 2023 22:55:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH42H0Qy9z3gml; Thu, 3 Aug 2023 22:55:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691103351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zH2IbkPVHgGJch1ASU0gf3whyU8Kv4ElyWQeCwaBHSI=; b=jtSDafJoIUmsPoXEZdZvGw6czAeQdHs8VgfEG3Nz6GzkdSvjEv+Bv4oTzArGt+3Dsa76nh 31NPdYBrgMlkMfxBz315o6tO5tXbZkNVgV5hVUkO05KMpB3yvG0BWQcfxiGsmNoBgjNKt+ 8vUHvhQj61SP0OZdQIEZgpw2ciaqg1t5/BDHkT/sN9z5mBMbuLRtumZwAi5QO1mWWFG75+ GHrMYp3xjv3ZNeVZozRCXCGCZPJpq8C8CXe4FrFCzQqof0CIvup73Nvnlt0cZ5jCTiVrM+ T3Z9FEdUPbkCChUGI4LVAraWJkBKzUZXeO1Yd6gP93+hpS50SsDbXIuqaymoqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691103351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zH2IbkPVHgGJch1ASU0gf3whyU8Kv4ElyWQeCwaBHSI=; b=P5yuZF6jMmpTWWgO8INe4dCq/6W90lcRWyrCvU4ChdkOzfo6DNk3E1U0woCQjESx565kVV c+yU81HA4vOSzFOE4dzC+imxTQD3mJwBPusFWlnuVPXWfX6+qrdMQJB8JIMAhqbxhjEBvF x0X830Gz1mQpArwEDL7fRJVGqjQs0ONtlACfZT49O6lz9/nz3t+srJwQFVOyliTrWW2Uyd +fiZT8hs1RAaDbTZK41YjFDqHmIYSOnyrRFDqhXzwiSLVB8VG9ZVrroZ6CqhekEbTSonYU q1HZK7j6rFrKJyAAoQNqHIoN9zA7rlHYTeMtq4W76SQFBWHs6FUNG1go5VTLlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691103351; a=rsa-sha256; cv=none; b=bzw7f/WD1ITtVg2be+1ybdyULzugmZGHRpnIFAP54x/Ix5FxpmYlzDGK9GiymAdSvJ8Yie Fpqr0SgVwKXv8SPbQ//gu4R+dB2PZ8ykZqsFvHFbO+QZN/2j2pKs5oSqk31TIk2zFt5YKX oHGfPqnmVh3DCkbXZJcLyG/MPBv5jbooEWbUIQ55bdmJip8vkC8bAA4LLzl7/2VQqWIq7Z 8Lr1W03RSKMnd0/DtxYH7GEF6afodloE3Bju00M6nU82AaUGPkYXJpVT330FiA53pW0lRS QbC6RI9tz7LFh8M6HK53g7ClzYc7tFiNdIjguLqMe67NlRqmyuRgNYGwift9pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH42G6NwJzfmX; Thu, 3 Aug 2023 22:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373MtoKj072031; Thu, 3 Aug 2023 22:55:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373Mtolv072030; Thu, 3 Aug 2023 22:55:50 GMT (envelope-from git) Date: Thu, 3 Aug 2023 22:55:50 GMT Message-Id: <202308032255.373Mtolv072030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: d8385768fb12 - main - lib/libc/amd64/string/strlen.S: add amd64 baseline kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8385768fb12e6205d73a20ad05fba9f3281b6e1 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=d8385768fb12e6205d73a20ad05fba9f3281b6e1 commit d8385768fb12e6205d73a20ad05fba9f3281b6e1 Author: Robert Clausecker AuthorDate: 2023-08-03 22:48:32 +0000 Commit: Robert Clausecker CommitDate: 2023-08-03 22:54:23 +0000 lib/libc/amd64/string/strlen.S: add amd64 baseline kernel This performs very well. x86-64-v3 and x86-64-v4 kernels were written, too, but performed worse than the baseline kernel on short strings. These may be added at a future point in time if the performance issues can be fixed. os: FreeBSD arch: amd64 cpu: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz │ strlen_scalar.out │ strlen_baseline.out │ │ B/s │ B/s vs base │ Short 1.667Gi ± 1% 2.676Gi ± 1% +60.55% (p=0.000 n=20) Mid 5.459Gi ± 1% 8.756Gi ± 1% +60.39% (p=0.000 n=20) Long 15.34Gi ± 0% 52.27Gi ± 0% +240.64% (p=0.000 n=20) geomean 5.188Gi 10.70Gi +106.24% Sponsored by: The FreeBSD Foundation Approved by: kib Reviewed by: mjg jrtc27 Differential Revision: https://reviews.freebsd.org/D40693 --- lib/libc/amd64/string/strlen.S | 58 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/lib/libc/amd64/string/strlen.S b/lib/libc/amd64/string/strlen.S index 1d2428e3420e..7e2514de44b0 100644 --- a/lib/libc/amd64/string/strlen.S +++ b/lib/libc/amd64/string/strlen.S @@ -1,11 +1,18 @@ -/* +/*- * Written by Mateusz Guzik + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by Robert Clausecker + * under sponsorship from the FreeBSD Foundation. + * * Public domain. */ #include __FBSDID("$FreeBSD$"); +#include "amd64_archlevel.h" + /* * Note: this routine was written with kernel use in mind (read: no simd), * it is only present in userspace as a temporary measure until something @@ -14,6 +21,11 @@ __FBSDID("$FreeBSD$"); #define ALIGN_TEXT .p2align 4,0x90 /* 16-byte alignment, nop filled */ +ARCHFUNCS(strlen) + ARCHFUNC(strlen, scalar) + ARCHFUNC(strlen, baseline) +ENDARCHFUNCS(strlen) + /* * strlen(string) * %rdi @@ -30,7 +42,7 @@ __FBSDID("$FreeBSD$"); * * The latter contains a 32-bit variant of the same algorithm coded in assembly for i386. */ -ENTRY(strlen) +ARCHENTRY(strlen, scalar) movabsq $0xfefefefefefefeff,%r8 movabsq $0x8080808080808080,%r9 @@ -76,6 +88,46 @@ ENTRY(strlen) leaq (%rcx,%rdi),%rax subq %r10,%rax ret -END(strlen) +ARCHEND(strlen, scalar) + +ARCHENTRY(strlen, baseline) + mov %rdi, %rcx + pxor %xmm1, %xmm1 + and $~0xf, %rdi # align string + pcmpeqb (%rdi), %xmm1 # compare head (with junk before string) + mov %rcx, %rsi # string pointer copy for later + and $0xf, %ecx # amount of bytes rdi is past 16 byte alignment + pmovmskb %xmm1, %eax + add $32, %rdi # advance to next iteration + shr %cl, %eax # clear out matches in junk bytes + test %eax, %eax # any match? (can't use ZF from SHR as CL=0 is possible) + jnz 2f + + ALIGN_TEXT +1: pxor %xmm1, %xmm1 + pcmpeqb -16(%rdi), %xmm1 # find NUL bytes + pmovmskb %xmm1, %eax + test %eax, %eax # were any NUL bytes present? + jnz 3f + + /* the same unrolled once more */ + pxor %xmm1, %xmm1 + pcmpeqb (%rdi), %xmm1 + pmovmskb %xmm1, %eax + add $32, %rdi # advance to next iteration + test %eax, %eax + jz 1b + + /* match found in loop body */ + sub $16, %rdi # undo half the advancement +3: tzcnt %eax, %eax # find the first NUL byte + sub %rsi, %rdi # string length until beginning of (%rdi) + lea -16(%rdi, %rax, 1), %rax # that plus loc. of NUL byte: full string length + ret + + /* match found in head */ +2: tzcnt %eax, %eax # compute string length + ret +ARCHEND(strlen, baseline) .section .note.GNU-stack,"",%progbits From nobody Thu Aug 3 22:55:51 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH42J2gRYz4V9Bt; Thu, 3 Aug 2023 22:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH42J1d1Qz3gY7; Thu, 3 Aug 2023 22:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691103352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wWmB5schb2nhe0+3jYFTItVqLpoF4y4Cp9lgi9lwB68=; b=oz925CnWC0bGRTiFCtWkJVqsvfwgL0S/g3JZGEoerXtkQ7OSf+uGJXSbXM5TRggkORJDqg 1vlw6aHme9V2+fVBFHEOQzRHA86cGspTqeXZerpRdoy3I2ZzWxRU10CEqA1peqqcUw/+6b JXaBGaaSNcWTkCSqVVmNUfK+AW/ow+eDhBR1edu2yeyf4Qqbh7wgsjyARUwsQL2rjbCdMW XVgmJh0Qwb+pMI7zxfeB8AV4/puuqIVG7mOkcWfr8QQ/kp/fx/tdD60Aa8tnt1Q2CVeyzJ EzSoo6OKlxyiSfsHWGC+bOTPPShQmrMkK+AKUvYjlUHrg0t+fe59wjpeCXE/8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691103352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wWmB5schb2nhe0+3jYFTItVqLpoF4y4Cp9lgi9lwB68=; b=HFpvryuYmA8SJmFCuwt491FYNLBb2NcZRUGGj6jHMsO5L9tEqbDRP9EZltxqtZYaWQ/BmH IOLI6Thg7n41pJwZpPTOZ7jHBTw4uh26Nc+PFlZCYScGm5WE1i0cTv1FWp7yAJqcD0SU+4 4LI7v6LFNtT5/8ipEYMaApbYfFJn5C0VEyjKOHI9h/ygjqX58TMbAGz2yb2SM3zooFKzJs uR10tk9hMjHtxY9UeCT1cfxoVO6NHjainHb+gfoIXfQt9I4bBPiBi8aAwtril0cyqXMF1z qiNxUP4zIm6lMmUbzSgzT59OaBSbrT0YK7mve4ylv1kgn6/KEvUen6Hs7QAcmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691103352; a=rsa-sha256; cv=none; b=oY7GK7XnF5p8TNqzoM/5gfJHCXCK1tuYyhX/y6AtJAVVjOofRNEi4daWLtVdxr6tO/yH51 2UFugL4QRFwrgHB2xu+3TC/FIxHvRAZ8zM4U31Pn6Ejm05KfrUr7fJVdGW5pDpKBDnelBy KOrZJhu829fSHpRuEi1PjyjG7sx271V8xN0xaN/oMSaXo5TKXGdXUoYvJf56EzmAWuVDAA S50DxP1HGxVVCBiC47ZtvR91RPK2AlwES7BVHMeAEk1thoDbRn6fGB33bVqb9QcRujA+Sd 5sDDRC9xKL1B2a89uYEJDMsLt7fl18uTsu34a3eo6Sn3j+Zg6p/PETVUsvZ4sA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH42J0RwbzfmY; Thu, 3 Aug 2023 22:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373MtpTB072053; Thu, 3 Aug 2023 22:55:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373Mtp3i072052; Thu, 3 Aug 2023 22:55:51 GMT (envelope-from git) Date: Thu, 3 Aug 2023 22:55:51 GMT Message-Id: <202308032255.373Mtp3i072052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 0588819779cd - main - share/man/man7: document libc simd usage in new man page simd(7) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0588819779cd82dc8fd9a1b63bcb531b296986eb Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=0588819779cd82dc8fd9a1b63bcb531b296986eb commit 0588819779cd82dc8fd9a1b63bcb531b296986eb Author: Robert Clausecker AuthorDate: 2023-08-03 22:51:31 +0000 Commit: Robert Clausecker CommitDate: 2023-08-03 22:54:44 +0000 share/man/man7: document libc simd usage in new man page simd(7) This documents SIMD usage in libc for all architectures with specific details on the new amd64 SIMD dispatch framework. Sponsored by: The FreeBSD Foundation Approved by: kib Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40693 --- share/man/man7/Makefile | 1 + share/man/man7/simd.7 | 226 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 227 insertions(+) diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index f50e31cdeb11..56ade5092275 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -26,6 +26,7 @@ MAN= arch.7 \ release.7 \ sdoc.7 \ security.7 \ + simd.7 \ sizeof.7 \ sprog.7 \ stats.7 \ diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 new file mode 100644 index 000000000000..c8e17cb9e0ef --- /dev/null +++ b/share/man/man7/simd.7 @@ -0,0 +1,226 @@ +.\" Copyright (c) 2023 The FreeBSD Foundation +. +.\" This documentation was written by Robert Clausecker +.\" under sponsorship from the FreeBSD Foundation. +. +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE +. +.Dd July 3, 2023 +.Dt SIMD 7 +.Os +.Sh NAME +.Nm simd +.Nd SIMD enhancements +. +.Sh DESCRIPTION +On some architectures, the +.Fx +.Em libc +provides enhanced implementations of commonly used functions, replacing +the architecture-independent implementations used otherwise. +Depending on architecture and function, an enhanced +implementation of a function may either always be used or the +.Em libc +detects at runtime which SIMD instruction set extensions are +supported and picks the most suitable implementation automatically. +On +.Cm amd64 , +the environment variable +.Ev ARCHLEVEL +can be used to override this mechanism. +.Pp +Enhanced functions are present in the following architectures: +.Bl -column FUNCTION_ aarch64_ arm_ amd64_ i386_ ppc64_ -offset indent +.It Em FUNCTION Ta Em AARCH64 Ta Em ARM Ta Em AMD64 Ta Em I386 Ta Em PPC64 +.It bcmp Ta Ta Ta S Ta S +.It bcopy Ta Ta S Ta S Ta S Ta SV +.It bzero Ta Ta S Ta S Ta S +.It div Ta Ta Ta S Ta S +.It index Ta S +.It ldiv Ta Ta Ta S Ta S +.It lldiv Ta Ta Ta S +.It memcmp Ta Ta S Ta S Ta S +.It memcpy Ta S Ta S Ta S Ta S Ta SV +.It memmove Ta S Ta S Ta S Ta S Ta SV +.It memset Ta Ta S Ta S Ta S +.It rindex Ta S +.It stpcpy Ta Ta Ta S +.It strcat Ta Ta Ta S Ta S +.It strchr Ta S Ta Ta Ta S +.It strcmp Ta Ta S Ta S Ta S +.It strcpy Ta Ta Ta S Ta S Ta S2 +.It strlen Ta Ta S Ta S134 +.It strncmp Ta Ta S Ta Ta S +.It strncpy Ta Ta Ta Ta Ta S2 +.It strrchr Ta S Ta Ta Ta S +.It swab Ta Ta Ta Ta S +.It wcschr Ta Ta Ta Ta S +.It wcscmp Ta Ta Ta Ta S +.It wcslen Ta Ta Ta Ta S +.It wmemchr Ta Ta Ta Ta S +.El +.Pp +.Sy S Ns :\ scalar (non-SIMD), +.Sy 1 Ns :\ amd64 baseline, +.Sy 2 Ns :\ x86-64-v2 +or PowerPC\ 2.05, +.Sy 3 Ns :\ x86-64-v3, +.Sy 4 Ns :\ x86-64-v4, +.Sy V Ns :\ PowerPC\ VSX. +. +.Sh ENVIRONMENT +.Bl -tag +.It Ev ARCHLEVEL +On +.Em amd64 , +controls the level of SIMD enhancements used. +If this variable is set to an architecture level from the list below +and that architecture level is supported by the processor, SIMD +enhancements up to +.Ev ARCHLEVEL +are used. +If +.Ev ARCHLEVEL +is unset, not recognised, or not supported by the processor, the highest +level of SIMD enhancements supported by the processor is used. +.Pp +A suffix beginning with +.Sq ":" +or +.Sq "+" +in +.Ev ARCHLEVEL +is ignored and may be used for future extensions. +The architecture level can be prefixed with a +.Sq "!" +character to force use of the requested architecture level, even if the +processor does not advertise that it is supported. +This usually causes applications to crash and should only be used for +testing purposes or if architecture level detection yields incorrect +results. +.Pp +The architecture levels follow the AMD64 SysV ABI supplement: +.Bl -tag -width x86-64-v2 +.It Cm scalar +scalar enhancements only (no SIMD) +.It Cm baseline +cmov, cx8, x87 FPU, fxsr, MMX, osfxsr, SSE, SSE2 +.It Cm x86-64-v2 +cx16, lahf/sahf, popcnt, SSE3, SSSE3, SSE4.1, SSE4.2 +.It Cm x86-64-v3 +AVX, AVX2, BMI1, BMI2, F16C, FMA, lzcnt, movbe, osxsave +.It Cm x86-64-v4 +AVX-512F/BW/CD/DQ/VL +.El +.El +. +.Sh DIAGNOSTICS +.Bl -diag +.It "Illegal Instruction" +Printed by +.Xr sh 1 +if a command is terminated through delivery of a +.Dv SIGILL +signal, see +.Xr signal 3 . +.Pp +Use of an unsupported architecture level was forced by setting +.Ev ARCHLEVEL +to a string beginning with a +.Sq "!" +character, causing a process to crash due to use of an unsupported +instruction. +Unset +.Ev ARCHLEVEL , +remove the +.Sq "!" +prefix or select a supported architecture level. +.Pp +Message may also appear for unrelated reasons. +.El +. +.Sh SEE ALSO +.Xr string 3 , +.Xr arch 7 +.Rs +.%A H. J. Lu +.%A Michael Matz +.%A Milind Girkar +.%A Jan Hubi\[u010D]ka \" \(vc +.%A Andreas Jaeger +.%A Mark Mitchell +.%B System V Application Binary Interface +.%D May 23, 2023 +.%T AMD64 Architecture Processor Supplement +.%O Version 1.0 +.Re +. +.Sh HISTORY +Architecture-specific enhanced +.Em libc +functions were added starting +with +.Fx 2.0 +for +.Cm i386 , +.Fx 6.0 +for +.Cm arm , +.Fx 6.1 +for +.Cm amd64 , +.Fx 11.0 +for +.Cm aarch64 , +and +.Fx 12.0 +for +.Cm powerpc64 . +SIMD-enhanced functions were first added with +.Fx 13.0 +for +.Cm powerpc64 +and with +.Fx 14.0 +for +.Cm amd64 . +.Pp +A +.Nm +manual page appeared in +.Fx 14.0 . +. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org +. +.Sh CAVEATS +Other parts of +.Fx +such as cryptographic routines in the kernel or in +OpenSSL may also use SIMD enhancements. +These enhancements are not subject to the +.Ev ARCHLEVEL +variable and may have their own configuration +mechanism. +. +.Sh BUGS +Use of SIMD enhancements cannot be configured on powerpc64. From nobody Thu Aug 3 23:00:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH48M3JqDz4V9X9 for ; Thu, 3 Aug 2023 23:01:07 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH48M0wzKz4F0C for ; Thu, 3 Aug 2023 23:01:07 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-3fb4146e8ceso14371185e9.0 for ; Thu, 03 Aug 2023 16:01:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691103665; x=1691708465; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kUqLIOMH+1QmmIIZz0FEQH8ZrhQgsk+E8eq0fBshNQ8=; b=cFOFRBBOHEq127lavdQBQIqgD9mJCAo103F4Wvur06S7d23/2iurZ7kSoQkUPggwrf C58HxrIim1XquuPv9DGa87WDlrmMgjfV/5+y/VzGRRYTlejodDiEguRKWwn0UFLzkCWE 1z0Jzm6cIvy/B6F5LwKsbqb3mNacj5fH7SoAgUM/dKeuVOj8ORw2rjLP1ItGDUc9RWUy /OGz4XMnL5NPwkpZVh7B/ROQPXPvCF7GwFz/Un3mihqlGcVs8dYRnhDdOtmb+xqxPNkM YsqzesY34qrMIDrS1XI0v+IWTkFoiTVhYtD99UtKNfC1tsW4V0xFl3yWUNS8Tw2hYeQf uuyA== X-Gm-Message-State: AOJu0YzqxWVxk2cG9Kujb6p0BR52oyD9xb9F/v2a+qloFNeaUGqtcfnc 8PUHMPaO7qgE9ZhPXQKJivqv/A== X-Google-Smtp-Source: AGHT+IHe+/JzvH7cv14WPnfBMndbAWLBcbF16pV+TogiQ6yQcYm6OTMQ6iIuYF+Y+fk7ZWQC6TiyQQ== X-Received: by 2002:a1c:720c:0:b0:3fc:e00:5282 with SMTP id n12-20020a1c720c000000b003fc0e005282mr154642wmc.0.1691103664705; Thu, 03 Aug 2023 16:01:04 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id p14-20020a1c740e000000b003fe20db88e2sm5262376wmc.18.2023.08.03.16.01.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2023 16:01:04 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: ad2fac552c3f - main - lib/libc/amd64: add archlevel-based simd dispatch framework From: Jessica Clarke In-Reply-To: <202308032255.373MtnOY072011@gitrepo.freebsd.org> Date: Fri, 4 Aug 2023 00:00:53 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <71830984-F775-4688-83B7-13996B397E8D@freebsd.org> References: <202308032255.373MtnOY072011@gitrepo.freebsd.org> To: Robert Clausecker X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4RH48M0wzKz4F0C X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 3 Aug 2023, at 23:55, Robert Clausecker wrote: >=20 > The branch main has been updated by fuz: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dad2fac552c3fcb577feb3055fa083f2d= 256c06ed >=20 > commit ad2fac552c3fcb577feb3055fa083f2d256c06ed > Author: Robert Clausecker > AuthorDate: 2023-08-03 22:47:31 +0000 > Commit: Robert Clausecker > CommitDate: 2023-08-03 22:53:43 +0000 >=20 > lib/libc/amd64: add archlevel-based simd dispatch framework >=20 > Add a framework for selecting from one of multiple implementations > of a function based on amd64 architecture level (cf. amd64 SysV > ABI supplement). >=20 > Sponsored by: The FreeBSD Foundation > Approved by: kib > Reviewed by: jrtc27 This is news to me :), I only gave some review suggestions on earlier iterations of this patch; this should really be Reviewed by: kib? Same goes for strlen even more so; I didn=E2=80=99t even attempt to look = at the SIMD assembly. Jess From nobody Thu Aug 3 23:04:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH4Dd4JMSz4V9t5; Thu, 3 Aug 2023 23:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH4Dd3VWzz4FdX; Thu, 3 Aug 2023 23:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691103889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IBeCPNFppC6MNzDssCl+QB3HjDAB44YUSTkl91EO6BU=; b=So/bO70xDLmPhVNO63dWWLtC9CpoZVlIsX5jeW8vNV6zXFu87AIk5dr+VEah1D5UbTmukg X0SHk4ZhjJ1hjmV3hEmbTnFFrPj/IOJoPUaaKUJwBOhwj1zuwL3dx0qQCS4eAjlpFyQXB2 9htLU3rTH/g/mX+BNwuf7o9lVK5m4L8jMpdLW9MoRhnpPVYFME91KVPGTrsZpQdbxNRIOu z9v9ksckRAV+ISQL62pcBFs/DvNJhrny7Wg8qQHXhBDg0QvcpBWWi06p4gjtxJfjyX9Xwz F4qmRM+IcdyWQy8GATEg01L2P96CjEKWONIqiXaqkSrbJVeWxx2e5UPsG9PZOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691103889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IBeCPNFppC6MNzDssCl+QB3HjDAB44YUSTkl91EO6BU=; b=jXHRkUQ0i5/wLclvrpeRaERthuXN5VRBNLj23RIOnDUza1l2XSSBc3vgUsndxolqyehaDQ iOACwMUvojn8WDq75lc67UeLfohyjBGKnzzibV4xk8J8+IrrEesBSsGjOe5N8koSQL55EY 3hVej+pZPbYcoHYCH3fvUFDiD3gJDhmm8TUs2eSY1SD4fPThSQQhCXTmZhZIeT9NXWMX6a re4kVdEaCem3CZ1MgNP74bkNmQnhaw2eXanLC5Nrtg6pUSce58A0YtKWffcfRxPgJhKkaX DPNUYvDXEPKEPACsejYfCB2hno7xSru78SG428Kv4zynoPXyETJIoJ1uCs/Jdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691103889; a=rsa-sha256; cv=none; b=PgR91BWrPXNYdCVLYoofsnl7ggXPhmA6+u8LLoIdlYWC+P78AzNaIjt/YPXay0P1Aj36hu yKqvZ6u7dhdyC9z+Y59PlKJVQRTez33lvVoVIBqjlYifB2C1KsNCu5TLFtRTiTKJjrepLl rHnUlCZiL997DMVFBVH+RyJ5XiqJX232EC2vbQJuPM4LXSooHguK77FP5TtfRXhNy/H733 JKSiP4mreFHTT+PBzFuJ/egYJhOG/B3f8Ehnp0yz5eFEwJD0Qkg2/kkWJN6XO1z1Mkiugr 3oYbpB8+zdKBqno+a0DaL9efSRMA7B7Qr2Zs0CX9vxlPtAEodXO7NCm/wcYybA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH4Dd2YgVzfst; Thu, 3 Aug 2023 23:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373N4npI089179; Thu, 3 Aug 2023 23:04:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373N4nXk089178; Thu, 3 Aug 2023 23:04:49 GMT (envelope-from git) Date: Thu, 3 Aug 2023 23:04:49 GMT Message-Id: <202308032304.373N4nXk089178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 058ab969fd2f - main - libarchive: merge from vendor branch List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 058ab969fd2f7a8d04240d1e9bc9d63918480226 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=058ab969fd2f7a8d04240d1e9bc9d63918480226 commit 058ab969fd2f7a8d04240d1e9bc9d63918480226 Merge: 0588819779cd 80517d0d48d9 Author: Martin Matuska AuthorDate: 2023-08-03 23:04:14 +0000 Commit: Martin Matuska CommitDate: 2023-08-03 23:04:14 +0000 libarchive: merge from vendor branch Changes to not yet connected unzip only. MFC after: 1 week contrib/libarchive/unzip/bsdunzip.c | 19 ++++++++++++++++ contrib/libarchive/unzip/bsdunzip.h | 7 ++---- contrib/libarchive/unzip/cmdline.c | 2 -- contrib/libarchive/unzip/test/test_d.c | 22 +++++++++++++++++-- contrib/libarchive/unzip/test/test_x.c | 40 ++++++++++++++++++++++++++++++++-- 5 files changed, 79 insertions(+), 11 deletions(-) From nobody Thu Aug 3 23:13:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH4Qg2z7lz4VBXV; Thu, 3 Aug 2023 23:13:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH4Qg23QCz4GVr; Thu, 3 Aug 2023 23:13:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oaNgU6XhsGwGH4H6Id7+kqXqAnslxYh21HOPJGJZ8+c=; b=I3g2240W8EYoPjTFuZXsqMrr2QgxsWQwfDjmp2XVFJgIU3X5hIIEc1SZCkjYFa5I0qHapk 9Dq6298Kq11CxFwULbEzgxEGuO9dy7+nY+rib+ROFKSa0VmxzxTpMPqWDFMiCel++4VOr4 UQmocdwpdlQZP/QJ1Woth2uSrOPZ6aRsNVCuq6MwlcwpT0pFHYajLNgRCi/i2IROWUC+2C pUX9RloDaQDwn1y1EPrQOr0wZlFjOz1x+/t5Tg1aaE8OQuMuttHyQCbyTMgRkx/svZYe43 5dLwTxci2Xjck1lwYYnaFlVgpZho94G+iXCCYVOLo3w4pTvSiz+aq7HLkX+afw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oaNgU6XhsGwGH4H6Id7+kqXqAnslxYh21HOPJGJZ8+c=; b=by+ycwKjF4ueneyozIS3xzMnHotfJ8fBI5wXHX1bzHpkF4beZE8pEbg+r4zrGuNjAMLv29 2Ul9SSJje31SOqJLxGlcBPDndQLzDpPPg6L37SmHnBzdKTSFdrAX1dRrYnZQZW2O2nMbxq D5wHqpe6guSO28yKt1lCouEsAeLnMkz6bd7U1eIMqmbX1dsigCVCXIixMycoJABh8Hlaq8 Ou8G9MVo0OWkHBdjc2mAJgTayAdUDcJaYqDvu+4N0KJ+lT3Cy1Q4YwRr5Q1jaD5i4aBKS3 hTSCS5xyhDUv5UykylgihOkZtzRfaVKS+u4eXgz2G6XxUSB51BHx0MTn3nGdPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691104411; a=rsa-sha256; cv=none; b=KK/zHB0Bih9tlU+PCK+r/ETsbIaLb5wFQMmbCVEkNEeLygf3tjDyNMNnKGLFOGE2WNukjK bRiJrNVE1TAi5Nu5ZemVZgGC3+90LL7EAkS4A/Hk14SmLsCsfbKE6T2KaNu5NvzDtxS3KG IrWR+i74FYDju9KRdgBRCfEeqa1ngnlUUOm5IbQQCbQQDi1F9fMic2GP23/cLcrfYFC6xZ O+izL/sRsxAcgzoNy1EEpIITMrXD8hr2dkI9wWCwRzeTyIMn+u1pH84wGFDv8nyzSRNg3X rV7nTa7ZiqhydGTL5aOH+xBBRxf+ILpymvwf03qkdPxswoa0REHN6KEN3CAsTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH4Qg17MyzfpQ; Thu, 3 Aug 2023 23:13:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373NDVib005231; Thu, 3 Aug 2023 23:13:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373NDVV3005230; Thu, 3 Aug 2023 23:13:31 GMT (envelope-from git) Date: Thu, 3 Aug 2023 23:13:31 GMT Message-Id: <202308032313.373NDVV3005230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: dd0f2d02c683 - main - libibverbs: remove nonexistent symbols from the linker map List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd0f2d02c683c6ee885dda8ed323a1586c409967 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dd0f2d02c683c6ee885dda8ed323a1586c409967 commit dd0f2d02c683c6ee885dda8ed323a1586c409967 Author: Konstantin Belousov AuthorDate: 2023-08-01 22:56:40 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-03 23:13:13 +0000 libibverbs: remove nonexistent symbols from the linker map The function ibv_query_device_ex is static inline, it is not exported from the dso. With lld 16, which is much more picky about versioning and undefined symbols, this becomes an error. The ibv_register_driver driver symbol is explicitly versioned in sources, it is non-existent in un-versioned object files. Sponsored by: NVidia networking MFC after: 1 week --- contrib/ofed/libibverbs/libibverbs.map | 3 --- 1 file changed, 3 deletions(-) diff --git a/contrib/ofed/libibverbs/libibverbs.map b/contrib/ofed/libibverbs/libibverbs.map index 540124110e11..b49c09a06ce3 100644 --- a/contrib/ofed/libibverbs/libibverbs.map +++ b/contrib/ofed/libibverbs/libibverbs.map @@ -10,7 +10,6 @@ IBVERBS_1.0 { ibv_get_async_event; ibv_ack_async_event; ibv_query_device; - ibv_query_device_ex; ibv_query_port; ibv_query_gid; ibv_query_pkey; @@ -65,7 +64,6 @@ IBVERBS_1.1 { ibv_fork_init; ibv_dontfork_range; ibv_dofork_range; - ibv_register_driver; ibv_node_type_str; ibv_port_state_str; @@ -136,7 +134,6 @@ IBVERBS_PRIVATE_14 { ibv_cmd_rereg_mr; ibv_cmd_resize_cq; ibv_query_gid_type; - ibv_register_driver; verbs_register_driver; verbs_init_cq; }; From nobody Thu Aug 3 23:13:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH4Qh3bw9z4VBfx; Thu, 3 Aug 2023 23:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH4Qh30v5z4GYv; Thu, 3 Aug 2023 23:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qNNifocL3VxGMyjdxE87rCcYXYo7zSwJlPMYcRFuvS8=; b=mggWthbkLXEzbe5H9ygbPNNNWRVLAK/yXIgMGQ4phrJS3wk6oCPkDHXxkpCJ+SsVGyzND7 575opJe6uQV967CF2YHxm9yPlRPdzwmncNkdACiovESqnl9QCkGMozRxffIU/n1ZpbW74M 47i4McL2hM5dD0EMO9x266J2mVc/3j07QlsRT9IKE9ZzGSMCsJzQ0O+srY3bfvUkiN2gbs AvatWFgBjqqB/qWUXhas1ta4s1KQUtRL3i2fITB46GHirrvdg0E8vcvOaCjhdMoZKbaHOm 8GgNTMts4veM9YWgO0I4OwQsJI/0ktx1l17gSpX4FdUHQLKdIexBVuM/K7Q9ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qNNifocL3VxGMyjdxE87rCcYXYo7zSwJlPMYcRFuvS8=; b=HTIIqlj1CVadXfLHCiipg+Ye+zwbZknHucZKi1S35gAOtcrXEaN2AMgORZEt4OWmkRY/0Q nSwwtvKHXLRJRCGW/rnhFqZ7S72+M3k4hp9su8OKWntCv1czWTUsCg9g1FH0dXAdgdHv4d 9JLODWApOYKzAckUg/6evktV2mcZRoIp/D7a9JXceDzYXy2471fxH+J+PqmYNDmKfTPWoP SzKM5EmYhKvvJyNe0w6rdcI+ana9ISV4L+FtGlXdgsv+tH5Wavq7U904tkdOzD4W2SGKRA Mz2l19Fq6GnyUxRWgx/IHvkhuwwnQDf3SFOp/j2tNL5IpQvBdwPmcSvTTWNu0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691104412; a=rsa-sha256; cv=none; b=BBFxtVn82hth2wT38Smt5et7Nqu8IUXVFpg4POatDCEPa8yuDXmd++2ppge2khcwU/vjpp b1M0er63DlfcftMEq5M2LnnLRX/BzEZW5wI1jg00c4q+H0mGElxX0ZXI1MiYAIViVuiJJl VrePQgWqtN4yBCMWlzw2txR+ACH6Ak2yfIzzJA8i0T8jj8ZOpSytB5ptAiMwui9/eo8VSo V328cTiLIE6/GRSdAo28X3kq2aOIt0blBH4QpwcxLDa5yjzrcPf6+QLsLyfhX6/peCKTTQ MA6hCqrqJZ67NkEASUy7SwiAIEf3vF64FRlUSznx+zSnbBHAPbK6PgylUNLKWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH4Qh24vlzfth; Thu, 3 Aug 2023 23:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373NDWsi005251; Thu, 3 Aug 2023 23:13:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373NDWWI005250; Thu, 3 Aug 2023 23:13:32 GMT (envelope-from git) Date: Thu, 3 Aug 2023 23:13:32 GMT Message-Id: <202308032313.373NDWWI005250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9a7eba89f972 - main - librdmacm: remove rsocket symbols from the map file List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a7eba89f972e0dac0f53d0d442328248eb949ec Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9a7eba89f972e0dac0f53d0d442328248eb949ec commit 9a7eba89f972e0dac0f53d0d442328248eb949ec Author: Konstantin Belousov AuthorDate: 2023-08-03 07:54:09 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-03 23:13:13 +0000 librdmacm: remove rsocket symbols from the map file rsocket support was never compiled on FreeBSD at all. Sponsored by: NVidia networking MFC after: 1 week --- contrib/ofed/librdmacm/librdmacm.map | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/contrib/ofed/librdmacm/librdmacm.map b/contrib/ofed/librdmacm/librdmacm.map index 1c8d74350265..e2eebbe576b4 100644 --- a/contrib/ofed/librdmacm/librdmacm.map +++ b/contrib/ofed/librdmacm/librdmacm.map @@ -36,33 +36,6 @@ RDMACM_1.0 { rdma_destroy_ep; rdma_create_srq; rdma_destroy_srq; - rsocket; - rbind; - rlisten; - raccept; - rconnect; - rshutdown; - rclose; - rrecv; - rrecvfrom; - rrecvmsg; - rsend; - rsendto; - rsendmsg; - rread; - rreadv; - rwrite; - rwritev; - rpoll; - rselect; - rgetpeername; - rgetsockname; - rsetsockopt; - rgetsockopt; - rfcntl; - riomap; - riounmap; - riowrite; rdma_create_srq_ex; rdma_create_qp_ex; local: *; From nobody Thu Aug 3 23:13:33 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH4Qj4bCxz4VBZs; Thu, 3 Aug 2023 23:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH4Qj3rFcz4GmT; Thu, 3 Aug 2023 23:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sqPvojPQPii53tKESdMk6v0Q1/e3NHI/WQmfq38Uu8I=; b=xNDPwfbsUCeM6fPL5XjQDSEirb9bvMzST3rFF/weTazqbZdHZ9DGtAukdq1CWaAH/tyROk y4XrYXDnEFhqkECGXxo6C3Lzi+dynJPUoJ82xo4SG6NYQSuOXJWeZ/dDucXK1NjtlLp9LO j6SLYoB0C4pqVsqy6aM/Nj3kDd42ZQYBElS4k3j0vO2O9gvxjBOka8O8iAtqjB1OV/xjb+ jxZgjLXUT5pcXNZDnxucnmHZYUNrDgAWVEaUHhnjFIt21Rb33RpybW9Mktl6LrNFYmbzJT /MYjUE4hU6mtMFg0pQo+8m0DxvDOJle1UwPYkBckwKBjuMJVFmjvsRPBl3H1pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sqPvojPQPii53tKESdMk6v0Q1/e3NHI/WQmfq38Uu8I=; b=WKgTM93A+QomveaYd4oZpPsYCtke0XC6e+jZ0ndwwnEbDN9Uy16qy00TrsTKTemR5Uft7x nTOh0hdqMcB8o26Qq28w4ccvVHOYq67BEk6M8xmBCD+FnOPT/Qjgn+NSCJzhUGKSfVt2kU DGCKir6wJ7wrWfRuZhbX7yxTmInmT5lwXvmvUUsu01SbChAeVvQLqWp5BwG/xTvtcuungg Ku4zm4qYB4PrwKcJpPz1fNAqeE5m2qTQq/AtCYfX0X26eNsEA9adeT2ApqyQ3wYMVu1IMX RatcI70XWPSo0mfd8V9VxOdpR1i9+ddFsXy45SqYYeaWmFAZHJHrJIqpCqaPUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691104413; a=rsa-sha256; cv=none; b=i0lizx4FopTmXSCEMX6x+FReAKmLbEwO/jgRNPkN5UjRahXjaODXzev1+ccAqVbQl/ztI3 p2f3WCWS5HFjYmPg0eK8Ukn2cJN1+cFrcmuH7nUoy63oISfgI3/YQ94PvfXvklkvrEykEs FHupbNexzZO6pNwOSyHAwY/DaZCVghVNhYpBj3yIpCQC/NIgfrkmCN9qknvJEt1ZnHzj82 qT9QGuj6dtdznGRzh3komfNxoPYm4pTkRWWFjjj2p8+g/r4P7EUViPx9bS7WNoC3mxp8KK OVw6EUm5dINmQHUaR1UW64VuEdxmqvS0cU3MXKe+Mp3mVRGsEVKXuHbimGVQ1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH4Qj2xyPzfpR; Thu, 3 Aug 2023 23:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373NDXdU005271; Thu, 3 Aug 2023 23:13:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373NDXuA005270; Thu, 3 Aug 2023 23:13:33 GMT (envelope-from git) Date: Thu, 3 Aug 2023 23:13:33 GMT Message-Id: <202308032313.373NDXuA005270@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e5cf232b3f24 - main - librmdacm: rdma_get_local_addr and rdma_get_peer_addr are not exported List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5cf232b3f2484601b2a30f71dcbe9861e22370e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e5cf232b3f2484601b2a30f71dcbe9861e22370e commit e5cf232b3f2484601b2a30f71dcbe9861e22370e Author: Konstantin Belousov AuthorDate: 2023-08-03 08:08:32 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-03 23:13:13 +0000 librmdacm: rdma_get_local_addr and rdma_get_peer_addr are not exported they are static inline, remove them from the version script. Sponsored by: NVidia networking MFC after: 1 week --- contrib/ofed/librdmacm/librdmacm.map | 2 -- 1 file changed, 2 deletions(-) diff --git a/contrib/ofed/librdmacm/librdmacm.map b/contrib/ofed/librdmacm/librdmacm.map index e2eebbe576b4..2d826e03238c 100644 --- a/contrib/ofed/librdmacm/librdmacm.map +++ b/contrib/ofed/librdmacm/librdmacm.map @@ -26,8 +26,6 @@ RDMACM_1.0 { rdma_free_devices; rdma_event_str; rdma_set_option; - rdma_get_local_addr; - rdma_get_peer_addr; rdma_migrate_id; rdma_getaddrinfo; rdma_freeaddrinfo; From nobody Thu Aug 3 23:13:34 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH4Qk55zmz4VBb4; Thu, 3 Aug 2023 23:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH4Qk4dd4z4Gx3; Thu, 3 Aug 2023 23:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+nUL6eUKujCFXxfsQZnWw4zsVYXivhw/i6XgwILCt20=; b=aZrewgmCOytD45BHswIdEJ/VA4tncfES7noc4OpXuS/jFwfOyN78PmFj2hSnDRvQbN4Dbz nb9xMfxaXwgyEjfKwoek5lntrseFGATWDP/0UQBO6M6CRz9sPvyhw4srJSCuubMLzPBiOu fqVq5Yf8v6KqJdDICbFihK8xZehQvYEy7wpvm/mVL9Ygvu3Fvvz1/MCE+d6aukCLn8weUI eR9wONnhlwnWFMxDf86G1Fa/UlpQRlHC0oSRJffplRAwEr2jQUGiQ8iU5vPDunQ9BQrxaH QOiTwvpeDWS4AYDvEY/9twcMTN0XrrTMFsOU3ccTGl9rdopwU5ba3r/TXf6RSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+nUL6eUKujCFXxfsQZnWw4zsVYXivhw/i6XgwILCt20=; b=ov+MytmNSGnOayVm9TetVN9xDeTYxa3ah2CQzRoCs1Kw2tRnRIFE833Ythn2yPKmSAGw9q DuG76m6++xc8jtW49SOLia625wwwtPfsjfX+tL3ctED/1EmDCjKRM6DwdowwEuP5jhymyC Psw9lQk5j0OQZlK3031DtbTJ+nD/Fx0uX3TvVhoc8LEU+CF/EjQRm7vRhAEHNTenozzY3n WFf6XEYWTJFX9vMwgtZ6DMFd4BKZ93Nt3uIBmI7lfnA2XZ50vp8ka23BZKnPZnrU8C1rTz 2WwgSiSJq9aBTP6OULL/57AQ643+KXeY4FSQvXG3IxQc6jTW1ZtCEfA7l8Mf5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691104414; a=rsa-sha256; cv=none; b=CPSfsY8uf8KT89ApiRsQGeiGKjwsFXRwPCuC8I33kzL7ussUVa/6cJJlRCmpBvPFIf4i5D 1s5QSvsvZ7mfNyW1QetE9fH6wxNZu4+ngtDdm5LMOH144B2qftnotmjehUS4I8vtnsscXI yf1Gtny7IFb6bdKvql1d944WGqYzMvih3rb59wtOUYTwNn4U0w5LLoVYEMZu0mV/tVVmdP dyw+4jUAiq5VLkI0ekdoTZ7dFtCwh4PtJ76cbsaYHmncpApW4n/3hJGLCEFnfDtbJQh3fs q0JOB2YBHuvt8sS/LWKpFASzTviPN6rc3vsy7o5uyQ27zrmVZcxNPYvzahe8Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH4Qk3glZzfmJ; Thu, 3 Aug 2023 23:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373NDYju005291; Thu, 3 Aug 2023 23:13:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373NDY3S005290; Thu, 3 Aug 2023 23:13:34 GMT (envelope-from git) Date: Thu, 3 Aug 2023 23:13:34 GMT Message-Id: <202308032313.373NDY3S005290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 67c5de2dcacc - main - opensm libosmcomp: remove non-existent symbols from the version map List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67c5de2dcacc7642f4648f9ec25eb10dd7387de1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=67c5de2dcacc7642f4648f9ec25eb10dd7387de1 commit 67c5de2dcacc7642f4648f9ec25eb10dd7387de1 Author: Konstantin Belousov AuthorDate: 2023-08-03 08:29:31 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-03 23:13:13 +0000 opensm libosmcomp: remove non-existent symbols from the version map Sponsored by: NVidia networking MFC after: 1 week --- contrib/ofed/opensm/complib/libosmcomp.map | 3 --- 1 file changed, 3 deletions(-) diff --git a/contrib/ofed/opensm/complib/libosmcomp.map b/contrib/ofed/opensm/complib/libosmcomp.map index 52410ccccf08..eaa5a1742a5d 100644 --- a/contrib/ofed/opensm/complib/libosmcomp.map +++ b/contrib/ofed/opensm/complib/libosmcomp.map @@ -112,7 +112,6 @@ OSMCOMP_2.3 { cl_thread_stall; cl_proc_count; cl_is_current_thread; - cl_thread_pool_construct; cl_thread_pool_init; cl_thread_pool_destroy; cl_thread_pool_signal; @@ -126,7 +125,6 @@ OSMCOMP_2.3 { cl_timer_trim; cl_get_time_stamp; cl_get_time_stamp_sec; - cl_vector_copy_general; cl_vector_copy16; cl_vector_copy32; cl_vector_copy64; @@ -142,7 +140,6 @@ OSMCOMP_2.3 { cl_vector_find_from_start; cl_vector_find_from_end; cl_atomic_spinlock; - cl_atomic_dec; ib_error_str; ib_async_event_str; ib_wc_status_str; From nobody Thu Aug 3 23:13:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH4Ql6R8Lz4VBgL; Thu, 3 Aug 2023 23:13:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH4Ql5Ss4z4GyB; Thu, 3 Aug 2023 23:13:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gfnEOqz3p9SO6l++XNErQHpYnxZpbANwBbZsizL6mqE=; b=hKEv7uCRmKcHx7CZEwmmLLe7ddkL+xPNjTj9d+DTt32Q6TJa8RYWekFVoOmO5SeH8RSQHy EOb9IQzY2ct09YkFh8DZbuG1i3vXQJp6o5GTX0S2021ki582RVSo5yUelHsYQFu16SN8al wQRYdjdfDy95xqTEoLPj/GQ2WcnnL8lz+w6wHyUwGq2G5OZqeL5rJ3Rl13o5mHNwu8eJh0 hKy/8UQ25vLHVypmaSVczhL9BzP3tl4LhLX9Gt/1/QKHz+pSk1jaa2ARNYZCusXD/Ywtx/ gB8mA4+wkSu6y49SJmdrPvu28+BOIz8GQYGM7bD1hZuEOIoqidFcTE1f1uIpsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gfnEOqz3p9SO6l++XNErQHpYnxZpbANwBbZsizL6mqE=; b=BM8FMIih2cyA6d0AzHkAn+fDcA51EhzdQnWyjwtE92+wnrFjhPhG2zlGFBnTDkX/V0BBUB MNAjXkspXfrxqQ8KLFeSHPvfVZdPgQ13doQar9IJWLnyIxuIhn/uIO0nomsCTio/k368gw McaqVSeUhUkbXaTyF1ljR7XEeGYPg+mRGYf+MpcM/tjs6tTZyrhswnIj7Nb5l3VOcHV5rs N29Zaf9DXSTkfo2evfNjkTjKo7kEdX25i84tqSixrVEPJcHqwx1bB9jAfQsMR9HNxEJwtN 7A3igNVt0l3+mL8e4ZvXjldPZYCkQTavNg4IDP7Vmfe2USBR4428ZHoh4SPZWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691104415; a=rsa-sha256; cv=none; b=kpCV5yZMpJOPDyL0P+QHpmG4K9Lieucux7+m4p0Brh3lq1Fx5Q2Uym8eKJMf/01XZCW9GD jjmVUF5kQFE0kl4qE9lJISHKUw/FWuzLPp/k6NCmkPBaQaTQYWOsVwSez3Gzz/7hDImMta VCFE+bogfaJX58AQJHR1kk93ox/kBG6nxgCqUx31szxX6ufvKGhfFs5GOaa5s5qSpDsEdR 7Qs3r1Q8qQC5Var7ct1zCT4+WZdxoxqP9PSJqGaimRFwb4Pl/vvhY6Xyz1rp9OXeTfAS2D ePKjIBys5kVcdvJj6WxzcopID8oI6jyNed01heyxB3p1EfRCXmsGZydYIkZv8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH4Ql4XXLzgG6; Thu, 3 Aug 2023 23:13:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373NDZcQ005310; Thu, 3 Aug 2023 23:13:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373NDZOZ005309; Thu, 3 Aug 2023 23:13:35 GMT (envelope-from git) Date: Thu, 3 Aug 2023 23:13:35 GMT Message-Id: <202308032313.373NDZOZ005309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6fdf714d5d18 - main - opensm libvendor: remove non-existent symbols from the version map List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fdf714d5d18f5d6d3f2ae3889a788a3ebead5cc Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6fdf714d5d18f5d6d3f2ae3889a788a3ebead5cc commit 6fdf714d5d18f5d6d3f2ae3889a788a3ebead5cc Author: Konstantin Belousov AuthorDate: 2023-08-03 08:44:19 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-03 23:13:14 +0000 opensm libvendor: remove non-existent symbols from the version map Sponsored by: NVidia networking MFC after: 1 week --- contrib/ofed/opensm/libvendor/libosmvendor.map | 2 -- 1 file changed, 2 deletions(-) diff --git a/contrib/ofed/opensm/libvendor/libosmvendor.map b/contrib/ofed/opensm/libvendor/libosmvendor.map index 17416b35e9fb..2656b42cef1c 100644 --- a/contrib/ofed/opensm/libvendor/libosmvendor.map +++ b/contrib/ofed/opensm/libvendor/libosmvendor.map @@ -1,6 +1,5 @@ OSMVENDOR_2.0 { global: - umad_receiver; osm_vendor_init; osm_vendor_new; osm_vendor_delete; @@ -15,6 +14,5 @@ OSMVENDOR_2.0 { osm_vendor_set_debug; osmv_bind_sa; osmv_query_sa; - osm_vendor_get_guid_ca_and_port; local: *; }; From nobody Thu Aug 3 23:13:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH4Qn1BLfz4VBpK; Thu, 3 Aug 2023 23:13:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH4Qm6M2zz4HMk; Thu, 3 Aug 2023 23:13:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ez3oKEvVG+RGiwx4m5uxEoSoEXE4HUSbDkeAfGSXVvE=; b=eLZSjNTzB8CVC/pom/STQ1tMlWgDEmZkr3N47M5i4ebCHBfpMNC0AvijxXtLsuHvjdpW69 CGRyXR3FIM58ZdRQ8FhJ/pTprzBTJAlFSvzTicXHDEtDmEn+lrkOd5Zpj6877TMUgUEjyU jqRoJI4HsWZ/K+u9CAr8jToYew6/M3RTDLZ+X4WspkHza+KGamlAcU0jLSpPHWqJxuk2/z 8NRAr8zR1rzJgJTvUVJ2qbQ5C+p/MfHiAEE8SoH2fMqWOZdY+cA8O2hPYaXhPMOhjmy2wf ZNDgionZJByF++8FCESR5feBrSw8isRJPhVuftauKzhXnBiCS0ewagKw8CQEeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691104416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ez3oKEvVG+RGiwx4m5uxEoSoEXE4HUSbDkeAfGSXVvE=; b=Ny6Xkwg2QHzA5xb/bEHunEZP05EuqHe49LlizzEmP2vARtb9Cl1bcAnb3cY6G0D2ZQZAoI UrBEvdVZ4Bx1BUqaXjeX/iPI/R9QBdmrOfthzFp5iWlDa/E8wtgVzRWA4EcmfP7C8d8Vwn NKBxhGMOhH4QdHAWUDjr+3eprH+by2KXcUnhqRAeSziD4eoD4703DRE7tv633isuxt9upA AYSLUafdyh1AXrYfzBTACnoFaDcyXqn0f9MeAY1ofSXm9mVYrX0j9/YK+UkW6nEH4+43OG RrR2Pv78/W6N0j6vRsP0jQmIeQehTl+23eT/uQ95JBRlbWCdQyIPUyepZ+u6kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691104416; a=rsa-sha256; cv=none; b=X5d9LTQncdpBYrZI8HvTRD/Hbh5sIkfasvv45yBUbrZKeE0lCzIW/UUWwgecv5T3GwNvwX IJHuWzNtrLvZYlN8JzmeULdTwW8nK3Mlh38gGGebqb0cWloMcS69r6UAwKDzfi/VKGpgEM qORamgpaZkWX2mp1uNIkOdEXvXdNs76fpwHKWwNtvSYGb5z2wcowcA77J+35Aq7palElVr YqkAEx1goY775lsRISxTmkXijmq4FVgga5ZuFlxj+CCqEnAnLITIqtU/6IfBhIQu4VAQ5Q Ka4xrYSQ3U8EGp7tVaUWM7HEgY1HerA0fSul/oHOUPBU1OB5mUq3BOJ0fcFLlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RH4Qm5S2DzfpS; Thu, 3 Aug 2023 23:13:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 373NDaHL005339; Thu, 3 Aug 2023 23:13:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 373NDaUi005338; Thu, 3 Aug 2023 23:13:36 GMT (envelope-from git) Date: Thu, 3 Aug 2023 23:13:36 GMT Message-Id: <202308032313.373NDaUi005338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 21d6c29f344d - main - opensm libopensm: remove non-existent symbols from the version map List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21d6c29f344d587a99314f9cd960cc008cb3dec4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=21d6c29f344d587a99314f9cd960cc008cb3dec4 commit 21d6c29f344d587a99314f9cd960cc008cb3dec4 Author: Konstantin Belousov AuthorDate: 2023-08-03 08:52:06 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-03 23:13:14 +0000 opensm libopensm: remove non-existent symbols from the version map Sponsored by: NVidia networking MFC after: 1 week --- contrib/ofed/opensm/opensm/libopensm.map | 2 -- 1 file changed, 2 deletions(-) diff --git a/contrib/ofed/opensm/opensm/libopensm.map b/contrib/ofed/opensm/opensm/libopensm.map index 087e69ad464a..128f4716db7c 100644 --- a/contrib/ofed/opensm/opensm/libopensm.map +++ b/contrib/ofed/opensm/opensm/libopensm.map @@ -71,7 +71,6 @@ OPENSM_1.5 { osm_dump_pkey_block; osm_dump_pkey_block_v2; osm_log_raw; - osm_get_sm_state_str; osm_get_sm_signal_str; osm_get_disp_msg_str; osm_get_port_state_str_fixed_width; @@ -91,7 +90,6 @@ OPENSM_1.5 { osm_dump_mlnx_ext_port_info_v2; osm_log_v2; osm_log_msg_box_v2; - osm_log_is_active_v2; osm_get_log_per_module; osm_set_log_per_module; osm_reset_log_per_module; From nobody Fri Aug 4 01:22:16 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH7HN2BDhzZY0S; Fri, 4 Aug 2023 01:22:24 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH7HM5sdCz4Y5W; Fri, 4 Aug 2023 01:22:23 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.17.1/8.17.1) with ESMTP id 3741MHRE043363; Thu, 3 Aug 2023 20:22:17 -0500 (CDT) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1691112137; bh=G2VFzlyhA5RkJWqjfrVzBsePpcWblym1RzwPgIoL9qk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=N31kAsirYxGIpZgLJFQkKlDPYsXuRyaklq9Jlg5z7gRY7pXuoeQpxJeViMoOp3NnR UYko+beBLI0+h04QBQh0h7a0ld5315wWzSgR+s49sriGCAMosAPzEQ6FKKc1eVa4gk f5PJ0tA2Re5Yw0RspDbYvp2xqNmsMFGUHJUtr5jc++/ttmJ8pvSlaSEsbN4bWUUcy1 VMbJAFpAR1zzDcXG/Kpob+JMjcc3g4J73nNJY0jCWhg6QmQKb4kAon2ZieYuHIhDfp mPlZ+lEvb2rqPMrkLuRNejJ/LJA80FMlnlqv3JTQgwUUoqblG1ZEHSSgx+dAd4t4fU f1EvAbK4flqMw== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id LgK4EslSzGRhqQAAs/W3XQ (envelope-from ); Thu, 03 Aug 2023 20:22:17 -0500 From: Mike Karels To: Doug Moore Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c9b06fa52776 - main - vm_phys_enqueue_contig: handle npages==0 Date: Thu, 03 Aug 2023 20:22:16 -0500 X-Mailer: MailMate (1.14r5964) Message-ID: <870960EF-BC8B-4FD4-A428-BFC789DB39B1@karels.net> In-Reply-To: <202308031421.373ELqS8022332@gitrepo.freebsd.org> References: <202308031421.373ELqS8022332@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4RH7HM5sdCz4Y5W X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] On 3 Aug 2023, at 9:21, Doug Moore wrote: > The branch main has been updated by dougm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc9b06fa52776fbf555b9397a= 8d28a54c957108ec > > commit c9b06fa52776fbf555b9397a8d28a54c957108ec > Author: Doug Moore > AuthorDate: 2023-08-03 14:19:48 +0000 > Commit: Doug Moore > CommitDate: 2023-08-03 14:19:48 +0000 > > vm_phys_enqueue_contig: handle npages=3D=3D0 > > By letting vm_phys_enqueue_contig handle the case when npages =3D=3D= 0, > the callers can stop checking it, and the compiler can stop > zero-checking with every call to ffs(). Letting vm_phys_enqueue_con= tig > call vm_phys_enqueue_contig for part of its work also saves a few > bytes. > > The amd64 object code shrinks by 128 bytes. > > Reviewed by: kib (previous version) > Tested by: pho > Differential Revision: https://reviews.freebsd.org/D41154 My machine panics like this during startup with this change in place agai= n: real memory =3D 68717379584 (65534 MB) panic: vm_phys_enq_range: page 0xfffffe006cdc8108 and npages 0 are misali= gned cpuid =3D 0 time =3D 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff831= 77ac0 vpanic() at vpanic+0x132/frame 0xffffffff83177bf0 panic() at panic+0x43/frame 0xffffffff83177c50 vm_phys_enq_range() at vm_phys_enq_range+0x12d/frame 0xffffffff83177c60 vm_phys_alloc_contig() at vm_phys_alloc_contig+0x557/frame 0xffffffff8317= 7cf0 vm_page_find_contig_domain() at vm_page_find_contig_domain+0xbe/frame 0xf= fffffff83177d60 vm_page_alloc_contig_domain() at vm_page_alloc_contig_domain+0x135/frame = 0xffffffff83177df0 kmem_alloc_contig_pages() at kmem_alloc_contig_pages+0x92/frame 0xfffffff= f83177e80 kmem_alloc_attr_domainset() at kmem_alloc_attr_domainset+0x20d/frame 0xff= ffffff83177f40 vm_ksubmap_init() at vm_ksubmap_init+0x65/frame 0xffffffff83177f80 cpu_startup() at cpu_startup+0x20b/frame 0xffffffff83177fa0 mi_startup() at mi_startup+0x1f1/frame 0xffffffff83177ff0 btext() at btext+0x23 KDB: enter: panic [ thread pid 0 tid 0 ] Stopped at kdb_enter+0x32: movq $0,0xe29533(%rip) db> If I comment out the assert, it boots and runs. Mike From nobody Fri Aug 4 02:15:14 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH8Sl6Txxz4Tjpg for ; Fri, 4 Aug 2023 02:15:35 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-25.consmr.mail.gq1.yahoo.com (sonic304-25.consmr.mail.gq1.yahoo.com [98.137.68.206]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH8Sj58XCz4fTf for ; Fri, 4 Aug 2023 02:15:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=mOAkEJfx; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.206 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691115331; bh=HW4zSOELXNY7eFIvgMfPZmlp3y/PeMDLuHAcTNS0HwU=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=mOAkEJfxlO4kF6GG8kmGS2cchzcyoSjzg+mNwkNX7S6HPatDWFTfepy54vtLf40/kXNzCG8ra8An3XxXvHcX4xC8YWc1SlSBCtWAeufSSj5HEaOcuWA1JdCvltVavuu4rFJh8x2FhwlYs7xUDE+MZRV7QdFVoUXy4tvJZ0eB6ly4tBu5OLHfZArIj9dArXlK1BsFYNb0PdcXOLLetYunwUh0BB23p+kOK/eQLUScNQtjPf7ZfQHPGebSiZYSHMrMDfPuKvS/n8jvU0gjiikR4THgNmkKCWtxwWqrnSk70WBsS/GN61Eoj2FbEujhgiyjDi8nykq6sMwJLOgGNEK/6Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691115331; bh=eFkEVQL6wnNIox9Ah3drjOtHqRhsmuVjdkxrod3cdlO=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=Gcu4/WHw+ad+9ay1N2QEipFgcGLx9IZ2rf/PvDikqnPF3ur8sxB/d5ovZvDqTzScHYBGw4hBimtp3sKcNlOH4QW9OseaUl5urAsS0Uzk7Vg50cocSk1WXHkOkAB5+OJtfzELV5YBXMa6V6PeCVK9oiKYCCmS6/SILXnFwSQ/ZRoOkV9Y6Jyhw4VXP5e77cijhZF2oCYWz3yLG+F7lreOPFT5In/1FzhVak4GUfwe6S+EmFAXaaZB54LX0j8GNbmD/yvPSW85iD8XP7AzXvUf3gVEJSQJM27o8lMZ1cKTJ001rkbzfTYLWB0uwrUChgsX4R2HGXfupvS2mN8rKGPEJg== X-YMail-OSG: MPEvnXoVM1k0jn8vr84tQtOb.8gUD0c4xfN96EepGZqbH7bahMOasVuCJFzn8o0 mk_3naT60teIlkc6Ao3BMSr130Dv604AegYtUxY8DY5UkZsSfQEIyDY_iAq4o8zi1TNcfq4O0UJM QJ0uc.CKhRxt6.DyXVV2rq5b_M6lhQy.OjXe2dyAN9I_B50pHs7j13VBNPmiXgirNgNxSQLL.XgS SbKAvQDZ51XWUFortB.zRsJ4YQfYxnMZ9EKaFqsd0lknUkODODsp_Dexv8ax9jt5BQylSujX1qTo jNVlxbrVodVpZwludVd3M_ngrETPEaRM0zTUAjcoaTWHGS284Me2T9QqUX7TVNrlC2m5rjR3yMW5 c1RxDunL6cXdRP9oAMLoM.dktBgJfVvwQqOqaYgRSe2r0tN3tOY0oYLv3eakXFtquC5XpjOY1sX2 lMOJepL82kZQ3ICWBcOQ46OkuVuCXygxa2KuOnrDIYGV9wNzHuGtr3i0mI5bN8QB_Pc3UwVbtZXU puTNThcxgo5yM3nn4ZeCDVQeaFOgg2VzpdGX066vtW.IJeKH7TuDmVZ9HfOnv66CoI.BbzJhQisS lgQVKZIqR3AjLal98NV4VJoQVpETo17T.IXkWLaNPa2uJNrzL4PBVZC1Igyem1fyRZqOT3ziMwar h301zckmlRAwFbEsjN5QrPMuRYnAzl0Xrsngh9MiHx8Lm1EoC9OxghSJxFRvJqZdQwyiGM5ShlEX nT5pOeyxa4M__jSw2JG2WLdvyhRk8geCsyDTInQ_6j0hJLgJ1PWNGBDGecGVfkeHbSGonFfCDt6x Bb6mvTp.KwjeHRIjo7FEOPzxeCYOSx7TS5T3JpIukf1WK6aZiiELwVzWHmS4muzsXSF654xQd74R HI.hXUda6V8uJJnTUjwCQ4PHYgtT48C2oTHdz5IQLtk0odQqJez9ewxiyRCuPgWVu5AKqBdvvoXb BMMKonYUxvhy2LISEykfybamqr1zHU6wL_cJFZqlH2kSrtD8Oq8PiQA_aNviz1Zqp4uyB4.9tQlX ut6nMVb92uxzcvErmlmUGDNettuMQCyTLFJGQFxtdVTOyW92wveG7m0P7y4EbnX9sPOFKENbv.UK bp3svVv.EuKd_2wo4Q3eACd9WxkOHQ1sbiT5ch2Nbl9TT4CqUja7jiRqASihRqvD0ch3e4D8QEr9 DA7sXTFnrlwJ_yghGcm1efPXemBcvi8TKdxdFZbIGveguH1HRYyXtaKyxMOE0OeLXqPJmZGp0iKt JSkx5d3EoHCTQL.3iQgj5WF5c.gQdGobQczPAzWR3hYhlF656GLugXF4ujYSwwiAygQATHBUow7G pbKFStTvW8ivAVVjvfH4HdgoZrlRccwJ_TyE1_6wg5y3w3FRhLvHnvcNSqMn1Aw1pEl8lojfbema NLiy4ZUkCi2Rm8UQ4Vqh1aVgthXLnWyQqLL2_J1JIrRxCPraCv7UAW__gFAtD.JhPUtEh1E5b6hA 4kv8W10LeNeYd0LkZ.3EgUKgw0xN5jWiOgXWIWFZgTEDt5FWv1WRqKP9CrX_wSJsaOCfwyIVnubb a677dhjySeJQqPZn4U0uV5kGrh.bg3Nyn71oqJBiXIdpr35.03KD_4BaGZNqqEIqy9XXi6sbEAH7 8oo7M6cFRgzrxSiVUraWVO0rQJQXSv8b8maMa0cyuKSG8TgCZw1NURTOql4zc6Gpogj73L_406ms D4K7TJ7aiI45QZnqEoCUfz.U2ALHCUCdxsFjaNT0Ju8trv3hg3.unhdfem7QmXp8eYz8pwBKSEXE ws.dH0i3di8sqSJ92wSH2I76VYTaLAmsjea7Q40Jtw1y.Mf2ntOzDVjqZ.P9C0Lk0AdOUjvhoW2A 893Rj.1Z.3yngyL8lS7beGsQ4iIXxEi6C68eLc6nTRWfA5muG2mmybwNYhN.uPvAH0y.yGuh0RqG Ievbtcs8fjOSwKEwQNssEwUuQgpSERcDSWcvFM0WDJzGtBSF8UeXv9zTiBx7tsOISvI7Swj.ueWl a31HsqALuSgU6dsHozkJgUYMcZ8jojW331MHnOyLN58xkiYumRTrlViMZmU1Kdoj9nJ4q1LEiVFR EN9gTKX_GZQkoQ_42AST_Uf.Q6hwC7bLJ2YAUqcVsnm_xcu3DNwmpYI1abflweD0dkWWvG.Tqdha NS_JzD4ymS3NMYniCNDIMkjzULue2lsv7juBv.iTksfIgPaJ703PKCuk0j4vpaVUzoDvXL774nuv gQ.ASTIPz2rYu_k18wo1.rby2klSY5WJJbrhM7or8mFcbSksKYXeti23ZIuHNLR1u.nEWa.S.9WS Z X-Sonic-MF: X-Sonic-ID: d163e112-a8d3-40ca-9480-f29d8d775161 Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Fri, 4 Aug 2023 02:15:31 +0000 Received: by hermes--production-bf1-7c4db57b6-49kxr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ff4a28eaf56c847c21b842917df06e3c; Fri, 04 Aug 2023 02:15:27 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: 5a7e48dddfb5 - main - tests: Add MAP_32BIT flag test Message-Id: <263CA271-1603-41FE-BAF9-E32AC5818945@yahoo.com> Date: Thu, 3 Aug 2023 19:15:14 -0700 To: Konstantin Belousov , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3731.700.6) References: <263CA271-1603-41FE-BAF9-E32AC5818945.ref@yahoo.com> X-Spamd-Result: default: False [-0.99 / 15.00]; NEURAL_HAM_SHORT(-0.99)[-0.990]; SUBJECT_ENDS_SPACES(0.50)[]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.206:from]; BLOCKLISTDE_FAIL(0.00)[98.137.68.206:server fail]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.206:from]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Spamd-Bar: / X-Rspamd-Queue-Id: 4RH8Sj58XCz4fTf Konstantin Belousov wrote on Date: Thu, 03 Aug 2023 20:58:47 UTC : > On Thu, Aug 03, 2023 at 02:50:57PM +0300, Dmitry Chagin wrote: > > On Wed, Aug 02, 2023 at 12:57:36AM +0300, Konstantin Belousov wrote: > > > On Tue, Aug 01, 2023 at 09:29:32PM +0100, Jessica Clarke wrote: > > > > On 1 Aug 2023, at 21:24, Dmitry Chagin = wrote: > > > > >=20 > > > > > The branch main has been updated by dchagin: > > > > >=20 > > > > > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5a7e48dddfb5a668ded4742b79e6f6f8= 8b647e6a > > > > >=20 > > > > > commit 5a7e48dddfb5a668ded4742b79e6f6f88b647e6a > > > > > Author: Dmitry Chagin > > > > > AuthorDate: 2023-08-01 20:23:15 +0000 > > > > > Commit: Dmitry Chagin > > > > > CommitDate: 2023-08-01 20:23:15 +0000 > > > > >=20 > > > > > tests: Add MAP_32BIT flag test > > > > >=20 > > > > > Reviewed by: kib, markj > > > > > Differential Revision: https://reviews.freebsd.org/D41236 > > > > > MFC after: 1 month > > > > > --- > > > > > tests/sys/vm/Makefile | 8 ++++++ > > > > > tests/sys/vm/mmap_map_32bit_helper.c | 51 = ++++++++++++++++++++++++++++++++++++ > > > > > tests/sys/vm/mmap_map_32bit_test.sh | 37 = ++++++++++++++++++++++++++ > > > > > 3 files changed, 96 insertions(+) > > > > >=20 > > > > > diff --git a/tests/sys/vm/Makefile b/tests/sys/vm/Makefile > > > > > index 8ef8a45e5f39..9aac49bc5320 100644 > > > > > --- a/tests/sys/vm/Makefile > > > > > +++ b/tests/sys/vm/Makefile > > > > > @@ -9,4 +9,12 @@ ATF_TESTS_C+=3D mlock_test \ > > > > > page_fault_signal \ > > > > > shared_shadow_inval_test > > > > >=20 > > > > > +.if ${MACHINE_ARCH} !=3D "i386" && ${MACHINE} !=3D "arm" && \ > > > > > + (${MACHINE} !=3D "powerpc" || ${MACHINE_ARCH} !=3D = "powerpc") > > > > > + # MAP_32BIT is only available on 64-bit platforms > > > >=20 > > > > So use ${MACHINE_ABI:Mlong64} after including src.opts.mk? > > >=20 > > > May be we should enable the MAP_32BIT flag on 32bit arches, = instead? > > > It requests allocation below 2G, which is half of VA on i386, or = 2/3 > > > on arm. Interestingly, it should work already from compat32. > >=20 > > It's disturbing that no none has requested this, I can do that > Please do. The largest part of the work is to recheck the man page and = tests. If I guess correctly, the above implies restricting the process size on native armv7 to a strict 2 GiBytes or so. The OrangePi+2Ed (cortex-a7) that I use has a somewhat larger effective process address space (RAM+SWAP usable by one process) than the armv7 chroot/jail use on any of the = cortex-a72/cortex-a53/cortex-x1c/cortex-a78c aarch64 systems that I've access to. I have actually built something on the OrangePi+2Ed that I could not build on the aarch64 systems in an = armv7 poudriere-devel jail --because of the process size limitation on aarch64 systems was smaller. (Not that I remember the details. I do not do such builds regularly. But I might have notes about it someplace.) So a ~2 GiByte process size limitation would make armv7 = chroot/jail/lib32=20 on aarch64 vs. native armv7 more uniform --but some native armv7's could be somewhat less capable. Note: It is not obvious to me that keeping armv7 going until FreeBSD = 15's release avoids being too restrictive, even as tier 2. Even the somewhat larger address space for native could easily end up being too much of a constraint, for example, much like the process size build problems that happen now for armv7 on aarch64 for port builds in poudriere(-devel) jails. For reference: CPU: ARM Cortex-A7 r0p5 (ECO: 0x00000000) CPU Features:=20 Multiprocessing, Thumb2, Security, Virtualization, Generic Timer, = VMSAv7, PXN, LPAE, Coherent Walk Optional instructions:=20 SDIV/UDIV, UMULL, SMULL, SIMD(ext) LoUU:2 LoC:3 LoUIS:2=20 Cache level 1: 32KB/64B 4-way data cache WB Read-Alloc Write-Alloc 32KB/32B 2-way instruction cache Read-Alloc Cache level 2: 512KB/64B 8-way unified cache WB Read-Alloc Write-Alloc real memory =3D 2113257472 (2015 MB) avail memory =3D 2054692864 (1959 MB) =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Fri Aug 4 09:08:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHKdX69f4z4gtFP; Fri, 4 Aug 2023 09:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHKdX5v6kz4HvQ; Fri, 4 Aug 2023 09:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691140128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JurOjFiwxB8ykGlvCeMpyKA286rE+iF0Wd7DAZq1fTU=; b=Hd5oaaZEqcaAqWIRkeb4TTyxg6Dmn+hXF57uCKrdaL99hj/Rlox6pX4IjScRYot3HBfIxB T+m4uLu4WCgWrOOW3H0b+SNiNSYru2UXPHKqoykZz60slkm+ybXfFcPHCI70FcJ1mEzyG4 nOTSgU3f8mmhSGuFoBlkEDswskysmoJxvufyW0qfTrgGLkevTncYzzMo2AnNhndLvGBFJR YdIJFPdsnk3Ip/H7jiACt39ENtdoQAgVvgngVuS6DL5kOVfTrIKRtZZbqDHJ9MepQhu8Mi 4i/voa2BT3krPeBxkbSLKoiPqp+WNOEgtOJp5T45+kt5UaVT1omreeR7kgHZDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691140128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JurOjFiwxB8ykGlvCeMpyKA286rE+iF0Wd7DAZq1fTU=; b=v8iD/Wn72b74TuLjlA8vs2jRbmmwSKrRENNYl4fIMfTTfQ8oRngxGQAtvOzgX9xOo1u1gc j6YPjmdR5OllraaYftc4ycq3IRf/jhBVimAXwODzmMjvirAGVGSTEbZBQ2/0m+37ZYZYeP 65m0u0o1SWvx6HU8GZMYaIc2UNpP82nIf6N2/CbnPOhhWIz03DGv1Ubhf/aeLJr86hBkNn HLABcKhZlLi6wNUROYDvTO0rf7hu6iu3PgcZNSTw1nZJkt80B3BdEQeRBnXjEnP4nM/tKR vOUUdto7kr1EfFcskODTkcMHK8jrcMbd0YYG4YX59icwvKiZ3CfCUgLHiSsphw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691140128; a=rsa-sha256; cv=none; b=GT6lnAKAnuXdxLTW1+wKE8+xZZ6i1aMSi1/uBlAxAY0eZjWFi37UQcCl4PacadhB60se5N L1IJEu8RP0jsJ7wth7e7Rn4EujfuZ52u/BFQtE9l9TBK6BkscjRmhfatV0ZnvHtP2Rv1Fc D7Y0CfZECV+rlvgXU/zMpdqkDsXcfKf5ylRU1IrljRW/qsOHRSauY77WsworEmAwRbZOZ9 ISJ+ZbqlpW7WGs4aP+oQ+Yd2/HpYR7oglVlpdkHWdYbho60Z0yqx+im3c3qQVTGusJ/ZN4 BRgQ6f5Dki/KesHYoNsPiN93OaQS6xZgGbJ/ZVz66xwZfEq+UXX2DUI6bOPsKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHKdX4wvhzwpd; Fri, 4 Aug 2023 09:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37498m7b088918; Fri, 4 Aug 2023 09:08:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37498k0T088913; Fri, 4 Aug 2023 09:08:46 GMT (envelope-from git) Date: Fri, 4 Aug 2023 09:08:46 GMT Message-Id: <202308040908.37498k0T088913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: b306c604df54 - main - locale: update to CLDR 43 and Unicode 15 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b306c604df541dede4d0f3cc96188bbf5b6719fe Auto-Submitted: auto-generated The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=b306c604df541dede4d0f3cc96188bbf5b6719fe commit b306c604df541dede4d0f3cc96188bbf5b6719fe Author: Yuri Pankov AuthorDate: 2023-08-03 23:47:16 +0000 Commit: Yuri Pankov CommitDate: 2023-08-03 23:47:16 +0000 locale: update to CLDR 43 and Unicode 15 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D41151 --- share/colldef_unicode/Makefile | 2 +- share/colldef_unicode/af_ZA.UTF-8.src | 250 +- share/colldef_unicode/am_ET.UTF-8.src | 96 +- share/colldef_unicode/ar_SA.UTF-8.src | 302 +- share/colldef_unicode/be_BY.UTF-8.src | 266 +- share/colldef_unicode/ca_AD.UTF-8.src | 250 +- share/colldef_unicode/cs_CZ.UTF-8.src | 250 +- share/colldef_unicode/da_DK.UTF-8.src | 250 +- share/colldef_unicode/el_GR.UTF-8.src | 78 +- share/colldef_unicode/en_US.UTF-8.src | 250 +- share/colldef_unicode/es_MX.UTF-8.src | 250 +- share/colldef_unicode/et_EE.UTF-8.src | 294 +- share/colldef_unicode/fa_AF.UTF-8.src | 382 +- share/colldef_unicode/fa_IR.UTF-8.src | 380 +- share/colldef_unicode/fi_FI.UTF-8.src | 246 +- share/colldef_unicode/fr_CA.UTF-8.src | 250 +- share/colldef_unicode/he_IL.UTF-8.src | 270 +- share/colldef_unicode/hi_IN.UTF-8.src | 148 +- share/colldef_unicode/hu_HU.UTF-8.src | 250 +- share/colldef_unicode/hy_AM.UTF-8.src | 112 +- share/colldef_unicode/is_IS.UTF-8.src | 250 +- share/colldef_unicode/ja_JP.UTF-8.src | 14580 +++-- share/colldef_unicode/kk_KZ.UTF-8.src | 264 +- share/colldef_unicode/ko_KR.UTF-8.src | 144 +- share/colldef_unicode/lt_LT.UTF-8.src | 250 +- share/colldef_unicode/lv_LV.UTF-8.src | 286 +- share/colldef_unicode/nn_NO.UTF-8.src | 250 +- share/colldef_unicode/pl_PL.UTF-8.src | 250 +- share/colldef_unicode/ro_RO.UTF-8.src | 250 +- share/colldef_unicode/ru_RU.UTF-8.src | 270 +- share/colldef_unicode/se_NO.UTF-8.src | 298 +- share/colldef_unicode/sk_SK.UTF-8.src | 250 +- share/colldef_unicode/sl_SI.UTF-8.src | 250 +- share/colldef_unicode/sr_RS.UTF-8.src | 272 +- share/colldef_unicode/sr_RS.UTF-8@latin.src | 250 +- share/colldef_unicode/sv_SE.UTF-8.src | 250 +- share/colldef_unicode/tr_TR.UTF-8.src | 250 +- share/colldef_unicode/uk_UA.UTF-8.src | 264 +- share/colldef_unicode/zh_CN.UTF-8.src | 84289 ++++++++++++------------- share/colldef_unicode/zh_TW.UTF-8.src | 5551 +- share/ctypedef/C.UTF-8.src | 301 +- share/monetdef_unicode/Makefile | 2 +- share/monetdef_unicode/ar_AE.UTF-8.src | 4 +- share/monetdef_unicode/ar_EG.UTF-8.src | 4 +- share/monetdef_unicode/ar_JO.UTF-8.src | 4 +- share/monetdef_unicode/ar_MA.UTF-8.src | 4 +- share/monetdef_unicode/ar_QA.UTF-8.src | 4 +- share/monetdef_unicode/ar_SA.UTF-8.src | 4 +- share/monetdef_unicode/bg_BG.UTF-8.src | 2 +- share/monetdef_unicode/he_IL.UTF-8.src | 4 +- share/monetdef_unicode/hr_HR.UTF-8.src | 50 - share/monetdef_unicode/is_IS.UTF-8.src | 2 +- tools/tools/locale/Makefile | 22 +- tools/tools/locale/README | 6 +- tools/tools/locale/etc/final-maps/map.UTF-8 | 4491 +- tools/tools/locale/etc/final-maps/widths.txt | 9993 ++- 56 files changed, 71313 insertions(+), 56878 deletions(-) diff --git a/share/colldef_unicode/Makefile b/share/colldef_unicode/Makefile index 6193c2fb499e..8ddfc447e9b9 100644 --- a/share/colldef_unicode/Makefile +++ b/share/colldef_unicode/Makefile @@ -8,7 +8,7 @@ FILESNAME= LC_COLLATE .SUFFIXES: .src .LC_COLLATE MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps -CLDR_VERSION= "41.0" +CLDR_VERSION= "43.0" .include diff --git a/share/colldef_unicode/af_ZA.UTF-8.src b/share/colldef_unicode/af_ZA.UTF-8.src index aeb1a06fd276..0861ec5cf5fa 100644 --- a/share/colldef_unicode/af_ZA.UTF-8.src +++ b/share/colldef_unicode/af_ZA.UTF-8.src @@ -34,6 +34,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -62,7 +63,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -79,20 +79,20 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -101,7 +101,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -160,11 +160,11 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -262,13 +262,13 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -288,11 +288,11 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -356,10 +356,9 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -367,16 +366,16 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -387,6 +386,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -395,9 +395,9 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -539,6 +539,7 @@ order_start forward;forward;forward;forward + @@ -567,7 +568,6 @@ order_start forward;forward;forward;forward - @@ -584,20 +584,20 @@ order_start forward;forward;forward;forward + + - - - - - - + + + + + + + + + - - - - - @@ -606,7 +606,7 @@ order_start forward;forward;forward;forward - + @@ -665,11 +665,11 @@ order_start forward;forward;forward;forward - + @@ -767,13 +767,13 @@ order_start forward;forward;forward;forward - - + - + + @@ -793,11 +793,11 @@ order_start forward;forward;forward;forward - + @@ -861,10 +861,9 @@ order_start forward;forward;forward;forward - - + @@ -872,16 +871,16 @@ order_start forward;forward;forward;forward - + + - @@ -892,6 +891,7 @@ order_start forward;forward;forward;forward + @@ -900,9 +900,9 @@ order_start forward;forward;forward;forward - + @@ -1061,20 +1061,20 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -1083,7 +1083,7 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; + ;;; ;;; ;;; ;;; @@ -1324,12 +1324,12 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -1435,7 +1435,7 @@ order_start forward;forward;forward;forward "";"";""; "";"";""; "";"";""; - "";"";""; + "";"";""; ;;; ;;; ;;; @@ -1683,8 +1683,8 @@ order_start forward;forward;forward;forward ;"";""; ;"";""; ;"";""; - ;"";""; - ;"";""; + ;"";""; + ;"";""; "";"";""; "";"";""; "";"";""; @@ -1716,14 +1716,14 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -1795,13 +1795,13 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -2014,29 +2014,29 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -2083,21 +2083,21 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; @@ -2127,7 +2127,7 @@ order_start forward;forward;forward;forward "";"";""; "";"";""; "";"";""; - "";"";""; + "";"";""; "";"";""; "";"";""; ;;; @@ -2142,10 +2142,10 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; ;;; diff --git a/share/colldef_unicode/am_ET.UTF-8.src b/share/colldef_unicode/am_ET.UTF-8.src index 73d6363faa7f..ae42f2d20420 100644 --- a/share/colldef_unicode/am_ET.UTF-8.src +++ b/share/colldef_unicode/am_ET.UTF-8.src @@ -13,13 +13,13 @@ LC_COLLATE collating-symbol collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol -collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -49,21 +49,21 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -75,7 +75,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -351,13 +351,13 @@ order_start forward;forward;forward;forward + + + - - - @@ -387,21 +387,21 @@ order_start forward;forward;forward;forward + + - - - - - - + + + + + + + + + - - - - - @@ -413,7 +413,7 @@ order_start forward;forward;forward;forward - + @@ -712,9 +712,9 @@ order_start forward;forward;forward;forward IGNORE;IGNORE;IGNORE; IGNORE;IGNORE;IGNORE; IGNORE;IGNORE;IGNORE; - IGNORE;"";""; - IGNORE;"";""; - IGNORE;"";""; + IGNORE;"";""; + IGNORE;"";""; + IGNORE;"";""; ;;; ;;; ;;; @@ -739,20 +739,20 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; - ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; + ;;; ;;; ;;; "";;""; @@ -771,7 +771,7 @@ order_start forward;forward;forward;forward ;;; ;;; ;;; - ;;; + ;;; ;;; ;;; ;;; diff --git a/share/colldef_unicode/ar_SA.UTF-8.src b/share/colldef_unicode/ar_SA.UTF-8.src index f04377e7c01f..01157b428642 100644 --- a/share/colldef_unicode/ar_SA.UTF-8.src +++ b/share/colldef_unicode/ar_SA.UTF-8.src @@ -62,48 +62,49 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -145,10 +146,10 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -173,24 +174,24 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -202,8 +203,8 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -405,48 +406,49 @@ order_start forward;forward;forward;forward + + + - - - + - - - - - + + + + + + + - - - + - - *** 161386 LINES SKIPPED *** From nobody Fri Aug 4 09:50:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHLYn2RTfz4gwtf; Fri, 4 Aug 2023 09:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHLYn1sXqz4L78; Fri, 4 Aug 2023 09:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691142637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GxBdpW04LzKmy3kh4jxJUjmgbM4x4gxhVV7IUWetBTs=; b=ZwcosV4rUQqvS5HgcLU6G7wi3U85RklCTfKeVmCeX0/whX/ME0RAK1sm/FwMNzUBpwJPRE MknIVUGfC8nB0BB5bP9FDGhGCpzDfthVQnusGqFVcdF/xBceY5GDi4msEHTg1eSu7EjH59 q5Knt9xafXOhRMSf0/BiJ2tmzXZj47ECCq9uuJq6UaqXux3kxoe3RcTyKKtTx/iCZ63T+5 3F6UJkiAGTesP2RJ99etMmaoN+Vrs4QaE3GdK5mAyFNv60g5QXvC3vqeQI67J1y+2ziWdC ootmkwO23oADmbiRgOAWfGwLNgQk2u5dFwyccYEwSB1IL3BOeoqy/hEmKv9KXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691142637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GxBdpW04LzKmy3kh4jxJUjmgbM4x4gxhVV7IUWetBTs=; b=BpPqqTD9MR4UPCmeUKtIHwtKhWB75TPU96G6TnnFWQwC9RwrpDJWZEx3cSgyfMiiIXU5qG wjfStMYqkgMys3EtjTrLW97sDiaVFfSneNi+cHHliHFr8Dd3H6BXFDr4NWXWrb6YLvsod1 meafrq3ZkdIGeWnvA8vFz9cmz6a89ab9BiJ6bjqA7S/dbeFUZXAjs9p+4am9/YM1b5gUgD QXgzBMPErjlp4JthSywJufpDsBKzHlSbLtWo1HCN8yHk4VScKNWnJYxYHmEOxFBoL8vR6i 9QO32AdO0w5jE4+AvDeNvhIgavKD1Fjr3qrq7055BVgqQrkXz8SniNnYFXkmuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691142637; a=rsa-sha256; cv=none; b=xZg2kutMPc6PX2b6mjZOImv08LY4g8FxYepkr9Mt5dFh9ImqDIxvoGUM2kNt6afef2L1cw v1Dpnjg9tmP5vIX0E4cVHO/HIon08kD7iKsRm0k8BaC+6J79bCMTcw+KzMGfoPGKT+1VD+ MZ8PgjSqaYOjzlZWBOmlK0km6mXJJBWxzxXPTda/ZsXL/E3qOlU+wbeW97hUyqSAT/JsqW Sn3QQil37OVr3SAYuL1KbQCQWmwV9cXTKH+2qx6WvWQ5KdAL8FxMTyf5LGBl55rJSsiBWQ 6bVBtGc9CfpdRNVEVpHwI+FvxtViK8Li4b1ZjQNyGYdkU7XFEOeHLU/WZWeq6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHLYn0xCpzyC3; Fri, 4 Aug 2023 09:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3749obMY063190; Fri, 4 Aug 2023 09:50:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3749obUW063189; Fri, 4 Aug 2023 09:50:37 GMT (envelope-from git) Date: Fri, 4 Aug 2023 09:50:37 GMT Message-Id: <202308040950.3749obUW063189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 4350a03fef2c - main - arm64: Make dpcpu static List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4350a03fef2c2da393b222de514821d50b1c656f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4350a03fef2c2da393b222de514821d50b1c656f commit 4350a03fef2c2da393b222de514821d50b1c656f Author: Andrew Turner AuthorDate: 2023-08-03 20:32:57 +0000 Commit: Andrew Turner CommitDate: 2023-08-04 09:50:09 +0000 arm64: Make dpcpu static We don't use this directly outside this file so it can be static. Sponsored by: Arm Ltd --- sys/arm64/arm64/mp_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index 9aef6a9a080f..6f38cd8d0f1a 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -147,7 +147,7 @@ static volatile int aps_started; static volatile int aps_ready; /* Temporary variables for init_secondary() */ -void *dpcpu[MAXCPU - 1]; +static void *dpcpu[MAXCPU - 1]; static bool is_boot_cpu(uint64_t target_cpu) From nobody Fri Aug 4 09:50:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHLYp3bHFz4gwg3; Fri, 4 Aug 2023 09:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHLYp2rt2z4LQ9; Fri, 4 Aug 2023 09:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691142638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l45RITMyBHLnt5vWFq0oyXUF6cpijXOAT2dwFSms/ZU=; b=TV3Z5AdlERLfrLB6Zq2Vr2DkKEl5jCMDr9s/d5Uv1DT2J6jeLEKmtcCosjhiZpoFLe+5Vw Z0Is9P2K+/e1ZWNP9+MgRbaEmnIrQMAvFxRWZ3OCSt2GFrBPKySXspdjVg0Jlgi5aseGTk aKcSP4XYVm3N4fPM4bIzOILmBiqBgYqps7SoOYBnYr9x3ePQy+VQmvjWrdbhCYZLX5jniF 5hclKpF8GmaOdBC3Fiy9GbBH3Y40z67pulIJIzBdkKdq1/atUfdtk/V5Cc8kmP4txeF+em l9j1ddpmk2WSBLberG6yuDVJcR9pR682sLfvKMOFDyfqKeajxK7WKrRLuaVMOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691142638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l45RITMyBHLnt5vWFq0oyXUF6cpijXOAT2dwFSms/ZU=; b=Sq+JvMNRCFqmyhXvYqcimWwR0DuCHGnqSARogEdyjjNe9J8qO8gVTNvn+4rm5ondGTzoGG gGixzIar9cEMVOlH9/CgjdqCKgg3+82c+RE9xvkOuwaiq2mqB0b4ZZx4cKFksS8umOFNfk hNVwx9ftW9jjBwTMthYgD1peUAGlJHDUfHcQNFwKulGaTlc0+jVcUEzklBN6JJFqIlWtD9 wSHiXKJgidw6+SGOwdgrx2lG8WAiLryMdUWdjqV4HmLx+U5WwDUO4/4SnSK6tR/2EJtOlv Fis76Mdln8Z82BlZK6ABUQleOi0lyF/CRkYL7DjArICooPijoMN6bR3mI0o4vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691142638; a=rsa-sha256; cv=none; b=gpMvbC/lDY9lR4Sq0IUF93jX4blcVPNZVaKTzKFz/IAFezKeWk6qMPGv7Hfys0WQRVgCKr CRCqYbXTfd7DzNPzKxZsqQLVAShtoPAYszgTTgkJMYlcvcyE04IpODm4ab4wSnkAdiOgF6 jEYXe/w0YG0ga+sZV4/nfRcyZa8bjzDuK+Y4+YYKHXBl7ELigE1Ot96PNNucF+q4Mvfjz6 1RXhWHE2F0/93jDDnZ+l6jLRPCM9RqRpYq+70U2p5FCgXL7CT4VGT5KTPW0fwwNdFQ74n3 D2WQ1/0TgiwSCgUa+KvjBAkiGEBtY5GaR2J7hFrZJu7d9BMSjkB+Fr7OMIcUHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHLYp1rK5zxvj; Fri, 4 Aug 2023 09:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3749ocCa063218; Fri, 4 Aug 2023 09:50:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3749ocPT063217; Fri, 4 Aug 2023 09:50:38 GMT (envelope-from git) Date: Fri, 4 Aug 2023 09:50:38 GMT Message-Id: <202308040950.3749ocPT063217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a2afd7b818fa - main - Remove MAXCPUS from the gicv3 driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2afd7b818fa6c25c1e66871339d907c7658322c Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a2afd7b818fa6c25c1e66871339d907c7658322c commit a2afd7b818fa6c25c1e66871339d907c7658322c Author: Andrew Turner AuthorDate: 2023-08-04 09:14:16 +0000 Commit: Andrew Turner CommitDate: 2023-08-04 09:50:09 +0000 Remove MAXCPUS from the gicv3 driver We create a static array of pointers to per-CPU data. Because the cpuid space on arm64 is not sparse there is no need to add an extra level of indirection. Move to use mallocarray to allocate the redistributors as a single array. Sponsored by: Arm Ltd --- sys/arm64/arm64/gic_v3.c | 46 +++++++++++++++++--------------------------- sys/arm64/arm64/gic_v3_var.h | 10 +++++----- 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c index d108cabfe4d9..c448320a86e8 100644 --- a/sys/arm64/arm64/gic_v3.c +++ b/sys/arm64/arm64/gic_v3.c @@ -226,8 +226,8 @@ gic_r_read_4(device_t dev, bus_size_t offset) struct resource *rdist; sc = device_get_softc(dev); - rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)]->res; - offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)]->offset; + rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)].res; + offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)].offset; return (bus_read_4(rdist, offset)); } @@ -238,8 +238,8 @@ gic_r_read_8(device_t dev, bus_size_t offset) struct resource *rdist; sc = device_get_softc(dev); - rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)]->res; - offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)]->offset; + rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)].res; + offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)].offset; return (bus_read_8(rdist, offset)); } @@ -250,8 +250,8 @@ gic_r_write_4(device_t dev, bus_size_t offset, uint32_t val) struct resource *rdist; sc = device_get_softc(dev); - rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)]->res; - offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)]->offset; + rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)].res; + offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)].offset; bus_write_4(rdist, offset, val); } @@ -262,8 +262,8 @@ gic_r_write_8(device_t dev, bus_size_t offset, uint64_t val) struct resource *rdist; sc = device_get_softc(dev); - rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)]->res; - offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)]->offset; + rdist = sc->gic_redists.pcpu[PCPU_GET(cpuid)].res; + offset += sc->gic_redists.pcpu[PCPU_GET(cpuid)].offset; bus_write_8(rdist, offset, val); } @@ -431,7 +431,6 @@ int gic_v3_detach(device_t dev) { struct gic_v3_softc *sc; - size_t i; int rid; sc = device_get_softc(dev); @@ -446,8 +445,7 @@ gic_v3_detach(device_t dev) for (rid = 0; rid < (sc->gic_redists.nregions + 1); rid++) bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->gic_res[rid]); - for (i = 0; i <= mp_maxid; i++) - free(sc->gic_redists.pcpu[i], M_GIC_V3); + free(sc->gic_redists.pcpu, M_GIC_V3); free(sc->ranges, M_GIC_V3); free(sc->gic_res, M_GIC_V3); @@ -497,7 +495,7 @@ gic_v3_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) *result = (intr_nirq - sc->gic_nirqs) / sc->gic_nchildren; return (0); case GICV3_IVAR_REDIST: - *result = (uintptr_t)sc->gic_redists.pcpu[PCPU_GET(cpuid)]; + *result = (uintptr_t)&sc->gic_redists.pcpu[PCPU_GET(cpuid)]; return (0); case GIC_IVAR_HW_REV: KASSERT( @@ -1231,8 +1229,8 @@ gic_v3_wait_for_rwp(struct gic_v3_softc *sc, enum gic_v3_xdist xdist) offset = 0; break; case REDIST: - res = sc->gic_redists.pcpu[cpuid]->res; - offset = sc->gic_redists.pcpu[PCPU_GET(cpuid)]->offset; + res = sc->gic_redists.pcpu[cpuid].res; + offset = sc->gic_redists.pcpu[PCPU_GET(cpuid)].offset; break; default: KASSERT(0, ("%s: Attempt to wait for unknown RWP", __func__)); @@ -1368,16 +1366,8 @@ gic_v3_dist_init(struct gic_v3_softc *sc) static int gic_v3_redist_alloc(struct gic_v3_softc *sc) { - u_int cpuid; - - /* Allocate struct resource for all CPU's Re-Distributor registers */ - for (cpuid = 0; cpuid <= mp_maxid; cpuid++) - if (CPU_ISSET(cpuid, &all_cpus) != 0) - sc->gic_redists.pcpu[cpuid] = - malloc(sizeof(*sc->gic_redists.pcpu[0]), - M_GIC_V3, M_WAITOK); - else - sc->gic_redists.pcpu[cpuid] = NULL; + sc->gic_redists.pcpu = mallocarray(mp_maxid + 1, + sizeof(sc->gic_redists.pcpu[0]), M_GIC_V3, M_WAITOK); return (0); } @@ -1423,12 +1413,12 @@ gic_v3_redist_find(struct gic_v3_softc *sc) do { typer = bus_read_8(r_res, offset + GICR_TYPER); if ((typer >> GICR_TYPER_AFF_SHIFT) == aff) { - KASSERT(sc->gic_redists.pcpu[cpuid] != NULL, + KASSERT(cpuid <= mp_maxid, ("Invalid pointer to per-CPU redistributor")); /* Copy res contents to its final destination */ - sc->gic_redists.pcpu[cpuid]->res = r_res; - sc->gic_redists.pcpu[cpuid]->offset = offset; - sc->gic_redists.pcpu[cpuid]->lpi_enabled = false; + sc->gic_redists.pcpu[cpuid].res = r_res; + sc->gic_redists.pcpu[cpuid].offset = offset; + sc->gic_redists.pcpu[cpuid].lpi_enabled = false; if (bootverbose) { device_printf(sc->dev, "CPU%u Re-Distributor has been found\n", diff --git a/sys/arm64/arm64/gic_v3_var.h b/sys/arm64/arm64/gic_v3_var.h index 47e73c1ab3b7..21fce2326d03 100644 --- a/sys/arm64/arm64/gic_v3_var.h +++ b/sys/arm64/arm64/gic_v3_var.h @@ -56,7 +56,7 @@ struct gic_redists { /* Number of Re-Distributor regions */ u_int nregions; /* Per-CPU Re-Distributor data */ - struct redist_pcpu *pcpu[MAXCPU]; + struct redist_pcpu *pcpu; }; struct gic_v3_softc { @@ -138,8 +138,8 @@ void gic_r_write_8(device_t, bus_size_t, uint64_t var); u_int cpu = PCPU_GET(cpuid); \ \ bus_read_##len( \ - (sc)->gic_redists.pcpu[cpu]->res, \ - (sc)->gic_redists.pcpu[cpu]->offset + (reg)); \ + (sc)->gic_redists.pcpu[cpu].res, \ + (sc)->gic_redists.pcpu[cpu].offset + (reg)); \ }) #define gic_r_write(sc, len, reg, val) \ @@ -147,8 +147,8 @@ void gic_r_write_8(device_t, bus_size_t, uint64_t var); u_int cpu = PCPU_GET(cpuid); \ \ bus_write_##len( \ - (sc)->gic_redists.pcpu[cpu]->res, \ - (sc)->gic_redists.pcpu[cpu]->offset + (reg), \ + (sc)->gic_redists.pcpu[cpu].res, \ + (sc)->gic_redists.pcpu[cpu].offset + (reg), \ (val)); \ }) From nobody Fri Aug 4 10:09:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHLzh67xrz4gyFY; Fri, 4 Aug 2023 10:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHLzh5fkjz4N1p; Fri, 4 Aug 2023 10:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691143776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fwp/TN8MSI6RyPrB+IRHfyYmF95Rn5RzYrLYrCYztSQ=; b=E/win6FGn5MHQnUJothWyw/DqOwTIajQNigi5xdBO7fqkYuE35w9AH71a0Rn9oyCgw61Rj pd8pX6j3AZrVD452B4jiQAEvcuFengxy4ZENOu2EaCsQlYz3KYOwZJnW+7nxO7/0Po84ge LmsTO+6v0sTBpcgxbYsDedj5Mk6xDCne1lntfMXREnPHQIhNOUQa2nHRexMnQMjdeUtowi MmwGYl7TKKBOA28W89DWdKLsz3pAzcrlhmPBJ09Jg/TszsZ9USP+PSxEwqlaBnsPYMElwr mxQAwtjQg09NgXM1FUqCfg2fysgXXZP5PCl8YkIInyjX+GxmIEU5yIQf9MqASQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691143776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fwp/TN8MSI6RyPrB+IRHfyYmF95Rn5RzYrLYrCYztSQ=; b=qVf16ztXACrHWrTb4h/VfHVOQNuh5ftqyDFtW2xaR7O2g60nERnoRgzuBbzDzdzLIORpya otLTAaA3XfzsoQ2PWdOgeqmcllhhg9g1qiw72tdjKgKLp8/Xd/48+cj0jAg5GymQg8MPJe JWZFrGonajPP+TkDRX43yTXvicgNkhLb5D5BhZqyICPP5UIHEeuZywBhvaQmKt8DbRc4VW Q9+xOMHLDo4aNguv6JAkD4TBoMAWUk1+gP3/I8RMS8kBaQUCe497sjcyG/L2AscSvMVmfq sOSa4/e+ixn3tFVTKfI498r/lf+yapD7BRfKi2G4NuFQlKVqTRfsTGaqdSfbKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691143776; a=rsa-sha256; cv=none; b=EYLqZ0EIhRaaac1dTaS5n8xggZYFs0I2Nmb5d84AtI8NbPkWpC/IDunB52iu6xpec7/XhN zRUkelOIfzT4Zx676vRvHWp3HsdcthdJpYTb7Nm0+4uUlvyCkbXf2woe2gsUA0HzEI1Vlo oI8MVV0S/43JcEOkS2mojbyiP+ux5qZok5CLWf/c5rioLEXl55+4VDEypIUxJVdxWnhNzU dy0Tgmt7BymDFFGvt60MU/DxGbCObPdtt1IzyXAWbf6DxADY/+88F7780XiRmgmin9XfdC BAeqUIAsLR1Ch+Af7VIWq4vkLBiyXL7el+z0muSIneh5kO+8ZA/aTMvFhagUAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHLzh4bgWzycb; Fri, 4 Aug 2023 10:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374A9apJ088442; Fri, 4 Aug 2023 10:09:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374A9arH088441; Fri, 4 Aug 2023 10:09:36 GMT (envelope-from git) Date: Fri, 4 Aug 2023 10:09:36 GMT Message-Id: <202308041009.374A9arH088441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: dd3055a75f3f - main - OptionalObsoleteFiles: add missed keymaps for sycons List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd3055a75f3f97c53b403905ec679ea4ccced6ef Auto-Submitted: auto-generated The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=dd3055a75f3f97c53b403905ec679ea4ccced6ef commit dd3055a75f3f97c53b403905ec679ea4ccced6ef Author: Yuri Pankov AuthorDate: 2023-08-04 10:04:17 +0000 Commit: Yuri Pankov CommitDate: 2023-08-04 10:09:08 +0000 OptionalObsoleteFiles: add missed keymaps for sycons --- tools/build/mk/OptionalObsoleteFiles.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 783e75e5b4c3..8a3ad037f4e5 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -7480,6 +7480,7 @@ OLD_FILES+=usr/share/syscons/keymaps/by.cp1131.kbd OLD_FILES+=usr/share/syscons/keymaps/by.cp1251.kbd OLD_FILES+=usr/share/syscons/keymaps/by.iso5.kbd OLD_FILES+=usr/share/syscons/keymaps/ce.iso2.kbd +OLD_FILES+=usr/share/syscons/keymaps/colemak-dh.iso15.acc.kbd OLD_FILES+=usr/share/syscons/keymaps/colemak.iso15.acc.kbd OLD_FILES+=usr/share/syscons/keymaps/cs.latin2.qwertz.kbd OLD_FILES+=usr/share/syscons/keymaps/cz.iso2.kbd @@ -7564,6 +7565,7 @@ OLD_FILES+=usr/share/syscons/keymaps/us.dvorakx.kbd OLD_FILES+=usr/share/syscons/keymaps/us.emacs.kbd OLD_FILES+=usr/share/syscons/keymaps/us.iso.acc.kbd OLD_FILES+=usr/share/syscons/keymaps/us.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.iso.macbook.kbd OLD_FILES+=usr/share/syscons/keymaps/us.pc-ctrl.kbd OLD_FILES+=usr/share/syscons/keymaps/us.unix.kbd OLD_FILES+=usr/share/syscons/scrnmaps/armscii8-2haik8.scm From nobody Fri Aug 4 10:46:39 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHMpR60Kbz4h1Yf; Fri, 4 Aug 2023 10:46:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHMpR5p1wz4Qrg; Fri, 4 Aug 2023 10:46:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691145999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CTxGf7SxOXVwwlmf60mf6VjoEFGjCvSvVdf/VT18Ses=; b=vHszI6NKWKXB6qJyAlFnLOLAGlGu+PSq0m88Q9+XNawAirbwRSOApz6MNF5wKR5AStJ2sU cEW53YPZZERmba2adynhM22HBb4n4yxqPAIpdMY1H9QTWw9m9p6/vS6o0/kBILU0HbAhOd PTR0Ahy0urU5tkcTNMfy+fpgudk5W42UT0A5T8fz4qDmDEF0ZmdRy4JLt+BDTwVjE1uDxA X+O/vYU5PPa+qiGpt8FlSqn/KNjjJYdtxD4lk5fKHkXerxLMkFH/lTBnBGM21nKYHOXloh LELTvQohbBqFoV5Udnj3JMmEOqtmyCkeMqA4d/vbIZG7vgqyDTYR39ZgdYLAow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691145999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CTxGf7SxOXVwwlmf60mf6VjoEFGjCvSvVdf/VT18Ses=; b=B8ij8zFD5hafamOE8rV+Ro+P3tQwo8/MstTm+tcbtBnqxKMo/GMtA8NsZ3wOxhsMqAQHNd KXSN2QMh3qs8E6mW+3vZz913I5hS35CWS48c6/cNSC0wGO9Uro4ApA4o1Nka/Q2q9bNhFI TRuFhSf0qc5ffuV9l53BwI0CKgpm/Oay/04Ct/4cNyZQQDa2ZGTG8LxLw/hTmf7Qk10Q6b zuVX6GjzWOX/OsrInjMh4n/v+vNtyd2yXSNp47OIgSTSxdy8Pq0gelrpyFlMSjdYDBm+fJ 8d8HBRSBRSzCmLeDyEYIpXoses9GwZpoA8OrN87EDMpAZV3N8RCmHBEHlfsCng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691145999; a=rsa-sha256; cv=none; b=ORjbd9A8n+TMdtXLR/Ssl6foDlevHSu17Sb8sASkSfLf1EBWgnz7v6rRd/Kd0HqFHFNmjz VuhQzW9vkLW5EWnQasm3axGI7z0Z2WmCbsVhA+82FnAHG3/1X39maMr0rtSo/Jnc1ySHSy +lMjHF46qJqqmX95HFKL+6mOJdIJ9askmMeFIibJl7Qviq1S9cSha6EGpolxigiePgx7m3 buIExgKhomyEdGTY+o2pFnqjGWP3WUiR4uKR67fKrRrbFmsnu5zpWUBN5kZsvZDbYltjx4 9dWThKg4LXWtdcubjc0J4X184IruwBuFJZySzRU8l+IEPNHvNiY7m/0Ncvb19g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHMpR4rZQz10Br; Fri, 4 Aug 2023 10:46:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374Akd1C053673; Fri, 4 Aug 2023 10:46:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374AkdRv053672; Fri, 4 Aug 2023 10:46:39 GMT (envelope-from git) Date: Fri, 4 Aug 2023 10:46:39 GMT Message-Id: <202308041046.374AkdRv053672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: b5a3a89c5067 - main - unzip: swtich to bsdunzip from libarchive List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5a3a89c50671a1ad29e7c43fe15e7b16feac239 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=b5a3a89c50671a1ad29e7c43fe15e7b16feac239 commit b5a3a89c50671a1ad29e7c43fe15e7b16feac239 Author: Martin Matuska AuthorDate: 2023-07-31 11:54:58 +0000 Commit: Martin Matuska CommitDate: 2023-08-04 10:45:41 +0000 unzip: swtich to bsdunzip from libarchive Unzip from FreeBSD has been ported to libarchive. Change usr.bin/unzip to use bsdunzip from libarchive. Differential Revision: https://reviews.freebsd.org/D41239 PR: 272845 (exp-run) MFC after: 1 month --- etc/mtree/BSD.tests.dist | 2 + lib/libarchive/config_freebsd.h | 5 + usr.bin/unzip/Makefile | 28 +- usr.bin/unzip/tests/Makefile | 74 +++ usr.bin/unzip/tests/Makefile.depend | 24 + usr.bin/unzip/tests/functional_test.sh | 56 ++ usr.bin/unzip/unzip.1 | 207 ------ usr.bin/unzip/unzip.c | 1141 -------------------------------- 8 files changed, 188 insertions(+), 1349 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 9312a6c2980b..943924c56bae 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1134,6 +1134,8 @@ .. uniq .. + unzip + .. vmstat .. wc diff --git a/lib/libarchive/config_freebsd.h b/lib/libarchive/config_freebsd.h index 408bd1f12dbc..5211513610f3 100644 --- a/lib/libarchive/config_freebsd.h +++ b/lib/libarchive/config_freebsd.h @@ -113,6 +113,8 @@ #define HAVE_FCNTL 1 #define HAVE_FCNTL_H 1 #define HAVE_FDOPENDIR 1 +#define HAVE_FNMATCH 1 +#define HAVE_FNMATCH_H 1 #define HAVE_FORK 1 #define HAVE_FSEEKO 1 #define HAVE_FSTAT 1 @@ -125,6 +127,8 @@ #define HAVE_GETEUID 1 #define HAVE_GETGRGID_R 1 #define HAVE_GETGRNAM_R 1 +#define HAVE_GETLINE 1 +#define HAVE_GETOPT_OPTRESET 1 #define HAVE_GETPID 1 #define HAVE_GETPWNAM_R 1 #define HAVE_GETPWUID_R 1 @@ -205,6 +209,7 @@ #define HAVE_SYS_MOUNT_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_POLL_H 1 +#define HAVE_SYS_QUEUE_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_STATVFS_H 1 #define HAVE_SYS_STAT_H 1 diff --git a/usr.bin/unzip/Makefile b/usr.bin/unzip/Makefile index c1713e95222b..e0b5ac74246d 100644 --- a/usr.bin/unzip/Makefile +++ b/usr.bin/unzip/Makefile @@ -1,6 +1,32 @@ # $FreeBSD$ -PROG = unzip +.include + +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive +_LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive + +PROG= bsdunzip + +BSDUNZIP_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h + +.PATH: ${_LIBARCHIVEDIR}/unzip +SRCS= bsdunzip.c + +.PATH: ${_LIBARCHIVEDIR}/libarchive_fe +SRCS+= cmdline.c err.c passphrase.c + +CFLAGS+= -DBSDUNZIP_VERSION_STRING=\"${BSDUNZIP_VERSION_STRING}\" +CFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\" +CFLAGS+= -I${_LIBARCHIVEDIR}/unzip -I${_LIBARCHIVEDIR}/libarchive_fe + LIBADD= archive +SYMLINKS=bsdunzip ${BINDIR}/unzip +MLINKS= bsdunzip.1 unzip.1 + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include +# DO NOT DELETE diff --git a/usr.bin/unzip/tests/Makefile b/usr.bin/unzip/tests/Makefile new file mode 100644 index 000000000000..577c0936a151 --- /dev/null +++ b/usr.bin/unzip/tests/Makefile @@ -0,0 +1,74 @@ +# $FreeBSD$ + +PACKAGE= tests + +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive + +ATF_TESTS_SH+= functional_test + +BINDIR= ${TESTSDIR} + +PROGS+= bsdunzip_test + +CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" +CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} + +CFLAGS+= -I${.OBJDIR} +CFLAGS+= -I${_LIBARCHIVEDIR}/unzip -I${_LIBARCHIVEDIR}/unzip/test +CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive +CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive_fe -I${_LIBARCHIVEDIR}/test_utils + +# Uncomment to link against dmalloc +#LDADD+= -L/usr/local/lib -ldmalloc +#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC + +CFLAGS.test_utils.c+= -Wno-cast-align + +.PATH: ${_LIBARCHIVEDIR}/libarchive_fe +UNZIP_SRCS+= err.c + +.PATH: ${_LIBARCHIVEDIR}/unzip/test +TESTS_SRCS= \ + test_0.c \ + test_C.c \ + test_L.c \ + test_P_encryption.c \ + test_Z1.c \ + test_basic.c \ + test_d.c \ + test_glob.c \ + test_j.c \ + test_n.c \ + test_not_exist.c \ + test_o.c \ + test_p.c \ + test_q.c \ + test_singlefile.c \ + test_t.c \ + test_t_bad.c \ + test_version.c \ + test_x.c + +SRCS.bsdunzip_test= list.h \ + ${UNZIP_SRCS} \ + ${TESTS_SRCS} + +.PATH: ${_LIBARCHIVEDIR}/test_utils +SRCS.bsdunzip_test+= test_main.c \ + test_utils.c + +LIBADD.bsdunzip_test= archive + +list.h: ${TESTS_SRCS} Makefile + @(cd ${_LIBARCHIVEDIR}/unzip/test && \ + grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp + @mv ${.TARGET}.tmp ${.TARGET} + +CLEANFILES+= list.h list.h.tmp + +${PACKAGE}FILES+= test_basic.zip.uu +${PACKAGE}FILES+= test_encrypted.zip.uu +${PACKAGE}FILES+= test_singlefile.zip.uu +${PACKAGE}FILES+= test_t_bad.zip.uu + +.include diff --git a/usr.bin/unzip/tests/Makefile.depend b/usr.bin/unzip/tests/Makefile.depend new file mode 100644 index 000000000000..138ae4120671 --- /dev/null +++ b/usr.bin/unzip/tests/Makefile.depend @@ -0,0 +1,24 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libarchive \ + lib/libbz2 \ + lib/libc \ + lib/libcompiler_rt \ + lib/libexpat \ + lib/liblzma \ + lib/libthr \ + lib/libz \ + secure/lib/libcrypto \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.bin/unzip/tests/functional_test.sh b/usr.bin/unzip/tests/functional_test.sh new file mode 100755 index 000000000000..1b39e057d538 --- /dev/null +++ b/usr.bin/unzip/tests/functional_test.sh @@ -0,0 +1,56 @@ +# +# Copyright 2015 EMC Corp. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $FreeBSD$ + +SRCDIR=$(atf_get_srcdir) +TESTER="${SRCDIR}/bsdunzip_test" +export BSDUNZIP=$(which bsdunzip) + +check() +{ + local testcase=${1}; shift + + # For some odd reason /bin/sh spuriously writes + # "write error on stdout" with some of the testcases + # + # Probably an issue with how they're written as it calls system(3) to + # clean up directories.. + atf_check -e ignore -o ignore -s exit:0 ${TESTER} -d -r "${SRCDIR}" -v "${testcase}" +} + +atf_init_test_cases() +{ + # Redirect stderr to stdout for the usage message because if you don't + # kyua list/kyua test will break: + # https://github.com/jmmv/kyua/issues/149 + testcases=$(${TESTER} -h 2>&1 | awk 'p != 0 && $1 ~ /^[0-9]+:/ { print $NF } /Available tests:/ { p=1 }') + for testcase in ${testcases}; do + atf_test_case ${testcase} + eval "${testcase}_body() { check ${testcase}; }" + atf_add_test_case ${testcase} + done +} diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1 deleted file mode 100644 index fd826fbe1c05..000000000000 --- a/usr.bin/unzip/unzip.1 +++ /dev/null @@ -1,207 +0,0 @@ -.\"- -.\" Copyright (c) 2007-2008 Dag-Erling Smørgrav -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd June 27, 2023 -.Dt UNZIP 1 -.Os -.Sh NAME -.Nm unzip -.Nd extract files from a ZIP archive -.Sh SYNOPSIS -.Nm -.Op Fl aCcfjLlnopqtuvy -.Op { Fl O | Fl I No } Ar encoding -.Op Fl d Ar dir -.Op Fl x Ar pattern -.Op Fl P Ar password -.Ar zipfile -.Op Ar member ... -.Sh DESCRIPTION -.\" ... -The following options are available: -.Bl -tag -width Fl -.It Fl a -When extracting a text file, convert DOS-style line endings to -Unix-style line endings. -.It Fl C -Match file names case-insensitively. -.It Fl c -Extract to stdout/screen. -When extracting files from the zipfile, they are written to stdout. -This is similar to -.Fl p , -but does not suppress normal output. -.It Fl d Ar dir -Extract files into the specified directory rather than the current -directory. -.It Fl f -Update existing. -Extract only files from the zipfile if a file with the same name -already exists on disk and is older than the former. -Otherwise, the file is silently skipped. -.It Fl I Ar encoding -.It Fl O Ar encoding -Convert filenames from the specified encoding. -.It Fl j -Ignore directories stored in the zipfile; instead, extract all files -directly into the extraction directory. -.It Fl L -Convert the names of the extracted files and directories to lowercase. -.It Fl l -List, rather than extract, the contents of the zipfile. -.It Fl n -No overwrite. -When extracting a file from the zipfile, if a file with the same name -already exists on disk, the file is silently skipped. -.It Fl o -Overwrite. -When extracting a file from the zipfile, if a file with the same name -already exists on disk, the existing file is replaced with the file -from the zipfile. -.It Fl p -Extract to stdout. -When extracting files from the zipfile, they are written to stdout. -The normal output is suppressed as if -.Fl q -was specified. -.It Fl P Ar password -Extract encrypted files using a password. -Putting a password on the command line using this option can be -insecure. -.It Fl q -Quiet: print less information while extracting. -.It Fl t -Test: do not extract anything, but verify the checksum of every file -in the archive. -.It Fl u -Update. -When extracting a file from the zipfile, if a file with the same name -already exists on disk, the existing file is replaced with the file -from the zipfile if and only if the latter is newer than the former. -Otherwise, the file is silently skipped. -.It Fl v -List verbosely, rather than extract, the contents of the zipfile. -This differs from -.Fl l -by using the long listing. -Note that most of the data is currently fake and does not reflect the -content of the archive. -.It Fl x Ar pattern -Exclude files matching the pattern -.Ar pattern . -.It Fl y -Print four digit years in listings instead of two. -.It Fl Z Ar mode -Emulate -.Xr zipinfo 1L -mode. -Enabling -.Xr zipinfo 1L -mode changes the way in which additional arguments are parsed. -Currently only -.Xr zipinfo 1L -mode 1 is supported, which lists the file names one per line. -.It Ar [member ...] -Optional list of members to extract from the zipfile. -Can include patterns, e.g., -.Ar 'memberdir/*' -will extract all files and dirs below memberdir. -.El -.Pp -Note that only one of -.Fl n , -.Fl o , -and -.Fl u -may be specified. -If specified filename is -.Qq - , -then data is read from -.Va stdin . -.Sh ENVIRONMENT -If the -.Ev UNZIP_DEBUG -environment variable is defined, the -.Fl q -command-line option has no effect, and additional debugging -information will be printed to -.Va stderr . -.Sh COMPATIBILITY -The -.Nm -utility aims to be sufficiently compatible with other implementations -to serve as a drop-in replacement in the context of the -.Xr ports 7 -system. -No attempt has been made to replicate functionality which is not -required for that purpose. -.Pp -For compatibility reasons, command-line options will be recognized if -they are listed not only before but also after the name of the -zipfile. -.Pp -Normally, the -.Fl a -option should only affect files which are marked as text files in the -zipfile's central directory. -Since the -.Xr archive 3 -library does not provide access to that information, it is not available -to the -.Nm -utility. -Instead, the -.Nm -utility will assume that a file is a text file if no non-ASCII -characters are present within the first block of data decompressed for -that file. -If non-ASCII characters appear in subsequent blocks of data, a warning -will be issued. -.Pp -The -.Nm -utility is only able to process ZIP archives handled by -.Xr libarchive 3 . -Depending on the installed version of -.Xr libarchive 3 , -this may or may not include self-extracting or ZIPX archives. -.Sh SEE ALSO -.Xr libarchive 3 -.Sh HISTORY -The -.Nm -utility appeared in -.Fx 8.0 . -.Sh AUTHORS -The -.Nm -utility and this manual page were written by -.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . -It uses the -.Xr archive 3 -library developed by -.An Tim Kientzle Aq Mt kientzle@FreeBSD.org . diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c deleted file mode 100644 index 1200aa53e7e3..000000000000 --- a/usr.bin/unzip/unzip.c +++ /dev/null @@ -1,1141 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2009, 2010 Joerg Sonnenberger - * Copyright (c) 2007-2008 Dag-Erling Smørgrav - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer - * in this position and unchanged. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - * - * This file would be much shorter if we didn't care about command-line - * compatibility with Info-ZIP's UnZip, which requires us to duplicate - * parts of libarchive in order to gain more detailed control of its - * behaviour for the purpose of implementing the -n, -o, -L and -a - * options. - */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -/* command-line options */ -static int a_opt; /* convert EOL */ -static int C_opt; /* match case-insensitively */ -static int c_opt; /* extract to stdout */ -static const char *d_arg; /* directory */ -static int f_opt; /* update existing files only */ -static char *O_arg; /* encoding */ -static int j_opt; /* junk directories */ -static int L_opt; /* lowercase names */ -static int n_opt; /* never overwrite */ -static int o_opt; /* always overwrite */ -static int p_opt; /* extract to stdout, quiet */ -static char *P_arg; /* passphrase */ -static int q_opt; /* quiet */ -static int t_opt; /* test */ -static int u_opt; /* update */ -static int v_opt; /* verbose/list */ -static const char *y_str = ""; /* 4 digit year */ -static int Z1_opt; /* zipinfo mode list files only */ - -/* debug flag */ -static int unzip_debug; - -/* zipinfo mode */ -static int zipinfo_mode; - -/* running on tty? */ -static int tty; - -/* convenience macro */ -/* XXX should differentiate between ARCHIVE_{WARN,FAIL,RETRY} */ -#define ac(call) \ - do { \ - int acret = (call); \ - if (acret != ARCHIVE_OK) \ - errorx("%s", archive_error_string(a)); \ - } while (0) - -/* - * Indicates that last info() did not end with EOL. This helps error() et - * al. avoid printing an error message on the same line as an incomplete - * informational message. - */ -static int noeol; - -/* for an interactive passphrase input */ -static char *passphrase_buf; - -/* fatal error message + errno */ -static void -error(const char *fmt, ...) -{ - va_list ap; - - if (noeol) - fprintf(stdout, "\n"); - fflush(stdout); - fprintf(stderr, "unzip: "); - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - fprintf(stderr, ": %s\n", strerror(errno)); - exit(EXIT_FAILURE); -} - -/* fatal error message, no errno */ -static void -errorx(const char *fmt, ...) -{ - va_list ap; - - if (noeol) - fprintf(stdout, "\n"); - fflush(stdout); - fprintf(stderr, "unzip: "); - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - fprintf(stderr, "\n"); - exit(EXIT_FAILURE); -} - -/* non-fatal error message + errno */ -static void -warning(const char *fmt, ...) -{ - va_list ap; - - if (noeol) - fprintf(stdout, "\n"); - fflush(stdout); - fprintf(stderr, "unzip: "); - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - fprintf(stderr, ": %s\n", strerror(errno)); -} - -/* non-fatal error message, no errno */ -static void -warningx(const char *fmt, ...) -{ - va_list ap; - - if (noeol) - fprintf(stdout, "\n"); - fflush(stdout); - fprintf(stderr, "unzip: "); - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - fprintf(stderr, "\n"); -} - -/* informational message (if not -q) */ -static void -info(const char *fmt, ...) -{ - va_list ap; - - if (q_opt && !unzip_debug) - return; - va_start(ap, fmt); - vfprintf(stdout, fmt, ap); - va_end(ap); - fflush(stdout); - - if (*fmt == '\0') - noeol = 1; - else - noeol = fmt[strlen(fmt) - 1] != '\n'; -} - -/* debug message (if unzip_debug) */ -static void -debug(const char *fmt, ...) -{ - va_list ap; - - if (!unzip_debug) - return; - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - fflush(stderr); - - if (*fmt == '\0') - noeol = 1; - else - noeol = fmt[strlen(fmt) - 1] != '\n'; -} - -/* duplicate a path name, possibly converting to lower case */ -static char * -pathdup(const char *path) -{ - char *str; - size_t i, len; - - if (path == NULL || path[0] == '\0') - return (NULL); - - len = strlen(path); - while (len && path[len - 1] == '/') - len--; - if ((str = malloc(len + 1)) == NULL) { - errno = ENOMEM; - error("malloc()"); - } - if (L_opt) { - for (i = 0; i < len; ++i) - str[i] = tolower((unsigned char)path[i]); - } else { - memcpy(str, path, len); - } - str[len] = '\0'; - - return (str); -} - -/* concatenate two path names */ -static char * -pathcat(const char *prefix, const char *path) -{ - char *str; - size_t prelen, len; - - prelen = prefix ? strlen(prefix) + 1 : 0; - len = strlen(path) + 1; - if ((str = malloc(prelen + len)) == NULL) { - errno = ENOMEM; - error("malloc()"); - } - if (prefix) { - memcpy(str, prefix, prelen); /* includes zero */ - str[prelen - 1] = '/'; /* splat zero */ - } - memcpy(str + prelen, path, len); /* includes zero */ - - return (str); -} - -/* - * Pattern lists for include / exclude processing - */ -struct pattern { - STAILQ_ENTRY(pattern) link; - char pattern[]; -}; - -STAILQ_HEAD(pattern_list, pattern); -static struct pattern_list include = STAILQ_HEAD_INITIALIZER(include); -static struct pattern_list exclude = STAILQ_HEAD_INITIALIZER(exclude); - -/* - * Add an entry to a pattern list - */ -static void -add_pattern(struct pattern_list *list, const char *pattern) -{ - struct pattern *entry; - size_t len; - - debug("adding pattern '%s'\n", pattern); - len = strlen(pattern); - if ((entry = malloc(sizeof *entry + len + 1)) == NULL) { - errno = ENOMEM; - error("malloc()"); - } - memcpy(entry->pattern, pattern, len + 1); - STAILQ_INSERT_TAIL(list, entry, link); -} - -/* - * Match a string against a list of patterns - */ -static int -match_pattern(struct pattern_list *list, const char *str) -{ - struct pattern *entry; - - STAILQ_FOREACH(entry, list, link) { - if (fnmatch(entry->pattern, str, C_opt ? FNM_CASEFOLD : 0) == 0) - return (1); - } - return (0); -} - -/* - * Verify that a given pathname is in the include list and not in the - * exclude list. - */ -static int -accept_pathname(const char *pathname) -{ - - if (!STAILQ_EMPTY(&include) && !match_pattern(&include, pathname)) - return (0); - if (!STAILQ_EMPTY(&exclude) && match_pattern(&exclude, pathname)) - return (0); - return (1); -} - -/* - * Create the specified directory with the specified mode, taking certain - * precautions on they way. - */ -static void -make_dir(const char *path, int mode) -{ - struct stat sb; - - if (lstat(path, &sb) == 0) { - if (S_ISDIR(sb.st_mode)) - return; - /* - * Normally, we should either ask the user about removing - * the non-directory of the same name as a directory we - * wish to create, or respect the -n or -o command-line - * options. However, this may lead to a later failure or - * even compromise (if this non-directory happens to be a - * symlink to somewhere unsafe), so we don't. - */ - - /* - * Don't check unlink() result; failure will cause mkdir() - * to fail later, which we will catch. - */ - (void)unlink(path); - } - if (mkdir(path, mode) != 0 && errno != EEXIST) - error("mkdir('%s')", path); -} - -/* - * Ensure that all directories leading up to (but not including) the - * specified path exist. - * - * XXX inefficient + modifies the file in-place - */ -static void -make_parent(char *path) -{ - struct stat sb; - char *sep; - - sep = strrchr(path, '/'); - if (sep == NULL || sep == path) - return; - *sep = '\0'; - if (lstat(path, &sb) == 0) { - if (S_ISDIR(sb.st_mode)) { - *sep = '/'; - return; - } - unlink(path); - } - make_parent(path); - mkdir(path, 0755); - *sep = '/'; - -#if 0 - for (sep = path; (sep = strchr(sep, '/')) != NULL; sep++) { - /* root in case of absolute d_arg */ - if (sep == path) - continue; - *sep = '\0'; - make_dir(path, 0755); - *sep = '/'; - } -#endif -} - -/* - * Extract a directory. - */ -static void -extract_dir(struct archive *a, struct archive_entry *e, const char *path) -{ - int mode; - - /* - * Dropbox likes to create '/' directory entries, just ignore - * such junk. - */ - if (*path == '\0') - return; - - mode = archive_entry_mode(e) & 0777; - if (mode == 0) - mode = 0755; - - /* - * Some zipfiles contain directories with weird permissions such - * as 0644 or 0444. This can cause strange issues such as being - * unable to extract files into the directory we just created, or - * the user being unable to remove the directory later without - * first manually changing its permissions. Therefore, we whack - * the permissions into shape, assuming that the user wants full - * access and that anyone who gets read access also gets execute - * access. - */ - mode |= 0700; - if (mode & 0040) - mode |= 0010; - if (mode & 0004) - mode |= 0001; - - info(" creating: %s/\n", path); - make_dir(path, mode); - ac(archive_read_data_skip(a)); -} - -static unsigned char buffer[8192]; -static char spinner[] = { '|', '/', '-', '\\' }; - -static int -handle_existing_file(char **path) -{ - size_t alen; - ssize_t len; - char buf[4]; - - for (;;) { - fprintf(stderr, - "replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", - *path); - if (fgets(buf, sizeof(buf), stdin) == NULL) { - clearerr(stdin); - printf("NULL\n(EOF or read error, " - "treating as \"[N]one\"...)\n"); - n_opt = 1; - return -1; - } - switch (*buf) { - case 'A': - o_opt = 1; - /* FALLTHROUGH */ - case 'y': - case 'Y': - (void)unlink(*path); - return 1; - case 'N': - n_opt = 1; - /* FALLTHROUGH */ - case 'n': - return -1; - case 'r': - case 'R': - printf("New name: "); - fflush(stdout); - free(*path); - *path = NULL; - alen = 0; - len = getline(path, &alen, stdin); - if ((*path)[len - 1] == '\n') - (*path)[len - 1] = '\0'; - return 0; - default: - break; - } - } -} - -/* - * Detect binary files by a combination of character white list and - * black list. NUL bytes and other control codes without use in text files - * result directly in switching the file to binary mode. Otherwise, at least - * one white-listed byte has to be found. - * - * Black-listed: 0..6, 14..25, 28..31 *** 655 LINES SKIPPED *** From nobody Fri Aug 4 11:53:03 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHPH35X5xz4kKZ5; Fri, 4 Aug 2023 11:53:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHPH34kR2z4Vls; Fri, 4 Aug 2023 11:53:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691149983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sSM4nlVwcVszjAzob7EmUUsEJxJl6qbs7YverM1Taxs=; b=bkla+zTap2hal/AC4vb4kWe0+PonxRPyxTltAUE0Gfr0mBoQ81vHeoWPjZe++XwkSDTtRh jB4f7fFdmC35Xv0ESiYswgotop+Os6DZmMvfZMMCntgSpik6yIQVKNNf+s0Eak77ToHunB zGktRjQd7cm7gtJhIeaJlI7cZqG//4ueiZskqTbbNG9KX0JXH03l+D2Y0huRtl3wc1I/Wg PJW0gwh7H3UOequ6SXz4VqD23U6otFx5a9FaLDxxCnlEvZfMK9n6B/AJVp1QrTHVNWzFEW xEomTvyFeW57PC734rV9JgZAeVP1x0DebrMVAh+LTgvw//HzcdN8B8E0b5AePw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691149983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sSM4nlVwcVszjAzob7EmUUsEJxJl6qbs7YverM1Taxs=; b=brotaJVFgi+6rU6TUWB/9Bg2Bie3iK8UlWVJTWASDQeu9ERjWd0KBMxQ3wfHd7WqnuMxsf 3l3RnzE9IZtRpTJfx2tmxtijpxA4aBmLDvOMZnTFgqGWtyWcu+ptrMCwRRZVOSvduz1dMC UMwUw2zlHaQtYoRFpT1uZmGHpfQSwCGCygU9zDEazMfzzK1wgGsZGZK0Go7UA+nrzY/6dP dFBzr0rXM1oD1yGeqUeZHOkw1eWiznM+SML+IpFO0O3KmSHGbaf3TSI2febKUBXBcEr2aB nYtrkIw/OYjSEhhWv7TmJIxAiYM8ZBIBAiCrxGdifVJnltjgajUGQvEhTXquTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691149983; a=rsa-sha256; cv=none; b=gB/amthgXEbj9pUgsg/9+1StCBF4UXni5YdDtUIhCeZZYcAXrMB4soq+Enz3tKfa2Ms3MS wQ+2cfZh5y1SekN0OOLAIWcwfT+ORooqXcOiN5gQT2TAUe4elE4/S0C6+mPSHa3JSuwPUF 9XzIls5RVisXoSiOdEl7lm0NNggMntwtpArnaB8m3ojas/b36Pzf6j4vZfeIAmeX8/BwZI Utb44pyf9r0aiwkgCGIcecensFwuWoN/RdDtzSJj5kuhQpqFoTf4NHtOvabzurzfAV4fEx zSM/dlsWOhQZGSDsQVgH0rBNaG7Fb69sWhySCngJX1nMRjtd9+Ksz/WSCJLXjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHPH33gr2z11Kh; Fri, 4 Aug 2023 11:53:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374Br334069649; Fri, 4 Aug 2023 11:53:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374Br3bg069648; Fri, 4 Aug 2023 11:53:03 GMT (envelope-from git) Date: Fri, 4 Aug 2023 11:53:03 GMT Message-Id: <202308041153.374Br3bg069648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 85dab3fe7a85 - main - i2c.8: Fix a typo in the manual page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85dab3fe7a8521d593eba3845c9d10cb0f1f1f56 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=85dab3fe7a8521d593eba3845c9d10cb0f1f1f56 commit 85dab3fe7a8521d593eba3845c9d10cb0f1f1f56 Author: Gordon Bergling AuthorDate: 2023-08-04 11:50:48 +0000 Commit: Gordon Bergling CommitDate: 2023-08-04 11:50:48 +0000 i2c.8: Fix a typo in the manual page - s/endianess/endianness/ MFC after: 5 days --- usr.sbin/i2c/i2c.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/i2c/i2c.8 b/usr.sbin/i2c/i2c.8 index 7c995f5743a4..3b5ac900a4d9 100644 --- a/usr.sbin/i2c/i2c.8 +++ b/usr.sbin/i2c/i2c.8 @@ -130,7 +130,7 @@ specified with .Fl o to the slave. Zero means that the offset is ignored and not passed to the slave at all. -The endianess defaults to little-endian. +The endianness defaults to little-endian. .El .Sh INTERPRETED MODE When started with From nobody Fri Aug 4 11:53:04 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHPH50mVTz4kKjL; Fri, 4 Aug 2023 11:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHPH45FdGz4VX3; Fri, 4 Aug 2023 11:53:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691149984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lr/sppzVMaAtnBjggw/EixhumGPgVs5R6PHlZYgaLRU=; b=FQJhMk9zHfQ+ba4EzERI15rErp1qjZxgtoriwgHAa4QwdHKq0OZ/yvbujIMhqoDbRwWP2j ELGB8KdSUxmkIO5wcYfREsrYMmSm0Dm9ObaXQUC8ixRIsE3RN8MEOcSgxh1seW3udZG8+G l+rjpm5h/+GmWIyRde5bJ6iIs7GbhCLFKLGs00z4KAe4tcmusWCj/mEOjBGSpHhUsGxXVg C+ML+KdpfEIdjdGDBaXDD2Pmre0sPPWjG7mas9v1nwWYnX/dl3zvcaGVcstc8Fei8DKwv1 tkL7G2v/JOLPGoe998SUC+fn6AjLvULm7Wk+ZZIXuvxp1kSpbT3V4GaEpc1bPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691149984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lr/sppzVMaAtnBjggw/EixhumGPgVs5R6PHlZYgaLRU=; b=ctbDr5SXB/JL8QD7lg5z7OKusYIvaumMg1MMGYy94BeNqn98mRPZ73J/VUeIcil4NhoGsa eV9f6SIOKTRWje4sMnWq0JW6RXUdxt4XHQLWey+jhhz4Re35DgsIY1ElIR5E4YMA/krUol N/GigtV1+hzC/yVOS/G3smU1dlHf0gzoWuQdGkvjUXCxIvbxUBoqMixugWVtTkBsLtt79q s+1LfnqVnLSY+rY0oJPy/eIzti62XPq5JlJZc77hrMa/RHGG9040dLjIU9HHs/18xA3k+Q SLzOLSSChytF3Z7zNx2ECoxOoDVd/NxkC+1CCWpt0dEOVj2UjXLdihEdk0+ojA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691149984; a=rsa-sha256; cv=none; b=CpHCBtLryj3q1Rf6aeiy4lqDhIls5VkobW+FNb81zHq8p/Wuw0iMkKZvoiKYHfX62Jz2mv Hras+8qAvMm+TMaqj604Wzf41tP2JFRSo9aXtIiKz/i69jjiEKEUEwxjUEIWPmM+yHJEUT J/jTrA7I30QXZbga6gfJV6q6SuAyK9X+HckHvUHPLU428OZkM6nw7AtIXlcY4nC1tii+KM p6fLg1vOsLqWfDwTSVpducV3i+LQuY/RAb83LEKYq6Cvkez2Jg8wRKEIwjkl/zUHMTHPqY JYu3jnzCbHOIQcX+dowUCogp1y4zKLhUv7nVg2J9JPh84J/CkAlp+4Pb9PPJ0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHPH446bYz11Kj; Fri, 4 Aug 2023 11:53:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374Br4wZ069675; Fri, 4 Aug 2023 11:53:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374Br4NC069674; Fri, 4 Aug 2023 11:53:04 GMT (envelope-from git) Date: Fri, 4 Aug 2023 11:53:04 GMT Message-Id: <202308041153.374Br4NC069674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: f0ab805200fc - main - arm64-iommu: Fix a typo in a kernel message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0ab805200fc304e4255fc68f9fb8d5400de84ce Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=f0ab805200fc304e4255fc68f9fb8d5400de84ce commit f0ab805200fc304e4255fc68f9fb8d5400de84ce Author: Gordon Bergling AuthorDate: 2023-08-04 11:52:36 +0000 Commit: Gordon Bergling CommitDate: 2023-08-04 11:52:36 +0000 arm64-iommu: Fix a typo in a kernel message - s/endianess/endianness/ MFC after: 5 days --- sys/arm64/iommu/smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/iommu/smmu.c b/sys/arm64/iommu/smmu.c index 3316321bc41b..834ab9ce0504 100644 --- a/sys/arm64/iommu/smmu.c +++ b/sys/arm64/iommu/smmu.c @@ -1359,7 +1359,7 @@ smmu_check_features(struct smmu_softc *sc) switch (reg & IDR0_TTENDIAN_M) { case IDR0_TTENDIAN_MIXED: if (bootverbose) - device_printf(sc->dev, "Mixed endianess supported.\n"); + device_printf(sc->dev, "Mixed endianness supported.\n"); sc->features |= SMMU_FEATURE_TT_LE; sc->features |= SMMU_FEATURE_TT_BE; break; From nobody Fri Aug 4 13:03:50 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHQrn3psfz4kQrT; Fri, 4 Aug 2023 13:03:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHQrn3KYxz4bp4; Fri, 4 Aug 2023 13:03:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691154233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ldphx5e8uJ/6Tz6B4ioXFO/bISRF1SG4Fy6JjbNdhkY=; b=snqbhsezH3RzaP/+jF483XhrysnQM7nkuIm+uOeR9D0DUd8iUrZUCjvrQOFdh6b/nO/7F7 8bqWBoGNtvDvNNn5jyo9TNO0SEUNFsag5LYuCaTvftT+NbIk8vOpMnPjzxfBk6CUnESwqm mN/48YzW60LnOKP3fV0mNXZz0RrcxXHhwhTcqKvlj1L5H6mzF5P3oWn0BfOhzRoN2qJ0ei Gt6/jGxb/tuqTQrIMwv43cybebjzB3MdbU+a/DDRoh2xEXspnSUnTlrtavp5PVplRDoi8j MqBDM2IouaCFIzlHT6kIO2ilr8tHe965fO385R0lPDXhaJoib0u/96PnJb9kjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691154233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ldphx5e8uJ/6Tz6B4ioXFO/bISRF1SG4Fy6JjbNdhkY=; b=pOIEZ92X96UmS2FxMNc6hZDoqfRXeoHFnBtJu/cO+PgwEgx4/+/0sHwcr07WdNioQi6h+y LdE8hT6udVgfK9JDDYebNAGwn6281RrDvLDSCE6+nlHKj9igg+Ea9OtyikHUA9RX6Ybd0z fBjcHg9IMJ98OLFq2rOfWQ14tzVScRROkr0TW1Qy+6bytluyUe3ugNUSbBF+RYBdAl3lH2 ZL0QMKUWDeKEZg/wmA8uSKOqnKhcLg6vcJMrj9ylYeZMJbz76urJgP+FGK65WMfrT9dWde w4/enFkUlth53ffrlSnrUW5FjpQEwRMp80ffG6wJtsqtNPNsnkuoj1uYXUfCOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691154233; a=rsa-sha256; cv=none; b=nj3LdwsZnUqHetuN2FZbwtDokfT70+jvwxVim1DZSOIWMBlcwqNjtnd3gjqbDKyLU1rmAS tmstI2onv6v9fmf6CvURfYqbFGefwHojJG3LF/s/FywXZvwM3QEchPH41JSOm7Um9T8KKu H5ypIw4VEZQbFYD6xsO8QY3j5WhDde/bm0CG+HB5RLQostd6c6waFhefbU+axQX1+KdMW4 HQ7g69wtxZH3w60MMLYD67kiqfc8/gaWUEmSUFLa+MLrUFxumN+LjS3lnvetK7VaWJzEVh o8IDmz9UBiM514xg6lBO+k4evB7ZfMPSBhOtd2NkC2IVckuXuKVLibDpf5t9fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RHQrn0qDkz11Kp; Fri, 4 Aug 2023 13:03:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 6D4AC50BDB; Fri, 4 Aug 2023 15:03:51 +0200 (CEST) From: Kristof Provost To: Michael Tuexen Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b279e84a47dd - main - sctp: improve consistency Date: Fri, 04 Aug 2023 15:03:50 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: <202307282203.36SM3C98056354@gitrepo.freebsd.org> References: <202307282203.36SM3C98056354@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_77BDF089-8206-4FA3-8412-9857890C3CAE_=" --=_MailMate_77BDF089-8206-4FA3-8412-9857890C3CAE_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 29 Jul 2023, at 0:03, Michael Tuexen wrote: > The branch main has been updated by tuexen: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3Db279e84a47ddb59e55b5a3cec31c5= 1cd41bf0dc3 > > commit b279e84a47ddb59e55b5a3cec31c51cd41bf0dc3 > Author: Michael Tuexen > AuthorDate: 2023-07-28 12:36:11 +0000 > Commit: Michael Tuexen > CommitDate: 2023-07-28 12:36:11 +0000 > > sctp: improve consistency > > This is simplifying a patch to address PR 260116. > > PR: 260116 > MFC after: 1 week It looks like this commit (or maybe the next one, = c620788150d274c09a070ab486602c98407d73b0) causes a panic in the SCTP = code during the `sys/netpfil/pf/sctp:basic_v4` test: panic: Counter goes negative cpuid =3D 7 time =3D 1691145655 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xfffffe026ea9a3a0 vpanic() at vpanic+0x132/frame 0xfffffe026ea9a4d0 panic() at panic+0x43/frame 0xfffffe026ea9a530 sctp_abort_notification() at sctp_abort_notification/frame = 0xfffffe026ea9a540 sctp_express_handle_sack() at sctp_express_handle_sack+0x647/frame = 0xfffffe026ea9a640 sctp_process_control() at sctp_process_control+0xf62/frame = 0xfffffe026ea9a990 sctp_common_input_processing() at = sctp_common_input_processing+0x561/frame 0xfffffe026ea9ab10 sctp_input_with_port() at sctp_input_with_port+0x1fa/frame = 0xfffffe026ea9abe0 sctp_input() at sctp_input+0x10/frame 0xfffffe026ea9abf0 ip_input() at ip_input+0x2ab/frame 0xfffffe026ea9ac50 netisr_dispatch_src() at netisr_dispatch_src+0xad/frame = 0xfffffe026ea9acb0 ether_demux() at ether_demux+0x17a/frame 0xfffffe026ea9ace0 ether_nh_input() at ether_nh_input+0x39f/frame 0xfffffe026ea9ad30 netisr_dispatch_src() at netisr_dispatch_src+0xad/frame = 0xfffffe026ea9ad90 ether_input() at ether_input+0xd9/frame 0xfffffe026ea9adf0 epair_tx_start_deferred() at epair_tx_start_deferred+0xd7/frame = 0xfffffe026ea9ae40 taskqueue_run_locked() at taskqueue_run_locked+0xab/frame = 0xfffffe026ea9aec0 taskqueue_thread_loop() at taskqueue_thread_loop+0xd3/frame = 0xfffffe026ea9aef0 fork_exit() at fork_exit+0x82/frame 0xfffffe026ea9af30 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe026ea9af30 --- trap 0, rip =3D 0x35c39ec8bda0, rsp =3D 0, rbp =3D 0x35c39ec8ec90 --= - KDB: enter: panic That seems to be panicking during SCTP packet handling, so I do not = believe this to be a pf bug. Reverting both commits avoids the problem. It=E2=80=99s also failing during the CI tests: = https://ci.freebsd.org/view/Test/job/FreeBSD-main-amd64-test/23957/consol= e (To reproduce, kldload pf sctp ; cd /usr/tests/sys/netpfil/pf ; sudo = kyua test sctp:basic_v4). Best regards, Kristof --=_MailMate_77BDF089-8206-4FA3-8412-9857890C3CAE_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 29 Jul 2023, at 0:03, Michael Tuexen wrote:

The branch main has been updated by= tuexen:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3Db279e84a47ddb59e55b5a3cec31c51cd41bf0dc3

commit b279e84a47ddb59e55b5a3cec31c51cd41bf0dc3
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-07-28 12:36:11 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-07-28 12:36:11 +0000

sctp: improve consistency

This is simplifying a patch to address PR 260116.

=

PR: 260116
MFC after: 1 week

It looks like this commit (or maybe the next one, c620788= 150d274c09a070ab486602c98407d73b0) causes a panic in the SCTP code during= the sys/ne= tpfil/pf/sctp:basic_v4 test:

pa=
nic: Counter goes negative
cpuid =3D 7
time =3D 1691145655
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe026ea=
9a3a0
vpanic() at vpanic+0x132/frame 0xfffffe026ea9a4d0
panic() at panic+0x43/frame 0xfffffe026ea9a530
sctp_abort_notification() at sctp_abort_notification/frame 0xfffffe026ea9=
a540
sctp_express_handle_sack() at sctp_express_handle_sack+0x647/frame 0xffff=
fe026ea9a640
sctp_process_control() at sctp_process_control+0xf62/frame 0xfffffe026ea9=
a990
sctp_common_input_processing() at sctp_common_input_processing+0x561/fram=
e 0xfffffe026ea9ab10
sctp_input_with_port() at sctp_input_with_port+0x1fa/frame 0xfffffe026ea9=
abe0
sctp_input() at sctp_input+0x10/frame 0xfffffe026ea9abf0
ip_input() at ip_input+0x2ab/frame 0xfffffe026ea9ac50
netisr_dispatch_src() at netisr_dispatch_src+0xad/frame 0xfffffe026ea9acb=
0
ether_demux() at ether_demux+0x17a/frame 0xfffffe026ea9ace0
ether_nh_input() at ether_nh_input+0x39f/frame 0xfffffe026ea9ad30
netisr_dispatch_src() at netisr_dispatch_src+0xad/frame 0xfffffe026ea9ad9=
0
ether_input() at ether_input+0xd9/frame 0xfffffe026ea9adf0
epair_tx_start_deferred() at epair_tx_start_deferred+0xd7/frame 0xfffffe0=
26ea9ae40
taskqueue_run_locked() at taskqueue_run_locked+0xab/frame 0xfffffe026ea9a=
ec0
taskqueue_thread_loop() at taskqueue_thread_loop+0xd3/frame 0xfffffe026ea=
9aef0
fork_exit() at fork_exit+0x82/frame 0xfffffe026ea9af30
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe026ea9af30
--- trap 0, rip =3D 0x35c39ec8bda0, rsp =3D 0, rbp =3D 0x35c39ec8ec90 ---=

KDB: enter: panic

That seems to be panicking during SCTP packet handling, s= o I do not believe this to be a pf bug.

Reverting both commits avoids the problem.

It=E2=80=99s also failing during the CI tests: https://ci.freebsd.org/view/Test/job/FreeBSD-main-amd64-test/23957/co= nsole

(To reproduce, kldload pf sctp ; cd /usr/tests/sys/netpfi= l/pf ; sudo kyua test sctp:basic_v4).

Best regards,
Kristof

--=_MailMate_77BDF089-8206-4FA3-8412-9857890C3CAE_=-- From nobody Fri Aug 4 13:04:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHQt03fT0z4kRCr; Fri, 4 Aug 2023 13:04:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHQt031crz4bsx; Fri, 4 Aug 2023 13:04:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691154296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI4wK0Xpw5NQnOMkwIThWrQbc/yGTAuO+n8DtVxJL/c=; b=RwZcrlHOJrs5vF0pVgZFkHc0j8ml1eBopguVjwRx2ylZNVAHSobUfmhWTYqSMa7pNGAggG rmV7WU2cLHY/YR4u1RXSNcgd3nd/G6Ba6YvZaK506s/PM6AntWYWy9OsGhlNLX0RtdeABz kJVbIUSV9cxqKEfAZZgBfmrP0MPvGVPM4qeshuXnJ5PiOC95aPS1vQWAR61BaK7l34PTUt mUzKjo43jpcvgoS4LbvcuZRb/fgIgqEKCV9dtK9MCpRCKV/4McnDYqK/Pax+hfd+5SoLun /9Rz5V2xA3DqSHYWYl64siR1TA74zOfoHyHZZyx6AnDqbFvEIQ0NUy+37eO0Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691154296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI4wK0Xpw5NQnOMkwIThWrQbc/yGTAuO+n8DtVxJL/c=; b=XwdXLlry5vH5PjQg/0YqKCP2MdZn1PWR23iec+E8o3JsdS+Ez+r6i8VQ/xj/3dgRgmyBea CJ2nCLrjSwPWyobiSdET8kWPsz8z5MMpvCJGbQqEtSkvA0C6TcJZ5mjChnNpfdpPIjKGYc 22HVs4gJfBFajDmGKA6rW6Jin6JgnjO3haSIx61kZqHyXLKmUPUhWpT5GObfPfZPibW5Es 9NsBNdir+HTSCGlCt8U18QpNkGm2rQogt5zTWhPoYDaYAX9f4YXfOoQiFqUOli8XpuYtqB vjqyyRnS2qm3ioWVeX2o0o6eGYugM6D+IC9qj7hdgFMj7p1F4j5RdxyhYUOJvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691154296; a=rsa-sha256; cv=none; b=TiPa/jpzzZXPdDc1xaJj4HyO9/eI0ssk4ENhsJgJeylGH7mJbqadsBhk5A/j5r3opG1nTG I6l1Z3eYtHcuZIlPqCvCidoxMU0lWJtIW4cjqdRjL8pVDpkXtvJ+RAiBJ4rBUu5TW3vmSh 9rC2G9CiEkTMtmhDOu3jv9cjyHG8/Uxe1PreniPNGXNa1emT+i1qsKHGjdHrqVkIAzAw3c oMWPHiC3QSTMr/3WQ2xPUHSX9JdHgW/NMehLihd6OHfJnvxocaMRZ6TiVQ+xJhInqG8Lt5 HhL7KIWKbDnXZIKqfmXdEE1aeOYBlIQEJefsbLHeRzWEG4bDq4R00r56Bjs6kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHQt026QXz13Np; Fri, 4 Aug 2023 13:04:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374D4uvv086774; Fri, 4 Aug 2023 13:04:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374D4ud4086773; Fri, 4 Aug 2023 13:04:56 GMT (envelope-from git) Date: Fri, 4 Aug 2023 13:04:56 GMT Message-Id: <202308041304.374D4ud4086773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 1c83154e4936 - main - linux(4): Modify ioprio syscalls to match Linux List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c83154e493615389f51813447d1b7f89774c5e2 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=1c83154e493615389f51813447d1b7f89774c5e2 commit 1c83154e493615389f51813447d1b7f89774c5e2 Author: Dmitry Chagin AuthorDate: 2023-08-04 13:03:55 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-04 13:03:55 +0000 linux(4): Modify ioprio syscalls to match Linux MFC after: 1 month --- sys/amd64/linux/syscalls.master | 15 +++++++++++---- sys/amd64/linux32/syscalls.master | 15 +++++++++++---- sys/arm64/linux/syscalls.master | 15 +++++++++++---- sys/i386/linux/syscalls.master | 15 +++++++++++---- 4 files changed, 44 insertions(+), 16 deletions(-) diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 6d8e4102d6fc..929c42fc4056 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -1465,11 +1465,18 @@ 250 AUE_NULL STD { int linux_keyctl(void); } -251 AUE_NULL STD { - int linux_ioprio_set(void); +251 AUE_SETPRIORITY STD { + int linux_ioprio_set( + l_int which, + l_int who, + l_int ioprio + ); } -252 AUE_NULL STD { - int linux_ioprio_get(void); +252 AUE_GETPRIORITY STD { + int linux_ioprio_get( + l_int which, + l_int who + ); } 253 AUE_NULL STD { int linux_inotify_init(void); diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index e871f6fdbfc8..d1eb57a8295a 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -1577,11 +1577,18 @@ int linux_keyctl(void); } ; Linux 2.6.13: -289 AUE_NULL STD { - int linux_ioprio_set(void); +289 AUE_SETPRIORITY STD { + int linux_ioprio_set( + l_int which, + l_int who, + l_int ioprio + ); } -290 AUE_NULL STD { - int linux_ioprio_get(void); +290 AUE_GETPRIORITY STD { + int linux_ioprio_get( + l_int which, + l_int who + ); } 291 AUE_NULL STD { int linux_inotify_init(void); diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index 04748e30182c..da2ad24997ce 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -187,11 +187,18 @@ l_ulong arg ); } -30 AUE_NULL STD { - int linux_ioprio_set(void); +30 AUE_SETPRIORITY STD { + int linux_ioprio_set( + l_int which, + l_int who, + l_int ioprio + ); } -31 AUE_NULL STD { - int linux_ioprio_get(void); +31 AUE_GETPRIORITY STD { + int linux_ioprio_get( + l_int which, + l_int who + ); } 32 AUE_FLOCK NOPROTO { int flock( diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 614731ee2cfe..1fd02302ae37 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -1594,11 +1594,18 @@ int linux_keyctl(void); } ; Linux 2.6.13: -289 AUE_NULL STD { - int linux_ioprio_set(void); +289 AUE_SETPRIORITY STD { + int linux_ioprio_set( + l_int which, + l_int who, + l_int ioprio + ); } -290 AUE_NULL STD { - int linux_ioprio_get(void); +290 AUE_GETPRIORITY STD { + int linux_ioprio_get( + l_int which, + l_int who + ); } 291 AUE_NULL STD { int linux_inotify_init(void); From nobody Fri Aug 4 13:04:57 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHQt14kxPz4kRBH; Fri, 4 Aug 2023 13:04:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHQt13r1Fz4bwl; Fri, 4 Aug 2023 13:04:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691154297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BaG8hiv/e58fFJ760REByVGM3bo8YQu0Xo0Lu65i8Dk=; b=E5WOcQ34j6fx4MPxQSvAPdUsBtM5LiATyfXgdlcBnfTm5ZFOtFBBYGs5JXfn/LBQZT8l5r 2vkH/ffxeHsX9UcH1jAJy+sDR5t5Ut6tWzEB2cbtlWAgyeFBcTgBV2N4+OzX94KMNIl8XD 2zz54nTNbv5P/gKDE0da1So0QJGh+MlFMwDnjPwZDVbIdn8ENp4gp/N8DGtmHBMuUlPM/6 hLtM+9ECUO/PDPjU+0hxhnWbaQVkETh4qvI0pxUIixa8MW32JekF357ImJiBhQKUYDVlmR kuZyObdtU7kpUFj6t1+9TFtb1oZlZH3Z6LFUisIhS6eooBmY0KM9nKiRu1Oo7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691154297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BaG8hiv/e58fFJ760REByVGM3bo8YQu0Xo0Lu65i8Dk=; b=SZy6qLKl0dxz4I57aJEo8zqk/qwdA4en4UBvvpR3t4Uqbo6hzY6ntJV8IUUuW3kyCAX9uQ bObBmoLlQ5d/WTzjCnRqT+KENrjNMIoGQ2erODb1f0MWfa/AIooUluEsYa88AXqEGYJbOQ HgAn9B4fgjUzEYYSxt3t3x0KD0HgWtuPYfY1nR2VFA/L84VG79TC2hfvySe/tpmsjzjpCQ zqAfu1rra2fpdjn3knKBv1fVP17FGUjrgDOdGbdDlj9pR8VhqAjr91HM6tf1TetCSjIglW /xJZH6gK8/FNGTWJbsQJ+XmK8z0dmz+8jZNzJdzzGD+vV7TMKYIdYxPC2TNQ5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691154297; a=rsa-sha256; cv=none; b=Y4IghAF1C6c2TEz6iT5wv2IqpoR10RYFCemVRwEzDOhW/+ehQRpLqUKdqX9kBtxjeS5N6o z0dmr4qBmRQfTZmC0B0Amt4+VQssBp6+A32X+H0x7aYAObTaOfcZsu4d8AijdrNgt2uWWZ rdvchDTGqIthrlurQDSOsEVAGphN8E/S6UmRmoTUq/ApDy23PdT8JHIA6if1IKQ/IPM3eH uoOjfhG2SXOdHgp1kQTdob7nCL0ZPBrGFjXcXb1FUV/1b5/Zz/Jenxr8tzsZ0OHdiWqp/C hteINqTO6qa8kCIuFyV7Jt3C8giLWX6OH7kJtYnHRxJRK6uL3vJMjAidzeT7VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHQt12vZ1z13Qt; Fri, 4 Aug 2023 13:04:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374D4vXY086793; Fri, 4 Aug 2023 13:04:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374D4v1S086792; Fri, 4 Aug 2023 13:04:57 GMT (envelope-from git) Date: Fri, 4 Aug 2023 13:04:57 GMT Message-Id: <202308041304.374D4v1S086792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: b5c0b9555d15 - main - linux(4): Regen for ioprio syscalls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5c0b9555d1533506e6cb4fe88060134c3ec577f Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b5c0b9555d1533506e6cb4fe88060134c3ec577f commit b5c0b9555d1533506e6cb4fe88060134c3ec577f Author: Dmitry Chagin AuthorDate: 2023-08-04 13:03:57 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-04 13:03:57 +0000 linux(4): Regen for ioprio syscalls MFC after: 1 month --- sys/amd64/linux/linux_proto.h | 11 +++++---- sys/amd64/linux/linux_sysent.c | 4 ++-- sys/amd64/linux/linux_systrace_args.c | 40 +++++++++++++++++++++++++++++-- sys/amd64/linux32/linux32_proto.h | 11 +++++---- sys/amd64/linux32/linux32_sysent.c | 4 ++-- sys/amd64/linux32/linux32_systrace_args.c | 40 +++++++++++++++++++++++++++++-- sys/arm64/linux/linux_proto.h | 11 +++++---- sys/arm64/linux/linux_sysent.c | 4 ++-- sys/arm64/linux/linux_systrace_args.c | 40 +++++++++++++++++++++++++++++-- sys/i386/linux/linux_proto.h | 11 +++++---- sys/i386/linux/linux_sysent.c | 4 ++-- sys/i386/linux/linux_systrace_args.c | 40 +++++++++++++++++++++++++++++-- 12 files changed, 188 insertions(+), 32 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 3bf8ea0fc7b1..84d3b04de1a4 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -893,10 +893,13 @@ struct linux_keyctl_args { syscallarg_t dummy; }; struct linux_ioprio_set_args { - syscallarg_t dummy; + char which_l_[PADL_(l_int)]; l_int which; char which_r_[PADR_(l_int)]; + char who_l_[PADL_(l_int)]; l_int who; char who_r_[PADR_(l_int)]; + char ioprio_l_[PADL_(l_int)]; l_int ioprio; char ioprio_r_[PADR_(l_int)]; }; struct linux_ioprio_get_args { - syscallarg_t dummy; + char which_l_[PADL_(l_int)]; l_int which; char which_r_[PADR_(l_int)]; + char who_l_[PADL_(l_int)]; l_int who; char who_r_[PADR_(l_int)]; }; struct linux_inotify_init_args { syscallarg_t dummy; @@ -1884,8 +1887,8 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_add_key AUE_NULL #define LINUX_SYS_AUE_linux_request_key AUE_NULL #define LINUX_SYS_AUE_linux_keyctl AUE_NULL -#define LINUX_SYS_AUE_linux_ioprio_set AUE_NULL -#define LINUX_SYS_AUE_linux_ioprio_get AUE_NULL +#define LINUX_SYS_AUE_linux_ioprio_set AUE_SETPRIORITY +#define LINUX_SYS_AUE_linux_ioprio_get AUE_GETPRIORITY #define LINUX_SYS_AUE_linux_inotify_init AUE_NULL #define LINUX_SYS_AUE_linux_inotify_add_watch AUE_NULL #define LINUX_SYS_AUE_linux_inotify_rm_watch AUE_NULL diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index 813c3c648322..c2550aec6831 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/linux/linux_sysent.c @@ -267,8 +267,8 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_add_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 248 = linux_add_key */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_request_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 249 = linux_request_key */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_keyctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 250 = linux_keyctl */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = linux_ioprio_set */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 252 = linux_ioprio_get */ + { .sy_narg = AS(linux_ioprio_set_args), .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_SETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = linux_ioprio_set */ + { .sy_narg = AS(linux_ioprio_get_args), .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_GETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 252 = linux_ioprio_get */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_init, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 253 = linux_inotify_init */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_add_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 254 = linux_inotify_add_watch */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_rm_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 255 = linux_inotify_rm_watch */ diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 6ff1764b077c..45e4cce95095 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -1896,12 +1896,19 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_ioprio_set */ case 251: { - *n_args = 0; + struct linux_ioprio_set_args *p = params; + iarg[a++] = p->which; /* l_int */ + iarg[a++] = p->who; /* l_int */ + iarg[a++] = p->ioprio; /* l_int */ + *n_args = 3; break; } /* linux_ioprio_get */ case 252: { - *n_args = 0; + struct linux_ioprio_get_args *p = params; + iarg[a++] = p->which; /* l_int */ + iarg[a++] = p->who; /* l_int */ + *n_args = 2; break; } /* linux_inotify_init */ @@ -5767,9 +5774,32 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_ioprio_set */ case 251: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "l_int"; + break; + default: + break; + }; break; /* linux_ioprio_get */ case 252: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + default: + break; + }; break; /* linux_inotify_init */ case 253: @@ -8225,8 +8255,14 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 250: /* linux_ioprio_set */ case 251: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_ioprio_get */ case 252: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_inotify_init */ case 253: /* linux_inotify_add_watch */ diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 1b4892124c7c..4085791419ae 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -967,10 +967,13 @@ struct linux_keyctl_args { syscallarg_t dummy; }; struct linux_ioprio_set_args { - syscallarg_t dummy; + char which_l_[PADL_(l_int)]; l_int which; char which_r_[PADR_(l_int)]; + char who_l_[PADL_(l_int)]; l_int who; char who_r_[PADR_(l_int)]; + char ioprio_l_[PADL_(l_int)]; l_int ioprio; char ioprio_r_[PADR_(l_int)]; }; struct linux_ioprio_get_args { - syscallarg_t dummy; + char which_l_[PADL_(l_int)]; l_int which; char which_r_[PADR_(l_int)]; + char who_l_[PADL_(l_int)]; l_int who; char who_r_[PADR_(l_int)]; }; struct linux_inotify_init_args { syscallarg_t dummy; @@ -2278,8 +2281,8 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_add_key AUE_NULL #define LINUX32_SYS_AUE_linux_request_key AUE_NULL #define LINUX32_SYS_AUE_linux_keyctl AUE_NULL -#define LINUX32_SYS_AUE_linux_ioprio_set AUE_NULL -#define LINUX32_SYS_AUE_linux_ioprio_get AUE_NULL +#define LINUX32_SYS_AUE_linux_ioprio_set AUE_SETPRIORITY +#define LINUX32_SYS_AUE_linux_ioprio_get AUE_GETPRIORITY #define LINUX32_SYS_AUE_linux_inotify_init AUE_NULL #define LINUX32_SYS_AUE_linux_inotify_add_watch AUE_NULL #define LINUX32_SYS_AUE_linux_inotify_rm_watch AUE_NULL diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index 12eae3fce9fd..f005ffb9ea54 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -305,8 +305,8 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_add_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 286 = linux_add_key */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_request_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 287 = linux_request_key */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_keyctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 288 = linux_keyctl */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 289 = linux_ioprio_set */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 290 = linux_ioprio_get */ + { .sy_narg = AS(linux_ioprio_set_args), .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_SETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 289 = linux_ioprio_set */ + { .sy_narg = AS(linux_ioprio_get_args), .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_GETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 290 = linux_ioprio_get */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_init, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 291 = linux_inotify_init */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_add_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 292 = linux_inotify_add_watch */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_rm_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 293 = linux_inotify_rm_watch */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index c137bcb18fd6..80940f5428d3 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -2014,12 +2014,19 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_ioprio_set */ case 289: { - *n_args = 0; + struct linux_ioprio_set_args *p = params; + iarg[a++] = p->which; /* l_int */ + iarg[a++] = p->who; /* l_int */ + iarg[a++] = p->ioprio; /* l_int */ + *n_args = 3; break; } /* linux_ioprio_get */ case 290: { - *n_args = 0; + struct linux_ioprio_get_args *p = params; + iarg[a++] = p->which; /* l_int */ + iarg[a++] = p->who; /* l_int */ + *n_args = 2; break; } /* linux_inotify_init */ @@ -6448,9 +6455,32 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_ioprio_set */ case 289: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "l_int"; + break; + default: + break; + }; break; /* linux_ioprio_get */ case 290: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + default: + break; + }; break; /* linux_inotify_init */ case 291: @@ -9689,8 +9719,14 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 288: /* linux_ioprio_set */ case 289: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_ioprio_get */ case 290: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_inotify_init */ case 291: /* linux_inotify_add_watch */ diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index 1c3dffcd6bb6..34108364f751 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -153,10 +153,13 @@ struct linux_ioctl_args { char arg_l_[PADL_(l_ulong)]; l_ulong arg; char arg_r_[PADR_(l_ulong)]; }; struct linux_ioprio_set_args { - syscallarg_t dummy; + char which_l_[PADL_(l_int)]; l_int which; char which_r_[PADR_(l_int)]; + char who_l_[PADL_(l_int)]; l_int who; char who_r_[PADR_(l_int)]; + char ioprio_l_[PADL_(l_int)]; l_int ioprio; char ioprio_r_[PADR_(l_int)]; }; struct linux_ioprio_get_args { - syscallarg_t dummy; + char which_l_[PADL_(l_int)]; l_int which; char which_r_[PADR_(l_int)]; + char who_l_[PADL_(l_int)]; l_int who; char who_r_[PADR_(l_int)]; }; struct linux_mknodat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; @@ -1475,8 +1478,8 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_inotify_add_watch AUE_NULL #define LINUX_SYS_AUE_linux_inotify_rm_watch AUE_NULL #define LINUX_SYS_AUE_linux_ioctl AUE_IOCTL -#define LINUX_SYS_AUE_linux_ioprio_set AUE_NULL -#define LINUX_SYS_AUE_linux_ioprio_get AUE_NULL +#define LINUX_SYS_AUE_linux_ioprio_set AUE_SETPRIORITY +#define LINUX_SYS_AUE_linux_ioprio_get AUE_GETPRIORITY #define LINUX_SYS_AUE_linux_mknodat AUE_MKNODAT #define LINUX_SYS_AUE_linux_mkdirat AUE_MKDIRAT #define LINUX_SYS_AUE_linux_unlinkat AUE_UNLINKAT diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index 6f92bfe3d054..00f4f2f2f735 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/linux/linux_sysent.c @@ -46,8 +46,8 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_add_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 27 = linux_inotify_add_watch */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_rm_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 28 = linux_inotify_rm_watch */ { .sy_narg = AS(linux_ioctl_args), .sy_call = (sy_call_t *)linux_ioctl, .sy_auevent = AUE_IOCTL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 29 = linux_ioctl */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 30 = linux_ioprio_set */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 31 = linux_ioprio_get */ + { .sy_narg = AS(linux_ioprio_set_args), .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_SETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 30 = linux_ioprio_set */ + { .sy_narg = AS(linux_ioprio_get_args), .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_GETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 31 = linux_ioprio_get */ { .sy_narg = AS(flock_args), .sy_call = (sy_call_t *)sys_flock, .sy_auevent = AUE_FLOCK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 32 = flock */ { .sy_narg = AS(linux_mknodat_args), .sy_call = (sy_call_t *)linux_mknodat, .sy_auevent = AUE_MKNODAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 33 = linux_mknodat */ { .sy_narg = AS(linux_mkdirat_args), .sy_call = (sy_call_t *)linux_mkdirat, .sy_auevent = AUE_MKDIRAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 34 = linux_mkdirat */ diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index a2ef2d257037..b45fbcf746f4 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -229,12 +229,19 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_ioprio_set */ case 30: { - *n_args = 0; + struct linux_ioprio_set_args *p = params; + iarg[a++] = p->which; /* l_int */ + iarg[a++] = p->who; /* l_int */ + iarg[a++] = p->ioprio; /* l_int */ + *n_args = 3; break; } /* linux_ioprio_get */ case 31: { - *n_args = 0; + struct linux_ioprio_get_args *p = params; + iarg[a++] = p->which; /* l_int */ + iarg[a++] = p->who; /* l_int */ + *n_args = 2; break; } /* flock */ @@ -2746,9 +2753,32 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_ioprio_set */ case 30: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "l_int"; + break; + default: + break; + }; break; /* linux_ioprio_get */ case 31: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + default: + break; + }; break; /* flock */ case 32: @@ -6356,8 +6386,14 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_ioprio_set */ case 30: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_ioprio_get */ case 31: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* flock */ case 32: if (ndx == 0 || ndx == 1) diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 22564f25f484..ecd5f4cb3e75 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -960,10 +960,13 @@ struct linux_keyctl_args { syscallarg_t dummy; }; struct linux_ioprio_set_args { - syscallarg_t dummy; + char which_l_[PADL_(l_int)]; l_int which; char which_r_[PADR_(l_int)]; + char who_l_[PADL_(l_int)]; l_int who; char who_r_[PADR_(l_int)]; + char ioprio_l_[PADL_(l_int)]; l_int ioprio; char ioprio_r_[PADR_(l_int)]; }; struct linux_ioprio_get_args { - syscallarg_t dummy; + char which_l_[PADL_(l_int)]; l_int which; char which_r_[PADR_(l_int)]; + char who_l_[PADL_(l_int)]; l_int who; char who_r_[PADR_(l_int)]; }; struct linux_inotify_init_args { syscallarg_t dummy; @@ -2269,8 +2272,8 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_add_key AUE_NULL #define LINUX_SYS_AUE_linux_request_key AUE_NULL #define LINUX_SYS_AUE_linux_keyctl AUE_NULL -#define LINUX_SYS_AUE_linux_ioprio_set AUE_NULL -#define LINUX_SYS_AUE_linux_ioprio_get AUE_NULL +#define LINUX_SYS_AUE_linux_ioprio_set AUE_SETPRIORITY +#define LINUX_SYS_AUE_linux_ioprio_get AUE_GETPRIORITY #define LINUX_SYS_AUE_linux_inotify_init AUE_NULL #define LINUX_SYS_AUE_linux_inotify_add_watch AUE_NULL #define LINUX_SYS_AUE_linux_inotify_rm_watch AUE_NULL diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index 1b7fcf714e0d..d08b8458740a 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -305,8 +305,8 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_add_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 286 = linux_add_key */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_request_key, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 287 = linux_request_key */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_keyctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 288 = linux_keyctl */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 289 = linux_ioprio_set */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 290 = linux_ioprio_get */ + { .sy_narg = AS(linux_ioprio_set_args), .sy_call = (sy_call_t *)linux_ioprio_set, .sy_auevent = AUE_SETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 289 = linux_ioprio_set */ + { .sy_narg = AS(linux_ioprio_get_args), .sy_call = (sy_call_t *)linux_ioprio_get, .sy_auevent = AUE_GETPRIORITY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 290 = linux_ioprio_get */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_init, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 291 = linux_inotify_init */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_add_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 292 = linux_inotify_add_watch */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_inotify_rm_watch, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 293 = linux_inotify_rm_watch */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index e93d46556092..8121297a5fd8 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -2049,12 +2049,19 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_ioprio_set */ case 289: { - *n_args = 0; + struct linux_ioprio_set_args *p = params; + iarg[a++] = p->which; /* l_int */ + iarg[a++] = p->who; /* l_int */ + iarg[a++] = p->ioprio; /* l_int */ + *n_args = 3; break; } /* linux_ioprio_get */ case 290: { - *n_args = 0; + struct linux_ioprio_get_args *p = params; + iarg[a++] = p->which; /* l_int */ + iarg[a++] = p->who; /* l_int */ + *n_args = 2; break; } /* linux_inotify_init */ @@ -6516,9 +6523,32 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_ioprio_set */ case 289: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "l_int"; + break; + default: + break; + }; break; /* linux_ioprio_get */ case 290: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "l_int"; + break; + default: + break; + }; break; /* linux_inotify_init */ case 291: @@ -9769,8 +9799,14 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 288: /* linux_ioprio_set */ case 289: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_ioprio_get */ case 290: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_inotify_init */ case 291: /* linux_inotify_add_watch */ From nobody Fri Aug 4 13:04:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHQt26kNJz4kRBJ; Fri, 4 Aug 2023 13:04:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHQt24hlHz4byq; Fri, 4 Aug 2023 13:04:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691154298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DYnVi3QWfg80PqvlC5Xg0l9Dc0XRRBZ66eny5Hm9rbw=; b=NqjxXeFKCe5+ixlsygp+fKI2s3mKTqTr2lmvmUv8wC2bT3o2h7ipm5XY0IM8Akp+VduK2d 9Ht6y7NSbjRYMm/0Q9mD0F73aWvotBcE23ZDtY5e/oD1A1Lm+mt66VmXLPH8DPr4bcsIwU /c6GfBV8Mzqr7STxPbjgbzSSefcRa1N/EhFBCX/KhdrMLUAt2M1UviexAS2wP9QJ8KmoIe l4cZI1KuyO0MGldELiSC97A6Dx1da7KgBDc5QLg2r1LrvDEjUQyuxqBFKSS9q7UR7vU/KX DiBFLT9P1HbY8JXLM4Nmewmoir9981WP1+7R9oP46kHE3WjWE0Dqx2RqWY2KVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691154298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DYnVi3QWfg80PqvlC5Xg0l9Dc0XRRBZ66eny5Hm9rbw=; b=jzDYYn1cbRPtXpEfaa32biyae9jwU9md1T8VeWv6Dik0Lf1C6oqjGjs4hgpwy/BJaZZ8Pv PpzCeIYH1D4R7NAcva9FP7K4p0HxLs7F4MCI9l+1lIzbTq/rDKaFwSV8acPjB09j1HmFBD qofzwyoY/Fp6gUwkhC5xVrp8pSzffhCgHvgToE8SQDW3mLnBEtLEPByxEMrCw4+Le9mmcN j5qHq8RQviw77IZFRm6R2YnJuXRGw2v0SxyEIixDuWGyspkXZhHgt9JEn9UMF00pXVhTxg dUkE0bXOgOE8swUuagLTaM3vJ2TKUcuWhx34HOrEPpSzy+PdsfPrrcLwPHeWuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691154298; a=rsa-sha256; cv=none; b=qjSoNFZGuGQQdlXFvHS0/AcT6lhwxrsAGGALTtSUJao24IBJAk2x/WR8qQr++u60IBpL7H cmY8c/xc79sDFG9m/k7WvMSSKl3WOBf7QiAtUaXu0IFHrUIUdx4/6agjcHc5dL/RzKMh4U Qv97AwLbfHS1uZLyuiG4rMrqlhZ/P7L2wi1pyVY3a9xSkHiTxt9NCzOjOBaSu9irEbN71S P57XURMZF+agod9zMURr6iGT4YpZuxwBKDsuyLSerTk+rhvQ+nMWCo8qfolg64Y7Ck6DAH jcnRq0PABsShRXPrQahzgVrPdrFv6wMdy4w1Ff8TIRccQfyrN6pWpOsmsqc3tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHQt23pxlz13LH; Fri, 4 Aug 2023 13:04:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374D4wTA086812; Fri, 4 Aug 2023 13:04:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374D4w2V086811; Fri, 4 Aug 2023 13:04:58 GMT (envelope-from git) Date: Fri, 4 Aug 2023 13:04:58 GMT Message-Id: <202308041304.374D4w2V086811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: bbe017e0415a - main - linux(4): Add a dedicated ioprio system calls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbe017e0415a60114036f2315605ff6881ed9c46 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=bbe017e0415a60114036f2315605ff6881ed9c46 commit bbe017e0415a60114036f2315605ff6881ed9c46 Author: Dmitry Chagin AuthorDate: 2023-08-04 13:03:57 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-04 13:03:57 +0000 linux(4): Add a dedicated ioprio system calls On Linux these system calls have an effect only when used in conjuction with an I/O scheduler that supports I/O priorities. If no I/O scheduler has been set for a thread, then by defaut the I/O priority will follow the CPU nice value. Due to FreeBSD lack of I/O scheduler facilities, the default Linux behavior is implemented. Ubuntu 23.04 debootstrap requires Linux ionice which depends on these syscalls. Differential Revision: https://reviews.freebsd.org/D41153 MFC after: 1 month --- sys/compat/linux/linux_dummy.c | 2 - sys/compat/linux/linux_misc.c | 270 +++++++++++++++++++++++++++++++++++++++++ sys/compat/linux/linux_misc.h | 24 ++++ 3 files changed, 294 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c index 861482b67d8f..5556652b31a1 100644 --- a/sys/compat/linux/linux_dummy.c +++ b/sys/compat/linux/linux_dummy.c @@ -78,8 +78,6 @@ DUMMY(add_key); DUMMY(request_key); DUMMY(keyctl); /* Linux 2.6.13: */ -DUMMY(ioprio_set); -DUMMY(ioprio_get); DUMMY(inotify_add_watch); DUMMY(inotify_rm_watch); /* Linux 2.6.16: */ diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 583cc25f1c43..0cea43001a0d 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2653,3 +2654,272 @@ linux_execve(struct thread *td, struct linux_execve_args *args) AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td); return (error); } + +static void +linux_up_rtprio_if(struct thread *td1, struct rtprio *rtp) +{ + struct rtprio rtp2; + + pri_to_rtp(td1, &rtp2); + if (rtp2.type < rtp->type || + (rtp2.type == rtp->type && + rtp2.prio < rtp->prio)) { + rtp->type = rtp2.type; + rtp->prio = rtp2.prio; + } +} + +#define LINUX_PRIO_DIVIDER RTP_PRIO_MAX / LINUX_IOPRIO_MAX + +static int +linux_rtprio2ioprio(struct rtprio *rtp) +{ + int ioprio, prio; + + switch (rtp->type) { + case RTP_PRIO_IDLE: + prio = RTP_PRIO_MIN; + ioprio = LINUX_IOPRIO_PRIO(LINUX_IOPRIO_CLASS_IDLE, prio); + break; + case RTP_PRIO_NORMAL: + prio = rtp->prio / LINUX_PRIO_DIVIDER; + ioprio = LINUX_IOPRIO_PRIO(LINUX_IOPRIO_CLASS_BE, prio); + break; + case RTP_PRIO_REALTIME: + prio = rtp->prio / LINUX_PRIO_DIVIDER; + ioprio = LINUX_IOPRIO_PRIO(LINUX_IOPRIO_CLASS_RT, prio); + break; + default: + prio = RTP_PRIO_MIN; + ioprio = LINUX_IOPRIO_PRIO(LINUX_IOPRIO_CLASS_NONE, prio); + break; + } + return (ioprio); +} + +static int +linux_ioprio2rtprio(int ioprio, struct rtprio *rtp) +{ + + switch (LINUX_IOPRIO_PRIO_CLASS(ioprio)) { + case LINUX_IOPRIO_CLASS_IDLE: + rtp->prio = RTP_PRIO_MIN; + rtp->type = RTP_PRIO_IDLE; + break; + case LINUX_IOPRIO_CLASS_BE: + rtp->prio = LINUX_IOPRIO_PRIO_DATA(ioprio) * LINUX_PRIO_DIVIDER; + rtp->type = RTP_PRIO_NORMAL; + break; + case LINUX_IOPRIO_CLASS_RT: + rtp->prio = LINUX_IOPRIO_PRIO_DATA(ioprio) * LINUX_PRIO_DIVIDER; + rtp->type = RTP_PRIO_REALTIME; + break; + default: + return (EINVAL); + } + return (0); +} +#undef LINUX_PRIO_DIVIDER + +int +linux_ioprio_get(struct thread *td, struct linux_ioprio_get_args *args) +{ + struct thread *td1; + struct rtprio rtp; + struct pgrp *pg; + struct proc *p; + int error, found; + + p = NULL; + td1 = NULL; + error = 0; + found = 0; + rtp.type = RTP_PRIO_IDLE; + rtp.prio = RTP_PRIO_MAX; + switch (args->which) { + case LINUX_IOPRIO_WHO_PROCESS: + if (args->who == 0) { + td1 = td; + p = td1->td_proc; + PROC_LOCK(p); + } else if (args->who > PID_MAX) { + td1 = linux_tdfind(td, args->who, -1); + if (td1 != NULL) + p = td1->td_proc; + } else + p = pfind(args->who); + if (p == NULL) + return (ESRCH); + if ((error = p_cansee(td, p))) { + PROC_UNLOCK(p); + break; + } + if (td1 != NULL) { + pri_to_rtp(td1, &rtp); + } else { + FOREACH_THREAD_IN_PROC(p, td1) { + linux_up_rtprio_if(td1, &rtp); + } + } + found++; + PROC_UNLOCK(p); + break; + case LINUX_IOPRIO_WHO_PGRP: + sx_slock(&proctree_lock); + if (args->who == 0) { + pg = td->td_proc->p_pgrp; + PGRP_LOCK(pg); + } else { + pg = pgfind(args->who); + if (pg == NULL) { + sx_sunlock(&proctree_lock); + error = ESRCH; + break; + } + } + sx_sunlock(&proctree_lock); + LIST_FOREACH(p, &pg->pg_members, p_pglist) { + PROC_LOCK(p); + if (p->p_state == PRS_NORMAL && + p_cansee(td, p) == 0) { + FOREACH_THREAD_IN_PROC(p, td1) { + linux_up_rtprio_if(td1, &rtp); + found++; + } + } + PROC_UNLOCK(p); + } + PGRP_UNLOCK(pg); + break; + case LINUX_IOPRIO_WHO_USER: + if (args->who == 0) + args->who = td->td_ucred->cr_uid; + sx_slock(&allproc_lock); + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state == PRS_NORMAL && + p->p_ucred->cr_uid == args->who && + p_cansee(td, p) == 0) { + FOREACH_THREAD_IN_PROC(p, td1) { + linux_up_rtprio_if(td1, &rtp); + found++; + } + } + PROC_UNLOCK(p); + } + sx_sunlock(&allproc_lock); + break; + default: + error = EINVAL; + break; + } + if (error == 0) { + if (found != 0) + td->td_retval[0] = linux_rtprio2ioprio(&rtp); + else + error = ESRCH; + } + return (error); +} + +int +linux_ioprio_set(struct thread *td, struct linux_ioprio_set_args *args) +{ + struct thread *td1; + struct rtprio rtp; + struct pgrp *pg; + struct proc *p; + int error; + + if ((error = linux_ioprio2rtprio(args->ioprio, &rtp)) != 0) + return (error); + /* Attempts to set high priorities (REALTIME) require su privileges. */ + if (RTP_PRIO_BASE(rtp.type) == RTP_PRIO_REALTIME && + (error = priv_check(td, PRIV_SCHED_RTPRIO)) != 0) + return (error); + + p = NULL; + td1 = NULL; + switch (args->which) { + case LINUX_IOPRIO_WHO_PROCESS: + if (args->who == 0) { + td1 = td; + p = td1->td_proc; + PROC_LOCK(p); + } else if (args->who > PID_MAX) { + td1 = linux_tdfind(td, args->who, -1); + if (td1 != NULL) + p = td1->td_proc; + } else + p = pfind(args->who); + if (p == NULL) + return (ESRCH); + if ((error = p_cansched(td, p))) { + PROC_UNLOCK(p); + break; + } + if (td1 != NULL) { + error = rtp_to_pri(&rtp, td1); + } else { + FOREACH_THREAD_IN_PROC(p, td1) { + if ((error = rtp_to_pri(&rtp, td1)) != 0) + break; + } + } + PROC_UNLOCK(p); + break; + case LINUX_IOPRIO_WHO_PGRP: + sx_slock(&proctree_lock); + if (args->who == 0) { + pg = td->td_proc->p_pgrp; + PGRP_LOCK(pg); + } else { + pg = pgfind(args->who); + if (pg == NULL) { + sx_sunlock(&proctree_lock); + error = ESRCH; + break; + } + } + sx_sunlock(&proctree_lock); + LIST_FOREACH(p, &pg->pg_members, p_pglist) { + PROC_LOCK(p); + if (p->p_state == PRS_NORMAL && + p_cansched(td, p) == 0) { + FOREACH_THREAD_IN_PROC(p, td1) { + if ((error = rtp_to_pri(&rtp, td1)) != 0) + break; + } + } + PROC_UNLOCK(p); + if (error != 0) + break; + } + PGRP_UNLOCK(pg); + break; + case LINUX_IOPRIO_WHO_USER: + if (args->who == 0) + args->who = td->td_ucred->cr_uid; + sx_slock(&allproc_lock); + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state == PRS_NORMAL && + p->p_ucred->cr_uid == args->who && + p_cansched(td, p) == 0) { + FOREACH_THREAD_IN_PROC(p, td1) { + if ((error = rtp_to_pri(&rtp, td1)) != 0) + break; + } + } + PROC_UNLOCK(p); + if (error != 0) + break; + } + sx_sunlock(&allproc_lock); + break; + default: + error = EINVAL; + break; + } + return (error); +} diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h index 80f12ef13545..92cc7be636d2 100644 --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -191,4 +191,28 @@ struct syscall_info { }; }; +/* Linux ioprio set/get syscalls */ +#define LINUX_IOPRIO_CLASS_SHIFT 13 +#define LINUX_IOPRIO_CLASS_MASK 0x07 +#define LINUX_IOPRIO_PRIO_MASK ((1UL << LINUX_IOPRIO_CLASS_SHIFT) - 1) + +#define LINUX_IOPRIO_PRIO_CLASS(ioprio) \ + (((ioprio) >> LINUX_IOPRIO_CLASS_SHIFT) & LINUX_IOPRIO_CLASS_MASK) +#define LINUX_IOPRIO_PRIO_DATA(ioprio) ((ioprio) & LINUX_IOPRIO_PRIO_MASK) +#define LINUX_IOPRIO_PRIO(class, data) \ + ((((class) & LINUX_IOPRIO_CLASS_MASK) << LINUX_IOPRIO_CLASS_SHIFT) | \ + ((data) & LINUX_IOPRIO_PRIO_MASK)) + +#define LINUX_IOPRIO_CLASS_NONE 0 +#define LINUX_IOPRIO_CLASS_RT 1 +#define LINUX_IOPRIO_CLASS_BE 2 +#define LINUX_IOPRIO_CLASS_IDLE 3 + +#define LINUX_IOPRIO_MIN 0 +#define LINUX_IOPRIO_MAX 7 + +#define LINUX_IOPRIO_WHO_PROCESS 1 +#define LINUX_IOPRIO_WHO_PGRP 2 +#define LINUX_IOPRIO_WHO_USER 3 + #endif /* _LINUX_MISC_H_ */ From nobody Fri Aug 4 13:53:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHRy81QLKz4kV9W; Fri, 4 Aug 2023 13:53:36 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHRy73HvLz3Dxm; Fri, 4 Aug 2023 13:53:35 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1140:c3d:e80f:4253:61d8:bc92]) (Authenticated sender: micmac) by mail-n.franken.de (Postfix) with ESMTPSA id BDDB383B0D6D8; Fri, 4 Aug 2023 15:53:31 +0200 (CEST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: b279e84a47dd - main - sctp: improve consistency From: tuexen@freebsd.org In-Reply-To: Date: Fri, 4 Aug 2023 15:53:31 +0200 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202307282203.36SM3C98056354@gitrepo.freebsd.org> To: Kristof Provost X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 4RHRy73HvLz3Dxm X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:193.174.0.0/15, country:DE] > On 4. Aug 2023, at 15:03, Kristof Provost wrote: >=20 > On 29 Jul 2023, at 0:03, Michael Tuexen wrote: > The branch main has been updated by tuexen: > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Db279e84a47ddb59e55b5a3cec31c51cd= 41bf0dc3 > commit b279e84a47ddb59e55b5a3cec31c51cd41bf0dc3=20 > Author: Michael Tuexen =20 > AuthorDate: 2023-07-28 12:36:11 +0000=20 > Commit: Michael Tuexen =20 > CommitDate: 2023-07-28 12:36:11 +0000 > sctp: improve consistency > This is simplifying a patch to address PR 260116. > PR: 260116=20 > MFC after: 1 week > It looks like this commit (or maybe the next one, = c620788150d274c09a070ab486602c98407d73b0) causes a panic in the SCTP = code during the sys/netpfil/pf/sctp:basic_v4 test: > panic: Counter goes negative > cpuid =3D 7 > time =3D 1691145655 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xfffffe026ea9a3a0 > vpanic() at vpanic+0x132/frame 0xfffffe026ea9a4d0 > panic() at panic+0x43/frame 0xfffffe026ea9a530 > sctp_abort_notification() at sctp_abort_notification/frame = 0xfffffe026ea9a540 > sctp_express_handle_sack() at sctp_express_handle_sack+0x647/frame = 0xfffffe026ea9a640 > sctp_process_control() at sctp_process_control+0xf62/frame = 0xfffffe026ea9a990 > sctp_common_input_processing() at = sctp_common_input_processing+0x561/frame 0xfffffe026ea9ab10 > sctp_input_with_port() at sctp_input_with_port+0x1fa/frame = 0xfffffe026ea9abe0 > sctp_input() at sctp_input+0x10/frame 0xfffffe026ea9abf0 > ip_input() at ip_input+0x2ab/frame 0xfffffe026ea9ac50 > netisr_dispatch_src() at netisr_dispatch_src+0xad/frame = 0xfffffe026ea9acb0 > ether_demux() at ether_demux+0x17a/frame 0xfffffe026ea9ace0 > ether_nh_input() at ether_nh_input+0x39f/frame 0xfffffe026ea9ad30 > netisr_dispatch_src() at netisr_dispatch_src+0xad/frame = 0xfffffe026ea9ad90 > ether_input() at ether_input+0xd9/frame 0xfffffe026ea9adf0 > epair_tx_start_deferred() at epair_tx_start_deferred+0xd7/frame = 0xfffffe026ea9ae40 > taskqueue_run_locked() at taskqueue_run_locked+0xab/frame = 0xfffffe026ea9aec0 > taskqueue_thread_loop() at taskqueue_thread_loop+0xd3/frame = 0xfffffe026ea9aef0 > fork_exit() at fork_exit+0x82/frame 0xfffffe026ea9af30 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe026ea9af30 > --- trap 0, rip =3D 0x35c39ec8bda0, rsp =3D 0, rbp =3D 0x35c39ec8ec90 = --- > KDB: enter: panic >=20 > That seems to be panicking during SCTP packet handling, so I do not = believe this to be a pf bug. > Reverting both commits avoids the problem. > It=E2=80=99s also failing during the CI tests: = https://ci.freebsd.org/view/Test/job/FreeBSD-main-amd64-test/23957/console= > (To reproduce, kldload pf sctp ; cd /usr/tests/sys/netpfil/pf ; sudo = kyua test sctp:basic_v4). Thank you very much for that line!! I think I know what the problem is. It comes down to an inconsistent = handling of shutdown() calls. This results in inconsistent sb_ccc / sb_acc values which are now = caught. I'm working on a patch which also fixes several syzkaller issues. Using = the above line, I'll also make sure it fixes the issue you are observing. Should be fixed by Monday. Best regards Michael > Best regards, > Kristof From nobody Fri Aug 4 13:59:14 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHS4g11H3z4kVKd; Fri, 4 Aug 2023 13:59:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHS4f5vXdz3FbX; Fri, 4 Aug 2023 13:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691157554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jaaHiRAGtBKsdsJH8pmHdN0oWP7vJ21sUlESFBYguBs=; b=WVK3xj7Gu3KGgdES1Vdl3GopXNfp2dJNg22ZGdqIEcXNVGOSKhh60FtdxKGpGxTbgszu7A UbI19r0gwZKm1zJub4+BdkOSrwB6W2sKSHIQHWPqT5YImy/9uHiXCwU5/sKai31s7BV8pd DRqSIHWURWWJ6Zlnt0j6G8cq9cbmNgfok8cL7woWZbB2dkEmPvVGREVSfZV72EXX8oI+Zd Zvb2cthEkMVf4G6iOPNaMHkO+1zlmVoKZOhLHFKZZeS8XiqRpUbdsWOZnVl1cknoEpsRTp 8iVUx8RcuZfvT5T6UyzSVpXVjnmEPNB0iQgoYuM7tHtfyAYvFI4aRfGotAqcEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691157554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jaaHiRAGtBKsdsJH8pmHdN0oWP7vJ21sUlESFBYguBs=; b=q30Ibpodeyt9ivC8FvPD4/qqENhuGcOcXzCPQ6aSCARYmG5+BnNBOfZEUWxg1Hw5ZV0kmg 6m0HgJ7BJcDBTNtkesKxQ2fT15QDaXrot0XyD5KfHbyuYCZzCwwIZejjOZZ6DoO8/IDkfG moYPazMPrEGv+Yu0poxKMXw75JA7oxQK3AgKHldX1sndDv95c6wW3jPGWmzDWD8rsMp5zK oakmDBahesb/wtoyHfujtx5QNzRqoX4xu19/tml7Br6rcM1lQLvBy678ZdXb1zyysDhuQN D1vX2w/CUyD6ET9pouXVKNGQm/RFoT/YcPwGOJ2Djw9BB35349ued4VxhG6olA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691157554; a=rsa-sha256; cv=none; b=VWQm47Tj7yDoMcm35sjNb3g3UySZyEcat2+6mK1yV7cIqXfbAzXY+1vfSu3McqJjfmWGZm 7/gR91P5kNyUwOalstbiiFM0xAiXia2iKWaK2dvcyd9S3/7ioPtH3XqTG5XynxGU9gR+x6 ESpCxPeAfZI+eWT48rK91cAoSHD/77W2XzhFkRqn1M+j1OM3uid9gKqR2+72o8jidU3XZY e7X21xfdsfOgsa4yvxdmkCDgXu2Kivv3NeDGanx5QgY6QDZYMN8VIvS592p65KrRrOlwNn 1aE9qZK5Kp1x3EMxrSdRSd/qaoW5dIgI7yNPo9wPX8iGcSK2EBmUcSjEwT5bvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHS4f4ztHz14pC; Fri, 4 Aug 2023 13:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374DxEpf070027; Fri, 4 Aug 2023 13:59:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374DxEIb070026; Fri, 4 Aug 2023 13:59:14 GMT (envelope-from git) Date: Fri, 4 Aug 2023 13:59:14 GMT Message-Id: <202308041359.374DxEIb070026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 76afcbb52492 - main - pf: handle multiple IPv6 fragment headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76afcbb52492f9b3e72ee7d4c4ed0a54c25e1c48 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=76afcbb52492f9b3e72ee7d4c4ed0a54c25e1c48 commit 76afcbb52492f9b3e72ee7d4c4ed0a54c25e1c48 Author: Kristof Provost AuthorDate: 2023-07-13 08:25:49 +0000 Commit: Kristof Provost CommitDate: 2023-08-04 13:23:49 +0000 pf: handle multiple IPv6 fragment headers With 'scrub fragment reassemble' if a packet contains multiple IPv6 fragment headers we would reassemble the packet and immediately continue processing it. That is, we'd remove the first fragment header and expect the next header to be a final header (i.e. TCP, UDP, ICMPv6, ...). However, if it's another fragment header we'd not treat the packet correctly. That is, we'd fail to recognise the payload and treat it as if it were an IPv6 fragment rather than as its actual payload. Fix this by restarting the normalisation on the reassembled packet. If there are multiple fragment headers drop the packet. Reported by: Enrico Bassetti bassetti@di.uniroma1.it (NetSecurityLab @ Sapienza University of Rome) MFC after: instant Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_norm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 6dda410d8327..d3fb5dcc00ab 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -1254,6 +1254,8 @@ pf_normalize_ip6(struct mbuf **m0, struct pfi_kkif *kif, if (sizeof(struct ip6_hdr) + IPV6_MAXPACKET < m->m_pkthdr.len) goto drop; +again: + h = mtod(m, struct ip6_hdr *); plen = ntohs(h->ip6_plen); /* jumbo payload option not supported */ if (plen == 0) @@ -1322,6 +1324,8 @@ pf_normalize_ip6(struct mbuf **m0, struct pfi_kkif *kif, return (PF_PASS); fragment: + if (pd->flags & PFDESC_IP_REAS) + return (PF_DROP); if (sizeof(struct ip6_hdr) + plen > m->m_pkthdr.len) goto shortpkt; @@ -1339,7 +1343,7 @@ pf_normalize_ip6(struct mbuf **m0, struct pfi_kkif *kif, return (PF_DROP); pd->flags |= PFDESC_IP_REAS; - return (PF_PASS); + goto again; shortpkt: REASON_SET(reason, PFRES_SHORT); From nobody Fri Aug 4 13:59:15 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHS4h6K3wz4kVKp; Fri, 4 Aug 2023 13:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHS4g6n85z3Fmd; Fri, 4 Aug 2023 13:59:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691157556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DLb9WVg+VM/D8s4ClXfXcduDzkrQC6S+dXJNpVREwyk=; b=XMhS7RaByhgjVARkDL/eGdDEZPZo0+jhMr3qChynaB2dUlOUivnRyPtEpQvJ2Kq08w3L+b UyNtpbg0VscQjtjRPcSOTubpiZQJeyR/ZeX/N8FZOxJhhYIOyav8+xZDwc8gAgYVAkJ+MW YjpmLd28X/AQckXB9qdnQUUaA5ApTnVn66enZKSsqo/hLYGdTPshpAWbYtLTMNG62arcfH Oj4iYOqhjxF/SIh1YGZaY+8tJ6nV6go74O8rQYFTTVgZjDx98Wu9k5AXlghcsPWAZQbICk QooQYiP5WhgmmFnBdH3B7LwgX1zx74ttM3OArAgBMIXMRRpl2rqtN1T7T1HiUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691157555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DLb9WVg+VM/D8s4ClXfXcduDzkrQC6S+dXJNpVREwyk=; b=sZSbJjg8OJOF/VMp0tcgssMFuyzIFpXyw/fzdXA/yDPU889dd9REEqxK2hOVqcTJ8Q87fe 2RK4mW+i2hlssHb0tIuUUnfOnltNNGZeukW978j446EnaCJ6eEL80Y5vLAhe3PBBv6suN3 I9K4xiQfCHwLqxePUbXvhhnAD/1duTV+1lVQ8PLhr8238lwgQPjybX5M/rjMVFEN3q1VxJ UmcNGZdXn/Gv5VoiDsw+Vwyr/QqoZJD+sExST+O2bbd9NN/e71y95aCQvDoAPOuCx6R1fO 6RvmY4KcKY9uxGygHZBiMNHB661/4AMOe6EirSI47KfvAA1Pp718nv+tIY6pqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691157555; a=rsa-sha256; cv=none; b=sD7fS3xMvk/s33KeMLP7bK5d6Ia4Rsi8F6WuwpwxlvwDjvjlZNHCJryeFQAX7grFzGtT08 bHYjD/nk2n8gkghqxnKX57c36z93t9GIMavf2umZDiBM4RzNKZcZFxwtZusBIpSlRu2mc/ HAsb7NuMEU6ZjcP8kAdo1OsvoY2aZmwjsBeERLEbzPot0FCjqfDCJ4Q6UnakGHngXBaJBO X50e4oVeZ0LUp+CLJUXJg1lnfzDB90+H6V4BF9/TfXhIQCtKzj2YWXuQiqTta2vINXIZHx di3kQQcm0RlqwNijBg6ZTWxpKcVYZjMRpxoNYX1ATij5p7Ltvi3fxMB/O6iezg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHS4g5sSPz14pD; Fri, 4 Aug 2023 13:59:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374DxFD2070047; Fri, 4 Aug 2023 13:59:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374DxFGx070046; Fri, 4 Aug 2023 13:59:15 GMT (envelope-from git) Date: Fri, 4 Aug 2023 13:59:15 GMT Message-Id: <202308041359.374DxFGx070046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b23dbabb7f3e - main - pf: test rules evaluation in the face of multiple IPv6 fragment headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b23dbabb7f3edb3f323a64f03e37be2c9a8b2a45 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b23dbabb7f3edb3f323a64f03e37be2c9a8b2a45 commit b23dbabb7f3edb3f323a64f03e37be2c9a8b2a45 Author: Kristof Provost AuthorDate: 2023-07-13 06:34:54 +0000 Commit: Kristof Provost CommitDate: 2023-08-04 13:24:16 +0000 pf: test rules evaluation in the face of multiple IPv6 fragment headers Send an ICMPv6 echo request packet with multiple IPv6 fragment headers. Set rules to pass all packets, except for ICMPv6 echo requests. pf ought to drop the echo request, but doesn't because it reassembles the packet, and then doesn't handle the second fragment header. In other words: it fails to detect the ICMPv6 echo header. Reported by: Enrico Bassetti bassetti@di.uniroma1.it (NetSecurityLab @ Sapienza University of Rome) MFC after: instant Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/atf_python/sys/net/tools.py | 21 ++++++++++++++ tests/sys/netpfil/pf/Makefile | 2 ++ tests/sys/netpfil/pf/frag6.py | 60 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) diff --git a/tests/atf_python/sys/net/tools.py b/tests/atf_python/sys/net/tools.py index 567d9d4b21ac..44bd74d8578f 100644 --- a/tests/atf_python/sys/net/tools.py +++ b/tests/atf_python/sys/net/tools.py @@ -1,6 +1,7 @@ #!/usr/local/bin/python3 import json import os +import subprocess class ToolsHelper(object): @@ -13,6 +14,26 @@ class ToolsHelper(object): print("run: '{}'".format(cmd)) return os.popen(cmd).read() + @classmethod + def pf_rules(cls, rules, verbose=True): + pf_conf = "" + for r in rules: + pf_conf = pf_conf + r + "\n" + + if verbose: + print("Set rules:") + print(pf_conf) + + ps = subprocess.Popen("/sbin/pfctl -g -f -", shell=True, + stdin=subprocess.PIPE) + ps.communicate(bytes(pf_conf, 'utf-8')) + ret = ps.wait() + if ret != 0: + raise Exception("Failed to set pf rules %d" % ret) + + if verbose: + cls.print_output("/sbin/pfctl -sr") + @classmethod def print_output(cls, cmd: str, verbose=True): if verbose: diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 19c87486d8bb..5c59584d2ec9 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -40,6 +40,8 @@ ATF_TESTS_SH+= altq \ table \ tos +ATF_TESTS_PYTEST+= frag6.py + # Tests reuse jail names and so cannot run in parallel. TEST_METADATA+= is_exclusive=true diff --git a/tests/sys/netpfil/pf/frag6.py b/tests/sys/netpfil/pf/frag6.py new file mode 100644 index 000000000000..28b1829d418c --- /dev/null +++ b/tests/sys/netpfil/pf/frag6.py @@ -0,0 +1,60 @@ +import pytest +import logging +import threading +import time +logging.getLogger("scapy").setLevel(logging.CRITICAL) +from atf_python.sys.net.tools import ToolsHelper +from atf_python.sys.net.vnet import VnetTestTemplate + +class DelayedSend(threading.Thread): + def __init__(self, packet): + threading.Thread.__init__(self) + self._packet = packet + + self.start() + + def run(self): + import scapy.all as sp + time.sleep(1) + sp.send(self._packet) + +class TestFrag6(VnetTestTemplate): + REQUIRED_MODULES = ["pf"] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1"]}, + "if1": {"prefixes6": [("2001:db8::1/64", "2001:db8::2/64")]}, + } + + def vnet2_handler(self, vnet): + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "scrub fragment reassemble", + "pass", + "block in inet6 proto icmp6 icmp6-type echoreq", + ]) + + def check_ping_reply(self, packet): + print(packet) + return False + + @pytest.mark.require_user("root") + def test_dup_frag_hdr(self): + "Test packets with duplicate fragment headers" + srv_vnet = self.vnet_map["vnet2"] + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + packet = sp.IPv6(src="2001:db8::1", dst="2001:db8::2") \ + / sp.IPv6ExtHdrFragment(offset = 0, m = 0) \ + / sp.IPv6ExtHdrFragment(offset = 0, m = 0) \ + / sp.ICMPv6EchoRequest(data=sp.raw(bytes.fromhex('f00f') * 128)) + + # Delay the send so the sniffer is running when we transmit. + s = DelayedSend(packet) + + packets = sp.sniff(iface=self.vnet.iface_alias_map["if1"].name, + timeout=3) + for p in packets: + assert not p.getlayer(sp.ICMPv6EchoReply) From nobody Fri Aug 4 15:16:39 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHTp46Gj2z4Tlgt; Fri, 4 Aug 2023 15:16:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHTp43KKlz3RTS; Fri, 4 Aug 2023 15:16:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-76c93abeb83so170651685a.0; Fri, 04 Aug 2023 08:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691162202; x=1691767002; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=geAQseklUR/icIYaRObxR7a+H/IwCxQnF+C3DkWTESQ=; b=lNSv09c5z2/Cct4SXNiydOvcwvPqRbzwEUhK9M93s2+/uvwEnPQ+QzQ7SfcuI+khYE qjWfVZ+ya8Bb1H1eG+vMtpedExo4N2yyR00OkEIA3aiBGNYK1CX03q24JLuC1H1IPLb6 hxt9fgSfamGxHEbrUpy19zMX3dx5V7mqALqcgGh7UekoAYI9a41OkdnSLQN0r7wd3c5z hbcxXaYM9tvhnAcSv0PWNXIkHSqh/UuinzTGbqQngj1X9VDtgt6P52rLSz/eN0Ekd9+I SfPiflXsJOaG8+rLjE0+LwSo+wl2z8uLfAySuiSQx7oQzs448K/J1Mj32y78yr8xwaZv IeQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691162202; x=1691767002; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=geAQseklUR/icIYaRObxR7a+H/IwCxQnF+C3DkWTESQ=; b=UMPCIk9FJlxiXRRAY4MiIrfd7BkFj4LsLZVwAxa2fkLWJLF9mXzG2ah2NMAo+WeLLq 3ynG1X973HfFkCNqZeBry1Z0pmPwm6eKigrCUn/GRRLI+lK4M6OYpPzJmujWP/eIK00r PWDbG+3DucHrvgmz4N1vV9qXFbNzOpYe/boL7pOxjMdnLrAacQ35GxP8Secg2a5YmOj0 qYuUiMIo8QUdTAyBeqiOqFngUFco9O+i4Z2L2EZUwrEIRTcRgjppca4qlImYkx09wkP8 HtpP7fO4qKLTQKJHuVETpnVLZlIk/65WnZuF2u4TjRUkW/waEU7GV8RaCHWDEQtxuZ+X 7w2Q== X-Gm-Message-State: AOJu0YwYWp4GWC32y2Lya357Y6cu+bwPfcwf1Kv54anPg2tIEoQiNR5Q SKAFrGVbJoLOUZ5n+bZbg/7xyDhcZA4= X-Google-Smtp-Source: AGHT+IEaq782DcyDzUYYM2AbFlcebUxA+mZ04hhMx+Tirpx5cXmA9/pt1YTtArIIyZKo0aM4hP+n9w== X-Received: by 2002:a05:620a:3904:b0:76c:b87c:16cc with SMTP id qr4-20020a05620a390400b0076cb87c16ccmr2684262qkn.61.1691162202398; Fri, 04 Aug 2023 08:16:42 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id i17-20020a05620a145100b0076ca9269de7sm703211qkl.124.2023.08.04.08.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 08:16:41 -0700 (PDT) Date: Fri, 4 Aug 2023 11:16:39 -0400 From: Mark Johnston To: tuexen@freebsd.org Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: b279e84a47dd - main - sctp: improve consistency Message-ID: References: <202307282203.36SM3C98056354@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 4RHTp43KKlz3RTS X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] On Fri, Aug 04, 2023 at 03:53:31PM +0200, tuexen@freebsd.org wrote: > > On 4. Aug 2023, at 15:03, Kristof Provost wrote: > > > > On 29 Jul 2023, at 0:03, Michael Tuexen wrote: > > The branch main has been updated by tuexen: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b279e84a47ddb59e55b5a3cec31c51cd41bf0dc3 > > commit b279e84a47ddb59e55b5a3cec31c51cd41bf0dc3 > > Author: Michael Tuexen > > AuthorDate: 2023-07-28 12:36:11 +0000 > > Commit: Michael Tuexen > > CommitDate: 2023-07-28 12:36:11 +0000 > > sctp: improve consistency > > This is simplifying a patch to address PR 260116. > > PR: 260116 > > MFC after: 1 week > > It looks like this commit (or maybe the next one, c620788150d274c09a070ab486602c98407d73b0) causes a panic in the SCTP code during the sys/netpfil/pf/sctp:basic_v4 test: > > panic: Counter goes negative > > cpuid = 7 > > time = 1691145655 > > KDB: stack backtrace: > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe026ea9a3a0 > > vpanic() at vpanic+0x132/frame 0xfffffe026ea9a4d0 > > panic() at panic+0x43/frame 0xfffffe026ea9a530 > > sctp_abort_notification() at sctp_abort_notification/frame 0xfffffe026ea9a540 > > sctp_express_handle_sack() at sctp_express_handle_sack+0x647/frame 0xfffffe026ea9a640 > > sctp_process_control() at sctp_process_control+0xf62/frame 0xfffffe026ea9a990 > > sctp_common_input_processing() at sctp_common_input_processing+0x561/frame 0xfffffe026ea9ab10 > > sctp_input_with_port() at sctp_input_with_port+0x1fa/frame 0xfffffe026ea9abe0 > > sctp_input() at sctp_input+0x10/frame 0xfffffe026ea9abf0 > > ip_input() at ip_input+0x2ab/frame 0xfffffe026ea9ac50 > > netisr_dispatch_src() at netisr_dispatch_src+0xad/frame 0xfffffe026ea9acb0 > > ether_demux() at ether_demux+0x17a/frame 0xfffffe026ea9ace0 > > ether_nh_input() at ether_nh_input+0x39f/frame 0xfffffe026ea9ad30 > > netisr_dispatch_src() at netisr_dispatch_src+0xad/frame 0xfffffe026ea9ad90 > > ether_input() at ether_input+0xd9/frame 0xfffffe026ea9adf0 > > epair_tx_start_deferred() at epair_tx_start_deferred+0xd7/frame 0xfffffe026ea9ae40 > > taskqueue_run_locked() at taskqueue_run_locked+0xab/frame 0xfffffe026ea9aec0 > > taskqueue_thread_loop() at taskqueue_thread_loop+0xd3/frame 0xfffffe026ea9aef0 > > fork_exit() at fork_exit+0x82/frame 0xfffffe026ea9af30 > > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe026ea9af30 > > --- trap 0, rip = 0x35c39ec8bda0, rsp = 0, rbp = 0x35c39ec8ec90 --- > > KDB: enter: panic > > > > That seems to be panicking during SCTP packet handling, so I do not believe this to be a pf bug. > > Reverting both commits avoids the problem. > > It’s also failing during the CI tests: https://ci.freebsd.org/view/Test/job/FreeBSD-main-amd64-test/23957/console > > (To reproduce, kldload pf sctp ; cd /usr/tests/sys/netpfil/pf ; sudo kyua test sctp:basic_v4). > Thank you very much for that line!! > > I think I know what the problem is. It comes down to an inconsistent handling of shutdown() calls. > This results in inconsistent sb_ccc / sb_acc values which are now caught. > > I'm working on a patch which also fixes several syzkaller issues. Using the above line, I'll also make > sure it fixes the issue you are observing. Should be fixed by Monday. In the meantime, it's impossible to run through the test suite. Would it be possible to revert the offending commit(s) until a bug fix is ready? From nobody Fri Aug 4 15:24:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHTyj2HZcz4Tm6L; Fri, 4 Aug 2023 15:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHTyj1tSzz3SWw; Fri, 4 Aug 2023 15:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691162653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZZE18FDrdrwfV2tf01H2jdfOHmCC3oXPketdxrfH8c=; b=PkGkL9vnstJEe1Jxrb71QU01okhI//xNX0MBEYxWe0c1uLnO4fHkmmX7jf8zz5Ziv6YbbM tmdTqB0kT5tSIuk7RJrBWEhwiIIBLQ0FRc3CrcQD8VuUZXDKcP/xT9DD47KysLH6RdjF8W T7kI9UOm6LfNc8XsrdwCKx5JRjfMYDmXTTgdpUL2WbWC5wXUOJJwGgnME8fzMt8135exgC qfSiTpSq9osaJsmA+mQ0mg5j3Hm2Enuks9XepgkezGhIMo0aDCPlJfTwPUGwAiLwcjNwbm 2/FxVRmugGO6oJ5vF0T55+vUnNwRA7PpxBvP5+yPE/zDnGQVDJ0SHh7R3sqYPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691162653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZZE18FDrdrwfV2tf01H2jdfOHmCC3oXPketdxrfH8c=; b=iLd/lMzFABb9JXJTWMx5pwPHAnvJ7X+EbfqgPm9ROwaHrq88OricwAFD+vSYfOUfbCPXs2 npcm02F/xhGJsFFY8qUbcvxm+wK/bPhernLsYnjjPT7ibYjg5g9PhpLV1x0R0Z/5oPHfnl LHMExEcmzCfQmU5x8BfOxNA3rhnRlyiIUDIkK0rBHOK3w6c8BQiPKPkveCdUVrBMXW2YCQ g0tUpAtCyHuTsheEfCQke3jOPHB6fm+o0qVJYn589sqUHUiUmKh5zO/qMQ4vIbZKHYHCgs RprnBnfhHwbeBR3UfMdjaRpBbGRsiGEyU0aEEpZkP+eStTr5ak2INfilfnA6ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691162653; a=rsa-sha256; cv=none; b=yfBZkTppwpbt7cMtYORXEhZtTJ3/zsfUYaIuVi8H1mlXvoDb5CwJxrm00ZqeCk0Xb8bZnL JGXIhLLMuPC0hc0oFLW8qviEqJRUu/YGiT3CsubU0qnXepaS3tOCs4eem3uFaT4UUTe/RV PSyeQ05hHqy8WkNuW2gCqjGno9oOCo1wLFSc+BDR8aNfdRalma/ldlHlhG5+14ZiNeg5Lz h27Wpi4qcalRdYVnzn4C70MO4X754243Ng94QcvBOFGAQq7jTUnHVUiszaRMiaioPN4EuF DORhGiyWzkr/QLP2zN8xA1oxAP6A1RHy3nDFBqQlImYS1G+xFzHbtzH6jOrM/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHTyj0zXYz16yj; Fri, 4 Aug 2023 15:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374FODEw025588; Fri, 4 Aug 2023 15:24:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374FODwJ025587; Fri, 4 Aug 2023 15:24:13 GMT (envelope-from git) Date: Fri, 4 Aug 2023 15:24:13 GMT Message-Id: <202308041524.374FODwJ025587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 301e69218ccb - main - ncthwm: Use `sysctl_handle_16` to match CTLTYPE_U16 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 301e69218ccbc314830fb989c852ae74ef2073d9 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=301e69218ccbc314830fb989c852ae74ef2073d9 commit 301e69218ccbc314830fb989c852ae74ef2073d9 Author: Stéphane Rochoy AuthorDate: 2023-08-04 09:31:33 +0000 Commit: Ed Maste CommitDate: 2023-08-04 15:23:42 +0000 ncthwm: Use `sysctl_handle_16` to match CTLTYPE_U16 Pull Request: https://github.com/freebsd/freebsd-src/pull/810 --- sys/dev/ncthwm/ncthwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ncthwm/ncthwm.c b/sys/dev/ncthwm/ncthwm.c index b62dff68f171..813b8474bdef 100644 --- a/sys/dev/ncthwm/ncthwm.c +++ b/sys/dev/ncthwm/ncthwm.c @@ -158,7 +158,7 @@ ncthwm_query_fan_speed(SYSCTL_HANDLER_ARGS) NCTHWM_VERBOSE_PRINTF(sc->dev, "%s: read %u from bank %u offset 0x%x-0x%x\n", fan->name, val, sc->nctdevp->fan_bank, fan->high_byte_offset, fan->low_byte_offset); - return (sysctl_handle_int(oidp, &val, 0, req)); + return (sysctl_handle_16(oidp, &val, 0, req)); } static int From nobody Fri Aug 4 15:28:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHV3Q2mQPz4TlnG; Fri, 4 Aug 2023 15:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHV3Q1c8wz3SwP; Fri, 4 Aug 2023 15:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691162898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ad8VoCxACzbDLz+dlGUNymwefAuGGybYs8MPp5xhhOI=; b=pGX93VDZ9QVYQnEOl8zRFnZmEachhYAjjHoYrDKmTnD1terUryWm9+VMLsVdPzvrLLKZJL cXGhkETT+7uvPVkAPTWXOFaGBlfe5/GmL7/jqO/meFZEY8Uban0FgUiTTzsADTKPtYrHF/ 7+cygRplZEk/4wi04V3reoEId4D92OYLyGMi3btYIVrk94u6YT8L0z7X0BrxLjcuIrRXUX CQgUp4gkU8t11T9SZQpB/79n54yx6bhHGULBG2dfeaLbL+nN1nixDDj/VUHI3C+9/0Baq1 NQNU1rfsexemWx1vk9cnGh8ZpvIH6txX17gfzJy93+ZGZdhDTxc/jjJigIB6PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691162898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ad8VoCxACzbDLz+dlGUNymwefAuGGybYs8MPp5xhhOI=; b=am5WsDY2cyoO02/RzFJIOs+ncMYKShi+517cUhCK02EIkkVP7pgr7wprEqc5k+CGpNVCKJ 927sREfsPjFC0YKKYXksxN6eEJOn9wpSGsvZe/QvBHBO1WsD+CkpaGWLMVCXf12RaQ3h31 7ppO8zug7pacmbamZKJFzQyWtQoanSRfEQ3YFMhbm4ix2K3jy1uTM4b/RQ6U8hQ2YQ1wMR Djoo7Kpt6rLhpJU71dqlWJF7UovjmR8Qlzpa7is5PCntLryNtpr+aPZM33c0xn0QIdA5LW glIlh8zi5Cg1OOQXOluotJ0GX8n2RpddC1wG5rraFmPVHQ0aA/Ts5UR/FduLwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691162898; a=rsa-sha256; cv=none; b=KRQGNimWo9P6acSVhaB5TKqoLo9Z1Y0zP1ryxqtW7FCPRCR0FT+QWyc8fhdjg2g38H1U+/ LDjXGgopPcW2qdvbUiZNlSaw8qW2RrCTbaGqJqZlnoXQKpv41O4q71Y+XhDdQKJSV0H6Ss IpgSEZaO42FmJgTTrtntAjNHiE2+h7GYCrYL+p2Ys/wibV6PMablD8GEv+GZnYxyj0CUX9 gvZaC6evPNlh28mEnG3pjsoKaOpx9r3cIoEQXwYY3ZE2aDH8dZDvlHJ/Ed/1mVxD+NXO24 AKcdMF1axX+lqteXnhxBSWAhLjqOBtZ81BYq0OB39vNQbyDR17nKOw8FXbZ0Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHV3Q0fxKz16yl; Fri, 4 Aug 2023 15:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374FSI9K026270; Fri, 4 Aug 2023 15:28:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374FSI0S026269; Fri, 4 Aug 2023 15:28:18 GMT (envelope-from git) Date: Fri, 4 Aug 2023 15:28:18 GMT Message-Id: <202308041528.374FSI0S026269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 8e4aa6317eb8 - main - nctgpio: Enable all the 9 groups for NCT6116D and remove FIXMEs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e4aa6317eb8145a8a9f6a61e235d13302cd13e3 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8e4aa6317eb8145a8a9f6a61e235d13302cd13e3 commit 8e4aa6317eb8145a8a9f6a61e235d13302cd13e3 Author: Stéphane Rochoy AuthorDate: 2023-07-04 13:57:08 +0000 Commit: Ed Maste CommitDate: 2023-08-04 15:27:54 +0000 nctgpio: Enable all the 9 groups for NCT6116D and remove FIXMEs Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/810 --- sys/dev/nctgpio/nctgpio.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/dev/nctgpio/nctgpio.c b/sys/dev/nctgpio/nctgpio.c index 07208e0fbd90..393553aae227 100644 --- a/sys/dev/nctgpio/nctgpio.c +++ b/sys/dev/nctgpio/nctgpio.c @@ -637,7 +637,7 @@ struct nct_device { { .devid = 0xd282, .descr = "GPIO on Nuvoton NCT6112D/NCT6114D/NCT6116D", - .ngroups = 2, + .ngroups = 9, .groups = { { .grpnum = 0, @@ -646,7 +646,7 @@ struct nct_device { .enable_reg = 0x30, .enable_mask = 0x01, .data_ldn = 0x07, - .ppod_reg = 0xe0, /* FIXME Need to check for this group. */ + .ppod_reg = 0xe0, .caps = NCT_GPIO_CAPS, .npins = 8, .iobase = 0xe0, @@ -658,7 +658,7 @@ struct nct_device { .enable_reg = 0x30, .enable_mask = 0x02, .data_ldn = 0x07, - .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .ppod_reg = 0xe1, .caps = NCT_GPIO_CAPS, .npins = 8, .iobase = 0xe4, @@ -670,7 +670,7 @@ struct nct_device { .enable_reg = 0x30, .enable_mask = 0x04, .data_ldn = 0x07, - .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .ppod_reg = 0xe1, .caps = NCT_GPIO_CAPS, .npins = 8, .iobase = 0xe8, @@ -682,7 +682,7 @@ struct nct_device { .enable_reg = 0x30, .enable_mask = 0x08, .data_ldn = 0x07, - .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .ppod_reg = 0xe1, .caps = NCT_GPIO_CAPS, .npins = 8, .iobase = 0xec, @@ -694,7 +694,7 @@ struct nct_device { .enable_reg = 0x30, .enable_mask = 0x10, .data_ldn = 0x07, - .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .ppod_reg = 0xe1, .caps = NCT_GPIO_CAPS, .npins = 8, .iobase = 0xf0, @@ -706,7 +706,7 @@ struct nct_device { .enable_reg = 0x30, .enable_mask = 0x20, .data_ldn = 0x07, - .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .ppod_reg = 0xe1, .caps = NCT_GPIO_CAPS, .npins = 8, .iobase = 0xf4, @@ -718,7 +718,7 @@ struct nct_device { .enable_reg = 0x30, .enable_mask = 0x40, .data_ldn = 0x07, - .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .ppod_reg = 0xe1, .caps = NCT_GPIO_CAPS, .npins = 8, .iobase = 0xf8, @@ -730,7 +730,7 @@ struct nct_device { .enable_reg = 0x30, .enable_mask = 0x80, .data_ldn = 0x07, - .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .ppod_reg = 0xe1, .caps = NCT_GPIO_CAPS, .npins = 8, .iobase = 0xfc, @@ -742,7 +742,7 @@ struct nct_device { .enable_reg = 0x30, .enable_mask = 0x01, .data_ldn = 0x09, - .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .ppod_reg = 0xe1, .caps = NCT_GPIO_CAPS, .npins = 8, .iobase = 0xf0, From nobody Fri Aug 4 16:08:53 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHVyF5wqHz4Tpj1; Fri, 4 Aug 2023 16:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHVyF5KCNz3YVf; Fri, 4 Aug 2023 16:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691165333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=31lW/J+xUmpOGahz+vV27xfacGmmY7QpArfsOpWqZRE=; b=Gsf2PEhAR6kk/IRCeZEL+uy9CG2f4ASBW9G/hHAXVO/pxswBHJ0cpdInqDqn0ZHATjyA7V Mfc6EaJLccxS1FHixXv/Va59IBgB5Cxrlt8ZncLn/KovLX0h99U9x5SNcY70Ts6/LIu8DW a2eeTSapCJjymk7UwPie8Orm+9lSfbxCet/QSworPBMSFLTORQZxmg7DwnDG3I1eeNzP7P 8ZwLILHAzqL9Uo+Z+QIKgS/RII499E3udSeuXiodAYhin76WOh/WP01AXyZfd1E5HOlUKH v7ek2JRpIoy4kdKMvy9OC7yboQxJFwHIJHrr0I763FZexzKRxdm+6rUUX42lsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691165333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=31lW/J+xUmpOGahz+vV27xfacGmmY7QpArfsOpWqZRE=; b=M42amH7iKFp5xMWUZP2GGGiBS+1N0vX4IwlUZJcyYcT6M78yIJGIZDAdhzP2NPxj6aAFSu Nj4zR0I5mjsvzMoUjvMHtPDFupgom8CmBiJMT01HcTsnKHJ4Zit5QO5wQwmXh2mv36VICH HH0PthTUXh1anKh5ihDtaL6JqbFb3wyKz2Nidl3Gx1iWEgRQU+NaTcVNA51G9mQC1xbEfB U8SjPruzZbNTkZldivpCldFBldSWjF1OkKhD+ufiL+kGS6HPVWj/gcOgOzjPlOCnQNeCip +NAz3qsImx0y+Cr6wgw6sST0gK3b81klopCdxeO+o25ZOGwVKNy2/l7SAjdyhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691165333; a=rsa-sha256; cv=none; b=ZtHZGZX1pooot3E6rASIFmE5Svn+/EP1IV4w2KEZyRDwGWYapxs7JbXv9upvvZ/PN7Fyib sLw2yljw7MgMHXm+dd5HFrzMUt6YXKH1MDR4OMe0JKeXg3Xzc3Zkfy5ratcQGh2ga2Mzt9 vk08nSh1/339uDgllNTE4QbN3TC3EuPoSbbrEi1stDM/gf0uEVHAUgpMDfnHPBagEeIyrz LlE5qhfDJSIkMuGWIV2cE/Kcz/R2UXchzgDumaXtcAVqw5gCQrUOMe/IY4cS99HgNjTenn JLW1QSv1HlTudRT6VLBPZ6QJBgylpIZVIgMgOitGw12ZEAIUjCLDfW8UMlCCdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHVyF4LXkz17gg; Fri, 4 Aug 2023 16:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374G8rpT093962; Fri, 4 Aug 2023 16:08:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374G8rfc093961; Fri, 4 Aug 2023 16:08:53 GMT (envelope-from git) Date: Fri, 4 Aug 2023 16:08:53 GMT Message-Id: <202308041608.374G8rfc093961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: acc7cf8641dc - main - pam_krb5: Clarify a loop condition. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acc7cf8641dcedad295ff0e569c3f3a28939ada0 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=acc7cf8641dcedad295ff0e569c3f3a28939ada0 commit acc7cf8641dcedad295ff0e569c3f3a28939ada0 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-04 16:08:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-04 16:08:37 +0000 pam_krb5: Clarify a loop condition. The closing parenthesis was in the wrong location, so instead of assigning the return value to krbret and then comparing it to zero, we were assigning the result of the comparison to krbret and then comparing that to zero. This has no practical significance since the value is not used after the loop terminates. PR: 229719 Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D41299 --- lib/libpam/modules/pam_krb5/pam_krb5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.c b/lib/libpam/modules/pam_krb5/pam_krb5.c index 3c7976297ed2..378de46d769f 100644 --- a/lib/libpam/modules/pam_krb5/pam_krb5.c +++ b/lib/libpam/modules/pam_krb5/pam_krb5.c @@ -576,8 +576,7 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, PAM_LOG("Prepared for iteration"); /* Copy the creds (should be two of them) */ - while ((krbret = krb5_cc_next_cred(pam_context, ccache_temp, - &cursor, &creds) == 0)) { + while (krb5_cc_next_cred(pam_context, ccache_temp, &cursor, &creds) == 0) { krbret = krb5_cc_store_cred(pam_context, ccache_perm, &creds); if (krbret != 0) { PAM_LOG_KRB5_ERR(pam_context, krbret, From nobody Fri Aug 4 16:08:54 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHVyG6C3yz4Tpg6; Fri, 4 Aug 2023 16:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHVyG5qsTz3Yhm; Fri, 4 Aug 2023 16:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691165334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdGbDjX9vvN0FvOAGf0t0njzCMYHybcOQHsBhXKn8wk=; b=k7iLgGutbHTSge1SKrJGFPy79L4nH5VXuCq+FD1K+uVQKLRIzGB8ZfYbqocK+TD4Ut4iJr h9H3V7lZwjbjBwxZhw++Te1rO1Gzrmn1HhO3qLBsAa+jbsiCtOq8XAhTnTdjl3fLwl6zrI ryE/ZQOUeOG30BKpIXeYEP4NPEivUsoDCWQm9Qmk2E3jFY8wX6AR6YM+kUuwH82XkbvCEI pZiw76Z2kqZAd+oy2JChKARYob7mbsVlBpYkUwwU5pWhuvCClmVFESyi2IuyVSZSIAMI9L YwhxZpyZrkyKFpV1k7/P55LijLbQB2nuKQqVPPvagTv+E62b5zZ4ojfQCmnzJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691165334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdGbDjX9vvN0FvOAGf0t0njzCMYHybcOQHsBhXKn8wk=; b=JU8e4TLpCM9yEAtdkL6XE/vZPy9uqE3TSi8OhyacF8xRCQWRWN82jDg5URT63tfOpZTmVk znCUudc5q/54hwkXrDOMlvJxXRIoKaiyyJE107TlaHRF0+W/5+O0o6EUTkCCk43oIn9SzY FJVvd3/hdc0+lCPBF0qMZM2yVETppkHm/aZr4LLHakwJT93zf2dIR8WgdThvOkw7JzN+/N OwWLOolCyY9dYu4v0lpxTPgMNC2zGxBduHXeNZVRnDGtzYul1UKNRm5ZgnMB+nukmsaxXu 282jOTshxv5UJGGkhLib41tBNLWxiV1Ob8JDku1zDzv2Npbma8uaNIr87pMcMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691165334; a=rsa-sha256; cv=none; b=ue9WPbXpwrbSmEvOnit0AQCmrUK0SzmpRgC8zpslVAT8wrYyP9ehRmddaZsObVeXLAP48U Fctev0mTNYbjkT3Jm3ykn9RC2AzkcYivs/ag/CuTQABR3gT3Y1VyBbyve7eAY6ZGgJ47Z9 RGxUPzi7Xfl/TJH7qFDibwrtMkcc+XOcVK9xJnTO6HTn7xnb0TAn0kUfmPOveT+lFlOoxX UlqRiP29bGeExB2d+yhLUPemI+jJ4cmT7C2p3fv3+m+6NssDiO5DY1sVYuvAk9c1s8u/Ea 4ua30mmrybbVeyaQxFp5OkR79ZP5AXADC1owm0JXXBmPjXZc/40/8pm5lUF+Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHVyG4xZqz180q; Fri, 4 Aug 2023 16:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374G8sGF093996; Fri, 4 Aug 2023 16:08:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374G8shS093995; Fri, 4 Aug 2023 16:08:54 GMT (envelope-from git) Date: Fri, 4 Aug 2023 16:08:54 GMT Message-Id: <202308041608.374G8shS093995@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 9c2823bae92c - main - pam_krb5: Rename a variable. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c2823bae92c09e5356623118da2777bc3ed521d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9c2823bae92c09e5356623118da2777bc3ed521d commit 9c2823bae92c09e5356623118da2777bc3ed521d Author: Dag-Erling Smørgrav AuthorDate: 2023-08-04 16:08:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-04 16:08:38 +0000 pam_krb5: Rename a variable. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D41300 --- lib/libpam/modules/pam_krb5/pam_krb5.c | 180 ++++++++++++++++----------------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.c b/lib/libpam/modules/pam_krb5/pam_krb5.c index 378de46d769f..ef39fe8acb22 100644 --- a/lib/libpam/modules/pam_krb5/pam_krb5.c +++ b/lib/libpam/modules/pam_krb5/pam_krb5.c @@ -114,7 +114,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, int argc __unused, const char *argv[] __unused) { krb5_error_code krbret; - krb5_context pam_context; + krb5_context krbctx; int debug; const char *auth_service; krb5_principal auth_princ; @@ -154,7 +154,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, goto cleanup6; } - krbret = krb5_init_context(&pam_context); + krbret = krb5_init_context(&krbctx); if (krbret != 0) { PAM_VERBOSE_ERROR("Kerberos 5 error"); retval = PAM_SERVICE_ERR; @@ -164,7 +164,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, PAM_LOG("Context initialised"); debug = openpam_get_option(pamh, PAM_OPT_DEBUG) ? 1 : 0; - krbret = verify_krb_v5_tgt_begin(pam_context, srvdup, debug, + krbret = verify_krb_v5_tgt_begin(krbctx, srvdup, debug, &auth_service, &auth_princ, auth_phost); if (krbret != 0) { /* failed to find key */ /* Keytab or service key does not exist */ @@ -180,7 +180,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, } } - krbret = krb5_cc_register(pam_context, &krb5_mcc_ops, FALSE); + krbret = krb5_cc_register(krbctx, &krb5_mcc_ops, FALSE); if (krbret != 0 && krbret != KRB5_CC_TYPE_EXISTS) { PAM_VERBOSE_ERROR("Kerberos 5 error"); retval = PAM_SERVICE_ERR; @@ -197,10 +197,10 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, PAM_LOG("Created principal: %s", principal); - krbret = krb5_parse_name(pam_context, principal, &princ); + krbret = krb5_parse_name(krbctx, principal, &princ); free(principal); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, "Error krb5_parse_name()"); + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_parse_name()"); PAM_VERBOSE_ERROR("Kerberos 5 error"); retval = PAM_SERVICE_ERR; goto cleanup3; @@ -210,9 +210,9 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, /* Now convert the principal name into something human readable */ princ_name = NULL; - krbret = krb5_unparse_name(pam_context, princ, &princ_name); + krbret = krb5_unparse_name(krbctx, princ, &princ_name); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_unparse_name()"); PAM_VERBOSE_ERROR("Kerberos 5 error"); retval = PAM_SERVICE_ERR; @@ -235,11 +235,11 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, /* Verify the local user exists (AFTER getting the password) */ if (strchr(user, '@')) { /* get a local account name for this principal */ - krbret = krb5_aname_to_localname(pam_context, princ, + krbret = krb5_aname_to_localname(krbctx, princ, sizeof(luser), luser); if (krbret != 0) { PAM_VERBOSE_ERROR("Kerberos 5 error"); - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_aname_to_localname()"); retval = PAM_USER_UNKNOWN; goto cleanup2; @@ -264,15 +264,15 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, } /* Initialize credentials request options. */ - krbret = krb5_get_init_creds_opt_alloc(pam_context, &opts); + krbret = krb5_get_init_creds_opt_alloc(krbctx, &opts); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_get_init_creds_opt_alloc()"); PAM_VERBOSE_ERROR("Kerberos 5 error"); retval = PAM_SERVICE_ERR; goto cleanup2; } - krb5_get_init_creds_opt_set_default_flags(pam_context, + krb5_get_init_creds_opt_set_default_flags(krbctx, service, NULL, opts); if (openpam_get_option(pamh, PAM_OPT_FORWARDABLE)) @@ -282,12 +282,12 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, /* Get a TGT */ memset(&creds, 0, sizeof(krb5_creds)); - krbret = krb5_get_init_creds_password(pam_context, &creds, princ, + krbret = krb5_get_init_creds_password(krbctx, &creds, princ, pass, NULL, pamh, 0, NULL, opts); - krb5_get_init_creds_opt_free(pam_context, opts); + krb5_get_init_creds_opt_free(krbctx, opts); if (krbret != 0) { PAM_VERBOSE_ERROR("Kerberos 5 error"); - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_get_init_creds_password()"); retval = PAM_AUTH_ERR; goto cleanup2; @@ -296,28 +296,28 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, PAM_LOG("Got TGT"); /* Generate a temporary cache */ - krbret = krb5_cc_new_unique(pam_context, krb5_cc_type_memory, NULL, &ccache); + krbret = krb5_cc_new_unique(krbctx, krb5_cc_type_memory, NULL, &ccache); if (krbret != 0) { PAM_VERBOSE_ERROR("Kerberos 5 error"); - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_new_unique()"); retval = PAM_SERVICE_ERR; goto cleanup; } - krbret = krb5_cc_initialize(pam_context, ccache, princ); + krbret = krb5_cc_initialize(krbctx, ccache, princ); if (krbret != 0) { PAM_VERBOSE_ERROR("Kerberos 5 error"); - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_initialize()"); retval = PAM_SERVICE_ERR; goto cleanup; } - krbret = krb5_cc_store_cred(pam_context, ccache, &creds); + krbret = krb5_cc_store_cred(krbctx, ccache, &creds); if (krbret != 0) { PAM_VERBOSE_ERROR("Kerberos 5 error"); - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_store_cred()"); - krb5_cc_destroy(pam_context, ccache); + krb5_cc_destroy(krbctx, ccache); retval = PAM_SERVICE_ERR; goto cleanup; } @@ -325,14 +325,14 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, PAM_LOG("Credentials stashed"); /* Verify them */ - krbret = verify_krb_v5_tgt(pam_context, ccache, srvdup, + krbret = verify_krb_v5_tgt(krbctx, ccache, srvdup, debug, auth_service, auth_princ, auth_phost); free(srvdup); srvdup = NULL; if (krbret == -1) { PAM_VERBOSE_ERROR("Kerberos 5 error"); - krb5_cc_destroy(pam_context, ccache); + krb5_cc_destroy(krbctx, ccache); retval = PAM_AUTH_ERR; goto cleanup; } @@ -341,7 +341,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, retval = pam_get_data(pamh, "ccache", &ccache_data); if (retval == PAM_SUCCESS) { - krb5_cc_destroy(pam_context, ccache); + krb5_cc_destroy(krbctx, ccache); PAM_VERBOSE_ERROR("Kerberos 5 error"); retval = PAM_AUTH_ERR; goto cleanup; @@ -349,8 +349,8 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, PAM_LOG("Credentials stash not pre-existing"); - asprintf(&ccache_name, "%s:%s", krb5_cc_get_type(pam_context, - ccache), krb5_cc_get_name(pam_context, ccache)); + asprintf(&ccache_name, "%s:%s", krb5_cc_get_type(krbctx, + ccache), krb5_cc_get_name(krbctx, ccache)); if (ccache_name == NULL) { PAM_VERBOSE_ERROR("Kerberos 5 error"); retval = PAM_BUF_ERR; @@ -358,7 +358,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, } retval = pam_set_data(pamh, "ccache", ccache_name, cleanup_cache); if (retval != 0) { - krb5_cc_destroy(pam_context, ccache); + krb5_cc_destroy(krbctx, ccache); PAM_VERBOSE_ERROR("Kerberos 5 error"); retval = PAM_SERVICE_ERR; goto cleanup; @@ -367,21 +367,21 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, PAM_LOG("Credentials stash saved"); cleanup: - krb5_free_cred_contents(pam_context, &creds); + krb5_free_cred_contents(krbctx, &creds); PAM_LOG("Done cleanup"); cleanup2: - krb5_free_principal(pam_context, princ); + krb5_free_principal(krbctx, princ); if (princ_name) free(princ_name); PAM_LOG("Done cleanup2"); cleanup3: - krb5_free_context(pam_context); + krb5_free_context(krbctx); PAM_LOG("Done cleanup3"); cleanup4: - verify_krb_v5_tgt_cleanup(pam_context, debug, + verify_krb_v5_tgt_cleanup(krbctx, debug, auth_service, auth_princ, auth_phost); PAM_LOG("Done cleanup4"); @@ -407,7 +407,7 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, #else krb5_error_code krbret; - krb5_context pam_context; + krb5_context krbctx; krb5_principal princ; krb5_creds creds; krb5_ccache ccache_temp, ccache_perm; @@ -448,7 +448,7 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, PAM_LOG("Got user: %s", (const char *)user); - krbret = krb5_init_context(&pam_context); + krbret = krb5_init_context(&krbctx); if (krbret != 0) { PAM_LOG("Error krb5_init_context() failed"); return (PAM_SERVICE_ERR); @@ -467,9 +467,9 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, retval = PAM_CRED_UNAVAIL; goto cleanup3; } - krbret = krb5_cc_resolve(pam_context, cache_data, &ccache_temp); + krbret = krb5_cc_resolve(krbctx, cache_data, &ccache_temp); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_resolve(\"%s\")", (const char *)cache_data); retval = PAM_SERVICE_ERR; goto cleanup3; @@ -540,22 +540,22 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, PAM_LOG("Got cache_name: %s", cache_name); /* Initialize the new ccache */ - krbret = krb5_cc_get_principal(pam_context, ccache_temp, &princ); + krbret = krb5_cc_get_principal(krbctx, ccache_temp, &princ); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_get_principal()"); retval = PAM_SERVICE_ERR; goto cleanup3; } - krbret = krb5_cc_resolve(pam_context, cache_name, &ccache_perm); + krbret = krb5_cc_resolve(krbctx, cache_name, &ccache_perm); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, "Error krb5_cc_resolve()"); + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_resolve()"); retval = PAM_SERVICE_ERR; goto cleanup2; } - krbret = krb5_cc_initialize(pam_context, ccache_perm, princ); + krbret = krb5_cc_initialize(krbctx, ccache_perm, princ); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_initialize()"); retval = PAM_SERVICE_ERR; goto cleanup2; @@ -564,11 +564,11 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, PAM_LOG("Cache initialised"); /* Prepare for iteration over creds */ - krbret = krb5_cc_start_seq_get(pam_context, ccache_temp, &cursor); + krbret = krb5_cc_start_seq_get(krbctx, ccache_temp, &cursor); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_start_seq_get()"); - krb5_cc_destroy(pam_context, ccache_perm); + krb5_cc_destroy(krbctx, ccache_perm); retval = PAM_SERVICE_ERR; goto cleanup2; } @@ -576,27 +576,27 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, PAM_LOG("Prepared for iteration"); /* Copy the creds (should be two of them) */ - while (krb5_cc_next_cred(pam_context, ccache_temp, &cursor, &creds) == 0) { - krbret = krb5_cc_store_cred(pam_context, ccache_perm, &creds); + while (krb5_cc_next_cred(krbctx, ccache_temp, &cursor, &creds) == 0) { + krbret = krb5_cc_store_cred(krbctx, ccache_perm, &creds); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_store_cred()"); - krb5_cc_destroy(pam_context, ccache_perm); - krb5_free_cred_contents(pam_context, &creds); + krb5_cc_destroy(krbctx, ccache_perm); + krb5_free_cred_contents(krbctx, &creds); retval = PAM_SERVICE_ERR; goto cleanup2; } - krb5_free_cred_contents(pam_context, &creds); + krb5_free_cred_contents(krbctx, &creds); PAM_LOG("Iteration"); } - krb5_cc_end_seq_get(pam_context, ccache_temp, &cursor); + krb5_cc_end_seq_get(krbctx, ccache_temp, &cursor); PAM_LOG("Done iterating"); if (strstr(cache_name, "FILE:") == cache_name) { if (chown(&cache_name[5], pwd->pw_uid, pwd->pw_gid) == -1) { PAM_LOG("Error chown(): %s", strerror(errno)); - krb5_cc_destroy(pam_context, ccache_perm); + krb5_cc_destroy(krbctx, ccache_perm); retval = PAM_SERVICE_ERR; goto cleanup2; } @@ -604,21 +604,21 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, if (chmod(&cache_name[5], (S_IRUSR | S_IWUSR)) == -1) { PAM_LOG("Error chmod(): %s", strerror(errno)); - krb5_cc_destroy(pam_context, ccache_perm); + krb5_cc_destroy(krbctx, ccache_perm); retval = PAM_SERVICE_ERR; goto cleanup2; } PAM_LOG("Done chmod()"); } - krb5_cc_close(pam_context, ccache_perm); + krb5_cc_close(krbctx, ccache_perm); PAM_LOG("Cache closed"); retval = pam_setenv(pamh, "KRB5CCNAME", cache_name, 1); if (retval != PAM_SUCCESS) { PAM_LOG("Error pam_setenv(): %s", pam_strerror(pamh, retval)); - krb5_cc_destroy(pam_context, ccache_perm); + krb5_cc_destroy(krbctx, ccache_perm); retval = PAM_SERVICE_ERR; goto cleanup2; } @@ -626,10 +626,10 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, PAM_LOG("Environment done: KRB5CCNAME=%s", cache_name); cleanup2: - krb5_free_principal(pam_context, princ); + krb5_free_principal(krbctx, princ); PAM_LOG("Done cleanup2"); cleanup3: - krb5_free_context(pam_context); + krb5_free_context(krbctx); PAM_LOG("Done cleanup3"); seteuid(euid); @@ -652,7 +652,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, int argc __unused, const char *argv[] __unused) { krb5_error_code krbret; - krb5_context pam_context; + krb5_context krbctx; krb5_ccache ccache; krb5_principal princ; int retval; @@ -671,7 +671,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, PAM_LOG("Got credentials"); - krbret = krb5_init_context(&pam_context); + krbret = krb5_init_context(&krbctx); if (krbret != 0) { PAM_LOG("Error krb5_init_context() failed"); return (PAM_PERM_DENIED); @@ -679,20 +679,20 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, PAM_LOG("Context initialised"); - krbret = krb5_cc_resolve(pam_context, (const char *)ccache_name, &ccache); + krbret = krb5_cc_resolve(krbctx, (const char *)ccache_name, &ccache); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_resolve(\"%s\")", (const char *)ccache_name); - krb5_free_context(pam_context); + krb5_free_context(krbctx); return (PAM_PERM_DENIED); } PAM_LOG("Got ccache %s", (const char *)ccache_name); - krbret = krb5_cc_get_principal(pam_context, ccache, &princ); + krbret = krb5_cc_get_principal(krbctx, ccache, &princ); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_cc_get_principal()"); retval = PAM_PERM_DENIED; goto cleanup; @@ -700,16 +700,16 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, PAM_LOG("Got principal"); - if (krb5_kuserok(pam_context, princ, (const char *)user)) + if (krb5_kuserok(krbctx, princ, (const char *)user)) retval = PAM_SUCCESS; else retval = PAM_PERM_DENIED; - krb5_free_principal(pam_context, princ); + krb5_free_principal(krbctx, princ); PAM_LOG("Done kuserok()"); cleanup: - krb5_free_context(pam_context); + krb5_free_context(krbctx); PAM_LOG("Done cleanup"); return (retval); @@ -724,7 +724,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc __unused, const char *argv[] __unused) { krb5_error_code krbret; - krb5_context pam_context; + krb5_context krbctx; krb5_creds creds; krb5_principal princ; krb5_get_init_creds_opt *opts; @@ -743,7 +743,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, PAM_LOG("Got user: %s", (const char *)user); - krbret = krb5_init_context(&pam_context); + krbret = krb5_init_context(&krbctx); if (krbret != 0) { PAM_LOG("Error krb5_init_context() failed"); return (PAM_SERVICE_ERR); @@ -752,9 +752,9 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, PAM_LOG("Context initialised"); /* Get principal name */ - krbret = krb5_parse_name(pam_context, (const char *)user, &princ); + krbret = krb5_parse_name(krbctx, (const char *)user, &princ); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_parse_name()"); retval = PAM_USER_UNKNOWN; goto cleanup3; @@ -762,9 +762,9 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, /* Now convert the principal name into something human readable */ princ_name = NULL; - krbret = krb5_unparse_name(pam_context, princ, &princ_name); + krbret = krb5_unparse_name(krbctx, princ, &princ_name); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_unparse_name()"); retval = PAM_SERVICE_ERR; goto cleanup2; @@ -780,9 +780,9 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, PAM_LOG("Got password"); /* Initialize credentials request options. */ - krbret = krb5_get_init_creds_opt_alloc(pam_context, &opts); + krbret = krb5_get_init_creds_opt_alloc(krbctx, &opts); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_get_init_creds_opt_alloc()"); PAM_VERBOSE_ERROR("Kerberos 5 error"); retval = PAM_SERVICE_ERR; @@ -792,11 +792,11 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, PAM_LOG("Credentials options initialised"); memset(&creds, 0, sizeof(krb5_creds)); - krbret = krb5_get_init_creds_password(pam_context, &creds, princ, + krbret = krb5_get_init_creds_password(krbctx, &creds, princ, pass, NULL, pamh, 0, "kadmin/changepw", opts); - krb5_get_init_creds_opt_free(pam_context, opts); + krb5_get_init_creds_opt_free(krbctx, opts); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_get_init_creds_password()"); retval = PAM_AUTH_ERR; goto cleanup2; @@ -822,11 +822,11 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, retval = PAM_BUF_ERR; goto cleanup; } - krbret = krb5_set_password(pam_context, &creds, passdup, NULL, + krbret = krb5_set_password(krbctx, &creds, passdup, NULL, &result_code, &result_code_string, &result_string); free(passdup); if (krbret != 0) { - PAM_LOG_KRB5_ERR(pam_context, krbret, + PAM_LOG_KRB5_ERR(krbctx, krbret, "Error krb5_change_password()"); retval = PAM_AUTHTOK_ERR; goto cleanup; @@ -845,16 +845,16 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, free(result_code_string.data); cleanup: - krb5_free_cred_contents(pam_context, &creds); + krb5_free_cred_contents(krbctx, &creds); PAM_LOG("Done cleanup"); cleanup2: - krb5_free_principal(pam_context, princ); + krb5_free_principal(krbctx, princ); if (princ_name) free(princ_name); PAM_LOG("Done cleanup2"); cleanup3: - krb5_free_context(pam_context); + krb5_free_context(krbctx); PAM_LOG("Done cleanup3"); @@ -1018,17 +1018,17 @@ verify_krb_v5_tgt_cleanup(krb5_context context, int debug, static void cleanup_cache(pam_handle_t *pamh __unused, void *data, int pam_end_status __unused) { - krb5_context pam_context; + krb5_context krbctx; krb5_ccache ccache; krb5_error_code krbret; - if (krb5_init_context(&pam_context)) + if (krb5_init_context(&krbctx)) return; - krbret = krb5_cc_resolve(pam_context, data, &ccache); + krbret = krb5_cc_resolve(krbctx, data, &ccache); if (krbret == 0) - krb5_cc_destroy(pam_context, ccache); - krb5_free_context(pam_context); + krb5_cc_destroy(krbctx, ccache); + krb5_free_context(krbctx); free(data); } From nobody Fri Aug 4 16:55:26 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHWzy4Ptfz4TrxD; Fri, 4 Aug 2023 16:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHWzy3r04z3ftC; Fri, 4 Aug 2023 16:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691168126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fBtUKKM3Rq2zni3N6ZeJrdmLbAzI9Jb4GvIXR2/8tD0=; b=m47pUgYRKfmV+nJ9oo/2WqzuNhGvF65avT8t4eEhad0eNKOkbpw4SYH4Y9oRZBYCKkzLqV eqzKysc2Ijfo7j3k+rWB9ANi43e8fzWGhgxgaiVTtqbs9r1NXE+QFqo2IGvV11Ph+RmHTg mGcfkz3rfCavpX5f59Iq8QtY3p36lWnbBcPd0RZd+cf01FGcZtcWtScm5ZamRl1xdQHf7x ratKTmrv1ANj142ch0hGK7JDXJEhuzDbnCPNcX8hM2ioqCT2myJuxMBtMwbo96WRw4/vpG 1vRKYpy/1iVHc+R3Mg2NjQWHPpbOMrm6uKO8gfIXhObQb0c29DS4gX4epyc00A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691168126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fBtUKKM3Rq2zni3N6ZeJrdmLbAzI9Jb4GvIXR2/8tD0=; b=nM66V6D+OoYfqyrtEVgaLruuxSrAAZHBL9L2R9YHyb8+nqlPT+e6jT5/NYG6KVSMBRirWJ 6OvczEBH3D4ysSZc3FfWWJOsJhjjPM8NtpQ3xvGcKhEDsoQq9KYD8uL6CdwJW4dISoj/oa CNsZfi5luPQ2OJBrgaEWmB0GnFTe833K53WfDO6l7AC4KQUA36/KFCS0P6Nn9GNpWnamU0 Ch2sa5vnKbgTVeRf43FLqcW7jmZRt9IvyOvJAG9VdPcnVUR/VXpWv441coNeYVPPPGfzeu jBt7Aczbgq3lf9tbHfPWK555WcTC9nuw/DZJN7ZmKKSYLKbwgmAPwOzPRLPywA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691168126; a=rsa-sha256; cv=none; b=YVpLUQIfWQiv+xsJDV9cHji1ag5GJKVgUN/LT9Of6U2XDEQn5gdI8xNoVMT9v3M8aF7CPO xN72dAYB+bDeTsLDJf6CGquhUFLwEy3bDXd1EumfQanKn/XcssqJDl58gvV/Yg89mwW5S8 PKkudLFDNL1lPmi5b25Vtzi9Bnsv+JZk/JWdmlj19VN8wSO1RE949mdgw6uY0dHhLKnnjQ 8F+fdeTeCXIu83AJTwuwJQ0+HFtRxOzEmsmf1b5OZD9T5cDkDAcUBmR19aKVdKvp9yigzE 1bwyEpw24XEHjER3mtxITskqE3YuvaFWcxulrFtkjMzUHaYd20CnG/aKMQWnSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHWzy2tHsz195S; Fri, 4 Aug 2023 16:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374GtQOQ075560; Fri, 4 Aug 2023 16:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374GtQXp075559; Fri, 4 Aug 2023 16:55:26 GMT (envelope-from git) Date: Fri, 4 Aug 2023 16:55:26 GMT Message-Id: <202308041655.374GtQXp075559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 78cc000cbae9 - main - amd64: Increase sanitizers' static shadow memory reservation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78cc000cbae9913e924aee13ec4fd367cb87336e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=78cc000cbae9913e924aee13ec4fd367cb87336e commit 78cc000cbae9913e924aee13ec4fd367cb87336e Author: Mark Johnston AuthorDate: 2023-08-04 16:25:50 +0000 Commit: Mark Johnston CommitDate: 2023-08-04 16:38:24 +0000 amd64: Increase sanitizers' static shadow memory reservation Because KASAN shadows the kernel image itself (KMSAN currently does not), a shadow mapping of the boot stack must be created very early during boot. pmap_san_enter() reserves a fixed number of pages for the purpose of creating and mapping this shadow region. After commit 789df254cc9e ("amd64: Use a larger boot stack"), it could happen that this reservation is insufficient; this happens when bootstack crosses a PAGE_SHIFT + KASAN_SHADOW_SCALE_SHIFT boundary. Update the calculation to take into account the new size of the boot stack. Fixes: 789df254cc9e ("amd64: Use a larger boot stack") Sponsored by: The FreeBSD Foundation --- sys/amd64/amd64/pmap.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 5bc40bd00a32..5d747e62d37c 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11642,13 +11642,16 @@ pmap_pkru_clear(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) /* * Reserve enough memory to: * 1) allocate PDP pages for the shadow map(s), - * 2) shadow one page of memory, so one PD page, one PT page, and one shadow - * page per shadow map. + * 2) shadow the boot stack of KSTACK_PAGES pages, + * so we need one PD page, one or two PT pages, and KSTACK_PAGES shadow pages + * per shadow map. */ #ifdef KASAN -#define SAN_EARLY_PAGES (NKASANPML4E + 3) +#define SAN_EARLY_PAGES \ + (NKASANPML4E + 1 + 2 + howmany(KSTACK_PAGES, KASAN_SHADOW_SCALE)) #else -#define SAN_EARLY_PAGES (NKMSANSHADPML4E + NKMSANORIGPML4E + 2 * 3) +#define SAN_EARLY_PAGES \ + (NKMSANSHADPML4E + NKMSANORIGPML4E + 2 * (1 + 2 + KSTACK_PAGES)) #endif static uint64_t __nosanitizeaddress __nosanitizememory From nobody Fri Aug 4 17:31:12 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHXnD3BBDz4TvTN; Fri, 4 Aug 2023 17:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHXnD2JZtz4FNt; Fri, 4 Aug 2023 17:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691170272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LPdB6CEjs8KtksclDNfT/niKls4tYmueOOB/2FuI6UY=; b=Sk+8TGjPBaGfZQPrWK5bSy51GWP4DJeuolOmP5G0rdfqMeTrLLzXop/kAiRFBgvgW7gll5 QKl/p/a8ovohO3HCgBMA1Xq2rGPybN8ysMwCx4YWM+yyNhlXEP+kZndm8pot2+Dr+Mfpk3 MqBwNPXIdLPJjss1K1RqnXTm+Lh0lxZ2WNLLgsBJUaQvGbCqHeJ7BUBNVqOoghK4TRDdhb DYRl24TkKOf22XnqVW9YNeNcn6amDy9WSQbqBYt/1iQ6Q1q3Csq9+j4UJCBST1O4xrO0RH z+YQsbnsqD2eTFJZthUedXcbCJdMA0nWazxYB53A5umAJq8fSAeElIxJgLNSCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691170272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LPdB6CEjs8KtksclDNfT/niKls4tYmueOOB/2FuI6UY=; b=JMG3AEHD5gUnNzpsUqvHlKzTTtEv2SXWsGfyQhdSnJLxOD++nQAyPb9VYRo9OewuWOH/5w P1DQAS5B2FTJc2T2BbltmiJYXwhCY2Fl8cCGfeUiB11pQwMXjurlvGN+GwMwuNU/lNJUUc KFEZOBchkHGPYuRPA4TJxOSaWbO680FDj8JiNCIHAlrl1XijTxT0eRrRHtqc6udt2emCEN 1tzOJ/iI4MBpLBCVOCI5nM3ULa1aNJhfTYTWljsJwdOC5JcH5F15LvCIQBMaKcN+XT47zQ U5VpAbwm7FFrAaXKqrO8K8f9d+BKj/0cG/HKpRpmkTzN2Yh6OsfMSPJercp8dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691170272; a=rsa-sha256; cv=none; b=X5nigXWWZpFdlG+hv9QUTIzKCXJ+9dZwlVmeMABgq7BnkaSCf+OFtAUIjJO/NaqMETs5Dl fTCiGmaCOcaCIKQZ4e8cH4aq/oYdlPnrFZ0HpSqlwuQXYWcdhYONK08+w3onVkflLy0lmq myh285kdRJRpMkPI4vh/IVk9S1rYvXd3Qaz2eNbKYjLaPG51udL7pjNQ0V5HPglS65rj2q 3mVjVIYVNYgyZde+WLbklf+p+Ry6m7hZBiGFuxsIw997rbw9jbKS383tiFXl8iUruBEqSy A4BkJLKw16Xa+hF6NX53yRMjMMix3TWaaoVGQHS3yT0mlvrunuBYW/Af9RWQSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHXnD143tz19rF; Fri, 4 Aug 2023 17:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374HVCMD039890; Fri, 4 Aug 2023 17:31:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374HVCxU039889; Fri, 4 Aug 2023 17:31:12 GMT (envelope-from git) Date: Fri, 4 Aug 2023 17:31:12 GMT Message-Id: <202308041731.374HVCxU039889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 348bea10b6f2 - main - openssh: retire HPN option handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 348bea10b6f2b86f757011652ea798ccb3f696c1 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=348bea10b6f2b86f757011652ea798ccb3f696c1 commit 348bea10b6f2b86f757011652ea798ccb3f696c1 Author: Ed Maste AuthorDate: 2023-08-02 14:37:12 +0000 Commit: Ed Maste CommitDate: 2023-08-04 17:29:04 +0000 openssh: retire HPN option handling The HPN patch set was removed from base system SSH in January 2016, in commit 60c59fad8806. We retained the option parsing (using OpenSSH's support for deprecated options) to avoid breaking existing installations upon upgrade, but sufficient time has now passed that we can remove this special case. Approved by: des Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41291 --- crypto/openssh/FREEBSD-upgrade | 6 ++---- crypto/openssh/readconf.c | 7 ------- crypto/openssh/servconf.c | 6 ------ 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade index 905b65ec4e3d..8d3f3a14f823 100644 --- a/crypto/openssh/FREEBSD-upgrade +++ b/crypto/openssh/FREEBSD-upgrade @@ -182,10 +182,8 @@ 11) Retired patches - We no longer have HPN patches (adaptive buffer size for increased - throughput on high-BxD links) or client-side VersionAddendum, but we - recognize and ignore the configuration options to avoid breaking - existing configurations. + We no longer have client-side VersionAddendum, but we recognize and ignore + the configuration options to avoid breaking existing configurations. 12) PrintLastLog bugfix diff --git a/crypto/openssh/readconf.c b/crypto/openssh/readconf.c index 616a6e8b9bd4..3798c2507717 100644 --- a/crypto/openssh/readconf.c +++ b/crypto/openssh/readconf.c @@ -323,13 +323,6 @@ static struct { { "requiredrsasize", oRequiredRSASize }, { "enableescapecommandline", oEnableEscapeCommandline }, - /* HPN patch - retired in 60c59fad8806 */ - { "hpndisabled", oDeprecated }, - { "hpnbuffersize", oDeprecated }, - { "tcprcvbufpoll", oDeprecated }, - { "tcprcvbuf", oDeprecated }, - { "noneenabled", oUnsupported }, - { "noneswitch", oUnsupported }, /* Client VersionAddendum - retired in bffe60ead024 */ { "versionaddendum", oDeprecated }, diff --git a/crypto/openssh/servconf.c b/crypto/openssh/servconf.c index de45475dbc33..2f9632992751 100644 --- a/crypto/openssh/servconf.c +++ b/crypto/openssh/servconf.c @@ -708,12 +708,6 @@ static struct { { "useblacklist", sUseBlacklist, SSHCFG_GLOBAL }, { "useblocklist", sUseBlacklist, SSHCFG_GLOBAL }, /* alias */ - /* HPN patch - retired in 60c59fad8806 */ - { "noneenabled", sUnsupported, SSHCFG_ALL }, - { "hpndisabled", sDeprecated, SSHCFG_ALL }, - { "hpnbuffersize", sDeprecated, SSHCFG_ALL }, - { "tcprcvbufpoll", sDeprecated, SSHCFG_ALL }, - { NULL, sBadOption, 0 } }; From nobody Fri Aug 4 17:53:27 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHYH41Nk2z4TwjV; Fri, 4 Aug 2023 17:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHYH35vklz4H7K; Fri, 4 Aug 2023 17:53:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691171615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uysTpwjp0l0c3hi1PXZFe6NdRW/cxcdIwIsS37IsSJk=; b=t7zEdhrkJVC9DRtczqOD3tP8h+Wd3vHl+g/trDOoIMuhbU5CIlEij2Z5GVco6mW3ai5A3n HQUVOHyZBf8CgiMKPVNaEOaUuMwjCJf+JiIt4JTNA0YuZS9wqh/qlrElVYiWO50XctuCB5 Mbc5Kr/5lvP7kp3KH5W/kRkpPfXMBwqdewisXytvZEaO3H/K84sPKlfcnkNH07m30icBPg ZYSaYik6H+gGWmtEwpOai+CADXs2E04uT8MsBATNA/UwSpchm0kRkmQaEQuregPOl+8/7x gXd/pFpxfU9MAtuehVZM+PLzQ8p55dpg5dHvt1B8yAKyYylXcAdCHqK7/HBADg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691171615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uysTpwjp0l0c3hi1PXZFe6NdRW/cxcdIwIsS37IsSJk=; b=d4EMraGE1WXcuKLOyRIZsxnMrzcpMt+eekPq+rA+rNQIsQWZQ3T+uZjX2V6WMwN5i9zjzs PAmsmrm7ERlYRJuQkI5JRU//koNIv/sdy2bawhG/UZKzw13XoWQubqT1TXRGS23Shs9cCs DIQyEaxo0VcvJH8Ykci0e5XMVGU595V/Fsr4pncituLA03bzj85LcD3ILri9SpOU2qsMzp RfYGKa2evRjLtpj+2mZ64sZITGHXxlxCw9VbjS0egnGDpZW4bvvO9aOIR+W75V49uT3Yuw B/FPekKwGEo4MaNx9FfGHj+yqu5dEY/MtGaCfh7EXyyb7fD65br0psZ69E9B6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691171615; a=rsa-sha256; cv=none; b=H//oUYmDubhX12UvLAsjUSSirNNXS+CIRJ52ds6cTSxWshEGmNfZ5kU80Cs0aUTOeRH9CD nE3Cuv8vaUbZaYEr/dbQBfOepQgodcE4ofm95sr8dF6D+i0zoDb22VpnFSRQkMwzCGVOJF uOKGQqRTjdawmVqX3+HBSfvdrRh+3ute7E+aqYhF3h5j1ZIS0bgGUb398nAr/p5g3WUmET kdw8OG1YDW6Fb06CQkP2PX+/eCMx1v+RqUUtV/0T9XjIa+Kl3YulN92GlIQJ7DHMqerjs1 hKMVtqM9yS7gV+kWZFfkXEqwEhC9wDeQ2r2z7aGlnzn9OlQBM8yubYuzvWi9Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHYGw3N21z1BLb; Fri, 4 Aug 2023 17:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374HrRsw076210; Fri, 4 Aug 2023 17:53:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374HrRBP076209; Fri, 4 Aug 2023 17:53:27 GMT (envelope-from git) Date: Fri, 4 Aug 2023 17:53:27 GMT Message-Id: <202308041753.374HrRBP076209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a0e20c0ded1a - main - Limit the number of CPUs in the gicv1/2 driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a0e20c0ded1ae98ec25ded317c6a331fbd40e18c Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a0e20c0ded1ae98ec25ded317c6a331fbd40e18c commit a0e20c0ded1ae98ec25ded317c6a331fbd40e18c Author: Andrew Turner AuthorDate: 2023-08-04 15:06:44 +0000 Commit: Andrew Turner CommitDate: 2023-08-04 17:47:47 +0000 Limit the number of CPUs in the gicv1/2 driver The GICv2 can only send IPIs to 8 CPUs. Because of this it should only be in machines with no more than 8 cores. Create a new macro to hold this limit to reduce the size of the softc. Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41322 --- sys/arm/arm/gic.c | 19 +++++++++++++++---- sys/arm/arm/gic.h | 9 ++++++++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c index a6f81254fe7d..3ff1276f7a3e 100644 --- a/sys/arm/arm/gic.c +++ b/sys/arm/arm/gic.c @@ -146,7 +146,7 @@ static int gic_debug_spurious = 0; #endif TUNABLE_INT("hw.gic.debug_spurious", &gic_debug_spurious); -static u_int arm_gic_map[MAXCPU]; +static u_int arm_gic_map[GIC_MAXCPU]; static struct arm_gic_softc *gic_sc = NULL; @@ -209,6 +209,7 @@ arm_gic_init_secondary(device_t dev) /* Set the mask so we can find this CPU to send it IPIs */ cpu = PCPU_GET(cpuid); + MPASS(cpu < GIC_MAXCPU); arm_gic_map[cpu] = gic_cpu_mask(sc); for (irq = 0; irq < sc->nirqs; irq += 4) @@ -317,6 +318,12 @@ arm_gic_attach(device_t dev) if (gic_sc) return (ENXIO); + if (mp_ncpus > GIC_MAXCPU) { + device_printf(dev, "Too many CPUs for IPIs to work (%d > %d)\n", + mp_ncpus, GIC_MAXCPU); + return (ENXIO); + } + sc = device_get_softc(dev); if (bus_alloc_resources(dev, arm_gic_spec, sc->gic_res)) { @@ -362,6 +369,7 @@ arm_gic_attach(device_t dev) /* Find the current cpu mask */ mask = gic_cpu_mask(sc); /* Set the mask so we can find this CPU to send it IPIs */ + MPASS(PCPU_GET(cpuid) < GIC_MAXCPU); arm_gic_map[PCPU_GET(cpuid)] = mask; /* Set all four targets to this cpu */ mask |= mask << 8; @@ -649,7 +657,7 @@ gic_bind(struct arm_gic_softc *sc, u_int irq, cpuset_t *cpus) { uint32_t cpu, end, mask; - end = min(mp_ncpus, 8); + end = min(mp_ncpus, GIC_MAXCPU); for (cpu = end; cpu < MAXCPU; cpu++) if (CPU_ISSET(cpu, cpus)) return (EINVAL); @@ -988,9 +996,12 @@ arm_gic_ipi_send(device_t dev, struct intr_irqsrc *isrc, cpuset_t cpus, struct gic_irqsrc *gi = (struct gic_irqsrc *)isrc; uint32_t val = 0, i; - for (i = 0; i < MAXCPU; i++) - if (CPU_ISSET(i, &cpus)) + for (i = 0; i < MAXCPU; i++) { + if (CPU_ISSET(i, &cpus)) { + MPASS(i < GIC_MAXCPU); val |= arm_gic_map[i] << GICD_SGI_TARGET_SHIFT; + } + } gic_d_write_4(sc, GICD_SGIR, val | gi->gi_irq); } diff --git a/sys/arm/arm/gic.h b/sys/arm/arm/gic.h index 5db11a16a4e2..e0780c85fdf9 100644 --- a/sys/arm/arm/gic.h +++ b/sys/arm/arm/gic.h @@ -39,6 +39,13 @@ #ifndef _ARM_GIC_H_ #define _ARM_GIC_H_ +/* The GICv1/2 only supports 8 CPUs */ +#if MAXCPU > 8 +#define GIC_MAXCPU 8 +#else +#define GIC_MAXCPU MAXCPU +#endif + struct arm_gic_softc { device_t gic_dev; void * gic_intrhand; @@ -50,7 +57,7 @@ struct arm_gic_softc { struct mtx mutex; uint32_t nirqs; uint32_t typer; - uint32_t last_irq[MAXCPU]; + uint32_t last_irq[GIC_MAXCPU]; uint32_t gic_iidr; u_int gic_bus; From nobody Fri Aug 4 18:43:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHZNm6blmz4gstL; Fri, 4 Aug 2023 18:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHZNm65Chz4M72; Fri, 4 Aug 2023 18:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691174616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Ldwn24VhcYhBpCvC4t2ntzGhIG4zEY5O+P3Q0eSpqY=; b=LLQsT7H2T6HbfVfq4c+QmFYCTPtsTtwoItgL98BOWKFBihpDK6Rx2Ay/Y3FetxVZEZcugA NRCqbGZiKUusYMg6IVKQ8YtN3hcj68NIxt8B2UqM8bc7U+rJK4RrNWEMBLAaXg/+Y4OjAL RC1IJPx4WoZlnfGTXXQbgIK5X3sTKgYEHK6KShegroyCknkHsCW0DHZ00D/f6n9EsdhZaP ncXgxNQ/f8EFv2Wd2SvD5fP+jeM8BrMrZ8YJd5IeWLCU7brGpac+EnEWCk1a4dizRKOcY2 NgW36hf7x8gMbqtmO5MtTVrzHQEYr8Dwq4hWwSqIYQTtlrMZRNyrWtXyYP4B8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691174616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Ldwn24VhcYhBpCvC4t2ntzGhIG4zEY5O+P3Q0eSpqY=; b=YxpAJxMqhT0AWcV7EAx3k3mAGJZ9jlOffHPT0gZzUvLqLmSPj+PDV3VWvmn401dcd/+CeS qlmGnLILIcQ/DmL2gEjCg221gtroESrmGnY0+aGbFVyjJlhF9EG3OorSkFpYcdPhK03/rc wQif3allVGhTaEaIYqHZrnzNJgzqqq5LbirVqycRJkldGNzw9v1lhUSdwAxnrQEztz8SsC 3pwC35zUjNtVs08wKxtO7zbFiJBr49+RPgST3RWUnY0PBYeqKg1Mq8CMnQq9fd7tGVnIie 0gSsWcG7+uF1NLN/W+n9h81FlZj9Z79VpDUU+47nUWs9sWRcrJCDc97QhEBGsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691174616; a=rsa-sha256; cv=none; b=w89RXemArByc7CP+wcR0R2gehKcXTVtUnn6waKB9ySqfW2kY3I+dTFgLKYLMNZln9eSmxs G/tK8bdEmzBK7mYxSXxCsiOZI9DZ7EacRxcGyhbAtQvA6wT1AEfft/fSz4vYdVpjfctAwi BF7UOWzD2RSeSQuvyeXlMVkqHEv/1J7OU3aMpEAD8MDl7UoLVoczl84dqjcu+w0fUJRPL5 /eDpEKnrnzRjIAEVlni2pFGO1C+tjmJ1rUR/GA2X1dVHsAKBlHr/6aGgMsK8Bo+5JRr/aI CW9DwvE2wyGmo/4fbgKArZ3HZ+poqqdv7GgH5r99RiMdi2sJnAcE6/h0g+K6WA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHZNm55nZz1D2T; Fri, 4 Aug 2023 18:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374IhaQ5060301; Fri, 4 Aug 2023 18:43:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374IhapQ060300; Fri, 4 Aug 2023 18:43:36 GMT (envelope-from git) Date: Fri, 4 Aug 2023 18:43:36 GMT Message-Id: <202308041843.374IhapQ060300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: ccdb28275db7 - main - vm_phys_enq_range: no alignment assert for npages==0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccdb28275db7c94ffdafc542d9e29fd43f51f39b Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=ccdb28275db7c94ffdafc542d9e29fd43f51f39b commit ccdb28275db7c94ffdafc542d9e29fd43f51f39b Author: Doug Moore AuthorDate: 2023-08-04 18:41:59 +0000 Commit: Doug Moore CommitDate: 2023-08-04 18:41:59 +0000 vm_phys_enq_range: no alignment assert for npages==0 Do not assume that when vm_phys_enq_range is passed npages==0 that the vm_page argument is valid in any way, much less that it has a page-aligned address. Just don't look at it. Assert nothing about it. Reported by: karels Differential Revision: https://reviews.freebsd.org/D41317 --- sys/vm/vm_phys.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index ed358d7cd4a9..a3af3964fba4 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -690,15 +690,17 @@ vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, int order, * term fragmentation by promoting contemporaneous allocation and (hopefully) * deallocation. * - * The physical page m's buddy must not be free. + * If npages is zero, this function does nothing and ignores the physical page + * parameter m. Otherwise, the physical page m's buddy must not be free. */ static vm_page_t vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) { int order; - KASSERT(((VM_PAGE_TO_PHYS(m) + npages * PAGE_SIZE) & - ((PAGE_SIZE << fls(npages / 2)) - 1)) == 0, + KASSERT(npages == 0 || + ((VM_PAGE_TO_PHYS(m) + npages * PAGE_SIZE) & + ((PAGE_SIZE << (fls(npages) - 1)) - 1)) == 0, ("vm_phys_enq_range: page %p and npages %u are misaligned", m, npages)); while (npages > 0) { From nobody Fri Aug 4 21:04:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHdWr31lCz4h5PY; Fri, 4 Aug 2023 21:04:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHdWr2MnNz4YCs; Fri, 4 Aug 2023 21:04:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691183096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TMg22io4Cr6LreVJA8E/p/p3XtDjKUR/OXPnC+xZ/x4=; b=kyFpfrLYte8RaZ9SGEwBmFAz5vo8FoEfWpeUWyZ5OYKNQCvVmLP+4HrN96McpCdWHi6Per +QOn5Ejl2L2ONZT5U7/GoU3G04itrqdI++yxizShvLFCAL5DKZfTO1eFuihG5LDb6FbYjE r1u1EJF88pTWO0xrdk+jABpSeLGbBHMUeyNSsmsbWc3OC2qHqzopds0ClVNj3PqEXj4aXq LOZYFt8DEPxdJC8ZSh/fHgefV3pINh6whSu8TgnwUHxklX48UALU6caI5Qopwu5t1Tpvud L3khdGlb2gMhkObs0dcNHKxVNBX4jUIlYJMW7Ia63/TJHNYNnqgdRSlFnBFNGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691183096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TMg22io4Cr6LreVJA8E/p/p3XtDjKUR/OXPnC+xZ/x4=; b=WEZx13HF5ta4lKkQzQ/G+L8BCeAU4/cDW13ddxiPh+ywI+oYK5gKG+vOwQtL/MeowrDJYB dccSZjnyNj9IJOElWLIASOn3F/xE8QKogMk7H5clK/ukUSKk7ZcdgeIk7jdB+XpWrSZMYV Bw5CJx/2hjMk9aMKsqH3Cp7aLsoCvdeNI6c/iTkxdS+PFhy3cxcLO1sMd0pID2PqLOEsk9 jZiUm1bTLKhkafFR29Bw42NgsCAjLw/ZTaB3yjxuh2upHkb+VmJ/GRw1LWTwBvSkiBW7XB vLA8mURKPNxjCUodj/SgahJokSZ7xUbIlPsIrJevA83NhbE2HExRtacuH98d4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691183096; a=rsa-sha256; cv=none; b=CW9PBlHLsK0tQV4U1mpN6nzdbefy4u0xggkZWqUUT06mOqWz1vna4Jhf06pzg2cfwtXZdA U2Y58GJwz4cp6Fx7dj/TI91yUGwCtN7TbwtWu56MJyhhtXImqj79ApvWj+0oAiGEc6EoRn RwMPx9kRbdkdGY0RxRGeERC+FG/qBYr1hwrU0fK2uyA8HPfvWJqrDx5avGozg8qPtxjnwN 1UgojHmibTSfNz41RyDNoQs9gKU4vTXU18zkw25v4bDfMlHX3Q0ZOZFsPuP0ulWhR7/V1r r2CHOdJLBwkMcmzOu0t2shiULkMAj7zUVoGWHSfGv7xSRa2fTGUSt07MMOZuBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHdWr1NYhz1HKR; Fri, 4 Aug 2023 21:04:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374L4uR1093733; Fri, 4 Aug 2023 21:04:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374L4uNX093732; Fri, 4 Aug 2023 21:04:56 GMT (envelope-from git) Date: Fri, 4 Aug 2023 21:04:56 GMT Message-Id: <202308042104.374L4uNX093732@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: efb04fb404b2 - main - sctp: improve consistency of acc and ccc handling in snd buffer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: efb04fb404b240a99c618e49174cd6260217edaa Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=efb04fb404b240a99c618e49174cd6260217edaa commit efb04fb404b240a99c618e49174cd6260217edaa Author: Michael Tuexen AuthorDate: 2023-08-04 06:32:25 +0000 Commit: Michael Tuexen CommitDate: 2023-08-04 06:32:25 +0000 sctp: improve consistency of acc and ccc handling in snd buffer Don't clear the counters for the socket snd buffer when shutdown(..., SHUT_WR) or shutdown(..., SHUT_RDWR) is called. This was causing the system to panic() when SCTP pf tests were running. Reported by: dchagin, kp MFC after: 1 week --- sys/netinet/sctp_usrreq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index d603ef5efcd6..aa957ffa9f96 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -838,7 +838,6 @@ sctp_flush(struct socket *so, int how) SOCK_LOCK(so); KASSERT(!SOLISTENING(so), ("sctp_flush: called on listening socket %p", so)); - SCTP_SB_CLEAR(so->so_snd); SOCK_UNLOCK(so); } return (0); From nobody Fri Aug 4 21:12:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHdht3TyCz4m41P; Fri, 4 Aug 2023 21:12:46 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHdht0Z2fz4ZBq; Fri, 4 Aug 2023 21:12:46 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (ip4d15f6ca.dynamic.kabel-deutschland.de [77.21.246.202]) (Authenticated sender: micmac) by mail-n.franken.de (Postfix) with ESMTPSA id 0790475DB4D5C; Fri, 4 Aug 2023 23:12:36 +0200 (CEST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: b279e84a47dd - main - sctp: improve consistency From: tuexen@freebsd.org In-Reply-To: Date: Fri, 4 Aug 2023 23:12:35 +0200 Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1C294E86-083A-45E9-8032-51F5B45C18B6@freebsd.org> References: <202307282203.36SM3C98056354@gitrepo.freebsd.org> To: Mark Johnston X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 4RHdht0Z2fz4ZBq X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:2001:638::/32, country:DE] > On 4. Aug 2023, at 17:16, Mark Johnston wrote: >=20 > On Fri, Aug 04, 2023 at 03:53:31PM +0200, tuexen@freebsd.org wrote: >>> On 4. Aug 2023, at 15:03, Kristof Provost wrote: >>>=20 >>> On 29 Jul 2023, at 0:03, Michael Tuexen wrote: >>> The branch main has been updated by tuexen: >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Db279e84a47ddb59e55b5a3cec31c51cd= 41bf0dc3 >>> commit b279e84a47ddb59e55b5a3cec31c51cd41bf0dc3=20 >>> Author: Michael Tuexen =20 >>> AuthorDate: 2023-07-28 12:36:11 +0000=20 >>> Commit: Michael Tuexen =20 >>> CommitDate: 2023-07-28 12:36:11 +0000 >>> sctp: improve consistency >>> This is simplifying a patch to address PR 260116. >>> PR: 260116=20 >>> MFC after: 1 week >>> It looks like this commit (or maybe the next one, = c620788150d274c09a070ab486602c98407d73b0) causes a panic in the SCTP = code during the sys/netpfil/pf/sctp:basic_v4 test: >>> panic: Counter goes negative >>> cpuid =3D 7 >>> time =3D 1691145655 >>> KDB: stack backtrace: >>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xfffffe026ea9a3a0 >>> vpanic() at vpanic+0x132/frame 0xfffffe026ea9a4d0 >>> panic() at panic+0x43/frame 0xfffffe026ea9a530 >>> sctp_abort_notification() at sctp_abort_notification/frame = 0xfffffe026ea9a540 >>> sctp_express_handle_sack() at sctp_express_handle_sack+0x647/frame = 0xfffffe026ea9a640 >>> sctp_process_control() at sctp_process_control+0xf62/frame = 0xfffffe026ea9a990 >>> sctp_common_input_processing() at = sctp_common_input_processing+0x561/frame 0xfffffe026ea9ab10 >>> sctp_input_with_port() at sctp_input_with_port+0x1fa/frame = 0xfffffe026ea9abe0 >>> sctp_input() at sctp_input+0x10/frame 0xfffffe026ea9abf0 >>> ip_input() at ip_input+0x2ab/frame 0xfffffe026ea9ac50 >>> netisr_dispatch_src() at netisr_dispatch_src+0xad/frame = 0xfffffe026ea9acb0 >>> ether_demux() at ether_demux+0x17a/frame 0xfffffe026ea9ace0 >>> ether_nh_input() at ether_nh_input+0x39f/frame 0xfffffe026ea9ad30 >>> netisr_dispatch_src() at netisr_dispatch_src+0xad/frame = 0xfffffe026ea9ad90 >>> ether_input() at ether_input+0xd9/frame 0xfffffe026ea9adf0 >>> epair_tx_start_deferred() at epair_tx_start_deferred+0xd7/frame = 0xfffffe026ea9ae40 >>> taskqueue_run_locked() at taskqueue_run_locked+0xab/frame = 0xfffffe026ea9aec0 >>> taskqueue_thread_loop() at taskqueue_thread_loop+0xd3/frame = 0xfffffe026ea9aef0 >>> fork_exit() at fork_exit+0x82/frame 0xfffffe026ea9af30 >>> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe026ea9af30 >>> --- trap 0, rip =3D 0x35c39ec8bda0, rsp =3D 0, rbp =3D = 0x35c39ec8ec90 --- >>> KDB: enter: panic >>>=20 >>> That seems to be panicking during SCTP packet handling, so I do not = believe this to be a pf bug. >>> Reverting both commits avoids the problem. >>> It=E2=80=99s also failing during the CI tests: = https://ci.freebsd.org/view/Test/job/FreeBSD-main-amd64-test/23957/console= >>> (To reproduce, kldload pf sctp ; cd /usr/tests/sys/netpfil/pf ; sudo = kyua test sctp:basic_v4). >> Thank you very much for that line!! >>=20 >> I think I know what the problem is. It comes down to an inconsistent = handling of shutdown() calls. >> This results in inconsistent sb_ccc / sb_acc values which are now = caught. >>=20 >> I'm working on a patch which also fixes several syzkaller issues. = Using the above line, I'll also make >> sure it fixes the issue you are observing. Should be fixed by Monday. >=20 > In the meantime, it's impossible to run through the test suite. Would > it be possible to revert the offending commit(s) until a bug fix is > ready? I committed a fix for the particular problem triggering the panic when running the SCTP tests in = https://cgit.FreeBSD.org/src/commit/?id=3Defb04fb404b240a99c618e49174cd626= 0217edaa Thanks to kp@ for providing a hint how to run the particular tests. The = SCTP pf tests should pass now again. Best regards Michael= From nobody Fri Aug 4 21:15:07 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHdlj5D9zz4m4B8; Fri, 4 Aug 2023 21:15:13 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHdlh2y5kz4Ztm; Fri, 4 Aug 2023 21:15:12 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 193.175.24.27 is neither permitted nor denied by domain of tuexen@freebsd.org) smtp.mailfrom=tuexen@freebsd.org; dmarc=none Received: from smtpclient.apple (ip4d15f6ca.dynamic.kabel-deutschland.de [77.21.246.202]) (Authenticated sender: micmac) by mail-n.franken.de (Postfix) with ESMTPSA id 69F3282A9B346; Fri, 4 Aug 2023 23:15:08 +0200 (CEST) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: c620788150d2 - main - sctp: keep sb_acc and sb_ccc in sync From: tuexen@freebsd.org In-Reply-To: Date: Fri, 4 Aug 2023 23:15:07 +0200 Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <9BC2D69B-0A3E-4D39-924A-86A0087B2DA2@freebsd.org> References: <202307282217.36SMHSJD073301@gitrepo.freebsd.org> To: Dmitry Chagin X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Spamd-Result: default: False [-0.39 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; MV_CASE(0.50)[]; NEURAL_SPAM_SHORT(0.31)[0.308]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[193.175.24.27:from]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; ASN(0.00)[asn:680, ipnet:193.174.0.0/15, country:DE]; FROM_NO_DN(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[tuexen]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[] X-Spamd-Bar: / X-Rspamd-Queue-Id: 4RHdlh2y5kz4Ztm > On 31. Jul 2023, at 10:44, Dmitry Chagin wrote: >=20 > On Fri, Jul 28, 2023 at 10:17:28PM +0000, Michael Tuexen wrote: >> The branch main has been updated by tuexen: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc620788150d274c09a070ab486602c98= 407d73b0 >>=20 >> commit c620788150d274c09a070ab486602c98407d73b0 >> Author: Michael Tuexen >> AuthorDate: 2023-07-28 13:16:23 +0000 >> Commit: Michael Tuexen >> CommitDate: 2023-07-28 13:16:23 +0000 >>=20 >> sctp: keep sb_acc and sb_ccc in sync >>=20 >> PR: 260116 >> MFC after: 1 week >> --- >=20 > Hi, Michael, > perhaps some of the recent fixes have broken these tests: > = https://ci.freebsd.org/view/all/job/FreeBSD-main-amd64-test/lastFailedBuil= d/console Fixed in = https://cgit.FreeBSD.org/src/commit/?id=3Defb04fb404b240a99c618e49174cd626= 0217edaa = Best regards Michael From nobody Fri Aug 4 22:18:20 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHg8j1flvz4m8Rn; Fri, 4 Aug 2023 22:18:29 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHg8h5H0xz4fwc; Fri, 4 Aug 2023 22:18:28 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.2/8.16.1) with ESMTP id 374MIKnJ066305; Sat, 5 Aug 2023 01:18:20 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 374MIK7M066304; Sat, 5 Aug 2023 01:18:20 +0300 (MSK) (envelope-from dchagin) Date: Sat, 5 Aug 2023 01:18:20 +0300 From: Dmitry Chagin To: tuexen@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c620788150d2 - main - sctp: keep sb_acc and sb_ccc in sync Message-ID: References: <202307282217.36SMHSJD073301@gitrepo.freebsd.org> <9BC2D69B-0A3E-4D39-924A-86A0087B2DA2@freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9BC2D69B-0A3E-4D39-924A-86A0087B2DA2@freebsd.org> X-Rspamd-Queue-Id: 4RHg8h5H0xz4fwc X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] On Fri, Aug 04, 2023 at 11:15:07PM +0200, tuexen@freebsd.org wrote: > > On 31. Jul 2023, at 10:44, Dmitry Chagin wrote: > > > > On Fri, Jul 28, 2023 at 10:17:28PM +0000, Michael Tuexen wrote: > >> The branch main has been updated by tuexen: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=c620788150d274c09a070ab486602c98407d73b0 > >> > >> commit c620788150d274c09a070ab486602c98407d73b0 > >> Author: Michael Tuexen > >> AuthorDate: 2023-07-28 13:16:23 +0000 > >> Commit: Michael Tuexen > >> CommitDate: 2023-07-28 13:16:23 +0000 > >> > >> sctp: keep sb_acc and sb_ccc in sync > >> > >> PR: 260116 > >> MFC after: 1 week > >> --- > > > > Hi, Michael, > > perhaps some of the recent fixes have broken these tests: > > https://ci.freebsd.org/view/all/job/FreeBSD-main-amd64-test/lastFailedBuild/console > Fixed in https://cgit.FreeBSD.org/src/commit/?id=efb04fb404b240a99c618e49174cd6260217edaa > > Thank you! From nobody Fri Aug 4 22:49:44 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHgrm6NcSz4mBTB; Fri, 4 Aug 2023 22:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHgrm5t63z3G1G; Fri, 4 Aug 2023 22:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691189384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=annsLJQc/4dGEjIZt6xR+HF/rbhMsh2VF4forxkvhAM=; b=ZRiWLmLas7QKlu5mzMD+Rss+vyJYs5y9LZfoucOoaHEj9IWw72zHJ7hPdKaaWzLALDCufb Dzg/4eW4bfNbWrgdE9F3Q9ZGLaBXuOWm4mc5PCrh/LRtrYkWABFWy+a2chYxCSXW6vr5l7 iQZa07LfbJTZ+l6MuPXw5w+wRkZgiNbLzHq0tmMjAgOetW5cP9+YcvO9wfldXOASl7G1N7 x8Kr22LFV5S7n+4+SXqc9wwmSbjhO1mC5mN48i11L+n89Z3gVzOQbHyCo7WTeLpR4DtZIG ORny3KpX1R6/UtoRw71ZmUHsxYJIAaSclafiW5+Bwc20Epr9t2ZlOn0Sl+VMuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691189384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=annsLJQc/4dGEjIZt6xR+HF/rbhMsh2VF4forxkvhAM=; b=FpOcbcc/ARMoORWnYo7vC16i9/433Qpt6Gc598rW/W1XGKKtof1qwstyP6ktcLBYx69LLU UYp/oN4AHKNRWHlhWEosBnaZ6J+HOEKCLLdxSBduA1eRzcJQ4bDPmxSuPCkRODocxKKaMM PZvS4mkKLP6jKFKm1PCFDZJV71IiwSi4cvjx/rmsw3iIHUy4nFOhA+E9893P3EW4vWCbuY FbJk5TLwyQ+pUsbYDHWY83ci9gQwmAr8mfj050b1KteZdICynf4zUQxCRQKkW3zVOZZOqW PPYXEfLZPNtpgXnfG7wr7L0FAA0EEauXu3jUG2fTC/awqnd3Zspai+E9o0nvPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691189384; a=rsa-sha256; cv=none; b=EQoroBaOa0OcvCpvHFSK73n6CcjnA6Ia4+yQtUIn2g7ALJMbtdbO6r9n1a6U7T9utrtyQL VMP1xxxjV57w0qQ0afrdENTWyXdDiEXPVbQNEvwNMWCdFO+dUA7BFYOlGHKtXCKEaq9aI5 9ACw4/bRZMDsyrXK0/xy3a9ggYTcrULUPXySNYsdUg7iLKtYFqwHRQuFaAoPJ2j9CzOoYQ sOkUOwSaYKdGKqXHtdFhJWSSB+AuVzzhPmnEesLuLgxHWrLYMgvflo9hbUhH+4nFvcc7mC YVM/smShFMpeuvJocLqGvgfHKergnYWJ/yi4DaAaxXwYI4x//LDVLQQe+fgt2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHgrm4ppWz1K7r; Fri, 4 Aug 2023 22:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374MnitT060237; Fri, 4 Aug 2023 22:49:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374Mnieb060236; Fri, 4 Aug 2023 22:49:44 GMT (envelope-from git) Date: Fri, 4 Aug 2023 22:49:44 GMT Message-Id: <202308042249.374Mnieb060236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9e6941a2c7a3 - main - udf: reject invalid block sizes from lvd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e6941a2c7a393aefe6a123952c6eacbc23098a6 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9e6941a2c7a393aefe6a123952c6eacbc23098a6 commit 9e6941a2c7a393aefe6a123952c6eacbc23098a6 Author: Konstantin Belousov AuthorDate: 2023-08-04 22:47:09 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-04 22:49:36 +0000 udf: reject invalid block sizes from lvd PR: 272893 Reported by: Robert Morris Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/fs/udf/udf_vfsops.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index 0b028718085a..a8aa811a0d6c 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -413,6 +413,11 @@ udf_mountfs(struct vnode *devvp, struct mount *mp) lvd = (struct logvol_desc *)bp->b_data; if (!udf_checktag(&lvd->tag, TAGID_LOGVOL)) { udfmp->bsize = le32toh(lvd->lb_size); + if (udfmp->bsize < 0 || udfmp->bsize > maxbcachebuf) { + printf("lvd block size %d\n", udfmp->bsize); + error = EINVAL; + goto bail; + } udfmp->bmask = udfmp->bsize - 1; udfmp->bshift = ffs(udfmp->bsize) - 1; fsd_part = le16toh(lvd->_lvd_use.fsd_loc.loc.part_num); From nobody Fri Aug 4 23:43:06 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHj2L6Vgnz4mFmR; Fri, 4 Aug 2023 23:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHj2L62s6z3LcD; Fri, 4 Aug 2023 23:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691192586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/m/w5dM5LwH1QwwY0aQWOSOGtb1kka2gO+ljux6CKSo=; b=ITrasczvZ6wk1RaWZVrs2MMw6sWEECn1eJ1OUm7c4ZVKsSAhaHxwk7ynvCfp99MgwxXJtH V4/yyhWsn9b8QlaqBKr3W7zL6boSaCILtIpLigIBvnL8U6m9UKTshXHvLPQrzNKimeimPL obIKLV1ELFUxuPCGQklTmscfErRThkIbSkNxLK7S8YMbYO41O/IslMYBRQRUjRSogCeePR 1Y7e5LEK7Dl4X/cOK5/gSlnPSZ6LH/Nm0X+3H7QIhahoMenEdDdmVS4yASwHI/YQO8Fupi eoPV9B06rFs7PQ8aXFJxIHtQJnmtjvRYq1PkUk+ZFUBVz1vQW05IKxP9f1GKRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691192586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/m/w5dM5LwH1QwwY0aQWOSOGtb1kka2gO+ljux6CKSo=; b=jiGtzINq5w/HmYrN9VSj3HpQC1balYZEYr3BPzJ6ivlRS8m6AGiUR21zyiTgSIWKWZN2cF 6IWlLCg9rMuQnfpckMA0KMZ+HbPB0wPvVBr/uBmXO9jIxNajI6nI8JI+YTqwigLX0ucGxN ZICBEXCOyE/nN99ITfkBSO3RQC50KJ+Hh43bjk8nqLsrggzWB37mJqvzj4IP37vQ3yQrs2 K3RZY6T0anC3j6uVVOjW2gihVaajnmwX6o+/Yklb0xiQL3qbWG8beJ/ccPCiaroAUySHOY senXB19i+rWNLrpRZSPdSxkq4+AUWSIDOg/fhw3sVKKzW2K66qge86jokoB2EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691192586; a=rsa-sha256; cv=none; b=Ew/iKeF2Lufsg+Q2ziSKzaSHCaL+Zi1hli+/ZurxX312t58yCTg4qZnbQfZgGQl/QDioHd qeMdwvuLxJoIcVNBI3GnvJu35RcB7jAzDtF+2csx+pbNH6psdDv2fWo9NjIG7AeUOWQvnW FBXJXQMDC+KtD7q1gNjo4Loe5c77lJmLZ7iRYywo9JQpPXz3SwbscyXcxLK584Jpa9K1bQ V37iD8gQ360Y8keW1oDdbv0bLGbpT+7d+GFCz2HLnSLTq4hBz987yxchxTCyjpKUBTgDSZ kem4/GEYvYtPlVrZukDlfRh8RkrUS0vViuXyembcMlHyhXDRKhlJjC3zgLTgdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHj2L55c9z1Lr6; Fri, 4 Aug 2023 23:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374Nh6sa059163; Fri, 4 Aug 2023 23:43:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374Nh69b059162; Fri, 4 Aug 2023 23:43:06 GMT (envelope-from git) Date: Fri, 4 Aug 2023 23:43:06 GMT Message-Id: <202308042343.374Nh69b059162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c70e615051b0 - main - udf: Reject read requests with an invalid length List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c70e615051b00671d54651d99af5cdec4b091d92 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c70e615051b00671d54651d99af5cdec4b091d92 commit c70e615051b00671d54651d99af5cdec4b091d92 Author: John Baldwin AuthorDate: 2023-08-04 23:40:19 +0000 Commit: John Baldwin CommitDate: 2023-08-04 23:40:19 +0000 udf: Reject read requests with an invalid length - If the size is negative or if rounding it up to a multiple of the block size overflows, fail the read request with ERANGE. - While here, add a sanity check that the ICB length for the root directory is at least as long as a minimum-sized file entry. PR: 257768 Reported by: Robert Morris MFC after: 1 week Sponsored by: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41220 --- sys/fs/udf/udf.h | 4 +++- sys/fs/udf/udf_vfsops.c | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/fs/udf/udf.h b/sys/fs/udf/udf.h index b210427a63d7..8500088ec9b7 100644 --- a/sys/fs/udf/udf.h +++ b/sys/fs/udf/udf.h @@ -97,8 +97,10 @@ struct ifid { MALLOC_DECLARE(M_UDFFENTRY); static __inline int -udf_readdevblks(struct udf_mnt *udfmp, int sector, int size, struct buf **bp) +udf_readdevblks(struct udf_mnt *udfmp, daddr_t sector, int size, struct buf **bp) { + if (size < 0 || size + udfmp->bmask < size) + return (ERANGE); return (RDSECTOR(udfmp->im_devvp, sector, (size + udfmp->bmask) & ~udfmp->bmask, bp)); } diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index a8aa811a0d6c..b0a221df6391 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -482,6 +482,11 @@ udf_mountfs(struct vnode *devvp, struct mount *mp) */ sector = le32toh(udfmp->root_icb.loc.lb_num) + udfmp->part_start; size = le32toh(udfmp->root_icb.len); + if (size < UDF_FENTRY_SIZE) { + printf("Invalid root directory file entry length %u\n", + size); + goto bail; + } if ((error = udf_readdevblks(udfmp, sector, size, &bp)) != 0) { printf("Cannot read sector %d\n", sector); goto bail; From nobody Fri Aug 4 23:43:07 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHj2N0zMZz4mFc7; Fri, 4 Aug 2023 23:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHj2M6z4Rz3LX4; Fri, 4 Aug 2023 23:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691192588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iqyPQ7U4u8pnFqthmNlwjmGp/vpNF9nVDlmFc+aU9kM=; b=MJs1EWlOSqp+ijHXFP9qnrO0Vk3xsLzm/i/gPvRt58YhieDYIQp1fXEQmpwEMyv4adaL6i nKrDcHmmooeJ1k1mzkSbDVSQMp8wR+EKhtNMNG5ljuVwV2CsEDPPPPKJcTfr9jr1Uif8t7 D+GZj8yXwiQ8hubjqLh2lTe+DqDxQbY1eLYx2MqPcjJxNO7AaI/ojjU1vQTPQUC6weohmo kChU889Cz+FEUblypqDASieh+QYsZXuBeZ8/YShAwG+P9aO9Xfcq6QyZZ2HScc7fFLAoGA AxXLmVqpjYX0DTILGeUilHRYX87nKtr6UMWhuPldlHxu8xX0gwQ+Lt0LsXLCZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691192588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iqyPQ7U4u8pnFqthmNlwjmGp/vpNF9nVDlmFc+aU9kM=; b=naJYG8SkIUMI/y4MfeXWU+6sSbVX/1Al9p5gCKzNx89Uf1O0GBGofhC3YAxRu1ivYDtElK OCkfXFA0ca95haLuud/Fg1reB5Woy3hvzz0DTUVeL7HWUtmmHsp9oW5chcu8CjvSQR1Ya2 fsEZP7GUc/+WrIVWqL6rqLTjQvNzup1NfcnxsC8MHqC479AkyTj8I9BjClvRm0BzAlzPiA hMVQy6eDe/YcD+2QVxvYjGb9ks0Sqx1blGAAqd93zZ0LzsPWtQIpobRWGGjTcM2d4OEv79 wGnBAV2BY0cbxlgaGTdAW4sJ6ghlKZLUJUkn4aTZ9jEsaGdt8UAPxh82XRLkSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691192588; a=rsa-sha256; cv=none; b=noIrniTHgycz8x6cwk+WmKv7XoOwU+5tzwFckb4fl5ICgD0RW8PKAqM++j9KF5iSmyrqmQ opgd50tEcXRzqpqymDnZYYWk6mw9w2PP7QqUQXx2Rty4aYgMcBQmdcDnZDtRN9ixf6bLbV a/CcjHfQmV06mohVM9svKIYH6byTFZTRqw9nxATEJNqEu0NkuS0djM2OaGTtzKDhYxl5TJ qBxqyym80bat8bdIFwFUpHSu+uOCADDNsasmClxfSalmjUSFbmho37u8rp4QsEYSaTnUwJ 2KnScxyP9G58KKHyYpVcRaQyL6VGITlzacm57KcxvIBw2R3c9MsMGGtscb5tbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHj2M5ml0z1M09; Fri, 4 Aug 2023 23:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374Nh7jT059183; Fri, 4 Aug 2023 23:43:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374Nh7OR059182; Fri, 4 Aug 2023 23:43:07 GMT (envelope-from git) Date: Fri, 4 Aug 2023 23:43:07 GMT Message-Id: <202308042343.374Nh7OR059182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4c89c0127dca - main - g_raid concat: Fail requests to read beyond the end of the volume List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c89c0127dcadaa0d337c23d028f3fea5e76317a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4c89c0127dcadaa0d337c23d028f3fea5e76317a commit 4c89c0127dcadaa0d337c23d028f3fea5e76317a Author: John Baldwin AuthorDate: 2023-08-04 23:41:05 +0000 Commit: John Baldwin CommitDate: 2023-08-04 23:41:05 +0000 g_raid concat: Fail requests to read beyond the end of the volume Previously a debug kernel would trigger an assertion failure if an I/O request attempted to read off the end of a concat volume, but a non-debug kernel would use an invalid sub-disk to try to complete the request eventually resulting in some sort of fault in the kernel. Instead, turn the assertions into explicit checks that fail requests beyond the end of the volume with EIO. For requests which run over the end of the volume, return a short request. PR: 257838 Reported by: Robert Morris Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41222 --- sys/geom/raid/tr_concat.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/sys/geom/raid/tr_concat.c b/sys/geom/raid/tr_concat.c index eac62b3171d2..632501f323cd 100644 --- a/sys/geom/raid/tr_concat.c +++ b/sys/geom/raid/tr_concat.c @@ -240,8 +240,10 @@ g_raid_tr_iostart_concat(struct g_raid_tr_object *tr, struct bio *bp) offset -= vol->v_subdisks[no].sd_size; no++; } - KASSERT(no < vol->v_disks_count, - ("Request starts after volume end (%ju)", bp->bio_offset)); + if (no >= vol->v_disks_count) { + g_raid_iodone(bp, EIO); + return; + } bioq_init(&queue); do { sd = &vol->v_subdisks[no]; @@ -267,10 +269,8 @@ g_raid_tr_iostart_concat(struct g_raid_tr_object *tr, struct bio *bp) addr += length; offset = 0; no++; - KASSERT(no < vol->v_disks_count || remain == 0, - ("Request ends after volume end (%ju, %ju)", - bp->bio_offset, bp->bio_length)); - } while (remain > 0); + } while (remain > 0 && no < vol->v_disks_count); + bp->bio_completed = bp->bio_length - remain; while ((cbp = bioq_takefirst(&queue)) != NULL) { sd = cbp->bio_caller1; cbp->bio_caller1 = NULL; @@ -308,8 +308,8 @@ g_raid_tr_kerneldump_concat(struct g_raid_tr_object *tr, void *virtual, offset -= vol->v_subdisks[no].sd_size; no++; } - KASSERT(no < vol->v_disks_count, - ("Request starts after volume end (%ju)", boffset)); + if (no >= vol->v_disks_count) + return (EIO); do { sd = &vol->v_subdisks[no]; length = MIN(sd->sd_size - offset, remain); @@ -321,10 +321,9 @@ g_raid_tr_kerneldump_concat(struct g_raid_tr_object *tr, void *virtual, addr += length; offset = 0; no++; - KASSERT(no < vol->v_disks_count || remain == 0, - ("Request ends after volume end (%ju, %zu)", - boffset, blength)); - } while (remain > 0); + } while (remain > 0 && no < vol->v_disks_count); + if (remain > 0) + return (EIO); return (0); } @@ -340,7 +339,6 @@ g_raid_tr_iodone_concat(struct g_raid_tr_object *tr, g_destroy_bio(bp); pbp->bio_inbed++; if (pbp->bio_children == pbp->bio_inbed) { - pbp->bio_completed = pbp->bio_length; g_raid_iodone(pbp, pbp->bio_error); } } From nobody Fri Aug 4 23:43:08 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHj2P6nnLz4mFfk; Fri, 4 Aug 2023 23:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHj2P0mNtz3Lw2; Fri, 4 Aug 2023 23:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691192589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WoTWaJWWrS7U364n12YwgJqgJhjxedPy+aRtg5I5SJ0=; b=kNA9/qSeOKL3OldRrA08X9bWKdRX1Vw/EoPEaSg1csmdNXAzw+63LzFijBljo8RjEiNvJf hXzCew5BWSstUkRn47OMQ3WHQUaoT0Y/nwwIHU3cDKPBL2zgbBRENtTPLD314ufMpJmfwt gbvhha6tFi8wSudrMyhtxDiXqt3yPWiYUX/zgOlBbGyh2bfHgyyWZJ124Vimlz7FQ3LSUf KdsStFxAi/Or7uc6a+a2Ew1HwGNXI6a+r+KqRq9jAlQo/dLQTSv0xEHJuhh9AQF2nY65yp Ieup5xmxrOuc+LXU8UTcF2WbxN0+OFELF4Xo+E3FIGCAQJGwoBO3mSBKUGrZyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691192589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WoTWaJWWrS7U364n12YwgJqgJhjxedPy+aRtg5I5SJ0=; b=maHxvkNdL5CsOL/oAbGuoF6q9mBTNSaDOt8bCdiUoJhkhlNbl9v8UvYFq4PXnGR/H7nOlb y5j47MNQjjFL1/jT6kRfnlqRFGWLp+giZg9XhUX3CDg92fA1NLgOMI0C1L/OZh85VOjOMV gbarYa2ZnFCE8HHAInYz0dQdOHyz/pZZon9zRNi2fhZGdfnnbgz7xIsxKEDR3tJfGe6wSI QeeESWukHrJOil5fBwzYttaCU2vcfOj0eLR4n2XsxybNYbtnyhOsS4kDIkOvnqufO4pPPY zsfgEofGIhxd9/RPy6mUfZx+3SwdSYSYrG3y+04BJY/mE9mP9D87mlcpuvcjMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691192589; a=rsa-sha256; cv=none; b=GyT0IlSji+QIubv6+hu5ZnDiYenQRbhvgAtvqbH5Ap1vUw/TErX4xAqdCMyDal1mrnIESS fQgsiaUZQvnhCYDycQ+LElni7p6Eho627IM7U6HlfNPMJAqU2U8ot3Yh58tXfSxeo+qBAz F4MN5/DRKalBjkYBQSLpo5a6iMG3YW7EaxzWgVkiPW9O6kpS2/WiJineeIG1HIJWNCBFOP qIUkG5T2L9F5kmd5dZN/T/KKsI1T9kxC3asZRm+XpBzFfzPcZlkCVVCmU7kK1Y4h1C1sEC n9kdYOq4fK6PoU5yoWzna8DP18bkJcetMIAyh/hwzyuRUlWjYnwMsAdfRB2NXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHj2N6y4Vz1Lsf; Fri, 4 Aug 2023 23:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374Nh8N5059202; Fri, 4 Aug 2023 23:43:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374Nh8UW059201; Fri, 4 Aug 2023 23:43:08 GMT (envelope-from git) Date: Fri, 4 Aug 2023 23:43:08 GMT Message-Id: <202308042343.374Nh8UW059201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4af849d71f69 - main - cd9660: Reject volumes with small logical block sizes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4af849d71f69306432941d91fa46c3c303059d63 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4af849d71f69306432941d91fa46c3c303059d63 commit 4af849d71f69306432941d91fa46c3c303059d63 Author: John Baldwin AuthorDate: 2023-08-04 23:41:50 +0000 Commit: John Baldwin CommitDate: 2023-08-04 23:41:50 +0000 cd9660: Reject volumes with small logical block sizes ISO9660 permits specifying a logical block size that is any power of 2 greater than or equal to 512. The geom disk layer requires requests to be aligned on sector boundaries of the provider. With a volume that uses a logical block size smaller than the underlying disk sector size (e.g. a logical block size of 512 or 1024 on a CD which uses 2048 byte sectors), the current cd9660 vfs can issue requests for partial sectors, or on non-sector boundaries. Fixing this properly would require wrapping all of the calls to bread*/bwrite* in cd9660 vfs to roundup requests to be on sector boundaries which can include both the length, but also the starting sector number (and thus requiring use of an offset relative to b_data in the resulting buf). These images do not seem to be common however given that no one has fixed this in cd9660's vfs in the past few decades, so just reject them during mount with an error. If such images are found to be used in the wild in practice, then the larger fix can be applied. PR: 258063 Reported by: Robert Morris Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41228 --- sys/fs/cd9660/cd9660_vfsops.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 6d5551c69312..015d4b308978 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -336,6 +336,13 @@ iso_mountfs(struct vnode *devvp, struct mount *mp) goto out; } + if (logical_block_size < cp->provider->sectorsize) { + printf("cd9660: Unsupported logical block size %u\n", + logical_block_size); + error = EINVAL; + goto out; + } + rootp = (struct iso_directory_record *) (high_sierra? pri_sierra->root_directory_record: From nobody Fri Aug 4 23:43:10 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHj2Q2gLNz4mFcB; Fri, 4 Aug 2023 23:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHj2Q1h1xz3Ld8; Fri, 4 Aug 2023 23:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691192590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vv8bo4OBbga5du6dZ2z2MOMXHZcBhR7+fqsdaV6QSRU=; b=h7+rE1xjfFkLa9050Fi3z/eHJpqSKtrXRfwsBlqdpTI3fIJ7slLrnbJhU9r/tDxvGvnMoh lmXYulsAUZ2DBNm6fW/R4B650qZT8+KdC9F/11zaiyaOo6EyTM3F0p36HHHIupKsTtrJzS npipSKGRirEScWUEwca9w01pc9Z7R8lwGg7aXpDClU9cCU3bnoaxql7eLLjAPXtpPe1fQE tDZUiIlT7rwDiSSOZfyymVAAKsunbjI8TvpjJEGlKTw9gzxtmGFdIXxxwKSwoodpV+klMj CMJjaXAvxsYeRP5USVOD5Clw7PCumXvYZsHLwTkkYApzK98lzv4tDrZdeiUr4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691192590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vv8bo4OBbga5du6dZ2z2MOMXHZcBhR7+fqsdaV6QSRU=; b=qAL48XfcR3W9djDm/IiO/ugdTAUAOaDH62z6oGY3Q9aAsS4lhj/a4ITCEvaOMMn+8doT/O LPmRdxXKbaJq9OO9Cd+gOXxsmH+aa4GrWSzdq+5+l4OLl+I3ywW1jGN5XHtVd3tXnsw7Ic Tb7/wb9xr3rZFqMkuLCCKlSQNeJUhXPwnXf1BEo1Hq/MnBd5MvAcaNc+r4/FUcbNYMaoWL P/J+IfCz4Cy6V/C0V39Zt3dlQW6dPwDvQGG/oLY8qi3fIOKDgvd1SePo9eAdZ1bWZsN7hG XRBdKgfpVKTaY6uP+mI44zt4QIGKCx80AqY0hX3Tf8JIFH/JabK1Wyxxb65W2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691192590; a=rsa-sha256; cv=none; b=m2/Tai3w7UfrqBHJChHlpb1ZO//5IExfZe0cTp0rQD0PvGj8IsHmN/qPfAk+1BqR434Xsl 71r+GlokWHLQE1MOc7Ow289OqJt7csTEScAMmUqfbrrWxdWBA0+qcs9ZdcFUgatzl3LXLZ 8totsZM6XiqorGJ44TwhGTJfy6tmSBbDucfxEAaCHbGgQg54zvewnHkzAtZCgJPm3JM0KO 1AHIqSM9vZo5UedNah1CEZurZjsUNEKc7KaiYvVPDJxhAKPyForHuepEOncP25MOfKLFRW EOnRhLDFgmvwnyHRPh7pLXXI2gpuDEsFo+CPtLYDQekdsUGVwNRREII9g1l4kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHj2Q0mnsz1Lr7; Fri, 4 Aug 2023 23:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 374NhAoh059226; Fri, 4 Aug 2023 23:43:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374NhARn059225; Fri, 4 Aug 2023 23:43:10 GMT (envelope-from git) Date: Fri, 4 Aug 2023 23:43:10 GMT Message-Id: <202308042343.374NhARn059225@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: aca3d65fedff - main - netsmb: Add bounds checking to smb_t2_placedata List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aca3d65fedffbbe71399a88d33ea8ecf550177eb Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=aca3d65fedffbbe71399a88d33ea8ecf550177eb commit aca3d65fedffbbe71399a88d33ea8ecf550177eb Author: John Baldwin AuthorDate: 2023-08-04 23:42:41 +0000 Commit: John Baldwin CommitDate: 2023-08-04 23:42:41 +0000 netsmb: Add bounds checking to smb_t2_placedata Verify that the requested region of the mbuf chain is not beyond the end of the chain before trimming it from the end. If it is out of bounds, fail with an error (EPROTO). While here, properly handle the case that the amount of data at the end of the chain might span more than one mbuf by using m_adj to drop the extra bytes rather than assuming m_len of the last mbuf can be adjusted directly. PR: 258504 Reported by: Robert Morris Co-authored-by: Robert Morris MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41229 --- sys/netsmb/smb_rq.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c index 3e4fc0804620..1af1ff92dfa0 100644 --- a/sys/netsmb/smb_rq.c +++ b/sys/netsmb/smb_rq.c @@ -425,12 +425,18 @@ static int smb_t2_placedata(struct mbuf *mtop, u_int16_t offset, u_int16_t count, struct mdchain *mdp) { - struct mbuf *m, *m0; + struct mbuf *m0; int len; + len = m_length(mtop, NULL); + if (offset + count > len) + return (EPROTO); + m0 = m_split(mtop, offset, M_WAITOK); - len = m_length(m0, &m); - m->m_len -= len - count; + if (len != offset + count) { + len -= offset + count; + m_adj(m0, -len); + } if (mdp->md_top == NULL) { md_initm(mdp, m0); } else From nobody Sat Aug 5 00:22:20 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHjvd2BvFz4mJZX; Sat, 5 Aug 2023 00:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHjvd17kXz3S0Y; Sat, 5 Aug 2023 00:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691194941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrzGtVT63xpYgncOWVtIQZworWry0Drqe8Tt8swYZkA=; b=XrvvUCxwS+stYcbPBi+Z2wBLJ0Nym6N+T+sCI+CZ1alKp4pMNYschrMPsp/E54QMclOsLI IiFfMXNPmNRoS9CU6cvF3R7TE1VgjyB/EpQeDT1aiK3w2fwPMtjj0373RQsd9c6yQiqt6x mV/6IMiMw1KUZXJJfvJ4TUD2vvpCDX9gDbVmjrYl3H/ZDd0H+Gr/q76zVxppJd87ARSl9t C2b2yeyZJuZGUNeixEEV/VUAPu6TFofsTkfT+XWmd5U6fHSvwig71KwMyKqIND1cSEDF9W LzqYvJYa4XJP166sy+v/6y4MlwXquN5bDTvQIj3fzSnLgF+SSFPE/neRCD7qbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691194941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrzGtVT63xpYgncOWVtIQZworWry0Drqe8Tt8swYZkA=; b=AUImTPlwtDSprmbJky8dQYd5Eju220d1ODtG9j51p5cdWSwN6L/4LBeWMnyaPq7qk4cxTa OY2J4PTNTwkjIkZmWETN7JIVIV7sULKkQkKz6CONjAQVIRErphwwq83uxNLqZbQ+220vbo n/V8oZhWPemmEb0doGLTIq6DE/mJRkCJfBJr2UzgrTgcEYRUgSdiHW3LGdQG9RMRqgh8zb H+pwFg0mT49IVUyJXXV2GYgFqEegHvJbh+Ligty+LH72NPPYWJ9I3idG5MlOEERZOndHzW 6XP9pTMeqAyMloPPyGVvKXUCqtNZpsc/J5JS9QCxhEu+c46hBI2J4K3ZvGbgNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691194941; a=rsa-sha256; cv=none; b=lv4uUQM+AhMuZ3dokOjyEJqEbWVu33TERaQ1a3vnxQCban+BVkul82pZ2YipSAioNX7y/K TDLBgsjbOkFskbFiWTXnotUc9OrnfrqXtAPJzzj5XHXexUoI234kHPX8k0PSZGHI9sCirP 1X5xnAViU+MyAq+GmWUFMfy7Uw1/+OhNcWXj6Ncwu2paBXK3CdFaveGSsNoqkQxD2TojYe Wp8c2rnJ8KYiqTCveCGP9dEsYv5nDQWTMmQAIaLWubeN36Ra78O1BSXt59lRcTpMHtmLSp 6sON/DE0RGMrkWhFWFV8bjoN3pdijkLf0tanmvZJ37vtK10NImme8WGvLy3moA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHjvd0Cc1z1N8K; Sat, 5 Aug 2023 00:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3750MKX8025419; Sat, 5 Aug 2023 00:22:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3750MKem025418; Sat, 5 Aug 2023 00:22:20 GMT (envelope-from git) Date: Sat, 5 Aug 2023 00:22:20 GMT Message-Id: <202308050022.3750MKem025418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 106c9ff5aca4 - main - stand: Export _start on arm like other architectures List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 106c9ff5aca46b3bf9c82c1a56b432134a7cf36b Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=106c9ff5aca46b3bf9c82c1a56b432134a7cf36b commit 106c9ff5aca46b3bf9c82c1a56b432134a7cf36b Author: Jessica Clarke AuthorDate: 2023-08-05 00:14:16 +0000 Commit: Jessica Clarke CommitDate: 2023-08-05 00:14:16 +0000 stand: Export _start on arm like other architectures By not exporting _start, we get various warnings of the form: ld: warning: cannot find entry symbol _start Note that in practice these don't matter because we manually construct our PE header and use objcopy -O binary, so the entry point is set to whatever we put explicitly in the PE header, but we should still do the right thing and silence these warnings. This was found in CheriBSD, where bsd.prog.mk has similar logic to bsd.lib.mk and sets -Wl,--(no-)fatal-warnings based on LD_FATAL_WARNINGS (unlike FreeBSD which only does so in the latter). --- stand/efi/loader/arch/arm/start.S | 1 + 1 file changed, 1 insertion(+) diff --git a/stand/efi/loader/arch/arm/start.S b/stand/efi/loader/arch/arm/start.S index 5b6182d67d0a..bd8f425ca9e0 100644 --- a/stand/efi/loader/arch/arm/start.S +++ b/stand/efi/loader/arch/arm/start.S @@ -140,6 +140,7 @@ section_table: _end_header: .text + .globl _start _start: /* Save the boot params to the stack */ push {r0, r1} From nobody Sat Aug 5 00:43:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHkMg6L4mz4mKcd; Sat, 5 Aug 2023 00:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHkMg4hHtz3VSr; Sat, 5 Aug 2023 00:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691196191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tqyr3hd/IDkWHccXHbrwTyF0EliAZfvHsYY3F5FM/pI=; b=oUm01CHEZg1syVrRJhZhqnFgWARtGiS8F26+GFODdyfICQyj8NnDrmKFQRRKSuNznj1jGt Q2SySjYQ5oeEMZZ85r9dURGH/Ggc0fd6NLxpm5VMQPXlrxP9rjP+3TpN5eCnwhbunYjq30 vuot7wkznZJj3xq4/y819DapPz6WodhZz0pREO7Hsl7sZLCh4CFgxsha8XYjnClqc5PpvX 5IPiXYVGZn5JsSSAoQDg8lvHYgRyeR2X8dMK1F1FyudwW8r6+5Dq1gkC+UOINUDDbCLERD PSnDUzTw3vZswubxBFQ2oDZ/4KzuRWtGC0epIZLruJd1I+e+54i2MzFLpun3Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691196191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tqyr3hd/IDkWHccXHbrwTyF0EliAZfvHsYY3F5FM/pI=; b=xq1B9ldx+XW/RfY5zpJftVgwnC0Y8d5PzwpE1afzsGyZvkdyXYY6COUlt09Ia+Q3y4M1vJ MVNc7s8C1EAFDnSpjcZ3KjzcC7eTZDipvYMJ5FIr87RmRq5CIL5cNFjMEGjYncUVq9Ag2F dzRRpZlAlO86e6dAzeLk+yCljOvTWCOX8evqTL+gB/3QWm8Q+QZfe/3Y7Rkt1nh3Pxv887 ouIx2FwGjp9Lvxz4njhOS+dR+Gi/uIZyBqDMElCXMXMy6SHwV7cXWXCHRWLzamRaVigE7U 1t/KmrVpS6tpzz3McgVHL7hDSdg1oS3DMEinGpa/ymJw/nf6qzUoAkQovBvLLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691196191; a=rsa-sha256; cv=none; b=GMJKzaSjGrTIy9E2ZV0yKEZApn8q18GQL2iBPdOM0+u2dp8ZlL8v9xwYxX2CtaAQ3ulwTr L5e1aU9fPixz+ICOjdQZspXfRq1lxAkrt4E/f3sqhJ1zQx4IkLE0mWi296lNXYo0J4m7yo uYIt/r77TQtbg0UVqe327P7FaZ35/BSb+syFRl2zNWHs7Rm60w6xLToeA8VdfPoaEzeKjD Jwd6W9SVJ9CSH1AHWaa2As1cNPEaeAwTP1uC0CRl0GjNBst05F8DWdAcAUnS2zfVzYy5ZH MkNNF7Rxxif0vCmzV7/eLPyj+MfAJeemQbxiTKj0W/GFT2ATyAu/tVdQHavwRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHkMg3mqwz1N7l; Sat, 5 Aug 2023 00:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3750hB7S058091; Sat, 5 Aug 2023 00:43:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3750hBWw058090; Sat, 5 Aug 2023 00:43:11 GMT (envelope-from git) Date: Sat, 5 Aug 2023 00:43:11 GMT Message-Id: <202308050043.3750hBWw058090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 452661c96721 - main - exit1(): fix a comment typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 452661c96721e0f8a8117f21b679016b6ec2c59c Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=452661c96721e0f8a8117f21b679016b6ec2c59c commit 452661c96721e0f8a8117f21b679016b6ec2c59c Author: Igor Ostapenko AuthorDate: 2023-08-03 11:49:27 +0000 Commit: Ed Maste CommitDate: 2023-08-05 00:42:07 +0000 exit1(): fix a comment typo Signed-off-by: Igor Ostapenko Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/809 --- sys/kern/kern_exit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index a92d5cc0f642..cb0939ded6e1 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -691,7 +691,7 @@ exit1(struct thread *td, int rval, int signo) prison_proc_free(p->p_ucred->cr_prison); /* - * The state PRS_ZOMBIE prevents other proesses from sending + * The state PRS_ZOMBIE prevents other processes from sending * signal to the process, to avoid memory leak, we free memory * for signal queue at the time when the state is set. */ From nobody Sat Aug 5 01:00:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHklg5HpJz4mLfL; Sat, 5 Aug 2023 01:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHklg48s3z3XWv; Sat, 5 Aug 2023 01:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691197231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Hzs5ONwXofbHQc2bWX2IGLpHKtZNCyFsY4OT9HXrWg=; b=fKFjQeNedwSKyMlMJ5Ut9doNSnn7AJuZ8kU+K9fDs5JN8BmAW/OmXTl4qO/b4uABEicyAi k/pNC0gFCw4zPvDwipwMVOoOWZP4TMcNTl2MHIM2LoWlTGumYoA8x2JPaoMrMPluUYTxK6 z1lNigLM56/QoskoCkAk/df6QRmRXHHdwRW4wccJU0K1JXciPbghc17CTek3rzW9s7YOlp Cpom4JIW0g4HMxwLlN7JNwBj5FKujRfIn4Gp/calWjQHaGTl6iKbn+aexBVTm/R/3ednN4 ishT6v7p0tasYqXQxrh5u/a9OGM6YYYrEgvYhg3K7z66Zx9G9n+ntKbOa7IwKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691197231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Hzs5ONwXofbHQc2bWX2IGLpHKtZNCyFsY4OT9HXrWg=; b=lxbZY9q/ARNO99afsuz8J9ZH+M4SMnYRaQTRt+YlJWbtQvWAjsoHSmu9TmEjXOvjmxWSvX ek3rovthMaEXhBJ7Zv2I8vrsCf7AC8w+aIyNWscbqIyV6gZ56uN7YN27Zti7C3UFgTfQ4i r9LUNK5gjE+M7VzqCtB3F6CYD4NIRyw8sIboHsszjapYBd7Hfh/ykRPMB5ydALfIFw44hq E8847ksFV4JMXOj7elnRbFxZ/juh39HwLj/pK7MoMljfJKf4sHOypTddwdpiNHw6BX+Xch OgEmZBKvlQF//6nM4qWl94uoR+eCh1R0KtSzgFvnI4SMNPgiv0ZZK9RoaJAjBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691197231; a=rsa-sha256; cv=none; b=eT0V1+mi+236djMXsDmsRk/W2VlY4tL2vjK9lsdHhEr7oBlbgHA1YPvEFclr2v0+a8LAN3 bPx2R3mTPmoy41arir789D3+u1HJzNwWE8xv8gHmUdNl5tfLt7F/VVDZSOhgdCtzWbSm/X Vja2B1rUaE2EFWURBG+Afxz0dyQFu+z41hWEgMzHRdH4Kd1/vCBFz5gT5MYE0sL1t40MLD A6ncEkCyU6U1VuxbDLIXUW7q+t2Hpi+YE2YFMbRqrN4E6YN+E94XcbcFsepovsPPhpMpYS ASzQidMREkozUmzcC7R8FtM48a0fVAr/h0JQ7dd19a1Wcy7DrfEhQ8jwYAZzQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHklg3Bssz1NwT; Sat, 5 Aug 2023 01:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37510VN9085556; Sat, 5 Aug 2023 01:00:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37510VDJ085555; Sat, 5 Aug 2023 01:00:31 GMT (envelope-from git) Date: Sat, 5 Aug 2023 01:00:31 GMT Message-Id: <202308050100.37510VDJ085555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: dedc71fd3890 - main - libc: unsplit log message to to make it greppable in src List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dedc71fd3890803a81047a0c480b95a327bd7214 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dedc71fd3890803a81047a0c480b95a327bd7214 commit dedc71fd3890803a81047a0c480b95a327bd7214 Author: Ed Maste AuthorDate: 2023-04-17 15:58:59 +0000 Commit: Ed Maste CommitDate: 2023-08-05 00:59:30 +0000 libc: unsplit log message to to make it greppable in src Also use __func__ rather than hardcoding the function name. This code now fits in 80 columns without splitting the log message. Reviewed by: zlei Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39619 --- lib/libc/stdlib/cxa_thread_atexit_impl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/cxa_thread_atexit_impl.c b/lib/libc/stdlib/cxa_thread_atexit_impl.c index 0f0a7a314fa9..cdd918e2c496 100644 --- a/lib/libc/stdlib/cxa_thread_atexit_impl.c +++ b/lib/libc/stdlib/cxa_thread_atexit_impl.c @@ -109,8 +109,9 @@ walk_cb_call(struct cxa_thread_dtor *dtor) __elf_phdr_match_addr(&phdr_info, dtor->func)) dtor->func(dtor->obj); else - fprintf(stderr, "__cxa_thread_call_dtors: dtr %p from " - "unloaded dso, skipping\n", (void *)(dtor->func)); + fprintf(stderr, + "__cxa_thread_call_dtors: dtr %p from unloaded dso, skipping\n", + (void *)(dtor->func)); } static void From nobody Sat Aug 5 02:11:37 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHmKj2RCwz4mQls; Sat, 5 Aug 2023 02:11:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHmKj20bKz3cYQ; Sat, 5 Aug 2023 02:11:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691201497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aK1Uka0suiNT5e3VkAmczeQhrxFPmmSGj13RbMG0eTM=; b=d1zYa9P/HVmlT3uiicZd99EbsI6hfoLG//weA4h5enzzHEigy1fzwU/hDG8T6fk7X+b4NZ zfVYPbtwip6KCMUKej3exK6H8BA34kI7wqE0xVZ4pt3w3pWkbU+AVAvLv8Ih24uu+8LlQU HflmG5QG7gZJlzM+O/d5ljsiU3MLulwmLj7xTMXDcf7xtLOwJjy3DYQywW5ukUDfaviZAc 6lDKeKFcEXLzM8U2JFgT8oGudyyXHGDYVlcVqdRxORvzkxnGcgvPx0gVY9M184XqdevUsf +hXoR+Dl6CMEsfo4KeNQGto8YoN1Ih+uI+4kfRGFDnzSUqZoxzYxV/GjQ/9ndw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691201497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aK1Uka0suiNT5e3VkAmczeQhrxFPmmSGj13RbMG0eTM=; b=t23xO0ijs2FpqROQ4UHZ+qBpFpgtjq12nWoLrsb+zgf/FdhE5mmul3nJxmFYc4aCT5uROl GnP8LzMmkq2ey0ItixGmqI+oVND/I4R8en+9MdeurV9Kk8hV1jixV/EItbW2tOZZbOlo8t C5mQ10vCjUt1axpLY81j7j041V1YS0YmCrApdlQDdopXjaCDJT0Rls5txB6JXNN4AbkE/V AzYLrd0IpOpJTCwX71NpoJxxZcLiVOo0lMQWWqgRD8MQNBuCdMA/WoUnRX0Jlv8ZA4X+cW 3wU3vorCqgaCuGFnb4mEBsHybTjhCE/ajbM552KiJWmir5Zi4uapGpx3nlzt1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691201497; a=rsa-sha256; cv=none; b=UH+nHOM8I4Vb/lsKLXj3hmK/Emq8pr7y+lV3oGtnLPhq4HsQ/CceeHnqfeWjXsZkFfpZ8d YKW6veuZhOuWG4QeGHzMZk+mSWPp5PmDT6xTlHomld/0Ui31lHbgXB/l2xwOU1NEoAIn2B +c6iEd57AsI35wQSH4cQUUSsGRcrt03Tbpr2QIik42W2H8jnAlAsNoWMLytapZ6mH22XDp nMUZZMSTBMgjPeILHnU+7mTprPPCEGizY4YUlVI/NNt/GAj/nhJv28ATop8vheBOAdPm8D 4TMs0szedHsn9wo3GpDoWhSxgY5VKERFOipKLytsl6RkdVRk+VBrbOqmFWttnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHmKj13Lpz1PvM; Sat, 5 Aug 2023 02:11:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3752BbCv004018; Sat, 5 Aug 2023 02:11:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3752Bb1I004017; Sat, 5 Aug 2023 02:11:37 GMT (envelope-from git) Date: Sat, 5 Aug 2023 02:11:37 GMT Message-Id: <202308050211.3752Bb1I004017@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: e77f4e7f5972 - main - vm_phys: tune vm_phys_enqueue_contig loop List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e77f4e7f597261bc873227a0dfc05d178c367727 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=e77f4e7f597261bc873227a0dfc05d178c367727 commit e77f4e7f597261bc873227a0dfc05d178c367727 Author: Doug Moore AuthorDate: 2023-08-05 02:09:39 +0000 Commit: Doug Moore CommitDate: 2023-08-05 02:09:39 +0000 vm_phys: tune vm_phys_enqueue_contig loop Rewrite the final loop in vm_phys_enqueue_contig as a new function, vm_phys_enq_beg, to reduce amd64 code size. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D41289 --- sys/vm/vm_phys.c | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index a3af3964fba4..bc9db6559bfe 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -680,6 +680,41 @@ vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, int order, } } +/* + * Add the physical pages [m, m + npages) at the beginning of a power-of-two + * aligned and sized set to the specified free list. + * + * When this function is called by a page allocation function, the caller + * should request insertion at the head unless the lower-order queues are + * known to be empty. The objective being to reduce the likelihood of long- + * term fragmentation by promoting contemporaneous allocation and (hopefully) + * deallocation. + * + * The physical page m's buddy must not be free. + */ +static void +vm_phys_enq_beg(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) +{ + int order; + + KASSERT(npages == 0 || + (VM_PAGE_TO_PHYS(m) & + ((PAGE_SIZE << (fls(npages) - 1)) - 1)) == 0, + ("%s: page %p and npages %u are misaligned", + __func__, m, npages)); + while (npages > 0) { + KASSERT(m->order == VM_NFREEORDER, + ("%s: page %p has unexpected order %d", + __func__, m, m->order)); + order = fls(npages) - 1; + KASSERT(order < VM_NFREEORDER, + ("%s: order %d is out of range", __func__, order)); + vm_freelist_add(fl, m, order, tail); + m += 1 << order; + npages -= 1 << order; + } +} + /* * Add the physical pages [m, m + npages) at the end of a power-of-two aligned * and sized set to the specified free list. @@ -1190,14 +1225,7 @@ vm_phys_enqueue_contig(vm_page_t m, u_long npages) m += 1 << order; } /* Free blocks of diminishing size. */ - while (m < m_end) { - KASSERT(seg == &vm_phys_segs[m->segind], - ("%s: page range [%p,%p) spans multiple segments", - __func__, m_end - npages, m)); - order = flsl(m_end - m) - 1; - vm_freelist_add(fl, m, order, 1); - m += 1 << order; - } + vm_phys_enq_beg(m, m_end - m, fl, 1); } /* From nobody Sat Aug 5 02:11:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHmKy6N43z4mQn1 for ; Sat, 5 Aug 2023 02:11:50 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHmKy2zrTz3cwj for ; Sat, 5 Aug 2023 02:11:50 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-317798b359aso2202611f8f.1 for ; Fri, 04 Aug 2023 19:11:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691201509; x=1691806309; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E5HWLlMCIjjCz9z1CjpIvjkT/jbtvGLsuljHefjPX/U=; b=JLsEPNjESQayHrqgSNuwp3inYX8tQkl6NAwl7xYJLIgJLZFHalJndwigZd4G6mpzDy ieyGqmeVFq6IEI9YufrC2z7xYHgN00pNCJfPnSsszNemTO3EdGPfWGEqgg22xB0oM3+k OafotA2ANIPy4urrzCOZ67/mDDU6yB7bJQBqR23lt/cp8SjDjDUk0VWRqSoEIKAwI4/1 m8fVIcf3Cw5d94RWmfYl3uNQ7A0pKYSH+1qMAVFClHGYLogA0MlXBNqbbelnIy4nwOf1 26QBdCSO2tF2B0hZB9BytoOvHFikqMq+VlIf38ETxPngubuToqHJ4Raz1ckrhEBegSvp YRfA== X-Gm-Message-State: AOJu0Yx/KI2MYn6rKbNUErCHdaDlQHxBdtIzH4iGKyHbVtLU+Xmln9XQ faWXNGdYL09Q8tqGkfrEBZ3N6A== X-Google-Smtp-Source: AGHT+IF3VJKM8BJ+ktLkRA2ieBxVDW7BRfon7lvW03IFbvU0PSvdu7KoDnQn/qqYzTQFj/BGO3eG7g== X-Received: by 2002:adf:f346:0:b0:313:f1ec:f429 with SMTP id e6-20020adff346000000b00313f1ecf429mr2289476wrp.46.1691201507998; Fri, 04 Aug 2023 19:11:47 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id w17-20020adff9d1000000b00301a351a8d6sm3855836wrr.84.2023.08.04.19.11.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Aug 2023 19:11:47 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: dedc71fd3890 - main - libc: unsplit log message to to make it greppable in src From: Jessica Clarke In-Reply-To: <202308050100.37510VDJ085555@gitrepo.freebsd.org> Date: Sat, 5 Aug 2023 03:11:36 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202308050100.37510VDJ085555@gitrepo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4RHmKy2zrTz3cwj X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 5 Aug 2023, at 02:00, Ed Maste wrote: >=20 > The branch main has been updated by emaste: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Ddedc71fd3890803a81047a0c480b95a3= 27bd7214 >=20 > commit dedc71fd3890803a81047a0c480b95a327bd7214 > Author: Ed Maste > AuthorDate: 2023-04-17 15:58:59 +0000 > Commit: Ed Maste > CommitDate: 2023-08-05 00:59:30 +0000 >=20 > libc: unsplit log message to to make it greppable in src >=20 > Also use __func__ rather than hardcoding the function name. This = code > now fits in 80 columns without splitting the log message. This doesn=E2=80=99t match the commit? Jess > Reviewed by: zlei > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D39619 > --- > lib/libc/stdlib/cxa_thread_atexit_impl.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/libc/stdlib/cxa_thread_atexit_impl.c = b/lib/libc/stdlib/cxa_thread_atexit_impl.c > index 0f0a7a314fa9..cdd918e2c496 100644 > --- a/lib/libc/stdlib/cxa_thread_atexit_impl.c > +++ b/lib/libc/stdlib/cxa_thread_atexit_impl.c > @@ -109,8 +109,9 @@ walk_cb_call(struct cxa_thread_dtor *dtor) > __elf_phdr_match_addr(&phdr_info, dtor->func)) > dtor->func(dtor->obj); > else > - fprintf(stderr, "__cxa_thread_call_dtors: dtr %p from " > - "unloaded dso, skipping\n", (void *)(dtor->func)); > + fprintf(stderr, > + "__cxa_thread_call_dtors: dtr %p from unloaded dso, skipping\n", > + (void *)(dtor->func)); > } >=20 > static void From nobody Sat Aug 5 05:55:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHsHv4b8rz4pgB7; Sat, 5 Aug 2023 05:55:23 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHsHv3wV6z4X86; Sat, 5 Aug 2023 05:55:23 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691214923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b7H/b760qC2nWYM0EqFkLoi0seq5rs+4Uxg43npyAWo=; b=BJMQEo7GOLCz9GUqmUt2qOhNJjN1Xs2/4Khz2HFDWT8V8a1Xq8u4/lGExF+ZzxUvePW6pj TayvmNE5/ANDYBDkEhwzUiPfI4IH8jjUX6iMFymr5sC2RkGjyoaGSD74F5bEVGukpj61ds k4a75M1vnM5TlLPbZGsbOSHQkK57Pihxsb8xKh0a9UOQ8lQ0TmBVzgZ77vSY0ZJsTuYVSe 9GDZQZtjUaynNS32hu8bIdx48z37hPMYmZbdLmI1wRS+dqso+DomgfVJfmNujD5dGtmCk1 uR5ZrwUp/hb2+aJ1ZjDUQBtegQRnjqAVNDCsVeuhAPslXi2H0BK+WWo13TesSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691214923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b7H/b760qC2nWYM0EqFkLoi0seq5rs+4Uxg43npyAWo=; b=QG8UP2TS+IMuDpFr0gGoKIVHVdFDuv0EZmBcSskLOxKVbbBJFCmCO8+oo6m9meJFViuotw QAgKW7VSf2LwhkqioQGeMEoUkDihdwCQZqh/Xio9vvY439I7dUkUL5AGxOgSAfMU6O42fZ /+GyFx45oeS1RUMnqorjHUPr8MbG505/y7f+oMGyHKkSTgwrphPxjK/V80Gyqf7gepisCM so7mnLYsg9Wvtl4RxSRPIiOKf/AH4EcYbfd29D2Bnx7sMcOGRbykIsqDBWHvorJWFE02K/ wMKXl01FnfEHsg4qOMQWr227Bwq0cg6/rQ6MUJRVZrbnK0orzDyrlYxv30Qx4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691214923; a=rsa-sha256; cv=none; b=NElHVH/hOeV+PaB44wp8hnufpEB3ZR8B1Z/3ElM5pswOG8Vyrlld9rrylms8EMSRyIxM2s IlxET/4D6clW2Wi5zLUIrdci25yzvEO/QUE7cDGEdupjiArni/xw6ua7bEq8vD8W4Xj9w9 jEXCOoC4fbH6glQ47crnpOQvHXaqQYLZ/k8mf4R5RN+qa6GkqRfb8YFHNCKglGRH4PUZLN WdbQwuZXCwzD6E95p4DT5zYyqoz/DwCmDOyIbqqPOKnDUq/R5NDLfP9QZFSsKnZNaWuETk tmlR2u/IY4hiaWMqexFlLG/MFRkjM/Y/LPaND+6RZLMbfzVDiVz0eSn8s8xNkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.no (unknown [IPv6:2001:4647:d671:0:36e8:94ff:feca:9834]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RHsHv26rlz1KbJ; Sat, 5 Aug 2023 05:55:23 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.no (Postfix, from userid 1001) id D475F11D06; Sat, 5 Aug 2023 07:55:21 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mark Johnston Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 6de02228409f - main - dtrace: Add WITH_DTRACE_ASAN In-Reply-To: <202308021315.372DFig3021615@gitrepo.freebsd.org> (Mark Johnston's message of "Wed, 2 Aug 2023 13:15:44 GMT") References: <202308021315.372DFig3021615@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (berkeley-unix) Date: Sat, 05 Aug 2023 07:55:21 +0200 Message-ID: <861qgiowxi.fsf@ltc.des.no> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mark Johnston writes: > commit 6de02228409fd2b7ca1d7e3b8d9043a105093cdd > Author: Domagoj Stolfa > AuthorDate: 2023-08-02 00:10:46 +0000 > Commit: Mark Johnston > CommitDate: 2023-08-02 13:15:08 +0000 > > dtrace: Add WITH_DTRACE_ASAN >=20=20=20=20=20 > See commit 4ae6991228105eb34989c870194ae7b0a1e23be4. This version of > the commit avoids inadvertently changing SHLIBDIR for libdtrace.so. This is still broken. % yes | sudo make delete-old ; sudo make installworld -j8 >/dev/null 2>&1 ;= make check-old >>> Removing old files (only deletes safe to delete libs) remove /usr/lib32/libdtrace.so.2? remove /usr/lib/debug/usr/lib32/libdtrace= .so.2.debug? >>> Old files removed >>> Removing old directories >>> Old directories removed To remove old libraries run 'make delete-old-libs'. >>> Checking for old files /usr/lib32/libdtrace.so.2 /usr/lib/debug/usr/lib32/libdtrace.so.2.debug >>> Checking for old libraries >>> Checking for old directories To remove old files and directories run 'make delete-old'. To remove old libraries run 'make delete-old-libs'. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sat Aug 5 06:02:40 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHsSJ2qXrz4phDL; Sat, 5 Aug 2023 06:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHsSJ24Bkz4XnB; Sat, 5 Aug 2023 06:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691215360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I8R1YxunGpJSth1K1UlEqd3aQiDo14/6a7SDkJl+dRI=; b=iadj7w4vTjaRbsAWZeqP1di/q0oR3ll3DtHxzIndb83jMTZXxEQPRu4DNTQKVtsd29K9zD tbzpSz9umxdoPSVmJyoiAFzOz4ho+deyhxv2hA00TsyiLiaIdZVTlO/oRWL0wv1wLdPMcM NgOcoZn8DICnjp3XmYEGH4Vr3NzyqrBB0vtRBTqMrW8ONd0Z0XWWpQ5Sh+Tv54M/Q2b0tc hxLgqHcXHnB/m+VTV/F9bTAVZqCI3prZpba9G20y9JTrnaXlteUSbkt1rKTNjP4scATJYy gA8+68NJlTJkXJ9vi2sR9SSG2P6lpeNM12PRK6fM8JlvG5psNActkNV/Tu/QLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691215360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I8R1YxunGpJSth1K1UlEqd3aQiDo14/6a7SDkJl+dRI=; b=sJzvXYEDG3Kjs1KVB8FT/9QQViTUvmY8UKNacqfZhZBQWzH7nwf8WUaS1VZE0/E8c2q7w/ 8LalMG/vwG9/GZDBAi/WaAd31vd+zWfkMEj3zrEC/GM5v2NBcHFUBBeRdKhC4TPmKp+vol e2VOa+H1BoAhS+BrkfcMgFPxrZRxZj6Yxa70M2Zip531GhIlWtc+xFQvNrIbCykdT9FSYg 4nKwHHQQ9g4PwDPxTqIw3K6WEe5jPfg+0BZnpQ80nOsRlJNi5t8jL+qHS+jIBYvAAMtAaF mpfWM+o96UxFEGl9pIXowoQLmZM8vxh2TpBsCm6eCuKuUDCRRW1ezSFCPWXbcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691215360; a=rsa-sha256; cv=none; b=ter5TrdaqWo+8aE5rp7k/w3Kxdn6xRNFycenLVkLOAUGksb1d6Av9165sNse/iOu0eCXS4 0p5JKw8dAFQepW4DSF1TFA2I5LMQKUgKP0IqJkVnYY20frfUShB/Q8SlaHWZ9tyJubffdU E/V8qhpe3FCEm/+Ai+PZyE3cQ9VW+P6O3HDfjhtTEp582ovmz0wqERmvkYtWcKFe2Vrg/A nxDnyf3XfNmozDFGBJv2Vw9q8ozLnT5nvfrqYJw+oVQbSnZH/3q9fOa9z8KQKZJqstTA9b BAaQ9A5NQVzm01b05YBIfYdnd1nx+u4SLuo9BX7nCZQNLfsgZCCM+iWj01ZAnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHsSJ16yGz3gT; Sat, 5 Aug 2023 06:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37562eoI093442; Sat, 5 Aug 2023 06:02:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37562e7L093441; Sat, 5 Aug 2023 06:02:40 GMT (envelope-from git) Date: Sat, 5 Aug 2023 06:02:40 GMT Message-Id: <202308050602.37562e7L093441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 995d2b3e3bcf - main - ObsoleteFiles.inc: Don't try and delete /usr/lib32/libdtrace.so.2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 995d2b3e3bcf69a0d705e41c98b1cb85c7a6316b Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=995d2b3e3bcf69a0d705e41c98b1cb85c7a6316b commit 995d2b3e3bcf69a0d705e41c98b1cb85c7a6316b Author: Jessica Clarke AuthorDate: 2023-08-05 06:02:27 +0000 Commit: Jessica Clarke CommitDate: 2023-08-05 06:02:27 +0000 ObsoleteFiles.inc: Don't try and delete /usr/lib32/libdtrace.so.2 OLD_FILES and OLD_LIBS implicitly include the libcompat variant, whereas MOVED_LIBS exists specifically for files that have moved between /lib and /usr/lib, and thus don't get a libcompat equivalent. Reported by: des Fixes: 5fd1da4d8501 ("ObsoleteFiles.inc: Add an entry for libdtrace.so.2 in /usr/lib") --- ObsoleteFiles.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 67bdb1f3d8e0..d77ced3c817d 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -56,7 +56,7 @@ OLD_FILES+=usr/include/net/iflib_private.h # 20230802: Remove a copy of libdtrace.so installed to the wrong path -OLD_FILES+=usr/lib/libdtrace.so.2 +MOVED_LIBS+=usr/lib/libdtrace.so.2 # 20230726: Removal of support for the VTOC8 partitioning scheme OLD_FILES+=usr/include/sys/disk/vtoc.h From nobody Sat Aug 5 06:03:21 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHsTK6rrpz4phGs for ; Sat, 5 Aug 2023 06:03:33 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHsTK4wNPz4YY7 for ; Sat, 5 Aug 2023 06:03:33 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3175d5ca8dbso2249069f8f.2 for ; Fri, 04 Aug 2023 23:03:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691215412; x=1691820212; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LVYpBHdaoswbWiUj6MItbnFyEC/15+Cl5J4hjeKtLvs=; b=bJf1LCOexjYncN0kM1JAebqyisw1IHHxL83NJfBu4a8v5wEQX3nYqPZxnjKGZ/eC7s 3WnnhTjrnWq36UP8oHHuLa12ns/hIIh77ZzkzpI2YaAEUjDSa9yXPDzbCtMWdl+MpPLh DcYXov8nqaFkdnBkV/8FImcgAV6sksMxtGYoZ0bbfGJ5ZVUAhCanzuVYA45ujlgWx5ZU x+kmE86IZB4XRrSxF3s3hVZnPy651tHVgHdIlyzc2BMpDnZ+2ochC3gEx09KQA55V3jl U3FQQNupdTG0mfzB6gjJhu72YZdrohctjJEAwOiBeuaEqNmMNDGI8ZxFUDKhx0hgtReG gvdQ== X-Gm-Message-State: AOJu0YwM5J+s+C/ZfCRDmj504xjn1F8TLu5PIkhnn5UxElN0aOmJgtYE 3aH97r013VWGh3X5o2u4i6ULYA== X-Google-Smtp-Source: AGHT+IGi97PWyfVVe/RMskIxsbTAEGvKyF+aiTo/jx4TvoiJEzn+Hz4gxfThNDKH2s31p1ty3uAZvw== X-Received: by 2002:a05:600c:260c:b0:3f8:f382:8e1f with SMTP id h12-20020a05600c260c00b003f8f3828e1fmr2612534wma.24.1691215411953; Fri, 04 Aug 2023 23:03:31 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id f10-20020a7bc8ca000000b003fe20533a1esm4057091wml.44.2023.08.04.23.03.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Aug 2023 23:03:31 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 6de02228409f - main - dtrace: Add WITH_DTRACE_ASAN From: Jessica Clarke In-Reply-To: <861qgiowxi.fsf@ltc.des.no> Date: Sat, 5 Aug 2023 07:03:21 +0100 Cc: Mark Johnston , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <503EDB9C-2866-4B00-9D13-408478EC599F@freebsd.org> References: <202308021315.372DFig3021615@gitrepo.freebsd.org> <861qgiowxi.fsf@ltc.des.no> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4RHsTK4wNPz4YY7 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 5 Aug 2023, at 06:55, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Mark Johnston writes: >> commit 6de02228409fd2b7ca1d7e3b8d9043a105093cdd >> Author: Domagoj Stolfa >> AuthorDate: 2023-08-02 00:10:46 +0000 >> Commit: Mark Johnston >> CommitDate: 2023-08-02 13:15:08 +0000 >>=20 >> dtrace: Add WITH_DTRACE_ASAN >>=20 >> See commit 4ae6991228105eb34989c870194ae7b0a1e23be4. This version = of >> the commit avoids inadvertently changing SHLIBDIR for = libdtrace.so. >=20 > This is still broken. >=20 > % yes | sudo make delete-old ; sudo make installworld -j8 >/dev/null = 2>&1 ; make check-old >>>> Removing old files (only deletes safe to delete libs) > remove /usr/lib32/libdtrace.so.2? remove = /usr/lib/debug/usr/lib32/libdtrace.so.2.debug? >>> Old files removed >>>> Removing old directories >>>> Old directories removed > To remove old libraries run 'make delete-old-libs'. >>>> Checking for old files > /usr/lib32/libdtrace.so.2 > /usr/lib/debug/usr/lib32/libdtrace.so.2.debug >>>> Checking for old libraries >>>> Checking for old directories > To remove old files and directories run 'make delete-old'. > To remove old libraries run 'make delete-old-libs=E2=80=99. Hopefully 995d2b3e3bcf fixes that. Jess From nobody Sat Aug 5 08:32:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHwmy1rr5z4Tpdy; Sat, 5 Aug 2023 08:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHwmy1NNSz4pkY; Sat, 5 Aug 2023 08:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691224338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QU3aZRPsJkdx/o4Vp7u7huE+BlCwG4BdB/hgdyz2kcA=; b=RsVpt+VrOj1XAraiNE35xRgH6SFKGU3lqdZuHBDYe4EJpiw0VQIpekVeUrYcjJPMX1+pDs xoazEsuwSBFlanG772Sl3vlJFxI5Izm/s0SDpNs8IbK7yPNeFtEthr1VA7m01lw9Pded+m u0BhVc0/lX2NVwpQKbFjYWicaw4whVHq1jorgmMyeJFrk0daFEwVfNJGsaAv77OnXe2he+ wZ2hKj00CWF9Di1y5UEWPYZKZGejAyWbrIxp9I+MaMDAdH38JJxScVH86o5Nim+b8bqkP8 BBOjPPgqE1QXw41k5mZkfBfqOOMtK0+wcb4U5NxRT2g3VC6fwns8Pstw7BxMYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691224338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QU3aZRPsJkdx/o4Vp7u7huE+BlCwG4BdB/hgdyz2kcA=; b=iVfdu0U+TzmYCXUWdVGV9l1qQO6riAV4vdW+AlvL5ONCXEoxiUu5/jNX61c+jy4hwcUG3i 4K9HvhbbwleHxT/0bXZFepNaJWjDDaOOkkbp1Fv4zR5RTTRw0Riu0e9TYTCsBxGam2L9/U uz7OULVCHMU1xAVfvphlg/XQNEe14bMFrC+sWphs4h2ckgkE65X+NKGkaQu/UOHLKiEOXT m5TTVAG3rq/bT7pWF5/hvg7YaNm2STKqvUOB4uhtqbLExYJN4iuxsstpQAXePyVtgeznmf BIYBr4AfeJHR7CkLo0VufdkXHKxGDn2MANHbfPB8IDw23s51c01Nr1ElJBSfuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691224338; a=rsa-sha256; cv=none; b=LgqPXQf3rLBveldukeiU6NiZCrzuMCGJN4qVC0FN+euJIYdZCvTuKBykdO1FYUpKQO5pc3 5+wLHKhqV6gp+CiQJSMIS+qAUbj4IZBGmksjk+urZK8dzO6L9vV+ayZFJzw2m6vghKIjJI wgrEPRjytazRcESH4ASY55CkmrU0KsxGPvwS8/79KOJTBeToqpYzTYjM6uvVVRdUt2Yg5w EEKa4vsiZxth4QnM2Bfg+hYQPKuJBoQdkDsOhKTcYawnRa+1kvK9avJzZ+EZY+CpQCw4ld iksFCAPpx6yqF4CC7vgt+lR//jEFPj6ZzHfGAh+vr4ZDXV+tqs8z62fg3BAyHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHwmy081yz7X4; Sat, 5 Aug 2023 08:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3758WHmY042624; Sat, 5 Aug 2023 08:32:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3758WHqC042623; Sat, 5 Aug 2023 08:32:17 GMT (envelope-from git) Date: Sat, 5 Aug 2023 08:32:17 GMT Message-Id: <202308050832.3758WHqC042623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Rabson Subject: git: 1d7ffb373c9d - main - pkgbase: reorganise caroot and openssl packages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d7ffb373c9d639c9645a6b09ae46b2b92adb2e3 Auto-Submitted: auto-generated The branch main has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=1d7ffb373c9d639c9645a6b09ae46b2b92adb2e3 commit 1d7ffb373c9d639c9645a6b09ae46b2b92adb2e3 Author: Doug Rabson AuthorDate: 2023-07-31 14:38:45 +0000 Commit: Doug Rabson CommitDate: 2023-08-05 08:30:35 +0000 pkgbase: reorganise caroot and openssl packages This splits out the certctl utility into a new certctl package and the openssl libs into an openssl-lib package. PR: 272816 Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41321 --- release/packages/Makefile.package | 10 ++++++++-- release/packages/{caroot.ucl => certctl.ucl} | 0 release/packages/generate-ucl.sh | 14 ++++++++------ secure/lib/libcrypto/Makefile | 2 +- secure/lib/libssl/Makefile | 2 +- usr.sbin/certctl/Makefile | 2 +- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index 9bd2994c882a..e1256e02b2ad 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -26,10 +26,14 @@ bsdinstall_COMMENT= BSDInstall Utilities bsdinstall_DESC= BSDInstall Utilities bsnmp_COMMENT= BSNMP Utilities bsnmp_DESC= BSNMP Utilities +caroot_COMMENT= SSL Certificates +caroot_DESC= SSL Certificates clang_COMMENT= Clang Utilities clang_DESC= Clang Utilities clibs_COMMENT= Core C Libraries clibs_DESC= Core C Libraries +certctl_COMMENT= SSL Certificate Utility +certctl_DESC= SSL Certificate Utility console-tools_COMMENT= Console Utilities console-tools_DESC= Console Utilities csh_COMMENT= C Shell @@ -113,8 +117,10 @@ nfs_COMMENT= NFS Utilities nfs_DESC= NFS Utilities nvme-tools_COMMENT= NVME Utilities nvme-tools_DESC= NVME Utilities -openssl_COMMENT= OpenSSL Library and Utility -openssl_DESC= OpenSSL Library and Utility +openssl_COMMENT= OpenSSL Utility +openssl_DESC= OpenSSL Utility +openssl-lib_COMMENT= OpenSSL Libraries +openssl-lib_DESC= OpenSSL Libraries pkg-bootstrap_COMMENT= pkg bootstrap Utility pkg-bootstrap_DESC= pkg bootstrap Utility periodic_COMMENT= Periodic Utility diff --git a/release/packages/caroot.ucl b/release/packages/certctl.ucl similarity index 100% rename from release/packages/caroot.ucl rename to release/packages/certctl.ucl diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index 2b1f71e95c11..0c90a9ec4553 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -42,8 +42,8 @@ main() { # clibs should not have any dependencies or anything # else imposed on it. ;; - caroot) - pkgdeps="openssl" + certctl) + pkgdeps="caroot openssl" ;; # -dev packages that have no corresponding non-dev package @@ -139,14 +139,16 @@ main() { cp "${uclsource}" "${uclfile}" if [ ! -z "${pkgdeps}" ]; then - cat <> ${uclfile} -deps: { - FreeBSD-${pkgdeps}: { + echo 'deps: {' >> ${uclfile} + for dep in ${pkgdeps}; do + cat <> ${uclfile} + FreeBSD-${dep}: { origin: "base", version: "${PKG_VERSION}" } -} EOF + done + echo '}' >> ${uclfile} fi cap_arg="$( make -f ${srctree}/share/mk/bsd.endian.mk -VCAP_MKDB_ENDIAN )" sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \ diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 89f330ca2800..6b2a1f3bd157 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -6,7 +6,7 @@ SUBDIR= engines modules .include .include -PACKAGE= openssl +PACKAGE= openssl-lib LIB= crypto SHLIB_MAJOR= 30 VERSION_MAP= ${.CURDIR}/Version.map diff --git a/secure/lib/libssl/Makefile b/secure/lib/libssl/Makefile index 4cf17b8d5c51..dc308bcfb146 100644 --- a/secure/lib/libssl/Makefile +++ b/secure/lib/libssl/Makefile @@ -5,7 +5,7 @@ LIB= ssl SHLIB_MAJOR= 30 VERSION_MAP= ${.CURDIR}/Version.map -PACKAGE= openssl +PACKAGE= openssl-lib NO_LINT= diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile index df5acb606143..d583bf3055bd 100644 --- a/usr.sbin/certctl/Makefile +++ b/usr.sbin/certctl/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -PACKAGE= caroot +PACKAGE= certctl SCRIPTS=certctl.sh MAN= certctl.8 From nobody Sat Aug 5 09:42:43 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHyLC5Rzhz4Ttlf; Sat, 5 Aug 2023 09:42:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHyLC3v4hz4vcm; Sat, 5 Aug 2023 09:42:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691228563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CrFz1pgv8bmCkDJLYK7kDQveMimyDz2Kt+o1dUGl2Jc=; b=lSEGvpHljUulbDoMEWBwWOULG4prlFqqAIRktSn2ynA1AWPNAHj2wtNrQElm1C6z5dqNqz lr7hq9pJyS2TXXQsCy8nr2DktenlTa7Teq/VtYaq66Rv3P7Z9NZqmtqwNuCmENwngT71Gk VyifGMh8MCnU6vjofTI+a21b32sESXH/Lp4P0PRfdYSN6D3R/fRSAaLPD6G8gVRCB4IAMR TKkcZs17skSUI+OsDWr8ABoqMHYX5g+80ukMsqax9t3mR2y7ZGuz5rSOWi81WbBNceHckW tvG3KdWreYozWi1IBBbNAnGUpnScVy5dYS0/1GUv0z3mXJXpYqBrpYTq5+EZsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691228563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CrFz1pgv8bmCkDJLYK7kDQveMimyDz2Kt+o1dUGl2Jc=; b=cDaSdWUtp15Gz8LUaUtJ8TOM4nErlF361wKfz1lA46FX7VIpoZR1vLEDqvAXeN/4nh24iw qyLHoAjFRO0rBbq384aR1GaXlvQp4qfbwyD44EgoctRuCkf9OM+3fSjN+w99pvDr4FqFk7 RyIU63qXEcO0QPxMIPy+YXfkNSDdRp4tRGJadz9jIM9Ss3PjObMUG8hptPx8kxFe8dsjJh dHFcVN/Tlt2+QCUZgI6OVcKT8hMo/rCSCAiisiKB77h4uobuvXHPlbb5qeOk1RtjXd5iaU kWzs+YSlm8Sl6pft0XRrQShATptBrBJjbZEIT8/j3k7fBGyxjVZoRZMYtk/YCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691228563; a=rsa-sha256; cv=none; b=cpMC5xTn8bYcSnbYE/RVbyBMv7Un8Kjvehlo2eft9CLmGmZn6MmioYPCIARiPhGRXZML90 5X/QW7o1It/wkexZKGoyI3ej+Jn81mZFhTv5PMgMF1uLiBzljAnvohlNGNZEEBtkj5Vpt6 HI2g1HtTCaRTQ/45O1gvI5gqqKmzecJv5nIcPhmv57lmjDEqLDcumrAUVtMMVC/V0GmQ18 4baImXNctlGxKnsnjMakHTJowOtJb2H9vDb0i+XpbaDXU7iBJpsHojZ1TPbTlxtbUBE+Nh rT3g6rOHv17bzSpk81h5J1DC1O/7ueyGY8QvsbXnA1A5pqzbaZRHTBcA6NYzmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHyLC2zb0z9Gm; Sat, 5 Aug 2023 09:42:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3759ghkf058960; Sat, 5 Aug 2023 09:42:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3759ghXQ058959; Sat, 5 Aug 2023 09:42:43 GMT (envelope-from git) Date: Sat, 5 Aug 2023 09:42:43 GMT Message-Id: <202308050942.3759ghXQ058959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e3771cc03419 - main - sctp: remove redundant check List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3771cc03419b69c8ee851c1ffa85230d0fde1d5 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e3771cc03419b69c8ee851c1ffa85230d0fde1d5 commit e3771cc03419b69c8ee851c1ffa85230d0fde1d5 Author: Michael Tuexen AuthorDate: 2023-08-05 09:26:45 +0000 Commit: Michael Tuexen CommitDate: 2023-08-05 09:26:45 +0000 sctp: remove redundant check This is already checked by the caller. MFC after: 1 week --- sys/netinet/sctputil.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index a4d4e806c00e..6da4123308d4 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -3655,9 +3655,6 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, /* event not enabled */ return; } - if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_CANT_READ) { - return; - } m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_pdapi_event), 0, M_NOWAIT, 1, MT_DATA); if (m_notify == NULL) From nobody Sat Aug 5 09:45:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RHyP552S6z4Tv2M; Sat, 5 Aug 2023 09:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHyP54Whnz3Bmb; Sat, 5 Aug 2023 09:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691228713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WAxAam/2XwgpGFc9uiE+TBvYhZklGpO3zBoICI9KL4E=; b=kRQpDT2cPNRo6861ZMIY/nsBO+loTC2PBA8ZA8UbhTh5HWv/mr7OsOGPicx2sSLoSDFb+B 56uxoB2x2wC3/BKe0VCNqFZxRxSE2OkS+AmIEVnUXtuFbE/XtciKPsrevLtiQLYHbz4/1u g25KhDXeBi5gWZ66IZDGkkPBhDcaKsTsrLc4T9GPNSY5QWTBRDNfoNp2HbsQ3TrOfc7ZyD 1u5zlsHfJGpiEclXn+OeRzMibwCPKdVKl4KkhnPIk4P+WO5ucO730y92kWs6RfAo7dsPnY 1wRdn01ikMwXRNRIDuPrr8q2cUEBMK+B8PVIoFQUid5iCkwsAC3eM5HBZ2syJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691228713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WAxAam/2XwgpGFc9uiE+TBvYhZklGpO3zBoICI9KL4E=; b=WwHdpb7RxZ2wUZvkogKm7VbkapVSRM0xa8X3eCtsexwK8AwghHVpzfxJpMSqUWZ8F1X1d2 zXfsg4qqbCIuF8sqGqUkONfDxwk822nrMURWN73NejolIq0qVmXRJv8cnB6ghmQjfK8tyw tqeCRWRFHguADbAbBHqk9WjMBTetH5Qyvarho4mfjDOhjKdSaoIkibhwZ8xXA2nSxNGv2f 5wDlBZSwj/CmKptJZMIOBfnZTHUE2se+B6NUh1u2bzuI7zmT4E4rtFaA84NoorRYg3srO2 cZMTGOHKM+NW8EePdnaiuy0bSkcI3IS7sgkQMc4oTuspdm+kgoTAB8n7FcwOYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691228713; a=rsa-sha256; cv=none; b=j0d5lQzkB0p1T/ToO40xiigHa1KnEu1yYJGfh+WGP8+ijzDmtZLF6aQALNo3AV4joJ9efU av1CsXsKV8ib19WtQAYa4UvndPEizAkq/Z1N44QYWrISFQzu4VW+MJZ2Clk0jRpRLfFVJP etZSVndl4GVLk5EosvvSZ/ncTfqwnsSwhjuIBMVTFjKnH++e3O6aZqxI3ir6Z7DNQkTR2Q 9xrBAhq1DvyKcAD9ol1uC3X0rzK2TQ/BsHRIHV26YgfQanQekQx8v20PkvJ1L7jzNbLU5E 3wdbUnv3WL6OdxDF9yF4TvWg+x22xbg8AyYiTWVhE0pDI256xG+DrqKkwOuvqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RHyP53dQZz91G; Sat, 5 Aug 2023 09:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3759jDaf059443; Sat, 5 Aug 2023 09:45:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3759jDjK059442; Sat, 5 Aug 2023 09:45:13 GMT (envelope-from git) Date: Sat, 5 Aug 2023 09:45:13 GMT Message-Id: <202308050945.3759jDjK059442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 10b2b30670d7 - main - sctp: improve consistency List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10b2b30670d7c389b26533aa43e8d0c3aef55ff3 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=10b2b30670d7c389b26533aa43e8d0c3aef55ff3 commit 10b2b30670d7c389b26533aa43e8d0c3aef55ff3 Author: Michael Tuexen AuthorDate: 2023-08-05 09:29:23 +0000 Commit: Michael Tuexen CommitDate: 2023-08-05 09:29:23 +0000 sctp: improve consistency MFC after: 1 week --- sys/netinet/sctputil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 6da4123308d4..136a2285c6d7 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -6118,7 +6118,7 @@ get_more_data: if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { sctp_sblog(&so->so_rcv, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBFREE, (int)cp_len); } - SCTP_SB_DECR(&so->so_rcv, (int)cp_len); + SCTP_SB_DECR(&so->so_rcv, cp_len); if ((control->do_not_ref_stcb == 0) && stcb) { atomic_subtract_int(&stcb->asoc.sb_cc, (int)cp_len); From nobody Sat Aug 5 11:38:57 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RJ0wh0Xq4z4gvf6; Sat, 5 Aug 2023 11:39:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RJ0wh00Lcz3KZG; Sat, 5 Aug 2023 11:39:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691235556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=v/GIphF9gCvoWjFeESWaRojmK02zK/iKxkeR4utTJeM=; b=Z3PS+h/ZMpql7QrtP19lcHsGXft73TAXkaN4FLFWtSHS18ibJBmF9YyXVGly13CiNCCm+d W+Njmabkb3F3XyIfFr7PR0Q+Z7qNYIyvZluCNSnmd9ZBrl+1L/AzfRtvQho/AdRvpIIhJ8 bE4izgWHBhG0IeEhjV76kXdWMNdGFZRvWMuGOCvp2z4yo0ymGmPUYcs3RQ1L874Vjk+51B QjDdGAn/QEuF9krIfcLX22yWGC0V7q25VAk+EWuQM6VqEPRqfJhpHtZbNkQZjOl5gt52i2 JksU10I3ldjSNdPMLhRfnsBAk7DVWmWgtcyAd6eTvsGqKLqA8vS3yz/J9bdKwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691235556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=v/GIphF9gCvoWjFeESWaRojmK02zK/iKxkeR4utTJeM=; b=tKIJdZhr2BoZwxjK65QTmj+M9HpZ8xibPqdsRZWRWa+kX5bud5P1o3jACMEXzSqiNIIkCD f7OJ29fT3q3VA4mIJvnVyh7C9N+fI//PBL1ZkPqRO8yQfAjdsZNGjtXibA8hsVIyVxuJHO 3e5hxmWVUrtvtD0j5fF7bbIULDf6/Z6B25fVVhFt293207TIwUW4pfWzLvbBi1xhzNyOCa SKG1K7a3O2IOtMDB75isijcoQWd11kY84TOg0dKIG3mSUkBfkndrU0fqlRyhv0fNehj9RB dZF4A2WFaRgiHXfW30FNPvvPeHdnXkjjYKNf2bl3CqFS2096tlwHUobAtkVpUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691235556; a=rsa-sha256; cv=none; b=S870jAa9sv5BWtgUJQ29y/XZJiUPQRF/IggDo/nI3zZu/h2sQV2ySAzfoks+1W3r5hS6nd V9+4SswtwaHXS74yAcefYhTS1H+TEqOAvkaXG1naCll8sKb9u4fyvOcV6sddBkajWRcxVN bA9mDUt7Yw4CXpzAFXSjfdt8f5Z3Xt14DxZ99jHbSD+vBZL4hNF5OmeSRaMlKj0V++CZYA LVNcvxws9+pQIjpQBdm2waYKPdly3peHyCotbdiHssWOTsxqI9RGd2RTGhSA/kqeKLxFzv hHqr6jUu/ZtW//phTs03H3gflwAdF0cGv6R8jV7PPJomVlQsy/TMSks5T/vugw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RJ0wg5Gbyz1Q56; Sat, 5 Aug 2023 11:39:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DA354728CC; Sat, 5 Aug 2023 13:39:13 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_7F86D804-E676-4B7B-AD56-F2673A9670B9"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: dedc71fd3890 - main - libc: unsplit log message to to make it greppable in src From: Dimitry Andric In-Reply-To: Date: Sat, 5 Aug 2023 13:38:57 +0200 Cc: Ed Maste , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: References: <202308050100.37510VDJ085555@gitrepo.freebsd.org> To: Jessica Clarke X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_7F86D804-E676-4B7B-AD56-F2673A9670B9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 5 Aug 2023, at 04:11, Jessica Clarke wrote: >=20 > On 5 Aug 2023, at 02:00, Ed Maste wrote: >>=20 >> The branch main has been updated by emaste: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Ddedc71fd3890803a81047a0c480b95a3= 27bd7214 >>=20 >> commit dedc71fd3890803a81047a0c480b95a327bd7214 >> Author: Ed Maste >> AuthorDate: 2023-04-17 15:58:59 +0000 >> Commit: Ed Maste >> CommitDate: 2023-08-05 00:59:30 +0000 >>=20 >> libc: unsplit log message to to make it greppable in src >>=20 >> Also use __func__ rather than hardcoding the function name. This = code >> now fits in 80 columns without splitting the log message. >=20 > This doesn=E2=80=99t match the commit? Indeed, during the review I noted that __func__ would not expand to the expected value ("__cxa_thread_call_dtors"), so that part was actually removed. Now the effective result only unsplits the message line. I guess this is a case of Phabricator or arc making it difficult to adjust the commit message before 'landing'. -Dimitry --Apple-Mail=_7F86D804-E676-4B7B-AD56-F2673A9670B9 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZM400QAKCRCwXqMKLiCW o39JAJ9EbyMcsluqu4nIMybrzAHxfyCBDwCeKM0EwjhFmX3sIgmr1+fLVKNgGwg= =Q+rD -----END PGP SIGNATURE----- --Apple-Mail=_7F86D804-E676-4B7B-AD56-F2673A9670B9-- From nobody Sat Aug 5 12:38:18 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RJ2Dq34Cjz4h13r; Sat, 5 Aug 2023 12:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RJ2Dq0d8Nz3STZ; Sat, 5 Aug 2023 12:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691239099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F+W85Qre6rzANsGe1C9chPWPsVV2kYL2GEW+AEzbXl4=; b=pjXBSkTihxg3LW4TYDMyUe4pBDedfYjXqfhGmdc8goW2RLvEI1+VH+4pkqbjyOK9l+5uNt zWmaFPO0RdZW3nyvm8G9XWUyUTT38JR6JBBXnRU+DnJ6CiUnLpSoaa83VcZ+MVchiv5CxX ZZbaN3bkTv4fF77ekaH/cgdzQv/IFp8NEI/o437eFTiMarPh1K6+7Z2b5k+HWbV4Qy61Td Oj8/pf6JCBbwrTaFH0YUZJJ2USiVa6cEXgqApODKQgNHkJ/hnJorVwf7pKvNEyuZdZGYck b5teZqN5HZicFIt9EO82erK+012CeyLzNi/LjG3gxt71g5cvCuXHtTzbujw2mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691239099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F+W85Qre6rzANsGe1C9chPWPsVV2kYL2GEW+AEzbXl4=; b=jMWpuIIAosEqQt7jWTqLw4C9RFQ0xoLfJBBWFD8g/CchZ24qq1rXwpVE2IPVmPpLyRAFDw iXpSMko9hzUv4jGY6RcKVZxN+PS4e1mQlz90cG6tdrBMdk4GBOGJGJPSumQnp4xfggIYDf Lap7xZCwB0P8XSnputeVVPrkoyvoJysqBsdtIwe2wvCS3/mTjrd4XYakcivj7YI/BMuX9q bxm7/BRQk88S54rZ07zbNOR9nHF7yvOan9cfPO577V6PiI+adSowc0v0H5k0zgBPAcU+si n+dKUa8DJQXjoKFXl6CGLLDilgym0bcABIuzpK7WG2IwfZSf/ekB3V3AmVOCQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691239099; a=rsa-sha256; cv=none; b=orJT7NBY9Xw7tHgHk2jJ6pf+fqy6bJdNQezM5zAb/1m8WJ9JHFqzC1uTCIkOj9aWZqF/Wt iNIEcabHmOIw9RDYePgM9nG9AFDx3MKvLmqt+6yaWqiwtl2Ux92ipH097fuFiyMkw+07mu cEuiQayfYr3ZPxgE5NV9sdhGiewEBq/k0/ILhMsh80W8H5xGhGmNsv7+Tp9Y8yh/V9dTG+ Pc08NL8ygMvw8VkQNe5MD+bqJIny+p5IsqufJjGdIRfgSl8dXvUwWslWAwb5jK5bMtSggW TVcWxzm5o/XZ9CzxzOvpaS9N82pfMBHMGz5Ae7eUOcXE8MSqNy0TWUQ10Z40Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RJ2Dp6r8gzTsv; Sat, 5 Aug 2023 12:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 375CcIVQ042818; Sat, 5 Aug 2023 12:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 375CcI7F042817; Sat, 5 Aug 2023 12:38:18 GMT (envelope-from git) Date: Sat, 5 Aug 2023 12:38:18 GMT Message-Id: <202308051238.375CcI7F042817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: 6f15b7e19952 - main - ldconfig script: enable 32-bit compat on aarch64 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f15b7e199527e50aa459340607ff98bbff8e905 Auto-Submitted: auto-generated The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=6f15b7e199527e50aa459340607ff98bbff8e905 commit 6f15b7e199527e50aa459340607ff98bbff8e905 Author: Mike Karels AuthorDate: 2023-08-05 12:19:01 +0000 Commit: Mike Karels CommitDate: 2023-08-05 12:37:39 +0000 ldconfig script: enable 32-bit compat on aarch64 Add aarch64 to set of architectures that support 32-bit compat libraries. --- libexec/rc/rc.d/ldconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/ldconfig b/libexec/rc/rc.d/ldconfig index 5dd25ced0cd4..2d30ac0e6db3 100755 --- a/libexec/rc/rc.d/ldconfig +++ b/libexec/rc/rc.d/ldconfig @@ -43,7 +43,7 @@ ldconfig_start() machine_arch=$(sysctl -n hw.machine_arch) case ${machine_arch} in - amd64|powerpc64) + aarch64|amd64|powerpc64) for i in ${ldconfig_local32_dirs}; do if [ -d "${i}" ]; then _files=`find ${i} -type f` From nobody Sat Aug 5 23:18:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RJJRp4yb6z4TtVs; Sat, 5 Aug 2023 23:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RJJRp46Hzz3ZH4; Sat, 5 Aug 2023 23:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691277526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5LUr6k6GcHoVxQqu0FCHpmZKUeSh34uYLKOrd9Dkf+c=; b=jzJ1gPdUd9QSz90sECvvE9pcI+K70145g19bza3Y9vSV/DokHlojFyRDfUBiVeS8h0ArZ4 k6x0yVWkBYVJwaQeCEgTicfDUVTEqaoIuK946RzlehbwkbKJzmUHAVFNH2JOPalZqvMMHF gpUm0TQcnZ6L7X8n69WSf47arT0fqLL4ZWcn53bWZya9uli5wZhy/Tusjm0opGmN2elp9Y AdcVSeoKIW8C6RmtmNxor1gPz1WScESSv76mjwVwvona0MCQmq46ikVOa5iP6/LrFPLQAa h0/vfAlrNSqYF0d1eJk3sIkZmPJh0KzG1LrKz3YYuXDTXBQAoVrbkkb2Mv9PPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691277526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5LUr6k6GcHoVxQqu0FCHpmZKUeSh34uYLKOrd9Dkf+c=; b=pXco/nYNh77eY14tcINWqbJPcqV9TY0Ch4cw4bhQjpdqYEcJqs0BD8XAgYrPh2SaY65FuF lIhpCjtuPSY2cD7Kiga5Q5456gxNgKB9d311RGJzlcTLWMnujZuJL4j40vqx19owHjpzu6 FYCyq/xAXOH7txVHyWF4dF3/YN/6rsilZer8Z2Z8iKQxXeAbzxnkn+6oqfSFn/fs/TreNy XwkEhLg6Qq4lqWHazsNCJAhfSTsLxLdu5EKlHotwRSWHCrc105fDfjRWL2uetR0KZVir/h NhG8zb0WTWJAAwiotEm5+9XVXQwQKjNcyRcvR09Dhngmpqj4b60LqFUbbeEJZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691277526; a=rsa-sha256; cv=none; b=ISU38RTXH8Iuyi/XbIaEB5RXIlg61wKbbUaTArOULfEeAgXpd3yTdBB59PjcpxKTUytEa1 vO58txxjcIS2gSOu56K3lLXtTaVKfirM03+OuuSGoZEqzw1kZQUUALL2NCJKDlQeFjdElw 7O5qJ18nJvW3B8JNQTzgxXdtN7c7+SSol3NWNYgHPNRcynRpk86pXBKOj1r4lK2jH3iGce sj8hiw6trHWyHD78Kbefu/hfQ4lI0Z7KdJi/1l1afXjb2b8TzHx905YEdsfmSyKFthK5qA JBVTeqKgMpMK1UXN/wSry4HHIK2DXbrAOD5EIRxxfX+Z2etIeRybrFbQ12G/0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RJJRp35GyznRT; Sat, 5 Aug 2023 23:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 375NIkcG010295; Sat, 5 Aug 2023 23:18:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 375NIkEg010294; Sat, 5 Aug 2023 23:18:46 GMT (envelope-from git) Date: Sat, 5 Aug 2023 23:18:46 GMT Message-Id: <202308052318.375NIkEg010294@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 6edbe5616c76 - main - Provide some more information for userland core dumps List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6edbe5616c761bff9e570d9c77db0644a9487174 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6edbe5616c761bff9e570d9c77db0644a9487174 commit 6edbe5616c761bff9e570d9c77db0644a9487174 Author: Ed Maste AuthorDate: 2017-10-27 14:26:03 +0000 Commit: Ed Maste CommitDate: 2023-08-05 23:18:35 +0000 Provide some more information for userland core dumps Previously the log message indicated only "(core dumped)" if a core was successfully created, or nothing if it was not. This provides insufficient information to faciliate debugging. Dtrace is no help as coredump() is static and we cannot find the return value via fbt. Expand the log message to include error return value information. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39942 --- sys/kern/kern_sig.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 5876e2e93920..df3ebc0103c4 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -3598,6 +3598,8 @@ void sigexit(struct thread *td, int sig) { struct proc *p = td->td_proc; + const char *coreinfo; + int rv; PROC_LOCK_ASSERT(p, MA_OWNED); proc_set_p2_wexit(p); @@ -3622,16 +3624,31 @@ sigexit(struct thread *td, int sig) * XXX : Todo, as well as euid, write out ruid too * Note that coredump() drops proc lock. */ - if (coredump(td) == 0) + rv = coredump(td); + switch (rv) { + case 0: sig |= WCOREFLAG; + coreinfo = " (core dumped)"; + break; + case EFAULT: + coreinfo = " (no core dump - bad address)"; + break; + case EINVAL: + coreinfo = " (no core dump - invalid argument)"; + break; + case EFBIG: + coreinfo = " (no core dump - too large)"; + break; + default: + coreinfo = " (no core dump - other error)"; + } if (kern_logsigexit) log(LOG_INFO, "pid %d (%s), jid %d, uid %d: exited on " "signal %d%s\n", p->p_pid, p->p_comm, p->p_ucred->cr_prison->pr_id, td->td_ucred->cr_uid, - sig &~ WCOREFLAG, - sig & WCOREFLAG ? " (core dumped)" : ""); + sig &~ WCOREFLAG, coreinfo); } else PROC_UNLOCK(p); exit1(td, 0, sig);