From nobody Sat Dec 9 19:13:00 2023 X-Original-To: dev-commits-src-all@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 4Snd250tjWz53Dqk; Sat, 9 Dec 2023 19:13: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 4Snd250Hxyz4Tm8; Sat, 9 Dec 2023 19:13:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702149181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THIOIjq24yQxHo2uJAVmRQjmdpPyVtKu9f2Ho0uAS+c=; b=fn+CW4QioObkOmz2cOuV3HEdTRNUQ9zfOyNQuBl0oB4j+kxvyni7/E0gMQKIdBUlQUhxKR IQTW4/1BcvM3Z/DWBfxt/U9E3ozgmvonOeTN6tG9QBAaZjYDc81d6ozb1+qU5TM49RU/Uw DDHLfg3ee/WuCA0ECGg4jIhnnlqOtgCgPWm/AC9FQiOG5s9ngFNFqJJY5TwjKsvKmx8z7R kPDsNkFS66R6jS2AmVHbN9s+LLKk+4PB5DokxDn/PlD0DcJdU4dkMhGyZGtuPzt8bYKTMJ HbbdNgrQwlWSKYRFhX+aa3PlwgR8Hy3lKOLb6ck91LMLcRfc+gBHQeDinHBJBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702149181; a=rsa-sha256; cv=none; b=ueKG5Ofu8v0CSnK1Eao2K6OQ/6qtOKofPKJseXfTMAVkZVFQAMm/Os+4Vg8E5j/TPu7Fn5 QNltjHy0QseIFiYo/ooeqEwe0/QgscLRKUb7vIb5a6AOT+rg9wRJBz0t28P5WX64gKdYFC Iu7jqLjQV6HAKl97vkIZxuQTmsO72Hoei7f73wEOzXahTTC4HuVtwAVQze1kmO604+Xz6i rKVv2B5THVxz27RltcM1I2sLl8SZ6kZEQ0iNrm+nMwjEj7VjqMCaJ2+8NNg0m2nTkxBxyI 5tH/bbWb4U1Y+JGUKhUlPcI5cDT9kd7NWVZvEsPIzj7GY3VoiVZ8ryZfW/l8zg== 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=1702149181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THIOIjq24yQxHo2uJAVmRQjmdpPyVtKu9f2Ho0uAS+c=; b=G4poROFIuR620ikxRCp1kTT9ErNdexqIEUPVPzIb6jgFkoGj+DblKVDh17bX0eOJIUk9Ss wRlA8bcRGzTKrR4VFniylH25YBFaF/zyGbwyVELiQ3C9RBRnqKTNF0px5H95vnSSXiC9Pw lfwqwVOQPernR3ehw5EWqj0nMdznqpLjzFWrUU2jdcjrLz/z/sxhZLVV0tAy6kow5iHM94 LuthQ34HnLLSwAYBg7VV5s+omUrmEEXxkJHDPRqyYFy8ZRJX2I5hly5ux1qthd4M5uGNof 4K8iU1PoBydFc4OHJC0hMot9RJF3qURleOPguXfOhY8dacxmv4b+cUNGVT9VbA== 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 4Snd246Sw6z2bR; Sat, 9 Dec 2023 19:13: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 3B9JD0iG050812; Sat, 9 Dec 2023 19:13:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B9JD0fT050809; Sat, 9 Dec 2023 19:13:00 GMT (envelope-from git) Date: Sat, 9 Dec 2023 19:13:00 GMT Message-Id: <202312091913.3B9JD0fT050809@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: ae77041e0714 - main - kthread: Set *newtdp earlier in kthread_add1() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ae77041e0714627f9ec8045ca9ee2b6ea563138e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ae77041e0714627f9ec8045ca9ee2b6ea563138e commit ae77041e0714627f9ec8045ca9ee2b6ea563138e Author: Mark Johnston AuthorDate: 2023-12-09 15:22:06 +0000 Commit: Mark Johnston CommitDate: 2023-12-09 19:11:33 +0000 kthread: Set *newtdp earlier in kthread_add1() syzbot reported a single boot-time crash in g_event_procbody(), a page fault when dereferencing g_event_td. g_event_td is initialized by the kproc_kthread_add() call which creates the GEOM event thread: kproc_kthread_add(g_event_procbody, NULL, &g_proc, &g_event_td, RFHIGHPID, 0, "geom", "g_event"); I believe that the caller of kproc_kthread_add() was preempted after adding the new thread to the scheduler, and before setting *newtdp, which is equal to g_event_td. Thus, since the first action of the GEOM event thread is to lock itself, it ended up dereferencing a NULL pointer. Fix the problem simply by initializing *newtdp earlier. I see no harm in that, and it matches kproc_create1(). The scheduler provides sufficient synchronization to ensure that the store is visible to the new thread, wherever it happens to run. Reported by: syzbot+5397f4d39219b85a9409@syzkaller.appspotmail.com Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42986 --- sys/kern/kern_kthread.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index 3205ced9b9fd..8a84fd70918d 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -286,6 +286,13 @@ kthread_add1(void (*func)(void *), void *arg, struct proc *p, } oldtd = FIRST_THREAD_IN_PROC(p); + /* + * Set the new thread pointer before the thread starts running: *newtdp + * could be a pointer that is referenced by "func". + */ + if (newtdp != NULL) + *newtdp = newtd; + bzero(&newtd->td_startzero, __rangeof(struct thread, td_startzero, td_endzero)); bcopy(&oldtd->td_startcopy, &newtd->td_startcopy, @@ -330,8 +337,6 @@ kthread_add1(void (*func)(void *), void *arg, struct proc *p, thread_lock(newtd); sched_add(newtd, SRQ_BORING); } - if (newtdp) - *newtdp = newtd; return (0); } From nobody Sun Dec 10 03:15:23 2023 X-Original-To: dev-commits-src-all@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 4Snqkh1XvWz53wdb; Sun, 10 Dec 2023 03:15: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 4Snqkh153Tz3JVK; Sun, 10 Dec 2023 03:15:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702178124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Audf5NUNW9kd1GEiVHpV2f1XqE70AkO9SpaCVGE3Pfk=; b=BcQ5LrNTZZTWJv20AG4qRQ04ui0FVVXATNqOw5OcPTTTaFbZgXQuFviEMyHt6DwS/Y3Q3I R0P2ago2x5MzCjQ1pv5XNa9U+gM/YEkAeqVY8Jd8VYS57FpYAz6ftKnFh/Iz8O8qYCPjGx fzvt6YOgeWGyj6/bugIOknOwI+v0XWF6oaFF9Aki4aIo3FR6xlzrnob0E+DUV3bfZxQ8J0 FBwywNenS8hvaOhmmm1Er1/7kax87IRM+KnaqhmkDTRwWJ/cOREkM5aglxJFrXWXLyvg95 CPzSoCVn92mmxaORnTF8papifqdWXwWxlaRJDbeAVy0f/I0zN9MEz7hy7OXniA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702178124; a=rsa-sha256; cv=none; b=SSjC1DwuVjz3ifs3SgJKrP7ovs1buD8h70LVA8+itT0CMHvBOeZlOuwdGMpCFwbGVMAt9b o9ta63MgFOphIEIhNbyGCouxQn9+LgtQ1uzzkXaM8V/R9CNDedDcD1GoqNVOwKHi/2gVC6 nXIn2QPccYKFMN4x1piXsO2cq2nLGPUcBrQklPAW/43ZvMEibx8hIzVJPBWAJ9UlWC4nho PFEduXOg3hKEE3zAUqWn2tbjHXmbh+CwtcUyS27CajoBiyH9ncrMla8JvmevFs/uBYz1eG tPGwLbp3UafmpDNiJuJH7RSVPc/hG2nvWycq4G349LakQGc3f44pHVjvxmQZYQ== 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=1702178124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Audf5NUNW9kd1GEiVHpV2f1XqE70AkO9SpaCVGE3Pfk=; b=NdKB+cg8Ta0LaI+yrLdS0MlaulD/2jUlMzvLtgHEniJCo3KTHuMxwNTjsbj7w/D4thRbeY dRjEMzYwNa1uraMJxXIVOfVn67cEOuJzppo3+jpVKM4yIVx0GfFgOSe/ogmmVD8fbbXBtS 55a/I1RbtFKoxo36RwSD+G8QxAEysVRKCLOdonBCb6Smi8UopeXpPuRbfktclyc5K801fy 9KfZqibOdXRfxHZaQV6FuKl7cML8s7TkgaKiuvWUq7nAO8qnwZBHs/85kUooixuooj2IiY DRL1cAX+ANO0I7aR8fIEv6YNpbJCtSmiZvE+QsXjIbZxsPeHXzAJcX/QCHpR/g== 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 4Snqkh09FRzWvT; Sun, 10 Dec 2023 03:15: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 3BA3FNbT053141; Sun, 10 Dec 2023 03:15:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BA3FNjG053138; Sun, 10 Dec 2023 03:15:23 GMT (envelope-from git) Date: Sun, 10 Dec 2023 03:15:23 GMT Message-Id: <202312100315.3BA3FNjG053138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 1ed12844a186 - stable/14 - termcap.small: Include xterm-256color List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1ed12844a18610451ffc93155d825e5cfcfd9747 Auto-Submitted: auto-generated The branch stable/14 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=1ed12844a18610451ffc93155d825e5cfcfd9747 commit 1ed12844a18610451ffc93155d825e5cfcfd9747 Author: Ka Ho Ng AuthorDate: 2023-12-02 05:55:56 +0000 Commit: Ka Ho Ng CommitDate: 2023-12-10 03:15:08 +0000 termcap.small: Include xterm-256color MFC after: 7 days Reviewed by: imp, jhb Differential Revision: https://reviews.freebsd.org/D42784 (cherry picked from commit 1da7f3f6f72b2245e458fc7195733268ae4a1136) --- etc/termcap/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/termcap/Makefile b/etc/termcap/Makefile index 4b403c446359..cd5516f3e04b 100644 --- a/etc/termcap/Makefile +++ b/etc/termcap/Makefile @@ -14,8 +14,8 @@ TERMCAP_SMALL_ENTS?= SC cons25 cons25-m cons25-w cons25l1 cons25l1-m \ cons50l1-w cons50l2 cons50l2-m cons50l7 cons50l7-m cons50r cons50r-m \ cons50r-mv cons50r-v cons60 cons60-m cons60-w cons60l1 cons60l1-m \ cons60l1-w cons60l2 cons60l2-m cons60l7 cons60l7-m cons60r cons60r-m \ - cons60r-mv cons60r-v ecma[+]italics vt100 xterm xterm-basic xterm-clear \ - xterm-color xterm-new xterm-r6 xterm-r6-clear + cons60r-mv cons60r-v ecma[+]italics vt100 xterm xterm-256color xterm-basic \ + xterm-clear xterm-color xterm-new xterm-r6 xterm-r6-clear termcap.small: termcap set -e; \ From nobody Sun Dec 10 08:37:26 2023 X-Original-To: dev-commits-src-all@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 4SnytG67pKz53PHk; Sun, 10 Dec 2023 08:37: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 4SnytG5GXCz3dsN; Sun, 10 Dec 2023 08:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702197446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4ozU5DK/gbvfnYIbDrBM6XptLB44f8Vwm2Yl8vudgY=; b=ni8BUKYLDc7vrDIQCXnSpqzC7KRu+yiJGtKOXdb8mFtOW40Mys/MfCFHb9Y9o4RpEb8eNb lsE15H+d6r92hpyW06xBW3yprksihlvjAWpaR7DCcb0A5WSM9bJZOS+DzoydWTwD8pbFeX gyN3QpkTZ1DRgBPPpvCGi4VynguSY6yQhZVAZ/4KS/iTtG0v712GcQPYh1q3o0eHYpODoT UeB6sEyQuVB5huwGVFIzRORaXC58/FrJeNAu5kRn+jCeb/oddbYmUphHfn6yG5WkTfJa4z hdNAz2RXZrLHvBxFevZnOLcGu63IrOeejU92B1X0b3A04KNxjygZogpNb/CiCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702197446; a=rsa-sha256; cv=none; b=kCVSbbCwwdWNcVbPhDFNXIOYIv66L14ZS0qRafhi2OIrTL3pvchF0IrYkZE99OD/M3jbnL UQcLg0uWwdto486YSBVvwIkA41O0ItpsQJe0CGGxMWDk0pc6zzrx/Ao4weZUaaT67Jub+r BU/DITndL2UGAFddY75t7zYDlU+adUzToGyXHDhxfDh0ymxRXf7e8IEb14g9d39hBVcn7r esN+ZogIuWcolSWN8IjY9i+CWNn6nc9E4NgqgrNV3mKRNYPxcjFWkWBiOK2rcu84igBJ7z SIzFekU82Y26uRb8COAiuLtrauw4djZC3O/fcIxtcyPniMMP3ddwWkPDvePA+g== 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=1702197446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4ozU5DK/gbvfnYIbDrBM6XptLB44f8Vwm2Yl8vudgY=; b=MHMPtnU3U6IuFB4dRdi+vZ9QezV2kyU6ScoRooSi/DD9fxA9lwQ6UPH5D/6B906oCmofeQ pshf61wQY7BMFfwDmutzkZBfq8yDlRWMSBFIu0ImrceF47xj1mGNA/7Ji4lH5kXLp0RkgK AR+2W+e3iX9E22WBqWvcpm6jzb7S8QzQ26solWMchz4cM5UdLzHfagjYzIhberB9T7p/pg 75Erxx1oIacyWFaNK0JmnrH6s3zWzxz2oD+cTtRjGBZi7bK62DDAW6QDeQ63aAOE36COf7 m+RSDnhJtAgwA/v/kl/B6tF5YAwMrhT6xwIc/Gh1iwd7aT3aw76DKu3Ki6Dl4Q== 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 4SnytG4KdnzhJJ; Sun, 10 Dec 2023 08:37: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 3BA8bQZY087197; Sun, 10 Dec 2023 08:37:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BA8bQBc087195; Sun, 10 Dec 2023 08:37:26 GMT (envelope-from git) Date: Sun, 10 Dec 2023 08:37:26 GMT Message-Id: <202312100837.3BA8bQBc087195@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: 41667b04e5d5 - main - stress2: Only extract the allocation with the exact name "pts" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 41667b04e5d56888e90ad80b39930aa5fb66aad2 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=41667b04e5d56888e90ad80b39930aa5fb66aad2 commit 41667b04e5d56888e90ad80b39930aa5fb66aad2 Author: Peter Holm AuthorDate: 2023-12-10 08:34:38 +0000 Commit: Peter Holm CommitDate: 2023-12-10 08:34:38 +0000 stress2: Only extract the allocation with the exact name "pts" --- tools/test/stress2/misc/pts2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/pts2.sh b/tools/test/stress2/misc/pts2.sh index 84f7bbd78255..32adb98f2cfe 100755 --- a/tools/test/stress2/misc/pts2.sh +++ b/tools/test/stress2/misc/pts2.sh @@ -40,11 +40,11 @@ sed '1,/^EOF/d' < $here/$0 > pts2.c mycc -o pts2 -Wall -Wextra -O2 pts2.c || exit 1 rm -f pts2.c -pts=`vmstat -m | grep pts | awk '{print $2}'` +pts=`vmstat -m | awk '/ pts / {print $2}'` for i in `jot 10`; do /tmp/pts2 done -new=`vmstat -m | grep pts | awk '{print $2}'` +new=`vmstat -m | awk '/ pts / {print $2}'` s=0 [ $((new - pts)) -gt 1 ] && { s=1; echo "Leaked $((new - pts)) pts."; } From nobody Sun Dec 10 09:06:39 2023 X-Original-To: dev-commits-src-all@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 4SnzX01bGzz53RxP; Sun, 10 Dec 2023 09:06: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 4SnzX01LJjz4DfM; Sun, 10 Dec 2023 09:06:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702199200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q+POckeQmI+5axgZRJ4o7whkRvxonReQPwPLKvRjwUE=; b=CYC8U0hVN5URGCe3/vochVciqXgDG0mpTj+MwaOhiWR6KynrMphybZizQfbv72+2rBbh4H eTmeeQTkGU7acxTLXTKxj8K/4OGfTrba8mtUCWiLrvT1e+3le3P7J9fC8vgrQIqgd66SWJ dC8VWxPLVP8U6RhwYjEVw2DB5l7TLi3BlzZaUdhrYr2/wzalFCSEut9Mni5/zdrz/rJb1a 03Q7fCOeSuBCUxfUX6jP8NhJ63wSiMeKaloInuRHuDNHkAP40M+weR7dmyGPzse/g7g9cl K+RmrNPSTSC7uvhjDTKCVo2ZGahcsIOpCTbSnScyvZB13UX9+dP0Y6rQBrol0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702199200; a=rsa-sha256; cv=none; b=yjSTKc7NsCQ4yix/DmUU4+jvdxYcP0jSbOu08J4Hu81Jm7oI6XznOdSEqLTD7CBM1AnCHq 8OaKn0f2OcB5Wx9f2ha2PK/APBplom5WD1Q89WDXrkYozQR3c414SvqI6ierxx08CXnqBl bADrnv/ecgeyLGkfshb9qN4/7PVAoPwAHrj7WbX/MfTDzKmEtiZx+gS1Hi0h/6SnlYbFBN uGJ25sDtNbyxMzQNkGi3qCl6gmxy/mGRJkLOXjNB4ZtjrEa86A3DW8k8ac7SwLZ1pQlQze ijZpzCIzwtE8qj/cpX6Agw+GVMnsil0XqDZOsi9qRIHSE8AKCCHqg4RMpz/LJw== 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=1702199200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q+POckeQmI+5axgZRJ4o7whkRvxonReQPwPLKvRjwUE=; b=WUjxaz8in2osVr3iLXuzXozwRRfkK2IXqIRghBagIw3kF3383soi8J1okrn+V+BNDvUyLL xNyZK5VbtGOZJhFtlUx9adawP+tCzsgzXKw3uJqflnh18QJlzWfPvvuwC3Dk/XRiPgaelO URm4xVciE/6r1vZOWrlF+7lmPfVPOuwiwqfiOM9vNufxVJzfiJ18AXqXltDTdwf5PnH9tJ MAY7XZl8X81R8b1aHFmCv8mCWEK6qvxh6LHltOphWujfppDScxuaiJBktBKjEdkwqhVxBa SOUmcDVD8heGkGoJeUsWw1fN7rRXv73ooh5up7zpgK/OlMycWwVLXrZNYD4X/g== 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 4SnzX00HQfzj1N; Sun, 10 Dec 2023 09:06: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 3BA96dik037609; Sun, 10 Dec 2023 09:06:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BA96djY037606; Sun, 10 Dec 2023 09:06:39 GMT (envelope-from git) Date: Sun, 10 Dec 2023 09:06:39 GMT Message-Id: <202312100906.3BA96djY037606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: 29553f9e8caf - stable/14 - MFV: xz 5.4.5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 29553f9e8caf40103bbdfae6407d441a83be74fa Auto-Submitted: auto-generated The branch stable/14 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=29553f9e8caf40103bbdfae6407d441a83be74fa commit 29553f9e8caf40103bbdfae6407d441a83be74fa Author: Xin LI AuthorDate: 2023-11-26 00:55:52 +0000 Commit: Xin LI CommitDate: 2023-12-10 09:06:26 +0000 MFV: xz 5.4.5 (cherry picked from commit ca6a6373bdaed010d6cbfb27f7249ae96009409d) --- contrib/xz/ChangeLog | 870 ++++++++++++++++++++- contrib/xz/FREEBSD-Xlist | 1 - contrib/xz/FREEBSD-upgrade | 2 - contrib/xz/THANKS | 4 + contrib/xz/doxygen/Doxyfile | 7 +- contrib/xz/src/common/mythread.h | 2 +- contrib/xz/src/common/sysdefs.h | 10 +- contrib/xz/src/common/tuklib_integer.h | 282 +++++-- contrib/xz/src/liblzma/api/lzma.h | 4 +- contrib/xz/src/liblzma/api/lzma/version.h | 4 +- contrib/xz/src/liblzma/check/check.h | 7 + contrib/xz/src/liblzma/check/crc64_fast.c | 8 + contrib/xz/src/liblzma/check/crc64_table.c | 6 +- contrib/xz/src/liblzma/common/common.c | 6 +- contrib/xz/src/liblzma/common/common.h | 36 +- contrib/xz/src/liblzma/common/index.c | 6 + contrib/xz/src/liblzma/common/index.h | 2 +- contrib/xz/src/liblzma/common/memcmplen.h | 2 +- .../xz/src/liblzma/common/stream_flags_common.h | 3 + contrib/xz/src/liblzma/liblzma.pc.in | 1 + contrib/xz/src/liblzma/lz/lz_encoder_hash.h | 1 + contrib/xz/src/liblzma/lzma/fastpos.h | 1 + contrib/xz/src/liblzma/lzma/fastpos_tablegen.c | 2 + contrib/xz/src/liblzma/rangecoder/price.h | 1 + contrib/xz/src/lzmainfo/lzmainfo.c | 6 +- contrib/xz/src/xz/coder.c | 3 +- contrib/xz/src/xz/file_io.c | 40 +- contrib/xz/src/xz/file_io.h | 4 +- contrib/xz/src/xz/hardware.h | 3 +- contrib/xz/src/xz/message.h | 30 +- contrib/xz/src/xz/options.c | 3 +- contrib/xz/src/xz/util.c | 89 +-- contrib/xz/src/xz/util.h | 10 +- contrib/xz/src/xz/xz.1 | 1 - contrib/xz/src/xzdec/xzdec.c | 9 +- lib/liblzma/config.h | 6 +- 36 files changed, 1298 insertions(+), 174 deletions(-) diff --git a/contrib/xz/ChangeLog b/contrib/xz/ChangeLog index 64c79dbce0bc..4dd0978ef313 100644 --- a/contrib/xz/ChangeLog +++ b/contrib/xz/ChangeLog @@ -1,4 +1,870 @@ -commit c1e396a9ac1c1c28ce4ede5cbadb955c516477bc +commit 49053c0a649f4c8bd2b8d97ce915f401fbc0f3d9 +Author: Jia Tan +Date: 2023-10-31 22:30:29 +0800 + + Bump version and soname for 5.4.5. + + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 84c0cfc556287628df871703672879e530d0391f +Author: Jia Tan +Date: 2023-11-01 20:18:30 +0800 + + Add NEWS for 5.4.5. + + NEWS | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 74 insertions(+) + +commit d90ed84db9770712e2421e170076b43bda9b64a7 +Author: Lasse Collin +Date: 2023-10-31 21:41:09 +0200 + + liblzma: Fix compilation of fastpos_tablegen.c. + + The macro lzma_attr_visibility_hidden has to be defined to make + fastpos.h usable. The visibility attribute is irrelevant to + fastpos_tablegen.c so simply #define the macro to an empty value. + + fastpos_tablegen.c is never built by the included build systems + and so the problem wasn't noticed earlier. It's just a standalone + program for generating fastpos_table.c. + + Fixes: https://github.com/tukaani-project/xz/pull/69 + Thanks to GitHub user Jamaika1. + + src/liblzma/lzma/fastpos_tablegen.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 9b1268538b0b2c6c0a121f95165de65fc71ad23c +Author: Jia Tan +Date: 2023-10-31 21:51:40 +0800 + + Build: Fix text wrapping in an output message. + + configure.ac | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit 068ee436f4a8a706125ef43e8228b30001b1554e +Author: Lasse Collin +Date: 2023-10-22 17:59:11 +0300 + + liblzma: Use lzma_always_inline in memcmplen.h. + + src/liblzma/common/memcmplen.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 6cdf0a7b7974baf58c1fd20ec3278f3b84ae56e5 +Author: Lasse Collin +Date: 2023-10-30 17:43:03 +0200 + + liblzma: #define lzma_always_inline in common.h. + + src/liblzma/common/common.h | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +commit 33daad3961a4f07f3902b40f13e823e6e43e85da +Author: Lasse Collin +Date: 2023-10-22 17:15:32 +0300 + + liblzma: Use lzma_attr_visibility_hidden on private extern declarations. + + These variables are internal to liblzma and not exposed in the API. + + src/liblzma/check/check.h | 7 +++++++ + src/liblzma/common/stream_flags_common.h | 3 +++ + src/liblzma/lz/lz_encoder_hash.h | 1 + + src/liblzma/lzma/fastpos.h | 1 + + src/liblzma/rangecoder/price.h | 1 + + 5 files changed, 13 insertions(+) + +commit 6961a5ac7df178bfc2b7a181c40575847bc3035f +Author: Lasse Collin +Date: 2023-10-22 17:08:39 +0300 + + liblzma: #define lzma_attr_visibility_hidden in common.h. + + In ELF shared libs: + + -fvisibility=hidden affects definitions of symbols but not + declarations.[*] This doesn't affect direct calls to functions + inside liblzma as a linker can replace a call to lzma_foo@plt + with a call directly to lzma_foo when -fvisibility=hidden is used. + + [*] It has to be like this because otherwise every installed + header file would need to explictly set the symbol visibility + to default. + + When accessing extern variables that aren't defined in the + same translation unit, compiler assumes that the variable has + the default visibility and thus indirection is needed. Unlike + function calls, linker cannot optimize this. + + Using __attribute__((__visibility__("hidden"))) with the extern + variable declarations tells the compiler that indirection isn't + needed because the definition is in the same shared library. + + About 15+ years ago, someone told me that it would be good if + the CRC tables would be defined in the same translation unit + as the C code of the CRC functions. While I understood that it + could help a tiny amount, I didn't want to change the code because + a separate translation unit for the CRC tables was needed for the + x86 assembly code anyway. But when visibility attributes are + supported, simply marking the extern declaration with the + hidden attribute will get identical result. When there are only + a few affected variables, this is trivial to do. I wish I had + understood this back then already. + + src/liblzma/common/common.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit 5b9e16764905d06fa8e8339ba185ddfee304e5fb +Author: Lasse Collin +Date: 2023-09-30 22:54:28 +0300 + + liblzma: Refer to MinGW-w64 instead of MinGW in the API headers. + + MinGW (formely a MinGW.org Project, later the MinGW.OSDN Project + at ) has GCC 9.2.0 as the + most recent GCC package (released 2021-02-02). The project might + still be alive but majority of people have switched to MinGW-w64. + Thus it seems clearer to refer to MinGW-w64 in our API headers too. + Building with MinGW is likely to still work but I haven't tested it + in the recent years. + + src/liblzma/api/lzma.h | 4 ++-- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit 36fabdbe67c8a8fbdc3ac695a91fc443a1328cc4 +Author: Lasse Collin +Date: 2023-09-27 00:58:17 +0300 + + CMake: Use -D_FILE_OFFSET_BITS=64 if (and only if) needed. + + A CMake option LARGE_FILE_SUPPORT is created if and only if + -D_FILE_OFFSET_BITS=64 affects sizeof(off_t). + + This is needed on many 32-bit platforms and even with 64-bit builds + with MinGW-w64 to get support for files larger than 2 GiB. + + CMakeLists.txt | 7 ++++- + cmake/tuklib_large_file_support.cmake | 52 +++++++++++++++++++++++++++++++++++ + 2 files changed, 58 insertions(+), 1 deletion(-) + +commit 989c8c354cbd2d20fbae4a432a3e31f5bc1cb9bf +Author: Lasse Collin +Date: 2023-09-30 02:14:25 +0300 + + CMake: Generate and install liblzma.pc if not using MSVC. + + Autotools based build uses -pthread and thus adds it to Libs.private + in liblzma.pc. CMake doesn't use -pthread at all if pthread functions + are available in libc so Libs.private doesn't get -pthread either. + + CMakeLists.txt | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +commit 983f3b458dc79c5976a4237fdfe4f8079f8d8830 +Author: Lasse Collin +Date: 2023-09-30 01:13:13 +0300 + + CMake: Rearrange the PACKAGE_ variables. + + The windres workaround now replaces spaces with \x20 so + the package name isn't repeated. + + These changes will help with creation of liblzma.pc. + + CMakeLists.txt | 26 +++++++++++++++----------- + 1 file changed, 15 insertions(+), 11 deletions(-) + +commit 4083c8e9501a48934a5fb563d2c3ce2ae143cd27 +Author: Lasse Collin +Date: 2023-09-29 20:46:11 +0300 + + liblzma: Add Cflags.private to liblzma.pc.in for MSYS2. + + It properly adds -DLZMA_API_STATIC when compiling code that + will be linked against static liblzma. Having it there on + systems other than Windows does no harm. + + See: https://www.msys2.org/docs/pkgconfig/ + + src/liblzma/liblzma.pc.in | 1 + + 1 file changed, 1 insertion(+) + +commit 661549ecb7a9b136d72a01c137d9776c75d52d51 +Author: Lasse Collin +Date: 2023-09-27 22:46:20 +0300 + + CMake: Create liblzma.def when building liblzma.dll with MinGW-w64. + + CMakeLists.txt | 20 ++++++++++++++++++++ + cmake/remove-ordinals.cmake | 26 ++++++++++++++++++++++++++ + 2 files changed, 46 insertions(+) + +commit 0e546eb4da05c52b7d257e5bd85e15c51c4d86a3 +Author: Lasse Collin +Date: 2023-10-26 21:44:42 +0300 + + CMake: Change one CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR. + + In this case they have identical values. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit da4d04e4d6e199d28b58bd2e0df4e120c52dd5d7 +Author: Lasse Collin +Date: 2023-10-01 19:10:57 +0300 + + CMake/Windows: Fix the import library filename. + + Both PREFIX and IMPORT_PERFIX have to be set to "" to get + liblzma.dll and liblzma.dll.a. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 007558a358c48a0175cc8d47d11798d7967282ab +Author: Lasse Collin +Date: 2023-10-11 19:47:44 +0300 + + CMake: Don't shadow the cache entry ENABLE_THREADS with a normal variable. + + Using set(ENABLE_THREADS "posix") is confusing because it sets + a new normal variable and leaves the cache entry with the same + name unchanged. The intent wasn't to change the cache entry so + this switches to a different variable name. + + CMakeLists.txt | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +commit 7d01de67ee3dd76cfc12c23220e2e4cdc59708f1 +Author: Lasse Collin +Date: 2023-10-09 21:12:31 +0300 + + CMake: Edit threading related messages. + + It's mostly to change from "thread method" to "threading method". + + CMakeLists.txt | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +commit f8edcf3da689aad4b21e139197725450f2c456a0 +Author: Lasse Collin +Date: 2023-10-09 20:59:24 +0300 + + CMake: Use FATAL_ERROR if user-supplied options aren't understood. + + This way typos are caught quickly and compounding error messages + are avoided (a single typo could cause more than one error). + + This keeps using SEND_ERROR when the system is lacking a feature + (like threading library or sandboxing method). This way the whole + configuration log will be generated in case someone wishes to + report a problem upstream. + + CMakeLists.txt | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +commit 1695021e4a233a9388ddd428654c1447f0ea3bfb +Author: Jia Tan +Date: 2023-10-19 16:09:01 +0800 + + CMake: Add ALLOW_CLMUL_CRC option to enable/disable CLMUL. + + The option is enabled by default, but will only be visible to a user + listing cache variables or using a CMake GUI application if the + immintrin.h header file is found. + + This mirrors our Autotools build --disable-clmul-crc functionality. + + CMakeLists.txt | 40 +++++++++++++++++++++++----------------- + 1 file changed, 23 insertions(+), 17 deletions(-) + +commit 5056bc51071d1a07097c5667a0d5bd85242e31b9 +Author: Lasse Collin +Date: 2023-10-14 17:56:59 +0300 + + tuklib_integer: Revise unaligned reads and writes on strict-align archs. + + In XZ Utils context this doesn't matter much because + unaligned reads and writes aren't used in hot code + when TUKLIB_FAST_UNALIGNED_ACCESS isn't #defined. + + src/common/tuklib_integer.h | 256 ++++++++++++++++++++++++++++++++------------ + 1 file changed, 189 insertions(+), 67 deletions(-) + +commit 9e14743ee5ba79181076bc33952245d5b18fbc58 +Author: Lasse Collin +Date: 2023-09-23 02:21:49 +0300 + + tuklib_integer: Add missing write64be and write64le fallback functions. + + src/common/tuklib_integer.h | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +commit 4cc91ceb3992ef4f51302b56178c3b2c2aeaaaad +Author: Jia Tan +Date: 2023-10-12 20:12:18 +0800 + + Build: Update visibility.m4 from Gnulib. + + Updating from version 6 -> 8 from upstream. Declarations for variables + and function bodies were added to avoid unnecessary failures with + -Werror. + + m4/visibility.m4 | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit 1824a6007cb1c8d5d7abcc7bf649148bc06fa72c +Author: Lasse Collin +Date: 2023-10-06 19:36:35 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 8fdc71a27d07b10a3da52432432e080b6d577642 +Author: Jia Tan +Date: 2023-09-29 20:14:39 +0800 + + CMake: Rename xz and man page symlink custom targets. + + The Ninja Generator for CMake cannot have a custom target and its + BYPRODUCTS have the same name. This has prevented Ninja builds on + Unix-like systems since the xz symlinks were introduced in + 80a1a8bb838842a2be343bd88ad1462c21c5e2c9. + + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 38171492ded6426ddf53d0c200fa8c93fcd02a60 +Author: Lasse Collin +Date: 2023-09-27 19:54:35 +0300 + + CMake: Fix Windows build with Clang/LLVM 17. + + llvm-windres 17.0.0 has more accurate emulation of GNU windres, so + the hack for GNU windres must now be used with llvm-windres too. + + LLVM 16.0.6 has the old behavior and there likely won't be more + 16.x releases. So we can simply check for >= 17.0.0. + + The workaround must not be used with Clang that is acting in + MSVC mode. This checks for the known environments that need + the workaround instead of using "NOT MSVC". + + See also: + https://github.com/llvm/llvm-project/commit/2bcc0fdc58a220cb9921b47ec8a32c85f2511a47 + + CMakeLists.txt | 26 ++++++++++++++------------ + 1 file changed, 14 insertions(+), 12 deletions(-) + +commit 1bce6fe48334b5df33d0487a9cbe41950122230e +Author: Jia Tan +Date: 2023-09-27 00:02:11 +0800 + + liblzma: Avoid compiler warning without creating extra symbol. + + When the generic fast crc64 method is used, then we omit + lzma_crc64_table[][]. + + The C standards don't allow an empty translation unit which can be + avoided by declaring something, without exporting any symbols. + + src/liblzma/check/crc64_table.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +commit dce95a593e6cd9779110aa1e314abd8b35c75f6b +Author: Lasse Collin +Date: 2023-09-26 17:24:15 +0300 + + Build: Update the comment about -Werror usage in checks. + + configure.ac | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit f3c32762ae309afa2fe330e7fb397acfdedc4d37 +Author: Lasse Collin +Date: 2023-09-26 13:51:31 +0300 + + Build: Fix underquoted AC_LANG_SOURCE. + + It made no practical difference in this case. + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7dd57f2f2c8fde93fa42b4dbf6d9860717723b41 +Author: Lasse Collin +Date: 2023-09-26 13:14:37 +0300 + + Build: Silence Autoconf warning. + + There was a use of AC_COMPILE_IFELSE that didn't use + AC_LANG_SOURCE and Autoconf warned about this. The omission + had been intentional but it turned out that this didn't do + what I thought it would. + + Autoconf 2.71 manual gives an impression that AC_LANG_SOURCE + inserts all #defines that have been made with AC_DEFINE so + far (confdefs.h). The idea was that omitting AC_LANG_SOURCE + would mean that only the exact code included in the + AC_COMPILE_IFELSE call would be compiled. + + With C programs this is not true: the #defines get added without + AC_LANG_SOURCE too. There seems to be no neat way to avoid this. + Thus, with the C language at least, adding AC_LANG_SOURCE makes + no other difference than silencing a warning from Autoconf. The + generated "configure" remains identical. (Docs of AC_LANG_CONFTEST + say that the #defines have been inserted since Autoconf 2.63b and + that AC_COMPILE_IFELSE uses AC_LANG_CONFTEST. So the behavior is + documented if one also reads the docs of macros that one isn't + calling directly.) + + Any extra code, including #defines, can cause problems for + these two tests because these tests must use -Werror. + CC=clang CFLAGS=-Weverything is the most extreme example. + It enables -Wreserved-macro-identifier which warns about + It's possible to write a test file that passes -Weverything but + it becomes impossible when Autoconf inserts confdefs.h. + + So this commit adds AC_LANG_SOURCE to silence Autoconf warnings. + A different solution is needed for -Werror tests. + + configure.ac | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +commit edec253e418562f3164a01ecc8805295fa022efa +Author: Jia Tan +Date: 2023-09-26 00:47:26 +0800 + + Build: Remove Gnulib dependency from tests. + + The tests do not use any Gnulib replacements so they do not need to link + libgnu.a or have /lib in the include path. + + tests/Makefile.am | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +commit 46cb133ce7360496eecca1255b364c05f0205855 +Author: Jia Tan +Date: 2023-09-26 00:43:43 +0800 + + CMake: Remove /lib from tests include path. + + The tests never included anything from /lib, so this was not needed. + + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +commit 4ae13cfe0dedb8ddc3cf9ded8cd1ac09361b3bd1 +Author: Lasse Collin +Date: 2023-09-24 16:32:32 +0300 + + sysdefs.h: Update the comment about __USE_MINGW_ANSI_STDIO. + + src/common/sysdefs.h | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +commit 660c8c29e57d30dbd5009ef1f0ec1bbe195ccef6 +Author: Lasse Collin +Date: 2023-09-22 02:33:29 +0300 + + xz: Windows: Don't (de)compress to special files like "con" or "nul". + + Before this commit, the following writes "foo" to the + console and deletes the input file: + + echo foo | xz > con_xz + xz --suffix=_xz --decompress con_xz + + It cannot happen without --suffix because names like con.xz + are also special and so attempting to decompress con.xz + (or compress con to con.xz) will already fail when opening + the input file. + + Similar thing is possible when compressing. The following + writes to "nul" and the input file "n" is deleted. + + echo foo | xz > n + xz --suffix=ul n + + Now xz checks if the destination is a special file before + continuing. DOS/DJGPP version had a check for this but + Windows (and OS/2) didn't. + + src/xz/file_io.c | 35 ++++++++++++++++++++++++++++------- + 1 file changed, 28 insertions(+), 7 deletions(-) + +commit b7ce6e80786fc0c08ed129e8ee262ea96a5473a1 +Author: Lasse Collin +Date: 2023-09-21 20:42:52 +0300 + + CMake: Wrap two overlong lines that are possible to wrap. + + CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 1595f454d5c8257c668cccd6a86dd68175d5c430 +Author: Lasse Collin +Date: 2023-09-21 20:36:31 +0300 + + CMake: Add a comment about threads on Cygwin. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 5be6275f19784cdd5a954f0188045c8ff4934d54 +Author: Lasse Collin +Date: 2023-09-12 21:12:34 +0300 + + CMake: Bump maximum policy version to 3.27. + + There are several new policies. CMP0149 may affect the Windows SDK + version that CMake will choose by default. The new behavior is more + predictable, always choosing the latest SDK version by default. + + The other new policies shouldn't affect this package. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e515643d7524851d1eb7dab73453e26d8521324c +Author: Lasse Collin +Date: 2023-09-08 19:08:57 +0300 + + Doxygen: Add more C macro names to PREDEFINED. + + doxygen/Doxyfile | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +commit e3478ae4f36cd06522a2fef023860893f068434d +Author: Lasse Collin +Date: 2023-09-11 18:47:26 +0300 + + liblzma: Move a few __attribute__ uses in function declarations. + + The API headers have many attributes but these were left + as is for now. + + src/liblzma/common/common.c | 6 ++++-- + src/liblzma/common/common.h | 8 ++++---- + src/liblzma/common/memcmplen.h | 3 ++- + 3 files changed, 10 insertions(+), 7 deletions(-) + +commit b71b8922ef3971e5ccffd1e213888d44abe21d11 +Author: Lasse Collin +Date: 2023-09-11 19:03:35 +0300 + + xz, xzdec, lzmainfo: Use tuklib_attr_noreturn. + + For compatibility with C23's [[noreturn]], tuklib_attr_noreturn + must be at the beginning of declaration (before "extern" or + "static", and even before any GNU C's __attribute__). + + This commit also moves all other function attributes to + the beginning of function declarations. "extern" is kept + at the beginning of a line so the attributes are listed on + separate lines before "extern" or "static". + + src/lzmainfo/lzmainfo.c | 6 ++++-- + src/xz/coder.c | 3 ++- + src/xz/hardware.h | 3 ++- + src/xz/message.h | 30 +++++++++++++++++------------- + src/xz/options.c | 3 ++- + src/xz/util.h | 8 ++++---- + src/xzdec/xzdec.c | 9 ++++++--- + 7 files changed, 37 insertions(+), 25 deletions(-) + +commit 359e5c6cb128dab64ea6070d21d1c240f96cea6b +Author: Lasse Collin +Date: 2023-09-11 18:53:31 +0300 + + Remove incorrect uses of __attribute__((__malloc__)). + + xrealloc() is obviously incorrect, modern GCC docs even + mention realloc() as an example where this attribute + cannot be used. + + liblzma's lzma_alloc() and lzma_alloc_zero() would be + correct uses most of the time but custom allocators + may use a memory pool or otherwise hold the pointer + so aliasing issues could happen in theory. + + The xstrdup() case likely was correct but I removed it anyway. + Now there are no __malloc__ attributes left in the code. + The allocations aren't in hot paths so this should make + no practical difference. + + src/liblzma/common/common.c | 4 ++-- + src/liblzma/common/common.h | 4 ++-- + src/xz/util.h | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +commit 589b4cba22fccb1dbc919df5d134aefb2b5a6b01 +Author: Lasse Collin +Date: 2023-09-19 14:03:45 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 43728ed2267e921fbdfa699ee1e91b105ab0e98b +Author: Lasse Collin +Date: 2023-09-14 16:35:46 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit caf00e0988ba47842cfd93dfbb17f7d30120d6e7 +Author: Lasse Collin +Date: 2023-09-14 16:34:07 +0300 + + liblzma: Mark crc64_clmul() with __attribute__((__no_sanitize_address__)). + + Thanks to Agostino Sarubbo. + Fixes: https://github.com/tukaani-project/xz/issues/62 + + src/liblzma/check/crc64_fast.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit a70e96d2da761b8b3a77bf14e08002d871e5950b +Author: Jia Tan +Date: 2023-09-12 22:36:12 +0800 + + CMake: Fix time.h checks not running on second CMake run. + + If CMake was configured more than once, HAVE_CLOCK_GETTIME and + HAVE_CLOCK_MONOTONIC would not be set as compile definitions. The check + for librt being needed to provide HAVE_CLOCK_GETTIME was also + simplified. + + CMakeLists.txt | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +commit d5275d83bd2a9701c5feb8666785007c074b1359 +Author: Jia Tan +Date: 2023-09-12 22:34:06 +0800 + + CMake: Fix unconditionally defining HAVE_CLOCK_MONOTONIC. + + If HAVE_CLOCK_GETTIME was defined, then HAVE_CLOCK_MONOTONIC was always + added as a compile definition even if the check for it failed. + + CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +commit 1f6e7c68fbdeeaa9482fc77de090be63d90912fd +Author: Lasse Collin +Date: 2023-08-31 19:50:05 +0300 + + xz: Refactor thousand separator detection and disable it on MSVC. + + Now the two variations of the format strings are created with + a macro, and the whole detection code can be easily disabled + on platforms where thousand separator formatting is known to + not work (MSVC has no support, and on DJGPP 2.05 it can have + problems in some cases). + + src/xz/util.c | 89 ++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 45 insertions(+), 44 deletions(-) + +commit ef71f83973a20cc28a3221f85681922026ea33f5 +Author: Lasse Collin +Date: 2023-08-31 18:14:43 +0300 + + xz: Fix a too relaxed assertion and remove uses of SSIZE_MAX. + + SSIZE_MAX isn't readily available on MSVC. Removing it means + that there is one thing less to worry when porting to MSVC. + + src/xz/file_io.c | 5 ++--- + src/xz/file_io.h | 4 ++-- + 2 files changed, 4 insertions(+), 5 deletions(-) + +commit cf8ba7c3a89e37736b926dfbe85dffeff725db47 +Author: Jia Tan +Date: 2023-08-28 23:14:45 +0800 + + Tests: Improve invalid unpadded size check in test_lzma_index_append(). + + This check was extended to test the code added to fix a failing assert + in 68bda971bb8b666a009331455fcedb4e18d837a4. + + tests/test_index.c | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +commit 4a4180ce74788e97e90b9aab579bfd7c6dce3f59 +Author: Jia Tan +Date: 2023-08-28 21:54:41 +0800 + + Tests: Improve comments in test_index.c. + + tests/test_index.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 4b23b84b89e39a5117e16f66c3b01db4f08ed3e7 +Author: Jia Tan +Date: 2023-08-28 21:52:54 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 773f1e8622cb1465df528cb16a749517650acd93 +Author: Jia Tan +Date: 2023-08-28 21:50:16 +0800 + + liblzma: Update assert in vli_ceil4(). + + The argument to vli_ceil4() should always guarantee the return value + is also a valid lzma_vli. Thus the highest three valid lzma_vli values + are invalid arguments. All uses of the function ensure this so the + assert is updated to match this. + + src/liblzma/common/index.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 68bda971bb8b666a009331455fcedb4e18d837a4 +Author: Jia Tan +Date: 2023-08-28 21:31:25 +0800 + + liblzma: Add overflow check for Unpadded size in lzma_index_append(). + + This was not a security bug since there was no path to overflow + UINT64_MAX in lzma_index_append() or when it calls index_file_size(). + The bug was discovered by a failing assert() in vli_ceil4() when called + from index_file_size() when unpadded_sum (the sum of the compressed size + of current Stream and the unpadded_size parameter) exceeds LZMA_VLI_MAX. + + Previously, the unpadded_size parameter was checked to be not greater + than UNPADDED_SIZE_MAX, but no check was done once compressed_base was + added. + + This could not have caused an integer overflow in index_file_size() when + called by lzma_index_append(). The calculation for file_size breaks down + into the sum of: + + - Compressed base from all previous Streams + - 2 * LZMA_STREAM_HEADER_SIZE (size of the current Streams header and + footer) + - stream_padding (can be set by lzma_index_stream_padding()) + - Compressed base from the current Stream + - Unpadded size (parameter to lzma_index_append()) + + The sum of everything except for Unpadded size must be less than + LZMA_VLI_MAX. This is guarenteed by overflow checks in the functions + that can set these values including lzma_index_stream_padding(), + lzma_index_append(), and lzma_index_cat(). The maximum value for + Unpadded size is enforced by lzma_index_append() to be less than or + equal UNPADDED_SIZE_MAX. Thus, the sum cannot exceed UINT64_MAX since + LZMA_VLI_MAX is half of UINT64_MAX. + + Thanks to Joona Kannisto for reporting this. + + src/liblzma/common/index.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit b41bb79c602481d7ea93d65f5b3e3f08dc54233b +Author: Jia Tan +Date: 2023-08-28 22:18:29 +0800 + + Translations: Update the Esperanto translation. + + po/eo.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) + +commit 6614e6d4bf8e2b5af6eb73930148e0ffc8d2265a +Author: Jia Tan +Date: 2023-08-09 20:55:36 +0800 + + Docs: Update INSTALL for --enable-threads method win95. + + The Autotools build allows win95 threads and --enable-small together now + if the compiler supports __attribute__((__constructor__)). + + INSTALL | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit bfb623ad96fa6f1dbc0c560403c4296e3c8e26c9 +Author: Jia Tan +Date: 2023-08-09 20:54:15 +0800 + + CMake: Conditionally allow win95 threads and --enable-small. + + CMakeLists.txt | 27 +++++++++++++++++++-------- + 1 file changed, 19 insertions(+), 8 deletions(-) + +commit e919ebb29ac9f5270cd7176a39d0d3b4cea875a9 +Author: Jia Tan +Date: 2023-08-09 20:35:16 +0800 + + Build: Conditionally allow win95 threads and --enable-small. + + When the compiler supports __attribute__((__constructor__)) + mythread_once() is never used, even with --enable-small. A configuration + with win95 threads and --enable-small will compile and be thread safe so + it can be allowed. + + This isn't a very common configuration since MSVC does not support + __attribute__((__constructor__)), but MINGW32 and CLANG32 environments + for MSYS2 can use win95 threads and have + __attribute__((__constructor__)) support. + + configure.ac | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +commit c0c0cd4a483a672b66a13761583bc4f84d86d501 +Author: Jamaika1 +Date: 2023-08-08 14:07:59 +0200 + + mythread.h: Fix typo error in Vista threads mythread_once(). + + The "once_" variable was accidentally referred to as just "once". This + prevented building with Vista threads when + HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR was not defined. + + src/common/mythread.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d93fbefcc48a8737fdf5678ce66d1c1d605752a0 +Author: Jia Tan +Date: 2023-08-03 20:10:21 +0800 + + Tests: Style fixes to test_lzip_decoder.c. + + tests/test_lzip_decoder.c | 36 ++++++++++++++++++++++++------------ + 1 file changed, 24 insertions(+), 12 deletions(-) + +commit 65981d8e45741fd1502e007609469e1d60312e69 +Author: Jia Tan +Date: 2023-08-03 15:56:20 +0800 + + Translations: Update the Chinese (simplified) translation. + + po/zh_CN.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a108ed589171d683c34238a87e358b87f69e39a0 +Author: Lasse Collin +Date: 2023-08-02 17:15:12 +0300 + + xz: Omit an empty paragraph on the man page. + + src/xz/xz.1 | 1 - + 1 file changed, 1 deletion(-) + +commit 03c51c5c08fe3579d8bbc8eea8251a1128001330 Author: Jia Tan Date: 2023-08-02 20:32:20 +0800 @@ -8,7 +874,7 @@ Date: 2023-08-02 20:32:20 +0800 src/liblzma/api/lzma/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -commit 7d266d25ae323a2dc5f2e254c991ef84b997adad +commit d7fa3f1b58a77f79b1a4e12452418b5555632e18 Author: Jia Tan Date: 2023-08-02 20:30:07 +0800 diff --git a/contrib/xz/FREEBSD-Xlist b/contrib/xz/FREEBSD-Xlist index 060a6718b73c..fdbd69ce6d82 100644 --- a/contrib/xz/FREEBSD-Xlist +++ b/contrib/xz/FREEBSD-Xlist @@ -1,4 +1,3 @@ -$FreeBSD$ */*/*/Makefile.* */*/Makefile.* */.gitignore diff --git a/contrib/xz/FREEBSD-upgrade b/contrib/xz/FREEBSD-upgrade index 986197c1463b..400bfe70eee7 100644 --- a/contrib/xz/FREEBSD-upgrade +++ b/contrib/xz/FREEBSD-upgrade @@ -1,5 +1,3 @@ -$FreeBSD$ - xz The source code is pulled with git: diff --git a/contrib/xz/THANKS b/contrib/xz/THANKS index cf7c59c844c5..0206af938f1a 100644 --- a/contrib/xz/THANKS +++ b/contrib/xz/THANKS @@ -19,6 +19,7 @@ has been important. :-) In alphabetical order: - Jakub Bogusz - Adam Borowski - Maarten Bosmans + - Lukas Braune - Benjamin Buch - Trent W. Buck - Kevin R. Bulgrien @@ -64,6 +65,7 @@ has been important. :-) In alphabetical order: - Jouk Jansen - Jun I Jin - Kiyoshi Kanazawa + - Joona Kannisto - Per Øyvind Karlsen - Iouri Kharon - Thomas Klausner @@ -127,6 +129,7 @@ has been important. :-) In alphabetical order: - Torsten Rupp - Stephen Sachs - Jukka Salmi + - Agostino Sarubbo - Alexandre Sauvé - Benno Schulenberg - Andreas Schwab @@ -138,6 +141,7 @@ has been important. :-) In alphabetical order: - Brad Smith - Bruce Stark *** 1293 LINES SKIPPED *** From nobody Sun Dec 10 09:09:50 2023 X-Original-To: dev-commits-src-all@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 4Snzbf6ryYz53SDY; Sun, 10 Dec 2023 09:09: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 4Snzbf6Yv8z4F63; Sun, 10 Dec 2023 09:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702199390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WjjF1EsL371JhJ4a2Mgh16qO0WThaFlewzyRwH4YU4A=; b=sWDwFPpS1UV6qWiJNYGwSmDHHk5nRih9li67ygSH559gkCMsls1wJkPENmdr1C3n6WOfph IMCAvceI/uvjtZVWDyy/qvkwgeks7RyiknsN83TCIJYEYpqaLn4egUFOeMfdIoXgXdl5De 9UzFRPymNaJeKJwKXbBLC69Pua9f/tbZ1flS+MIhdgMXjFcjdN5J3iFO7zmflO0RNBgUsw you5yN9/TUtAr1HfvCYmcU2JZzlUKa0X1Ba8WWSP3SvooRnizYQYMjt2nEBgenLBaI6tMQ /pO6ltNNn9YQMV55wU4Iek2nFeDMyQRpldzeo/qx0WshkFAaRqQZ+rcug65cCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702199390; a=rsa-sha256; cv=none; b=cZB+H9DW7gn4PIfzXmANHViTJij3T6ZyDliD6R1Y4ML5vRy36FON08QGqd85hBqSeg8EAW uG0TW14NvlmqmIDwZKKo1+8mGpqOktsjWx+uWrNjzXO8fSIFfhkN+xQh9plmzHLPY0Rj9V aG69rQVuRFs9ofTRUhDhYUJPV9DrlAQKNghuzAbJeqmeduWXkzT+y9cZCaUteErFKa8YVD 5zoXOO/OVD+ebyqsT9MIU27s+N+GgMvaPtcmjcTWZPmOgo6NqwlvKV4J49X/2OfXPha8l/ jCLRc4ZIjaSS33CNaaZ40WoYdTXZYXYaAOl50NigC+A6MYmeGOD6x2vr2voM7w== 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=1702199390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WjjF1EsL371JhJ4a2Mgh16qO0WThaFlewzyRwH4YU4A=; b=C5uPbq+noe22XjZuXQRcQUm7rOsM9bjjGV1zc2GnpCBzmrgFYfgVnqZl+CdqlRalXw68IY SH3icHJ3wHhE1y4FIdxyng/FjJscoItlaflcnXvzLpgXlp6KSo1vf5hXfdxFQrpWI487jd BitfWPW3fP39+Ikzz+gnnGx9FqqI1dqelsHDESWFbGfOWzux+/DIYIsrKk3PNx12ajBYnT 7+IFqRZhdIrxRxbklazI45Rsw8xShTqNsVhqe6SSzOHELvzHQK7tXJOZwQgjs+IM66qy5Y pRV/IcrkWfoxp/4cs4voh6SuUKILwCYhYjs9nQYiBvh58BZVzp3QD5lVPuv6UQ== 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 4Snzbf5dprzj37; Sun, 10 Dec 2023 09:09: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 3BA99o4Z038141; Sun, 10 Dec 2023 09:09:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BA99oFB038138; Sun, 10 Dec 2023 09:09:50 GMT (envelope-from git) Date: Sun, 10 Dec 2023 09:09:50 GMT Message-Id: <202312100909.3BA99oFB038138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: f82906a49bbc - stable/13 - MFC: xz 5.4.5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: f82906a49bbc7910c4942b9720a90b6034b87dd7 Auto-Submitted: auto-generated The branch stable/13 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=f82906a49bbc7910c4942b9720a90b6034b87dd7 commit f82906a49bbc7910c4942b9720a90b6034b87dd7 Author: Xin LI AuthorDate: 2023-05-12 22:49:34 +0000 Commit: Xin LI CommitDate: 2023-12-10 09:08:36 +0000 MFC: xz 5.4.5 (cherry picked from commit ca6a6373bdaed010d6cbfb27f7249ae96009409d) (cherry picked from commit 1f3ced26d4946ff2e24472432a275efb9ba1f2ca) (cherry picked from commit b333cd44de6db4d3182add2f80870c7a96d570d9) --- contrib/xz/ChangeLog | 1837 ++++++++++++++++++++ contrib/xz/FREEBSD-Xlist | 1 - contrib/xz/FREEBSD-upgrade | 2 - contrib/xz/README | 4 + contrib/xz/THANKS | 9 + contrib/xz/doxygen/Doxyfile | 7 +- contrib/xz/src/common/mythread.h | 4 +- contrib/xz/src/common/sysdefs.h | 10 +- contrib/xz/src/common/tuklib_integer.h | 294 +++- contrib/xz/src/liblzma/api/lzma.h | 6 +- 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 | 4 +- contrib/xz/src/liblzma/check/check.h | 7 + contrib/xz/src/liblzma/check/crc64_fast.c | 8 + contrib/xz/src/liblzma/check/crc64_table.c | 6 +- contrib/xz/src/liblzma/common/alone_encoder.c | 11 - .../xz/src/liblzma/common/block_buffer_encoder.c | 2 +- contrib/xz/src/liblzma/common/common.c | 6 +- contrib/xz/src/liblzma/common/common.h | 38 +- contrib/xz/src/liblzma/common/file_info.c | 2 +- contrib/xz/src/liblzma/common/index.c | 6 + contrib/xz/src/liblzma/common/index.h | 2 +- contrib/xz/src/liblzma/common/lzip_decoder.c | 2 +- contrib/xz/src/liblzma/common/memcmplen.h | 21 +- contrib/xz/src/liblzma/common/stream_decoder_mt.c | 8 +- contrib/xz/src/liblzma/common/stream_encoder_mt.c | 2 +- .../xz/src/liblzma/common/stream_flags_common.h | 3 + contrib/xz/src/liblzma/common/string_conversion.c | 10 +- contrib/xz/src/liblzma/liblzma.pc.in | 1 + contrib/xz/src/liblzma/lz/lz_encoder.h | 2 +- contrib/xz/src/liblzma/lz/lz_encoder_hash.h | 1 + contrib/xz/src/liblzma/lzma/fastpos.h | 1 + contrib/xz/src/liblzma/lzma/fastpos_tablegen.c | 2 + contrib/xz/src/liblzma/lzma/lzma_encoder.c | 4 +- contrib/xz/src/liblzma/rangecoder/price.h | 1 + contrib/xz/src/lzmainfo/lzmainfo.c | 6 +- contrib/xz/src/xz/args.c | 5 +- contrib/xz/src/xz/coder.c | 11 +- contrib/xz/src/xz/file_io.c | 48 +- contrib/xz/src/xz/file_io.h | 4 +- contrib/xz/src/xz/hardware.c | 4 +- contrib/xz/src/xz/hardware.h | 3 +- contrib/xz/src/xz/list.c | 11 +- contrib/xz/src/xz/message.c | 2 +- contrib/xz/src/xz/message.h | 30 +- contrib/xz/src/xz/options.c | 3 +- contrib/xz/src/xz/util.c | 89 +- contrib/xz/src/xz/util.h | 10 +- contrib/xz/src/xz/xz.1 | 10 +- contrib/xz/src/xzdec/xzdec.c | 9 +- lib/liblzma/config.h | 6 +- 53 files changed, 2355 insertions(+), 237 deletions(-) diff --git a/contrib/xz/ChangeLog b/contrib/xz/ChangeLog index 52375b492a14..4dd0978ef313 100644 --- a/contrib/xz/ChangeLog +++ b/contrib/xz/ChangeLog @@ -1,3 +1,1840 @@ +commit 49053c0a649f4c8bd2b8d97ce915f401fbc0f3d9 +Author: Jia Tan +Date: 2023-10-31 22:30:29 +0800 + + Bump version and soname for 5.4.5. + + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 84c0cfc556287628df871703672879e530d0391f +Author: Jia Tan +Date: 2023-11-01 20:18:30 +0800 + + Add NEWS for 5.4.5. + + NEWS | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 74 insertions(+) + +commit d90ed84db9770712e2421e170076b43bda9b64a7 +Author: Lasse Collin +Date: 2023-10-31 21:41:09 +0200 + + liblzma: Fix compilation of fastpos_tablegen.c. + + The macro lzma_attr_visibility_hidden has to be defined to make + fastpos.h usable. The visibility attribute is irrelevant to + fastpos_tablegen.c so simply #define the macro to an empty value. + + fastpos_tablegen.c is never built by the included build systems + and so the problem wasn't noticed earlier. It's just a standalone + program for generating fastpos_table.c. + + Fixes: https://github.com/tukaani-project/xz/pull/69 + Thanks to GitHub user Jamaika1. + + src/liblzma/lzma/fastpos_tablegen.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 9b1268538b0b2c6c0a121f95165de65fc71ad23c +Author: Jia Tan +Date: 2023-10-31 21:51:40 +0800 + + Build: Fix text wrapping in an output message. + + configure.ac | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit 068ee436f4a8a706125ef43e8228b30001b1554e +Author: Lasse Collin +Date: 2023-10-22 17:59:11 +0300 + + liblzma: Use lzma_always_inline in memcmplen.h. + + src/liblzma/common/memcmplen.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 6cdf0a7b7974baf58c1fd20ec3278f3b84ae56e5 +Author: Lasse Collin +Date: 2023-10-30 17:43:03 +0200 + + liblzma: #define lzma_always_inline in common.h. + + src/liblzma/common/common.h | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +commit 33daad3961a4f07f3902b40f13e823e6e43e85da +Author: Lasse Collin +Date: 2023-10-22 17:15:32 +0300 + + liblzma: Use lzma_attr_visibility_hidden on private extern declarations. + + These variables are internal to liblzma and not exposed in the API. + + src/liblzma/check/check.h | 7 +++++++ + src/liblzma/common/stream_flags_common.h | 3 +++ + src/liblzma/lz/lz_encoder_hash.h | 1 + + src/liblzma/lzma/fastpos.h | 1 + + src/liblzma/rangecoder/price.h | 1 + + 5 files changed, 13 insertions(+) + +commit 6961a5ac7df178bfc2b7a181c40575847bc3035f +Author: Lasse Collin +Date: 2023-10-22 17:08:39 +0300 + + liblzma: #define lzma_attr_visibility_hidden in common.h. + + In ELF shared libs: + + -fvisibility=hidden affects definitions of symbols but not + declarations.[*] This doesn't affect direct calls to functions + inside liblzma as a linker can replace a call to lzma_foo@plt + with a call directly to lzma_foo when -fvisibility=hidden is used. + + [*] It has to be like this because otherwise every installed + header file would need to explictly set the symbol visibility + to default. + + When accessing extern variables that aren't defined in the + same translation unit, compiler assumes that the variable has + the default visibility and thus indirection is needed. Unlike + function calls, linker cannot optimize this. + + Using __attribute__((__visibility__("hidden"))) with the extern + variable declarations tells the compiler that indirection isn't + needed because the definition is in the same shared library. + + About 15+ years ago, someone told me that it would be good if + the CRC tables would be defined in the same translation unit + as the C code of the CRC functions. While I understood that it + could help a tiny amount, I didn't want to change the code because + a separate translation unit for the CRC tables was needed for the + x86 assembly code anyway. But when visibility attributes are + supported, simply marking the extern declaration with the + hidden attribute will get identical result. When there are only + a few affected variables, this is trivial to do. I wish I had + understood this back then already. + + src/liblzma/common/common.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit 5b9e16764905d06fa8e8339ba185ddfee304e5fb +Author: Lasse Collin +Date: 2023-09-30 22:54:28 +0300 + + liblzma: Refer to MinGW-w64 instead of MinGW in the API headers. + + MinGW (formely a MinGW.org Project, later the MinGW.OSDN Project + at ) has GCC 9.2.0 as the + most recent GCC package (released 2021-02-02). The project might + still be alive but majority of people have switched to MinGW-w64. + Thus it seems clearer to refer to MinGW-w64 in our API headers too. + Building with MinGW is likely to still work but I haven't tested it + in the recent years. + + src/liblzma/api/lzma.h | 4 ++-- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit 36fabdbe67c8a8fbdc3ac695a91fc443a1328cc4 +Author: Lasse Collin +Date: 2023-09-27 00:58:17 +0300 + + CMake: Use -D_FILE_OFFSET_BITS=64 if (and only if) needed. + + A CMake option LARGE_FILE_SUPPORT is created if and only if + -D_FILE_OFFSET_BITS=64 affects sizeof(off_t). + + This is needed on many 32-bit platforms and even with 64-bit builds + with MinGW-w64 to get support for files larger than 2 GiB. + + CMakeLists.txt | 7 ++++- + cmake/tuklib_large_file_support.cmake | 52 +++++++++++++++++++++++++++++++++++ + 2 files changed, 58 insertions(+), 1 deletion(-) + +commit 989c8c354cbd2d20fbae4a432a3e31f5bc1cb9bf +Author: Lasse Collin +Date: 2023-09-30 02:14:25 +0300 + + CMake: Generate and install liblzma.pc if not using MSVC. + + Autotools based build uses -pthread and thus adds it to Libs.private + in liblzma.pc. CMake doesn't use -pthread at all if pthread functions + are available in libc so Libs.private doesn't get -pthread either. + + CMakeLists.txt | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +commit 983f3b458dc79c5976a4237fdfe4f8079f8d8830 +Author: Lasse Collin +Date: 2023-09-30 01:13:13 +0300 + + CMake: Rearrange the PACKAGE_ variables. + + The windres workaround now replaces spaces with \x20 so + the package name isn't repeated. + + These changes will help with creation of liblzma.pc. + + CMakeLists.txt | 26 +++++++++++++++----------- + 1 file changed, 15 insertions(+), 11 deletions(-) + +commit 4083c8e9501a48934a5fb563d2c3ce2ae143cd27 +Author: Lasse Collin +Date: 2023-09-29 20:46:11 +0300 + + liblzma: Add Cflags.private to liblzma.pc.in for MSYS2. + + It properly adds -DLZMA_API_STATIC when compiling code that + will be linked against static liblzma. Having it there on + systems other than Windows does no harm. + + See: https://www.msys2.org/docs/pkgconfig/ + + src/liblzma/liblzma.pc.in | 1 + + 1 file changed, 1 insertion(+) + +commit 661549ecb7a9b136d72a01c137d9776c75d52d51 +Author: Lasse Collin +Date: 2023-09-27 22:46:20 +0300 + + CMake: Create liblzma.def when building liblzma.dll with MinGW-w64. + + CMakeLists.txt | 20 ++++++++++++++++++++ + cmake/remove-ordinals.cmake | 26 ++++++++++++++++++++++++++ + 2 files changed, 46 insertions(+) + +commit 0e546eb4da05c52b7d257e5bd85e15c51c4d86a3 +Author: Lasse Collin +Date: 2023-10-26 21:44:42 +0300 + + CMake: Change one CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR. + + In this case they have identical values. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit da4d04e4d6e199d28b58bd2e0df4e120c52dd5d7 +Author: Lasse Collin +Date: 2023-10-01 19:10:57 +0300 + + CMake/Windows: Fix the import library filename. + + Both PREFIX and IMPORT_PERFIX have to be set to "" to get + liblzma.dll and liblzma.dll.a. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 007558a358c48a0175cc8d47d11798d7967282ab +Author: Lasse Collin +Date: 2023-10-11 19:47:44 +0300 + + CMake: Don't shadow the cache entry ENABLE_THREADS with a normal variable. + + Using set(ENABLE_THREADS "posix") is confusing because it sets + a new normal variable and leaves the cache entry with the same + name unchanged. The intent wasn't to change the cache entry so + this switches to a different variable name. + + CMakeLists.txt | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +commit 7d01de67ee3dd76cfc12c23220e2e4cdc59708f1 +Author: Lasse Collin +Date: 2023-10-09 21:12:31 +0300 + + CMake: Edit threading related messages. + + It's mostly to change from "thread method" to "threading method". + + CMakeLists.txt | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +commit f8edcf3da689aad4b21e139197725450f2c456a0 +Author: Lasse Collin +Date: 2023-10-09 20:59:24 +0300 + + CMake: Use FATAL_ERROR if user-supplied options aren't understood. + + This way typos are caught quickly and compounding error messages + are avoided (a single typo could cause more than one error). + + This keeps using SEND_ERROR when the system is lacking a feature + (like threading library or sandboxing method). This way the whole + configuration log will be generated in case someone wishes to + report a problem upstream. + + CMakeLists.txt | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +commit 1695021e4a233a9388ddd428654c1447f0ea3bfb +Author: Jia Tan +Date: 2023-10-19 16:09:01 +0800 + + CMake: Add ALLOW_CLMUL_CRC option to enable/disable CLMUL. + + The option is enabled by default, but will only be visible to a user + listing cache variables or using a CMake GUI application if the + immintrin.h header file is found. + + This mirrors our Autotools build --disable-clmul-crc functionality. + + CMakeLists.txt | 40 +++++++++++++++++++++++----------------- + 1 file changed, 23 insertions(+), 17 deletions(-) + +commit 5056bc51071d1a07097c5667a0d5bd85242e31b9 +Author: Lasse Collin +Date: 2023-10-14 17:56:59 +0300 + + tuklib_integer: Revise unaligned reads and writes on strict-align archs. + + In XZ Utils context this doesn't matter much because + unaligned reads and writes aren't used in hot code + when TUKLIB_FAST_UNALIGNED_ACCESS isn't #defined. + + src/common/tuklib_integer.h | 256 ++++++++++++++++++++++++++++++++------------ + 1 file changed, 189 insertions(+), 67 deletions(-) + +commit 9e14743ee5ba79181076bc33952245d5b18fbc58 +Author: Lasse Collin +Date: 2023-09-23 02:21:49 +0300 + + tuklib_integer: Add missing write64be and write64le fallback functions. + + src/common/tuklib_integer.h | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +commit 4cc91ceb3992ef4f51302b56178c3b2c2aeaaaad +Author: Jia Tan +Date: 2023-10-12 20:12:18 +0800 + + Build: Update visibility.m4 from Gnulib. + + Updating from version 6 -> 8 from upstream. Declarations for variables + and function bodies were added to avoid unnecessary failures with + -Werror. + + m4/visibility.m4 | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit 1824a6007cb1c8d5d7abcc7bf649148bc06fa72c +Author: Lasse Collin +Date: 2023-10-06 19:36:35 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 8fdc71a27d07b10a3da52432432e080b6d577642 +Author: Jia Tan +Date: 2023-09-29 20:14:39 +0800 + + CMake: Rename xz and man page symlink custom targets. + + The Ninja Generator for CMake cannot have a custom target and its + BYPRODUCTS have the same name. This has prevented Ninja builds on + Unix-like systems since the xz symlinks were introduced in + 80a1a8bb838842a2be343bd88ad1462c21c5e2c9. + + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 38171492ded6426ddf53d0c200fa8c93fcd02a60 +Author: Lasse Collin +Date: 2023-09-27 19:54:35 +0300 + + CMake: Fix Windows build with Clang/LLVM 17. + + llvm-windres 17.0.0 has more accurate emulation of GNU windres, so + the hack for GNU windres must now be used with llvm-windres too. + + LLVM 16.0.6 has the old behavior and there likely won't be more + 16.x releases. So we can simply check for >= 17.0.0. + + The workaround must not be used with Clang that is acting in + MSVC mode. This checks for the known environments that need + the workaround instead of using "NOT MSVC". + + See also: + https://github.com/llvm/llvm-project/commit/2bcc0fdc58a220cb9921b47ec8a32c85f2511a47 + + CMakeLists.txt | 26 ++++++++++++++------------ + 1 file changed, 14 insertions(+), 12 deletions(-) + +commit 1bce6fe48334b5df33d0487a9cbe41950122230e +Author: Jia Tan +Date: 2023-09-27 00:02:11 +0800 + + liblzma: Avoid compiler warning without creating extra symbol. + + When the generic fast crc64 method is used, then we omit + lzma_crc64_table[][]. + + The C standards don't allow an empty translation unit which can be + avoided by declaring something, without exporting any symbols. + + src/liblzma/check/crc64_table.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +commit dce95a593e6cd9779110aa1e314abd8b35c75f6b +Author: Lasse Collin +Date: 2023-09-26 17:24:15 +0300 + + Build: Update the comment about -Werror usage in checks. + + configure.ac | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit f3c32762ae309afa2fe330e7fb397acfdedc4d37 +Author: Lasse Collin +Date: 2023-09-26 13:51:31 +0300 + + Build: Fix underquoted AC_LANG_SOURCE. + + It made no practical difference in this case. + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7dd57f2f2c8fde93fa42b4dbf6d9860717723b41 +Author: Lasse Collin +Date: 2023-09-26 13:14:37 +0300 + + Build: Silence Autoconf warning. + + There was a use of AC_COMPILE_IFELSE that didn't use + AC_LANG_SOURCE and Autoconf warned about this. The omission + had been intentional but it turned out that this didn't do + what I thought it would. + + Autoconf 2.71 manual gives an impression that AC_LANG_SOURCE + inserts all #defines that have been made with AC_DEFINE so + far (confdefs.h). The idea was that omitting AC_LANG_SOURCE + would mean that only the exact code included in the + AC_COMPILE_IFELSE call would be compiled. + + With C programs this is not true: the #defines get added without + AC_LANG_SOURCE too. There seems to be no neat way to avoid this. + Thus, with the C language at least, adding AC_LANG_SOURCE makes + no other difference than silencing a warning from Autoconf. The + generated "configure" remains identical. (Docs of AC_LANG_CONFTEST + say that the #defines have been inserted since Autoconf 2.63b and + that AC_COMPILE_IFELSE uses AC_LANG_CONFTEST. So the behavior is + documented if one also reads the docs of macros that one isn't + calling directly.) + + Any extra code, including #defines, can cause problems for + these two tests because these tests must use -Werror. + CC=clang CFLAGS=-Weverything is the most extreme example. + It enables -Wreserved-macro-identifier which warns about + It's possible to write a test file that passes -Weverything but + it becomes impossible when Autoconf inserts confdefs.h. + + So this commit adds AC_LANG_SOURCE to silence Autoconf warnings. + A different solution is needed for -Werror tests. + + configure.ac | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +commit edec253e418562f3164a01ecc8805295fa022efa +Author: Jia Tan +Date: 2023-09-26 00:47:26 +0800 + + Build: Remove Gnulib dependency from tests. + + The tests do not use any Gnulib replacements so they do not need to link + libgnu.a or have /lib in the include path. + + tests/Makefile.am | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +commit 46cb133ce7360496eecca1255b364c05f0205855 +Author: Jia Tan +Date: 2023-09-26 00:43:43 +0800 + + CMake: Remove /lib from tests include path. + + The tests never included anything from /lib, so this was not needed. + + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +commit 4ae13cfe0dedb8ddc3cf9ded8cd1ac09361b3bd1 +Author: Lasse Collin +Date: 2023-09-24 16:32:32 +0300 + + sysdefs.h: Update the comment about __USE_MINGW_ANSI_STDIO. + + src/common/sysdefs.h | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +commit 660c8c29e57d30dbd5009ef1f0ec1bbe195ccef6 +Author: Lasse Collin +Date: 2023-09-22 02:33:29 +0300 + + xz: Windows: Don't (de)compress to special files like "con" or "nul". + + Before this commit, the following writes "foo" to the + console and deletes the input file: + + echo foo | xz > con_xz + xz --suffix=_xz --decompress con_xz + + It cannot happen without --suffix because names like con.xz + are also special and so attempting to decompress con.xz + (or compress con to con.xz) will already fail when opening + the input file. + + Similar thing is possible when compressing. The following + writes to "nul" and the input file "n" is deleted. + + echo foo | xz > n + xz --suffix=ul n + + Now xz checks if the destination is a special file before + continuing. DOS/DJGPP version had a check for this but + Windows (and OS/2) didn't. + + src/xz/file_io.c | 35 ++++++++++++++++++++++++++++------- + 1 file changed, 28 insertions(+), 7 deletions(-) + +commit b7ce6e80786fc0c08ed129e8ee262ea96a5473a1 +Author: Lasse Collin +Date: 2023-09-21 20:42:52 +0300 + + CMake: Wrap two overlong lines that are possible to wrap. + + CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 1595f454d5c8257c668cccd6a86dd68175d5c430 +Author: Lasse Collin +Date: 2023-09-21 20:36:31 +0300 + + CMake: Add a comment about threads on Cygwin. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 5be6275f19784cdd5a954f0188045c8ff4934d54 +Author: Lasse Collin +Date: 2023-09-12 21:12:34 +0300 + + CMake: Bump maximum policy version to 3.27. + + There are several new policies. CMP0149 may affect the Windows SDK + version that CMake will choose by default. The new behavior is more + predictable, always choosing the latest SDK version by default. + + The other new policies shouldn't affect this package. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e515643d7524851d1eb7dab73453e26d8521324c +Author: Lasse Collin +Date: 2023-09-08 19:08:57 +0300 + + Doxygen: Add more C macro names to PREDEFINED. + + doxygen/Doxyfile | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +commit e3478ae4f36cd06522a2fef023860893f068434d +Author: Lasse Collin +Date: 2023-09-11 18:47:26 +0300 + + liblzma: Move a few __attribute__ uses in function declarations. + + The API headers have many attributes but these were left + as is for now. + + src/liblzma/common/common.c | 6 ++++-- + src/liblzma/common/common.h | 8 ++++---- + src/liblzma/common/memcmplen.h | 3 ++- + 3 files changed, 10 insertions(+), 7 deletions(-) + +commit b71b8922ef3971e5ccffd1e213888d44abe21d11 +Author: Lasse Collin +Date: 2023-09-11 19:03:35 +0300 + + xz, xzdec, lzmainfo: Use tuklib_attr_noreturn. + + For compatibility with C23's [[noreturn]], tuklib_attr_noreturn + must be at the beginning of declaration (before "extern" or + "static", and even before any GNU C's __attribute__). + + This commit also moves all other function attributes to + the beginning of function declarations. "extern" is kept + at the beginning of a line so the attributes are listed on + separate lines before "extern" or "static". + + src/lzmainfo/lzmainfo.c | 6 ++++-- + src/xz/coder.c | 3 ++- + src/xz/hardware.h | 3 ++- + src/xz/message.h | 30 +++++++++++++++++------------- + src/xz/options.c | 3 ++- + src/xz/util.h | 8 ++++---- + src/xzdec/xzdec.c | 9 ++++++--- + 7 files changed, 37 insertions(+), 25 deletions(-) + +commit 359e5c6cb128dab64ea6070d21d1c240f96cea6b +Author: Lasse Collin +Date: 2023-09-11 18:53:31 +0300 + + Remove incorrect uses of __attribute__((__malloc__)). + + xrealloc() is obviously incorrect, modern GCC docs even + mention realloc() as an example where this attribute + cannot be used. + + liblzma's lzma_alloc() and lzma_alloc_zero() would be + correct uses most of the time but custom allocators + may use a memory pool or otherwise hold the pointer + so aliasing issues could happen in theory. + + The xstrdup() case likely was correct but I removed it anyway. + Now there are no __malloc__ attributes left in the code. + The allocations aren't in hot paths so this should make + no practical difference. + + src/liblzma/common/common.c | 4 ++-- + src/liblzma/common/common.h | 4 ++-- + src/xz/util.h | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +commit 589b4cba22fccb1dbc919df5d134aefb2b5a6b01 +Author: Lasse Collin +Date: 2023-09-19 14:03:45 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 43728ed2267e921fbdfa699ee1e91b105ab0e98b +Author: Lasse Collin +Date: 2023-09-14 16:35:46 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit caf00e0988ba47842cfd93dfbb17f7d30120d6e7 +Author: Lasse Collin +Date: 2023-09-14 16:34:07 +0300 + + liblzma: Mark crc64_clmul() with __attribute__((__no_sanitize_address__)). + + Thanks to Agostino Sarubbo. + Fixes: https://github.com/tukaani-project/xz/issues/62 + + src/liblzma/check/crc64_fast.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit a70e96d2da761b8b3a77bf14e08002d871e5950b +Author: Jia Tan +Date: 2023-09-12 22:36:12 +0800 + + CMake: Fix time.h checks not running on second CMake run. + + If CMake was configured more than once, HAVE_CLOCK_GETTIME and + HAVE_CLOCK_MONOTONIC would not be set as compile definitions. The check + for librt being needed to provide HAVE_CLOCK_GETTIME was also + simplified. + + CMakeLists.txt | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +commit d5275d83bd2a9701c5feb8666785007c074b1359 +Author: Jia Tan +Date: 2023-09-12 22:34:06 +0800 + + CMake: Fix unconditionally defining HAVE_CLOCK_MONOTONIC. + + If HAVE_CLOCK_GETTIME was defined, then HAVE_CLOCK_MONOTONIC was always + added as a compile definition even if the check for it failed. + + CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +commit 1f6e7c68fbdeeaa9482fc77de090be63d90912fd +Author: Lasse Collin +Date: 2023-08-31 19:50:05 +0300 + + xz: Refactor thousand separator detection and disable it on MSVC. + + Now the two variations of the format strings are created with + a macro, and the whole detection code can be easily disabled + on platforms where thousand separator formatting is known to + not work (MSVC has no support, and on DJGPP 2.05 it can have + problems in some cases). + + src/xz/util.c | 89 ++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 45 insertions(+), 44 deletions(-) + +commit ef71f83973a20cc28a3221f85681922026ea33f5 +Author: Lasse Collin +Date: 2023-08-31 18:14:43 +0300 + + xz: Fix a too relaxed assertion and remove uses of SSIZE_MAX. + + SSIZE_MAX isn't readily available on MSVC. Removing it means + that there is one thing less to worry when porting to MSVC. + + src/xz/file_io.c | 5 ++--- + src/xz/file_io.h | 4 ++-- + 2 files changed, 4 insertions(+), 5 deletions(-) + +commit cf8ba7c3a89e37736b926dfbe85dffeff725db47 +Author: Jia Tan +Date: 2023-08-28 23:14:45 +0800 + + Tests: Improve invalid unpadded size check in test_lzma_index_append(). + + This check was extended to test the code added to fix a failing assert + in 68bda971bb8b666a009331455fcedb4e18d837a4. + + tests/test_index.c | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +commit 4a4180ce74788e97e90b9aab579bfd7c6dce3f59 +Author: Jia Tan +Date: 2023-08-28 21:54:41 +0800 + + Tests: Improve comments in test_index.c. + + tests/test_index.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 4b23b84b89e39a5117e16f66c3b01db4f08ed3e7 +Author: Jia Tan +Date: 2023-08-28 21:52:54 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 773f1e8622cb1465df528cb16a749517650acd93 +Author: Jia Tan +Date: 2023-08-28 21:50:16 +0800 + + liblzma: Update assert in vli_ceil4(). + + The argument to vli_ceil4() should always guarantee the return value + is also a valid lzma_vli. Thus the highest three valid lzma_vli values + are invalid arguments. All uses of the function ensure this so the + assert is updated to match this. + + src/liblzma/common/index.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 68bda971bb8b666a009331455fcedb4e18d837a4 +Author: Jia Tan +Date: 2023-08-28 21:31:25 +0800 + + liblzma: Add overflow check for Unpadded size in lzma_index_append(). + + This was not a security bug since there was no path to overflow + UINT64_MAX in lzma_index_append() or when it calls index_file_size(). + The bug was discovered by a failing assert() in vli_ceil4() when called + from index_file_size() when unpadded_sum (the sum of the compressed size + of current Stream and the unpadded_size parameter) exceeds LZMA_VLI_MAX. + + Previously, the unpadded_size parameter was checked to be not greater + than UNPADDED_SIZE_MAX, but no check was done once compressed_base was + added. + + This could not have caused an integer overflow in index_file_size() when + called by lzma_index_append(). The calculation for file_size breaks down + into the sum of: + + - Compressed base from all previous Streams + - 2 * LZMA_STREAM_HEADER_SIZE (size of the current Streams header and + footer) + - stream_padding (can be set by lzma_index_stream_padding()) + - Compressed base from the current Stream + - Unpadded size (parameter to lzma_index_append()) + + The sum of everything except for Unpadded size must be less than + LZMA_VLI_MAX. This is guarenteed by overflow checks in the functions + that can set these values including lzma_index_stream_padding(), + lzma_index_append(), and lzma_index_cat(). The maximum value for + Unpadded size is enforced by lzma_index_append() to be less than or + equal UNPADDED_SIZE_MAX. Thus, the sum cannot exceed UINT64_MAX since + LZMA_VLI_MAX is half of UINT64_MAX. + + Thanks to Joona Kannisto for reporting this. + + src/liblzma/common/index.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit b41bb79c602481d7ea93d65f5b3e3f08dc54233b +Author: Jia Tan +Date: 2023-08-28 22:18:29 +0800 + + Translations: Update the Esperanto translation. + + po/eo.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) + +commit 6614e6d4bf8e2b5af6eb73930148e0ffc8d2265a +Author: Jia Tan +Date: 2023-08-09 20:55:36 +0800 + + Docs: Update INSTALL for --enable-threads method win95. + + The Autotools build allows win95 threads and --enable-small together now + if the compiler supports __attribute__((__constructor__)). + + INSTALL | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit bfb623ad96fa6f1dbc0c560403c4296e3c8e26c9 +Author: Jia Tan +Date: 2023-08-09 20:54:15 +0800 + + CMake: Conditionally allow win95 threads and --enable-small. + + CMakeLists.txt | 27 +++++++++++++++++++-------- + 1 file changed, 19 insertions(+), 8 deletions(-) + +commit e919ebb29ac9f5270cd7176a39d0d3b4cea875a9 +Author: Jia Tan +Date: 2023-08-09 20:35:16 +0800 + + Build: Conditionally allow win95 threads and --enable-small. + + When the compiler supports __attribute__((__constructor__)) + mythread_once() is never used, even with --enable-small. A configuration + with win95 threads and --enable-small will compile and be thread safe so + it can be allowed. + + This isn't a very common configuration since MSVC does not support + __attribute__((__constructor__)), but MINGW32 and CLANG32 environments + for MSYS2 can use win95 threads and have + __attribute__((__constructor__)) support. + + configure.ac | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +commit c0c0cd4a483a672b66a13761583bc4f84d86d501 +Author: Jamaika1 +Date: 2023-08-08 14:07:59 +0200 + + mythread.h: Fix typo error in Vista threads mythread_once(). + + The "once_" variable was accidentally referred to as just "once". This + prevented building with Vista threads when + HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR was not defined. + + src/common/mythread.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d93fbefcc48a8737fdf5678ce66d1c1d605752a0 +Author: Jia Tan +Date: 2023-08-03 20:10:21 +0800 + + Tests: Style fixes to test_lzip_decoder.c. + + tests/test_lzip_decoder.c | 36 ++++++++++++++++++++++++------------ + 1 file changed, 24 insertions(+), 12 deletions(-) + +commit 65981d8e45741fd1502e007609469e1d60312e69 +Author: Jia Tan +Date: 2023-08-03 15:56:20 +0800 + + Translations: Update the Chinese (simplified) translation. + + po/zh_CN.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a108ed589171d683c34238a87e358b87f69e39a0 +Author: Lasse Collin +Date: 2023-08-02 17:15:12 +0300 + + xz: Omit an empty paragraph on the man page. + + src/xz/xz.1 | 1 - + 1 file changed, 1 deletion(-) + +commit 03c51c5c08fe3579d8bbc8eea8251a1128001330 +Author: Jia Tan +Date: 2023-08-02 20:32:20 +0800 + + Bump version and soname for 5.4.4. + + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit d7fa3f1b58a77f79b1a4e12452418b5555632e18 +Author: Jia Tan +Date: 2023-08-02 20:30:07 +0800 + + Add NEWS for 5.4.4. + + NEWS | 43 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +commit 6a1093c0004c42eeaef312456c295671496dd67a +Author: Lasse Collin +Date: 2023-08-02 15:19:43 +0300 + + build-aux/manconv.sh: Fix US-ASCII and UTF-8 output. + + groff defaults to SGR escapes. Using -P-c passes -c to grotty + which restores the old behavior. Perhaps there is a better way to + get pure plain text output but this works for now. + + build-aux/manconv.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit f6f9f5651a7e2d89f588981533155ab850e063f7 +Author: Lasse Collin +Date: 2023-08-01 19:10:43 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 0dd83ba8767dad722e0f0f94e0e4146e290a28cb +Author: Lasse Collin +Date: 2023-08-01 18:22:24 +0300 + *** 2905 LINES SKIPPED *** From nobody Sun Dec 10 17:41:11 2023 X-Original-To: dev-commits-src-all@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 4SpBxg6Rchz548XR; Sun, 10 Dec 2023 17:41: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 4SpBxg608jz3WVJ; Sun, 10 Dec 2023 17:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702230071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oy6vbm9n2k6uWsyCEGqodFJJwL1mPcjqNzNpSomTjbc=; b=WdeuZ8Huf5sqKdzpT1ys17/GyFQcSGk5VM06osLtcEbFwa8fkOWdyH3Zu4fKrtGrQ9ssfG VlwnVP3f2sCNi6DynLzg0daZFVJfEIxaVEDTsiXJF8ahorOIbnr/pQ5ul05PohX6F0xuLu Q9SHB7yq21LtHh8oOhpBDWWBy+1J4EpDskZVgNGj336cjqW01V4vuYQS5+ce2lwPmzR+Kl MHarIPfrcfvWKZB5AsVz37T+fnjSh0Le/TdQZzRj+NrGcIvRisWnkNrTSvGbjW6ZZdcADa 2IWmvx0SYzCcai/X8NnQHrpFBURl7zDRs29YKucKTVRDalsuhT5KapLquo4TpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702230071; a=rsa-sha256; cv=none; b=Si81XAaVgqq6lYl/73JIT5GUrqiZl4DCxLOYNJ6mXdbBPCBrnPc9F6Y4qIjmbmLumGN8YA gZnvjk81kY1RZstjimCMXQBhGuIEsTapS2QWKBa5osWDKK5SY5mT6adS2TwQzSMkoOYRV+ ZUOsRjqiubzIbZbOnZpPIYUCuYis5LclegrcMCArYErdUw68Amwy5ZvtvbIpzK2/qkmrSs Owr2REw2IKIzxlH7pSzoLZrYSp/ap6h9ik2/mV5i4CQNq0tEYdME8OX4mGFRBPVpb5lR3h sVkkXRlg4FPzNmWNAu2R1qE+4BbC8wVsydiIaFJ6RgYpe6TiZIgNXV9dwkKTzw== 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=1702230071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oy6vbm9n2k6uWsyCEGqodFJJwL1mPcjqNzNpSomTjbc=; b=wrvZAL2rM0fSAG+n6aN8vPa74XlFC/9/Qs7+Sc87bhMi7ApKs4uvC3Jyu85VLPS6qbS5JP TPxpMUwSEusTs3v8M2rT+gXWKgVF965ucHCU/M2NBHwT+MMdcmI3gkGjwKwUYzQoTcEfIj 5XVEnMFUTMfKpKvbvnu0Yyhpkoo+vyxIjJxEUOfvBWTpYQ4SB2uNq6ype/wVtsJqBHmf4Y Ab/TcNQqwuB3dVjZqKmZCPaHIvKIpgUmU+z3rOVZBwJ2jQuHGkOGxD1Mc1fQr5QpEp4wrB IZ89wwjJjm6eRpn8kadjY7Mbq/AywjSD85tySvp9IT3Jjas78/W6iI3KVNBR3g== 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 4SpBxg52gZzxLg; Sun, 10 Dec 2023 17:41: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 3BAHfBRW005021; Sun, 10 Dec 2023 17:41:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAHfBEQ005018; Sun, 10 Dec 2023 17:41:11 GMT (envelope-from git) Date: Sun, 10 Dec 2023 17:41:11 GMT Message-Id: <202312101741.3BAHfBEQ005018@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: dff3a80f6dfe - main - endian.h: Remove duplicate words List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: dff3a80f6dfe88c52326ceb2c154668f132fdb52 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dff3a80f6dfe88c52326ceb2c154668f132fdb52 commit dff3a80f6dfe88c52326ceb2c154668f132fdb52 Author: Jose Luis Duran AuthorDate: 2023-12-10 16:35:56 +0000 Commit: Ed Maste CommitDate: 2023-12-10 17:40:57 +0000 endian.h: Remove duplicate words Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/920 --- include/endian.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/endian.h b/include/endian.h index c7b78217cedd..eb25cedf0bef 100644 --- a/include/endian.h +++ b/include/endian.h @@ -35,9 +35,9 @@ /* * We don't define BIG_ENDI, LITTLE_ENDI, HIGH_HALF and LOW_HALF macros that - * glibc's endian.h defines since those appear to be internal to internal to - * glibc. We also don't try to emulate the various helper macros that glibc - * uses to limit namespace visibility. + * glibc's endian.h defines since those appear to be internal to glibc. + * We also don't try to emulate the various helper macros that glibc uses to + * limit namespace visibility. */ #endif /* _ENDIAN_H_ */ From nobody Sun Dec 10 17:47:19 2023 X-Original-To: dev-commits-src-all@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 4SpC4l6x7Pz549Bh; Sun, 10 Dec 2023 17:47: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 4SpC4l6QhBz3Wy3; Sun, 10 Dec 2023 17: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=1702230439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GxPkIvEMArKm0bZgQqHgEnXro1U+GuLhWQ+cK+bi3xY=; b=vilhKEOqwEqxBfPM4BbPgInJOdZrxqvOKt7WYpuwMf/NMFuJKmnAT5IAxBxFcwKJeeCrxW VslH6HV/IHfDf1QrmTuzv61EnHdEAm0FUjM+2Yu2uw887feGzD7qNprI912QSyBn2JEKPI 1SebotkKFDBwMXvL5ayVHdQAKfA0lSpp6I+9EIc8AH4oo+kO20Ec5lq6bGpbc0zBgX/cJk Ieu4zIAvCowddtecosAgg/HjJ0VqRHq2GPDtEq4tyaCKisj8T4StyhWyXAAlWV02wMAvFR aWSC+ScKJahK3N17rF3B5XBNwFRG+LuHlHeQR/+vDYsiMoS7BeOa9ChiL1ZEgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702230439; a=rsa-sha256; cv=none; b=V7upSSaXu254MvR/G47T8/zceHTxYmeuilGPyfURtN3kdBMX+UlVImGUxhNqtkYLC8nb5M 5z0pcZ/P9v5YfXYmvInZMvb1iYjG1T0ECs587yV10bzTxmhrLxgEJu9yXtfEgP35Y8o06B ePre/EJFEppN0kcK/vPd91BTP7GU9oIyhzgTVDWY/rmpVmw5U3zf3W7UAoHmOtNkE5ktOA cKv/93269Vf2k8fRy2tbhae17A8rkIRY3jx1mwqx6X0ts6n0iNd57K4hhkx63jMQHyG2yw 3+RahE257AczHUzSnE/vd8etyO64KiBI/O2rzml4TeQ6CAqspBw6d72Noa7t5Q== 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=1702230439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GxPkIvEMArKm0bZgQqHgEnXro1U+GuLhWQ+cK+bi3xY=; b=Q3cpDRraYqtm4pHdX9Q9tNkRbA5pOcn7K8eegCL9QFeze51Sm1x4cDCDlME6HuF4fbhVjl G40cy7zTjVgXJxPAq2jrjtoSViqXuxwtv0FPh7Voc8EM9KSplKHGasHCjdEuAB4AgKSbJP g05pJNNHYFqLSwK+ziDoy1VYbaA+xcQ19RRACgxX39jv0kdyn3Jo4/p6AbKjumGf2triyN nlaLvGeguBFNLqRCeaCibvp7bH2jQz8ip4py1lP5KbjbMMfiinhvpyQVefTG1aQxE1Cr3O ObN5XtjvQF2aJUvLoKyUYJ3NEpyn5llzS8tV8mlakZQocZxKkmCWvA5Y+9sKCw== 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 4SpC4l5T3HzxS7; Sun, 10 Dec 2023 17:47:19 +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 3BAHlJPZ008872; Sun, 10 Dec 2023 17:47:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAHlJ1R008869; Sun, 10 Dec 2023 17:47:19 GMT (envelope-from git) Date: Sun, 10 Dec 2023 17:47:19 GMT Message-Id: <202312101747.3BAHlJ1R008869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c2b39a756fe7 - stable/14 - OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c2b39a756fe7463cff5c715c2375700efef1e799 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c2b39a756fe7463cff5c715c2375700efef1e799 commit c2b39a756fe7463cff5c715c2375700efef1e799 Author: Mark Johnston AuthorDate: 2023-12-07 16:20:11 +0000 Commit: Ed Maste CommitDate: 2023-12-10 17:46:57 +0000 OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field Otherwise the field is left uninitialized, leading to a possible kernel memory disclosure to userspace or to the network. Use the same initialization value we use in zfsctl_common_getattr(). Reported-by: KMSAN Sponsored-by: The FreeBSD Foundation Reviewed-by: Brian Behlendorf Reviewed-by: Ed Maste Signed-off-by: Mark Johnston (cherry picked from commit 11656234b560c401dec6a16e1bf048b20fd31aac) --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index 3302f043620a..93bbfa8e3ef2 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -2007,6 +2007,8 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr) vap->va_size = zp->z_size; if (vp->v_type == VBLK || vp->v_type == VCHR) vap->va_rdev = zfs_cmpldev(rdev); + else + vap->va_rdev = 0; vap->va_gen = zp->z_gen; vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ vap->va_filerev = zp->z_seq; From nobody Sun Dec 10 17:48:03 2023 X-Original-To: dev-commits-src-all@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 4SpC5c0bXxz549Cy; Sun, 10 Dec 2023 17:48: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 4SpC5c05vkz3XRw; Sun, 10 Dec 2023 17: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=1702230484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1poISVvrd3U4btueTtSVTTuv1sO26vbsQ9w/b0d8V2g=; b=I9UUC/1a4an8B4A9oHvThAhMnrecKZmbRxQ1vL6b8HK83b1FCXldqopEUbpF96r4OvgJbv X8bpCywR//6mmc8AyvltHVRlTVJvqVKbfY8lLQ1JNk0Jf9Rn1oJ7q9R7NITEAekKXqcHCg tc4Z6RxoUCs2b25ot7oV5os4MYNa2AAS9LVQH5UAOnVY8iUIPldFajOUtEey41/6N1iKoH TD1/DTnnkuqb56yyJdnL4lsqsiiIH09LFbbCf0wIK99HcfpfcvQGizAfVgO4wzfeM64ekE XamWyeTFr9XVQ9Arg506yQ9NucioooZskRyyGz2Xd9eCt0ogPiOb/BCJYQIPSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702230484; a=rsa-sha256; cv=none; b=QqeyP1XjRKgP/m+JZO1CNm/6AJOUT8VTSWOoDC93sMV64V3vcPPVfZHeMX2dGHM7bSteiK FduuJ6LRKl/za9a0QCXegLyZoVq8udf8naJeRt+JaY0MyvDABK3zDbMhsQGa+ik7exPyng GsX2oz/LinnUtis28e/25lzmLHm2QlzjST5HmiVr8SsbnJL7KlKiJ5LAw+sNpwR438q8fF 8PT+RcD7VOx4I64hkJhvSJEigUZ+D7fekKKCOwTxQOg+2Yh1SwmswS8Xn4ZRN9Se7hCjzp 8mZ/ivMBUCYytAxuZt7rKylLsqRA7TQH7WI6tY5gBS95M903XXOPzfC5o3c5zg== 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=1702230484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1poISVvrd3U4btueTtSVTTuv1sO26vbsQ9w/b0d8V2g=; b=Bsw93khoWUocOTohVVBvEPFA8924f/FJ4Ya8+gvNlYYDsw5mCX4GQ8ZEKWQjmjdjITTb1O WkIFoQPH7B1+rCnXJC4rCu/nMocifFn/eUM8qKqVti09/G8hbT4vqbZnNF7vwPQ+ySPX3n i32ZG2fnHzCV4ToIYGc3pQyC/qXNYae7e90n4rxtdAPXE7uxgeUG9hZXmSwQA/HAC2CdTc tEtpkkM/cZ0sf6F6ITFqrg4LUWyqxDnQYBM8QNd9ZDb8E/tAWrIyBlVYDC2hLggHxOHCgv 4p1UiNJKbAqJzin4JuJO//7fQMwwghOF/nt9DPqcYuOySodVX+ytKriQXUxeoA== 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 4SpC5b6Hq4zxkg; Sun, 10 Dec 2023 17:48: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 3BAHm3IO009151; Sun, 10 Dec 2023 17:48:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAHm3SZ009148; Sun, 10 Dec 2023 17:48:03 GMT (envelope-from git) Date: Sun, 10 Dec 2023 17:48:03 GMT Message-Id: <202312101748.3BAHm3SZ009148@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 5a23e4aa88e4 - stable/13 - OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 5a23e4aa88e4bf412bf3650b8536140a34e754d5 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5a23e4aa88e4bf412bf3650b8536140a34e754d5 commit 5a23e4aa88e4bf412bf3650b8536140a34e754d5 Author: Mark Johnston AuthorDate: 2023-12-07 16:20:11 +0000 Commit: Ed Maste CommitDate: 2023-12-10 17:47:28 +0000 OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field Otherwise the field is left uninitialized, leading to a possible kernel memory disclosure to userspace or to the network. Use the same initialization value we use in zfsctl_common_getattr(). Reported-by: KMSAN Sponsored-by: The FreeBSD Foundation Reviewed-by: Brian Behlendorf Reviewed-by: Ed Maste Signed-off-by: Mark Johnston (cherry picked from commit 11656234b560c401dec6a16e1bf048b20fd31aac) --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index ea6388dd515e..53126fdd6ec9 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -2067,6 +2067,8 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr) vap->va_size = zp->z_size; if (vp->v_type == VBLK || vp->v_type == VCHR) vap->va_rdev = zfs_cmpldev(rdev); + else + vap->va_rdev = 0; vap->va_gen = zp->z_gen; vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ vap->va_filerev = zp->z_seq; From nobody Sun Dec 10 17:49:43 2023 X-Original-To: dev-commits-src-all@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 4SpC7W6j3fz549D4; Sun, 10 Dec 2023 17:49: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 4SpC7W68FPz3XZ8; Sun, 10 Dec 2023 17:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702230583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wsG/+Ir8TWnABo5uEXUU0s+3OD+DXp3AjKvjfsYroOc=; b=wesp34jQRhO+bIr82opG7k5GoFjJe+66cB5Q/3Ds7A6WYKq5InWbh3sC4X7kFXT2JQ82xV G90lhPWTPXC4YWm4Fn1wJmFbDNcoOzZtb6z508XCa624YSzxAVAnUT4UbPMa2Yl1juYmcY OR4zff5Nf+wP5dvNGb2kBzUUj2Ihv0J7nFJxjp8Y8MUInyAtKMB09+bFtOu/i0QbUY+/OZ q+7t5v0GlqrGYcF+wPrH+M0V/sEJwHZMzeSGJHhzTjE/qA1LlxmrNH6rdZaoi4jLyfyoJq X+USxHffD8H2xq56kTjsZ+khiW/hvCgpKyA4vO9H2hs6S08syrh2x0i2oLwu3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702230583; a=rsa-sha256; cv=none; b=qYJSlhjLZj9POvX+57MiUn1oos/uCqykpnf8ra88Fgf7IQhvGknChKGQTfPPfMlVgRqM8O PkUk3X99lS/NDQlMCX+jTRQPSaXhvKiLjT8c3P8GiSkEfvJS0VIikRVwkepL1d2CPah47C OKAW+0zyaebrsvT+0W06nPKZjB6bzfbc5Q9QPvIXyO7G85Ey/c9yejzioeuO9NBQC4EOkA 7mst9RWgFjAAxNHWb1Q7ZAv7LcZNiLmCh2uf0em+AhoUOzTSkfE0a9bCDTfaAMJnRbr9BR HL1Inb/oFTkG42QglQxLXZa1i74ehFjLBkAFPDhXnWjMS99/r00WVHLgd9pOJg== 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=1702230583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wsG/+Ir8TWnABo5uEXUU0s+3OD+DXp3AjKvjfsYroOc=; b=OGWGZFgMOnAoXEa5oT+7NX80Injh+lXvv4egaPMW5qEjSdgCxxAPihI6+PSKpwVF8DNy4Y riL4RifdlhnuBFIoW05OH/HWacp/ilYcPM08P5empKDRtolwPu8vP8pAxzn8iBth2rTl9R opazuxunxAak3EgIJOwrPjAW0RR2jHW/YKI0PZHcEuS141zJlUhhX7fNenrRYg7pE0n0wS FvmeZfzf2hg72xiY2NTs95peOd5tA50TK00N+vM6RTINdTDkdnpyRpP65DGyiPteAxWk9G Vs+mZd4gCZFoL7nj3JCXVguV4xTzzsPgII1CM63q2CyI7HywgP0qqoifkxd0Nw== 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 4SpC7W5D7Szxkj; Sun, 10 Dec 2023 17:49: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 3BAHnhRD009564; Sun, 10 Dec 2023 17:49:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAHnh7E009561; Sun, 10 Dec 2023 17:49:43 GMT (envelope-from git) Date: Sun, 10 Dec 2023 17:49:43 GMT Message-Id: <202312101749.3BAHnh7E009561@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a9dcfac2fd6a - stable/12 - OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/12 X-Git-Reftype: branch X-Git-Commit: a9dcfac2fd6a26671b707d15727935ed24c681b5 Auto-Submitted: auto-generated The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a9dcfac2fd6a26671b707d15727935ed24c681b5 commit a9dcfac2fd6a26671b707d15727935ed24c681b5 Author: Mark Johnston AuthorDate: 2023-12-07 16:20:11 +0000 Commit: Ed Maste CommitDate: 2023-12-10 17:48:51 +0000 OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field Otherwise the field is left uninitialized, leading to a possible kernel memory disclosure to userspace or to the network. Use the same initialization value we use in zfsctl_common_getattr(). Reported-by: KMSAN Sponsored-by: The FreeBSD Foundation Reviewed-by: Brian Behlendorf Reviewed-by: Ed Maste Signed-off-by: Mark Johnston (cherry picked from commit 11656234b560c401dec6a16e1bf048b20fd31aac) (cherry picked from commit af1e8b52d26502bac9a2484b87d1879334debd67) Differential Revision: https://reviews.freebsd.org/D42987 --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index c61714bb358a..34f3476c2064 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -2735,6 +2735,8 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr, #else if (vp->v_type == VBLK || vp->v_type == VCHR) vap->va_rdev = zfs_cmpldev(rdev); + else + vap->va_rdev = 0; #endif vap->va_seq = zp->z_seq; vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ From nobody Sun Dec 10 19:58:16 2023 X-Original-To: dev-commits-src-all@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 4SpFzr5nFlz54KkJ; Sun, 10 Dec 2023 19:58: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 4SpFzr50mkz4D4M; Sun, 10 Dec 2023 19:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702238296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a0xnDT/irJIk0jJ/LKq/Yl7NsRlfq85TKpTEEuSuAro=; b=bkmnqDS+CklgN6BLXxA2D6xQzUhfopezpyuTQP3S+BFamGt4QR7IKy4Bf1uboh2tl4B8oP QepBT39RHbed14cdFoHLgX0MTQDSuyufF0xfqgVBYRFWdgzchX+AFW+86G9WIUmTTHsyDL xaIjo4+8kUbWlf/ChLRN2NNPjqWWyZ6n/3FdtH+Rk6vQ050Vq/Ych81YrDMU7SxLEiR/Sv xvAMTs6xo25KOhZ2M6ZzAY19PxF8s7CZo/cd84LY+NMZDuu99VvytABTgsk0xUaEMdNYmF nGDKIpPX/0J+MVS4Io3/Jw+F3DVEH7BlpYuEY2vUKazrKPTl8KQg4AQAo/Kzbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702238296; a=rsa-sha256; cv=none; b=H6+GCwZPnWab7sHLoRQTOuDOyGFNv2Mbvk7krJdiPso8sLmqWd6b55/beLu7rTZcgEAaLs uhNJKH/iHQUDN04axVT+FSugnwKG7Kntwa8M0UybuA+EMSoaoX5j+r8dqWob4WXvOVtVHG VQKKrFEC83LCLX9Lna6eClV4+pS5RVm1HYnHU3dzl1+lZUvXRRX+WwS9ZeKoPX/3AZyQBH VjRvYkHRJ3H1uwdnYA2099Wz/heP2JRZ5+JdvxHxoqOVMrJm1Ni/swSFZZigucczss38Xb DkXg53UFBYu6riAmQ51QrGt4MFeaK1/r+J94BvKs8raY8/tDAq848IpppkA4og== 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=1702238296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a0xnDT/irJIk0jJ/LKq/Yl7NsRlfq85TKpTEEuSuAro=; b=ux7uDa0KJ4ZLbR3Ivc2Yc7Oo7XbvX5wrlIrP7dRe8GwUnW4QAIWYgvONMT0HlpRF/Ca89H MRPMuu7CMZ+ACEXW3pRr620eXlrQVVznPghUhpq2/7c6pYUnTce/5BTrXbkLsEPIGM2XTG o4q8j8BQIpz5oOXHhN4JBDTiKl4vGiPowc+hNsWd8uGoV3KfdJQN1znGC0o/VM9d6c4o9P srkhF1Q0bejduap/UwNbeHSYkC5S3GfhKn0BI+ZDZcIogJ4JeNNxaJu3Ay6h7w+YGK9IUJ 5FDt0rNfYJ0+vJCr3iyqotcOHZTuGN0MKKo3rzRmDmMwBH2VajAN6PglsC7BzA== 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 4SpFzr3vD0z11bp; Sun, 10 Dec 2023 19:58:16 +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 3BAJwGjQ026662; Sun, 10 Dec 2023 19:58:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAJwGHA026659; Sun, 10 Dec 2023 19:58:16 GMT (envelope-from git) Date: Sun, 10 Dec 2023 19:58:16 GMT Message-Id: <202312101958.3BAJwGHA026659@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 0e2f61fc03fe - stable/14 - bsd-family-tree: add macOS 14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0e2f61fc03febeab8c4cb3d738948b83d7aed2f1 Auto-Submitted: auto-generated The branch stable/14 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=0e2f61fc03febeab8c4cb3d738948b83d7aed2f1 commit 0e2f61fc03febeab8c4cb3d738948b83d7aed2f1 Author: Sergey A. Osokin AuthorDate: 2023-09-28 21:42:08 +0000 Commit: Sergey A. Osokin CommitDate: 2023-12-10 19:56:59 +0000 bsd-family-tree: add macOS 14 (cherry picked from commit 992ec09f37837a3f7d131bc70a66d6e41b814e9b) --- share/misc/bsd-family-tree | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 208523bd1fcb..4a9d1466ac9a 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -446,6 +446,8 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 7.3 | | FreeBSD | | | | | 13.2 | | | | + | macOS | | | + | 14 | | | | | | | | FreeBSD 14 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -872,6 +874,7 @@ FreeBSD 12.4 2022-12-05 [FBD] DragonFly 6.4 2022-12-30 [DFB] OpenBSD 7.3 2023-04-10 [OBD] FreeBSD 13.2 2023-04-11 [FBD] +macOS 14 2023-09-26 [APL] Bibliography ------------------------ From nobody Sun Dec 10 19:58:17 2023 X-Original-To: dev-commits-src-all@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 4SpFzs67FZz54KXN; Sun, 10 Dec 2023 19:58:17 +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 4SpFzs5BWVz4DMm; Sun, 10 Dec 2023 19:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702238297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+0QD2h/8k7BBJj5wjeO+Eil2oo5LkDpxboayouzLRGA=; b=LcZbc7Z2VVHq6eycunt2wQDL0O0un7U3+rF1bqoYCioEaZJMY14AOwyYSCiJlNo+6oFPge c8Bz0+wvm147GOImcbyr+f3tBDb8pbMPrQ3SriiY1TOPwdXyhWf2lk3kJNEcZW3E92JJkm IGJEJC/iVSL7LQAphPJGy+cI6BMm81TUg70u16xadz9WjLnhnqFbK+TU9R020jgnvGcb9b maPX63iG7jsKEOntRrx2fgvC19xdO1Cg6ztHXr/B32MBlxWKP3mWgduyuYq34ASeC2YAsO IURM7Y1FtYNEUj78ELTkKcyZ96OjLbsIXvk+mP6AuWt6mMjJsVVQFE8pUuVnPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702238297; a=rsa-sha256; cv=none; b=orIDpsuVycUPQqTFJCrH/B0mD5SMZA5bMTqx5+61KK0jgT2I91p+CFOBZmOrLr4rRQy4w+ IfJWe5uctdXaHkqvsGUWGs3YKZZM2U40jGvatb/ikWpCMuDdHdOrNesuCd4e4IejwxY5uv /1uuhKZdWu2p+iCgGjHu7e2cfWr65YPUkPRwUoD5d+VAtPkVPhvJaaz9X19ljh3dn9ZWpt 2eeSGV6ODQunIqa/qPRAUJFX2CveHQOxJpfZbLI1e6Z2U+GuMiaA2OKAlgFxzzFH4W6vDy 6WXdUhEz0x4WjdI/PfwSrFjR7HjHtWFPC3F9wfbpFwT1beynC3AbTOl+t4pYkA== 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=1702238297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+0QD2h/8k7BBJj5wjeO+Eil2oo5LkDpxboayouzLRGA=; b=e5fZBGcQBmHYAr5+gCNQTbXHaDgC5VeLhTiAYwo6jpk16C/XcWXV5MzIba2PR+aCeamcwf yamkKTWVg2Eo3jBec5QQrkGs8nE6JGxRpH61f0VcMmHbtYW/0ttQ3B2+pxpREaOcIuPMHw wqO4PS9YXkfUzfcJWkmyuTiTMZgyks8MDKJRlF44CBfGbqMcwnt6ZfWoz1lREKMGSbHyPu rDGWn/Q0NO1NE16mUGmAiKKjNWMqTIKH6+tPvokQkCxE5I+WPWnSmAFn2ATgGU3j3Cz8JD +kKagnFx6lrQnXdtC7OHW03XjbGTVM6vriMsMmu/QqpkrEcycumgw5CmcK0tqw== 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 4SpFzs46Gsz11Yj; Sun, 10 Dec 2023 19:58: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 3BAJwHeQ026704; Sun, 10 Dec 2023 19:58:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAJwHeU026701; Sun, 10 Dec 2023 19:58:17 GMT (envelope-from git) Date: Sun, 10 Dec 2023 19:58:17 GMT Message-Id: <202312101958.3BAJwHeU026701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 66182d944cb5 - stable/14 - bsd-family-tree: add OpenBSD 7.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 66182d944cb5e622489cecfebd6d3b18fb6308be Auto-Submitted: auto-generated The branch stable/14 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=66182d944cb5e622489cecfebd6d3b18fb6308be commit 66182d944cb5e622489cecfebd6d3b18fb6308be Author: Sergey A. Osokin AuthorDate: 2023-10-16 20:19:12 +0000 Commit: Sergey A. Osokin CommitDate: 2023-12-10 19:57:30 +0000 bsd-family-tree: add OpenBSD 7.4 (cherry picked from commit 8c630381b43cc4d83c99305df3f732b0583ff8f2) --- share/misc/bsd-family-tree | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 4a9d1466ac9a..503cc04ab2d7 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -448,6 +448,7 @@ FreeBSD 5.2 | | | | | 13.2 | | | | | macOS | | | | 14 | | | + | | | OpenBSD 7.4 | | | | | | FreeBSD 14 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -875,6 +876,7 @@ DragonFly 6.4 2022-12-30 [DFB] OpenBSD 7.3 2023-04-10 [OBD] FreeBSD 13.2 2023-04-11 [FBD] macOS 14 2023-09-26 [APL] +OpenBSD 7.4 2023-10-16 [OBD] Bibliography ------------------------ From nobody Sun Dec 10 19:58:18 2023 X-Original-To: dev-commits-src-all@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 4SpFzt74tFz54Ktv; Sun, 10 Dec 2023 19:58: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 4SpFzt6LZdz4DNF; Sun, 10 Dec 2023 19:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702238298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3hOlIaeaBjKWt0AL740Rqgasakzn/eFRQM+3NFNC/T8=; b=mNif+yUOOy0yjArdBIz+6kpn74wv+REuogLbySO1azLh7ucc9X3XNpLyu9o4F9EGo0v2X5 xGnQ7ug+muToTGItCKsDG3kIvySH6/o1VozZaeF8mkww93IFAjVd3UFcPraKa/6vOokOeF 4f+X9mQTTDwjjGQynQi28ItuFtpqb0b8L9e/qejoSd5tUJdHa+Od6E5QXmJ5RePo7kLjB3 pKKuPB7jT9MxURAKf54xwLR/mTMbV+WM3j6QjVe4RB3EhOU51SMz4zhRXvPD97AZCaC87C vTcYEja5TyDhOiUY4fi/Elf8cj02kUSLizPwhCI8/G0P+8Fe9iMp+iqscwBaPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702238298; a=rsa-sha256; cv=none; b=ECpwyGOpDTiSfJig+Dm4C3iRpCfaIOi9oSaJv4ZV4E/o/SPjxEgwmlZjy+5CLAnuxNtAbT Plcnjj9TU9SY7y5DJyrRUyGWtG8IlMpGBYJE4ZIevrDANsn1OzHEAbHoc2urhg1dwohXfI 8wqLQCOAzLMc5/BokU9QL4BcDqom5UQZBD3oRHD8/j4+ofbRYxpst3lqtUOV8fZXR+Q3sn PsuVnxyROt+x9cYXRklMGsDmZ6CVtXlhYiJT9RGI/BSpvYFzIsiGgVDnv7T/gAUMbmfXEW VwpDk6elI7nWLsnbpLbFM+qOSMgZ+T3En6pT7Ayev9x9V+JYWc1XZUvZ1YIOPA== 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=1702238298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3hOlIaeaBjKWt0AL740Rqgasakzn/eFRQM+3NFNC/T8=; b=Az1jIeYdrifTpuw+H533NTuOTiJTBcyuYq+yKG7W1bsFPAGwARJe8mTjk0i23AJauoPgsq NQL8q1A8t2vacyZSiKo6XzqSepl3MKx6ICbcx5GhnvfDevk8iHy7W0AbmJ28iK7iCDGJdh /a6DzvnB6s2vvdSUdUoPkwyuOKnNGto6H96c4KfFtWljdI9L7seWSfoq/mc2HvGhE6909F ccEutb2kwsHsWNTL1gQnZKWZ/KKWOmPVTuzV9suyfrpbD4ytjr0/k3YIRuaOUAdIqSmgeT nA3H7PDc+1pK7EzeGdD7ZlYVaXOt1GK9DY4UHuQ47D2unOxORbOIV/ORKh2uaA== 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 4SpFzt53klz11Yk; Sun, 10 Dec 2023 19:58: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 3BAJwIc5026748; Sun, 10 Dec 2023 19:58:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAJwINT026745; Sun, 10 Dec 2023 19:58:18 GMT (envelope-from git) Date: Sun, 10 Dec 2023 19:58:18 GMT Message-Id: <202312101958.3BAJwINT026745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 3b46583420e4 - stable/14 - bsd-family-tree: add FreeBSD 14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3b46583420e453f7055caa9ac965ca5497075139 Auto-Submitted: auto-generated The branch stable/14 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=3b46583420e453f7055caa9ac965ca5497075139 commit 3b46583420e453f7055caa9ac965ca5497075139 Author: Sergey A. Osokin AuthorDate: 2023-12-07 14:26:12 +0000 Commit: Sergey A. Osokin CommitDate: 2023-12-10 19:57:40 +0000 bsd-family-tree: add FreeBSD 14 (cherry picked from commit 25f37779bdeba6856f92d0bc94f74582566fcb0f) --- share/misc/bsd-family-tree | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 503cc04ab2d7..d81c8829f4e8 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -449,8 +449,10 @@ FreeBSD 5.2 | | | | | macOS | | | | 14 | | | | | | OpenBSD 7.4 | + *--FreeBSD | | | | + | 14.0 | | | | | | | | | -FreeBSD 14 -current | NetBSD -current OpenBSD -current DragonFly -current +FreeBSD 15 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -877,6 +879,7 @@ OpenBSD 7.3 2023-04-10 [OBD] FreeBSD 13.2 2023-04-11 [FBD] macOS 14 2023-09-26 [APL] OpenBSD 7.4 2023-10-16 [OBD] +FreeBSD 14.0 2023-11-20 [FBD] Bibliography ------------------------ From nobody Sun Dec 10 20:00:35 2023 X-Original-To: dev-commits-src-all@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 4SpG2W2RH0z54L1k; Sun, 10 Dec 2023 20:00: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 4SpG2W1ymMz4F70; Sun, 10 Dec 2023 20:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702238435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7YpKg6Uqgh9Z8KzSl0yDPs1cCOcpC2+By8phLyQfPwI=; b=L98/RMl39/W5b3vMXBF4qSjrPAUtjoCXaYSTzQtTogeRezEFak07hKadymp80lT54aos7u Qw1y6DasQ6+7rjGbnbgh+hEkdy9ak9Ye40AVEuRm6BPmDmBaOjea4gJuTmIJUJXxowbjAP vvBc2Qk06HF3iiRdtFL0AbKgfznG4QYKiwrbMHQSyqknTbZvvM85z7Su2OHHxhIkBAxpSn eweNIFdnjBNIQKF6pt2BcSKb2d5r/CRsAZUrbnIYNUTXRpW1Hr66dOEJwYqyfLEzBegMv2 U/B0pwRjxact7oPw2+cYYdjbQmTzysCez/crxZ57Ad6uoDcReWe+zdKTMZCKRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702238435; a=rsa-sha256; cv=none; b=lmHDfG22XN3M2clmZm8HinIx4SQelf39j3yBvkChX3gX/jMUr8IHXup2s2+9Q9OcFxSbnw LZiqhmQu6Jcg+XlA4eq1tAMQCiJSCFO2I6yp6y/DNzcbAnAdJtBwxf9NWqyVt1q7oNHQUE qzkmcI/JxBIZhyeRmbyZr9CTQ9ysq4G+jcZmYiz2p7564HRBtxGRWdiLm7fQMvK1AA+zzB 1yBzlRUFg7HdR+G/kL+6nkbcVWBf9wxQwyJuJgL9cfzqeT1o9uepKGHzv9vUJc/lN++R+8 yssIPmP1pQveJT+24q55d8gmww46QJWHTWrBkZFjXgn2ojY7GNknuopwhbuRhQ== 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=1702238435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7YpKg6Uqgh9Z8KzSl0yDPs1cCOcpC2+By8phLyQfPwI=; b=UnxdffLoabLajy1djSbqcCGvv2pWj/Grzp0vTuMq7uGW0pmOsvmN050F64dWxhi48Cp2nb Fb2QrPPR9M+WLzPWqM7pKRWuf1UxzjdAdQQDkzfdeJ8OEqKRXJ6qEl8fs5748lgpFfY9sr 5Un0jZEqwiq0/Nxh4jz3Tgy+GexhKr/eZFSG/ra9p7PqwMPNrh0YYOSTTg4nCvRzbNc/dG O6LRIzPaSot3+D7Dg7PcSgznGFtMgyOwUEXprltumQd0sa6etyduat7GzHkCmUk8lzW+Zg TkLh3Hv6eDnlEjZV+J2jZTHlRIZ5JOAbmKrNPHXoLkfVtvT+zca3Qaf1whFbZg== 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 4SpG2W0vCXz11WT; Sun, 10 Dec 2023 20:00: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 3BAK0Zfi036763; Sun, 10 Dec 2023 20:00:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAK0Zxo036760; Sun, 10 Dec 2023 20:00:35 GMT (envelope-from git) Date: Sun, 10 Dec 2023 20:00:35 GMT Message-Id: <202312102000.3BAK0Zxo036760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 6539e67cf8c2 - stable/13 - bsd-family-tree: add macOS 14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6539e67cf8c27d62ce4c0eaa26039c96ab23667c Auto-Submitted: auto-generated The branch stable/13 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=6539e67cf8c27d62ce4c0eaa26039c96ab23667c commit 6539e67cf8c27d62ce4c0eaa26039c96ab23667c Author: Sergey A. Osokin AuthorDate: 2023-09-28 21:42:08 +0000 Commit: Sergey A. Osokin CommitDate: 2023-12-10 19:59:50 +0000 bsd-family-tree: add macOS 14 (cherry picked from commit 992ec09f37837a3f7d131bc70a66d6e41b814e9b) --- share/misc/bsd-family-tree | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 208523bd1fcb..4a9d1466ac9a 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -446,6 +446,8 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 7.3 | | FreeBSD | | | | | 13.2 | | | | + | macOS | | | + | 14 | | | | | | | | FreeBSD 14 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -872,6 +874,7 @@ FreeBSD 12.4 2022-12-05 [FBD] DragonFly 6.4 2022-12-30 [DFB] OpenBSD 7.3 2023-04-10 [OBD] FreeBSD 13.2 2023-04-11 [FBD] +macOS 14 2023-09-26 [APL] Bibliography ------------------------ From nobody Sun Dec 10 20:00:36 2023 X-Original-To: dev-commits-src-all@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 4SpG2X5ww8z54L6Q; Sun, 10 Dec 2023 20:00: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 4SpG2X3kcMz4FCR; Sun, 10 Dec 2023 20:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702238436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wV2/08X9qIGBsRwTC2rk6P5rvFZUjOGV/6z54H1igbw=; b=AL6sPm8VqZmc70jg4DjvUqvYrm2IkIb04woSRrNC+I2D4jGLsuiZMB40FSJ9uVGQisaplY dBbJzSwKwC71UAEQj5IHNurtPPPlgJqAzxRaEJ4H8kZchJNSPj26iE3d0XdkBXo8XK0bZv /YaSeotOt0GSEWYEnuVrt/mTrvBBTPmdIkFn91Yw+zctQbELfyBx2fZDVkxQ7zJBgxab5l r18FXr4DwR4mrcbkSxzbO2is7hrzbGTan5peMzzIZ1OyWISFH7LDSCjKS/7UKmCHe582CB Nxf541AInv41JjfNz/UN0x2ErD00B3+8MmEUZsb/lQHncl4KjwoGPcbcCIrllQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702238436; a=rsa-sha256; cv=none; b=jMvWUl7kh0KZN2IYk+1jQE3Ws+k0teY2jx7gf5AOhAu+UnHsspFexdOpB2m+wKQ/ggtm7z X5808VIm2zDaS1u46Qh++MFnAMwSy1bkdxfE1026KOGtOpPrHwxcW0Ep8GS4pUrEW9AU7K Ub/OLTxKC4200XsPonAu1sCkHWrGKt+gUvXwReBhHY0P3JNHzy8axgBLZqYT9NYuY5rCPS Uw5t+fF320mtlPeRpRPlEwIQxZzNC77ie/H0j2KK5XaKJZ9fl5OSh0XI7EtQZbrwchndNm 8wT+69sh6+nf2+AqFu/aNE2FrPbudIq7l8KUSS/58VtTdkR2R8Q3h4y3RAegwQ== 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=1702238436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wV2/08X9qIGBsRwTC2rk6P5rvFZUjOGV/6z54H1igbw=; b=yteJOyCDFHVIP8kcURh5actkFt8EhabqW8nGgppy8AcYnIHdmzkJNyGWcOD4ZUh97HxHon eWvfiKXJb4Ow3IYGZ/Bi38bFeekWFEEQPgz99FLgL1XyjY+EOIyFoHKbxpwph41A3mzcs2 mp/wJD+2fZg9amlfD+NmCnKQza455uEVt0xfhA+1fm0AsmlkcK/402stTm2t1o5b5LWYqZ 1sWssiLM4LSGqXX4l2goV2x6QMAEHT/649+yT3RTROnnMI5crCyd3PgRe6/jt6KrIgGMIH 5NJmXjGrxKsQWsV5fApRLAnkIKLHzXS1dV99EFCZbeQCRKwaQyjlSd2y9v1RwQ== 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 4SpG2X1fQDz11WW; Sun, 10 Dec 2023 20:00: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 3BAK0ah4036808; Sun, 10 Dec 2023 20:00:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAK0ahb036805; Sun, 10 Dec 2023 20:00:36 GMT (envelope-from git) Date: Sun, 10 Dec 2023 20:00:36 GMT Message-Id: <202312102000.3BAK0ahb036805@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: a639aaa5f8ef - stable/13 - bsd-family-tree: add OpenBSD 7.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a639aaa5f8efbda08939faa69af633ad70587968 Auto-Submitted: auto-generated The branch stable/13 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=a639aaa5f8efbda08939faa69af633ad70587968 commit a639aaa5f8efbda08939faa69af633ad70587968 Author: Sergey A. Osokin AuthorDate: 2023-10-16 20:19:12 +0000 Commit: Sergey A. Osokin CommitDate: 2023-12-10 19:59:58 +0000 bsd-family-tree: add OpenBSD 7.4 (cherry picked from commit 8c630381b43cc4d83c99305df3f732b0583ff8f2) --- share/misc/bsd-family-tree | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 4a9d1466ac9a..503cc04ab2d7 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -448,6 +448,7 @@ FreeBSD 5.2 | | | | | 13.2 | | | | | macOS | | | | 14 | | | + | | | OpenBSD 7.4 | | | | | | FreeBSD 14 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -875,6 +876,7 @@ DragonFly 6.4 2022-12-30 [DFB] OpenBSD 7.3 2023-04-10 [OBD] FreeBSD 13.2 2023-04-11 [FBD] macOS 14 2023-09-26 [APL] +OpenBSD 7.4 2023-10-16 [OBD] Bibliography ------------------------ From nobody Sun Dec 10 20:00:37 2023 X-Original-To: dev-commits-src-all@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 4SpG2Y4H5Sz54Kvx; Sun, 10 Dec 2023 20:00: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 4SpG2Y3hrtz4FPJ; Sun, 10 Dec 2023 20:00:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702238437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tgXAwU4L5tJKCGGBSy7HgFY7UnqsPLVTsQfrQKJQiP8=; b=u4ILEgZXeOXcwsXSfG65X5VwJpogZzA1tlIx56BoaC4/Kpz/z0FsgLW1r9oa928A8R1yiu Q32lTTWPHPext/Jw39Q85ZnzIYQQWZYCd1fOtGzvZMn1+LySBIMVXOz+vJSyi9eHHPDz59 nO1lh222kkCIQHBQsaNA0wXBW9qzvrMSFzGuoHp7k2+kg4fiiPom42Xug5ypcVgO6Xbv4t Jg8/aqx3KVA3J2zl5kaoyY/9d66eobFY1ieE34Om05eGK5pp8++btbwfE9QmA2optgA6SJ m0MEyjD3WhhxfeHaEHOGDgXgqNAiV8BHIT/3u0NTPyVBwFEvb3nc5zpKX8NltQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702238437; a=rsa-sha256; cv=none; b=dHV/f6+T6yiAXbOGd8nvwrDUUoXyVexo+cUzQWVaUNx+CZXIFTmb2TWj2aNIVtWe7g/U7w CgMEWwQDc0wusRyceGWdkNBaBABbF3yGnDDjQtMS968PH8Lpx9aUiYP5atfFKqF8gfwMG4 F8lCdhOelK/xQlgRsw3u441cZ0zwyfj0ZsZftRJVy10+y5imIXgINa8gaBmjQH4fJF+9Ur +p5M1j68gL41b6K2ieycFbTugmoGzXbfHW805RxEUz2uTH/yghUMC1erW5JX3/FQALTG2Z +A4t+rT0NajaCaTydSz9SnuQGsZ7u4gYVC128hyYt1IWKqV4smbUcntPvZhhrA== 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=1702238437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tgXAwU4L5tJKCGGBSy7HgFY7UnqsPLVTsQfrQKJQiP8=; b=ADuEaozqsXVLr99fFAgTyIpe9XwIrZEMM3ra2xxwwP0mbFPW7K6i6CtadExyHMpmDQH81o Mq50uNlxclCclkafnRoEA0fzUwYaG3YWcFdcX3E+0MOu3fKde3CyhFPEAIs5BHn/A1O3FA jvTcheP9JTVrhmOtjlD0ihO7eaSd10VOwVr7pvZQ3ABCO1pYuboukSeoyDREYiZ5ACuc7v r7XrP1AGizI5ViOtqOUQlvRoRfYY1vzvvUAB0o9UAr1QJ/N6O2x0ptBsnE9Q4hF5m32/Ke TvAw4xPfSNIOUBOFUiI5YnTVmxmHU2+a6PrXw8TXPRXX2v+IV3Y27YHo8HLu4A== 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 4SpG2Y2dTlz11NK; Sun, 10 Dec 2023 20:00: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 3BAK0b6E036850; Sun, 10 Dec 2023 20:00:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAK0bSJ036847; Sun, 10 Dec 2023 20:00:37 GMT (envelope-from git) Date: Sun, 10 Dec 2023 20:00:37 GMT Message-Id: <202312102000.3BAK0bSJ036847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 7a241fa3182b - stable/13 - bsd-family-tree: add FreeBSD 14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7a241fa3182ba3e72a4e72011c6441a98cd63b0b Auto-Submitted: auto-generated The branch stable/13 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=7a241fa3182ba3e72a4e72011c6441a98cd63b0b commit 7a241fa3182ba3e72a4e72011c6441a98cd63b0b Author: Sergey A. Osokin AuthorDate: 2023-12-07 14:26:12 +0000 Commit: Sergey A. Osokin CommitDate: 2023-12-10 20:00:05 +0000 bsd-family-tree: add FreeBSD 14 (cherry picked from commit 25f37779bdeba6856f92d0bc94f74582566fcb0f) --- share/misc/bsd-family-tree | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 503cc04ab2d7..d81c8829f4e8 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -449,8 +449,10 @@ FreeBSD 5.2 | | | | | macOS | | | | 14 | | | | | | OpenBSD 7.4 | + *--FreeBSD | | | | + | 14.0 | | | | | | | | | -FreeBSD 14 -current | NetBSD -current OpenBSD -current DragonFly -current +FreeBSD 15 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -877,6 +879,7 @@ OpenBSD 7.3 2023-04-10 [OBD] FreeBSD 13.2 2023-04-11 [FBD] macOS 14 2023-09-26 [APL] OpenBSD 7.4 2023-10-16 [OBD] +FreeBSD 14.0 2023-11-20 [FBD] Bibliography ------------------------ From nobody Sun Dec 10 20:14:28 2023 X-Original-To: dev-commits-src-all@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 4SpGLX36K8z54LgW; Sun, 10 Dec 2023 20:14: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 4SpGLX2WwRz4Hfg; Sun, 10 Dec 2023 20:14:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702239268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=345AZnCuKY9lPETI/m4JadtRPTVSdPKq0gHJn689EeI=; b=F2Mn63dS0ZrQ+JYml1r253PL6mM0EYMyyCGMRe4uCqvCowRnsAJFCanC+lKkZjaGtIe205 MfQNHrssfoOBQq4qJX4j75zNtPxILtyJgTyxg7lBISgd5b8k2YCgKnmY1cdEHxRjv9HxP4 OmjRUmpp8M/kcky0wDB91/+m7MexxQ+Hc9hTKWxXP5wUF4THrydsGFcU4VLOjXC04c3RqV +Lss2X3RY6ZgT5oLP14llOF7GiJeivhsxqE3wnxi4k4A25mxR3b9Rk38pjanXoOSmXQlwE TINYds1sqKnEUzHuITvltvr4eo2vOOrFo6lJ03kSVXraQdtE6h3rJXM6gtOwUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702239268; a=rsa-sha256; cv=none; b=tbPAmJSk35yxpZxpFQhy7I/tvQV32FT+eXBU1gUahRhzScMRp9tdlKEXRgu9jwz4lcxnkj vLq1Znq8viVJap19juTFPrAx+8n++hkN0QbPZCMYF5erW0Z6wpCPpdgHgAUPvO2AidZflD soBGybZSn187wImjAjoqZNsoXF3pvzxG5lDfrDwPDx6renEzG/AHeAAOVt9kQ8wFoMapme UHY8RntvqERxOFsAOU7qlVfx8UcD0vSq9/bhSv/m02awBSABw+MJxVZY2uRzEuefSTvzv1 uawrHDyp7DfMnZx0IWHcDygh9dJBD9+3uLPMHzfC/M7ppi0WBan1vuly2G3psw== 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=1702239268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=345AZnCuKY9lPETI/m4JadtRPTVSdPKq0gHJn689EeI=; b=dqAsPTVgtrUnY6X9yT9HUOtkk83UxGwiPQMzd+NvtJGb44IBJOxOX+Njk0v+xenWp4c3N1 sKoTuQHZFQjAMY4PzupPNqbTs/03Dc0vBzlZKFxxEgs2tIQVFP9J51J6EneTaEhhNMg52S zhgsVPjTjH3OB9U+GtvN4Mzlz4S+WbuotOuy3aIUhBHrpefvcUmgbDIX4lps4CgRxg5LbW MNitHS5WGJXlScvB3zKJ4fxEkTew8G/dqR8WHFBjSFEGVkFfokPjILYkpBlFsaFICeH7j8 RvO2CES6QYyjwicEJNNA9ARbEKWIo/zhoUbMxAoy17T9KHBg7aCAmwAXv9u77g== 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 4SpGLX1Y5Qz12NC; Sun, 10 Dec 2023 20:14: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 3BAKESg3060392; Sun, 10 Dec 2023 20:14:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAKESjE060389; Sun, 10 Dec 2023 20:14:28 GMT (envelope-from git) Date: Sun, 10 Dec 2023 20:14:28 GMT Message-Id: <202312102014.3BAKESjE060389@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: 4b9d605768ac - main - libsecureboot: be more verbose about validation failures List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 4b9d605768acabc460aa6dcfe8a1f8db35b16794 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4b9d605768acabc460aa6dcfe8a1f8db35b16794 commit 4b9d605768acabc460aa6dcfe8a1f8db35b16794 Author: Stéphane Rochoy AuthorDate: 2023-12-04 09:57:43 +0000 Commit: Ed Maste CommitDate: 2023-12-10 20:13:56 +0000 libsecureboot: be more verbose about validation failures Reviewed by: imp, sjg Pull Request: https://github.com/freebsd/freebsd-src/pull/916 --- lib/libbearssl/Makefile.inc | 1 + lib/libbearssl/Makefile.libsa.inc | 3 +++ lib/libsecureboot/vets.c | 14 +++++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/libbearssl/Makefile.inc b/lib/libbearssl/Makefile.inc index 764984de9067..453630d038cd 100644 --- a/lib/libbearssl/Makefile.inc +++ b/lib/libbearssl/Makefile.inc @@ -1,6 +1,7 @@ BEARSSL?= ${SRCTOP}/contrib/bearssl BEARSSL_SRC= ${BEARSSL}/src +BEARSSL_TOOLS= ${BEARSSL}/tools CFLAGS+= -I${BEARSSL}/inc CFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/lib/libbearssl/Makefile.libsa.inc b/lib/libbearssl/Makefile.libsa.inc index c31d3f85975a..c171e141f0db 100644 --- a/lib/libbearssl/Makefile.libsa.inc +++ b/lib/libbearssl/Makefile.libsa.inc @@ -83,3 +83,6 @@ SRCS+= \ x509/x509_decoder.c \ x509/x509_minimal.c \ +# We want find_error_name(). +SRCS+= \ + ${BEARSSL_TOOLS}/errors.c \ diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c index 4a2aba433191..c86b198c45c5 100644 --- a/lib/libsecureboot/vets.c +++ b/lib/libsecureboot/vets.c @@ -568,9 +568,17 @@ verify_signer_xcs(br_x509_certificate *xcs, ve_error_set("Validation failed, certificate not valid as of %s", gdate(date, sizeof(date), ve_utc)); break; - default: - ve_error_set("Validation failed, err = %d", err); - break; + default: { + const char *err_desc = NULL; + const char *err_name = find_error_name(err, &err_desc); + + if (err_name == NULL) + ve_error_set("Validation failed, err = %d", + err); + else + ve_error_set("Validation failed, %s (%s)", + err_desc, err_name); + break; } } } else { tpk = mc.vtable->get_pkey(&mc.vtable, &usages); From nobody Sun Dec 10 21:29:56 2023 X-Original-To: dev-commits-src-all@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 4SpJ1c2fXXz53DSw; Sun, 10 Dec 2023 21:29: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 4SpJ1c28nsz4MtP; Sun, 10 Dec 2023 21:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702243796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9aKioYMDIw0a6EFZnjbK693xo/+srrSqP4RQrFkJgk4=; b=Gpm6chMiVH/F+C5/NuCAd+yUG9jg+80nAzWLQbjivi8YBcfjkPX+/2GMqq2K7kymX1iQJx Mo8mLfkB6Y3EeGuMMaR4jBW4z8Fyk+7gk8gEBIEItqvsQghBLBfATzkz3E5pjF2y9x1mBc iw4Bm1J7vSmEFawVeq9yvq9w1HKOuMB3GhHRe81zTeeSxg+cEP8YXv59ZgAOE5peINhxcD xLuwXxgrzglUTmmhKWijETxCx7e+8l3x0vDyJ/78BhAE9aR5OH8BDcAv+OfFNDolq5MpDp bBAhRMIZZZZOg/gt3T7z/aSNvpaftO3ktvyDIemy64EwxTxTE68slyBrzwu0TQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702243796; a=rsa-sha256; cv=none; b=i/HsslGMy9X8uMCtUnuzEXOU8k0t1/JgBEhrOltYveWGGPmfV9M7X70oQnIdeRU7yVmWB/ kGQDgOc7lwb6YQ3ICMfNp15+zJS6Hu+Z9UufCZ9B5JGzNyuVUWGlQaS+0UqFFfaq7BkZAZ uvZNW92rq6/8r2YkrTYu6+0SkH6J9dp+LXXTgh+alUGf1PqGLf0yIyJEIVBks5ZhFGW7lr fHvy9t2EDgKrJe1SJtjq0F+N8NficpH8ehD8n0H5C9lefpBkxi92w30W9ocDw5rKDq1Yq4 a2TfUXTU8xZUaM/255R0i/QN7/4PbTVPGbPVZP+SuAjmeFqYntvv+wNIFZbvmQ== 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=1702243796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9aKioYMDIw0a6EFZnjbK693xo/+srrSqP4RQrFkJgk4=; b=YCkDsYhxHv+6e1Xk9/wCKzks7oKh3U0Oo0KmU1xSxqnLfrxnhA9Yz+FR8AGJsekcm0jaNp q7qvxMqd2EEh7h9cReNetVxS1JHbRHWpYZpx2tuscAhLpK2Mki/+MgpNkfbGLUDC0h1TMG o1QrXlghLPTA/sNSI8j+ggZ+X1/D0XmmbPMHakwY24X5r/RkYIt3LqVqkiEXg0wFrXiGwN g0lje9G6qkzc1BD28uLFtPwnmOroW3X7BEGIyOsLfsDUht/qR+UYUyOo7deuIaHGW0IuG7 EOmLc7O0bHJProcZAC6drnBljaIcQ98z7G/Ftz5Djst8KLzHe88U359SvSWSWw== 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 4SpJ1c1CWfz13rt; Sun, 10 Dec 2023 21:29: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 3BALTuvf079114; Sun, 10 Dec 2023 21:29:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BALTuKJ079111; Sun, 10 Dec 2023 21:29:56 GMT (envelope-from git) Date: Sun, 10 Dec 2023 21:29:56 GMT Message-Id: <202312102129.3BALTuKJ079111@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: 56a0d5444d6f - main - strfmon: style fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 56a0d5444d6f39302f3476b61c1b81ed39abe589 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=56a0d5444d6f39302f3476b61c1b81ed39abe589 commit 56a0d5444d6f39302f3476b61c1b81ed39abe589 Author: Jose Luis Duran AuthorDate: 2023-11-30 23:28:21 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-10 21:28:16 +0000 strfmon: style fixes Check style(9) with checkstyle9.pl and clang-format. No functional change intended. MFC after: 1 week --- lib/libc/stdlib/strfmon.c | 197 +++++++++++++++++++++++----------------------- 1 file changed, 99 insertions(+), 98 deletions(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index ade1deaffca9..4b0389345eb6 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -33,6 +33,7 @@ */ #include + #include #include #include @@ -57,7 +58,7 @@ /* internal macros */ #define PRINT(CH) do { \ - if (dst >= s + maxsize) \ + if (dst >= s + maxsize) \ goto e2big_error; \ *dst++ = CH; \ } while (0) @@ -68,9 +69,9 @@ PRINT(*tmps++); \ } while (0) -#define GET_NUMBER(VAR, LOC) do { \ +#define GET_NUMBER(VAR, LOC) do { \ VAR = 0; \ - while (isdigit_l((unsigned char)*fmt, LOC)) { \ + while (isdigit_l((unsigned char)*fmt, LOC)) { \ if (VAR > INT_MAX / 10) \ goto e2big_error; \ VAR *= 10; \ @@ -101,22 +102,22 @@ static char *__format_grouped_double(double, int *, int, int, int, struct lconv *, locale_t); static ssize_t -vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, - const char * __restrict format, va_list ap) +vstrfmon_l(char *__restrict s, size_t maxsize, locale_t loc, + const char *__restrict format, va_list ap) { char *dst; /* output destination pointer */ const char *fmt; /* current format poistion pointer */ struct lconv *lc; /* pointer to lconv structure */ char *asciivalue; /* formatted double pointer */ - int flags; /* formatting options */ - int pad_char; /* padding character */ - int pad_size; /* pad size */ - int width; /* field width */ - int left_prec; /* left precision */ - int right_prec; /* right precision */ - double value; /* just value */ - char space_char = ' '; /* space after currency */ + int flags; /* formatting options */ + int pad_char; /* padding character */ + int pad_size; /* pad size */ + int width; /* field width */ + int left_prec; /* left precision */ + int right_prec; /* right precision */ + double value; /* just value */ + char space_char = ' '; /* space after currency */ char cs_precedes, /* values gathered from struct lconv */ sep_by_space, @@ -126,6 +127,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, char *tmpptr; /* temporary vars */ int sverrno; + FIX_LOCALE(loc); lc = localeconv_l(loc); @@ -134,7 +136,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, asciivalue = NULL; currency_symbol = NULL; - while (*fmt) { + while (*fmt != 0) { /* pass nonformating characters AS IS */ if (*fmt != '%') goto literal; @@ -144,13 +146,13 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* "%%" mean just '%' */ if (*(fmt + 1) == '%') { fmt++; - literal: +literal: PRINT(*fmt++); continue; } /* set up initial values */ - flags = (NEED_GROUPING|LOCALE_POSN); + flags = NEED_GROUPING | LOCALE_POSN; pad_char = ' '; /* padding character is "space" */ pad_size = 0; /* no padding initially */ left_prec = -1; /* no left precision specified */ @@ -160,32 +162,32 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* Flags */ while (1) { switch (*++fmt) { - case '=': /* fill character */ - pad_char = *++fmt; - if (pad_char == '\0') - goto format_error; - continue; - case '^': /* not group currency */ - flags &= ~(NEED_GROUPING); - continue; - case '+': /* use locale defined signs */ - if (flags & SIGN_POSN_USED) - goto format_error; - flags |= (SIGN_POSN_USED|LOCALE_POSN); - continue; - case '(': /* enclose negatives with () */ - if (flags & SIGN_POSN_USED) - goto format_error; - flags |= (SIGN_POSN_USED|PARENTH_POSN); - continue; - case '!': /* suppress currency symbol */ - flags |= SUPPRESS_CURR_SYMBOL; - continue; - case '-': /* alignment (left) */ - flags |= LEFT_JUSTIFY; - continue; - default: - break; + case '=': /* fill character */ + pad_char = *++fmt; + if (pad_char == '\0') + goto format_error; + continue; + case '^': /* not group currency */ + flags &= ~(NEED_GROUPING); + continue; + case '+': /* use locale defined signs */ + if (flags & SIGN_POSN_USED) + goto format_error; + flags |= (SIGN_POSN_USED | LOCALE_POSN); + continue; + case '(': /* enclose negatives with () */ + if (flags & SIGN_POSN_USED) + goto format_error; + flags |= (SIGN_POSN_USED | PARENTH_POSN); + continue; + case '!': /* suppress currency symbol */ + flags |= SUPPRESS_CURR_SYMBOL; + continue; + case '-': /* alignment (left) */ + flags |= LEFT_JUSTIFY; + continue; + default: + break; } break; } @@ -193,7 +195,8 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* field Width */ if (isdigit_l((unsigned char)*fmt, loc)) { GET_NUMBER(width, loc); - /* Do we have enough space to put number with + /* + * Do we have enough space to put number with * required width ? */ if ((unsigned int)width >= maxsize - (dst - s)) @@ -214,22 +217,24 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, if (!isdigit_l((unsigned char)*++fmt, loc)) goto format_error; GET_NUMBER(right_prec, loc); - if ((unsigned int)right_prec >= maxsize - (dst - s) - - left_prec) + if ((unsigned int)right_prec >= + maxsize - (dst - s) - left_prec) goto e2big_error; } /* Conversion Characters */ switch (*fmt++) { - case 'i': /* use international currency format */ - flags |= USE_INTL_CURRENCY; - break; - case 'n': /* use national currency format */ - flags &= ~(USE_INTL_CURRENCY); - break; - default: /* required character is missing or - premature EOS */ - goto format_error; + case 'i': /* use international currency format */ + flags |= USE_INTL_CURRENCY; + break; + case 'n': /* use national currency format */ + flags &= ~(USE_INTL_CURRENCY); + break; + default: /* + * required character is missing or + * premature EOS + */ + goto format_error; } if (currency_symbol != NULL) @@ -245,7 +250,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, currency_symbol = strdup(lc->currency_symbol); if (currency_symbol == NULL) - goto end_error; /* ENOMEM. */ + goto end_error; /* ENOMEM. */ /* value itself */ value = va_arg(ap, double); @@ -267,15 +272,17 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, if (asciivalue != NULL) free(asciivalue); - asciivalue = __format_grouped_double(value, &flags, - left_prec, right_prec, pad_char, lc, loc); + asciivalue = __format_grouped_double(value, &flags, left_prec, + right_prec, pad_char, lc, loc); if (asciivalue == NULL) - goto end_error; /* errno already set */ - /* to ENOMEM by malloc() */ + goto end_error; /* + * errno already set to ENOMEM by + * malloc() + */ /* set some variables for later use */ - __setup_vars(flags, &cs_precedes, &sep_by_space, - &sign_posn, &signstr, lc); + __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, + &signstr, lc); /* * Description of some LC_MONETARY's values: @@ -306,7 +313,6 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, * $currency_symbol * = 3 - the sign string precedes the $currency_symbol * = 4 - the sign string succeeds the $currency_symbol - * */ tmpptr = dst; @@ -352,12 +358,10 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, } if (!(flags & SUPPRESS_CURR_SYMBOL)) { - if ((sign_posn == 3 && sep_by_space == 2) - || (sep_by_space == 1 - && (sign_posn == 0 - || sign_posn == 1 - || sign_posn == 2 - || sign_posn == 4))) + if ((sign_posn == 3 && sep_by_space == 2) || + (sep_by_space == 1 && + (sign_posn == 0 || sign_posn == 1 || + sign_posn == 2 || sign_posn == 4))) PRINT(space_char); PRINTS(currency_symbol); if (sign_posn == 4) { @@ -398,7 +402,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, PRINT('\0'); free(asciivalue); free(currency_symbol); - return (dst - s - 1); /* return size of put data except trailing '\0' */ + return (dst - s - 1); /* size of put data except trailing '\0' */ e2big_error: errno = E2BIG; @@ -418,15 +422,15 @@ end_error: } static void -__setup_vars(int flags, char *cs_precedes, char *sep_by_space, - char *sign_posn, char **signstr, struct lconv *lc) +__setup_vars(int flags, char *cs_precedes, char *sep_by_space, char *sign_posn, + char **signstr, struct lconv *lc) { if ((flags & IS_NEGATIVE) && (flags & USE_INTL_CURRENCY)) { *cs_precedes = lc->int_n_cs_precedes; *sep_by_space = lc->int_n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_n_sign_posn; - *signstr = (lc->negative_sign[0] == '\0') ? "-" - : lc->negative_sign; + *signstr = (lc->negative_sign[0] == '\0') ? "-" : + lc->negative_sign; } else if (flags & USE_INTL_CURRENCY) { *cs_precedes = lc->int_p_cs_precedes; *sep_by_space = lc->int_p_sep_by_space; @@ -436,8 +440,8 @@ __setup_vars(int flags, char *cs_precedes, char *sep_by_space, *cs_precedes = lc->n_cs_precedes; *sep_by_space = lc->n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn; - *signstr = (lc->negative_sign[0] == '\0') ? "-" - : lc->negative_sign; + *signstr = (lc->negative_sign[0] == '\0') ? "-" : + lc->negative_sign; } else { *cs_precedes = lc->p_cs_precedes; *sep_by_space = lc->p_sep_by_space; @@ -460,8 +464,8 @@ __calc_left_pad(int flags, char *cur_symb, struct lconv *lc) char cs_precedes, sep_by_space, sign_posn, *signstr; int left_chars = 0; - __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, - &signstr, lc); + __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, &signstr, + lc); if (cs_precedes != 0) { left_chars += strlen(cur_symb); @@ -470,17 +474,17 @@ __calc_left_pad(int flags, char *cur_symb, struct lconv *lc) } switch (sign_posn) { - case 0: - if (flags & IS_NEGATIVE) - left_chars++; - break; - case 1: + case 0: + if (flags & IS_NEGATIVE) + left_chars++; + break; + case 1: + left_chars += strlen(signstr); + break; + case 3: + case 4: + if (cs_precedes != 0) left_chars += strlen(signstr); - break; - case 3: - case 4: - if (cs_precedes != 0) - left_chars += strlen(signstr); } return (left_chars); } @@ -510,8 +514,8 @@ get_groups(int size, char *grouping) /* convert double to locale-encoded string */ static char * -__format_grouped_double(double value, int *flags, - int left_prec, int right_prec, int pad_char, struct lconv *lc, locale_t loc) +__format_grouped_double(double value, int *flags, int left_prec, int right_prec, + int pad_char, struct lconv *lc, locale_t loc) { char *rslt; @@ -529,7 +533,7 @@ __format_grouped_double(double value, int *flags, size_t decimal_point_size; size_t thousands_sep_size; - int groups = 0; + int groups = 0; grouping = lc->mon_grouping; decimal_point = lc->mon_decimal_point; @@ -592,10 +596,8 @@ __format_grouped_double(double value, int *flags, avalue_size -= (right_prec + 1); } - if ((*flags & NEED_GROUPING) && - thousands_sep_size > 0 && - *grouping != CHAR_MAX && - *grouping > 0) { + if ((*flags & NEED_GROUPING) && thousands_sep_size > 0 && + *grouping != CHAR_MAX && *grouping > 0) { while (avalue_size > (int)*grouping) { GRPCPY(*grouping); GRPSEP; @@ -638,8 +640,7 @@ __format_grouped_double(double value, int *flags, } ssize_t -strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, - ...) +strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) { ssize_t ret; va_list ap; @@ -652,8 +653,8 @@ strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, } ssize_t -strfmon_l(char * __restrict s, size_t maxsize, locale_t loc, - const char * __restrict format, ...) +strfmon_l(char *__restrict s, size_t maxsize, locale_t loc, + const char *__restrict format, ...) { ssize_t ret; va_list ap; From nobody Sun Dec 10 21:29:57 2023 X-Original-To: dev-commits-src-all@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 4SpJ1d4Qrjz53DQy; Sun, 10 Dec 2023 21:29: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 4SpJ1d3Gptz4NLS; Sun, 10 Dec 2023 21:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702243797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4dxKddJEW2k7bPQ1auz3VIABMWvXHtVrd27Z4Zsyak=; b=ujugJZbt1zNW9WbiOfgANVJDYfUW3yA8p2q79PSRaeYYvFvkc1J9InRcde+fQtQaTLunkK kgHOQuVvrUO5k99urPze4JQeSolBGxyYshPXxE0vPO40gMI3nTf5ktwsqvPM2v/uoW7n6J bY5btGHlClZP+KdTH4EJ13iz1PQTX6D6b9qu/mvkPFDhLUDiwr2VS+U503C8uKKBd+AHW1 lb5qEq2FP+D7y5NBU+AmaDGT1cq0WdKr4421nXftMXDVPp3ysF84kR1znEI6BQi8QGRX/N feTbFpNCl6fE3X7XF6vdqCAajSUQhYdmQLCNtcXxIXedzaH4pRalMryCy5ShHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702243797; a=rsa-sha256; cv=none; b=qyOUE40AeQwWOICktEIK0jiqXbkA7o4u8vHlWTNgJRk+xBIGZkDsyyPqlKvag/JkxTDdvL tA3n2U5S3qdRxlFwiKm3X6yGVhHCDLQwwN8n+3SrNw0T9MHERWa/Zjvdl9Rviv/6+6hX2f 7LMWxiwa2t0jk91zzJRM88ipysz4cnZ7BgfJKsT4vkPQ6S9NjWUQh5vxzzVXobzmkwj8fz SIt0yprlcYVRbFw9UEVyzDIlzhZiC0tMveA8rCXalC0VjNVbxoHJcGrItefMILBsUROOOn 94T9JoTaKxFg94IFPTN/dtV13fDUq242UYdYLK0R+n92KnvDmlFuOkwZqnwhVg== 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=1702243797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4dxKddJEW2k7bPQ1auz3VIABMWvXHtVrd27Z4Zsyak=; b=O7QJXWI5AK/B6qjx/jHYSnEIlXQo/68hbG8QoEdOtoj4k1g3e7dmYu3OaemJpXEzrCRhBF Ad7sxYlnGlBUHTzYbnbqBAgeBkxGSuf1lWKNPZ/2+0I029+Hng8MU2HxE5PcZEAURaEwW4 oGSaZK815bZse27lVkf4fKR80RAWB29oM5/ILFGwfQdMcONpz66jIJ/l4i4SDSnjor4dR6 aPGRLXVE6QTvz9weHFIkrpFU23SNmE5gUH7yYDJGvWv49HJWtMJ8jHklYn+oUpRXGYWj79 Y3XPaAzjdqbQZB9CbsUjPanaZfBkAWUrp2LtIdyLz+HBU9JVzspgFeE9PJFevQ== 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 4SpJ1d2C2Nz13n6; Sun, 10 Dec 2023 21:29: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 3BALTvNR079159; Sun, 10 Dec 2023 21:29:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BALTvXo079156; Sun, 10 Dec 2023 21:29:57 GMT (envelope-from git) Date: Sun, 10 Dec 2023 21:29:57 GMT Message-Id: <202312102129.3BALTvXo079156@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: 86e2bcbf47fb - main - strfmon.c: Use the restrict keyword directly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 86e2bcbf47fb4c8dbd799f2f21c0ed338b2e8f1b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=86e2bcbf47fb4c8dbd799f2f21c0ed338b2e8f1b commit 86e2bcbf47fb4c8dbd799f2f21c0ed338b2e8f1b Author: Konstantin Belousov AuthorDate: 2023-12-09 01:21:02 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-10 21:28:25 +0000 strfmon.c: Use the restrict keyword directly libc sources assume C99 or even C11 compiler already, unlike headers. There is no reason to obfuscate the basic C constructs. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/stdlib/strfmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index 4b0389345eb6..68a36a6d5567 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -640,7 +640,7 @@ __format_grouped_double(double value, int *flags, int left_prec, int right_prec, } ssize_t -strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) +strfmon(char *restrict s, size_t maxsize, const char *restrict format, ...) { ssize_t ret; va_list ap; @@ -653,8 +653,8 @@ strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) } ssize_t -strfmon_l(char *__restrict s, size_t maxsize, locale_t loc, - const char *__restrict format, ...) +strfmon_l(char *restrict s, size_t maxsize, locale_t loc, + const char *restrict format, ...) { ssize_t ret; va_list ap; From nobody Mon Dec 11 00:24:38 2023 X-Original-To: dev-commits-src-all@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 4SpMvB4sYfz53YLG; Mon, 11 Dec 2023 00:24: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 4SpMvB4Lszz4bQG; Mon, 11 Dec 2023 00:24:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702254278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I3CxMZuZoIYKRxEuF6OsOS8NZwYGEbXRbf5LKlf5jE0=; b=Gd5zvhY7USiAt4mBN+VfLMGfSZTRdlAxUgaKQBi9gc+CUW9PSZ0CMvu0TaQZqE2x6IXFLK SOcKwcyFqeBYCDuSX7VxtFpDG8jERVN7ZFUs1a67EcPzkL0a1TbGxu++NCPcRnbkNowpoz zhco4RYoaALyud99jrX0S0HhrTyrtp/KizfsAtggBE7VmWhg2FXdu869cW9y6diVP8DJMs 4+qfyeBVUbotuvSDje+JJXbV/fjdmAF1gP8S843Xt0oOHUqDh55rEvcYEhff9q6gawzyyR 87rr57rZXVbHjymLgXkBOC0C4cRaQoqUQXjSUw8S+XwEbXmptT2fLp4wlMjTJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702254278; a=rsa-sha256; cv=none; b=iQcHo+1J2fwU5LWxhPpnLWjMiCHdi+RrJmqx8Obyi3tFtZPl3CalwX15Twy5GOV5ClUQnc 3TVjWwYktk92Iv8h/IOgTY6nI8idIlp8+luX2OLV9BZ0qimLHDSkjte7QeDyDN00UxkRym 6Sapexd4EryEUrgik8APv9d7I8ZC6iTFJDrrfvavwhRIJpRgziIgfgmeMUvqsZXcrSTW/y J30axpd3YUbM0ygRcvqN2tUBcXw4Old03BmFuVwx8rYFU0RKc0kPJU7pbOwttBJUsGXhYw 7Jqb+X7EuJmJVgeIe9Rtn7nkfNLfd7ALGY9Xv6BePSH9XiS7Lvj+TzAaEdsVRg== 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=1702254278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I3CxMZuZoIYKRxEuF6OsOS8NZwYGEbXRbf5LKlf5jE0=; b=r0bv3eBhEXzG6fWK8sGxI2b7q8uxiUo3WgJWAUBjY4alVSENksYBtedgnjz2SOFx6YH/Zj BJyrhs8CAGzmJMjU6Q8QsAyoMJ6EBHlxtRma9Norw/hYtldRWZrB1TkBvT+Tqbw1lBX52+ 75rPlR6FdCTTRerTYHJPbVTCkCaHopc/KaU4hCvrJluciNsjjzeS6NljBTmblEriTjrP4N Nz4jwa8JcPOpYmbNIDlEocudC67thq4x37l0ozO3sh3xOBoiQK2SQuS7bDKOiNb/Mk2BgC 6zPGlFNdf2LuVXt1QnMGCfsfJNE4YrXVGFS8Y9FQCxQdEaLUKuTXyJIEov25CQ== 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 4SpMvB3QF2z188t; Mon, 11 Dec 2023 00:24: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 3BB0OcFO079014; Mon, 11 Dec 2023 00:24:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BB0OccF079011; Mon, 11 Dec 2023 00:24:38 GMT (envelope-from git) Date: Mon, 11 Dec 2023 00:24:38 GMT Message-Id: <202312110024.3BB0OccF079011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8e41bbf2457e - stable/14 - zfs tests: Silence clang warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8e41bbf2457ee2269935ccab405de120f54db3c4 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8e41bbf2457ee2269935ccab405de120f54db3c4 commit 8e41bbf2457ee2269935ccab405de120f54db3c4 Author: Jose Luis Duran AuthorDate: 2023-11-07 15:05:15 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 00:23:05 +0000 zfs tests: Silence clang warning "assigning to 'pattern_t *' from 'const pattern_t *' discards qualifiers" Reviewed by: asomers Reported by: clang MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42791 (cherry picked from commit 5b36076d28ad1920b178da93d667dcfeae426494) --- tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c b/tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c index 17c6b63d45d8..5aba7a83225f 100644 --- a/tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c +++ b/tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c @@ -106,7 +106,7 @@ typedef struct { typedef struct { int thread_num; - pattern_t* pat; + const pattern_t* pat; } thread_data_t; @@ -354,7 +354,7 @@ verify_file(int fd, const pattern_t* p_pat){ /* Writes a special marker to every byte within the chunk */ static void -write_chunk(pattern_t* p_pat, int chunk_idx, int thread_num) +write_chunk(const pattern_t* p_pat, int chunk_idx, int thread_num) { uint32_t chunk_start, chunk_end; get_chunk_range(p_pat, chunk_idx, &chunk_start, &chunk_end); From nobody Mon Dec 11 10:41:12 2023 X-Original-To: dev-commits-src-all@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 4SpdZc65v7z53QJT; Mon, 11 Dec 2023 10:41: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 4SpdZc5dRpz4g3S; Mon, 11 Dec 2023 10:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702291272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g3767aCmtowJdwN+p0SgC5m5qP2XDUPBO0Appo1Rtsc=; b=r+n7lT281yhbVv/OboMu879GidGYUBOaRlLMaaCWlwBT/iZs53GmNPqIkil0HKGThxSjM6 +8TmvgF9rvCzp3q4NXneIoBmajkL2QlvkWheXhEF2oJECjGNx+sBayOlyouYfIOktw6+ED 9w6DDwO6552e88Scp3IBivMW9L3A30JT8z8MnnbOrZGl37kEmrsHiZS5nNJQde/BUjLUOM cUIbcp2kSlOOcou7yrHbkZzre6w1u8uTRZv4R0AzHfCk2+MZUZ56aeJ072gJmYGZsmss7l zRpOTU57WLfOsZEb/ryni2FRU+gLKXV3KfvwSZkl02r5rBr9M5GW6Xb/mtpa0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702291272; a=rsa-sha256; cv=none; b=xmyaq6POP+fE4NOcHmYZaenrjOsvuCxRNdQshb81hBNidJiMDRqNP7D4gp/EpA/1db5Hil VmgnZmL3vBGIXePHlOILv99FP8ClTI3jyAm+oUn9TPMPbUxO55FHS+ZevpqdHkECu8PYy6 xPcUPD4NrhG7A4LxoFqZyA6KZ9bQLVwE1rBj9SD5vPMM2SZ0U52TkApC8KvSQUG5o6/nm1 n9b5gG910kSvp+MjqkVk6YEG3zOkVzzzSIvhsK+j6MZJNe0AvGuSf0QBqQnR3rCCV3QnIP G4frmM1nxplGauimKd6447R1LSgTRkeA9Bgfp3TFEsslUDNG8w43dzjjd5QQcg== 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=1702291272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g3767aCmtowJdwN+p0SgC5m5qP2XDUPBO0Appo1Rtsc=; b=p20nFRIM836Fq6B4JofaAuxTpj07CDQEYUjiH7Gp74kr3Ft0pIFkXygsTBM6yOuYRRsB9w ywCVjwjurGazXpLIhaX2ZA9GSnVn/rmtnhLhYJhCFexaKJpgvl4lf99LZ5M+7sqKielZuC cYTafEKXfZ7mRY0f6oW6OqZst4qHcRh3dD3hsO9teTMwgIapwCgFrqWqwkOQpyWcNF9Luv fhtTaCyKPPrC6sU8+J/h+FWzDoJed9G6XnMz8pIwty7BJNWqdzwvbMHNEMDkTnzrbWODZV Am3T3Rb3lrFzid112W+4c+pZ7P5XlukSOKRt8+enPr3rEGANHz0kzuKZczMvqg== 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 4SpdZc4jNYzD9N; Mon, 11 Dec 2023 10:41: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 3BBAfCRr013141; Mon, 11 Dec 2023 10:41:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBAfCbA013138; Mon, 11 Dec 2023 10:41:12 GMT (envelope-from git) Date: Mon, 11 Dec 2023 10:41:12 GMT Message-Id: <202312111041.3BBAfCbA013138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 96812bd10b42 - main - eqos: Remove extra x in printf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96812bd10b42294dbcd5ebe6dc006569ba85887c Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=96812bd10b42294dbcd5ebe6dc006569ba85887c commit 96812bd10b42294dbcd5ebe6dc006569ba85887c Author: Emmanuel Vadot AuthorDate: 2023-12-11 10:28:33 +0000 Commit: Emmanuel Vadot CommitDate: 2023-12-11 10:31:24 +0000 eqos: Remove extra x in printf No functional changes intended. --- sys/dev/eqos/if_eqos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/eqos/if_eqos.c b/sys/dev/eqos/if_eqos.c index 88a9261ca5c3..0dc476acd520 100644 --- a/sys/dev/eqos/if_eqos.c +++ b/sys/dev/eqos/if_eqos.c @@ -1126,7 +1126,7 @@ eqos_attach(device_t dev) snpsver = ver & GMAC_MAC_VERSION_SNPSVER_MASK; if (snpsver != 0x51) { - device_printf(dev, "EQOS version 0x%02xx not supported\n", + device_printf(dev, "EQOS version 0x%02x not supported\n", snpsver); return (ENXIO); } From nobody Mon Dec 11 10:41:13 2023 X-Original-To: dev-commits-src-all@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 4SpdZf0btZz53Q2W; Mon, 11 Dec 2023 10:41: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 4SpdZf01QRz3Bln; Mon, 11 Dec 2023 10:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702291274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKSIJeFKjT2FcgE0i7slof5LxUAY7xLUKl17AItsjj4=; b=lzkWsqxzCyn680ryWZvxoH+zM2gQc+EDzPEOLfgwj8dI/oU9xCI79b97JNrzyKZB887FAJ lizrdv3RpcsUPXs8R6VssSYWBXUS5TkDL47dHZQtPfKaTItzaZQsFCOK6kgkol8YMzzRFg c7K0b35sFTL4un9d9zlsD5KEJkfDLxVBwEhs2n+8dLugwx2ndXyKsXwWE0BLwVbY3HcYu3 eOd72U0ByQud072WPoY18A7JTxV7hIaQfBJ/EqEYaRgrQu6GOAhouLa6CycwgqAD5HXSgF ySz8wetPO1yLsiq6eQRJtwTLWQwyzlbISI8D/NGAlqoqLjNo3+NMBsJ0JuIUnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702291274; a=rsa-sha256; cv=none; b=PsaL74r4hZu3FeBe53m6FK0jOyTalanQ0zTCeG6w818EUV+YgiEC8oovK0woxCMhgaIcnJ /buYnwlITIqnRImDfKQtU4k0XzYOSvPH1GZWnprEctBHzDOlxpWDH2URIpqLmnqBwaVVfe +6eGMvOPHtZvRt+vuT+zvnzBkbw0VVy1zl0iaCnu35t5lJ4CIRfpXBVFZYQJpWugJr9gzi QFS9TW3gH0sEk5RoYsHo++LMGqTTFK2pSsHKblmMkXm9vYZ1fi/W0JUpyAbGl1QauuLVHr zUUSfi7D7YkndnCFg4AqEnB3BfETO76GtVBgUuw5DkskmuRj965BWyy3o2I2YA== 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=1702291274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rKSIJeFKjT2FcgE0i7slof5LxUAY7xLUKl17AItsjj4=; b=KahtxpkxEuznvHnFQZJSdPQiv2kxBkp6eM/GGiT8mh/RVjBEjeUwLN4dcCSvIfSS7lYo6T TT/q8Efo6tErWkpHcVx7IFF1miEBE0LUj5xgRjuMAm/Jt3iFrZs0UKCtk0GNum6jGOSXY/ 2Hs1nSmJoRTRbLrsXSa6UVbdBQR+6vS4wErhZ9tVZB9IxPuvSV2Q8clj7dF9s2feSCRkbj tmEZxbW/ci7Xc9/gGHs7q9ua0zZvIKzSmGb0JkYYNRz1F3AvV1v2NHXnq2ywVhe9K4SjwA fx5/gf5nqEA+8ardMOCUC913iPVWFwFeJpCTpu4zhqUY2EcUsqjINnTMBrA2FQ== 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 4SpdZd5xnbzD5h; Mon, 11 Dec 2023 10:41: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 3BBAfDe7013180; Mon, 11 Dec 2023 10:41:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBAfDjh013177; Mon, 11 Dec 2023 10:41:13 GMT (envelope-from git) Date: Mon, 11 Dec 2023 10:41:13 GMT Message-Id: <202312111041.3BBAfDjh013177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 22029445cbef - main - eqos: Unbreak fdt support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22029445cbef0ffc71196a6f38cee4738e9a6d0f Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=22029445cbef0ffc71196a6f38cee4738e9a6d0f commit 22029445cbef0ffc71196a6f38cee4738e9a6d0f Author: Emmanuel Vadot AuthorDate: 2023-12-11 10:29:16 +0000 Commit: Emmanuel Vadot CommitDate: 2023-12-11 10:31:26 +0000 eqos: Unbreak fdt support We need to enable the clocks and deassert the resets for eqos to work correctly. --- sys/dev/eqos/if_eqos_fdt.c | 56 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/sys/dev/eqos/if_eqos_fdt.c b/sys/dev/eqos/if_eqos_fdt.c index 17241b1c560b..68fcbc1ea706 100644 --- a/sys/dev/eqos/if_eqos_fdt.c +++ b/sys/dev/eqos/if_eqos_fdt.c @@ -50,6 +50,7 @@ #include #include +#include #include #include #include @@ -148,6 +149,9 @@ eqos_fdt_init(device_t dev) regulator_t eqos_supply; uint32_t rx_delay, tx_delay; uint8_t buffer[16]; + clk_t stmmaceth, mac_clk_rx, mac_clk_tx, aclk_mac, pclk_mac; + uint64_t freq; + int error; if (OF_hasprop(node, "rockchip,grf") && syscon_get_by_ofw_property(dev, node, "rockchip,grf", &sc->grf)) { @@ -174,8 +178,56 @@ eqos_fdt_init(device_t dev) device_printf(dev, "cannot get reset\n"); return (ENXIO); } - else - hwreset_assert(eqos_reset); + hwreset_assert(eqos_reset); + + error = clk_set_assigned(dev, ofw_bus_get_node(dev)); + if (error != 0) { + device_printf(dev, "clk_set_assigned failed\n"); + return (error); + } + + if (clk_get_by_ofw_name(dev, 0, "stmmaceth", &stmmaceth) == 0) { + error = clk_enable(stmmaceth); + if (error != 0) { + device_printf(dev, "could not enable main clock\n"); + return (error); + } + if (bootverbose) { + clk_get_freq(stmmaceth, &freq); + device_printf(dev, "MAC clock(%s) freq: %jd\n", + clk_get_name(stmmaceth), (intmax_t)freq); + } + } + else { + device_printf(dev, "could not find clock stmmaceth\n"); + } + + if (clk_get_by_ofw_name(dev, 0, "mac_clk_rx", &mac_clk_rx) != 0) { + device_printf(dev, "could not get mac_clk_rx clock\n"); + mac_clk_rx = NULL; + } + + if (clk_get_by_ofw_name(dev, 0, "mac_clk_tx", &mac_clk_tx) != 0) { + device_printf(dev, "could not get mac_clk_tx clock\n"); + mac_clk_tx = NULL; + } + + if (clk_get_by_ofw_name(dev, 0, "aclk_mac", &aclk_mac) != 0) { + device_printf(dev, "could not get aclk_mac clock\n"); + aclk_mac = NULL; + } + + if (clk_get_by_ofw_name(dev, 0, "pclk_mac", &pclk_mac) != 0) { + device_printf(dev, "could not get pclk_mac clock\n"); + pclk_mac = NULL; + } + + if (aclk_mac) + clk_enable(aclk_mac); + if (pclk_mac) + clk_enable(pclk_mac); + if (mac_clk_tx) + clk_enable(mac_clk_tx); sc->csr_clock = 125000000; sc->csr_clock_range = GMAC_MAC_MDIO_ADDRESS_CR_100_150; From nobody Mon Dec 11 10:41:14 2023 X-Original-To: dev-commits-src-all@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 4SpdZg0nSzz53Q4S; Mon, 11 Dec 2023 10:41: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 4SpdZg0J1Sz3BvJ; Mon, 11 Dec 2023 10:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702291275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUFm2mgth91f0et1zqB6K+Wvj3/eKxw4y19BwxYKbiw=; b=TJBbC8idTC1hFxI/0wEo72dqFh4QiZC3gZfOX8F9t9UdNTlpTR7HqL3O7az95yI9D1J9ul 0DBmUoozbcfSetFd6db48wq/t+d7rlGhjfdqy9ByqImAbO6krP1WjMaekBMzfXVA/JN4+o Z/j8W5pbc/qLOeaPZA2jdZ3uFOdb6mkd3ox54ZwO5TQvsnheoVohmKV9W00DNUvb4izRIB t0wrIGWgZwSXoylI83alujclvqTz5j6U5Io3W7yRLUW0l3Y5dulejanv/GSWP+0pi+N500 4kVp8/+HEcoTDXBYwVrUzQo09fdZBp9dSW8rxXE4iHAkoqsteCDR5sJRpK4jNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702291275; a=rsa-sha256; cv=none; b=mi9auiuTKS1QXsWrCg0MsD6nxHJokJQhTlc/BZ90iGB966OZ+80zZiBzmIcLxHNz1B4zqx qVoNRZ6ybSSEnQNVvJp2MQKhnE9H64dzOPzqN5TtbamshJ1mdrfiXG7LmZcP+428o3C0ee lBYFAi1o5n066iYRUg3BYowUTQtX6JFbPSyifV2OyCDJbNpEerfQQ4ZM+7+7mYPQriRRQr Z27Ih4Ksy6LPOMZemZUU+ntP9M+PsLEnbWBzJBuBGbAb25MCXL6ApFRsP93sySnks/Vy78 eZ8vMxY/udG7Vk40g6gSYQowh8RfZ+VY7XCbV5kQVuReAcI7iM+BHFmYIx9DUA== 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=1702291275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUFm2mgth91f0et1zqB6K+Wvj3/eKxw4y19BwxYKbiw=; b=pfsfjz7OVhZWF7wUhLxbQ2Wt1xX8MxjT7kadOyAdMD5fbJPYGRAct4fCuSU3vKc3/l4PJ+ MuSc4F5Tky7I2rasETQZz8fQvvSqrT5ShvjSWw3i04PBow6sOR28JjFj/IpWduGKlTuGJt rVTxPxAQMttgnqa7+0q3b5ZxkkSPjoT0c6vW8/qlUI2s22bO6bXOuqtb4tq46+SQ5RPfRZ uxTm7rEKQJmjLfGKmXwqOuQdgyFeKs7RoAVetCEck1AWqjTufyEKvN7UU751Xmx0I6HwJI Izms4pJ1b1xiJSOrn1y7Rn4wFyPaD4TuNPDdQTJJCOV0x1e3UvugHAo31kOpkA== 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 4SpdZf6WWvzD9Q; Mon, 11 Dec 2023 10:41: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 3BBAfEx0013625; Mon, 11 Dec 2023 10:41:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBAfE0o013611; Mon, 11 Dec 2023 10:41:14 GMT (envelope-from git) Date: Mon, 11 Dec 2023 10:41:14 GMT Message-Id: <202312111041.3BBAfE0o013611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: bd0771390ef5 - main - eqos: Call init earlier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd0771390ef532ce0ae3f39350acd540125e5620 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=bd0771390ef532ce0ae3f39350acd540125e5620 commit bd0771390ef532ce0ae3f39350acd540125e5620 Author: Emmanuel Vadot AuthorDate: 2023-12-11 10:29:51 +0000 Commit: Emmanuel Vadot CommitDate: 2023-12-11 10:31:28 +0000 eqos: Call init earlier Call the subclassed IF_EQOS_INIT before trying to read the mac, clocks and reset needs to dealt with before we can read the registers. --- sys/dev/eqos/if_eqos.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/eqos/if_eqos.c b/sys/dev/eqos/if_eqos.c index 0dc476acd520..75e3ca957b48 100644 --- a/sys/dev/eqos/if_eqos.c +++ b/sys/dev/eqos/if_eqos.c @@ -1119,6 +1119,9 @@ eqos_attach(device_t dev) return (ENXIO); } + if ((error = IF_EQOS_INIT(dev))) + return (error); + sc->dev = dev; ver = RD4(sc, GMAC_MAC_VERSION); userver = (ver & GMAC_MAC_VERSION_USERVER_MASK) >> @@ -1142,10 +1145,6 @@ eqos_attach(device_t dev) sc->hw_feature[2], sc->hw_feature[3]); } - - if ((error = IF_EQOS_INIT(dev))) - return (error); - mtx_init(&sc->lock, "eqos lock", MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->callout, &sc->lock, 0); From nobody Mon Dec 11 11:17:45 2023 X-Original-To: dev-commits-src-all@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 4SpfNp0Fxyz53SNP; Mon, 11 Dec 2023 11:17: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 4SpfNn6jWMz3HXK; Mon, 11 Dec 2023 11:17:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702293465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7vUCDPObkuc/Lws66jd3GovN82r7rvOv+l4MVUvNfI4=; b=JoEEfp3c6qKsTLv2G2mU5/Z7H08de4KOKkdq/dw6sKPMkbgD+4Magq+ZW62H8yxx6F56EC BpsJeuv9iu5S9skmQallMkAYhJFmp0PJ5XVJSPf36/tWoi2NXFR0ksF/Ctd7DPRtKbqr9V ouHtFDjagtLPkmHWkdreiiowiXPBAT7YT46tK/MAr0j9xHgxHPY5wQdxRHSgw/KwOaes8s K7oHUy5Ez8tpACDYPAL5DlDiPTCiO9VDeF59e2ACNFqS8tuI+EoEuw4UHKtjyjXuL8pQAw xm4lRdOdXhaz8lHDcJDc0EiDDu2zhXQHbyNy9JcHzw7eunFuCMyet/1b+KU0Lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702293465; a=rsa-sha256; cv=none; b=dBtgzrudwtAR9D30tsuJqLxTbfo/vMWJXzj6aCZqfTpbTfxBg8ZcvYnbXTihm28OtwPQLb d91ebxODosLBe33lqvlHWpR668vdpkh+n2sV138l49wjJ73dB3JuwF+PM0jVBbVhu49iqn h0tE5t7rQLZR3MwCVxjkz5iiXLHCv8b5C7aOhlU0R6CXYR9LW8eCu7sPEVmE8RLc12GFmd bTgEhFJWKux78srYodrvExbrQnjVQd31reOJNlvHr/0MU68141le6/uLdHLTb1dHI0T9Ai PqMXbxYNNW5fcj4vxi2q1hTsk/G0Nubkoeo9MipW1x2VHXGW0Igio4Vno6vPuQ== 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=1702293465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7vUCDPObkuc/Lws66jd3GovN82r7rvOv+l4MVUvNfI4=; b=brRAMj5Cbttucj2tG92vsVWIg0OKNKqKdAsZ5oC8qRpnPcbpvbH7xFkNWjyrirDF1NgLig JbCzMNs0kkgF7HQGci4lDytsdh2beSVHc4NLf6IieWm5xRjhQdJxKDqqv+4gTa00gBacmj zsRKlUYcEYMVpEk9MMYNo6W2HF7YLNvoQQ12mALTn5vyWl/dIzUGlnmAL+FhBbYAvbyQLV FxSQ8j7B9PGph8pxTJeR1yGf2ZZY2fM2Lzs+TxBHSmbGZINHfmzq/KaM8jyZl1fbPu+tpd unxkfqmAiR8rtsBf3UxExf7MsBvOGsZq1/ts2TAbpINQPpYe1VSchA06Avqslg== 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 4SpfNn5jp1zTms; Mon, 11 Dec 2023 11:17: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 3BBBHjgQ071256; Mon, 11 Dec 2023 11:17:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBBHjso071253; Mon, 11 Dec 2023 11:17:45 GMT (envelope-from git) Date: Mon, 11 Dec 2023 11:17:45 GMT Message-Id: <202312111117.3BBBHjso071253@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: a7100ae23aca - main - capsicum: introduce cap_rights_is_empty Function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7100ae23aca07976926bd8d50223c45149f65d6 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=a7100ae23aca07976926bd8d50223c45149f65d6 commit a7100ae23aca07976926bd8d50223c45149f65d6 Author: Mariusz Zaborski AuthorDate: 2023-12-11 11:09:31 +0000 Commit: Mariusz Zaborski CommitDate: 2023-12-11 11:15:46 +0000 capsicum: introduce cap_rights_is_empty Function Before this commit, we only had the capability to check if a specific capability was set (using cap_rights_is_set function). However, there was no efficient method to determine if a cap_rights_t structure doesn't contain any capability. The cap_rights_is_empty function addresses this gap. PR: 275330 Reported by: vini.ipsmaker@gmail.com Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D42780 --- contrib/capsicum-test/capability-fd.cc | 15 +++++++++++++++ lib/libc/capability/Symbol.map | 4 ++++ lib/libc/capability/cap_rights_init.3 | 19 ++++++++++++++++++- sys/kern/subr_capability.c | 19 +++++++++++++++++++ sys/sys/capsicum.h | 2 ++ 5 files changed, 58 insertions(+), 1 deletion(-) diff --git a/contrib/capsicum-test/capability-fd.cc b/contrib/capsicum-test/capability-fd.cc index f255c6425cdd..0551d9bd81ef 100644 --- a/contrib/capsicum-test/capability-fd.cc +++ b/contrib/capsicum-test/capability-fd.cc @@ -1342,3 +1342,18 @@ TEST(Capability, NoBypassDACIfRoot) { close(fd); unlink(TmpFile("cap_root_owned")); } + +TEST(Capability, CheckIsEmpty) { + cap_rights_t rights; + + cap_rights_init(&rights); + EXPECT_TRUE(cap_rights_is_empty(&rights)); + + size_t num_known = (sizeof(known_rights)/sizeof(known_rights[0])); + for (size_t ii = 0; ii < num_known; ii++) { + cap_rights_init(&rights, known_rights[ii].right); + EXPECT_FALSE(cap_rights_is_empty(&rights)); + cap_rights_clear(&rights, known_rights[ii].right); + EXPECT_TRUE(cap_rights_is_empty(&rights)); + } +} diff --git a/lib/libc/capability/Symbol.map b/lib/libc/capability/Symbol.map index 0deff024a046..8bf11670a5a8 100644 --- a/lib/libc/capability/Symbol.map +++ b/lib/libc/capability/Symbol.map @@ -8,3 +8,7 @@ FBSD_1.3 { cap_rights_remove; __cap_rights_set; }; + +FBSD_1.8 { + cap_rights_is_empty; +}; diff --git a/lib/libc/capability/cap_rights_init.3 b/lib/libc/capability/cap_rights_init.3 index 80b522820097..98b50f653f2c 100644 --- a/lib/libc/capability/cap_rights_init.3 +++ b/lib/libc/capability/cap_rights_init.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 5, 2020 +.Dd November 25, 2023 .Dt CAP_RIGHTS_INIT 3 .Os .Sh NAME @@ -33,6 +33,7 @@ .Nm cap_rights_set , .Nm cap_rights_clear , .Nm cap_rights_is_set , +.Nm cap_rights_is_empty , .Nm cap_rights_is_valid , .Nm cap_rights_merge , .Nm cap_rights_remove , @@ -51,6 +52,8 @@ .Ft bool .Fn cap_rights_is_set "const cap_rights_t *rights" "..." .Ft bool +.Fn cap_rights_is_empty "const cap_rights_t *rights" +.Ft bool .Fn cap_rights_is_valid "const cap_rights_t *rights" .Ft cap_rights_t * .Fn cap_rights_merge "cap_rights_t *dst" "const cap_rights_t *src" @@ -118,6 +121,12 @@ function checks if all the given capability rights are set for the given structure. .Pp The +.Fn cap_rights_is_empty +function checks if the +.Fa rights +structure is empty. +.Pp +The .Fn cap_rights_is_valid function verifies if the given .Vt cap_rights_t @@ -182,6 +191,14 @@ if all the given capability rights are set in the argument. .Pp The +.Fn cap_rights_is_empty +function returns +.Va true +if none of the capability rights are set in the +.Fa rights +structure. +.Pp +The .Fn cap_rights_is_valid function performs various checks to see if the given .Vt cap_rights_t diff --git a/sys/kern/subr_capability.c b/sys/kern/subr_capability.c index e40c57c5307d..1f3a181a91cb 100644 --- a/sys/kern/subr_capability.c +++ b/sys/kern/subr_capability.c @@ -306,6 +306,25 @@ __cap_rights_is_set(const cap_rights_t *rights, ...) return (ret); } +bool +cap_rights_is_empty(const cap_rights_t *rights) +{ +#ifndef _KERNEL + cap_rights_t cap_no_rights; + cap_rights_init(&cap_no_rights); +#endif + + assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); + assert(CAPVER(&cap_no_rights) == CAP_RIGHTS_VERSION_00); + + for (int i = 0; i < CAPARSIZE(rights); i++) { + if (rights->cr_rights[i] != cap_no_rights.cr_rights[i]) + return (false); + } + + return (true); +} + bool cap_rights_is_valid(const cap_rights_t *rights) { diff --git a/sys/sys/capsicum.h b/sys/sys/capsicum.h index b9eb61409613..3979fd718909 100644 --- a/sys/sys/capsicum.h +++ b/sys/sys/capsicum.h @@ -336,6 +336,8 @@ cap_rights_t *__cap_rights_clear(cap_rights_t *rights, ...); __cap_rights_is_set(__VA_ARGS__, 0ULL) bool __cap_rights_is_set(const cap_rights_t *rights, ...); +bool cap_rights_is_empty(const cap_rights_t *rights); + bool cap_rights_is_valid(const cap_rights_t *rights); cap_rights_t *cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); From nobody Mon Dec 11 14:16:34 2023 X-Original-To: dev-commits-src-all@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 4SpkM65RBkz53f4T; Mon, 11 Dec 2023 14:16: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 4SpkM64tlNz3YWy; Mon, 11 Dec 2023 14:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUk91oIjJXlbh5a2VBcU9N/7qt4B7aFu1VjZ/f1bNSw=; b=nWtcLhiB05Qx707Vt8vQ4a2egLE9UL49fjSw3JfKDROcTzqS46zxBHBXG+2MW4AmzrmZWA v7zRUAoGVTljbct4ZidVX1TCFdw2pCwZExUE+BnDx6cSBtkBmY7BkuEggLCIhFI2ZOF+HJ DjVdFkkuWQIb2T12ufW1m5SWSQeldl5nPQayL3MGpsMBevkTzPe0XdelyKCndx+LkUv+p2 jZcsZFfwoeueaA/I2aZsWw61v3O66Mg3XlEkffV0nV20dEzOuF4VI93sfj5e9IHwYWeu0x 7WzaHqnfubn+6H7WRA2ccaJ9t+/jGpipZHaLiAgewqqAACFtCGCycp+feh05gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304194; a=rsa-sha256; cv=none; b=FvIYaVBmljmhzWzexXDN2qpgdkBEvtaGRi7SbLJFkIqvfg7zdgmVpQy6q1XN62Oja0NI2P zU+7xiiJi61aioonkqdZJKBzir9Wa95/gMeCwyXmU/WYF+c9QFDbgjclLZLrArcgsLUvvC y7ZWH/NAOGzcvV8lzxtRFksjPOz00r8hL/eNBgOrDFQErLInvWxFl1Y2GvBYI1AA4fdVdP MRgJDbVlSmbc37Tz4AZqTN4PPkmmPvg+gfD7Y8I0ENinKAp/C4xnjXOuvWlIi2yzNyUizB To2K5gygMrkRtgOiS/AHybTPIeo0/1mbwXerZ5k7dmrWBbGaJnkzpCzOUIyzNQ== 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=1702304194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUk91oIjJXlbh5a2VBcU9N/7qt4B7aFu1VjZ/f1bNSw=; b=f8PZAck/7gGVGxbu5DbP/LH4P40m3pDzGgQU0AtZDsv3aKCcjDoekX/WNa5NvPlG9KKaHh nnzrNV3ox5GZxew29HptjqzFBmDWrkYivYWHxAs1EfVA8itcYhQccf9h1TjsrVnjBGacrh eHn5sLM31ZD9W6rSsf4mBW+oql87vaVT31Z853hmWPszH5LvG4yNPSWwSn0SRjU5eWGIOq 4X1xMSs72GvrSF6RjExn/Tkw9h+ymPvI8r5FJiNuUtQ2rYl4ik4cUDGclNhU2mF+IYZhLG b+ygK5hBHRZfZyS3b92KNTBHvTNAiUiQeEQqAPG4fgt/DPoAD5EbCp/Z2K8BhA== 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 4SpkM63sYXzZfB; Mon, 11 Dec 2023 14:16: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 3BBEGYqX071886; Mon, 11 Dec 2023 14:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGYMM071883; Mon, 11 Dec 2023 14:16:34 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:34 GMT Message-Id: <202312111416.3BBEGYMM071883@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: 96465c789a5f - main - arm: Compile vfp.c conditionally rather than using an ifdef List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 96465c789a5ff2619c5d49305517b35db9754ffb Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=96465c789a5ff2619c5d49305517b35db9754ffb commit 96465c789a5ff2619c5d49305517b35db9754ffb Author: Mark Johnston AuthorDate: 2023-12-11 14:07:40 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:07:40 +0000 arm: Compile vfp.c conditionally rather than using an ifdef No functional change intended. MFC after: 1 week --- sys/arm/arm/vfp.c | 4 ---- sys/conf/files.arm | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index 40a3491c1cf9..a4be235e1e01 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -28,8 +28,6 @@ * SUCH DAMAGE. */ -#include -#ifdef VFP #include #include #include @@ -524,5 +522,3 @@ is_fpu_kern_thread(u_int flags __unused) curpcb = curthread->td_pcb; return ((curpcb->pcb_fpflags & PCB_FP_KERN) != 0); } - -#endif diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 8b5674b839df..075b05e36d78 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -75,7 +75,7 @@ arm/arm/uio_machdep.c standard arm/arm/undefined.c standard arm/arm/unwind.c optional ddb | kdtrace_hooks | stack arm/arm/vm_machdep.c standard -arm/arm/vfp.c standard +arm/arm/vfp.c optional vfp cddl/dev/dtrace/arm/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/arm/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/arm/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" From nobody Mon Dec 11 14:16:35 2023 X-Original-To: dev-commits-src-all@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 4SpkM81vLmz53f4X; Mon, 11 Dec 2023 14:16: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 4SpkM75X1zz3YX4; Mon, 11 Dec 2023 14:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wwGjN03YBYB0FcDCawv8YyxGT4Z+cI04fNn56+rVtVw=; b=gT7/24EwDepsdrUIjPtZIQaj/uRapXu8/l+NjQIGZOJAp5jktzDiRpV0WdcohAdLg0UTgn Rf68v7te8NE9pP2jkbBMb0r1PdIwggyt3JUah0Pt/dxfPOKwVZRrMQk0UKwQ+Zu7C37FOS 3FRZ8oGKstkvhYORLWGp7S1bjwoLjMaIOanoeI1nU7hbUGKVJXT9O3UgqUB67rXl15QHl7 u793KyLrNiC3Y896YSSe8yju55xDK4tuNSHK0R3PyppWTY4xxI3Yi7VFSXMlqn5/hifqvG 4p7sKHLNFJBQ7yY26fLyF2SEyFhV9xpzyO9NkPlbrXxEcSCbZoXgOq5braYLPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304195; a=rsa-sha256; cv=none; b=jlVEf6t9sAB+lTM8ShhdC5pjzRpQ9W8kz8rbNB0cEjWmLYnFzOjL+6KBAvWn7Kzi+qNPmo jRjrynpTGKSjS/eOYIHIz1Zotd81iCZnJZrJ8pS06/IPqOi3l3NNOUfslUlEGbWhHbT5WN w8HEyR41aYmt35drR5YEArX9k6PYH+5SmW9CWEbKTUxEm4HmCxEjXHp37omDneQ87kp5SY 5IB94TJi1n/s0ebjq59ZpUM2LPOrmE/c7AcfOVpvjzWvlFIb5S/m7RismyYWssSU1PazR2 jh8PPCPcx6NGuJheR8rNlUdc7i2ERPRSHPl135lccHEkl+u6g2eksNw7gAAzZQ== 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=1702304195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wwGjN03YBYB0FcDCawv8YyxGT4Z+cI04fNn56+rVtVw=; b=XEvklOC1fTtfrCxhpbiP6caKlqAKRSAn68J5z18w8t2gCQX4LGMJISXM71GabgETvKEdLe Cld4JmUqX2czTE50YDTnsvOPhx/gPLzDsECqpbW782/Mdy2V3lLtoBr3dCF4VvosLzfM9f +Mik0/8RF+tiUTvAD63eVBszTgcRg9KUazCq16zokYIY/ZGxACov5WOETQcQxdRUEEF1T4 /4jsGcpnSK1HriXfnSDuPd7ub3iFRLx5WhZY4KoOOD6RPtNvtVRQ8vRNtWS5SIiKYkY58r 6jw9vyEawL83tAPHUKdmYUHFcVLnHtUe3tHUJ1Av5MLxtPrZUb8f3Z9jhQPEiA== 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 4SpkM74cFRzZhS; Mon, 11 Dec 2023 14:16: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 3BBEGZMl071925; Mon, 11 Dec 2023 14:16:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGZ10071922; Mon, 11 Dec 2023 14:16:35 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:35 GMT Message-Id: <202312111416.3BBEGZ10071922@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: a6a481eaa2e0 - main - arm: Add fpu_kern_alloc_ctx() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: a6a481eaa2e0f02e24b874f1a08bb494a68972c0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a6a481eaa2e0f02e24b874f1a08bb494a68972c0 commit a6a481eaa2e0f02e24b874f1a08bb494a68972c0 Author: Mark Johnston AuthorDate: 2023-12-11 14:07:55 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:07:55 +0000 arm: Add fpu_kern_alloc_ctx() This enables the use of some out-of-tree crypto libraries on arm. No functional change intended, there are no callers of this function in the tree currently. Reviewed by: andrew MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D42969 --- sys/arm/arm/vfp.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index a4be235e1e01..f2979d4a2b27 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -30,10 +30,10 @@ #include #include +#include #include +#include #include -#include -#include #include #include @@ -52,6 +52,9 @@ static struct undefined_handler vfp10_uh, vfp11_uh; /* If true the VFP unit has 32 double registers, otherwise it has 16 */ static int is_d32; +static MALLOC_DEFINE(M_FPUKERN_CTX, "fpukern_ctx", + "Kernel contexts for VFP state"); + struct fpu_kern_ctx { struct vfp_state *prev; #define FPU_KERN_CTX_DUMMY 0x01 /* avoided save for the kern thread */ @@ -407,6 +410,21 @@ vfp_save_state(struct thread *td, struct pcb *pcb) critical_exit(); } +struct fpu_kern_ctx * +fpu_kern_alloc_ctx(u_int flags) +{ + return (malloc(sizeof(struct fpu_kern_ctx), M_FPUKERN_CTX, + ((flags & FPU_KERN_NOWAIT) ? M_NOWAIT : M_WAITOK) | M_ZERO)); +} + +void +fpu_kern_free_ctx(struct fpu_kern_ctx *ctx) +{ + KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) == 0, ("freeing in-use ctx")); + + free(ctx, M_FPUKERN_CTX); +} + void fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags) { From nobody Mon Dec 11 14:16:36 2023 X-Original-To: dev-commits-src-all@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 4SpkMB17F3z53f3D; Mon, 11 Dec 2023 14:16: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 4SpkM86dvBz3YXC; Mon, 11 Dec 2023 14:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=biwKtdyXgEWdc5jg6ENThT5i5AvaEKtUkbUOGDafvBU=; b=X3QLsgvDELdoChxbwZ0IvRMrLF3F3yRtARpzB86dkvX9px9SrdvMutDQsG70loRpfTt6yG aOtMZxZ76jmQH9zaVg/gSuck0zws20+Nwjm/HiAjNii9j+eRthGxT3as/mf5gqBgMm2sNv im58U56HcWOg7CJMAvo61ugOmbnUcjJENPTS1twx25YlMGrMgykAxdU3Wbpo9egIRqdn2c OjcMdffRvfHeHyORZR1iK02aS/m/xkVWOU7ySMuAce/q7XgDjXLIXy9pTCxPTB/7h+9ZAP rKQRmJAOVcNe+ixB7xoZY2oOX2FFoEf3YGTwGTx6fICTMnyfKdl0LNpCJhDevQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304196; a=rsa-sha256; cv=none; b=DGTZ7CL+GdiWTTkdaJ4nzJuis8FuaB6AbMemKpH/W88VU4hDyvGVQfKXxtgyOtD0hC/7hg P33IY04K4yqkQVvItGyxtPal4IyRVpSudTELg7ya2xkcPRBkeYK0ELzladmtXtHEN991M7 PlBrKOmcbymoJoH4jAKkA2yBg9Ys3qjv2osF95w4ssF/Inpwcg5pSMnX2XVOE3lHwWaUzj 8UORzVT6Pj/gdMRCH+2XMDgxcr2GP22cb2k+idBHYLLVTRFqO/Mvhig8gdPjT+eEmFSjIx migs4NVXJj5mD54bvcPmUfbztPC1AeIRR5a+w91faEFJVTUq+/ayK5PpFUiCVg== 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=1702304196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=biwKtdyXgEWdc5jg6ENThT5i5AvaEKtUkbUOGDafvBU=; b=FIKFUjSjNc0/mP+5n8a7uf/st104yxHOlugoWB6eM3eGsXKRtNpyoJUgrLlZS1e4QJSoTR RaUtF+sKhL7K/hq54BdWalE5ht8rGIJHqnpxekE1TOz+F3NlWJLZTuBO5gAaUWDmsKIMHq AeF6Yx0vGoFPwMN4qIhbvJ2YA55NV3ozMfTYSio7uW2+bAaVqpRV27hBPih2qgwV3X78Y7 Xjtz1JTU9S5jckbb04p6CMS7CzDxZaUUSjRSmq2UuInR2vNv6wNYV6EXzy5OHuJVcv/jMu OA3RxhxR82iL5XkGZ+zhC3bok1dwo4d55oDJ28ZV/WEHAMTTOs7c+CqZQNvHgA== 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 4SpkM85gdszZrZ; Mon, 11 Dec 2023 14:16: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 3BBEGaUr071982; Mon, 11 Dec 2023 14:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGapE071979; Mon, 11 Dec 2023 14:16:36 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:36 GMT Message-Id: <202312111416.3BBEGapE071979@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: ecc2e6deae71 - main - arm: Fix handling of undefined instructions in kernel mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ecc2e6deae71b69a30bf3b7e3354aba002a37d69 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ecc2e6deae71b69a30bf3b7e3354aba002a37d69 commit ecc2e6deae71b69a30bf3b7e3354aba002a37d69 Author: Mark Johnston AuthorDate: 2023-12-11 14:08:08 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:08:08 +0000 arm: Fix handling of undefined instructions in kernel mode Only panic if no undefined instruction handler matched the exception. This can arise in practice if the VFP is enabled lazily. While here, fix the panic string to not include a newline. Reviewed by: andrew Obtained from: Stormshield Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D42970 --- sys/arm/arm/undefined.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/undefined.c b/sys/arm/arm/undefined.c index 706033f5d570..dc29b55ae596 100644 --- a/sys/arm/arm/undefined.c +++ b/sys/arm/arm/undefined.c @@ -342,11 +342,11 @@ undefinedinstruction(struct trapframe *frame) #else printf("No debugger in kernel.\n"); #endif - return; - } - else - panic("Undefined instruction in kernel (0x%08x).\n", + } else if (uh == NULL) { + panic("Undefined instruction in kernel (0x%08x)", fault_instruction); + } + return; } userret(td, frame); From nobody Mon Dec 11 14:16:37 2023 X-Original-To: dev-commits-src-all@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 4SpkMB73KLz53f3G; Mon, 11 Dec 2023 14:16: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 4SpkMB0W74z3YcV; Mon, 11 Dec 2023 14:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6HTAINyJuBF4+RsPiz1OACG41ea1pwsZ6dtS8qmjvs=; b=hYYDp8BLLY5MZhxxbWpx1HzCOidjrzZbOpe/3F5IEjTmZzA6HZ0ZjQGvVNHIoxI2/+pog6 v6xwb5pNOCVMkC1P0iClC/AAoVYGsYBD7//VVeUqpdV+R3t9SDodQVar03Rqz/eZsxuLWA Zkf3KIzhlbOayXK8z3/kbF641k2ZY5hlcHLhmShfjo+0m/YKbKDrPS2wPNnoCVeRasbyRs lWQR4x8EiIwtVsbBLOPqcuaKA2OZAwvnXcGYC2uZuM3AT5eJa5a+AjtpHWizlEx55fh57W QxSbSmz8GyMc7FZcALK4XOUOHBWoWL8ZdOyXJnhM65HfqnxzW4K9s2TTr8jc2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304198; a=rsa-sha256; cv=none; b=ezz2gXzSKsXTU/z6E6ZKQ+jAaE5JMFpFkzZKhHFBJhBKl62goH7+H0MyBEz1kwH+3CB8IH 7Oz1miZjgIsyAeouejkqCGYaI5V3Z/s8G4TylHiMPj8bYYQpqEh6PDYnoQd7TVdoS6elkf ZloHa9qtild33Q29Hh8XKy5ziMPjYFkopjq1sp7hLCkY3X3Jsgh16hW1vj0ZDgq5Azf6ob OQ7wAG56rhcbd5mevfHHPRsmksGyFqzwKA7cdQyaxvSmhAVVu9KkrZlFJ70B7xBQZsICTJ BqOLEWgfEC1GKS33/qiDmy2Ixj6aCXTMYo1ZWbs97prCGYYf9FkbE8vrJq5UAQ== 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=1702304198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6HTAINyJuBF4+RsPiz1OACG41ea1pwsZ6dtS8qmjvs=; b=Ia2brGu1Z0evQshszx/tQ7l0fy/NFXr94k6XD4/2UW3Z9411TgszcLaJtczXE/94/G179T ucok9cqG2oquKbdXsNhknqr9iutyAB6baO1/ptZxjyrAs3HS5zbVUblXv0HUMiU6iL972j roMcnCeCp7/aV13mGfV6XR+HvMCqu8jRW/p/MUYukE2UDWLVpRZQcydC4cjoFy9q8hBj61 IPTTykIub6APBQgw1jVvMNijzCAMlpNzQuZGKnj21aCSEFPoRx2L+pmAKAg9IF2uyPnkJE +c5LCy5oQQjgwulc7qTPxemVQL82xNwD26EMVajSna9JqCbSm3HCNULy0XHDmQ== 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 4SpkM96hB1zZBh; Mon, 11 Dec 2023 14:16: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 3BBEGb7S072034; Mon, 11 Dec 2023 14:16:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGbHX072031; Mon, 11 Dec 2023 14:16:37 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:37 GMT Message-Id: <202312111416.3BBEGbHX072031@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: 03a07de0d5ee - main - arm: Handle VFP exceptions from the kernel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 03a07de0d5ee7d58069152070c42d55f7ec32b7c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=03a07de0d5ee7d58069152070c42d55f7ec32b7c commit 03a07de0d5ee7d58069152070c42d55f7ec32b7c Author: Mark Johnston AuthorDate: 2023-12-11 14:08:34 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:08:34 +0000 arm: Handle VFP exceptions from the kernel vfp_bounce() is called when handling an undefined instruction exception, to see if we need to enable the VFP. Previously it would unconditionally panic if the exception came from the kernel, which was simply wrong, and it did not permit lazy initialization of VFP state in the kernel. However, this functionality can be useful and is supported by arm's fpu_kern_enter() implementation. Thus, relax assertions and consume the exception if the thread was in an FPU section. Based on a patch from Stormshield. Reviewed by: andrew MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D42971 --- sys/arm/arm/vfp.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index f2979d4a2b27..bbcb468391b6 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -196,8 +196,9 @@ vfp_init(void) SYSINIT(vfp, SI_SUB_CPU, SI_ORDER_ANY, vfp_init, NULL); -/* start VFP unit, restore the vfp registers from the PCB and retry - * the instruction +/* + * Start the VFP unit, restore the VFP registers from the PCB and retry + * the instruction. */ static int vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) @@ -206,9 +207,6 @@ vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) struct pcb *curpcb; ksiginfo_t ksi; - if ((code & FAULT_USER) == 0) - panic("undefined floating point instruction in supervisor mode"); - critical_enter(); /* @@ -242,13 +240,19 @@ vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) return 1; } + curpcb = curthread->td_pcb; + if ((code & FAULT_USER) == 0 && + (curpcb->pcb_fpflags & PCB_FP_KERN) == 0) { + critical_exit(); + return (1); + } + /* * If the last time this thread used the VFP it was on this core, and * the last thread to use the VFP on this core was this thread, then the * VFP state is valid, otherwise restore this thread's state to the VFP. */ fmxr(fpexc, fpexc | VFPEXC_EN); - curpcb = curthread->td_pcb; cpu = PCPU_GET(cpuid); if (curpcb->pcb_vfpcpu != cpu || curthread != PCPU_GET(fpcurthread)) { vfp_restore(curpcb->pcb_vfpsaved); @@ -258,7 +262,8 @@ vfp_bounce(u_int addr, u_int insn, struct trapframe *frame, int code) critical_exit(); - KASSERT(curpcb->pcb_vfpsaved == &curpcb->pcb_vfpstate, + KASSERT((code & FAULT_USER) == 0 || + curpcb->pcb_vfpsaved == &curpcb->pcb_vfpstate, ("Kernel VFP state in use when entering userspace")); return (0); From nobody Mon Dec 11 14:16:38 2023 X-Original-To: dev-commits-src-all@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 4SpkMC2SV1z53fVH; Mon, 11 Dec 2023 14:16: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 4SpkMC1Jyhz3YZf; Mon, 11 Dec 2023 14:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=72ODTM17f+ITStBBUbP0as2G1HZT4aHzvdTUNUa06jQ=; b=gK4OctfD4+w9UQSmTx23tNYkFwEndiGWmjXffrm75lNmWTS4vlq/72Ew8N07pUj+gUKru+ NI71z/jXPXysZNZtZivydDUEnjVouUlOa/7ouqL1dOEWfRcFWbJQagUgdDTErZHiAWey6M CyHZPMJ7/9CGXPSatiUVSEQ4KlSB1EpBiZvUA0xx0fy92USFy73YFXnGc4Ky84oq0buwvV 7dP+bZzyae5j3ckDTeZcqUXrJyLbbEdmy1RE4nM+1wkTjg2ba/vJXzLhieWf5Xzd98olfp w4KaDAp0c1aryuL7O8PVGvM3uKvPKqpI7dfbZj3YRqM4/1bcH/n6xZTW9VH1UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304199; a=rsa-sha256; cv=none; b=v6gafVq1CYnX25Rj/nperI244hXe/vlWjy3quH44s5vC2S4ctN6dy02k747GlIn3Lc7vk2 cLAfn4gQTCO6sJF0Yv0DzzyXPwaenHmoqAfyDuoJLP3Kv792q32KlOgXwaQMw1F+9o4Nep XEKxhIlf3X3WzU4D7o5kWNQIHhidxrfERy92Et3i0FJ8VbjIf8V83oPeD4MZbz5M/delHP JMVAo9h/7voipGSBDAZWQwvcga01pCnCrN0MgNyp7upLpKf91mwTiDVTqWG/YfA7zSv61y lvWhLgYMdO08zxgKjZIMF39RIYkBkV+BX3+uB78vQ9x0U2CcdAgtoPjFVdYDGg== 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=1702304199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=72ODTM17f+ITStBBUbP0as2G1HZT4aHzvdTUNUa06jQ=; b=nDWkcD1oLufnNIKskFx2cj0EuyX5LwzFTW/c6DWkHLEU6kCFyf1UU7MPl9b1WpZ6sNg02G 3Qz2X4utDMfD3nBchFlZ8GcB9I7npSWy3yrCudoq+TFFegZBk4X2Txp1pwprnsMJ+Kyuic Fc9iRATMtMOcz4sawfmOMgz/1Cl1qELTlM/4FACLotqojKrBwMI2LfldombMQpo+OZZfwh Ldm5S2PP7KR7O/QtcC2+RwloEM54fVoSnCJ4C+kXkrZO/5ExQpHxmh8sJTm55gvE+dAOgd F3BoIYz9zlnglmBZoSCPTK73E1uIyGe3e5yDavk5/E1pCjO5vnaa6ID6iZ8MkQ== 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 4SpkMC0NhZzZcD; Mon, 11 Dec 2023 14:16: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 3BBEGc9X072082; Mon, 11 Dec 2023 14:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGcrP072079; Mon, 11 Dec 2023 14:16:38 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:38 GMT Message-Id: <202312111416.3BBEGcrP072079@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: ce2f34ade8b7 - main - arm: Disable the VFP during boot List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ce2f34ade8b787b068085fa8a8ddd295b06c2737 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ce2f34ade8b787b068085fa8a8ddd295b06c2737 commit ce2f34ade8b787b068085fa8a8ddd295b06c2737 Author: Mark Johnston AuthorDate: 2023-12-11 14:08:49 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:08:49 +0000 arm: Disable the VFP during boot The VFP code expects the kernel to boot with VFP disabled, but some boards will boot with it enabled. Make sure that vfp_init() disables the VFP on each CPU during boot. PR: 273752 Reviewed by: andrew Diagnosed by: Thomas Skibo MFC after: 1 week --- sys/arm/arm/vfp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index bbcb468391b6..6c398a7a3eaa 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -181,6 +181,8 @@ vfp_init(void) elf_hwcap |= HWCAP_VFPv4; } + vfp_disable(); + /* initialize the coprocess 10 and 11 calls * These are called to restore the registers and enable * the VFP hardware. From nobody Mon Dec 11 14:24:44 2023 X-Original-To: dev-commits-src-all@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 4SpkXY1rjNz53gLn; Mon, 11 Dec 2023 14:24: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 4SpkXX703sz3bST; Mon, 11 Dec 2023 14:24:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rEmXZb8waSTlu4fw7X+JdTXAKkbOHos2B3a+3biOoc=; b=Uf/B5a5rw/9VKSvArB0AYhsSeclXQWXyAXFLW8o3PV9yPRUDH5sWx7+7M5KyIc03decZSE TBssM5Ker6ObuqoPDZUX31T1f3c9w2qvionrVHAiOB2ojBwf166mCrI0GRnsKaxstWj33K benBDS0jkjJM2qcTTQCSvHPzBqBBg1qVFFH1npk+QRTobKTJyiGNWI4C2quh9HUPu001FV 8HMBdUtzfrhFajzDgZsRfPWQkcMzhNusRWkZgU5M43B1bpRsZEBL6rjX+9ap5sAPfIpsxn 7Cxj2zauzXuZW116Vk3O6zFrPrZAKxyBRBVbYAOBjY8pzezzJThM2YKzaOkRNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304685; a=rsa-sha256; cv=none; b=ev+KnQ5r7B6NgdW4/zIwdpwhIDEYnlpQZI0zfrXhsrgblZnKvXMNGqQmBZGGXuKA5eIR8H HDzUK9tFSr13Hxvsa7Oaz9AUdmAUQQXWFOahOJuslRAAmwNt6hVJIassnCMRPpEKknre9k HcnvBKuMKpoW9k48kmi0qBbjmOBVIFM8XizO1USogIej8GGHMLPYHCdS8wTrP33tWxHVFW 3Dq6hoH5xXdBnz+h6YOwN1wghz4D0cjMHoWK+7EGPdTeIYkBdLLdQ3CjlGPYSYud1QZ0W/ z20ex7EzNpy0X6upOydpNjGoUWD/FvAfMKZ+UTct1xtGNv6PsIlp8A9TD42KTA== 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=1702304685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rEmXZb8waSTlu4fw7X+JdTXAKkbOHos2B3a+3biOoc=; b=nttBgWmpJ7EyDZ+E49yGuxqhefED/+T0x9WmNc6xM1JuILb6sYl/IBR+fg33FSYmsQjzT6 eLWxaJo0sxCzNJiGw8AZbMbxelI+nDkN3fPK0h7PN37ydyPPzZvSt0Khi5tYSpoU/HYM7o R/tMLEh1tRsyd9YqAcqch/WyLiiZNyCd2ueVSLVj9m0m+NHrr8QUiXHRm6thC3katnBeFT 9neEswrDQcaYBsAOqzTv1JCh/8wOTY+vGu8IryKEqB26ucyFsh5p3cqE3P4zv8twYuLJvB GoPYy2CByzJbA5ozomuvTul/JnySkefFKOBVmpHzM92xqelL0sRqHhIjhIi/Cg== 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 4SpkXX65Hmzb4Z; Mon, 11 Dec 2023 14:24: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 3BBEOiNd088398; Mon, 11 Dec 2023 14:24:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEOiXQ088395; Mon, 11 Dec 2023 14:24:44 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:24:44 GMT Message-Id: <202312111424.3BBEOiXQ088395@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: 3c0fb026b2fc - main - tty: Avoid a kernel memory discloure via kern.ttys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3c0fb026b2fc998fa9bea8aed76e96c58671aee3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3c0fb026b2fc998fa9bea8aed76e96c58671aee3 commit 3c0fb026b2fc998fa9bea8aed76e96c58671aee3 Author: Mark Johnston AuthorDate: 2023-12-11 14:19:09 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:19:09 +0000 tty: Avoid a kernel memory discloure via kern.ttys Four pad bytes at the end of each xtty structure were not being cleared before being copied out. Fix this by clearing the whole structure before populating fields. MFC after: 3 days Reported by: KMSAN --- sys/kern/tty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 620233947410..e051c66ab0c9 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1288,6 +1288,7 @@ tty_to_xtty(struct tty *tp, struct xtty *xt) tty_assert_locked(tp); + memset(xt, 0, sizeof(*xt)); xt->xt_size = sizeof(struct xtty); xt->xt_insize = ttyinq_getsize(&tp->t_inq); xt->xt_incc = ttyinq_bytescanonicalized(&tp->t_inq); From nobody Mon Dec 11 15:03:09 2023 X-Original-To: dev-commits-src-all@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 4SplNx2rD2z53jH0; Mon, 11 Dec 2023 15:03:13 +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 4SplNx2MMLz3gP5; Mon, 11 Dec 2023 15:03:13 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702306993; 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=5b96qI2AHSNC62t86ZKipdbqPQcUEM8MPKP46pKcIvE=; b=AZamCc073Mt5fX4jyJyed4cVmkAdAl+VmaVxlTahzyuYU41t3LCnPRm2MbS1V6Dwj0ZUIe kELsq+Pg4vbkuDQFHbngpEDTWceuwgYPEkY9pMVjcZajIc1tpcYIJry5S1fR3bGuyoozvU Mbruol6d9zpumvfWQ5DKc+6gxf8eTZxQCWV4OFF6ddm8cDa9eKk9o8AQbQBxzjsQIRL8U+ mpB2P2Nz6899Hhown6j8fPA2ElPpYNC4gVQvRsgSJ3v4S9DjVz1euIxKPvM/8dTn9VxomW QtM2K0BAxVkyshQP/WlJSSGOu02TnMDTTTfGZn6MiNC++dcmHPyWolKFzMzzZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702306993; a=rsa-sha256; cv=none; b=RMSXTzAM7uank0ULVtpI0Kg1ptFw7+MFftRgx1DYTFvqrW5CU26bESdgKOYlUUmzImrzNH 9lvbYr55g5mGwwk8plkvFI+OndnIjCpb+9rZSSK+CiORm/ir2ecQ7J1CY4wxIVy7Gn81Oa wS8MIoWkocM8JbTkpNc/+dyvBnhNn+XrXiAdhU2xdozJ57veMzySI+zFAQmz/rDH2kRpFO 9bWFO8tGJpX8ptVffp37blIudK+eIowqvoEbVblLY0IQUj8YPMBMAsB/QLQ1ZGx5p3bY/j 68O5y8o7u6tHT35i3535ywlnAhdOPt8BEweCswx425NlKozOAnDHpKBmLpyDjg== 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=1702306993; 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=5b96qI2AHSNC62t86ZKipdbqPQcUEM8MPKP46pKcIvE=; b=wR0ShoeKOlOyK4JVEOxBxGVJfL70KFRMYilQJYFNfCEdGDgMsHdEpCrjtvXL+JHSM/rSkQ lmzPmB1PVZNmbeTk8hl0zDBmVr/xtJqgD+95mzl6LcG0dkmSHOuKzXbYg63GfkUEWNPBdB 6f2bdiBAeATnGSVnaxn4RP4NPAQOF0hh10k/ua7o/NmFVhG23+DznzSTfThSSn/8gxWjzk TnpNKf6fONOEB2pp2Mu8X6J1Bpu8VLGqkluGTT/eGfR5wtCPXOkI9Cn5dEO0Yu2EO7ctKT 1Jpo8U/M3Zm1lWUDu+BcerMFpT4UNo2YACyJl8cwHtUBc8cSpkzRuGsbrp/y1w== 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 4SplNx04W1z1YqQ; Mon, 11 Dec 2023 15:03:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 8A4721ECAE; Mon, 11 Dec 2023 16:03:10 +0100 (CET) From: Kristof Provost To: Dimitry Andric Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 Date: Mon, 11 Dec 2023 16:03:09 +0100 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_3A3E899A-1A08-45A1-8DA9-E72DA079425D_=" --=_MailMate_3A3E899A-1A08-45A1-8DA9-E72DA079425D_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 8 Dec 2023, at 18:39, Dimitry Andric wrote: > The branch main has been updated by dim: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D5c16e71d30c388dd43b217de10a3c= cb4b0219d0d > > commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d > Merge: b121cb0095c8 703029dbba78 > Author: Dimitry Andric > AuthorDate: 2023-11-30 20:06:52 +0000 > Commit: Dimitry Andric > CommitDate: 2023-12-08 17:35:59 +0000 > > Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 > > This updates llvm, clang, compiler-rt, libc++, libunwind, lld, = > lldb and > openmp to llvmorg-17.0.6-0-g6009708b4367. > > PR: 273753 > MFC after: 1 month > There appears to be some fallout in some ports. For example, devel/ivykis (but also sysutils/flashrom and = databases/rrdtool) fails like this: /bin/sh ../libtool --tag=3DCC --mode=3Dlink cc -O2 -pipe = -fstack-protector-strong -fno-strict-aliasing -Wall -version-info = 5:6:5 -Wl,--version-script,../libivykis.posix.ver = -fstack-protector-strong -o libivykis.la -rpath /usr/local/lib iv_avl.lo = iv_event.lo iv_fatal.lo iv_task.lo iv_timer.lo iv_tls.lo iv_work.lo = iv_event_raw_posix.lo iv_fd.lo iv_fd_poll.lo iv_fd_pump.lo = iv_main_posix.lo iv_popen.lo iv_signal.lo iv_thread_posix.lo = iv_tid_posix.lo iv_time_posix.lo iv_wait.lo iv_fd_kqueue.lo libtool: link: cc -shared -fPIC -DPIC .libs/iv_avl.o .libs/iv_event.o = =2Elibs/iv_fatal.o .libs/iv_task.o .libs/iv_timer.o .libs/iv_tls.o = =2Elibs/iv_work.o .libs/iv_event_raw_posix.o .libs/iv_fd.o = =2Elibs/iv_fd_poll.o .libs/iv_fd_pump.o .libs/iv_main_posix.o = =2Elibs/iv_popen.o .libs/iv_signal.o .libs/iv_thread_posix.o = =2Elibs/iv_tid_posix.o .libs/iv_time_posix.o .libs/iv_wait.o = =2Elibs/iv_fd_kqueue.o -O2 -fstack-protector-strong = -Wl,--version-script -Wl,../libivykis.posix.ver -fstack-protector-strong = -Wl,-soname -Wl,libivykis.so.0 -o .libs/libivykis.so.0.5.6 ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_register' failed: symbol not defined ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_unregister' failed: symbol not defined ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_watch_register' failed: symbol not defined ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_watch_unregister' failed: symbol not defined cc: error: linker command failed with exit code 1 (use -v to see = invocation) I believe the issue is that it doesn=E2=80=99t build inotify code on Free= BSD, = but still mentions the relevant functions in the linker script. The = other affected ports I=E2=80=99ve run into appear to have similar issues.= There=E2=80=99s likely to be a fair amount of fallout from that, e.g. = https://github.com/llvm/llvm-project/issues/75056 I=E2=80=99m not sure what the best path forward is. Should we try to make= ld = warn but not fail on issues like that, or fix each affected port or ? Best regards, Kristof --=_MailMate_3A3E899A-1A08-45A1-8DA9-E72DA079425D_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 8 Dec 2023, at 18:39, Dimitry Andric wrote:

The branch main has been updated by= dim:

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

commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d
Merge: b121cb0095c8 703029dbba78
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-11-30 20:06:52 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-12-08 17:35:59 +0000

Merge llvm-project release/17.x llvmorg-17.0.6-0-g600= 9708b4367

This updates llvm, clang, compiler-rt, libc++, libunw= ind, lld, lldb and
openmp to llvmorg-17.0.6-0-g6009708b4367.

PR: 273753
MFC after: 1 month


There appears to be some fallout in some ports.

For example, devel/ivykis (but also sysutils/flashrom and= databases/rrdtool) fails like this:

/b=
in/sh ../libtool  --tag=3DCC    --mode=3Dlink cc  -O2 -pipe  -fstack-prot=
ector-strong -fno-strict-aliasing  -Wall  -version-info 5:6:5 -Wl,--versi=
on-script,../libivykis.posix.ver -fstack-protector-strong -o libivykis.la=
 -rpath /usr/local/lib iv_avl.lo iv_event.lo iv_fatal.lo iv_task.lo  iv_t=
imer.lo iv_tls.lo iv_work.lo iv_event_raw_posix.lo iv_fd.lo  iv_fd_poll.l=
o iv_fd_pump.lo iv_main_posix.lo  iv_popen.lo iv_signal.lo iv_thread_posi=
x.lo  iv_tid_posix.lo iv_time_posix.lo iv_wait.lo    iv_fd_kqueue.lo
libtool: link: cc -shared  -fPIC -DPIC  .libs/iv_avl.o .libs/iv_event.o .=
libs/iv_fatal.o .libs/iv_task.o .libs/iv_timer.o .libs/iv_tls.o .libs/iv_=
work.o .libs/iv_event_raw_posix.o .libs/iv_fd.o .libs/iv_fd_poll.o .libs/=
iv_fd_pump.o .libs/iv_main_posix.o .libs/iv_popen.o .libs/iv_signal.o .li=
bs/iv_thread_posix.o .libs/iv_tid_posix.o .libs/iv_time_posix.o .libs/iv_=
wait.o .libs/iv_fd_kqueue.o    -O2 -fstack-protector-strong -Wl,--version=
-script -Wl,../libivykis.posix.ver -fstack-protector-strong   -Wl,-soname=
 -Wl,libivykis.so.0 -o .libs/libivykis.so.0.5.6
ld: error: version script assignment of 'IVYKIS_0.29' to symbol 'iv_inoti=
fy_register' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol 'iv_inoti=
fy_unregister' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol 'iv_inoti=
fy_watch_register' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol 'iv_inoti=
fy_watch_unregister' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see invocati=
on)

I believe the issue is that it doesn=E2=80=99t build inot= ify code on FreeBSD, but still mentions the relevant functions in the lin= ker script. The other affected ports I=E2=80=99ve run into appear to have= similar issues.

There=E2=80=99s likely to be a fair amount of fallout fro= m that, e.g. https://github.com/llvm/llvm-project/issues/75056

I=E2=80=99m not sure what the best path forward is. Shoul= d we try to make ld warn but not fail on issues like that, or fix each af= fected port or ?

Best regards,
Kristof

--=_MailMate_3A3E899A-1A08-45A1-8DA9-E72DA079425D_=-- From nobody Mon Dec 11 15:15:48 2023 X-Original-To: dev-commits-src-all@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 4Splgq5JB4z53jnh; Mon, 11 Dec 2023 15:16:07 +0000 (UTC) (envelope-from dim@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 4Splgq12ktz4DPD; Mon, 11 Dec 2023 15:16:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702307767; 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=kvur7s7dTjXJsiD6Df25oQXRF+ccbtGoFIvaHd8h+ZU=; b=GdK53MX8cc7iXqHF7fQNBGNXyKcvIqZR6sIsYhC8wPNgkl8K/UQLtnf9aGdISQ0SAQ/47D //KLg7th54qrjvJzGMD8AEl832SXJbCcTodwrgSCpJwdwLhW15KwkYBll+R+EFK3FHbmyB jvEVlZq3+5lZVV14WWHl9Y6Or8rvGy1CamlBEl/LGkKfkxoq5wIoXxp9rovRq8S7yc7zCb glAUCbyZwoIvJjedFwwf2UkvhOPWCzR9hMvDhrXaq438tJcYqf6Mk4RGR6vBTpv4nLVSz9 atSxNDMm2KiHITi3QJAcysK+Ltx9X/uqx5R4o+MjziRKIedeNqCobICiNGXZaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702307767; a=rsa-sha256; cv=none; b=q1iJRz48Nz+FCgXQ6O00Ca+KNX7I1VQNsfAqQ3MpD9KKfozSGWBE3nibovUoOe1lu7h9Ei KFXPtpApxB9rpYErY0Z7bYapUlilyFSWrmDiIwc3NYGvakZTjjpEA6bBVuYTOD3lVb6uY2 Dy21AQdk19jZxpsTsf3fhqUCATthEXN1pP0MuoAiDfzCI5l9+jzFwvQ3tL4EEC9KgXnrW1 6UYs27CkzC/rewB19z/CJg7hd8gj5i0qFp76Cr0WVhDUCiA4W+bDcJjfxR68qmPpnuAo1Y jeiZildzAVJBB+f9qIL8G32hC4yKDHQI4M5H0pu2JMIIHpMX5x4A5yLVOx1e3Q== 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=1702307767; 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=kvur7s7dTjXJsiD6Df25oQXRF+ccbtGoFIvaHd8h+ZU=; b=te5Xg36CE++yicD4OfskT/uS+BgUqmf6xlLqb+7BeOkFSaNeV0+mhSOy3Jv9mOaW1tXFuX /lCJQPQN9pCqAio/JNcb3NyO4Ybx02nzdMDqOyU6wt6+TEI8a/Qzd+j27L4WjCaLbrTETB z9UTWEUjhUeYfGlI3/sB66u7bR9k0Rat1I1XBXWTjIeDw51xREoWTgQLBbDv44tB9VP2yg gd/+DuFQouosz/PgrSSXJX8tw43dE8vxuRO8Pc5KeBXq+4CE2RUa5m+xg3TrWZyeAicvI6 Duk4onNFV9N/jjaxeYJ12otGh9Mcpe4smviZs4NBG2LR5DUdOiL3cPHrOPQxgA== 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 4Splgp6Wpjz1Zw9; Mon, 11 Dec 2023 15:16:06 +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 D5BFC34B7C; Mon, 11 Dec 2023 16:16:05 +0100 (CET) From: Dimitry Andric Message-Id: <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 Date: Mon, 11 Dec 2023 16:15:48 +0100 In-Reply-To: Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Kristof Provost References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45 Content-Type: multipart/alternative; boundary="Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0" --Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 11 Dec 2023, at 16:03, Kristof Provost wrote: > On 8 Dec 2023, at 18:39, Dimitry Andric wrote: > The branch main has been updated by dim: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5c16e71d30c388dd43b217de10a3ccb4= b0219d0d = > commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d > Merge: b121cb0095c8 703029dbba78 > Author: Dimitry Andric > AuthorDate: 2023-11-30 20:06:52 +0000 > Commit: Dimitry Andric > CommitDate: 2023-12-08 17:35:59 +0000 >=20 > Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 >=20 > This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb = and > openmp to llvmorg-17.0.6-0-g6009708b4367. >=20 > PR: 273753 > MFC after: 1 month >=20 >=20 > There appears to be some fallout in some ports. >=20 > For example, devel/ivykis (but also sysutils/flashrom and = databases/rrdtool) fails like this: >=20 > /bin/sh ../libtool --tag=3DCC --mode=3Dlink cc -O2 -pipe = -fstack-protector-strong -fno-strict-aliasing -Wall -version-info = 5:6:5 -Wl,--version-script,../libivykis.posix.ver = -fstack-protector-strong -o libivykis.la -rpath /usr/local/lib iv_avl.lo = iv_event.lo iv_fatal.lo iv_task.lo iv_timer.lo iv_tls.lo iv_work.lo = iv_event_raw_posix.lo iv_fd.lo iv_fd_poll.lo iv_fd_pump.lo = iv_main_posix.lo iv_popen.lo iv_signal.lo iv_thread_posix.lo = iv_tid_posix.lo iv_time_posix.lo iv_wait.lo iv_fd_kqueue.lo > libtool: link: cc -shared -fPIC -DPIC .libs/iv_avl.o = .libs/iv_event.o .libs/iv_fatal.o .libs/iv_task.o .libs/iv_timer.o = .libs/iv_tls.o .libs/iv_work.o .libs/iv_event_raw_posix.o .libs/iv_fd.o = .libs/iv_fd_poll.o .libs/iv_fd_pump.o .libs/iv_main_posix.o = .libs/iv_popen.o .libs/iv_signal.o .libs/iv_thread_posix.o = .libs/iv_tid_posix.o .libs/iv_time_posix.o .libs/iv_wait.o = .libs/iv_fd_kqueue.o -O2 -fstack-protector-strong = -Wl,--version-script -Wl,../libivykis.posix.ver -fstack-protector-strong = -Wl,-soname -Wl,libivykis.so.0 -o .libs/libivykis.so.0.5.6 > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_register' failed: symbol not defined > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_unregister' failed: symbol not defined > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_watch_register' failed: symbol not defined > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_watch_unregister' failed: symbol not defined > cc: error: linker command failed with exit code 1 (use -v to see = invocation) > I believe the issue is that it doesn=E2=80=99t build inotify code on = FreeBSD, but still mentions the relevant functions in the linker script. = The other affected ports I=E2=80=99ve run into appear to have similar = issues. >=20 In this case, if it never builds the inotify code, you can safely delete = those symbols from the linker version script. > There=E2=80=99s likely to be a fair amount of fallout from that, e.g. = https://github.com/llvm/llvm-project/issues/75056 >=20 > I=E2=80=99m not sure what the best path forward is. Should we try to = make ld warn but not fail on issues like that, or fix each affected port = or ? >=20 I fixed dozens of ports for this in https://bugs.freebsd.org/273753, but = I haven't gone over all of them, since I have limited resources. That said, there are generally two ways to fix this: either add = -Wl,--undefined-version to the linker flags, or actually remove the = undefined symbols from the linker version scripts. Example of the former: = https://cgit.freebsd.org/ports/commit/?id=3De0c21e404ed0f04c06c3bce7dd093c= 6e5ffea188 : --- a/java/openjfx14/Makefile +++ b/java/openjfx14/Makefile @@ -95,6 +95,9 @@ _INSTALLDIR=3D ${PREFIX}/${PKGBASE} CFLAGS+=3D -Wno-error=3Dincompatible-function-pointer-types .endif +# Suppress errors with lld >=3D 17 due to undefined symbols. +LDFLAGS+=3D -Wl,--undefined-version + post-extract: ${MKDIR} ${WRKDIR}/jars .for f in core grouping queries queryparser sandbox Example of the latter: = https://cgit.freebsd.org/ports/commit/?id=3Daef056cf0fe1852a7b708d090310a6= eb4853b269 : --- = a/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym= +++ = b/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym= @@ -1,5 +1,5 @@ ---- ext/pg_query/pg_query_ruby.sym.orig 2023-06-25 07:13:00 UTC +--- ext/pg_query/pg_query_ruby.sym.orig 2023-11-19 20:29:16 UTC +++ ext/pg_query/pg_query_ruby.sym -@@ -1 +1,2 @@ - _Init_pg_query +@@ -1 +1 @@ +-_Init_pg_query +Init_pg_query -Dimitry --Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 On 11 Dec = 2023, at 16:03, Kristof Provost <kp@FreeBSD.org> = wrote:
On 8 Dec 2023, at 18:39, Dimitry Andric = wrote:

The branch main has been = updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=3D5c16e71d30c388= dd43b217de10a3ccb4b0219d0d

commit = 5c16e71d30c388dd43b217de10a3ccb4b0219d0d
Merge: b121cb0095c8 703029dbba78
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-11-30 20:06:52 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-12-08 17:35:59 +0000

Merge = llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367

This updates llvm, clang, compiler-rt, libc++, = libunwind, lld, lldb and
openmp to llvmorg-17.0.6-0-g6009708b4367.

PR: = 273753
MFC after: 1 month


There appears to be some fallout in some ports.

For example, devel/ivykis (but also sysutils/flashrom and = databases/rrdtool) fails like this:

/bin/sh ../libtool  --tag=3DCC    =
--mode=3Dlink cc  -O2 -pipe  -fstack-protector-strong =
-fno-strict-aliasing  -Wall  -version-info 5:6:5 =
-Wl,--version-script,../libivykis.posix.ver -fstack-protector-strong -o =
libivykis.la -rpath /usr/local/lib iv_avl.lo iv_event.lo iv_fatal.lo =
iv_task.lo  iv_timer.lo iv_tls.lo iv_work.lo iv_event_raw_posix.lo =
iv_fd.lo  iv_fd_poll.lo iv_fd_pump.lo iv_main_posix.lo  iv_popen.lo =
iv_signal.lo iv_thread_posix.lo  iv_tid_posix.lo iv_time_posix.lo =
iv_wait.lo    iv_fd_kqueue.lo
libtool: link: cc -shared  -fPIC -DPIC  .libs/iv_avl.o .libs/iv_event.o =
.libs/iv_fatal.o .libs/iv_task.o .libs/iv_timer.o .libs/iv_tls.o =
.libs/iv_work.o .libs/iv_event_raw_posix.o .libs/iv_fd.o =
.libs/iv_fd_poll.o .libs/iv_fd_pump.o .libs/iv_main_posix.o =
.libs/iv_popen.o .libs/iv_signal.o .libs/iv_thread_posix.o =
.libs/iv_tid_posix.o .libs/iv_time_posix.o .libs/iv_wait.o =
.libs/iv_fd_kqueue.o    -O2 -fstack-protector-strong =
-Wl,--version-script -Wl,../libivykis.posix.ver -fstack-protector-strong =
  -Wl,-soname -Wl,libivykis.so.0 -o .libs/libivykis.so.0.5.6
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_register' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_unregister' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_watch_register' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_watch_unregister' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see =
invocation)

I believe the issue is that it doesn=E2=80=99= t build inotify code on FreeBSD, but still mentions the relevant = functions in the linker script. The other affected ports I=E2=80=99ve = run into appear to have similar = issues.

In this case, if it = never builds the inotify code, you can safely delete those symbols from = the linker version script.

There=E2=80=99s likely to be a fair amount of fallout from = that, e.g. https://github.= com/llvm/llvm-project/issues/75056

I=E2=80=99m = not sure what the best path forward is. Should we try to make ld warn = but not fail on issues like that, or fix each affected port or = ?




--- a/java/openjfx14/Makefile
+++ b/java/openjfx14/Makefile
@@ -95,6 +95,9 @@ _INSTALLDIR=3D =  ${PREFIX}/${PKGBASE}
 CFLAGS+=3D       = -Wno-error=3Dincompatible-function-pointer-types
 .endif

+# Suppress = errors with lld >=3D 17 due to undefined = symbols.
+LDFLAGS+=3D   =    -Wl,--undefined-version
+
 post-extract:
        ${MKDIR} = ${WRKDIR}/jars
 .for f in = core grouping queries queryparser = sandbox


--- = a/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym=
+++ = b/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym=
@@ -1,5 +1,5 = @@
---- = ext/pg_query/pg_query_ruby.sym.orig       =  2023-06-25 07:13:00 UTC
+--- = ext/pg_query/pg_query_ruby.sym.orig       =  2023-11-19 20:29:16 UTC
 +++ = ext/pg_query/pg_query_ruby.sym
-@@ = -1 +1,2 @@
- = _Init_pg_query
+@@ -1 +1 = @@
+-_Init_pg_query
 +Init_pg_query

-Dimit= ry

= --Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0-- --Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZXcnpAAKCRCwXqMKLiCW o2wvAKDRVumoSrgNKyR3a8ZAyvXl9FgtQACgtG+38ivaq2zYKtAHDifxS7kwCJY= =N/rs -----END PGP SIGNATURE----- --Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45-- From nobody Mon Dec 11 16:37:16 2023 X-Original-To: dev-commits-src-all@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 4SpnTS2W4Tz53pGP; Mon, 11 Dec 2023 16:37: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 4SpnTS1zF9z4L37; Mon, 11 Dec 2023 16:37:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702312636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdsCzoyNwbNixhoTdKYZhPL0HXlPNhR34wnpEIuShM0=; b=igf9L7zKDhS5PsolXA9uEiDPhJ2EtqPf7B/HqHXHwTYEc26wBd+GfjXi055NCx5ZgFghvM lMrx6aKfbI7RsO/fTJzK7IXtGANWmpb8216TRL72/VObMDyEzzqNQ/G4+MUEl6wbGbsgRj 1P/lEniA8DyPf7+QjhNTZgwSUZD7hHYuvr61P+Cc9kpvrxD6A9Fy97Mn+ebb5ULwMXVzKj tKMM6j0qBHWFme3YHnzTbj5M8TDlUS4N5JLuGsv6q/NfLNZ2QyiP03fu8pk/9uIRnJS/sg 0aheNY581ipINRdpzg0aAniOxyEUZD9QnY1jNBPYlsGpZfsAsEDOBHKWLwFMVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702312636; a=rsa-sha256; cv=none; b=LN1NU7IT2xj3fjh67zkYgkIYpOHgeey2IZ4O8H4qy68hzqNREXoSJUENyeKiUPwvqWO963 Rgequn3DAZdgzixx+xUmrYwV0WT9/lNc6l81kwrynwnF3rcFpuwQXLJFdWYzHp6bQLdVuK CMxwqVZBWhn+Pshfsawka67K+5tcd1ApJjEdSS+aQ/t2Lft/rQvJ6Qb6oD8Dfj+RVjZlaN H6U60+JmsnDd0QB87pApA06lLVRUVHjOcK5FfmxYUWfWiyR9WILEHKIY7Mw7fINwWeNIeg MC73f5bEP8XfjPNq21JLD2OsNT6h2zMf2WNDDOt8m8lGjT4/fPGQM2njoGkG8Q== 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=1702312636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OdsCzoyNwbNixhoTdKYZhPL0HXlPNhR34wnpEIuShM0=; b=uP8H9tWPD8x8mJ7qVjV45gcb9k8cA6WPvb7KH6hJLF9HYR033trEbKnXR3f6GnUBLJ5dQ8 LBMQXBh6T3jAVIVxCTjEhk7z97o6yNhbE+idw70kzOfx5+6OEn4aUABAxDHb/mA8oXlZtv wecBQdHP/r6Wo74TmGl2+uomNcIayJ7nbkhIjNWgI/RoKl8NXXczg0XXE2y9LNklLVzNIb 6Ktezy7SPbyEqyaolX4Gj901C4wbaEHQA5bkGHLdelmCmehT8O50mwkgVBp5UotxudEPW6 xNJqNu/dyS+ISC5T2pZWvUBVteSvAp/bWA3c9Pg5Z/hwbTBj/R5WNumUCGZNqw== 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 4SpnTS11bszdqc; Mon, 11 Dec 2023 16:37:16 +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 3BBGbGpK005712; Mon, 11 Dec 2023 16:37:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBGbGa5005709; Mon, 11 Dec 2023 16:37:16 GMT (envelope-from git) Date: Mon, 11 Dec 2023 16:37:16 GMT Message-Id: <202312111637.3BBGbGa5005709@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: 99bcbef25a7a - main - libpfctl: remove stray debug printf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 99bcbef25a7a96f3d4525cc48bf9f0a177194694 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=99bcbef25a7a96f3d4525cc48bf9f0a177194694 commit 99bcbef25a7a96f3d4525cc48bf9f0a177194694 Author: Kristof Provost AuthorDate: 2023-12-11 13:35:42 +0000 Commit: Kristof Provost CommitDate: 2023-12-11 15:53:38 +0000 libpfctl: remove stray debug printf() Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 513d2d0f01be..10a63f15e2f8 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1108,10 +1108,8 @@ pfctl_add_rule(int dev __unused, const struct pfctl_rule *r, const char *anchor, seq_id = hdr->nlmsg_seq; - if (! snl_send_message(&ss, hdr)) { - printf("Send failed\n"); + if (! snl_send_message(&ss, hdr)) return (ENXIO); - } while ((hdr = snl_read_reply_multi(&ss, seq_id, &e)) != NULL) { } From nobody Mon Dec 11 18:10:51 2023 X-Original-To: dev-commits-src-all@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 4SpqYc2QbFz53vj7; Mon, 11 Dec 2023 18:11:00 +0000 (UTC) (envelope-from fluffy@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 4SpqYc209Bz4Vfc; Mon, 11 Dec 2023 18:11:00 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702318260; 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=v4P6aDC9NaDKsUzjy8kX61jqWK4rG2TAATuCkpxsoVM=; b=ZN9uYfqvRShvXW7zCX3vJ4ZmPjb2g8/Hi9iuXRdIUr7+6A4ZVCSeWHGE37p2D/TZz9EDfB 3lpP631KyLxr7TH1fkX7TcXzfAKGDfOxGq/LzIgCuZziFk4RPw8pZZbKZlVZJJpCPq22b/ bVeyxLjl8HgdOz23dccYPIC6k8YWZeWau+3+fskghqKjREwyRDHBpOxl3Qrx/G3lnfPxCx fCRRxTqcBMVtofWrIZ7zL3jr8gd+hsJmOBK+24soyMXFJPtMqNW4YF5DMNF6OeBl7plkbd RVjYnSWyd+0nBjP9bYyek8elxOAI6IroY94gHQMEHCR+LksAUijqhy26qmwJGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702318260; a=rsa-sha256; cv=none; b=BPDK6uQOqkquyvEhjSTdVhDy2HrausxxgjKH52dnirbm7hV8CqdgfX+NmlL6HR9o/ljA2G 2mu/ZEqEPOlHIqcQtLGQWWkKAmCWWuHa9u0LR3SpDgOqO4Adu/RYBOFp9Y2kPgxc/vC18i hbpNDpthvx6KSzsCrU7yrrz5m18RazCl8kSAU1uF2hAgEc/UsNVw4N+PCTtHJJ19FVFL7W Rwhd7OgeNm/AwnrSl0Q2xpthn6Hmi89Jo/HKYftwOLDNDPSBOfhl/9Dki0PJrV8NoT4VR4 H6lk7xws2ivLPJWBNloyM6wnEDFTZplZSu3dQtXXPncMdR0HWW/TYwGolV21iA== 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=1702318260; 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=v4P6aDC9NaDKsUzjy8kX61jqWK4rG2TAATuCkpxsoVM=; b=R3PsU7uqeoZ8CkDYT5sQm2IVEgVxF83tuSYajvp17z3P0TKfGseQZsOafkWAhG6Cgfb1O5 yrY2KtRitrmxCyWIbfC3gG/+jrXlZMgY67gmFmMuJk7Vkfe2VUtLxnUtsiDye1lYbXHHy+ ik3g7q+MwNFDAm1TSy19pnYaxV/Jx3Z7tFEn/POa9ix0EZdTFe3fuLk5cSMwi8zQ+ChZmQ 9ecG4H10tR4FNGryb8mvIxPTRyRrMXQvxnJwzy609KDjQcWTwcc3C//Pj14lPc03UYH5Bn ZoYys7f6z1AKDtMFP1ud/uMTCqKNL0Wk+FSDFKC/R0LvbZZNma3Mw4gc9jpqLQ== Received: from [10.216.0.102] (unknown [188.243.165.67]) (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: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SpqYY5wd7z1dD7; Mon, 11 Dec 2023 18:10:56 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Message-ID: <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> Date: Mon, 11 Dec 2023 21:10:51 +0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 Content-Language: ru, en-GB, en-US To: Dimitry Andric , Kristof Provost Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> From: Dima Panov Organization: FreeBSD.org In-Reply-To: <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------VQ5g0I7KPfBim1yvqjVDdAKY" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------VQ5g0I7KPfBim1yvqjVDdAKY Content-Type: multipart/mixed; boundary="------------iqvY3ZYJohnKQr4Ap86XTs14"; protected-headers="v1" From: Dima Panov To: Dimitry Andric , Kristof Provost Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-ID: <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> In-Reply-To: <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> --------------iqvY3ZYJohnKQr4Ap86XTs14 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 DQoNCk9uIDExLjEyLjIwMjMgMTg6MTUsIERpbWl0cnkgQW5kcmljIHdyb3RlOg0KPiBPbiAx MSBEZWMgMjAyMywgYXQgMTY6MDMsIEtyaXN0b2YgUHJvdm9zdCA8a3BARnJlZUJTRC5vcmc+ IHdyb3RlOg0KPj4gT24gOCBEZWMgMjAyMywgYXQgMTg6MzksIERpbWl0cnkgQW5kcmljIHdy b3RlOg0KPj4NCj4+ICAgICBUaGUgYnJhbmNoIG1haW4gaGFzIGJlZW4gdXBkYXRlZCBieSBk aW06DQo+Pg0KPj4gICAgIFVSTDogaHR0cHM6Ly9jZ2l0LkZyZWVCU0Qub3JnL3NyYy9jb21t aXQvP2lkPTVjMTZlNzFkMzBjMzg4ZGQ0M2IyMTdkZTEwYTNjY2I0YjAyMTlkMGQgPGh0dHBz Oi8vY2dpdC5mcmVlYnNkLm9yZy9zcmMvY29tbWl0Lz9pZD01YzE2ZTcxZDMwYzM4OGRkNDNi MjE3ZGUxMGEzY2NiNGIwMjE5ZDBkPg0KPj4NCj4+ICAgICBjb21taXQgNWMxNmU3MWQzMGMz ODhkZDQzYjIxN2RlMTBhM2NjYjRiMDIxOWQwZA0KPj4gICAgIE1lcmdlOiBiMTIxY2IwMDk1 YzggNzAzMDI5ZGJiYTc4DQo+PiAgICAgQXV0aG9yOiBEaW1pdHJ5IEFuZHJpYyA8ZGltQEZy ZWVCU0Qub3JnPg0KPj4gICAgIEF1dGhvckRhdGU6IDIwMjMtMTEtMzAgMjA6MDY6NTIgKzAw MDANCj4+ICAgICBDb21taXQ6IERpbWl0cnkgQW5kcmljIDxkaW1ARnJlZUJTRC5vcmc+DQo+ PiAgICAgQ29tbWl0RGF0ZTogMjAyMy0xMi0wOCAxNzozNTo1OSArMDAwMA0KPj4NCj4+ICAg ICBNZXJnZSBsbHZtLXByb2plY3QgcmVsZWFzZS8xNy54IGxsdm1vcmctMTcuMC42LTAtZzYw MDk3MDhiNDM2Nw0KPj4NCj4+ICAgICBUaGlzIHVwZGF0ZXMgbGx2bSwgY2xhbmcsIGNvbXBp bGVyLXJ0LCBsaWJjKyssIGxpYnVud2luZCwgbGxkLCBsbGRiIGFuZA0KPj4gICAgIG9wZW5t cCB0byBsbHZtb3JnLTE3LjAuNi0wLWc2MDA5NzA4YjQzNjcuDQo+Pg0KPj4gICAgIFBSOiAy NzM3NTMNCj4+ICAgICBNRkMgYWZ0ZXI6IDEgbW9udGgNCj4+DQo+Pg0KPj4gVGhlcmUgYXBw ZWFycyB0byBiZSBzb21lIGZhbGxvdXQgaW4gc29tZSBwb3J0cy4NCj4NCltza2lwXQ0KPiBJ IGZpeGVkIGRvemVucyBvZiBwb3J0cyBmb3IgdGhpcyBpbiBodHRwczovL2J1Z3MuZnJlZWJz ZC5vcmcvMjczNzUzIDxodHRwczovL2J1Z3MuZnJlZWJzZC5vcmcvMjczNzUzPiwgYnV0IEkg aGF2ZW4ndCBnb25lIG92ZXIgYWxsIG9mIHRoZW0sIHNpbmNlIEkgaGF2ZSBsaW1pdGVkIHJl c291cmNlcy4NCj4gDQo+IFRoYXQgc2FpZCwgdGhlcmUgYXJlIGdlbmVyYWxseSB0d28gd2F5 cyB0byBmaXggdGhpczogZWl0aGVyIGFkZCAtV2wsLS11bmRlZmluZWQtdmVyc2lvbiB0byB0 aGUgbGlua2VyIGZsYWdzLCBvciBhY3R1YWxseSByZW1vdmUgdGhlIHVuZGVmaW5lZCBzeW1i b2xzIGZyb20gdGhlIGxpbmtlciB2ZXJzaW9uIHNjcmlwdHMuDQo+IA0KDQpCVFcsIGxhbmcv Z2NjMTMgZmFpbHMgdG8gYnVpbGQgb24gMTUvYWFyY2g2NCBhZnRlciB0aGlzIGltcG9ydCB3 aXRoIGxvdHMgb2YNCg0KL3Vzci9pbmNsdWRlL2MrKy92MS9sb2NhbGU6MzQzNDozMTogZXJy b3I6IGF0dGVtcHQgdG8gdXNlIGEgcG9pc29uZWQgaWRlbnRpZmllcg0KICAzNDM0IHwgICAg ICAgICBfX2gucmVzZXQoKGNoYXJfdHlwZSopbWFsbG9jKF9fZXhuICogc2l6ZW9mKGNoYXJf dHlwZSkpKTsNCiAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF4NCg0K DQpGdWxsIGxvZzogaHR0cHM6Ly9wZW9wbGUuZnJlZWJzZC5vcmcvfmZsdWZmeS8tbG9nLzE1 MGFhcmNoNjQvZ2NjMTMtMTMuMi4wXzEubG9nDQoNCg0KSnVzdCBjdXJpb3VzIGJ1dCBnY2Mx MiBpcyBmaW5lIG5vdw0KDQotLSANClNpbmNlcmVseSwNCkRpbWEgKGZsdWZmeUBGcmVlQlNE Lm9yZywgaHR0cHM6Ly90Lm1lL0ZsdWZmeUJTRCkNCihkZXNrdG9wLCBrZGUsIHgxMSwgb2Zm aWNlLCBwb3J0cy1zZWN0ZWFtKUBGcmVlQlNEIHRlYW0NCg== --------------iqvY3ZYJohnKQr4Ap86XTs14-- --------------VQ5g0I7KPfBim1yvqjVDdAKY Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmV3UKsFAwAAAAAACgkQ+4ugndU5jylT hw/+Ib84n3D+wtK73qPIvN4r+K4AINHz18VJlhdqBEIgjbczOgRO3bMiaHgYG+Tk1TBtj+AkNaUn qnX95whtD+u/7oo0uUVAioRJ+eMW/8/Kl2NCU7XHPFtAR67pf5MOyWjQVj+CY9Nl8oTxHmzCEQUx XCeBpZS8PbrGVk2O4sMLKHyRLTeKfpf3wP7wbh/2VH1cKKj1FWEbVHglOrPdVkOIbuCIeZxF/Fg0 /vE3UxKYFWevRxZEODmi8I4lxJpVBHpc37Z0kHR2/ZWsCpN6VTaqU/NA+2VhUP/MBO3WPY1dQ0+V KfVlMdqVoMamhWAz3zxga6Ia50fxMxCQOQjwlGs9ow10GiErokaTLpbWKSTyQz2fuV3cqWtAUt0Z jJcSLqDzMM3B7P7KpKwLddnZTaST+MRi+o+IolRD0RkVE9VDhN8ua2iLFP+uLvpSIRqFRGG0ikHp 1ZZxnJTqH2kWwoP99TbbiVLwvXLWu0Jr4xdRl0qc+230XTFQL4eQCApvd9AfjklbL65KBKkI/g6T Mi7duw/oY6BIxWkslajJalToPlzq3AEffGAhDNsCDGZSXFu9yPqgPWSxlgIQFqlA73hCbFPdGsqZ kutI8+ldTvLyCbIAllJaCvx+KvymrfZlOgvdbKcdG/rDZtjA3NMRyxcmW1B6BKdRmopK8pMt06Ep W7E= =rNuc -----END PGP SIGNATURE----- --------------VQ5g0I7KPfBim1yvqjVDdAKY-- From nobody Mon Dec 11 18:21:58 2023 X-Original-To: dev-commits-src-all@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 4SpqpG6RCjz53w6l; Mon, 11 Dec 2023 18:21: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 4SpqpG603Xz4Whl; Mon, 11 Dec 2023 18:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702318918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfmEFtDI3dlfU22gQ82krJ0V0WC1/I3q0y4h89GklDk=; b=QJY3hu7fqjLwvp5U2/SePJf3rQ8Gn9LuJCp9uUeEW18UGSnGBOFsvfBGGRXDGAoBk3JBzf /+vhvT5hRN49GC/DC5YziVNHG6xC28jez5y3zSyouV4agwbIYhLmd84Tu1jv8IsXrdi4OA /8jdtEk+KmMfNumO3xsgyMIHznI0lBppCmWhPbfv8sgnQhWLe8hQ8hLNDDkZogV8p681vy UIp6w8L1Xguc+w9cgY15kRLNASYCjQNy7l6r7I1yvLV+YljqqWBcUGa/djRccMhGIjhtVX eK4zDKcVtEw8BoHQQ2fhMH77jlEBevxMwes1ko/tMbGBRt0F1dHi86rTzFRaMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702318918; a=rsa-sha256; cv=none; b=C+Dn3PzOmh0TIpFvcZyKHOuocDNF9reVtRwT8qHf57oSfuyjeSPGf2Kjaw55g9FVWzoin9 2N+fDR8Idir9Fj2dDFPTRD4mtUTxL8urtgyLqxBmBkUv6VUL9Imij0YG6H2g0FNJ4/fBLq a8OXqz4l6Ajbt4joI5wS5N1950RcDGKhLhVW2qKp1/hJrQPEsWB+5odgShoN6RyXZdukw1 X8205EPPav7tBrgAi+JYzo7aQrepaMw8TmnOVuzoCENAf2A9K1V1xricxzXiyGjuEjZFlU bxHbcvsgKo8RewAHv5ZLZ8PgzjUnfhTpEyoIbTOmFY9rK9/ZTsBYWRL17TAFbw== 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=1702318918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfmEFtDI3dlfU22gQ82krJ0V0WC1/I3q0y4h89GklDk=; b=SjPI+owh6dtap7XwOhG3yP0s97MAQBWxxST4NXjwRH6+j94BKJWFUIYDPxBpufkJXwvdCH MkKi/8HS3HXTQjb+OpTVTpcNwnarFUus7jcpH8WXH+o2Vd6ormGufQ/vvXNQ4wKQ0/WXj/ 9mF5VbrCVdjKThN0Mqtct5H1XWOMCxFYVL1kwIp7MuSB/akGNe6O/r4QnLM/tMKM42en/t nbBh8UY6KR68YMPVSFUyHtFofdePNAXMwaKEIBoqXhQWedpstVqMd+3uzL4he5J3vaxh3r AeuvJzM1+bO1N9INmYF7xGQTA5h43UoZg1JlciI/H5Ihe/LCOhsBjVKwGxJXUg== 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 4SpqpG53wPzj5R; Mon, 11 Dec 2023 18:21: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 3BBILw85087719; Mon, 11 Dec 2023 18:21:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBILwSh087716; Mon, 11 Dec 2023 18:21:58 GMT (envelope-from git) Date: Mon, 11 Dec 2023 18:21:58 GMT Message-Id: <202312111821.3BBILwSh087716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 7df526eb10c9 - main - look(1): Correct the example's description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7df526eb10c9095e4988e77900f60ba00c42b095 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=7df526eb10c9095e4988e77900f60ba00c42b095 commit 7df526eb10c9095e4988e77900f60ba00c42b095 Author: Raghu Ranganathan AuthorDate: 2023-11-30 12:57:35 +0000 Commit: Li-Wen Hsu CommitDate: 2023-12-11 18:19:21 +0000 look(1): Correct the example's description Remove an extra 'e' in the example command. It is a prefix, not a typo. This is from the Advanced UNIX Programming Course (Fall’23) at NTHU. MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/913 --- usr.bin/look/look.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/look/look.1 b/usr.bin/look/look.1 index ff868d129a84..7d0b74b43486 100644 --- a/usr.bin/look/look.1 +++ b/usr.bin/look/look.1 @@ -95,7 +95,7 @@ utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred. .Sh EXAMPLES Look for lines starting with -.Ql xylene +.Ql xylen in the file .Pa /usr/share/dict/words : .Bd -literal -offset indent From nobody Mon Dec 11 18:26:47 2023 X-Original-To: dev-commits-src-all@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 4SpqwC2TDYz53wR5; Mon, 11 Dec 2023 18:27:07 +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 4SpqwC1zmGz4XSX; Mon, 11 Dec 2023 18:27:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702319227; 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=2i+D81Lk3N9lkHkAVtWafQ4gFgXELLm3duKNpr2GLEQ=; b=QwgTcp3c79K3n8/zdMrmfuojdSDSpjInyinCt85k4L4k9R0D/GNPTE2oaqzIhCl1FfFV+P /kPN0vvoSKIgqKwIktjVMGBEV5ezyKwDjVjsYIrHZ4KrJUCgJjD6u1jvfzqOKkwZM99Yh1 D9NP2CT8BUrMLNe6LB45AcLWtvn8zDklxhN2JpyOnwJxu1Vb5Mt+QnnP5xvmYEBVAVequ2 Jq3aMEPFFRPfEhURE0OrUVDfSnGt8/KM35HEYYA27TOxRwRkp/w+MBFzMGtjjBP6lSKpZQ LfqqamSw6bPYwpdHe0eDK60xTHg/9YL/+pLVjK1d4I7ZnmWCep9bs3GMJTKhvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702319227; a=rsa-sha256; cv=none; b=bDVqWnVXJytbs1zASesFunU45As/DzJKmM4ZSpxdEG/vxezx9ogVOizUS7PttS9EshBL8G za8rNiFgYsuKjnphgpH8BxsISEH7fQdeqGtrRJJj2/qYR6J298satPSWh3zSVbaV0XilFD ezBhjb9Ff/BvTj1d2cXmSFNLXwSkLlAu28r4+jEXRPkm2r8enUfD/q8S05b4Q4UZxot8Al xW8DawUqF/PgPiYvzMIZ/fdWtsL39prrFOyuR6zPG3r+Whz9DjRWYTAVTyji8leBR1K5Yj xRQESMzkMzB26plg5DB97Yi1dj0GmYDDVn8M2fH9736/Ubb1hGunPF7y9EnmEQ== 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=1702319227; 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=2i+D81Lk3N9lkHkAVtWafQ4gFgXELLm3duKNpr2GLEQ=; b=tPEOPN4L6LrJAPvT3qpU+jk11sco9pKwiqopSZxFmtOnHE6285yK5dm0/cjJS8Qxjsj9Wi OZm56RGMX19UYE+HhoK1CcqLGRgV4dz5MNQRLtV3IPm0va75OS5e4sod16PVLPRXbJfcoN HvEepKALNDbI6I0/F88hsDXv4kftOWgeZ/zbQYbpRSd9kq00xs9fJv4YR25ZwreP1LlIN0 ac6xfI67UYedFQhUmn8GYSHORJ2nWyMnjjTR4VV5KOk1jB7TFD+fq22KMnMSkJwLAC4Bmy yPsRNBmh/OMO8rLyk03dpkcVKrU+SJYaVq1eWgYkYapCgeNrhBYE6+C3wTAkFw== 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 4SpqwC0Kkvz1dMK; Mon, 11 Dec 2023 18:27:07 +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 B08FC34FD1; Mon, 11 Dec 2023 19:27:05 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_82D86BE6-86AA-4791-B21D-82FA2BAEB562"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 From: Dimitry Andric In-Reply-To: <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> Date: Mon, 11 Dec 2023 19:26:47 +0100 Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> To: Dima Panov X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_82D86BE6-86AA-4791-B21D-82FA2BAEB562 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 11 Dec 2023, at 19:10, Dima Panov wrote: >=20 > On 11.12.2023 18:15, Dimitry Andric wrote: >> On 11 Dec 2023, at 16:03, Kristof Provost wrote: >>> On 8 Dec 2023, at 18:39, Dimitry Andric wrote: >>>=20 >>> The branch main has been updated by dim: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5c16e71d30c388dd43b217de10a3ccb4= b0219d0d = >>>=20 >>> commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d >>> Merge: b121cb0095c8 703029dbba78 >>> Author: Dimitry Andric >>> AuthorDate: 2023-11-30 20:06:52 +0000 >>> Commit: Dimitry Andric >>> CommitDate: 2023-12-08 17:35:59 +0000 >>>=20 >>> Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 >>>=20 >>> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, = lldb and >>> openmp to llvmorg-17.0.6-0-g6009708b4367. >>>=20 >>> PR: 273753 >>> MFC after: 1 month >>>=20 >>>=20 >>> There appears to be some fallout in some ports. >>=20 > [skip] >> I fixed dozens of ports for this in https://bugs.freebsd.org/273753 = , but I haven't gone over all of them, = since I have limited resources. >> That said, there are generally two ways to fix this: either add = -Wl,--undefined-version to the linker flags, or actually remove the = undefined symbols from the linker version scripts. >=20 > BTW, lang/gcc13 fails to build on 15/aarch64 after this import with = lots of >=20 > /usr/include/c++/v1/locale:3434:31: error: attempt to use a poisoned = identifier > 3434 | __h.reset((char_type*)malloc(__exn * = sizeof(char_type))); > | ^ >=20 >=20 > Full log: = https://people.freebsd.org/~fluffy/-log/150aarch64/gcc13-13.2.0_1.log >=20 >=20 > Just curious but gcc12 is fine now I have seen this error too, but could only reproduce it outside of = poudriere, so I didn't take it too seriously. It is easy to fix; I have = a patch, shall I commit it? :) -Dimitry --Apple-Mail=_82D86BE6-86AA-4791-B21D-82FA2BAEB562 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZXdUaAAKCRCwXqMKLiCW ozQmAKCGhMB+/s1rQRp+aaVpJeB+KeYltwCbB67VHzOsUF5N/2DkdQVdL65knCQ= =CiAA -----END PGP SIGNATURE----- --Apple-Mail=_82D86BE6-86AA-4791-B21D-82FA2BAEB562-- From nobody Mon Dec 11 19:27:32 2023 X-Original-To: dev-commits-src-all@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 4SpsFw3Dxxz540Ln; Mon, 11 Dec 2023 19:27: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 4SpsFw2dwVz4djF; Mon, 11 Dec 2023 19:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702322852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CzgUtuqeVm542QXKbkVCw8+PcBpCNNOm0f5g3YOZ9iM=; b=rVo1Gw7eGRKbb3J9AkI3iIgBc+DyitbGAvzWuYsV3LDZ5txiKdTXmd1pwD1SK/Pzej/3vp MaWt8YuoYBSLoRerUtusoEd4FjARMJwOqPs6VrqBr3pxeleE+Di2En7Qdy2yEfn2jKIpUf FDejf0xYYhlwk6scdsfeJRWMRLTzFoUu1sHN4nfjknfv4lFdJBbm2uavg8S8W99xPReNXC O8rgjQJ1lsFwCbBk8uBbk1T/iphC/h8pAeZb+dh4riWLWoLJXDNDOEa78Tjwuowhab5YnL oQ2ttWDUtQxYmyMG8wRXpM0sj3U9TcjhRkBYsnFUiYYDfxuAAkt3srar15NC4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702322852; a=rsa-sha256; cv=none; b=WiaHcX9Kw9+6p+6VwZayq/27Jt6V2dOhBoalnsazyTii5f0sLA146LrWZPGhXiqkpvwjxp gFa5pnH5m+fnL+Hret3VLfnFKT4I5z5JHKKxvF9Uqw0V1nAFTrQ0zG37SzePaCy0sndIct rlnFHv2tUx+ZRgrSnfR6o0f/88afjIJUD/ZeYSb8Hm1KwrXhi/bTcnPYTcasBUdLKtMdrH jbDEzpwZlp1tuYhztMfQDgiaqWzdo7pAfubhCYoP4mggidYcAMuN4TPQMhFxJznNlL5aWh GvdzUBCGjIC3oFfH6LDFa5GccPAe6xaARxMmF9BV2zXFcKmvU9ldXpWJYvjRkQ== 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=1702322852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CzgUtuqeVm542QXKbkVCw8+PcBpCNNOm0f5g3YOZ9iM=; b=bX3Ny7R8u3VRqgnPh2Gdu7cf8YcbtiMMGzwHdquTjbIEzhaaqTPG7y/qQ9kOveBLU4Kv4b PzK5pxVETS1HKNpIdn5CwuCdeSasqPrXT02p+SKdtULXn8eofS84Qz3+H7ydyu3oJtot1l r97cd19tBJ6jynb+laBxv/R23T+Roa2/zeY1WjdVLlKoWftRBHqO1q6d5m36t/VUVt3k65 Ih62ale5xkJ/6z1B3b27836tj2Sy/qqp+xkVqiPqS+PRqJa1C7tYLGlVQj7/3a+Zrn+2Qz kEC8m21pJbLOKl6IV+qJe6GzsXFLSLcTuF3DuylHqlM7k8vJoU7yUA91xr7WQA== 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 4SpsFw1ftDzkHx; Mon, 11 Dec 2023 19:27: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 3BBJRW3V091355; Mon, 11 Dec 2023 19:27:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBJRWon091352; Mon, 11 Dec 2023 19:27:32 GMT (envelope-from git) Date: Mon, 11 Dec 2023 19:27:32 GMT Message-Id: <202312111927.3BBJRWon091352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8ccd0b876e67 - main - libc: expose execvpe for Linux compat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ccd0b876e67fda6249f294ff484798cc1e1569f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8ccd0b876e67fda6249f294ff484798cc1e1569f commit 8ccd0b876e67fda6249f294ff484798cc1e1569f Author: Brooks Davis AuthorDate: 2023-12-11 19:24:53 +0000 Commit: Brooks Davis CommitDate: 2023-12-11 19:24:53 +0000 libc: expose execvpe for Linux compat We already implemented execvpe internally with an _ prefix in libc so go ahead and expose it for compatibility with Linux. This reverts c605eea952146348e5e1ad5cab6c127d7a1bd164. Bump __FreeBSD_version for the addition and add definitions to supress compat shims in libzfs (zfs changes were merged from upstream). PR: 275370 (request and exp-run (thanks antoine!)) Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42846 --- cddl/lib/libzfs/Makefile | 1 + cddl/usr.sbin/zfsd/Makefile.common | 2 +- include/unistd.h | 1 + lib/libc/gen/Symbol.map | 4 ++++ lib/libc/gen/exec.3 | 24 ++++++++++++++++++++---- lib/libc/gen/exec.c | 4 ++-- lib/libc/gen/posix_spawn.c | 4 ++-- lib/libc/include/libc_private.h | 3 --- sys/sys/param.h | 2 +- 9 files changed, 32 insertions(+), 13 deletions(-) diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index ee57c30cc6ca..c05fe0c1c12b 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -99,6 +99,7 @@ CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -DHAVE_EXECVPE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h CFLAGS+= -DSYSCONFDIR=\"/etc\" CFLAGS+= -DPKGDATADIR=\"/usr/share/zfs\" diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common index 1755031fee72..c1ed4bba9289 100644 --- a/cddl/usr.sbin/zfsd/Makefile.common +++ b/cddl/usr.sbin/zfsd/Makefile.common @@ -22,8 +22,8 @@ CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -I${SRCTOP}/cddl/usr.sbin -# use issetugid(2) CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -DHAVE_EXECVPE LIBADD+= devdctl zfs util geom bsdxml sbuf nvpair avl uutil zutil diff --git a/include/unistd.h b/include/unistd.h index e3e5675b3da0..8a01d563fe99 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -501,6 +501,7 @@ int eaccess(const char *, int); void endusershell(void); int exect(const char *, char * const *, char * const *); int execvP(const char *, const char *, char * const *); +int execvpe(const char *, char * const *, char * const *); int feature_present(const char *); char *fflagstostr(u_long); int getdomainname(char *, int); diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index b68d63b279f3..51c7348c5cc4 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -457,6 +457,10 @@ FBSD_1.7 { __cpuset_free; }; +FBSD_1.8 { + execvpe; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3 index 539a4b2ba42d..8f866e5ab321 100644 --- a/lib/libc/gen/exec.3 +++ b/lib/libc/gen/exec.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 22, 2020 +.Dd December 11, 2023 .Dt EXEC 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Nm exect , .Nm execv , .Nm execvp , +.Nm execvpe , .Nm execvP .Nd execute a file .Sh LIBRARY @@ -56,6 +57,8 @@ .Ft int .Fn execvp "const char *file" "char *const argv[]" .Ft int +.Fn execvpe "const char *file" "char *const argv[]" "char *const envp[]" +.Ft int .Fn execvP "const char *file" "const char *search_path" "char *const argv[]" .Sh DESCRIPTION The @@ -97,6 +100,7 @@ The .Fn exect , .Fn execv , .Fn execvp , +.Fn execvpe , and .Fn execvP functions provide an array of pointers to null-terminated strings that @@ -110,9 +114,10 @@ be terminated by a pointer. .Pp The -.Fn execle +.Fn execle , +.Fn exect , and -.Fn exect +.Fn execvpe functions also specify the environment of the executed process by following the .Dv NULL @@ -134,6 +139,7 @@ Some of these functions have special semantics. The functions .Fn execlp , .Fn execvp , +.Fn execvpe , and .Fn execvP will duplicate the actions of the shell in searching for an executable file @@ -144,6 +150,7 @@ For .Fn execlp and .Fn execvp , +.Fn execvpe , search path is the path specified in the environment by .Dq Ev PATH variable. @@ -269,7 +276,8 @@ The .Fn execl , .Fn execle , .Fn execlp , -.Fn execvp +.Fn execvp , +.Fn execvpe , and .Fn execvP functions @@ -307,6 +315,9 @@ and functions conform to .St -p1003.1-88 . +The +.Fn execvpe +function is a GNU extension. .Sh HISTORY The .Fn exec @@ -330,6 +341,10 @@ The .Fn execvP function first appeared in .Fx 5.2 . +The +.Fn execvpe +function first appeared in +.Fx 15.0 . .Sh BUGS The type of the .Fa argv @@ -340,6 +355,7 @@ parameters to .Fn exect , .Fn execv , .Fn execvp , +.Fn execvpe , and .Fn execvP is a historical accident and no sane implementation should modify the provided diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index d2181c6e2b91..d9285733e965 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -136,7 +136,7 @@ execv(const char *name, char * const *argv) int execvp(const char *name, char * const *argv) { - return (_execvpe(name, argv, environ)); + return (execvpe(name, argv, environ)); } static int @@ -288,7 +288,7 @@ execvP(const char *name, const char *path, char * const argv[]) } int -_execvpe(const char *name, char * const argv[], char * const envp[]) +execvpe(const char *name, char * const argv[], char * const envp[]) { const char *path; diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index b1bb49d63ffd..a067d1f68ea5 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -226,7 +226,7 @@ struct posix_spawn_args { #if defined(__i386__) || defined(__amd64__) /* * Below we'll assume that _RFORK_THREAD_STACK_SIZE is appropriately aligned for - * the posix_spawn() case where we do not end up calling _execvpe and won't ever + * the posix_spawn() case where we do not end up calling execvpe and won't ever * try to allocate space on the stack for argv[]. */ #define _RFORK_THREAD_STACK_SIZE 4096 @@ -253,7 +253,7 @@ _posix_spawn_thr(void *data) } envp = psa->envp != NULL ? psa->envp : environ; if (psa->use_env_path) - _execvpe(psa->path, psa->argv, envp); + execvpe(psa->path, psa->argv, envp); else _execve(psa->path, psa->argv, envp); psa->error = errno; diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index a9ad2ef21b0b..bfeada696538 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -422,9 +422,6 @@ int __sys_futimens(int fd, const struct timespec *times) __hidden; int __sys_utimensat(int fd, const char *path, const struct timespec *times, int flag) __hidden; -/* execve() with PATH processing to implement posix_spawnp() */ -int _execvpe(const char *, char * const *, char * const *); - int _elf_aux_info(int aux, void *buf, int buflen); struct dl_phdr_info; int __elf_phdr_match_addr(struct dl_phdr_info *, void *); diff --git a/sys/sys/param.h b/sys/sys/param.h index c79c46ab4342..20f0af949110 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500006 +#define __FreeBSD_version 1500007 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Mon Dec 11 21:02:53 2023 X-Original-To: dev-commits-src-all@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 4SpvMx71NZz545Bb; Mon, 11 Dec 2023 21:02: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 4SpvMx6CsDz4p5l; Mon, 11 Dec 2023 21:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702328573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aaF3hxDsvbLmTBev2TLRlIXHQuAVx+TIvz9WFUKxGRc=; b=HP8JoKFk46z8CtpYEqRwNAf7NhbmA0Xcrdmiyh2HrizwBL124IX8YUzKJM4ufC3dWgkJXT vTZD8xXdwdiZgTCroTFF7FS9ZNMJFVxarGC/+icLnuMR3zp1OhXEphQ11u+8/4qLzhfcgh Q0TEQHPTYLZCFwrUqvoRG/2o9/GqLOWMaYkoDRGH9SEhTOZgf0UCdn0UN029eh7MahQ24W +HYK5/9p7y4ADeXaLUI9Da0fe3UpWfowlPw31OrR2G9h6lWI3gcqoz2P6F35LIxqaDN4K0 MS2E6B/mbm3JslVg1YSbjt6S/sBOPPfs6pvY+WlfdWQleyROvCtqm8bSgx5nww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702328573; a=rsa-sha256; cv=none; b=wuvq+xOE4hpVMdVZIg9POkrk3aieNxAu/kkDpwjrBz5WWbUxpVpmFpYZ3lheTD/D3Jibzi /CXnD+W/kFVkRzYOLtdxFs6kZZOIJS8kPKH80tBdYf9cFm76dsvYaykuNHBZx3pccIX7nB aS6TJS1FzEf/MY40hFT52UzVqeW6YbbsT0Jm+slkwQSmOya9bAVB5Z0+7zhI+Abk59ZmDI TG9AhZMkz3858sWnwj/RQmvyZDrBpB9KvncJE2NO7fKsX9qCmZMCRdQUWX6hOh0m7x8hC8 iiUtjoMd9ZI7gjz18Y8VX22WltGsYcIxfkdpSKdMw4IwtF0qEDL9ds92z4pAyg== 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=1702328573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aaF3hxDsvbLmTBev2TLRlIXHQuAVx+TIvz9WFUKxGRc=; b=VJA3ItTOOFfa2BFrmHuks0/jJ7rPBpAlV+7/lLMupQireQJjgQc6OWD703ZaKnJ0M9jDAB Qq771rPZws3r6ewJn2ZF4HAd1CMBCfpAsYwlGhCxQQV58JE7487GgjQgkTW4ouBIdx3jTA 5D+GH5JsfzWzB87N5jiJPpIOfjkdD2BmPFr+bu5AnpAl+h30EvrYQGoZiEEXulWs9rutG+ UIg+1ai3OwxFkUjU5ioRyX3kO0mxcrgp7JHkKgoQ4UkuDUamvUFwsLUuWpfnAxB9rQiSTF 1YnfDPA1Jx97ZDtUR9e0g2G9HVzQPzooA/nNKTlDq0ch1rpX7NXpX//BTU05Mg== 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 4SpvMx5KyZzmnL; Mon, 11 Dec 2023 21:02: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 3BBL2r6G057796; Mon, 11 Dec 2023 21:02:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBL2rdU057793; Mon, 11 Dec 2023 21:02:53 GMT (envelope-from git) Date: Mon, 11 Dec 2023 21:02:53 GMT Message-Id: <202312112102.3BBL2rdU057793@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: e249f5daa41f - main - pf: fix memory leak on rule add parse failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e249f5daa41f73eb293490ed93d06d1fefa08d82 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e249f5daa41f73eb293490ed93d06d1fefa08d82 commit e249f5daa41f73eb293490ed93d06d1fefa08d82 Author: Kristof Provost AuthorDate: 2023-12-11 19:43:20 +0000 Commit: Kristof Provost CommitDate: 2023-12-11 19:53:00 +0000 pf: fix memory leak on rule add parse failure Reported by: Igor Ostapenko Reviewed by: Igor Ostapenko Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_nl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 86cc5ba9cc91..67a7392ae448 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -625,8 +625,10 @@ pf_handle_addrule(struct nlmsghdr *hdr, struct nl_pstate *npt) attrs.rule = pf_krule_alloc(); error = nl_parse_nlmsg(hdr, &addrule_parser, npt, &attrs); - if (error != 0) + if (error != 0) { + pf_free_rule(attrs.rule); return (error); + } error = pf_ioctl_addrule(attrs.rule, attrs.ticket, attrs.pool_ticket, attrs.anchor, attrs.anchor_call, nlp_get_cred(npt->nlp)->cr_uid, From nobody Mon Dec 11 22:16:04 2023 X-Original-To: dev-commits-src-all@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 4Spx0N3vqhz549R4; Mon, 11 Dec 2023 22:16: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 4Spx0N3PmLz4v4X; Mon, 11 Dec 2023 22:16:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702332964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NUa435suj2XUrTiEQrKZN6uhRE8yP6vrIYD299xaQsg=; b=AmuG5EvT0fYq7q1YqcEPbgB1MnYZcdPGU1owDrNoEN4lLm4EuTSeq1qb4VEykVCo+uiQ5q ZQOq799jhvSM/wSwgTTW06STLY19qlAOf0+3fBNE9xy6AF784AW2jDZTxQ8/3Bh+bRQjV2 DUZ3Enzlu/AgCm4r8OWTcy8SNpTStHNAgpROQp9wJ/SvMRIs6z9CGqVQBvSkx4hSjoz0NZ emsxBCB403DiOKpcXmAQmlj8sAacIAqR7lHeH5KeptIJZ7wArNSXXprlkZGYM4S9VOOX+P jzh9JXpZnk1N5Ns73r8TvXjilxNFVjwjevvxV16PhrHBiKkwRhaVX5g5wwa8tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702332964; a=rsa-sha256; cv=none; b=mXX0e0tNnaFdl580xS8KWEbYIC8tyUIFcNDAeyRLhkdUxoiI8nUC03B6iU2yzoA2/exzW1 EQYDJ04MeVpmTeKYFpSW3ZwXcW1Ck5KDpjwooqibYzknUuWIc53Hck0cFghVzC3UOTpMFV qaZy14FMOP2MSDg0tECu2RzRlSoe6U2YysVBCvasHtNpOItcQwHKEnVgVY1imf7x2GQaYk sC1nPXMbGIBR176Lw1r3GsHXrcvgeFF9As60nJssWmUrkG5ZlQuxE7UMWM/xOddLXDOePs wMS/1KjX8vA7tjnV+aRxzQLgipDg26LUFpdqTgXMXB1IGKP0u2O8tmZYAhByJA== 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=1702332964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NUa435suj2XUrTiEQrKZN6uhRE8yP6vrIYD299xaQsg=; b=eXMJ2BiBn42u6RuBq8UN27yI54WUoob46BmYjtws+27jq6vKJZ7tG2VHkdkdI1FYlAjseS O8bVS+yJN/wviXykb4AogANuBBo12HZQjg+Genn5wuvEa76moHdDXuhem6sX+Cov+uOoWd N4LBv6e5z+HwelHpJdw3l7wKf57e15diRnrNVHrs0jH79irMhBm/GGPfZd/mSYg/RnieMi upX1UES1tJZni/D45hJywM1g7HVSp+AZ+2OEpROB+OpSwqtr3oDLfGnAdZgqrHO3uzv3OH 0e+o1EvgNjM6yz4OKJQVs5tRcucNaclD+5WICqVWDviETvKBgAX3eIFGVRj+NQ== 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 4Spx0N2RxKzpW2; Mon, 11 Dec 2023 22:16: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 3BBMG4N2076215; Mon, 11 Dec 2023 22:16:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBMG440076212; Mon, 11 Dec 2023 22:16:04 GMT (envelope-from git) Date: Mon, 11 Dec 2023 22:16:04 GMT Message-Id: <202312112216.3BBMG440076212@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: d5c6b32a31ac - main - socket.9: Catch up with commit cfb1e92912b4c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d5c6b32a31ac36faea7091d55c8b8c2ee38a7d79 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d5c6b32a31ac36faea7091d55c8b8c2ee38a7d79 commit d5c6b32a31ac36faea7091d55c8b8c2ee38a7d79 Author: Mark Johnston AuthorDate: 2023-12-11 22:13:21 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 22:15:54 +0000 socket.9: Catch up with commit cfb1e92912b4c Fixes: cfb1e92912b4 ("sockets: don't malloc/free sockaddr memory on accept(2)") Reported by: Mina Galić --- share/man/man9/socket.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/socket.9 b/share/man/man9/socket.9 index 7eb55fd205e0..fb0ead0e20e1 100644 --- a/share/man/man9/socket.9 +++ b/share/man/man9/socket.9 @@ -36,7 +36,7 @@ .Ft void .Fn soabort "struct socket *so" .Ft int -.Fn soaccept "struct socket *so" "struct sockaddr **nam" +.Fn soaccept "struct socket *so" "struct sockaddr *nam" .Ft int .Fn socheckuid "struct socket *so" "uid_t uid" .Ft int From nobody Tue Dec 12 00:30:13 2023 X-Original-To: dev-commits-src-all@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 4SpzzB0xn5z54JFW; Tue, 12 Dec 2023 00:30: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 4SpzzB0LyFz3Nq9; Tue, 12 Dec 2023 00:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702341014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WLX4RZKMep36kOcfKsBenCgzPd/jq+/MwjK2He3kT1c=; b=PK6EjAky7qM3Wx3zP3lC99QX5hx3turLzLzqF0ytp/JHPgyGEB5qDDZhFtz7BI1dwoNjbF 0R0I2Do311yquQ+KVKtwhe3toU36Pn2ZzxsObYD/QpPS2tq+lrfJ6vDgNRVgGVqQvcYqh+ mfkhkNfUkV+RETqoJE8is1WXHoHu+r5CrX/zyJb3cnY6hC6XA2/YnXmwRZf5mfv7KkiepE vf7/s4BlCYb+yJqH33cSGzfZ5Lz1LrSiizSDKUW+yXche8behEBl3vPuYEB36OorDqOKFh UKbWAC+C9epIwxPKB40znUOs4ogwIhC/6Y01ctvZdpMtdYfboL8r3HqkRWt1JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702341014; a=rsa-sha256; cv=none; b=M6Nw4mHrp+FhtgAA1bQrNkYtOwYTAgKxntmvgjtzaQDH5fVfINdjYG2oN4v0jhYS2Wy09E wbR2OhAz5L5Y0IsB1PnjV9Ek6q+ewBOGZ15y4J1E3oLlgalMzcqj29loL29YGv7v9vNdQz y+VxBSU+Z5Q3rFjTqgJD6w+V4C/g66APlOCW7P4J4P/URut5u9drjHl6UHThooqeRjphBr YFnyWISFo03NibrgZ5N3PD62QzlZxgmZ9/ZSuSmVNjmnXJIvNUF98B6NyJFjby54WpwJYN ZMoyzKY+T7kI1+KFgTJY7aa7S6Lf+jDxx9NSAV4zQhckDL8+6iKXzlL4y9aCRg== 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=1702341014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WLX4RZKMep36kOcfKsBenCgzPd/jq+/MwjK2He3kT1c=; b=xb0vhljWiTacTvKoLw6BB2GxkaUAu/NBTqXXPFrsqKzpV8LMHcJfwidK904gJgZHa/w1hO fWAaN/LaAVZfGLdyreVEQmS/UjHnldKm4PGtGJ8lLBelyEXVhIY93SUt6XieADf7j1xYnW J+PW0kP7SxyuKJYuqwyFEy5xVyVuDGDYH4UR2yV3L3n3b9mpW60lNDNd4Vrs9xHBId+0x5 +V4eCFlF2eQjhY8Ynm7bAWQEnW4FIY8TcQ8fVNkvEL+Nhp8XA/e4ddC+QfAGuJTtARyLBE nv4sqjJ0GzuyJaFmKL7T+HMtlkl1+g/Gad+2U3DmobC0Qo9tUZV5dlcEgf/yqA== 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 4Spzz96PrszspM; Tue, 12 Dec 2023 00:30: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 3BC0UDTE000295; Tue, 12 Dec 2023 00:30:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC0UDaW000290; Tue, 12 Dec 2023 00:30:13 GMT (envelope-from git) Date: Tue, 12 Dec 2023 00:30:13 GMT Message-Id: <202312120030.3BC0UDaW000290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d264ddb9c7f8 - stable/14 - bhnd: Correct the softc size in the siba_bhndb_driver definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: d264ddb9c7f8739be22170ec660110a0f4c2ec8f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d264ddb9c7f8739be22170ec660110a0f4c2ec8f commit d264ddb9c7f8739be22170ec660110a0f4c2ec8f Author: Mark Johnston AuthorDate: 2023-12-05 18:47:03 +0000 Commit: Mark Johnston CommitDate: 2023-12-12 00:30:05 +0000 bhnd: Correct the softc size in the siba_bhndb_driver definition struct siba_bhndb_softc embeds struct siba_softc and adds an extra field, "quirks". In practice, this bug was harmless since "quirks" is unconditionally initialized during driver attach and would have lived in the redzone of the softc allocation, but KASAN catches the out-of-bounds access. PR: 275515 Reported by: Frank Hilgendorf MFC after: 1 week (cherry picked from commit 4c3aa00c0a0093c78f42d138bb9eef9b1a7cbb39) --- sys/dev/bhnd/siba/siba_bhndb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bhnd/siba/siba_bhndb.c b/sys/dev/bhnd/siba/siba_bhndb.c index b806f9535e73..59243be18938 100644 --- a/sys/dev/bhnd/siba/siba_bhndb.c +++ b/sys/dev/bhnd/siba/siba_bhndb.c @@ -286,7 +286,7 @@ static device_method_t siba_bhndb_methods[] = { }; DEFINE_CLASS_2(bhnd, siba_bhndb_driver, siba_bhndb_methods, - sizeof(struct siba_softc), bhnd_bhndb_driver, siba_driver); + sizeof(struct siba_bhndb_softc), bhnd_bhndb_driver, siba_driver); DRIVER_MODULE(siba_bhndb, bhndb, siba_bhndb_driver, NULL, NULL); From nobody Tue Dec 12 04:02:37 2023 X-Original-To: dev-commits-src-all@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 4Sq4hF6mPNz53K18; Tue, 12 Dec 2023 04:02: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 4Sq4hF64JQz4CwZ; Tue, 12 Dec 2023 04:02:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702353757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekLSbFB7qIpw6KKAjWNw5ohK6FmCLqe/f67NHrWrh7o=; b=dP25VJKwpIoqr4vV37YYgJfzutInzlda+pPLQIDhlfKhPae/kRktnfV83H+xZkxDdjOlOn EQlq4/Fbvz+vcEULFph4ldzxethN+o8h2Puisg/ROcDiDMFbKbt9vlERtsukg+8441Qq/X Grdg5VAFNj25B7VZxi6XlJuTC+kXOLyawVcP5JYP3QoBAHH+0t89p7xoOOmiqyiyC7JwPT K6t+1KRkbkG8Im8cnC38w99FRzm/pCl+UqrhdLA6kuGwHQZln1xb+XIg0Rqe9uCLgm57VP H1AuDm0xkeLHLGmt4eX6VyEBOCgUjgRE0KwOVUY7OsO5HYBEwtzJPvzjQl3m2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702353757; a=rsa-sha256; cv=none; b=P5fFj2218hxREC4FMQ04L9anvN12Iq26TVbd7ckRcP+y1kySu44PBncDSt2GeF3RESFGBn X7g5WlNSt/jCp8L82eU3ihL0OlYI2lceevW7gaIdZqnAb1PKTSL4KRxz4RqFtUDwScVX/H GQoWm+wWjqP2QBvhmdneUr5ybetbnFeVYlRGZWsikzCQ+cEYf2m5ClXgT6en77hzdfoKjm Yj2CDK/bcjErMYJwfpQYEPXtW36CE4njEyhktJFvrOFsSfWEK/fwuE7nO26Uy0k38ADfnb DWWMh2VVMpSfIQOUSvFnyUyjGb4Czx9mC4Ekx3MrXI9HnS61N/jFH1Iysdyikg== 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=1702353757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekLSbFB7qIpw6KKAjWNw5ohK6FmCLqe/f67NHrWrh7o=; b=OVC6ulUVkRyZkWuRycDBOlvLXtU3LjdOTE+qDuRBhwAMShS2nzOIzyqDBlIWiWsRU3Mm65 9w8KcL9TksKjinloeyV63stgR/9AgueIuNLKWhbVjilDje+EvXd5Y2zFmUoms32HdXn0o/ W1VZFz2KQveZW5QtgpEWVl7rEFHj5H/HI49XZnCCO+Hprt2dPNSSi6KDs6jD6KsOTae6sD 2gT7LGZXWgdgzJKjSZbdL4ElqhZT+pfOvsBUz5HUG86VMpbjSTry0QW9Qqq4Z5l+y2Wr1R 9OAfOze9OdHC2DFNVLHTI02rhlTtGF8G/f+D4gFABcrrF/Pgs8MJ4AVjtzmL8Q== 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 4Sq4hF58bWz10Jc; Tue, 12 Dec 2023 04:02: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 3BC42bSf062405; Tue, 12 Dec 2023 04:02:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC42bE0062403; Tue, 12 Dec 2023 04:02:37 GMT (envelope-from git) Date: Tue, 12 Dec 2023 04:02:37 GMT Message-Id: <202312120402.3BC42bE0062403@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: 0365e5fc905b - main - if_tun: check device name List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0365e5fc905b425313a0a2d89f0d8e2566924df2 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0365e5fc905b425313a0a2d89f0d8e2566924df2 commit 0365e5fc905b425313a0a2d89f0d8e2566924df2 Author: Konstantin Belousov AuthorDate: 2023-12-12 00:13:59 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-12 04:02:11 +0000 if_tun: check device name to avoid panic if the name already exists, which is possible with the interface renaming. PR: 266999 Reviewed by: kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43001 --- sys/net/if_tuntap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index fccc666e2a00..4cb219dc92b6 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -820,7 +820,7 @@ tun_create_device(struct tuntap_driver *drv, int unit, struct ucred *cr, make_dev_args_init(&args); if (cr != NULL) - args.mda_flags = MAKEDEV_REF; + args.mda_flags = MAKEDEV_REF | MAKEDEV_CHECKNAME; args.mda_devsw = &drv->cdevsw; args.mda_cr = cr; args.mda_uid = UID_UUCP; From nobody Tue Dec 12 05:14:20 2023 X-Original-To: dev-commits-src-all@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 4Sq6H04h9Dz53PNw; Tue, 12 Dec 2023 05:14: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 4Sq6H048XNz4L96; Tue, 12 Dec 2023 05:14:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=chQz0xv/hQlsaCtZCv+V6YcBrYzQsqiCxgW30fKxGAo=; b=UMVevyAk1p+a68GzeNr7x1bQAOU3K5sejmaF3uv2hRIFD0kJB4YBz731knmwqiriQep8/r 7pYRHle3Snx6XLo8RdJNIjcb/CzAOyoIdZLUMz3Rx7eDK9MpdyVp5PLKsNXYu/x561qkOa x1yFlA9xLyJXmAgZSNuZOpcxjMos2JdfaxOLIKL9PoKcc4ff8UMkOPCKjqeBxwV5WEoKKC jt6lu3KnBaA3+Qr5TlKAAaWGzKuLEB/0lHREGeMW3K/jSGQZFjiLZnpmIo0B2OQ4BVsyf4 IpFuNtHrzJ+nUGhZ4kiCi5nstDEtrt5JHFqHqRuoyr8WsqDDMYfAoKKuhraCvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702358060; a=rsa-sha256; cv=none; b=WAJ+CRp4emkDOwRwC+8F8KB7eDe8SGFLyuswWY5OqqkL1SecfMltkFJxBgz2nhVoZSaDML qyFq6q0Jy6ze1r1uZaMyszYDEaxtlern+QslY/W71HkM7aOXp6Ftjw+lqiY+WlHxZeJPMn kBioszs7tlVFx/e0iM0W35N2oW3KXwS6uCYfANu4TW9l6AyK3B63Tx52fkLdO3UgdDmh7V ewTrBrmrPeSPfRgtIiCi8mz+0huK1hPOYYtM7AAMplw8bnCAnVgRdnXd/UxnWA5gDIKhqA DBBiRfS5zKarcTlQf8WtRimjgEEoWeV5zE59cGLnIywi1+6HhMqFGk+fnQ3IMA== 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=1702358060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=chQz0xv/hQlsaCtZCv+V6YcBrYzQsqiCxgW30fKxGAo=; b=qfqbMWs1fIsMxswZeRaGwBUJZMlXxbRKhVyZlY+COwwW12UwmzUfy2SJZbEJC/J5gKu3um GktimmQUfYKBImdA1rgRI/UNoArlsrtM5PNuHkc2Pz/wiyS7p5o5CjMHCI0rVCcj+utwhX W0aXZCO1enYJm4ChD13kC8QQAICpdImhmPbcBsRTpqjTMx8DDpenCfcDx5VUiP2fW/0eFB aId3HkKijuxtby0TfzfpC4flE6sHboDzvptbuSwamF0nhIWN1KV1pykGg3YwvPUscLpDj8 FQnRv/PB41sDGj5UrjJI33SleGT9knUbR0ZZnUsyxPCE8ItlW0p/IePtPp+1lg== 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 4Sq6H039CYz12F0; Tue, 12 Dec 2023 05:14:20 +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 3BC5EKoW079296; Tue, 12 Dec 2023 05:14:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC5EKLF079293; Tue, 12 Dec 2023 05:14:20 GMT (envelope-from git) Date: Tue, 12 Dec 2023 05:14:20 GMT Message-Id: <202312120514.3BC5EKLF079293@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: 9ab58f9784c5 - main - cam: Virtual SIMs communicate via the network too List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 9ab58f9784c5f2c9d0cd46c7ac107bf35f8c2dff Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9ab58f9784c5f2c9d0cd46c7ac107bf35f8c2dff commit 9ab58f9784c5f2c9d0cd46c7ac107bf35f8c2dff Author: Warner Losh AuthorDate: 2023-12-12 04:50:26 +0000 Commit: Warner Losh CommitDate: 2023-12-12 05:12:13 +0000 cam: Virtual SIMs communicate via the network too A virutal SIM can also be connected via the network for iSCSI or NVM over fabrics. Sponsored by: Netflix --- share/man/man4/scsi.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/scsi.4 b/share/man/man4/scsi.4 index 7cf6dc00cf58..0e349ba60f0d 100644 --- a/share/man/man4/scsi.4 +++ b/share/man/man4/scsi.4 @@ -22,7 +22,7 @@ .\" 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 September 15, 2023 +.Dd December 11, 2023 .Dt CAM 4 .Os .Sh NAME @@ -367,7 +367,7 @@ SIM used to stand for SCSI Interface Module. Now it is just SIM because it understands protocols other than SCSI. There are two types of SIM drivers: virtual and physical. Physical SIMs are typically called host bus adapters (HBA), but not universally. -Virtual SIM drivers are for communicating with virtual machine hosts. +Virtual SIM drivers are for communicating with network or virtual machine hosts. .Sh FILES see other .Nm From nobody Tue Dec 12 05:14:21 2023 X-Original-To: dev-commits-src-all@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 4Sq6H20RxDz53PbV; Tue, 12 Dec 2023 05:14: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 4Sq6H157WVz4L9S; Tue, 12 Dec 2023 05:14:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=guBrzWoxkG8vUHANeWFmmL9B/DWbzo5rwQvxVKjJ4Z0=; b=XGKZBQK6+Wh9Lq9gw97ohkgU2c/qmzTDGPXBzKwJze1wx9knCwqZGjDqLWYik4ljq7WPmn 8j3XYiixj2STJ4o6+lhTxsrtjfTwkL04M95gckRr8bdPPjfV1xuEWJ80B0h23z0LvggN/7 shaleb3/59z5A5bnPrkPexWYmGkpn0HpK/pEdoPciSnxVhVVNcq1eRfWvW9rNHwdwQ5Xws Ph+uBwsuWqKso6lqqDKcutUi/nKx3vRGAK1grZOmqbDeGrb8x+UynwRgliertTQ9XaSuVA xsphdr1GIExYrlJuyqq4I2Xtku5ieXaLz0TTY269vcj0jkLQUcwuWHRt4pi6tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702358061; a=rsa-sha256; cv=none; b=XM7sWdI/mBy+e88K+2PjbGMLoBpQBWt+F9c7lp6fGbu+Qfvj9ikGK+XUU9kkQNVGyAzZ4h PcU+JtbaSvRxXyhHRZkjbPZS9/QbGf2oGn2LeC4E5R8cs0JL6P5j7YSDVroa0bNDvqkZVH 1HIzyPPuzRWB4QLgZ+5DNrZ5c51qCbiRh54iQ5gjOQTPMW5EqvjJKHYcBjgWyrpctiOmNC 1MvNE9gWwHLCWM+B0aP3mAQE+KJG9/8i8nUzxOlsWsnaQlNLfYf/91tl1vdNkiU1i5brGe gljYOY1vLRgWFHM+RkpyEajRLrTSARA2BEpoo5VttNziJof4PriuNu6IhgHZbw== 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=1702358061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=guBrzWoxkG8vUHANeWFmmL9B/DWbzo5rwQvxVKjJ4Z0=; b=H9TB38l3pGl1m6WDuFzooXgVva6BC7yfacHA/py3BfctQnIozZZC5MPNIp84a+oePVZ4CV 7ywvnfcRLQ+lyOSitkYT3Hp4QPc50bNFcWTo2vzYIbxCFqe2zmJo0QqUsHbSGQPHd8a49+ /qPha6vkRx2SCH85TAa/8zp6NPRP9uUc2/SexuAAjBdvvGfV0//tsJqeS9UTZNFW0vDp9c VMgma9oxKEkF+ChVDH+0e8a0t00ver8XnNfCctJE1sLk8xT1aHXmw5dkd1UG2kgOK/GPn/ MZiO/9JZRfTi8Ky/UklAvmH8GrhJ6eLdZJ0gg5Shb/aBMaTIw4BG00Amn3x05A== 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 4Sq6H141d6z11cp; Tue, 12 Dec 2023 05:14: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 3BC5ELNW079341; Tue, 12 Dec 2023 05:14:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC5ELAx079337; Tue, 12 Dec 2023 05:14:21 GMT (envelope-from git) Date: Tue, 12 Dec 2023 05:14:21 GMT Message-Id: <202312120514.3BC5ELAx079337@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: 3fbed93203cb - main - cam.4: Modernize examples List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3fbed93203cb6347c02cd8e4f1e21fa93f42c44d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3fbed93203cb6347c02cd8e4f1e21fa93f42c44d commit 3fbed93203cb6347c02cd8e4f1e21fa93f42c44d Author: Warner Losh AuthorDate: 2023-12-12 05:08:55 +0000 Commit: Warner Losh CommitDate: 2023-12-12 05:12:13 +0000 cam.4: Modernize examples Use mpr1 instead of ahd1 and ahci1 instead of ahc1. ahc and ahd haven't been relevant for a while. Also update the transfer size HBAs can do from from 64k to 1MB. Sponsored by: Netflix --- share/man/man4/scsi.4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/share/man/man4/scsi.4 b/share/man/man4/scsi.4 index 0e349ba60f0d..380768c2d7c1 100644 --- a/share/man/man4/scsi.4 +++ b/share/man/man4/scsi.4 @@ -190,25 +190,25 @@ Individual bus numbers can be wired down to specific controllers with a config line similar to the following: .Bd -literal -offset indent -hint.scbus.0.at="ahd1" +hint.scbus.0.at="mpr1" .Ed .Pp This assigns .Nm bus number 0 to the -.Em ahd1 +.Em mpr1 driver instance. For controllers supporting more than one bus, a particular bus can be assigned as follows: .Bd -literal -offset indent -hint.scbus.0.at="ahc1" +hint.scbus.0.at="ahci1" hint.scbus.0.bus="1" .Ed .Pp This assigns .Nm bus 0 to the bus 1 instance on -.Em ahc1 . +.Em ahci1 . Peripheral drivers can be wired to a specific bus, target, and lun as so: .Bd -literal -offset indent hint.da.0.at="scbus0" @@ -279,7 +279,7 @@ or bus and the system. The maximum size of a transfer is governed by the adapter. -Most adapters can transfer 64KB in a single operation, however +Most adapters can transfer 1MB in a single operation, however many can transfer larger amounts. .Sh TARGET MODE Some adapters support From nobody Tue Dec 12 05:15:16 2023 X-Original-To: dev-commits-src-all@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 4Sq6J51SYpz53Pnk; Tue, 12 Dec 2023 05:15:17 +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 4Sq6J50wW7z4M2w; Tue, 12 Dec 2023 05:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kx9oW4wqQihhxvHgoqEp6Rf8IH1f5KDXQqoIn+8BGLM=; b=IBg8za2Ar8WEFf4Hyx42uszSVHGfU+wJfXJ8QDgcg3Tw6UVlC9mD+KD6iVp1rHPix/Lvt2 OUWByD3nlYYAMAwOkL3cg1FXV/B85YUnYb8OWVnY1dSJC0goZ4UhWSIahTxzVw5UQE7tfq tjSJKDVN9jn/pDWMajaKK9hjCk8I28Z4J76ckEST02i+WvHQl03Uf4yaZDv2/c7QlZHmfw IJpirIuCX9vh8HHZTnP+QtwN8B9RCTziaLB09nSmj6kdcrRsvgt5iNNiynKS5PUpPWznTl AFT32hejyBAW19aVIDDcBpgdGWG970MyYNXzAW/fWub6XvpSH4X4wPLOnlCxpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702358117; a=rsa-sha256; cv=none; b=ZSuMiWRaN1beY0qcC02CU62vN/t/SXWnAZEJr8YLsqJDlx+J88H4171DwzxMBCk/MQEaNs WeXIcGzm0tmGE5WH4AK8OgrrgYKIFFNi1xSxsUMEC9P7kV3w4HTvICK7VD+RCrPV+UBlgu GyVVNV4M7tPEFsVlNA7dTkW8v8m9jZFjsdpcs4jErMx/yf7RDPWXtHSLScIVXh9IXagp/2 npsxlSa54VstQ4G96rrUZQXXQHtpfJ2aWvl97o7WReEk2TDJgBOg5q338zP229wbjkLtJg l+7/U29nwD8QHwf6wvCBPbpDhtYF/Xk8iDORXunRjscBXFnrm0KWEO23Il8QTg== 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=1702358117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kx9oW4wqQihhxvHgoqEp6Rf8IH1f5KDXQqoIn+8BGLM=; b=qy0j77MDKxCG1NglIseJdSmwDkTQ3y32+QsLS9zPlho7ndiNye63Z3i/ki6FFB5wvBaBCp uZW8B6tgxwuMxzyifikGW1uaHUkmPWvqFaBZvom4mbQZ6JTlZrJW4PkvP0QY3MuovYLkYW Q9NPKGEnpQTBew457yoiKnsKF5rUBBZg3kqj2ZDNqpK9tdiheAVj3RONC71iwhrU9KkGg2 HX9gJGkMMLmckxoDaGnAJFK4SpexeJBiJjA/vEZE98cHPJFWrMLd7ZgKQVIima0j1Yj7ld jF8aC3iCGuXqH+UCbHJHBhoQYZrmBI7FOGAkw6oiLYUNcZ03uLiKZvJtffmLtw== 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 4Sq6J4755Qz12HQ; Tue, 12 Dec 2023 05:15:16 +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 3BC5FGfV079629; Tue, 12 Dec 2023 05:15:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC5FG9j079626; Tue, 12 Dec 2023 05:15:16 GMT (envelope-from git) Date: Tue, 12 Dec 2023 05:15:16 GMT Message-Id: <202312120515.3BC5FG9j079626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 0156465c6d11 - main - mandoc: fix bootstrapping on Linux with Clang 16 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0156465c6d11e1ef064d104443047e4146e5b925 Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=0156465c6d11e1ef064d104443047e4146e5b925 commit 0156465c6d11e1ef064d104443047e4146e5b925 Author: Alex Richardson AuthorDate: 2023-12-12 05:08:38 +0000 Commit: Alex Richardson CommitDate: 2023-12-12 05:14:56 +0000 mandoc: fix bootstrapping on Linux with Clang 16 It appears that Clang 16 errors by default for the mismatched function pointer types that are triggered by the fts callback (since glibc has a callback type without the second const qualifier). Fortunately, there is already code to handle glibc inside mandoc, we just have to edit the checked-in config.h. Reviewed By: imp, emaste Differential Revision: https://reviews.freebsd.org/D42999 --- contrib/mandoc/config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/mandoc/config.h b/contrib/mandoc/config.h index 553c4c8b7400..213513f1c87e 100644 --- a/contrib/mandoc/config.h +++ b/contrib/mandoc/config.h @@ -13,7 +13,11 @@ #define HAVE_ENDIAN 0 #define HAVE_ERR 1 #define HAVE_FTS 1 +#ifdef __GLIBC__ +#define HAVE_FTS_COMPARE_CONST 0 +#else #define HAVE_FTS_COMPARE_CONST 1 +#endif #define HAVE_GETLINE 1 #define HAVE_GETSUBOPT 1 #define HAVE_ISBLANK 1 From nobody Tue Dec 12 05:15:18 2023 X-Original-To: dev-commits-src-all@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 4Sq6J625cLz53PPG; Tue, 12 Dec 2023 05:15: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 4Sq6J61fm3z4MCj; Tue, 12 Dec 2023 05:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702358118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KqSd+08dOIa4GI6+D9SgGkcDdrzc2jLgEIXlPQuZ7Bc=; b=nb5jzld037bBbDN00sIbxLSUc9KBOCmE2UWzWVaB6/MbvdhQb54VRy6OVYaoMVHcgiapAd lDx/czPrxKBQu2Kdr2wHgrB2epZLr8hZ4tEFYljMgtNbW9KtsA3uz7cvsg+iLWh/6/5Gwm 3sKE6GGq9UDBdk83peIEUlfGC9+9ZYfj5UkRi4JBhCXAS+imOnputOyfdbtZ3iAb64Vj92 Ajh32B24+qzwzOAee/1Trx90WVxAxch/bFxAUZUQEpYlrfDvupgM0UqU+fG5up2qRCjRwH 5R9Q/Sgv5NUT2dmEtJowKCXQNEqMKZbIytZkjddRcHqmev/ufB9ryz7c+3sQTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702358118; a=rsa-sha256; cv=none; b=LzahxR5dJNiYgdrLrBtNTaIwUNpBeKFZg3qQsadxeUIsCh43z5pmbQuiMi4A1O4ujjFv2Z gmAjqyZEtRp3jcMYga4PAObqclnRrdn5hyz/NbRmkD/qVN/XYZo+IF81vhFJsGTtn0f6T0 hWgW2BeqJNPH8X6oHlbBsQq4S8/+3xlvhrxI1ykvv2kn2Q5F+uQGJnuPtHPhbWuCIwsq95 QL7vMuzCz8JqLu3CQD5/Sl6327uV6UuXTyVh8OA38PWPGGdEkj6o/Pn0SMtZMmBmcjI3je ZxbScpkoeubKH++vjvg48RX4tIQToQt9p4ddfRHVblCZwEeCVb20MjWHayFx+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=1702358118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KqSd+08dOIa4GI6+D9SgGkcDdrzc2jLgEIXlPQuZ7Bc=; b=Ax99KSD4NYwYszgP6rTY6xSRDCyrgR1XXkkHvme8JUZDyhalmcfuCpnCtw0iwgKk3Kh5rq TnNfhy76A9kpKmGKUU8HsrOEkN4OpWqPUAHeorZ20KDUr8hYvqrPayQnVso7tYH7rjQZT5 73OCjBwdG8u3xmMZk189+mYASnB5HU9AZDSjDiDCLd4LqPXRbI7BmmbUsa9W+ahttXW+aS hzoYJ786Y8S/YrmcNuZ6NNF36ZtX78LNiiMBO0M1fkKzODbEBkAuiY8wDIalND8qOvk5W5 w25ln5T5pOmOUT1289+m5Ai8Y01kzKGGWtsx/mn5M3rqCRrRBkpdIael9WDN0Q== 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 4Sq6J60jz6z12F1; Tue, 12 Dec 2023 05:15: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 3BC5FIx5079688; Tue, 12 Dec 2023 05:15:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BC5FIdk079684; Tue, 12 Dec 2023 05:15:18 GMT (envelope-from git) Date: Tue, 12 Dec 2023 05:15:18 GMT Message-Id: <202312120515.3BC5FIdk079684@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 60e845ceef25 - main - jevents: fix bootstrapping on Linux with Clang 16 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 60e845ceef25533bfb60450549bea56a17b1e467 Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=60e845ceef25533bfb60450549bea56a17b1e467 commit 60e845ceef25533bfb60450549bea56a17b1e467 Author: Alex Richardson AuthorDate: 2023-12-12 05:10:14 +0000 Commit: Alex Richardson CommitDate: 2023-12-12 05:14:56 +0000 jevents: fix bootstrapping on Linux with Clang 16 The glibc fts_open() callback type does not have the second const qualifier and it appears that Clang 16 errors by default for mismatched function pointer types. Add an ifdef to handle this case. Reviewed By: imp, emaste Differential Revision: https://reviews.freebsd.org/D43000 --- lib/libpmc/pmu-events/jevents.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libpmc/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c index ff7d3b226932..590b465af400 100644 --- a/lib/libpmc/pmu-events/jevents.c +++ b/lib/libpmc/pmu-events/jevents.c @@ -1355,7 +1355,11 @@ err_out: #include static int +#ifdef __GLIBC__ +fts_compare(const FTSENT **a, const FTSENT **b) +#else fts_compare(const FTSENT * const *a, const FTSENT * const *b) +#endif { return (strcmp((*a)->fts_name, (*b)->fts_name)); } From nobody Tue Dec 12 08:37:13 2023 X-Original-To: dev-commits-src-all@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 4SqBnB3FRKz53dFN; Tue, 12 Dec 2023 08:37:18 +0000 (UTC) (envelope-from fluffy@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 4SqBnB2k59z4c7N; Tue, 12 Dec 2023 08:37:18 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702370238; 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=d3qgXQtO5VUvpDCkw3rbkv7eamTtQzGt5g56Ki5CkGs=; b=S9ayL0MHAfjNPBxvRk/hO/Ifn7DPTnqCnN7jICe+9DHxQIb6MPNhYd0wE5gtYwocA6YzgZ wPIvdGDwakoslF1GFHQxSrUhv/nWTdpVOZiEwNAcIU8ImFIpacYRjiNv3nucXZFMXppiGn k+rNtd/Qa7wUjbyuY5xGXy8pGG6hZuSQ+IKvWoNry5iM8mmXXzbzwZ+yoXn9wC/PqOtkX5 nMFL57R0wbRVwqwLfG3pHEvekLpRt3oAe99rHDqamKd9I/a9Wd5Dzf+E+suGdfdq47IgN6 Q7ebqf5UaOd7lXbz2DwmAKwq5pAn/MGVsH2FfnfdXNRAhnGAmL6ZtTmrkdg71g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702370238; a=rsa-sha256; cv=none; b=tIuVKSc16t/W/8EhjBJpfoJOq7REhm2wv4KnvuDCh6Ng226JVowAirEF5QqMVIV+eOhFwg tao+B94megm98Ri0d7uh5fVi/UryV4zL/A/zWOTYqJPa+3nELsGI3+3wNsxzEBarbWkDjF JQSPpAnqUpT5XC+U3DkN4uE8f6Ut389Jb25gzXQ/3B8rqpm4y4S4c27/CdSpi/0ZpLB9Ya qxMEIyqyhnypcvYJdyjMivqFKVYND7A4vvVGQVAaOmwhyBOt9bib44dcgGYfgeFA/aT79V xzhaO4fGsFqjxDLxojWjOlnYCBOGbfac3a42xkVqknPiUW4ldTALwy7q850RJg== 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=1702370238; 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=d3qgXQtO5VUvpDCkw3rbkv7eamTtQzGt5g56Ki5CkGs=; b=XqHu4zjUyyEhhiS4Vv2wQf4ZYkqzGKQLDdaHEB/0U3w3gcnee7+7g4Nx6jM8Hop8PFLftx 1tnDXPf8Wr++lgmu7tzTVOon6qRR5cNp4e/tQD6minocfgNINFVjXPRbczYmq4LoaSpicI unYMO1VTVCfZa1UmcCQLRvNq7kXy69M4KAFmwhdBdqwxmLRnoTQBoAKofkEI4CCqv4ZBPp 84lUKVj6nuofJ5rt45FSRpg5TUbj92iwoaHWo73NcdP/Ir09ZlZVmO4JGGS/om4RFnthUF /r2ly5rAQy4H0f4/0X1H3WeYGbOJFNoO/kjagNYptCoooBEAlig8HQ1GFSK0pw== Received: from [10.216.0.102] (unknown [188.243.165.67]) (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: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SqBn92fK6zBgr; Tue, 12 Dec 2023 08:37:17 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Message-ID: Date: Tue, 12 Dec 2023 11:37:13 +0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 Content-Language: ru, en-GB, en-US To: Dimitry Andric Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> From: Dima Panov Organization: FreeBSD.org In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------5TfJ2GCpe4nfLWMeUs5ME0BJ" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------5TfJ2GCpe4nfLWMeUs5ME0BJ Content-Type: multipart/mixed; boundary="------------lmH2YrVW1sPHMRP0rAgcjwmh"; protected-headers="v1" From: Dima Panov To: Dimitry Andric Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-ID: Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> In-Reply-To: --------------lmH2YrVW1sPHMRP0rAgcjwmh Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 DQoNCk9uIDExLjEyLjIwMjMgMjE6MjYsIERpbWl0cnkgQW5kcmljIHdyb3RlOg0KPiBPbiAx MSBEZWMgMjAyMywgYXQgMTk6MTAsIERpbWEgUGFub3YgPGZsdWZmeUBmcmVlYnNkLm9yZz4g d3JvdGU6DQo+Pg0KPj4gT24gMTEuMTIuMjAyMyAxODoxNSwgRGltaXRyeSBBbmRyaWMgd3Jv dGU6DQo+Pj4gT24gMTEgRGVjIDIwMjMsIGF0IDE2OjAzLCBLcmlzdG9mIFByb3Zvc3QgPGtw QEZyZWVCU0Qub3JnPiB3cm90ZToNCj4+Pj4gT24gOCBEZWMgMjAyMywgYXQgMTg6MzksIERp bWl0cnkgQW5kcmljIHdyb3RlOg0KPj4+Pg0KPj4+PiAgICAgVGhlIGJyYW5jaCBtYWluIGhh cyBiZWVuIHVwZGF0ZWQgYnkgZGltOg0KPj4+Pg0KPj4+PiAgICAgVVJMOiBodHRwczovL2Nn aXQuRnJlZUJTRC5vcmcvc3JjL2NvbW1pdC8/aWQ9NWMxNmU3MWQzMGMzODhkZDQzYjIxN2Rl MTBhM2NjYjRiMDIxOWQwZCA8aHR0cHM6Ly9jZ2l0LmZyZWVic2Qub3JnL3NyYy9jb21taXQv P2lkPTVjMTZlNzFkMzBjMzg4ZGQ0M2IyMTdkZTEwYTNjY2I0YjAyMTlkMGQ+DQo+Pj4+DQo+ Pj4+ICAgICBjb21taXQgNWMxNmU3MWQzMGMzODhkZDQzYjIxN2RlMTBhM2NjYjRiMDIxOWQw ZA0KPj4+PiAgICAgTWVyZ2U6IGIxMjFjYjAwOTVjOCA3MDMwMjlkYmJhNzgNCj4+Pj4gICAg IEF1dGhvcjogRGltaXRyeSBBbmRyaWMgPGRpbUBGcmVlQlNELm9yZz4NCj4+Pj4gICAgIEF1 dGhvckRhdGU6IDIwMjMtMTEtMzAgMjA6MDY6NTIgKzAwMDANCj4+Pj4gICAgIENvbW1pdDog RGltaXRyeSBBbmRyaWMgPGRpbUBGcmVlQlNELm9yZz4NCj4+Pj4gICAgIENvbW1pdERhdGU6 IDIwMjMtMTItMDggMTc6MzU6NTkgKzAwMDANCj4+Pj4NCj4+Pj4gICAgIE1lcmdlIGxsdm0t cHJvamVjdCByZWxlYXNlLzE3LnggbGx2bW9yZy0xNy4wLjYtMC1nNjAwOTcwOGI0MzY3DQo+ Pj4+DQo+Pj4+ICAgICBUaGlzIHVwZGF0ZXMgbGx2bSwgY2xhbmcsIGNvbXBpbGVyLXJ0LCBs aWJjKyssIGxpYnVud2luZCwgbGxkLCBsbGRiIGFuZA0KPj4+PiAgICAgb3Blbm1wIHRvIGxs dm1vcmctMTcuMC42LTAtZzYwMDk3MDhiNDM2Ny4NCj4+Pj4NCj4+Pj4gICAgIFBSOiAyNzM3 NTMNCj4+Pj4gICAgIE1GQyBhZnRlcjogMSBtb250aA0KPj4+Pg0KPj4+Pg0KPj4+PiBUaGVy ZSBhcHBlYXJzIHRvIGJlIHNvbWUgZmFsbG91dCBpbiBzb21lIHBvcnRzLg0KPj4+DQo+PiBb c2tpcF0NCj4+PiBJIGZpeGVkIGRvemVucyBvZiBwb3J0cyBmb3IgdGhpcyBpbiBodHRwczov L2J1Z3MuZnJlZWJzZC5vcmcvMjczNzUzIDxodHRwczovL2J1Z3MuZnJlZWJzZC5vcmcvMjcz NzUzPiwgYnV0IEkgaGF2ZW4ndCBnb25lIG92ZXIgYWxsIG9mIHRoZW0sIHNpbmNlIEkgaGF2 ZSBsaW1pdGVkIHJlc291cmNlcy4NCj4+PiBUaGF0IHNhaWQsIHRoZXJlIGFyZSBnZW5lcmFs bHkgdHdvIHdheXMgdG8gZml4IHRoaXM6IGVpdGhlciBhZGQgLVdsLC0tdW5kZWZpbmVkLXZl cnNpb24gdG8gdGhlIGxpbmtlciBmbGFncywgb3IgYWN0dWFsbHkgcmVtb3ZlIHRoZSB1bmRl ZmluZWQgc3ltYm9scyBmcm9tIHRoZSBsaW5rZXIgdmVyc2lvbiBzY3JpcHRzLg0KPj4NCj4+ IEJUVywgbGFuZy9nY2MxMyBmYWlscyB0byBidWlsZCBvbiAxNS9hYXJjaDY0IGFmdGVyIHRo aXMgaW1wb3J0IHdpdGggbG90cyBvZg0KPj4NCj4+IC91c3IvaW5jbHVkZS9jKysvdjEvbG9j YWxlOjM0MzQ6MzE6IGVycm9yOiBhdHRlbXB0IHRvIHVzZSBhIHBvaXNvbmVkIGlkZW50aWZp ZXINCj4+IDM0MzQgfCAgICAgICAgIF9faC5yZXNldCgoY2hhcl90eXBlKiltYWxsb2MoX19l eG4gKiBzaXplb2YoY2hhcl90eXBlKSkpOw0KPj4gICAgICAgfCAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBeDQo+Pg0KPj4NCj4+IEZ1bGwgbG9nOiBodHRwczovL3Blb3BsZS5m cmVlYnNkLm9yZy9+Zmx1ZmZ5Ly1sb2cvMTUwYWFyY2g2NC9nY2MxMy0xMy4yLjBfMS5sb2cN Cj4+DQo+Pg0KPj4gSnVzdCBjdXJpb3VzIGJ1dCBnY2MxMiBpcyBmaW5lIG5vdw0KPiANCj4g SSBoYXZlIHNlZW4gdGhpcyBlcnJvciB0b28sIGJ1dCBjb3VsZCBvbmx5IHJlcHJvZHVjZSBp dCBvdXRzaWRlIG9mIHBvdWRyaWVyZSwgc28gSSBkaWRuJ3QgdGFrZSBpdCB0b28gc2VyaW91 c2x5LiBJdCBpcyBlYXN5IHRvIGZpeDsgSSBoYXZlIGEgcGF0Y2gsIHNoYWxsIEkgY29tbWl0 IGl0PyA6KQ0KPiANCg0KWWVzIHBsZWFzZSA6KQ0KDQoNCi0tIA0KU2luY2VyZWx5LA0KRGlt YSAoZmx1ZmZ5QEZyZWVCU0Qub3JnLCBodHRwczovL3QubWUvRmx1ZmZ5QlNEKQ0KKGRlc2t0 b3AsIGtkZSwgeDExLCBvZmZpY2UsIHBvcnRzLXNlY3RlYW0pQEZyZWVCU0QgdGVhbQ0K --------------lmH2YrVW1sPHMRP0rAgcjwmh-- --------------5TfJ2GCpe4nfLWMeUs5ME0BJ Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmV4G7kFAwAAAAAACgkQ+4ugndU5jynF Eg/9GBB01TIx57VIhZzUHCAaxlXODzI572njpwGbYBgknuNf0ZaNC1ikyt/A6FnAfzgQ5h/aQeff FLLALiPnh+cXN2fowPFTj9YYSs9XIFGhv4AT7EYeye9IDtB3E3UKpNDpYaV0SLfJaZaBM66lcyHb vIVHVOGqcPzXXRt7HUsgeJsm2sgcMvCPwApM/AxyD2RXNkWch+UH47dsZfF234tYLCDE1nqutqGj 4fu15U3Pm/dA6pbVf8E5Wtdds41jVrBYIcP45rrNUYUxCvdTFWiydqVXzWqZ76IRpBg9ELmRaniZ 1XMc12H7h3v3mE1oG1dTgIclAUgA1Fr/+pArUksCiUN7bhpksEDQuz8HtUZWGTmCBekmivnu1Wfe 6VgmbR2tT9ohD03Ifk+NToHT56AoVOUJa7wevZfZ6d7OeZVuzMwwPmaXjMncXYkVx0Vb04ACVSlg WgxOVqD7RExb5tE8DxcLf6HX0S9umEG7hpkEEHArr3VsrAma7llx0/3YqIWsPPyPj782yAc40W4f cXyRsNuK8vBbhdd1URlDb6EbyG5lAA8qYOKkWOjJyjXZZhxkVEbmyYdz0UPicuJ/3mrbwBehKIPg T5mSFtBTcjC5G4525pducVzyCcZhWE6wvhSMVrnI2pKAoHOSuelb2LPbjFLJgFaUHWPUNEgSLrcZ rJc= =2mZJ -----END PGP SIGNATURE----- --------------5TfJ2GCpe4nfLWMeUs5ME0BJ-- From nobody Tue Dec 12 11:04:58 2023 X-Original-To: dev-commits-src-all@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 4SqG3Z2yfnz53njb; Tue, 12 Dec 2023 11: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 4SqG3Z25xDz3QSf; Tue, 12 Dec 2023 11: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=1702379098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EK+xt+Htg/9z4/g79WwPOobkVYQP5cMPU9PPVGE4ktI=; b=CQzOUmHcaUp8SicpGDW4zmoSPnMYiEM9gdWr14RaHwFf4GPUuG9UD9abSVMB8jsrrxyp7+ UkR2wOAe2dDUjTnNa1hXkmPvq9eAHILJ/H2M2hIgG084Qj73PbXsUjqt+cV3jGKJuC32ie UVnRYmtUPVtgmuBrZpVUok6+bGhNGI+O3DbWTmQfq8yt6QTRBOl7GLdUSb+xQThjwYM0ok esJmMd1HyqGwYzNM4LY1xIzjlBRY0NbX7nWIZyWdH9MxIpCqiKiaPQDxJKqeQVSzEq0vcD FoFtumQbtrAzlrjIn0NeELM5RTfdF10DnlGxJ2rHs98V7SuS5caxfdtHG1ppOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702379098; a=rsa-sha256; cv=none; b=ruoWdNKw+Wcoc7Ms615s958jlCBu1GB4U2xTQHl4AHdIQ2cs3atWjOWd60KZ0lURy2wXoG cA7oHv95xAZV4kVzHiucqMzA/XR5z7VEhWJSjZdhg3iMnOCdQPSqDNjU7qOlZEWY4FfB1S JUgyOqsN09ANsf304VBeuHARPgD1hTWQ28Cbm7omxII9IJatA0cK2kquKs3RRlnP4iASTq 6Wgcw9euQq1WRuaqNgqFE4RTCKwswpc2nBT0UVQmHbxMMY1aBNv+p/VkfJq6T6s9bguujZ iqOtyccJOyiU9rB7lxiPWCkHxx4Tiyi8gEQsokfrdVU/mZ7bqvqkl9sPD8oLYg== 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=1702379098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EK+xt+Htg/9z4/g79WwPOobkVYQP5cMPU9PPVGE4ktI=; b=uzSqxICK1Vwh+3n9k3HM/P4fwpb04mJjGUOCxOFkKMkak/kKYPH1sxb56p41xTsqpDVNdg +cSjk8eUeTxScgsmxnCGpdNhOBli/zLkYl11CMFV3Kmp/dUwbyHlPaAWCzvEb5BoT5yivl SXakR2KXsevm/j2U1OxSXjnJVzRclGVyMuebUasTIT+aNNefhHoD2BpSZK4/RmKT/FMi25 5xI1n25BOlY468gFespI4PmVq24pvPK+kn24h6UzNKFaH5Swy4P093QSPC8aH514ObVqLl U00S5pJlonijQ14y5cO5CLM475zO/pap72cpc2IQIEWGiyLcAj2U53ZBHUrdwg== 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 4SqG3Z1CfWz1Bnw; Tue, 12 Dec 2023 11: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 3BCB4wko066470; Tue, 12 Dec 2023 11: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 3BCB4wW1066467; Tue, 12 Dec 2023 11:04:58 GMT (envelope-from git) Date: Tue, 12 Dec 2023 11:04:58 GMT Message-Id: <202312121104.3BCB4wW1066467@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: 793e4aca9e70 - main - tcp stacks: in kernel BBR and RACK require in kernel HPTS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 793e4aca9e70f2441f0f4e1688d0a727d602ed81 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=793e4aca9e70f2441f0f4e1688d0a727d602ed81 commit 793e4aca9e70f2441f0f4e1688d0a727d602ed81 Author: Michael Tuexen AuthorDate: 2023-12-12 11:01:37 +0000 Commit: Michael Tuexen CommitDate: 2023-12-12 11:01:37 +0000 tcp stacks: in kernel BBR and RACK require in kernel HPTS Compiling the BBR or RACK stack into the kernel requires HPTS to be compiled into the kernel. Reviewed by: glebius, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42998 --- sys/conf/files | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index e37764d3dc6f..377d65926462 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4363,13 +4363,13 @@ netinet/tcp_pcap.c optional inet tcppcap | inet6 tcppcap \ compile-with "${NORMAL_C} ${NO_WNONNULL}" netinet/tcp_reass.c optional inet | inet6 netinet/tcp_sack.c optional inet | inet6 -netinet/tcp_stacks/bbr.c optional inet tcp_bbr | inet6 tcp_bbr \ +netinet/tcp_stacks/bbr.c optional inet tcphpts tcp_bbr | inet6 tcphpts tcp_bbr \ compile-with "${NORMAL_C} -DMODNAME=tcp_bbr -DSTACKNAME=bbr" -netinet/tcp_stacks/rack.c optional inet tcp_rack | inet6 tcp_rack \ +netinet/tcp_stacks/rack.c optional inet tcphpts tcp_rack | inet6 tcphpts tcp_rack \ compile-with "${NORMAL_C} -DMODNAME=tcp_rack -DSTACKNAME=rack" -netinet/tcp_stacks/rack_bbr_common.c optional inet tcp_bbr | inet tcp_rack | inet6 tcp_bbr | inet6 tcp_rack -netinet/tcp_stacks/sack_filter.c optional inet tcp_bbr | inet tcp_rack | inet6 tcp_bbr | inet6 tcp_rack -netinet/tcp_stacks/tailq_hash.c optional inet tcp_bbr | inet tcp_rack | inet6 tcp_bbr | inet6 tcp_rack +netinet/tcp_stacks/rack_bbr_common.c optional inet tcphpts tcp_bbr | inet tcphpts tcp_rack | inet6 tcphpts tcp_bbr | inet6 tcphpts tcp_rack +netinet/tcp_stacks/sack_filter.c optional inet tcphpts tcp_bbr | inet tcphpts tcp_rack | inet6 tcphpts tcp_bbr | inet6 tcphpts tcp_rack +netinet/tcp_stacks/tailq_hash.c optional inet tcphpts tcp_bbr | inet tcphpts tcp_rack | inet6 tcphpts tcp_bbr | inet6 tcphpts tcp_rack netinet/tcp_stats.c optional stats inet | stats inet6 netinet/tcp_subr.c optional inet | inet6 netinet/tcp_syncache.c optional inet | inet6 From nobody Tue Dec 12 15:32:10 2023 X-Original-To: dev-commits-src-all@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 4SqMzt2s0dz5462s; Tue, 12 Dec 2023 15:32: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 4SqMzt2fScz4VJm; Tue, 12 Dec 2023 15:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702395130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5KKH21HSY4NnX8XgPza8ZnFTkRwgJMm9Pq3rRp4Wfic=; b=pjrEQ1otLLdBlfLGUQsTa5mLUwfLm7Q5VgL3kkLjOMQ6X6K7/p/7uqV5N3G1G7aqX+Khjz 5RXS2/urK0lmIoIe3Gx2NEPnkHZ7AmcnUVegquNTXl3ShSdzTZPfW6KSQp/QKsY6NJzCPs rKVG5ap93AuBAhC2UEaTcheuwUKEI/y/VMO3+fhlnBAQzI96TYqmFK6gHcI125+wQxs9S0 CuBNeihWZkWieQKY6rNdRwpQw0BFZYo6TF9g9v/g27lrf1CMYOqRpcd+0aZHxPNEzvQB4s JKlxiMnzbz7/QzU5Wh/RfRJnbzsL8L9oubnsQN9xJpETxHViFQxm5mBuxEn1AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702395130; a=rsa-sha256; cv=none; b=UWdOGKb/JcaqlfnfvcKHeD3jv/T1HI+Czk9Z5tCIQFq9Yt0fdGhOfRkqJsleqh8JtLhNu1 1PwvgzzcINrov9o2N+MTC5lA7qfnhQw3PYka1hgZMSVXspLjmiBRX0K2mA47+A6VtZhsi2 ZGM1fahLGPWrNK8/ejOKX8FGU4zxPlk6T8gnf03WnRqMltwIUdfqglHAsX4DuKxbMXmgEp DitJFGeIgGD+Ig1gI0jSM6VSic/uVrxWyDHK0Lip860+FTS0dCpHz8xwkJ//lrW8QEY8rX PVO/TQ3WrnQT8R8Mz+7VbotjS3Xd4lgcXPnFiM8pTwIwF66iirj/uI9sVwVC9w== 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=1702395130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5KKH21HSY4NnX8XgPza8ZnFTkRwgJMm9Pq3rRp4Wfic=; b=vmGhU2kZvzzMwYWr7wWEEg2Z4qsfialvZPGHJBYyU1a72+mXRb+SC9JksKQHrT8vrE9POP ASCtxBOq1gJzmImW0IOAQGftIM0H3MXofjxT7Gol9WGyitZ90q9BQEZ2H6aVOZT1ZPzmH0 IVMI5ERX5Pwf2xD32bZ7c0qzq6dk464Idsdjjt+uQLQ+ysYETCLDcqJgQP3UaOlTDCeSZ7 xp1WhcodTriAN91Y8DhZt1P1p6mOMidpVq93YxANTLjO3IkhigyRoyWu7Pt+LgAF73Xud7 FTqNcly0lMwfID88kIRfdgMkX++QYbzfYkC0bntIseanVglUMVcoteMq0vCoZQ== 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 4SqMzt1ksGz4wn; Tue, 12 Dec 2023 15:32: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 3BCFWAGP016625; Tue, 12 Dec 2023 15:32:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCFWA57016590; Tue, 12 Dec 2023 15:32:10 GMT (envelope-from git) Date: Tue, 12 Dec 2023 15:32:10 GMT Message-Id: <202312121532.3BCFWA57016590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Kenneth D. Merry" Subject: git: 70547544ce93 - main - ocs_fc: IO timeout handling and error reporting fix. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ken X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70547544ce931357c980be47d937e5b57a2d7f49 Auto-Submitted: auto-generated The branch main has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=70547544ce931357c980be47d937e5b57a2d7f49 commit 70547544ce931357c980be47d937e5b57a2d7f49 Author: Ram Kishore Vegesna AuthorDate: 2023-12-12 15:22:58 +0000 Commit: Kenneth D. Merry CommitDate: 2023-12-12 15:22:58 +0000 ocs_fc: IO timeout handling and error reporting fix. Hardware timeout uses a 8-bit timeout value and expects the timeout to be less than 255 seconds. Added software timer implemetation to timeout and abort the IOs with timeout more than 255 seconds. Fix the timeout problem by dividing CAM timeouts by 1000 as hardware expects timeout value in seconds. Before this change, CAM timeouts in milliseconds were getting truncated to 8 bits and converted to seconds. So the actual timeout used when going down to the card would depend on the bottom 8 bits of the timeout used. Add the mapping of ocs_fc error status to CAM status. Reported by: ken Reviewed by: ken Tested by: ken, ram Approved by: ken MFC after: 1 week --- sys/dev/ocs_fc/ocs_cam.c | 87 ++++++++++++++++++++++++++++++++++++++++++++-- sys/dev/ocs_fc/ocs_hw.c | 70 +++++++++++++++++++++++-------------- sys/dev/ocs_fc/ocs_hw.h | 10 +++--- sys/dev/ocs_fc/ocs_scsi.c | 6 +++- sys/dev/ocs_fc/ocs_xport.c | 8 +++-- sys/dev/ocs_fc/sli4.h | 2 +- 6 files changed, 144 insertions(+), 39 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_cam.c b/sys/dev/ocs_fc/ocs_cam.c index 4da1b6669047..0fa94083e898 100644 --- a/sys/dev/ocs_fc/ocs_cam.c +++ b/sys/dev/ocs_fc/ocs_cam.c @@ -44,6 +44,7 @@ #include "ocs.h" #include "ocs_scsi.h" #include "ocs_device.h" +#include /* Default IO timeout value for initiators is 30 seconds */ #define OCS_CAM_IO_TIMEOUT 30 @@ -55,6 +56,27 @@ typedef struct { int32_t rc; } ocs_dmamap_load_arg_t; +struct ocs_scsi_status_desc { + ocs_scsi_io_status_e status; + const char *desc; +} ocs_status_desc[] = { + { OCS_SCSI_STATUS_GOOD, "Good" }, + { OCS_SCSI_STATUS_ABORTED, "Aborted" }, + { OCS_SCSI_STATUS_ERROR, "Error" }, + { OCS_SCSI_STATUS_DIF_GUARD_ERROR, "DIF Guard Error" }, + { OCS_SCSI_STATUS_DIF_REF_TAG_ERROR, "DIF REF Tag Error" }, + { OCS_SCSI_STATUS_DIF_APP_TAG_ERROR, "DIF App Tag Error" }, + { OCS_SCSI_STATUS_DIF_UNKNOWN_ERROR, "DIF Unknown Error" }, + { OCS_SCSI_STATUS_PROTOCOL_CRC_ERROR, "Proto CRC Error" }, + { OCS_SCSI_STATUS_NO_IO, "No IO" }, + { OCS_SCSI_STATUS_ABORT_IN_PROGRESS, "Abort in Progress" }, + { OCS_SCSI_STATUS_CHECK_RESPONSE, "Check Response" }, + { OCS_SCSI_STATUS_COMMAND_TIMEOUT, "Command Timeout" }, + { OCS_SCSI_STATUS_TIMEDOUT_AND_ABORTED, "Timed out and Aborted" }, + { OCS_SCSI_STATUS_SHUTDOWN, "Shutdown" }, + { OCS_SCSI_STATUS_NEXUS_LOST, "Nexus Lost" } +}; + static void ocs_action(struct cam_sim *, union ccb *); static void ocs_poll(struct cam_sim *); @@ -1497,7 +1519,7 @@ static int32_t ocs_scsi_initiator_io_cb(ocs_io_t *io, * If we've already got a SCSI error, prefer that because it * will have more detail. */ - if ((rsp->residual < 0) && (ccb_status == CAM_REQ_CMP)) { + if ((rsp->residual < 0) && (ccb_status == CAM_REQ_CMP)) { ccb_status = CAM_DATA_RUN_ERR; } @@ -1517,7 +1539,62 @@ static int32_t ocs_scsi_initiator_io_cb(ocs_io_t *io, ocs_memcpy(&csio->sense_data, rsp->sense_data, sense_len); } } else if (scsi_status != OCS_SCSI_STATUS_GOOD) { - ccb_status = CAM_REQ_CMP_ERR; + const char *err_desc = NULL; + char path_str[64]; + char err_str[224]; + struct sbuf sb; + size_t i; + + sbuf_new(&sb, err_str, sizeof(err_str), 0); + + xpt_path_string(ccb->ccb_h.path, path_str, sizeof(path_str)); + sbuf_cat(&sb, path_str); + + for (i = 0; i < (sizeof(ocs_status_desc) / + sizeof(ocs_status_desc[0])); i++) { + if (scsi_status == ocs_status_desc[i].status) { + err_desc = ocs_status_desc[i].desc; + break; + } + } + if (ccb->ccb_h.func_code == XPT_SCSI_IO) { + scsi_command_string(&ccb->csio, &sb); + sbuf_printf(&sb, "length %d ", ccb->csio.dxfer_len); + } + sbuf_printf(&sb, "error status %d (%s)\n", scsi_status, + (err_desc != NULL) ? err_desc : "Unknown"); + sbuf_finish(&sb); + printf("%s", sbuf_data(&sb)); + + switch (scsi_status) { + case OCS_SCSI_STATUS_ABORTED: + case OCS_SCSI_STATUS_ABORT_IN_PROGRESS: + ccb_status = CAM_REQ_ABORTED; + break; + case OCS_SCSI_STATUS_DIF_GUARD_ERROR: + case OCS_SCSI_STATUS_DIF_REF_TAG_ERROR: + case OCS_SCSI_STATUS_DIF_APP_TAG_ERROR: + case OCS_SCSI_STATUS_DIF_UNKNOWN_ERROR: + case OCS_SCSI_STATUS_PROTOCOL_CRC_ERROR: + ccb_status = CAM_IDE; + break; + case OCS_SCSI_STATUS_ERROR: + case OCS_SCSI_STATUS_NO_IO: + ccb_status = CAM_REQ_CMP_ERR; + break; + case OCS_SCSI_STATUS_COMMAND_TIMEOUT: + case OCS_SCSI_STATUS_TIMEDOUT_AND_ABORTED: + ccb_status = CAM_CMD_TIMEOUT; + break; + case OCS_SCSI_STATUS_SHUTDOWN: + case OCS_SCSI_STATUS_NEXUS_LOST: + ccb_status = CAM_SCSI_IT_NEXUS_LOST; + break; + default: + ccb_status = CAM_REQ_CMP_ERR; + break; + } + } else { ccb_status = CAM_REQ_CMP; } @@ -1842,7 +1919,11 @@ ocs_initiator_io(struct ocs_softc *ocs, union ccb *ccb) } else if (ccb->ccb_h.timeout == CAM_TIME_DEFAULT) { io->timeout = OCS_CAM_IO_TIMEOUT; } else { - io->timeout = ccb->ccb_h.timeout; + if (ccb->ccb_h.timeout < 1000) + io->timeout = 1; + else { + io->timeout = ccb->ccb_h.timeout / 1000; + } } switch (csio->tag_action) { diff --git a/sys/dev/ocs_fc/ocs_hw.c b/sys/dev/ocs_fc/ocs_hw.c index 4db6634d3d90..cfb9d4f8f536 100644 --- a/sys/dev/ocs_fc/ocs_hw.c +++ b/sys/dev/ocs_fc/ocs_hw.c @@ -148,17 +148,29 @@ static void ocs_hw_check_sec_hio_list(ocs_hw_t *hw); static void target_wqe_timer_cb(void *arg); static void shutdown_target_wqe_timer(ocs_hw_t *hw); +/* WQE timeout for initiator IOs */ +static inline uint8_t +ocs_hw_set_io_wqe_timeout(ocs_hw_io_t *io, uint32_t timeout) +{ + if (timeout > 255) { + io->wqe_timeout = timeout; + return 0; + } else { + return timeout; + } +} + static inline void ocs_hw_add_io_timed_wqe(ocs_hw_t *hw, ocs_hw_io_t *io) { - if (hw->config.emulate_tgt_wqe_timeout && io->tgt_wqe_timeout) { + if (hw->config.emulate_wqe_timeout && io->wqe_timeout) { /* * Active WQE list currently only used for * target WQE timeouts. */ ocs_lock(&hw->io_lock); ocs_list_add_tail(&hw->io_timed_wqe, io); - io->submit_ticks = ocs_get_os_ticks(); + getmicrouptime(&io->submit_time); ocs_unlock(&hw->io_lock); } } @@ -166,7 +178,7 @@ ocs_hw_add_io_timed_wqe(ocs_hw_t *hw, ocs_hw_io_t *io) static inline void ocs_hw_remove_io_timed_wqe(ocs_hw_t *hw, ocs_hw_io_t *io) { - if (hw->config.emulate_tgt_wqe_timeout) { + if (hw->config.emulate_wqe_timeout) { /* * If target wqe timeouts are enabled, * remove from active wqe list. @@ -965,7 +977,7 @@ ocs_hw_init(ocs_hw_t *hw) } /* finally kick off periodic timer to check for timed out target WQEs */ - if (hw->config.emulate_tgt_wqe_timeout) { + if (hw->config.emulate_wqe_timeout) { ocs_setup_timer(hw->os, &hw->wqe_timer, target_wqe_timer_cb, hw, OCS_HW_WQ_TIMER_PERIOD_MS); } @@ -1695,8 +1707,8 @@ ocs_hw_get(ocs_hw_t *hw, ocs_hw_property_e prop, uint32_t *value) case OCS_HW_EMULATE_I_ONLY_AAB: *value = hw->config.i_only_aab; break; - case OCS_HW_EMULATE_TARGET_WQE_TIMEOUT: - *value = hw->config.emulate_tgt_wqe_timeout; + case OCS_HW_EMULATE_WQE_TIMEOUT: + *value = hw->config.emulate_wqe_timeout; break; case OCS_HW_VPD_LEN: *value = sli_get_vpd_len(&hw->sli); @@ -1996,8 +2008,8 @@ ocs_hw_set(ocs_hw_t *hw, ocs_hw_property_e prop, uint32_t value) case OCS_HW_EMULATE_I_ONLY_AAB: hw->config.i_only_aab = value; break; - case OCS_HW_EMULATE_TARGET_WQE_TIMEOUT: - hw->config.emulate_tgt_wqe_timeout = value; + case OCS_HW_EMULATE_WQE_TIMEOUT: + hw->config.emulate_wqe_timeout = value; break; case OCS_HW_BOUNCE: hw->config.bounce = value; @@ -3324,7 +3336,7 @@ ocs_hw_init_free_io(ocs_hw_io_t *io) io->type = 0xFFFF; io->wq = NULL; io->ul_io = NULL; - io->tgt_wqe_timeout = 0; + io->wqe_timeout = 0; } /** @@ -3738,7 +3750,7 @@ ocs_hw_check_sec_hio_list(ocs_hw_t *hw) flags &= ~SLI4_IO_CONTINUATION; } - io->tgt_wqe_timeout = io->sec_iparam.fcp_tgt.timeout; + io->wqe_timeout = io->sec_iparam.fcp_tgt.timeout; /* Complete (continue) TRECV IO */ if (io->xbusy) { @@ -4041,6 +4053,7 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, ocs_hw_rtn_e rc = OCS_HW_RTN_SUCCESS; uint32_t rpi; uint8_t send_wqe = TRUE; + uint8_t timeout = 0; CPUTRACE(""); @@ -4075,6 +4088,8 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, */ switch (type) { case OCS_HW_IO_INITIATOR_READ: + timeout = ocs_hw_set_io_wqe_timeout(io, iparam->fcp_ini.timeout); + /* * If use_dif_quarantine workaround is in effect, and dif_separates then mark the * initiator read IO for quarantine @@ -4090,12 +4105,14 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, if (sli_fcp_iread64_wqe(&hw->sli, io->wqe.wqebuf, hw->sli.config.wqe_size, &io->def_sgl, io->first_data_sge, len, io->indicator, io->reqtag, SLI4_CQ_DEFAULT, rpi, rnode, iparam->fcp_ini.dif_oper, iparam->fcp_ini.blk_size, - iparam->fcp_ini.timeout)) { + timeout)) { ocs_log_err(hw->os, "IREAD WQE error\n"); rc = OCS_HW_RTN_ERROR; } break; case OCS_HW_IO_INITIATOR_WRITE: + timeout = ocs_hw_set_io_wqe_timeout(io, iparam->fcp_ini.timeout); + ocs_hw_io_ini_sge(hw, io, iparam->fcp_ini.cmnd, iparam->fcp_ini.cmnd_size, iparam->fcp_ini.rsp); @@ -4104,18 +4121,20 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, io->indicator, io->reqtag, SLI4_CQ_DEFAULT, rpi, rnode, iparam->fcp_ini.dif_oper, iparam->fcp_ini.blk_size, - iparam->fcp_ini.timeout)) { + timeout)) { ocs_log_err(hw->os, "IWRITE WQE error\n"); rc = OCS_HW_RTN_ERROR; } break; case OCS_HW_IO_INITIATOR_NODATA: + timeout = ocs_hw_set_io_wqe_timeout(io, iparam->fcp_ini.timeout); + ocs_hw_io_ini_sge(hw, io, iparam->fcp_ini.cmnd, iparam->fcp_ini.cmnd_size, iparam->fcp_ini.rsp); if (sli_fcp_icmnd64_wqe(&hw->sli, io->wqe.wqebuf, hw->sli.config.wqe_size, &io->def_sgl, io->indicator, io->reqtag, SLI4_CQ_DEFAULT, - rpi, rnode, iparam->fcp_ini.timeout)) { + rpi, rnode, timeout)) { ocs_log_err(hw->os, "ICMND WQE error\n"); rc = OCS_HW_RTN_ERROR; } @@ -4137,7 +4156,7 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, flags &= ~SLI4_IO_CONTINUATION; } - io->tgt_wqe_timeout = iparam->fcp_tgt.timeout; + io->wqe_timeout = iparam->fcp_tgt.timeout; /* * If use_dif_quarantine workaround is in effect, and this is a DIF enabled IO @@ -4227,7 +4246,7 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, flags &= ~SLI4_IO_CONTINUATION; } - io->tgt_wqe_timeout = iparam->fcp_tgt.timeout; + io->wqe_timeout = iparam->fcp_tgt.timeout; if (sli_fcp_tsend64_wqe(&hw->sli, io->wqe.wqebuf, hw->sli.config.wqe_size, &io->def_sgl, io->first_data_sge, iparam->fcp_tgt.offset, len, io->indicator, io->reqtag, SLI4_CQ_DEFAULT, @@ -4260,7 +4279,7 @@ ocs_hw_io_send(ocs_hw_t *hw, ocs_hw_io_type_e type, ocs_hw_io_t *io, } } - io->tgt_wqe_timeout = iparam->fcp_tgt.timeout; + io->wqe_timeout = iparam->fcp_tgt.timeout; if (sli_fcp_trsp64_wqe(&hw->sli, io->wqe.wqebuf, hw->sli.config.wqe_size, &io->def_sgl, len, @@ -11173,9 +11192,8 @@ target_wqe_timer_nop_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) { ocs_hw_io_t *io = NULL; ocs_hw_io_t *io_next = NULL; - uint64_t ticks_current = ocs_get_os_ticks(); - uint32_t sec_elapsed; ocs_hw_rtn_e rc; + struct timeval cur_time; sli4_mbox_command_header_t *hdr = (sli4_mbox_command_header_t *)mqe; @@ -11188,27 +11206,28 @@ target_wqe_timer_nop_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) /* loop through active WQE list and check for timeouts */ ocs_lock(&hw->io_lock); ocs_list_foreach_safe(&hw->io_timed_wqe, io, io_next) { - sec_elapsed = ((ticks_current - io->submit_ticks) / ocs_get_os_tick_freq()); /* * If elapsed time > timeout, abort it. No need to check type since * it wouldn't be on this list unless it was a target WQE */ - if (sec_elapsed > io->tgt_wqe_timeout) { - ocs_log_test(hw->os, "IO timeout xri=0x%x tag=0x%x type=%d\n", - io->indicator, io->reqtag, io->type); + getmicrouptime(&cur_time); + timevalsub(&cur_time, &io->submit_time); + if (cur_time.tv_sec > io->wqe_timeout) { + ocs_log_info(hw->os, "IO timeout xri=0x%x tag=0x%x type=%d elasped time:%u\n", + io->indicator, io->reqtag, io->type, cur_time.tv_sec); /* remove from active_wqe list so won't try to abort again */ ocs_list_remove(&hw->io_timed_wqe, io); /* save status of "timed out" for when abort completes */ io->status_saved = 1; - io->saved_status = SLI4_FC_WCQE_STATUS_TARGET_WQE_TIMEOUT; + io->saved_status = SLI4_FC_WCQE_STATUS_WQE_TIMEOUT; io->saved_ext = 0; io->saved_len = 0; /* now abort outstanding IO */ - rc = ocs_hw_io_abort(hw, io, FALSE, NULL, NULL); + rc = ocs_hw_io_abort(hw, io, TRUE, NULL, NULL); if (rc) { ocs_log_test(hw->os, "abort failed xri=%#x tag=%#x rc=%d\n", @@ -11237,7 +11256,6 @@ target_wqe_timer_cb(void *arg) /* delete existing timer; will kick off new timer after checking wqe timeouts */ hw->in_active_wqe_timer = TRUE; - ocs_del_timer(&hw->wqe_timer); /* Forward timer callback to execute in the mailbox completion processing context */ if (ocs_hw_async_call(hw, target_wqe_timer_nop_cb, hw)) { @@ -11250,7 +11268,7 @@ shutdown_target_wqe_timer(ocs_hw_t *hw) { uint32_t iters = 100; - if (hw->config.emulate_tgt_wqe_timeout) { + if (hw->config.emulate_wqe_timeout) { /* request active wqe timer shutdown, then wait for it to complete */ hw->active_wqe_timer_shutdown = TRUE; diff --git a/sys/dev/ocs_fc/ocs_hw.h b/sys/dev/ocs_fc/ocs_hw.h index d4ee85c3f52a..671aa40871f2 100644 --- a/sys/dev/ocs_fc/ocs_hw.h +++ b/sys/dev/ocs_fc/ocs_hw.h @@ -211,7 +211,7 @@ typedef enum { OCS_HW_WAR_VERSION, OCS_HW_DISABLE_AR_TGT_DIF, OCS_HW_EMULATE_I_ONLY_AAB, /**< emulate IAAB=0 for initiator-commands only */ - OCS_HW_EMULATE_TARGET_WQE_TIMEOUT, /**< enable driver timeouts for target WQEs */ + OCS_HW_EMULATE_WQE_TIMEOUT, /**< enable driver timeouts for WQEs */ OCS_HW_LINK_CONFIG_SPEED, OCS_HW_CONFIG_TOPOLOGY, OCS_HW_BOUNCE, @@ -520,7 +520,7 @@ typedef union ocs_hw_io_param_u { ocs_hw_dif_blk_size_e blk_size; uint32_t cmnd_size; uint16_t flags; - uint8_t timeout; + uint32_t timeout; uint32_t first_burst; } fcp_ini; } ocs_hw_io_param_t; @@ -576,8 +576,8 @@ struct ocs_hw_io_s { void *abort_arg; /**< argument passed to "abort done" callback */ ocs_ref_t ref; /**< refcount object */ size_t length; /**< needed for bug O127585: length of IO */ - uint8_t tgt_wqe_timeout; /**< timeout value for target WQEs */ - uint64_t submit_ticks; /**< timestamp when current WQE was submitted */ + uint32_t wqe_timeout; /**< timeout value for WQEs */ + struct timeval submit_time; /**< timestamp when current WQE was submitted */ uint32_t status_saved:1, /**< if TRUE, latched status should be returned */ abort_in_progress:1, /**< if TRUE, abort is in progress */ @@ -915,7 +915,7 @@ struct ocs_hw_s { uint16_t auto_xfer_rdy_app_tag_value; uint8_t dif_mode; /**< DIF mode to use */ uint8_t i_only_aab; /** Enable initiator-only auto-abort */ - uint8_t emulate_tgt_wqe_timeout; /** Enable driver target wqe timeouts */ + uint8_t emulate_wqe_timeout; /** Enable driver wqe timeouts */ uint32_t bounce:1; const char *queue_topology; /**< Queue topology string */ uint8_t auto_xfer_rdy_t10_enable; /** Enable t10 PI for auto xfer ready */ diff --git a/sys/dev/ocs_fc/ocs_scsi.c b/sys/dev/ocs_fc/ocs_scsi.c index 0e87cc0bed4b..af9fc798b01c 100644 --- a/sys/dev/ocs_fc/ocs_scsi.c +++ b/sys/dev/ocs_fc/ocs_scsi.c @@ -413,7 +413,7 @@ ocs_target_io_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, } break; - case SLI4_FC_WCQE_STATUS_TARGET_WQE_TIMEOUT: + case SLI4_FC_WCQE_STATUS_WQE_TIMEOUT: /* target IO timed out */ scsi_status = OCS_SCSI_STATUS_TIMEDOUT_AND_ABORTED; break; @@ -2209,6 +2209,10 @@ ocs_initiator_io_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, scsi_status = OCS_SCSI_STATUS_ERROR; } break; + case SLI4_FC_WCQE_STATUS_WQE_TIMEOUT: + /* IO timed out */ + scsi_status = OCS_SCSI_STATUS_TIMEDOUT_AND_ABORTED; + break; case SLI4_FC_WCQE_STATUS_DI_ERROR: if (ext_status & 0x01) { scsi_status = OCS_SCSI_STATUS_DIF_GUARD_ERROR; diff --git a/sys/dev/ocs_fc/ocs_xport.c b/sys/dev/ocs_fc/ocs_xport.c index d6b0d8740906..d997ea245132 100644 --- a/sys/dev/ocs_fc/ocs_xport.c +++ b/sys/dev/ocs_fc/ocs_xport.c @@ -524,9 +524,11 @@ ocs_xport_initialize(ocs_xport_t *xport) } } - if (ocs->target_io_timer_sec) { - ocs_log_debug(ocs, "setting target io timer=%d\n", ocs->target_io_timer_sec); - ocs_hw_set(&ocs->hw, OCS_HW_EMULATE_TARGET_WQE_TIMEOUT, TRUE); + if (ocs->target_io_timer_sec || ocs->enable_ini) { + if (ocs->target_io_timer_sec) + ocs_log_debug(ocs, "setting target io timer=%d\n", ocs->target_io_timer_sec); + + ocs_hw_set(&ocs->hw, OCS_HW_EMULATE_WQE_TIMEOUT, TRUE); } ocs_hw_callback(&ocs->hw, OCS_HW_CB_DOMAIN, ocs_domain_cb, ocs); diff --git a/sys/dev/ocs_fc/sli4.h b/sys/dev/ocs_fc/sli4.h index 4d8686ce8841..e9271df1530f 100644 --- a/sys/dev/ocs_fc/sli4.h +++ b/sys/dev/ocs_fc/sli4.h @@ -5345,7 +5345,7 @@ typedef struct sli4_fc_wqec_s { #define SLI4_FC_WCQE_STATUS_RX_ABORT_REQUEST 0x1b /* driver generated status codes; better not overlap with chip's status codes! */ -#define SLI4_FC_WCQE_STATUS_TARGET_WQE_TIMEOUT 0xff +#define SLI4_FC_WCQE_STATUS_WQE_TIMEOUT 0xff #define SLI4_FC_WCQE_STATUS_SHUTDOWN 0xfe #define SLI4_FC_WCQE_STATUS_DISPATCH_ERROR 0xfd From nobody Tue Dec 12 16:01:42 2023 X-Original-To: dev-commits-src-all@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 4SqNf06RFxz547Tg; Tue, 12 Dec 2023 16:01:44 +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 4SqNf05FNtz4Z3p; Tue, 12 Dec 2023 16:01:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702396904; h=from:from:reply-to:subject: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=Q6sSLg13Hi13m3/sUTfOBPIs0R0Xk7Ws+PJ0moneXuM=; b=WLU1GxMk0bdZ6Ugdvq8zKuuZNLhbILeo5uTVA/jFmV9koJC7rzbAEwnGFo3eNLX01HZ+LB md/4DJRexIIbtItJGH1Fp37I0va+dbHE5MvkPAX2jTXWhcYQeILjvUiyXSXM9/nOxzWVLO gYX0lRTEKKTukf8lnxRukRcNVvA1lqhVcY1eboB13rYeyRNR97uW12TDZ7KYCX+E/wgnIu dMp+YzLz1nDKA4QaRCTEVDmCi8na90ZKGdLt+lac9RTPoTG/KnOfpDFtLNRbhgmxzHX80I s1fRySeJISbFv3e2h6QrhLWud2VeO21FRWPiBRsw5R1meqkoAOWNMJWpwSV0Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702396904; a=rsa-sha256; cv=none; b=rMlRRtGCBdswK2gqqQ5u0+0gBiO4/RP4tRmOmU8jH0e/puFTdOCroq1xxQtBPaM/vH3dWn QGLZynR9uq9+2JdE355yMVt4WueubSaUnyojN6Rit6oRNH0yZ8KeBZgQSXi5AVPa6souJb YjvtvlAf5xjlIwjaCigJ5c5hMKIcb0hEzqSQWDwbt+zvBUJ1fhfuWWUxFTak+zgBNiNod9 +rQgBIWxWLZ1qCOOD+CnahiinHos+7PlEa+wcQ4qe5dKHMrC/lkjYmyIuWr5jLTf49rwLS 3itq6bHb/qVBMFi4EznEwho8e8epvxO2nRFyreIThREbUIPJIMJrtEOY3NA0LA== 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=1702396904; h=from:from:reply-to:subject: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=Q6sSLg13Hi13m3/sUTfOBPIs0R0Xk7Ws+PJ0moneXuM=; b=s3O2M29MFEZcw+CboZ+qpKotnUbWT145os/XUnXomqKd6DtRpO8JGyYNQEp4bWsqv4h2ij /O4bRATUcrECOUjdQ/Qu+smgFvb81qFmd6Tni/reWMtIsdAluevK0Z1KF7rf1WkawnB5Iu KBBO0ui6fblXNu7G83bMY0f0s1BNQvTqE0WKzo7FnkQft8OGvcAly1o9Tf+6G+7xJtpCNH JJC5PegR/0XcO8mkjDTh3pchgcdTbfTqYQS5zfYA8yKdeWkov2UYU8PNUlb70HODhVciWe SD4qG+zOxVUy7T0avTiQM5hqxvWhpRU2TvVHJpGZh6tlJXiXoC5O6EpUJA2i8w== Received: from [IPV6:2601:648:8384:fd00:35e0:5001:6a3c:b8e6] (unknown [IPv6:2601:648:8384:fd00:35e0:5001:6a3c:b8e6]) (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 4SqNf01Hg8zqnd; Tue, 12 Dec 2023 16:01:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <098c85ab-4210-455c-a3b9-773bf0ce87b7@FreeBSD.org> Date: Tue, 12 Dec 2023 08:01:42 -0800 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: fb17dfa0c83c - main - libicp: unbreak for armv6 after recent OpenZFS import Content-Language: en-US To: Dimitry Andric , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202312082310.3B8NA5cI026712@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202312082310.3B8NA5cI026712@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/8/23 3:10 PM, Dimitry Andric wrote: > The branch main has been updated by dim: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa > > commit fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa > Author: Dimitry Andric > AuthorDate: 2023-12-08 23:09:36 +0000 > Commit: Dimitry Andric > CommitDate: 2023-12-08 23:09:50 +0000 > > libicp: unbreak for armv6 after recent OpenZFS import > > The following upstream commit: > 727497ccdfcc module/icp/asm-arm/sha2: enable non-SIMD asm kernels on armv5/6 > > does indeed enable sha2 asm for earlier arm CPUs, but since libicp's > Makefile was not updated, this leads to: > > ld: error: undefined reference due to --no-allow-shlib-undefined: zfs_sha256_block_armv7 > > Fix it by compiling sha256-armv7.S and sha512-armv7.S for armv6 too. > > Fixes: 3494f7c019fc > --- > cddl/lib/libicp/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile > index 2d9bb3c67cb4..085818f2371a 100644 > --- a/cddl/lib/libicp/Makefile > +++ b/cddl/lib/libicp/Makefile > @@ -21,7 +21,7 @@ ASM_SOURCES_AS = \ > asm-x86_64/blake3/blake3_sse41.S > > CFLAGS+= -D__amd64 -D_SYS_STACK_H -UHAVE_AES > -.elif ${MACHINE_ARCH} == "armv7" > +.elif ${MACHINE_ARCH} == "armv6" || ${MACHINE_ARCH} == "armv7" Since this applies to all 32-bit arm flavors, should this be using ${MACHINE_CPUARCH} == "arm" instead? -- John Baldwin From nobody Tue Dec 12 17:14:47 2023 X-Original-To: dev-commits-src-all@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 4SqQGg4wcnz54C0t; Tue, 12 Dec 2023 17:15:07 +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 4SqQGg42Msz3HHK; Tue, 12 Dec 2023 17:15:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702401307; 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=InhrZwUPnMQur0CHnDeFFa6lcRSkJMAwpvMom7J9m4g=; b=R+N67oB2YCD61l41K7zzz9+bjrA4vXCjnMimeGzdgc9hFbDDFqUgopb3i+HBFaIONa3IHJ QLs9dxeEU0oKW9vqj1d7PM6snF0T1HMYB/B2SJdzrVm1tA3LGksEMDFuNsQcSj0rKnjHEd 9nJO8+cUtcDM/st8b3vKCo0fddvWqUk8UUDMcAjzOT7yvIAipGNgGsxg897wuLgpAzByt/ glCnlsh08ORhcS+n9a/Hz3OuKTkW/uPt8CRPg+DxNr2mrskfGUKviIUPpNfrvxoJoJNv1W JsjQCfoUERxThgHDTUrdTE6M0XJoAKI3/MKBsGv0bnBtYl1bYkgPFrZoSCJGjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702401307; a=rsa-sha256; cv=none; b=OAXXSDlMso8b0LRL1xKrtgNymn7fO1c4AX07wEftP6WRqUx6RFfWdBAxb32JqyV2iOY+sO X68bc7gq6Px1qaMThhueLOOp+xodwjNLniNdxJS+Z7fkCJM3jJGN2zVa1CxOH4hb5t0Eaj pS6XCxtffShghID8/sOdcNDhFogiGbWiwxklpdqhaN8ykaGd1TIX+jEldSgsD73dUyNY/G jppxsKoARDlLqRtJtK5q1KUTuDSzjnqWu/HRJjeyxXjreGiximZORQk8dUQ4CqB9dE/Yc9 XnsiTIM+KVRhCqnZH7RhSK2+P1dRzGn18+kfShf8R/vc/d5/oDhTHxs3RIdzbQ== 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=1702401307; 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=InhrZwUPnMQur0CHnDeFFa6lcRSkJMAwpvMom7J9m4g=; b=ra4X4rwZr7zfPj5RTcKzsu/B9X7AkOmlxiuSKl0QlmA/43VzyTWUhFaCYCXaMPePHgQbhN XCYBBa7NhIT/ZhT875BhValyv8OwpuMP4QhMthk9/8jVUQO28aOAokgA4NJRvJViGNXFTm uIln74PYscjWRHRjats7O1ZJaMDsVesmb02yzgojzAQCH5bd0S/3/fsl4/Y+DblukbF8Qq B1a6zOny4d33qXSRbBus2peDUERPQw6KQLSaBtfuOYpgu8Q3hFWNL0jW6sKo8H9/WSRYie hkGVoEyzsr0DuTRPSTuctuDYu/orO/AvFb8cAJqJOwAsDO5JqLCdcrqm05YNkw== 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 4SqQGg2Nhtzs72; Tue, 12 Dec 2023 17:15:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.wg.andric.com [10.69.1.2]) (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 27A6C3849E; Tue, 12 Dec 2023 18:15:06 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_54F359DF-2321-45A5-A23F-3405194A80EB"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: fb17dfa0c83c - main - libicp: unbreak for armv6 after recent OpenZFS import From: Dimitry Andric In-Reply-To: <098c85ab-4210-455c-a3b9-773bf0ce87b7@FreeBSD.org> Date: Tue, 12 Dec 2023 18:14:47 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: References: <202312082310.3B8NA5cI026712@gitrepo.freebsd.org> <098c85ab-4210-455c-a3b9-773bf0ce87b7@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_54F359DF-2321-45A5-A23F-3405194A80EB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 12 Dec 2023, at 17:01, John Baldwin wrote: >=20 > On 12/8/23 3:10 PM, Dimitry Andric wrote: >> The branch main has been updated by dim: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dfb17dfa0c83cc213400fe7e1ed7a3925= 3a4fcefa >> commit fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa >> Author: Dimitry Andric >> AuthorDate: 2023-12-08 23:09:36 +0000 >> Commit: Dimitry Andric >> CommitDate: 2023-12-08 23:09:50 +0000 >> libicp: unbreak for armv6 after recent OpenZFS import >> The following upstream commit: >> 727497ccdfcc module/icp/asm-arm/sha2: enable non-SIMD asm kernels = on armv5/6 >> does indeed enable sha2 asm for earlier arm CPUs, but since = libicp's >> Makefile was not updated, this leads to: >> ld: error: undefined reference due to = --no-allow-shlib-undefined: zfs_sha256_block_armv7 >> Fix it by compiling sha256-armv7.S and sha512-armv7.S for = armv6 too. >> Fixes: 3494f7c019fc >> --- >> cddl/lib/libicp/Makefile | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile >> index 2d9bb3c67cb4..085818f2371a 100644 >> --- a/cddl/lib/libicp/Makefile >> +++ b/cddl/lib/libicp/Makefile >> @@ -21,7 +21,7 @@ ASM_SOURCES_AS =3D \ >> asm-x86_64/blake3/blake3_sse41.S >> CFLAGS+=3D -D__amd64 -D_SYS_STACK_H -UHAVE_AES >> -.elif ${MACHINE_ARCH} =3D=3D "armv7" >> +.elif ${MACHINE_ARCH} =3D=3D "armv6" || ${MACHINE_ARCH} =3D=3D = "armv7" >=20 > Since this applies to all 32-bit arm flavors, should this be using > ${MACHINE_CPUARCH} =3D=3D "arm" instead? You may be right; if I read https://github.com/openzfs/zfs/commit/727497ccdfcc correctly: > module/icp/asm-arm/sha2: enable non-SIMD asm kernels on armv5/6 > My merged pull request #15557 fixes compilation of sha2 kernels on arm > v5/6. However, the compiler guards only allows sha256/512_armv7_impl = to > be used when __ARM_ARCH > 6. This patch enables these ASM kernels on = all > arm architectures. Some compiler guards are adjusted accordingly to > avoid the unnecessary compilation of SIMD (e.g., neon, armv8ce) = kernels > on old architectures. > > Reviewed-by: Brian Behlendorf > Signed-off-by: Shengqi Chen > Closes #15623 It's talking about "all arm architectures", but I'm not sure if this means all arm architectures supported by OpenZFS, or in general. I would assume the latter. -Dimitry --Apple-Mail=_54F359DF-2321-45A5-A23F-3405194A80EB 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZXiVBwAKCRCwXqMKLiCW o2d+AJ41TMrVnxeOArpfC5oU1at8GEZchACgqdeibOgIK7/0EJ0GjAh+3K6nvMA= =kEcF -----END PGP SIGNATURE----- --Apple-Mail=_54F359DF-2321-45A5-A23F-3405194A80EB-- From nobody Tue Dec 12 17:35:25 2023 X-Original-To: dev-commits-src-all@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 4SqQkM2Rysz54D4p for ; Tue, 12 Dec 2023 17:35:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (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 4SqQkM0pGkz3Kt5 for ; Tue, 12 Dec 2023 17:35:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50be9e6427dso6265997e87.1 for ; Tue, 12 Dec 2023 09:35:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1702402537; x=1703007337; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pffR6Gi0A+wl+KvwnjXRujz7wVIrcOsnXSoJdUnIQsE=; b=RESm14U7z+7mTMq+m81jE2Ywsy7/fIRTrcywduOSe/cXBkXpJhuNShbZJBrvjFe+Pm XYDyA7SYdgd2TctUxrUc2nJPuClBAMPihjy0aYY2u/wDl2W0RmGSiqHXT1cKB01lo/jW 2ifain0ODBnwEB/05dku+hyyv3YKhKae/D1axEn7Q0iy7sD+2+zKCVu81Hq82kMnSvvj +reipOPv2QPiloZwsV3r8GgU5so2iLDHyCTS6t1EU4Si5C2Ad/zkh6kB1MwIbPGLlFEr 8rAr1pUOiYZ8jex3Q1xd2ITDwa9IFtlpYhuDCZj84Ley0jPbkvQlidgm8bXs89KVMkM3 HY/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702402537; x=1703007337; 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=pffR6Gi0A+wl+KvwnjXRujz7wVIrcOsnXSoJdUnIQsE=; b=waXme1iEcdjdAtvbdDWeRm6dDgivg/GslM51jnoLfuKV5WLHS961zwTs3trKBMHpEV pnTS3iuynqS72NVJH4AJk5/Zy8UQzM13CDqwe2oAinAL3hefbj40uwlwPC280JX4GnME TKYmJdfGBHj6drjywkohZfy5o/f4GKSRdwOKkeYuRcXlDsKXR+A/A01lIV1//DzdceBF 3g0djRYZsr6LWTOrJeffog8omsNor2QwWQijE+wYAcohSjhVnbRwRz7yJHR6nYlg6xHx zXsT7sWZk6u2jpVJW+y3O2eniTibrTBi6eJxBHlLj9jjaKa4n9/HwjZUG7pIrmPdrEFy IZtQ== X-Gm-Message-State: AOJu0Yzm2jDG+lGbYyk/oaGO/my2LzTNmcMAw9+vQb8iEUVoaEkA+qaL FHm+nfXOW8vA5PE4CKum3vb3y5U8G6WRlNt9bhDh1g== X-Google-Smtp-Source: AGHT+IESRmEsYqgDe2GVwGEWVxu1OYovlybMJy/xb+GJLc2+1jgpZVRpmsNTvdWd3/so/LKq+rwzNR8OQMblTTm+mL0= X-Received: by 2002:a19:5f55:0:b0:50b:f37f:f394 with SMTP id a21-20020a195f55000000b0050bf37ff394mr2943497lfj.14.1702402537067; Tue, 12 Dec 2023 09:35:37 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202312082310.3B8NA5cI026712@gitrepo.freebsd.org> <098c85ab-4210-455c-a3b9-773bf0ce87b7@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Tue, 12 Dec 2023 10:35:25 -0700 Message-ID: Subject: Re: git: fb17dfa0c83c - main - libicp: unbreak for armv6 after recent OpenZFS import To: Dimitry Andric Cc: John Baldwin , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000007cb2aa060c537a1c" 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:2a00:1450::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4SqQkM0pGkz3Kt5 --0000000000007cb2aa060c537a1c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 12, 2023 at 10:15=E2=80=AFAM Dimitry Andric w= rote: > On 12 Dec 2023, at 17:01, John Baldwin wrote: > > > > On 12/8/23 3:10 PM, Dimitry Andric wrote: > >> The branch main has been updated by dim: > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dfb17dfa0c83cc213400fe7e1ed7a392= 53a4fcefa > >> commit fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa > >> Author: Dimitry Andric > >> AuthorDate: 2023-12-08 23:09:36 +0000 > >> Commit: Dimitry Andric > >> CommitDate: 2023-12-08 23:09:50 +0000 > >> libicp: unbreak for armv6 after recent OpenZFS import > >> The following upstream commit: > >> 727497ccdfcc module/icp/asm-arm/sha2: enable non-SIMD asm kernels > on armv5/6 > >> does indeed enable sha2 asm for earlier arm CPUs, but since > libicp's > >> Makefile was not updated, this leads to: > >> ld: error: undefined reference due to > --no-allow-shlib-undefined: zfs_sha256_block_armv7 > >> Fix it by compiling sha256-armv7.S and sha512-armv7.S for > armv6 too. > >> Fixes: 3494f7c019fc > >> --- > >> cddl/lib/libicp/Makefile | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile > >> index 2d9bb3c67cb4..085818f2371a 100644 > >> --- a/cddl/lib/libicp/Makefile > >> +++ b/cddl/lib/libicp/Makefile > >> @@ -21,7 +21,7 @@ ASM_SOURCES_AS =3D \ > >> asm-x86_64/blake3/blake3_sse41.S > >> CFLAGS+=3D -D__amd64 -D_SYS_STACK_H -UHAVE_AES > >> -.elif ${MACHINE_ARCH} =3D=3D "armv7" > >> +.elif ${MACHINE_ARCH} =3D=3D "armv6" || ${MACHINE_ARCH} =3D=3D "armv7= " > > > > Since this applies to all 32-bit arm flavors, should this be using > > ${MACHINE_CPUARCH} =3D=3D "arm" instead? > > You may be right; if I read > https://github.com/openzfs/zfs/commit/727497ccdfcc correctly: > > > module/icp/asm-arm/sha2: enable non-SIMD asm kernels on armv5/6 > > My merged pull request #15557 fixes compilation of sha2 kernels on arm > > v5/6. However, the compiler guards only allows sha256/512_armv7_impl to > > be used when __ARM_ARCH > 6. This patch enables these ASM kernels on al= l > > arm architectures. Some compiler guards are adjusted accordingly to > > avoid the unnecessary compilation of SIMD (e.g., neon, armv8ce) kernels > > on old architectures. > > > > Reviewed-by: Brian Behlendorf > > Signed-off-by: Shengqi Chen > > Closes #15623 > > It's talking about "all arm architectures", but I'm not sure if this > means all arm architectures supported by OpenZFS, or in general. I would > assume the latter. > Yea, John's comments are correct. The OpenZFS code expects this interface to be there and guards appropriately against the use of features only on armv7. Warner --0000000000007cb2aa060c537a1c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Dec 12, 2023 at 10:15=E2=80= =AFAM Dimitry Andric <dim@freebsd.org= > wrote:
= On 12 Dec 2023, at 17:01, John Baldwin <jhb@freebsd.org> wrote:
>
> On 12/8/23 3:10 PM, Dimitry Andric wrote:
>> The branch main has been updated by dim:
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3Dfb17dfa0c83cc213400fe7e1ed7a39253a4fc= efa
>> commit fb17dfa0c83cc213400fe7e1ed7a39253a4fcefa
>> Author:=C2=A0 =C2=A0 =C2=A0Dimitry Andric <dim@FreeBSD.org><= br> >> AuthorDate: 2023-12-08 23:09:36 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Dimitry Andric <dim@FreeBSD.org><= br> >> CommitDate: 2023-12-08 23:09:50 +0000
>>=C2=A0 =C2=A0 =C2=A0libicp: unbreak for armv6 after recent OpenZFS = import
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 The following upstream commit: >>=C2=A0 =C2=A0 =C2=A0727497ccdfcc module/icp/asm-arm/sha2: enable no= n-SIMD asm kernels on armv5/6
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 does indeed enable sha2 asm for = earlier arm CPUs, but since libicp's
>>=C2=A0 =C2=A0 =C2=A0Makefile was not updated, this leads to:
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ld: error: undefined refe= rence due to --no-allow-shlib-undefined: zfs_sha256_block_armv7
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Fix it by compiling sha256-armv7= .S and sha512-armv7.S for armv6 too.
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 3494f7c019fc
>> ---
>>=C2=A0 cddl/lib/libicp/Makefile | 2 +-
>>=C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile >> index 2d9bb3c67cb4..085818f2371a 100644
>> --- a/cddl/lib/libicp/Makefile
>> +++ b/cddl/lib/libicp/Makefile
>> @@ -21,7 +21,7 @@ ASM_SOURCES_AS =3D \
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 asm-x86_64/blake3/blake3_sse41.S=
>>=C2=A0 =C2=A0 CFLAGS+=3D -D__amd64 -D_SYS_STACK_H -UHAVE_AES
>> -.elif ${MACHINE_ARCH} =3D=3D "armv7"
>> +.elif ${MACHINE_ARCH} =3D=3D "armv6" || ${MACHINE_ARCH}= =3D=3D "armv7"
>
> Since this applies to all 32-bit arm flavors, should this be using
> ${MACHINE_CPUARCH} =3D=3D "arm" instead?

You may be right; if I read
https://github.com/openzfs/zfs/commit/727497ccdfcc= correctly:

> module/icp/asm-arm/sha2: enable non-SIMD asm kernels on armv5/6
> My merged pull request #15557 fixes compilation of sha2 kernels on arm=
> v5/6. However, the compiler guards only allows sha256/512_armv7_impl t= o
> be used when __ARM_ARCH > 6. This patch enables these ASM kernels o= n all
> arm architectures. Some compiler guards are adjusted accordingly to > avoid the unnecessary compilation of SIMD (e.g., neon, armv8ce) kernel= s
> on old architectures.
>
> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
> Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
> Closes #15623

It's talking about "all arm architectures", but I'm not s= ure if this
means all arm architectures supported by OpenZFS, or in general. I would assume the latter.

Yea, John's comm= ents are correct. The OpenZFS code expects this interface
to be t= here and guards appropriately against the use of features only on armv7.

Warner=C2=A0
--0000000000007cb2aa060c537a1c-- From nobody Tue Dec 12 19:11:37 2023 X-Original-To: dev-commits-src-all@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 4SqSs614Kwz54KWv; Tue, 12 Dec 2023 19:11: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 4SqSs60d3Wz3YMD; Tue, 12 Dec 2023 19:11:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702408298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRHK8t1UNtbwU7rE30j2Y/y1naZ6HO6VDFt/ZFLGd+A=; b=xfN63YnRLXgyg6I+O8aY7G9iecJn+NJ/Kh5IuaXMUB75CXsY6Gr9/6Nbm2yBSVzjfNlFq/ fElRCfugoEjiHcFALGOQ0Hs/WCOSM7aCwicymJkn4RK4EmqTuh8iM0U6kLLdVH4fHRM85V RqK9MFvkP9I5tXR89l2KTeLoOzvHztbJy7ivvoC96Uu5FCRdu9/xWG8h560q2gD48lBCth NEsQXc2DP9NDI+d5wzwzwSHKcpL3/LXvkNXv540/WtVc4vWWPR83NRCLW862qdP5ov4OkM 1ir0eVbo4+5N7T6xbZwmJcmiL8RDWmZOtd3D9pgdkysJW6QOZbrvxJXUOAb/9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702408298; a=rsa-sha256; cv=none; b=lpH794IIa634JjGYTC+0cQnd+isrftYMe2VXrqoiboxt9d8xBEljU1snk4t/s0bclgmAMr Ts6SvO6dPvmQmI5xSFI1TXATdugq4vRkOQFpa0Vzy5CmvpCXN5YwS0RpMOaKPkt9AHgwUv x1sUNGUGZkogzIQJZmgekKCtysoxYB9GgaQt4Eh0a2g6QA5GGl3QO+UC7CWK6Vi9Yz2uLv Q2q48UJIbts2tP4SEj3nVULR38f+9jOWNzpCiQG40S2BU+uXbrtdfJx1wQOHhMjzM651GC y/AtTp1OaOplyD4QHSMg4QUEau7MLfuoMWtRy4Bqz5IPETq3l0rL1XBmvV2HEg== 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=1702408298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRHK8t1UNtbwU7rE30j2Y/y1naZ6HO6VDFt/ZFLGd+A=; b=RyMc1jdJut8mNXlu69JoOFXFn96/yxpZt27AP162VH/4KX77CYCQhyOOyFD+l44mRtRlen j68G9RuUWAoMl06XlqpQLeNgzp21HDiNOr38d85ViiY4HYQ3g78mfTVdx6o3mSqTde0095 cpK6F3EteSoHr9bEtGlou+9V8FGBQcsvWg9xjPDP9L8049R1eoS/mOvNoTIvTF8mlEk+G9 CAYqXAW73PDPSCXfFpuAMq2eZni/tGyXpwIySTdi8Pog3///evVr43s6d6yN09p9xOtGT9 vqtRsLHTJiQ+MY0Oty1xdm06lqrACIW5BR8Ud1LjFxOzvF8TGq6kftwvenvB5A== 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 4SqSs56nQCzCQ9; Tue, 12 Dec 2023 19: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 3BCJBbnI084751; Tue, 12 Dec 2023 19: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 3BCJBbQS084748; Tue, 12 Dec 2023 19:11:37 GMT (envelope-from git) Date: Tue, 12 Dec 2023 19:11:37 GMT Message-Id: <202312121911.3BCJBbQS084748@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: 6fa843f6e647 - main - nfsclient: Propagate copyin() errors from nfsm_uiombuf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 6fa843f6e647a1a1e0e42af1e7abc9e903699f31 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6fa843f6e647a1a1e0e42af1e7abc9e903699f31 commit 6fa843f6e647a1a1e0e42af1e7abc9e903699f31 Author: Mark Johnston AuthorDate: 2023-12-12 01:04:56 +0000 Commit: Mark Johnston CommitDate: 2023-12-12 19:05:24 +0000 nfsclient: Propagate copyin() errors from nfsm_uiombuf() Approved by: so Security: SA-23:18.nfsclient Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clcomsubs.c | 23 ++++++++++++++++------- sys/fs/nfsclient/nfs_clrpcops.c | 23 ++++++++++++++++++++--- sys/fs/nfsclient/nfs_clvnops.c | 4 ++-- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 133850dcde0e..578fb3ce1340 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -370,7 +370,7 @@ int nfsrpc_destroysession(struct nfsmount *, struct nfsclsession *, struct ucred *, NFSPROC_T *); /* nfs_clcomsubs.c */ -void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); +int nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); struct mbuf *nfsm_uiombuflist(struct uio *, int, u_int); u_int8_t *nfscl_getmyip(struct nfsmount *, struct in6_addr *, int *); int nfsm_getfh(struct nfsrv_descript *, struct nfsfh **); diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c index 7912ab56140f..270f39d03c90 100644 --- a/sys/fs/nfsclient/nfs_clcomsubs.c +++ b/sys/fs/nfsclient/nfs_clcomsubs.c @@ -51,12 +51,12 @@ NFSCLSTATEMUTEX; * copies a uio scatter/gather list to an mbuf chain. * NOTE: can only handle iovcnt == 1 */ -void +int nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) { char *uiocp; struct mbuf *mp, *mp2; - int xfer, left, mlen; + int error, xfer, left, mlen; int uiosiz, clflg, rem; char *mcp, *tcp; @@ -104,8 +104,11 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) + return (error); + } mp->m_len += xfer; left -= xfer; uiocp += xfer; @@ -148,6 +151,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) } nd->nd_bpos = mcp; nd->nd_mb = mp; + return (0); } /* @@ -160,7 +164,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) { char *uiocp; struct mbuf *mp, *mp2, *firstmp; - int extpg, extpgsiz = 0, i, left, mlen, rem, xfer; + int error, extpg, extpgsiz = 0, i, left, mlen, rem, xfer; int uiosiz, clflg; char *mcp, *tcp; @@ -218,8 +222,13 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) { + m_freem(firstmp); + return (NULL); + } + } mp->m_len += xfer; mcp += xfer; if (maxext > 0) { diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 86c2959b1209..e9acedfb6473 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2104,7 +2104,12 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode, *tl++ = x; /* total to this offset */ *tl = x; /* size of this write */ } - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + free(nd, M_TEMP); + return (error); + } /* * Although it is tempting to do a normal Getattr Op in the * NFSv4 compound, the result can be a nearly hung client @@ -6361,6 +6366,10 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, iovlen = uiop->uio_iov->iov_len; m = nfsm_uiombuflist(uiop, len, 0); + if (m == NULL) { + error = EFAULT; + break; + } } tdrpc = drpc = malloc(sizeof(*drpc) * (mirrorcnt - 1), M_TEMP, M_WAITOK | @@ -6933,7 +6942,11 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, *tl++ = txdr_unsigned(len); *tl++ = txdr_unsigned(*iomode); *tl = txdr_unsigned(len); - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } nrp = dsp->nfsclds_sockp; if (nrp == NULL) /* If NULL, use the MDS socket. */ @@ -9057,7 +9070,11 @@ nfsrpc_setextattr(vnode_t vp, const char *name, struct uio *uiop, nfsm_strtom(nd, name, strlen(name)); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(uiop->uio_resid); - nfsm_uiombuf(nd, uiop, uiop->uio_resid); + error = nfsm_uiombuf(nd, uiop, uiop->uio_resid); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); NFSGETATTR_ATTRBIT(&attrbits); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 5c9ca69b5d51..a690e988b4b3 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1587,7 +1587,7 @@ ncl_readrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred) error = nfscl_doiods(vp, uiop, NULL, NULL, NFSV4OPEN_ACCESSREAD, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "readrpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva, &attrflag); if (attrflag) { @@ -1618,7 +1618,7 @@ ncl_writerpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, error = nfscl_doiods(vp, uiop, iomode, must_commit, NFSV4OPEN_ACCESSWRITE, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "writerpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_write(vp, uiop, iomode, must_commit, cred, uiop->uio_td, &nfsva, &attrflag, called_from_strategy, ioflag); From nobody Tue Dec 12 19:13:50 2023 X-Original-To: dev-commits-src-all@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 4SqSvf3zXwz54KBr; Tue, 12 Dec 2023 19:13: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 4SqSvf2ghDz3YtX; Tue, 12 Dec 2023 19:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702408430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r5Ff1ckif/F99WBCB/k0hO+AcdyHT5RYhoz1M0KNZ9U=; b=UW3PW6bznj+z5bHticMP1I9irPBJZB8YKPpLtPYSR8cRdrKyAI9sbbzyoGYTY+fxLo5esG FfMZh3uELoMv0ZqWMs54tMIpKC8HtH05NYOif/ZzncE4XI7oI62ZeDmEbLIBB3nO6WaTb2 Oa+Qh6YmDwo6ygRUdKShCGs9vA8hbf/iBBzU22gdx4SDt5WByj/qYq4LyxNso4ADgn2rBJ BjXGJJFNuw0qeidQIFi1HlflVNV5mRg1S2V7/A9PqMZ2tZaSQewEzcxmBCFBmFDT2T0Nbe gsc0CkKxHNDH/t+E1rgzlMTf47jHmNzYn/0XdwkNOCiT89jruQgCt4+gGKEygQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702408430; a=rsa-sha256; cv=none; b=uugUl6PyTdktpdTYNLipT3DtiLZHfstOZjVy7PYI00F3U5+BKzDFgUhbjWLeX/w7ZulIf2 Z9ac3sn7IWmiGxrBPIN0jBSPsxgX42Fmcb79T7uUlqg9D+fwhYoSVlLKZ4dRC/GkARVFFx TFxziQTNMf+wQD+CHkMVKTeBLzwKOLUCsNzIvD9I7dfMzzv6VhoZy3Ypctb0nWWMzWy2yz UtYE280jtMDqt14x1MudVs5UzCyWHCYzaFlJxXKn6VagOUmpFEDLc9TyiXPbCb+L9CLMi+ 0528EkCMmN1v+lvTi5q7AAPrX0F6WvDc71OjvxRNAHHEh9K9R1cLqMY/1Nl7qg== 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=1702408430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r5Ff1ckif/F99WBCB/k0hO+AcdyHT5RYhoz1M0KNZ9U=; b=jtwwVI7rA/DR/2NI0fZ/nF9aXQAYNuFTwklxjIbVqSwbi+e3m9iL84/ie5crO/MZOyn/eL pfvSyTdcj0s4kCQ8Ao3ceBc4WX/o/t1g+I9450iaBrSzySU4hsveXwIyGOQUck1nk4M1eS GPraPTIGmi98bY8RpZLQvRMdc038IWwPn0FeaLjdWGPXnoCNUSX9o1pipy9Zh71FWoSifD KTxTWSabjiFQaz2EjYB14ILaOEwfJsQ7J1Iu+WRrtuoRwNqyuvSJAyAnpS5L/EECLF5m4J T4JlzvFsMbbgx5lWzps0NkqIgg9bQ40Oi+uMM7YqXBUfAYlyDWzkQmL9yh89eg== 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 4SqSvf1ds5zCbS; Tue, 12 Dec 2023 19:13: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 3BCJDoCG087110; Tue, 12 Dec 2023 19:13:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCJDo9R087107; Tue, 12 Dec 2023 19:13:50 GMT (envelope-from git) Date: Tue, 12 Dec 2023 19:13:50 GMT Message-Id: <202312121913.3BCJDo9R087107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8d42f85d9d7b - stable/14 - nfsclient: Propagate copyin() errors from nfsm_uiombuf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8d42f85d9d7b5394edbe6f18c1e96c0d35d49b3c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8d42f85d9d7b5394edbe6f18c1e96c0d35d49b3c commit 8d42f85d9d7b5394edbe6f18c1e96c0d35d49b3c Author: Mark Johnston AuthorDate: 2023-12-12 01:04:56 +0000 Commit: Mark Johnston CommitDate: 2023-12-12 19:11:51 +0000 nfsclient: Propagate copyin() errors from nfsm_uiombuf() Approved by: so Security: SA-23:18.nfsclient Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation (cherry picked from commit 6fa843f6e647a1a1e0e42af1e7abc9e903699f31) --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clcomsubs.c | 23 ++++++++++++++++------- sys/fs/nfsclient/nfs_clrpcops.c | 23 ++++++++++++++++++++--- sys/fs/nfsclient/nfs_clvnops.c | 4 ++-- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 133850dcde0e..578fb3ce1340 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -370,7 +370,7 @@ int nfsrpc_destroysession(struct nfsmount *, struct nfsclsession *, struct ucred *, NFSPROC_T *); /* nfs_clcomsubs.c */ -void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); +int nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); struct mbuf *nfsm_uiombuflist(struct uio *, int, u_int); u_int8_t *nfscl_getmyip(struct nfsmount *, struct in6_addr *, int *); int nfsm_getfh(struct nfsrv_descript *, struct nfsfh **); diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c index 7912ab56140f..270f39d03c90 100644 --- a/sys/fs/nfsclient/nfs_clcomsubs.c +++ b/sys/fs/nfsclient/nfs_clcomsubs.c @@ -51,12 +51,12 @@ NFSCLSTATEMUTEX; * copies a uio scatter/gather list to an mbuf chain. * NOTE: can only handle iovcnt == 1 */ -void +int nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) { char *uiocp; struct mbuf *mp, *mp2; - int xfer, left, mlen; + int error, xfer, left, mlen; int uiosiz, clflg, rem; char *mcp, *tcp; @@ -104,8 +104,11 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) + return (error); + } mp->m_len += xfer; left -= xfer; uiocp += xfer; @@ -148,6 +151,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) } nd->nd_bpos = mcp; nd->nd_mb = mp; + return (0); } /* @@ -160,7 +164,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) { char *uiocp; struct mbuf *mp, *mp2, *firstmp; - int extpg, extpgsiz = 0, i, left, mlen, rem, xfer; + int error, extpg, extpgsiz = 0, i, left, mlen, rem, xfer; int uiosiz, clflg; char *mcp, *tcp; @@ -218,8 +222,13 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) { + m_freem(firstmp); + return (NULL); + } + } mp->m_len += xfer; mcp += xfer; if (maxext > 0) { diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 207a51c4aece..c986b3927f1b 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2104,7 +2104,12 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode, *tl++ = x; /* total to this offset */ *tl = x; /* size of this write */ } - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + free(nd, M_TEMP); + return (error); + } /* * Although it is tempting to do a normal Getattr Op in the * NFSv4 compound, the result can be a nearly hung client @@ -6321,6 +6326,10 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, iovlen = uiop->uio_iov->iov_len; m = nfsm_uiombuflist(uiop, len, 0); + if (m == NULL) { + error = EFAULT; + break; + } } tdrpc = drpc = malloc(sizeof(*drpc) * (mirrorcnt - 1), M_TEMP, M_WAITOK | @@ -6893,7 +6902,11 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, *tl++ = txdr_unsigned(len); *tl++ = txdr_unsigned(*iomode); *tl = txdr_unsigned(len); - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } nrp = dsp->nfsclds_sockp; if (nrp == NULL) /* If NULL, use the MDS socket. */ @@ -8982,7 +8995,11 @@ nfsrpc_setextattr(vnode_t vp, const char *name, struct uio *uiop, nfsm_strtom(nd, name, strlen(name)); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(uiop->uio_resid); - nfsm_uiombuf(nd, uiop, uiop->uio_resid); + error = nfsm_uiombuf(nd, uiop, uiop->uio_resid); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); NFSGETATTR_ATTRBIT(&attrbits); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index cfb5e90739a4..e93f8e83daa4 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1587,7 +1587,7 @@ ncl_readrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred) error = nfscl_doiods(vp, uiop, NULL, NULL, NFSV4OPEN_ACCESSREAD, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "readrpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva, &attrflag); if (attrflag) { @@ -1618,7 +1618,7 @@ ncl_writerpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, error = nfscl_doiods(vp, uiop, iomode, must_commit, NFSV4OPEN_ACCESSWRITE, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "writerpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_write(vp, uiop, iomode, must_commit, cred, uiop->uio_td, &nfsva, &attrflag, called_from_strategy, ioflag); From nobody Tue Dec 12 19:14:16 2023 X-Original-To: dev-commits-src-all@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 4SqSw85DCLz54KX6; Tue, 12 Dec 2023 19:14: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 4SqSw84VWnz3ZXv; Tue, 12 Dec 2023 19:14:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702408456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8uUG/tfpElWr1EuNdmzQujwetGkg2h7M/c8ZRh0VsM0=; b=a45LEyURCOGJn1sl4RHeHleQ9nECLBDRk8PVZQRR+r2yu1ZEMfMWN80IYDCpreiZUUiXyo ananRkJU3MVfneVZsddDaXAIgJRwny9aaVlfbeW/5Ty5LIDpRQ4QVWLCIDEfW5lz2W8VD4 sdcOYjc2+fMGVSvYXtmC7gOl7LHf8XyfJuZ5tyiL8DGnuWaRJx45A1MMRnKrRiK027liHm McnXi4D2GriIsPpTQnsUBkpWYNFEfN9rrTQVF94TfrAWWhHzdrJzNbw9UI1nEuPLDTy1uY S4QvvMAEEchiMbzKEH0B5n73Uq7tlETKd204mmJLx6E0YRTtbIC+bNCaYkQ96A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702408456; a=rsa-sha256; cv=none; b=D6D7Y/whBR4GBuTtHeUMgqjtT2QHt7YleScMmH/+Xn4KP/qliwfNXlCC/C3wzmYgljHghS 7LHFHXFQKACWkmf4oz06s6Va6+MaaogfOSRgw1VqpeEjZ9ftqf4F9MLDX08acXRMkatdYj vijaKe2IVTVgqYEyCtsCtFMG5toXnUc1SuW8M2ndwEMNegzWPsQifz7Cqz13qwafhYt45H t3g6MQoAK3cgXvf7+970xa+MCpoHG0uR3vRXa0+LzS1L87w7epi9TAmkSEcCE4rNmEMdjz iKGhN8yNErQ8sXlPRBqkQbTRfHMk6/L+HUdNLmv/Bvf4TqBTDE/v3LNnlChFDA== 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=1702408456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8uUG/tfpElWr1EuNdmzQujwetGkg2h7M/c8ZRh0VsM0=; b=shvBqeQCa8T/so0nsDFPS1qvI4hE/djubssbTjdvwGf6JzOREIrueshv6ymlO143zXgnA5 DWeAWhQbpt8gk3M1Ft/w1Tvjd0aZUx4PClFriiu75scl3ATmLO1EZNskKGLhkNDD53E7vk PdejFjX8YjyX+83N6AOyAeJbRYndAESJYL0BDzWwcOGa9+pzppgwmtHbkIAXsyR4lR1UO+ 9g4LFV4GGOdaRqHFw54bjHA9xil2LZN5oPxn/wBTzDSEE7Rq+lQ+XNgLDtHMuMWW8NBBOJ oyfmf7XlDWC8IOd35XSIRQTHHyLW6hT0EzX31WzFXrYrOIrrwJFJXDO5nKwgiw== 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 4SqSw83Z1GzCbT; Tue, 12 Dec 2023 19:14:16 +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 3BCJEG8r087293; Tue, 12 Dec 2023 19:14:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCJEGgm087290; Tue, 12 Dec 2023 19:14:16 GMT (envelope-from git) Date: Tue, 12 Dec 2023 19:14:16 GMT Message-Id: <202312121914.3BCJEGgm087290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f1d1d50e1d08 - stable/13 - nfsclient: Propagate copyin() errors from nfsm_uiombuf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: f1d1d50e1d089f0bfcd38e5f08b1e8bf5a1d64c3 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f1d1d50e1d089f0bfcd38e5f08b1e8bf5a1d64c3 commit f1d1d50e1d089f0bfcd38e5f08b1e8bf5a1d64c3 Author: Mark Johnston AuthorDate: 2023-12-12 01:04:56 +0000 Commit: Mark Johnston CommitDate: 2023-12-12 19:12:06 +0000 nfsclient: Propagate copyin() errors from nfsm_uiombuf() Approved by: so Security: SA-23:18.nfsclient Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation (cherry picked from commit 6fa843f6e647a1a1e0e42af1e7abc9e903699f31) --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clcomsubs.c | 23 ++++++++++++++++------- sys/fs/nfsclient/nfs_clrpcops.c | 23 ++++++++++++++++++++--- sys/fs/nfsclient/nfs_clvnops.c | 4 ++-- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 61badf781a0a..8cdc08fba433 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -367,7 +367,7 @@ int nfsrpc_destroysession(struct nfsmount *, struct nfsclsession *, struct ucred *, NFSPROC_T *); /* nfs_clcomsubs.c */ -void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); +int nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); struct mbuf *nfsm_uiombuflist(struct uio *, int, u_int); u_int8_t *nfscl_getmyip(struct nfsmount *, struct in6_addr *, int *); int nfsm_getfh(struct nfsrv_descript *, struct nfsfh **); diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c index f52de5d601ee..f2031220b80e 100644 --- a/sys/fs/nfsclient/nfs_clcomsubs.c +++ b/sys/fs/nfsclient/nfs_clcomsubs.c @@ -51,12 +51,12 @@ NFSCLSTATEMUTEX; * copies a uio scatter/gather list to an mbuf chain. * NOTE: can only handle iovcnt == 1 */ -void +int nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) { char *uiocp; struct mbuf *mp, *mp2; - int xfer, left, mlen; + int error, xfer, left, mlen; int uiosiz, clflg, rem; char *mcp, *tcp; @@ -104,8 +104,11 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) + return (error); + } mp->m_len += xfer; left -= xfer; uiocp += xfer; @@ -148,6 +151,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) } nd->nd_bpos = mcp; nd->nd_mb = mp; + return (0); } /* @@ -160,7 +164,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) { char *uiocp; struct mbuf *mp, *mp2, *firstmp; - int extpg, extpgsiz = 0, i, left, mlen, rem, xfer; + int error, extpg, extpgsiz = 0, i, left, mlen, rem, xfer; int uiosiz, clflg; char *mcp, *tcp; @@ -218,8 +222,13 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) { + m_freem(firstmp); + return (NULL); + } + } mp->m_len += xfer; mcp += xfer; if (maxext > 0) { diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 569132aee43c..63b9f7755fd3 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -1929,7 +1929,12 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode, *tl++ = x; /* total to this offset */ *tl = x; /* size of this write */ } - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + free(nd, M_TEMP); + return (error); + } /* * Although it is tempting to do a normal Getattr Op in the * NFSv4 compound, the result can be a nearly hung client @@ -6043,6 +6048,10 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, iovlen = uiop->uio_iov->iov_len; m = nfsm_uiombuflist(uiop, len, 0); + if (m == NULL) { + error = EFAULT; + break; + } } tdrpc = drpc = malloc(sizeof(*drpc) * (mirrorcnt - 1), M_TEMP, M_WAITOK | @@ -6615,7 +6624,11 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, *tl++ = txdr_unsigned(len); *tl++ = txdr_unsigned(*iomode); *tl = txdr_unsigned(len); - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } nrp = dsp->nfsclds_sockp; if (nrp == NULL) /* If NULL, use the MDS socket. */ @@ -8701,7 +8714,11 @@ nfsrpc_setextattr(vnode_t vp, const char *name, struct uio *uiop, nfsm_strtom(nd, name, strlen(name)); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(uiop->uio_resid); - nfsm_uiombuf(nd, uiop, uiop->uio_resid); + error = nfsm_uiombuf(nd, uiop, uiop->uio_resid); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); NFSGETATTR_ATTRBIT(&attrbits); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 02449e64e508..642963694a0a 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1581,7 +1581,7 @@ ncl_readrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred) error = nfscl_doiods(vp, uiop, NULL, NULL, NFSV4OPEN_ACCESSREAD, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "readrpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva, &attrflag, NULL); if (attrflag) { @@ -1612,7 +1612,7 @@ ncl_writerpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, error = nfscl_doiods(vp, uiop, iomode, must_commit, NFSV4OPEN_ACCESSWRITE, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "writerpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_write(vp, uiop, iomode, must_commit, cred, uiop->uio_td, &nfsva, &attrflag, called_from_strategy, ioflag); From nobody Tue Dec 12 19:17:36 2023 X-Original-To: dev-commits-src-all@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 4SqT002zLyz54KYr; Tue, 12 Dec 2023 19:17: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 4SqT002Y0Bz3b2j; Tue, 12 Dec 2023 19:17:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702408656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VB8j/KWsnpeiZGbvXyyXIl/RbyJy+0QK0pxAY3i0xXg=; b=bDR1wDP3gRcQQvPa2wPbtroyEIvg2AsBDwKzWGmwGz5LAD4SWPNCKJX8efL6EJRSyONVZn 7s1HhnfczgUlrKgUMoLGN8Ctc6jB+O3FgAW7sQg84a68xdWchQiE48As3nYfmkGoSsgD4/ uJDvBaDqveph3fpvlSofsLm7k3PLv9d28zzM4wqArBSwTGDKU85nOeIHuZT0Vn6YUgK+Y9 rAd6wQzWtkBPXjygK3CTJ8roNw1sLLau84Gc2lBR5TVTwF9Gr6lu6gkBlRuFskJQxc1k6F mJ9vGMzAhRkn8zjDO2+jEnm1PW9IqTOVV69Nt45wcjtmCVzMlCXRmIMoGvIi5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702408656; a=rsa-sha256; cv=none; b=GSPj3yKNpUtRf/OWV2pweg3HYhrKcHnRdRmkixvoeALE4uQHD/RJYd6f9hqQL8Ae+ZOqRs 3Z082Tkr5tUMWLf+EqvB3Vcax1W44IrrBeOtSmnGoY4Z1pHdtelmxf5FQDPkvED4LzArHm WGlFSFsZ+rRb8U2C7JeeoCHBRCkhpjBYjj+YLLHOSRA/on3WUeKDIZmKZm36d+UjDUO22D sJZYWnPumruk8UCATXIcJdGVfuPX4ADGjdy7q8ZaB6RKhJZM2Rk6jHqNiYsWmKYB3Ny6ZQ zuwXMmbrtSUCuNeMDCASllvtOoBxnhSRMGe/p+0v4lpPvE9U06OrSP+1LdsFXA== 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=1702408656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VB8j/KWsnpeiZGbvXyyXIl/RbyJy+0QK0pxAY3i0xXg=; b=E2wuHSRMr9auUANSAc04jOluiNRH28vsDV0aYO1Co4QBXjGHLU8qlgGoti0y5QeuahDhfj SLWayzkN0LxzcysnK7NYbAgBjAHJYBcFimaUm7VjDLQgy8KueW36nlfpvGs0+ZQQm3cI+E USVuK8Ez+T7WrDl8Yue83DwpOGJ6ofmn6AIGenfoCCmoVFvu7xUTwLkToQCpUEmKlHvfqx JVHysM80Wird3io9PO01c81EL5/G7lzr0fh6dqngn6vqcQTrciBXnDquq1DHP9rvI4741u C6ulXw6kGugI3Au3+b1Qi3Z7iqSHv8igjHYCAboxZiwY6wHQAnLug/yIA3LiFg== 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 4SqT001bQDzCZl; Tue, 12 Dec 2023 19:17: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 3BCJHaFf087918; Tue, 12 Dec 2023 19:17:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCJHaRY087915; Tue, 12 Dec 2023 19:17:36 GMT (envelope-from git) Date: Tue, 12 Dec 2023 19:17:36 GMT Message-Id: <202312121917.3BCJHaRY087915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ab60666a00c9 - releng/14.0 - nfsclient: Propagate copyin() errors from nfsm_uiombuf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: ab60666a00c9af196f2c1e3532dbedc1e8cf3687 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ab60666a00c9af196f2c1e3532dbedc1e8cf3687 commit ab60666a00c9af196f2c1e3532dbedc1e8cf3687 Author: Mark Johnston AuthorDate: 2023-12-12 01:04:56 +0000 Commit: Mark Johnston CommitDate: 2023-12-12 19:14:05 +0000 nfsclient: Propagate copyin() errors from nfsm_uiombuf() Approved by: so Security: SA-23:18.nfsclient Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation (cherry picked from commit 6fa843f6e647a1a1e0e42af1e7abc9e903699f31) (cherry picked from commit 8d42f85d9d7b5394edbe6f18c1e96c0d35d49b3c) --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clcomsubs.c | 23 ++++++++++++++++------- sys/fs/nfsclient/nfs_clrpcops.c | 23 ++++++++++++++++++++--- sys/fs/nfsclient/nfs_clvnops.c | 4 ++-- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 133850dcde0e..578fb3ce1340 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -370,7 +370,7 @@ int nfsrpc_destroysession(struct nfsmount *, struct nfsclsession *, struct ucred *, NFSPROC_T *); /* nfs_clcomsubs.c */ -void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); +int nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); struct mbuf *nfsm_uiombuflist(struct uio *, int, u_int); u_int8_t *nfscl_getmyip(struct nfsmount *, struct in6_addr *, int *); int nfsm_getfh(struct nfsrv_descript *, struct nfsfh **); diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c index 7912ab56140f..270f39d03c90 100644 --- a/sys/fs/nfsclient/nfs_clcomsubs.c +++ b/sys/fs/nfsclient/nfs_clcomsubs.c @@ -51,12 +51,12 @@ NFSCLSTATEMUTEX; * copies a uio scatter/gather list to an mbuf chain. * NOTE: can only handle iovcnt == 1 */ -void +int nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) { char *uiocp; struct mbuf *mp, *mp2; - int xfer, left, mlen; + int error, xfer, left, mlen; int uiosiz, clflg, rem; char *mcp, *tcp; @@ -104,8 +104,11 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) + return (error); + } mp->m_len += xfer; left -= xfer; uiocp += xfer; @@ -148,6 +151,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) } nd->nd_bpos = mcp; nd->nd_mb = mp; + return (0); } /* @@ -160,7 +164,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) { char *uiocp; struct mbuf *mp, *mp2, *firstmp; - int extpg, extpgsiz = 0, i, left, mlen, rem, xfer; + int error, extpg, extpgsiz = 0, i, left, mlen, rem, xfer; int uiosiz, clflg; char *mcp, *tcp; @@ -218,8 +222,13 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) { + m_freem(firstmp); + return (NULL); + } + } mp->m_len += xfer; mcp += xfer; if (maxext > 0) { diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 8fe9158384a0..7f886ad286e7 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2046,7 +2046,12 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode, *tl++ = x; /* total to this offset */ *tl = x; /* size of this write */ } - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + free(nd, M_TEMP); + return (error); + } /* * Although it is tempting to do a normal Getattr Op in the * NFSv4 compound, the result can be a nearly hung client @@ -6261,6 +6266,10 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, iovlen = uiop->uio_iov->iov_len; m = nfsm_uiombuflist(uiop, len, 0); + if (m == NULL) { + error = EFAULT; + break; + } } tdrpc = drpc = malloc(sizeof(*drpc) * (mirrorcnt - 1), M_TEMP, M_WAITOK | @@ -6833,7 +6842,11 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, *tl++ = txdr_unsigned(len); *tl++ = txdr_unsigned(*iomode); *tl = txdr_unsigned(len); - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } nrp = dsp->nfsclds_sockp; if (nrp == NULL) /* If NULL, use the MDS socket. */ @@ -8918,7 +8931,11 @@ nfsrpc_setextattr(vnode_t vp, const char *name, struct uio *uiop, nfsm_strtom(nd, name, strlen(name)); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(uiop->uio_resid); - nfsm_uiombuf(nd, uiop, uiop->uio_resid); + error = nfsm_uiombuf(nd, uiop, uiop->uio_resid); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); NFSGETATTR_ATTRBIT(&attrbits); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 383d45ba260b..0bfbbf3b07d9 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1587,7 +1587,7 @@ ncl_readrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred) error = nfscl_doiods(vp, uiop, NULL, NULL, NFSV4OPEN_ACCESSREAD, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "readrpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva, &attrflag); if (attrflag) { @@ -1618,7 +1618,7 @@ ncl_writerpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, error = nfscl_doiods(vp, uiop, iomode, must_commit, NFSV4OPEN_ACCESSWRITE, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "writerpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_write(vp, uiop, iomode, must_commit, cred, uiop->uio_td, &nfsva, &attrflag, called_from_strategy, ioflag); From nobody Tue Dec 12 19:17:37 2023 X-Original-To: dev-commits-src-all@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 4SqT016nkFz54KYs; Tue, 12 Dec 2023 19:17: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 4SqT013W81z3Zx6; Tue, 12 Dec 2023 19:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702408657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r9iWFmsWByAxBZgrwOp/B4lM76GBR0qMT26QstBRX8w=; b=c8eQH5ZPxMcH+Gl5ADq2jziEeFSXOcwQCz4V4Q3RDTcvSjrfpNGwpxHoXi55cE4IckaGvg GHrO8dTko4d9m9nTInm2inZeTjyXG1s1es9E2+alfA5tVkUHnOBx+7Zr/sKKj5CsjOGmIv Tb1VAQl2IXbSyzTObYCojMqb/tNZH6gE5eDU7hR4TJl+YhjOYscto7YFurKjeesN4HfHpc i3l850A4NuSQ91EZSkGofx4T2N5CJusrA/U9eVHUlBiqxJzvHykrVQUPj2naGId7/ZNAjM 3LFUbdsXyzqN0FbiC1zkc15RTHZaY0rEWwYqec/mR8BOmJRbQ1ScekCdmlLvOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702408657; a=rsa-sha256; cv=none; b=ynCwpcir1ZjzDYwQIEdhaz2IwFGcJ6+pFZrTvXm3uz8XrqSRJOiyu8zbt/aAWmEqfHpRbI BbmsZlH0CpqNDXZkrIr3vMVx27UwA7XZZMdWAVBH1GO2F1RyP7KHoGw3pe6PMEF73KHRyk qoNQM+nte8A7OwthUdJDksD/smopVzl/2gDPJRum8HTSRBZBbSrnhoUee4IHmiX3ywT06J 7kk7O+9jFTonxxXSAk5JRyn8AO5eT+7wkYpgZjV9B2QWXvfLNGnE/oQooIH4YXMJU46ewK yeMinFq0o6djInBtz3VNK7/6HGi1ES07J4w3oN6Zwj/0vXuLemZK3RRnhncZ3A== 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=1702408657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r9iWFmsWByAxBZgrwOp/B4lM76GBR0qMT26QstBRX8w=; b=o1bbM4Rt+Bl/Cd86gW2JPQkqMf3ja7gUka6llbXRIwBRpjJjehIPNMe00PDxj8krTeMx/T HthkcOotQFr8CJvpZ3vSspJ752yNzb782TdtEq3ymHfLLmgOX06K//iLZa6QBCvZX2c9Y2 8LpajGsAJc9ibLQF3Wqc9cWn2DVIkc+hNcMkBnbtFUjuCNhfRWgogpvqzUGhhTxKIrpFwb fmdLGxhqrTv7VS8w+nL3AKqwHfBt12RXeGx9l7rqziPDkqRbz9cQxKgS3PYSLs7uRm8/Z0 7EJwxEDmHH61pa198LFkQM8J3utHe7yoQJ4Lhttg76Lg0YgvvjsDiO32ft85Vg== 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 4SqT012cK2zC7p; Tue, 12 Dec 2023 19:17: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 3BCJHbuN087974; Tue, 12 Dec 2023 19:17:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCJHb4Y087971; Tue, 12 Dec 2023 19:17:37 GMT (envelope-from git) Date: Tue, 12 Dec 2023 19:17:37 GMT Message-Id: <202312121917.3BCJHb4Y087971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 20fae1e16990 - releng/14.0 - Add an UPDATING entry and bump the branch version List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 20fae1e1699021d4f277819f7b32bf1178a1a991 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=20fae1e1699021d4f277819f7b32bf1178a1a991 commit 20fae1e1699021d4f277819f7b32bf1178a1a991 Author: Mark Johnston AuthorDate: 2023-12-12 19:15:09 +0000 Commit: Mark Johnston CommitDate: 2023-12-12 19:15:09 +0000 Add an UPDATING entry and bump the branch version Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 0af118a3f624..673957975366 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20231212: + 14.0-RELEASE-p3 SA-23:18.nfsclient + + NFS client data corruption and kernel memory disclosure [SA-23:18.nfsclient] + 20231205: 14.0-RELEASE-p2 SA-23:17.pf EN-23:17.ossl diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index d78502b8c4a5..c1d998125dfe 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.0" -BRANCH="RELEASE-p2" +BRANCH="RELEASE-p3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Tue Dec 12 19:18:17 2023 X-Original-To: dev-commits-src-all@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 4SqT0p1T5Bz54KcZ; Tue, 12 Dec 2023 19:18: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 4SqT0p0xyNz3bPB; Tue, 12 Dec 2023 19:18:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702408698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FAPp3tyGvqvu2k10PNw72pLOLMsvFvHPqdsz2tPOWmk=; b=ZmEWE4U6Vt+6QuMLos/5ou4QqDkpqdO22rBH58QlmaSbjzmfzA7nJZF4Bfz298Ff3TqCiB wOkIsg7qmw28wWraqkSs+NekB0tsDsOL4h8P3EKSHA9LRVUfRzOcLQjiQgBWIAKDWGMEWy Dd5b0+nkLfpJ/HglBzt2qttueITiit5/vspcMxvc5eU75Zn7ayU9SNX6Ph1AJZ+lYmbCOl 5b7Cu6UQTOA10C2986XHECSpxLWHannkBFHFMAfyhmONYIrGwJG71SV9G2d7wZCYqsZFeX ZZoMLglyAysbS2e0DA/YB+V5OjVNsE88YO6Bo/l4/RjsvUoxkzM/ag0WfFWlWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702408698; a=rsa-sha256; cv=none; b=Msp9KOfPnIw8fclkRQkAqPYI6nvakheVQOZsN0kP1j7BeTfKDFLXxJ3jAtwfecPZ03RlL/ ODoOsg1fA/stXteLSR6wRNnm+7I1KmfECsK5I3X3KyUCSh6d963kFN3+2QiPNRULDDiDQY OVlS+AhqAB3Nu1y7+eor7Hyi2JgwjZLA4EE+iBcDj+jH0778uZY1djx3OLizxw8h2mU8rr wSSFqxm/vKxxyIMEvaPFly6eAz7QSCkl3jVNhk+9PvBxarX75xVddxDpwaxPsgkHrwnqG4 25glRjADuCT+1xqnTnZeHT+zvL4HwoQrOVhNXBl1Spuvt5Up/f1AWyQHZNiO+A== 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=1702408698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FAPp3tyGvqvu2k10PNw72pLOLMsvFvHPqdsz2tPOWmk=; b=oQgSQV8ktKJMr2lfhqvBqNCCMD9xpf5QEN8wkZAp5dEWCVRh3Xizzip/9BGehG2apVO5ph PdYmwlO3yQZ7JADjDq7TUWH6hHW+NxQ9coaQFjwAfYwBxwAfRIQ4t1aErcEF89soIdrdD7 Pe0ty/aroPOmrtL+fSpxq5KDjgbS16AkHZkkx53KzCytMx2nltGtqlj+0odgxRRK1wCf11 xUINUVqO1GuCXuDXl4VmTc9nh5ki+TamTjrX3n6iEw38FoBOUbJwKwfw25DaPP9r8x2qAi W0oQf4qgpewVipi8c6G/arS9C2NHyl+VWtHwaR1qGYimPOkDkpHee0g1WctC2A== 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 4SqT0p01rhzBqx; Tue, 12 Dec 2023 19:18: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 3BCJIHfJ088228; Tue, 12 Dec 2023 19:18:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCJIH67088224; Tue, 12 Dec 2023 19:18:17 GMT (envelope-from git) Date: Tue, 12 Dec 2023 19:18:17 GMT Message-Id: <202312121918.3BCJIH67088224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3f079b3f2f33 - releng/13.2 - nfsclient: Propagate copyin() errors from nfsm_uiombuf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 3f079b3f2f3371ae1c2a11d00a8ddfe183f4ecba Auto-Submitted: auto-generated The branch releng/13.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3f079b3f2f3371ae1c2a11d00a8ddfe183f4ecba commit 3f079b3f2f3371ae1c2a11d00a8ddfe183f4ecba Author: Mark Johnston AuthorDate: 2023-12-12 01:04:56 +0000 Commit: Mark Johnston CommitDate: 2023-12-12 19:15:39 +0000 nfsclient: Propagate copyin() errors from nfsm_uiombuf() Approved by: so Security: SA-23:18.nfsclient Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation (cherry picked from commit 6fa843f6e647a1a1e0e42af1e7abc9e903699f31) (cherry picked from commit f1d1d50e1d089f0bfcd38e5f08b1e8bf5a1d64c3) --- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clcomsubs.c | 23 ++++++++++++++++------- sys/fs/nfsclient/nfs_clrpcops.c | 23 ++++++++++++++++++++--- sys/fs/nfsclient/nfs_clvnops.c | 4 ++-- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 9dd3be3d5c42..ac0c75b8d3f4 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -368,7 +368,7 @@ int nfsrpc_destroysession(struct nfsmount *, struct nfsclsession *, struct ucred *, NFSPROC_T *); /* nfs_clcomsubs.c */ -void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); +int nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); struct mbuf *nfsm_uiombuflist(struct uio *, int, u_int); u_int8_t *nfscl_getmyip(struct nfsmount *, struct in6_addr *, int *); int nfsm_getfh(struct nfsrv_descript *, struct nfsfh **); diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c index 640d47fed93d..7aa7e3f84479 100644 --- a/sys/fs/nfsclient/nfs_clcomsubs.c +++ b/sys/fs/nfsclient/nfs_clcomsubs.c @@ -53,12 +53,12 @@ NFSCLSTATEMUTEX; * copies a uio scatter/gather list to an mbuf chain. * NOTE: can only handle iovcnt == 1 */ -void +int nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) { char *uiocp; struct mbuf *mp, *mp2; - int xfer, left, mlen; + int error, xfer, left, mlen; int uiosiz, clflg, rem; char *mcp, *tcp; @@ -106,8 +106,11 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) + return (error); + } mp->m_len += xfer; left -= xfer; uiocp += xfer; @@ -150,6 +153,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) } nd->nd_bpos = mcp; nd->nd_mb = mp; + return (0); } /* @@ -162,7 +166,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) { char *uiocp; struct mbuf *mp, *mp2, *firstmp; - int extpg, extpgsiz = 0, i, left, mlen, rem, xfer; + int error, extpg, extpgsiz = 0, i, left, mlen, rem, xfer; int uiosiz, clflg; char *mcp, *tcp; @@ -220,8 +224,13 @@ nfsm_uiombuflist(struct uio *uiop, int siz, u_int maxext) xfer = (left > mlen) ? mlen : left; if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(uiocp, mcp, xfer); - else - copyin(uiocp, mcp, xfer); + else { + error = copyin(uiocp, mcp, xfer); + if (error != 0) { + m_freem(firstmp); + return (NULL); + } + } mp->m_len += xfer; mcp += xfer; if (maxext > 0) { diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 51c7bb25d357..854fad6c56c7 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -1890,7 +1890,12 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode, *tl++ = x; /* total to this offset */ *tl = x; /* size of this write */ } - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + free(nd, M_TEMP); + return (error); + } /* * Although it is tempting to do a normal Getattr Op in the * NFSv4 compound, the result can be a nearly hung client @@ -5981,6 +5986,10 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, iovlen = uiop->uio_iov->iov_len; m = nfsm_uiombuflist(uiop, len, 0); + if (m == NULL) { + error = EFAULT; + break; + } } tdrpc = drpc = malloc(sizeof(*drpc) * (mirrorcnt - 1), M_TEMP, M_WAITOK | @@ -6553,7 +6562,11 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, *tl++ = txdr_unsigned(len); *tl++ = txdr_unsigned(*iomode); *tl = txdr_unsigned(len); - nfsm_uiombuf(nd, uiop, len); + error = nfsm_uiombuf(nd, uiop, len); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } nrp = dsp->nfsclds_sockp; if (nrp == NULL) /* If NULL, use the MDS socket. */ @@ -8639,7 +8652,11 @@ nfsrpc_setextattr(vnode_t vp, const char *name, struct uio *uiop, nfsm_strtom(nd, name, strlen(name)); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(uiop->uio_resid); - nfsm_uiombuf(nd, uiop, uiop->uio_resid); + error = nfsm_uiombuf(nd, uiop, uiop->uio_resid); + if (error != 0) { + m_freem(nd->nd_mreq); + return (error); + } NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); NFSGETATTR_ATTRBIT(&attrbits); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 02e5e3540d72..4fb76fce088e 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1579,7 +1579,7 @@ ncl_readrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred) error = nfscl_doiods(vp, uiop, NULL, NULL, NFSV4OPEN_ACCESSREAD, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "readrpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva, &attrflag, NULL); if (attrflag) { @@ -1610,7 +1610,7 @@ ncl_writerpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, error = nfscl_doiods(vp, uiop, iomode, must_commit, NFSV4OPEN_ACCESSWRITE, 0, cred, uiop->uio_td); NFSCL_DEBUG(4, "writerpc: aft doiods=%d\n", error); - if (error != 0) + if (error != 0 && error != EFAULT) error = nfsrpc_write(vp, uiop, iomode, must_commit, cred, uiop->uio_td, &nfsva, &attrflag, called_from_strategy, ioflag); From nobody Tue Dec 12 19:18:19 2023 X-Original-To: dev-commits-src-all@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 4SqT0q3bzTz54KYy; Tue, 12 Dec 2023 19:18: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 4SqT0q38Fnz3bV9; Tue, 12 Dec 2023 19:18:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702408699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/6CJwiHS7I4KpMaBjaung0bzAXLnguf4u4H+5zBGkc=; b=oSUGFHRWXgzr+3Knxc54mZEYHDJuLa+qH/olp8OkatH79Cuy4Uj/CJVixCrb8yJ2iqaZar nx+QXLhu/fgjzALNNpwcHNoC5hnE4tgJ5tZe9+Cj01kz6N2ulydmcQfcSgudX0dJ0UBPla eV7OMl6Y6uEj4POlzB98bSEXCW95IOh4YQTjYPLThNj7KEpsJ69QYldSaV7+8rhWpUY01x ZBGD6UOz85iC5XxDBeYlKGRmHDRcFwpudu4OMf/UKcrAspDxXr32BWSxIZv/B3B1TvRFCU B+5bLMSEdIi54C2HoUNb26hx2C1E0NOhfybDPBzopHZKc/8pnF5eNVOzX9jfBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702408699; a=rsa-sha256; cv=none; b=tpBh5YKsrTgY161cFQdl1apSoVKa1r+NoYA5gWWOGGc1PPLcb3WVfs8ICtJhQgMwm2gmQD rKNAvFY65LthaYw0t3y9CycvgBJSecSgZlgI/TXWcA2AoH42Cac2Vda48YBWWwZZlIPEb5 IlLBhPycbXaePJu3L5lOX1uFQnyFmZmg3TSzZFtKCLbGQWH2kAmDYxB+poVP1ilHh40dOD TydgU4brWBKS9MN/VYuQAA1KX+Qg6LiBy3TuxK968SRItD0EwGhcXiT3OPP1GyNTqA0s9c tAuGuxXVjsGT5pQBdnyIIgbw62CLY/rw3Oyiq8iRdcr1K8CB1Ggt3kMEFCkL3A== 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=1702408699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/6CJwiHS7I4KpMaBjaung0bzAXLnguf4u4H+5zBGkc=; b=GlZz+twvSOH1TEcAL/ELy4JyEswIi4vCnFNN5Tv+XYKqwYltGyCsqZdKLGMxtRlw7otXI0 eFsZmmlQOxpDG1PnTtsAczoHpqivKra2NoX3osNRA0lzNfJehrvrOPPZXiO6K+2E29BNTk ELFWxTU6tLwlGo3xhNWsmpUeKW9vJIW5jjbEQH7ikfVwqKIdtP1SRmgF0ORQ1D2POzWm7i HGrosF851TrWsTBRPrbGky7iVD/B6xqlqE92+oa2jUAFa0/LoQ9w5cvHfn7qg/4uwmC375 SKO0Ozu/IyoatGbA/1YKi0GCcg+7Q6c3nl4g9G2kqxOMaBE1DEqHnaYj0+b88w== 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 4SqT0q1xS2zCZm; Tue, 12 Dec 2023 19:18:19 +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 3BCJIJ5E088289; Tue, 12 Dec 2023 19:18:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCJIJjQ088286; Tue, 12 Dec 2023 19:18:19 GMT (envelope-from git) Date: Tue, 12 Dec 2023 19:18:19 GMT Message-Id: <202312121918.3BCJIJjQ088286@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: eb1c4ee0180f - releng/13.2 - Add UPDATING entries and bump the branch version List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/releng/13.2 X-Git-Reftype: branch X-Git-Commit: eb1c4ee0180f673a3b82fc6e763294f0e0173cd2 Auto-Submitted: auto-generated The branch releng/13.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eb1c4ee0180f673a3b82fc6e763294f0e0173cd2 commit eb1c4ee0180f673a3b82fc6e763294f0e0173cd2 Author: Mark Johnston AuthorDate: 2023-12-12 19:16:35 +0000 Commit: Mark Johnston CommitDate: 2023-12-12 19:16:35 +0000 Add UPDATING entries and bump the branch version Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index d03d434a87d8..8ed94c3a241d 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20231212: + 13.2-RELEASE-p8 SA-23:18.nfsclient + + NFS client data corruption and kernel memory disclosure [SA-23:18.nfsclient] + 20231205: 13.2-RELEASE-p7 SA-23:17.pf EN-23:15.sanitizer diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 627c99e8b973..fb24da9b4dac 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -54,7 +54,7 @@ TYPE="FreeBSD" REVISION="13.2" -BRANCH="RELEASE-p7" +BRANCH="RELEASE-p8" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Tue Dec 12 21:04:30 2023 X-Original-To: dev-commits-src-all@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 4SqWML4w1Xz53GVw; Tue, 12 Dec 2023 21:04:30 +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 4SqWML4QD4z3Jg5; Tue, 12 Dec 2023 21:04:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702415070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fmYm6LJ3pl13d0SkqtOyy74/S45DSqQxaMhAb2TgDDA=; b=chkjZkRNLopz/CUupCQiI+XHDjqyRtwOHX5ERIIaN5m/0wNHQGbwi66trNNT9Q5Lp2KLkG 9ofYGE4ZT3HqiLQ8kXGFH9KwQjKLkmIoaPCFZykSJDVnpQ/Wg296jlf+nWx/vvA/KA2FOM 1DqB4KlI7Vvujnxs7NHclwJNhrc3g3Rwk8EWr80WkbpJE4WSvjwXVVps+LaKD/TOtKSuFf DVQY8/3xeOxEFnVf2l5xfUPhP0J9egjeznB3hVmX7Dh87Z2WcThf6FhZBQViF6qRRM1TBJ u66S1TnUxhrnRdovktyfWgVZfm48AjTu//ddzSy0i1H6J4Btm4btADQCUt44aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702415070; a=rsa-sha256; cv=none; b=ZTjAYIulUOj4oet88Ayw7OJHCTaJmVfUqAe4A0lGuLoDeyGh4FXMZl+PDpfXJ9pD55cNB7 125LU+MwHy/WPf3+c/8jsYrAfPjDcWFs6K3JPyrxQqS0oYoqxpYMSIZNXvBr19hcj7pySj uLpWe4zMC13Fgq5NCWjE4kTYeqLBaoFAX6EJr/k2EjHtTFTTHBuldT3A+2rfEWT8TfTFAl cNe1yZNI/iEVnSxxyD/9ahYEld8ozZCkol621bmM6OiEp2YsgV6AGItcN3zAqHcBzadT+4 63H5w5525Sjjn+k1463gG5cxIXbC/92jkqEPXozWsE4UQojSp5jEAl4QyLMDYA== 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=1702415070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fmYm6LJ3pl13d0SkqtOyy74/S45DSqQxaMhAb2TgDDA=; b=WjZaVF/qJWw4TXnT8XQL5G2/ZXCYd3VNgpkpDOk4KZwvFGR++xVYBsgqFg+1BGnOGw6Dtj C6ux2d1BSCZWBYSzxMS8VZDaz4im/jYQZMYgkB7Rki0dmuVeefxyt3NkuQPKJvSvX4dkXO jTfB1SAnrWu95uFGhq7kwTxEYkz7tyzr9wuLAWJ+0YJQ7zmV1gFBUUqLsZfuOhQ/Hx3aC6 QPg5wmkmKixV3DQ1GJWYVt1Y7OZGwXqlRqN3Yw1JiPUn2DrXKwfDSEMDnrW1DYnJdGHPuD JT4Tmeo/9VsKK2ZXqDu86sFAZVicmrYTdyUfGa3tN5UCXFMiAAwCCCWYIzt9hw== 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 4SqWML3MY2zWH4; Tue, 12 Dec 2023 21:04:30 +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 3BCL4U5Z072184; Tue, 12 Dec 2023 21:04:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCL4Ujo072181; Tue, 12 Dec 2023 21:04:30 GMT (envelope-from git) Date: Tue, 12 Dec 2023 21:04:30 GMT Message-Id: <202312122104.3BCL4Ujo072181@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: 0c511bafdd5b - main - netlink: fix snl_writer and linear_buffer re-allocation logic List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0c511bafdd5b309505c13c8dc7c6816686d1e103 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0c511bafdd5b309505c13c8dc7c6816686d1e103 commit 0c511bafdd5b309505c13c8dc7c6816686d1e103 Author: Igor Ostapenko AuthorDate: 2023-12-12 18:26:21 +0000 Commit: Kristof Provost CommitDate: 2023-12-12 20:49:14 +0000 netlink: fix snl_writer and linear_buffer re-allocation logic - Use the correct base pointer after re-allocation to avoid buffer overflows. - Maintain correct snl_writer.size, which avoids redundant memory allocation, e.g. a need for ~1k bytes may end up with ~32k linear_buffer actually allocated. This fixes a pfctl regression at least for armv7 after the addrule logic migration to netlink: ffbf25951e7b ("pf: convert rule addition to netlink") The add rule command creates a bigger than default size netlink requests which triggers the re-allocation logic. Reviewed by: kp MFC after: 2 weeks Differnetial Revision: https://reviews.freebsd.org/D43003 --- sys/netlink/netlink_snl.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 8bb7b076b7b7..7bdf5424ddf3 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -1036,19 +1036,23 @@ snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) if (nw->error) return (false); - void *new_base = snl_allocz(nw->ss, new_size); - if (new_base == NULL) { + if (snl_allocz(nw->ss, new_size) == NULL) { nw->error = true; return (false); } + nw->size = new_size; - memcpy(new_base, nw->base, nw->offset); - if (nw->hdr != NULL) { - int hdr_off = (char *)(nw->hdr) - nw->base; + void *new_base = nw->ss->lb->base; + if (new_base != nw->base) { + memcpy(new_base, nw->base, nw->offset); + if (nw->hdr != NULL) { + int hdr_off = (char *)(nw->hdr) - nw->base; - nw->hdr = (struct nlmsghdr *)(void *)((char *)new_base + hdr_off); + nw->hdr = (struct nlmsghdr *) + (void *)((char *)new_base + hdr_off); + } + nw->base = new_base; } - nw->base = new_base; return (true); } From nobody Tue Dec 12 22:55:33 2023 X-Original-To: dev-commits-src-all@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 4SqYqT4Nvfz53QnY; Tue, 12 Dec 2023 22:55: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 4SqYqT3xZYz3bMB; Tue, 12 Dec 2023 22:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702421733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3Y+PHu/6s9yt/5jfopJ1/OzEyQpixpPGUtlfa2cMeA=; b=L19x2/HWhvJGVimRNvRU6NEuo7h45KbLIZlfySoxc4Z/U1AZEVgSzXts8wyrjpBb95puvq bykq4FN0AtHeQdvReb44wjXk16f3h0Dcnm1i43iekb+PibwXI5Eajyc4MZQYmvnW4IpQ3F eH7onOR71QmqRZ9gQrQJwP5mG/y0vPNCT4HCreYeIVMKKvWGEXAc/1kI7fV+wWrbKLuWQj WsjYxNrp9Vpw097UlBtJrUbX1bFXxplEIiSGB7T6esgUYFYYPsUXiw+L6CKRCxXpO62wHY Hpm7n/til5ObZLM0cHwi84t57qN7hXAXDBJjw4wVbkSVJdKUaBkMPXQAl+l8Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702421733; a=rsa-sha256; cv=none; b=juv9Cjvhj2qt8GtJ4Or7AT6uIbxb5Dqb3uJI1kFR+Ud1M5fmTSstJSJ00rwpdLG6Zrlrh4 ENkEWdl/z/4FI60HB/DooAW9oRPkPmZUZwDOPJwdVPzs4dRVmU1dwQPC/EU/CemizTBTzq QlLJwXSZxcz0O9VtGKTYD2P4g6jt0S47jrlPIAdbQFlikCjvrFlunOiKVHCnFm+axno7nt HLa2V8pj5fHu5EMPNzJo2N7rVahOcLWEbCwUgVwoGiXm5lec/DrpsLQUwlqUfR4twI34V2 ZQdDT4BpQ/zusYeNEuVDUufwgt4Z6z8OFszi6ta9I7pcO+m2OB0VvNuot/9vHA== 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=1702421733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3Y+PHu/6s9yt/5jfopJ1/OzEyQpixpPGUtlfa2cMeA=; b=X8aK6GY22Pr0qjzdIBqn/b2HwjgVCPWzry9ATW/9rwCafcAs+JATDeySGsGqFkbSZqU1a7 2kAP9Z5/mO8tNSGxl2fdxMlBhXccrJEore6PNYG+keJSk7zA4LUxMBQ7roRtFYmisE2cRu bhO7LdubvhA31WxiNueaVZIPi4kRLL0/fUcSbfHgNr0ieAOWlqwwMW78QIPHC11M5sYyu4 jgytYGiiwo3IJsjFDNpzl8cxL51J047Pdf3NLJajeWw0H2p5Yj1Uentj3hJlTZKOJJhCJK MYmKhbhxBxdwSUklJ4O5AEAxHEEyu/xW1nnOA7Y2YEJIoFceVZkKs4dpzGcLgg== 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 4SqYqT31ZhzZKQ; Tue, 12 Dec 2023 22:55: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 3BCMtXHa055651; Tue, 12 Dec 2023 22:55:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCMtXE2055648; Tue, 12 Dec 2023 22:55:33 GMT (envelope-from git) Date: Tue, 12 Dec 2023 22:55:33 GMT Message-Id: <202312122255.3BCMtXE2055648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 9aaf4e3be61f - main - libc/*/SYS.h: remove SYCALL macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9aaf4e3be61fc20a84347b7c2c524256a4b93a43 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9aaf4e3be61fc20a84347b7c2c524256a4b93a43 commit 9aaf4e3be61fc20a84347b7c2c524256a4b93a43 Author: Brooks Davis AuthorDate: 2023-12-12 22:52:41 +0000 Commit: Brooks Davis CommitDate: 2023-12-12 22:52:41 +0000 libc/*/SYS.h: remove SYCALL macro This has not been a univerally available interface since it was removed from amd64 by commit efbef97de9805dec95db09953426f0b21bb2964f in 2004. I removed the last consumers in 2016 when I replaced pipe(2) with pipe2(2) in commit b60998c6331e2be21f1fc29fa6c82d94a1f72ef0. Reviewed by: imp, jhibbits Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42996 --- lib/libc/aarch64/SYS.h | 8 -------- lib/libc/arm/SYS.h | 3 --- lib/libc/i386/SYS.h | 7 +++---- lib/libc/powerpc/SYS.h | 10 ---------- lib/libc/powerpc64/SYS.h | 18 ------------------ lib/libc/riscv/SYS.h | 8 -------- 6 files changed, 3 insertions(+), 51 deletions(-) diff --git a/lib/libc/aarch64/SYS.h b/lib/libc/aarch64/SYS.h index 059ecd469650..af7f0200a0c7 100644 --- a/lib/libc/aarch64/SYS.h +++ b/lib/libc/aarch64/SYS.h @@ -34,14 +34,6 @@ mov x8, SYS_ ## name; \ svc 0 -#define SYSCALL(name) \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - ret; \ -END(__sys_##name) - /* * Conditional jumps can only go up to one megabyte in either * direction, and cerror can be located anywhere, so we have diff --git a/lib/libc/arm/SYS.h b/lib/libc/arm/SYS.h index 9f4750a16b9f..9ac2d90104b4 100644 --- a/lib/libc/arm/SYS.h +++ b/lib/libc/arm/SYS.h @@ -59,9 +59,6 @@ it cs; \ bcs PIC_SYM(CERROR, PLT) -#define SYSCALL(x) \ - _SYSCALL(x) - #define PSEUDO(x) \ ENTRY(__CONCAT(__sys_, x)); \ .weak _C_LABEL(__CONCAT(_,x)); \ diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h index 9e8c645280bf..6ef21fb794a6 100644 --- a/lib/libc/i386/SYS.h +++ b/lib/libc/i386/SYS.h @@ -35,13 +35,12 @@ #include #include -#define SYSCALL(name) ENTRY(__sys_##name); \ +#define RSYSCALL(name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ mov $SYS_##name,%eax; KERNCALL; \ - jb HIDENAME(cerror) - -#define RSYSCALL(name) SYSCALL(name); ret; END(__sys_##name) + jb HIDENAME(cerror); \ + ret; END(__sys_##name) #define PSEUDO(name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, _##name); \ diff --git a/lib/libc/powerpc/SYS.h b/lib/libc/powerpc/SYS.h index 7fdf7c734310..8c47a65735f5 100644 --- a/lib/libc/powerpc/SYS.h +++ b/lib/libc/powerpc/SYS.h @@ -40,16 +40,6 @@ li 0,(SYS_##name); \ sc -#define SYSCALL(name) \ - .text; \ - .align 2; \ -2: b CNAME(HIDENAME(cerror)); \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bso 2b - #define PSEUDO(name) \ .text; \ .align 2; \ diff --git a/lib/libc/powerpc64/SYS.h b/lib/libc/powerpc64/SYS.h index c364090a5487..dccd08b63541 100644 --- a/lib/libc/powerpc64/SYS.h +++ b/lib/libc/powerpc64/SYS.h @@ -40,24 +40,6 @@ li 0,(SYS_##name); \ sc -#define SYSCALL(name) \ - .text; \ - .align 2; \ -2: mflr %r0; \ - std %r0,16(%r1); \ - stdu %r1,-48(%r1); \ - bl CNAME(HIDENAME(cerror)); \ - nop; \ - addi %r1,%r1,48; \ - ld %r0,16(%r1); \ - mtlr %r0; \ - blr; \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bso 2b - #define PSEUDO(name) \ .text; \ .align 2; \ diff --git a/lib/libc/riscv/SYS.h b/lib/libc/riscv/SYS.h index 47f92467c843..1e3e67834494 100644 --- a/lib/libc/riscv/SYS.h +++ b/lib/libc/riscv/SYS.h @@ -40,14 +40,6 @@ li t0, SYS_ ## name; \ ecall -#define SYSCALL(name) \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - ret; \ -END(__sys_##name) - #define PSEUDO(name) \ ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, _##name); \ From nobody Tue Dec 12 22:55:34 2023 X-Original-To: dev-commits-src-all@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 4SqYqV5SFtz53Qnd; Tue, 12 Dec 2023 22:55: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 4SqYqV4tDNz3bP4; Tue, 12 Dec 2023 22:55:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702421734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HE4/jswqMl+9Ggs2D8srekybWqsRk7emOCkiw6XUPuE=; b=bMU5tiWecV/NWe11a8srQlaW3HQ2GA9bZ0VrH2iJE66olm6L357zhw3MMPKVMPB0isF62I K1SwzsJHDhhbcClXYwfCFnhi2VsVRUGkoVhuwrS4oSybLbrKzH5XxYxIVlTwVDxuZUGKnc jq6LNVjCCiBpR+/Fk3tDt5boXYvECxQUkbGSeuqCSiq7e4+XeRc7jyJT4NkA6VlU/xKsjJ 7NvDt4CkRMuXJyGcD72CztCkeB4iciFhEMTk8APGnywkDMgXhAE1/QejR5B/qoXgXBsjMP oHlRPQpSciuC3cUu5iPWjDQ2SWfTvw4TpsN3qtm7T0yaT4Zv2A8CRYG6o2wH0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702421734; a=rsa-sha256; cv=none; b=PiUHE+w8MVO2GvO2kM0KRDfyWiYNdIUXXYLltxvXHIdCRxhlnaCrzYMghcmA2sdw+73FDL RioH1Vu6F7A6Qj115T0epBQkbhTRLPOb1OEVqOLF/Uptj6t8LRR2lDqP3R8lREL5GvsLvk TeYFcUxXN+NVrML4VmGLr3VxM7n7fwu0G5uKXzUy/3ZTiND8Gmy0I79/PUw0qnuOgbbOJH JVrzoHQ2OnBfNjzlVgbFtiB4fm3MW7Nw28q8ZQUKDsyUZl6Y0ghbCRyg695/IiFF8McurB jDUzOSBoDv6zHAjVTPD03Xx1I2ZTU/iws/IMRvwSDttBvHtDJLBxITH3+i13/g== 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=1702421734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HE4/jswqMl+9Ggs2D8srekybWqsRk7emOCkiw6XUPuE=; b=Led3htFMTecSUg3p3N/X1jRc+c6/yRTg65OBAjmoavmOwkOulvHNsj5NqL21jbLT/He0QY jM8LzYHCQKelwGhQ5RIBEOVAxNnmMnp87waKMxzH92jCnUlOscLkOE7lajKYufulnTCt+c uk50IUfd3yKMyFPigEncrExwu0ZK/5BWVsjzLh9x563gxF9CGOKwQmYmFAuU+j+zzLF40I 1cpZ5ZP4S6zMQiGGeS3fURBVZX85YU394GPCXd1TSO4uQRFJkYlPWa9kdbdfQW2CE1Hlne QoS+T2128EHha/uF26RgD9dNwan8z9DcWOJpQlsmp/Eq23/JIuWqzadlbIr53A== 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 4SqYqV404FzZVY; Tue, 12 Dec 2023 22:55: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 3BCMtYlN055693; Tue, 12 Dec 2023 22:55:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCMtYgA055690; Tue, 12 Dec 2023 22:55:34 GMT (envelope-from git) Date: Tue, 12 Dec 2023 22:55:34 GMT Message-Id: <202312122255.3BCMtYgA055690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 5c7a9092713d - main - libc/i386/SYS.h: Remove unused LCALL macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c7a9092713d2d076513b31b377dad59780a39da Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5c7a9092713d2d076513b31b377dad59780a39da commit 5c7a9092713d2d076513b31b377dad59780a39da Author: Brooks Davis AuthorDate: 2023-12-12 22:53:09 +0000 Commit: Brooks Davis CommitDate: 2023-12-12 22:53:09 +0000 libc/i386/SYS.h: Remove unused LCALL macro It appears that the only user of this macro was removed with support for building a.out binaries in 2002 by commit 66422f5b7a1a6055f0b2358268eb902aab6e2e3e. Reviewed by: imp, kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42997 --- lib/libc/i386/SYS.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h index 6ef21fb794a6..24b0060372f8 100644 --- a/lib/libc/i386/SYS.h +++ b/lib/libc/i386/SYS.h @@ -48,7 +48,4 @@ jb HIDENAME(cerror); ret; \ END(__sys_##name) -/* gas messes up offset -- although we don't currently need it, do for BCS */ -#define LCALL(x,y) .byte 0x9a ; .long y; .word x - #define KERNCALL int $0x80 From nobody Tue Dec 12 23:29:13 2023 X-Original-To: dev-commits-src-all@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 4SqZZK2J0Gz53T5S; Tue, 12 Dec 2023 23: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 4SqZZK1rlRz4G1h; Tue, 12 Dec 2023 23:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hcve0D8eycoYvbbXdwE3hQOr7giHgDYBSK14u0iLRJc=; b=eShlcM/tkxon1QzUE24ssMRqORN4dtorstTJEuWxab4jUV5hryLMPjGvdwQ/pskeb6e7TE Ne3SktYHRIn+U8k0SpZ9KWUPfNRRNq+qHj6Xfd072HT6dWkOO4/axJmEDVLT63DEvUiGpu kDZ8Tp/dDpPwsh2GrY5uucXHIRl2waUXy3sgAgC5Rv/FO7yJauGDJR2KzTSVgpeyJrOdYF ymoDYjouqo5qhwD069nUmmDtknn34vnizcQ9SE6YIXe6b0nfrxyrnuuZRE3EFWwoi2XwWW hCynb4BsAPV8L7eqbDlnzAAQrS45A9CgL6caJD8QZZUT9mtgpZE7eHXCDZc39g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702423753; a=rsa-sha256; cv=none; b=Z5Ctxf418kQZJq2QT0iFgCniTB9UEi8iazsCnAop8cMZ4BBoDXU3M87yqWsfpqeC6/8etG 0SrRLJIb4SPMBbcgYgpccPIvcyy30qtfObw3WOTMTU2Y1mafxNa9jgDx7pWvHJ+PoeHLYQ 4BxhSTOVO0/pm/nvOcTOE3wr8FgULdWzJ7HqhApxm+97VmWaofVxXKlMrkK+Mu1bpzwgTR uItihXLtqhoVTICqUSiiECsN7X6ODi5BEACK+av/dVI3/fk4oRIVNuLVybmh7rvB+F37ps 9o2FOmJk3FriWap+Vt025vB0Yxk0JhEBgicmvHnkD7cpy4roSUZaQ/eTBaBx5Q== 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=1702423753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hcve0D8eycoYvbbXdwE3hQOr7giHgDYBSK14u0iLRJc=; b=Aqk22XyONVBEBuEXgrtaJXs1VugJioRCny7mJwAglEWWNB+gJ0ddKDjnbAvKK60FoTBofT Y56j6bffWc7qZBjy7mk7fy43HaeEGk3gS6RqNyUqheshYollOrpYAgdw9xwFoV1EbDBmFA 8UzXw/K+1QkYkO4E711mZuB7vQNsI2OhH27T+SHFBa9bJbp28XSWo4+cSLOYpaCqvC6gME euXJgwbNgu0hLVFhk+G39DNfb15YtZKjF3eqTdfenjDyJEx7VXPFKLRuK0abIQt2rr6Dci o5Qw8DjC44fwMCDGob79+G3FN1dfQGAWFG3hm+HJ/gQbtGpB0dMHkCvcUF3L2w== 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 4SqZZK0wGszbKl; Tue, 12 Dec 2023 23:29: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 3BCNTDig007671; Tue, 12 Dec 2023 23:29:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCNTDwe007668; Tue, 12 Dec 2023 23:29:13 GMT (envelope-from git) Date: Tue, 12 Dec 2023 23:29:13 GMT Message-Id: <202312122329.3BCNTDwe007668@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: ca96a942cafb - main - bhyve: refactor gdbstub to enable single-stepping on AMD CPUs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ca96a942cafb58476e10e887240e594e7923a6e8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ca96a942cafb58476e10e887240e594e7923a6e8 commit ca96a942cafb58476e10e887240e594e7923a6e8 Author: Bojan Novković AuthorDate: 2023-12-12 23:28:59 +0000 Commit: John Baldwin CommitDate: 2023-12-12 23:28:59 +0000 bhyve: refactor gdbstub to enable single-stepping on AMD CPUs This patch refactors the existing Intel-specific single-stepping mechanism in bhyve's GDB stub to work with both AMD and Intel CPUs. Reviewed by: jhb Sponsored by: Google, Inc. (GSoC 2022) Differential Revision: https://reviews.freebsd.org/D42298 --- usr.sbin/bhyve/amd64/vmexit.c | 15 +++++++ usr.sbin/bhyve/gdb.c | 94 +++++++++++++++++++++++++++++++++++-------- usr.sbin/bhyve/gdb.h | 1 + 3 files changed, 93 insertions(+), 17 deletions(-) diff --git a/usr.sbin/bhyve/amd64/vmexit.c b/usr.sbin/bhyve/amd64/vmexit.c index 2c01c63f6454..e0b9aec2d17a 100644 --- a/usr.sbin/bhyve/amd64/vmexit.c +++ b/usr.sbin/bhyve/amd64/vmexit.c @@ -439,6 +439,20 @@ vmexit_debug(struct vmctx *ctx __unused, struct vcpu *vcpu, return (VMEXIT_CONTINUE); } +static int +vmexit_db(struct vmctx *ctx __unused, struct vcpu *vcpu, struct vm_run *vmrun) +{ + +#ifdef BHYVE_SNAPSHOT + checkpoint_cpu_suspend(vcpu_id(vcpu)); +#endif + gdb_cpu_debug(vcpu, vmrun->vm_exit); +#ifdef BHYVE_SNAPSHOT + checkpoint_cpu_resume(vcpu_id(vcpu)); +#endif + return (VMEXIT_CONTINUE); +} + static int vmexit_breakpoint(struct vmctx *ctx __unused, struct vcpu *vcpu, struct vm_run *vmrun) @@ -503,4 +517,5 @@ const vmexit_handler_t vmexit_handlers[VM_EXITCODE_MAX] = { [VM_EXITCODE_IPI] = vmexit_ipi, [VM_EXITCODE_HLT] = vmexit_hlt, [VM_EXITCODE_PAUSE] = vmexit_pause, + [VM_EXITCODE_DB] = vmexit_db, }; diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index be730a75b3e6..2d49469c2e11 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -743,6 +743,43 @@ _gdb_cpu_suspend(struct vcpu *vcpu, bool report_stop) debug("$vCPU %d resuming\n", vcpuid); } +/* + * Requests vCPU single-stepping using a + * VMEXIT suitable for the host platform. + */ +static int +_gdb_set_step(struct vcpu *vcpu, int val) +{ + int error; + + /* + * If the MTRAP cap fails, we are running on an AMD host. + * In that case, we request DB exits caused by RFLAGS.TF. + */ + error = vm_set_capability(vcpu, VM_CAP_MTRAP_EXIT, val); + if (error != 0) + error = vm_set_capability(vcpu, VM_CAP_RFLAGS_TF, val); + if (error == 0) + (void)vm_set_capability(vcpu, VM_CAP_MASK_HWINTR, val); + + return (error); +} + +/* + * Checks whether single-stepping is enabled for a given vCPU. + */ +static int +_gdb_check_step(struct vcpu *vcpu) +{ + int val; + + if (vm_get_capability(vcpu, VM_CAP_MTRAP_EXIT, &val) != 0) { + if (vm_get_capability(vcpu, VM_CAP_RFLAGS_TF, &val) != 0) + return -1; + } + return 0; +} + /* * Invoked at the start of a vCPU thread's execution to inform the * debug server about the new thread. @@ -797,10 +834,7 @@ gdb_cpu_resume(struct vcpu *vcpu) assert(vs->hit_swbreak == false); assert(vs->stepped == false); if (vs->stepping) { - error = vm_set_capability(vcpu, VM_CAP_MTRAP_EXIT, 1); - assert(error == 0); - - error = vm_set_capability(vcpu, VM_CAP_MASK_HWINTR, 1); + error = _gdb_set_step(vcpu, 1); assert(error == 0); } } @@ -835,26 +869,24 @@ gdb_suspend_vcpus(void) } /* - * Handler for VM_EXITCODE_MTRAP reported when a vCPU single-steps via - * the VT-x-specific MTRAP exit. + * Invoked each time a vmexit handler needs to step a vCPU. + * Handles MTRAP and RFLAGS.TF vmexits. */ -void -gdb_cpu_mtrap(struct vcpu *vcpu) +static void +gdb_cpu_step(struct vcpu *vcpu) { struct vcpu_state *vs; - int vcpuid; + int vcpuid = vcpu_id(vcpu); + int error; - if (!gdb_active) - return; - vcpuid = vcpu_id(vcpu); - debug("$vCPU %d MTRAP\n", vcpuid); + debug("$vCPU %d stepped\n", vcpuid); pthread_mutex_lock(&gdb_lock); vs = &vcpu_state[vcpuid]; if (vs->stepping) { vs->stepping = false; vs->stepped = true; - vm_set_capability(vcpu, VM_CAP_MTRAP_EXIT, 0); - vm_set_capability(vcpu, VM_CAP_MASK_HWINTR, 0); + error = _gdb_set_step(vcpu, 0); + assert(error == 0); while (vs->stepped) { if (stopped_vcpu == -1) { @@ -869,6 +901,34 @@ gdb_cpu_mtrap(struct vcpu *vcpu) pthread_mutex_unlock(&gdb_lock); } +/* + * A general handler for VM_EXITCODE_DB. + * Handles RFLAGS.TF exits on AMD SVM. + */ +void +gdb_cpu_debug(struct vcpu *vcpu, struct vm_exit *vmexit) +{ + if (!gdb_active) + return; + + /* RFLAGS.TF exit? */ + if (vmexit->u.dbg.trace_trap) { + gdb_cpu_step(vcpu); + } +} + +/* + * Handler for VM_EXITCODE_MTRAP reported when a vCPU single-steps via + * the VT-x-specific MTRAP exit. + */ +void +gdb_cpu_mtrap(struct vcpu *vcpu) +{ + if (!gdb_active) + return; + gdb_cpu_step(vcpu); +} + static struct breakpoint * find_breakpoint(uint64_t gpa) { @@ -940,11 +1000,11 @@ gdb_cpu_breakpoint(struct vcpu *vcpu, struct vm_exit *vmexit) static bool gdb_step_vcpu(struct vcpu *vcpu) { - int error, val, vcpuid; + int error, vcpuid; vcpuid = vcpu_id(vcpu); debug("$vCPU %d step\n", vcpuid); - error = vm_get_capability(vcpu, VM_CAP_MTRAP_EXIT, &val); + error = _gdb_check_step(vcpu); if (error < 0) return (false); diff --git a/usr.sbin/bhyve/gdb.h b/usr.sbin/bhyve/gdb.h index f06375d0d591..98f9ece2f60c 100644 --- a/usr.sbin/bhyve/gdb.h +++ b/usr.sbin/bhyve/gdb.h @@ -32,6 +32,7 @@ void gdb_cpu_add(struct vcpu *vcpu); void gdb_cpu_breakpoint(struct vcpu *vcpu, struct vm_exit *vmexit); void gdb_cpu_mtrap(struct vcpu *vcpu); void gdb_cpu_suspend(struct vcpu *vcpu); +void gdb_cpu_debug(struct vcpu *vcpu, struct vm_exit *vmexit); void init_gdb(struct vmctx *ctx); #endif /* !__GDB_H__ */ From nobody Tue Dec 12 23:30:47 2023 X-Original-To: dev-commits-src-all@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 4SqZc76fg9z53TP1; Tue, 12 Dec 2023 23:30:47 +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 4SqZc76D9Nz4GQb; Tue, 12 Dec 2023 23:30:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IV0MsG0RaiEHe1IaNgWSrAHTLM2sSO/ZO+G4HzwqfyE=; b=pz4/IsmuRvncd+r6hoA9qLOZFeMqkZpksCKxdxbIDu4ht7GwU5fipMUArF76glJOWC93XR 2NJUd9/vXtJYCY4RTeNjsYbo0gIJaCCdsHK+1iPUVVaccXaU4K6Xnst1snF/y+Fw+wyeH3 JbbrlRKqpZast5cQUccOUL9dZ1dk3LQHMz4kAX4oVxAkn9XnAi2JlNFdDhpyrDkczVse12 mgoFpbUWySVfgzuQgr3Y1ABfswFDZ6ascL+4zeoKOra5vDJFthPVzUqOLGCiPNSQ82zIEU b31t/j+qEbuv8/8pRaNCom9bZiknVP6GjjUIFYs9EErKX5hmTuO8/Wq9NoFyQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702423847; a=rsa-sha256; cv=none; b=uZkzgD43BNxH1TCPR1+QAmsZpEdW9bn5CGgQllW3KCJVfE7Pfxv97LSvy8NkOvm/dWkiXb 5/mmf9dRR9yCsvcU6dU+PAfoMn8FZChpK98SSMhLK0ixVhWVl5K0u/IyDIqnh20TENplJF effdtO+srfQfX7458i/VIljkqfJEnMYTSMqF0IHGi76coBPGQjGpYUfFe0sKnbdhkU9W9V CVcq9v3/LCJGwHGqVOtfyHllYc532gjb8Ig0i84x4iA+zyU7/o5h15KHh/Y8pug9fa7TFQ gTBUxa36BfeFnuEiwng28A/5pM/82Z7eP7Sja7H6U8qGoHs7QjhiYx/TwPw7Tg== 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=1702423847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IV0MsG0RaiEHe1IaNgWSrAHTLM2sSO/ZO+G4HzwqfyE=; b=p6gB3POd/ClkyzjvOdRzaf49/lvkyr7VgH3qWkL5qzylOleA+8B87LENa/czcuWgQVl07B 11TO2VMXFwLo6IB3NJ2Eq+5jli/+8l5DNkZIDYOqtK50uNotFLIdydbl1yERv+xvRfs0KY w7976dzBHlrAcF4FCvwhOnXjlLult8dxhX+pRUKtOQ7rBifs9oEJoRYNK/+q05hPFQM02B VM/c17EHbmve0RmhASmQPlh+mBJLlj5HOyvjT5Pfq5X6k7Z5XuBfxt4BKfwxEMKSeEiazA uMobHgz3v1VQW6Jo1BgeVF57ofTdAGDFQjsW94bacc9VeeD1KAeaED2aC7Zt7A== 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 4SqZc75HBSzb6f; Tue, 12 Dec 2023 23:30:47 +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 3BCNUlmc019221; Tue, 12 Dec 2023 23:30:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCNUldZ019208; Tue, 12 Dec 2023 23:30:47 GMT (envelope-from git) Date: Tue, 12 Dec 2023 23:30:47 GMT Message-Id: <202312122330.3BCNUldZ019208@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: 087c4c90d193 - main - kldxref: Add a copyright and license statement to ef.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 087c4c90d193c1401613e1e13fa99db8de52c8f0 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=087c4c90d193c1401613e1e13fa99db8de52c8f0 commit 087c4c90d193c1401613e1e13fa99db8de52c8f0 Author: John Baldwin AuthorDate: 2023-12-12 23:29:43 +0000 Commit: John Baldwin CommitDate: 2023-12-12 23:29:43 +0000 kldxref: Add a copyright and license statement to ef.h This uses the statement from other files in kldxref when the tool was first imported in commit 9c6f92408c29a8980e7aec26a2590087c3b3d8ed. Reviewed by: kevans Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42963 --- usr.sbin/kldxref/ef.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/usr.sbin/kldxref/ef.h b/usr.sbin/kldxref/ef.h index f10af49fafba..94aaca279a80 100644 --- a/usr.sbin/kldxref/ef.h +++ b/usr.sbin/kldxref/ef.h @@ -1,3 +1,36 @@ +/*- + * SPDX-License-Identifier: BSD-4-Clause + * + * Copyright (c) 2000, Boris Popov + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Boris Popov. + * 4. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * 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. + */ #ifndef _EF_H_ #define _EF_H_ From nobody Tue Dec 12 23:30:48 2023 X-Original-To: dev-commits-src-all@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 4SqZc90rVcz53TP2; Tue, 12 Dec 2023 23:30: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 4SqZc90KcFz4GXS; Tue, 12 Dec 2023 23:30:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo5XJkOJYPzAqYRTuI0JehUEGKAkFovYLdlKdO9HJCo=; b=S0FgDZEQWWZtodR89851Xo4BNfWqHSTIKdvYiFuRcb5JKN6v+ocQT52tr51VsEFn1WYbIt QrJZ9yQfkcuWTjXLRkqKMeVQwG+jfK9nYiY6okfy9jz+3LOnUBie9s20xk65XSJx58nnuS pdOW31UBFG704JehQWSNvHQkts2hUe31FBJgkb4tIbsh2TkTmAhmiSISo4NZOj7OhLQsll hUWrkvgj+kvv7w90it5JGDJjsIzW00SbTjqQBBtP7cW0csosqqlLWoAwOaYaHWAzyloB/b CnbEJ1ypDJYM4n1Mz0feMv+4mwjkKUOtWtvViql54QSlRcXvWG3UC2YtfRdOcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702423849; a=rsa-sha256; cv=none; b=irahtnWl45DccnptEtlJQHbJGY3+RaVTSXyF3QZ0DHOeRpTpl8twlIQxnTyLpp0FtzzbNk ewNco7nmuOeC6VxHjgOGyXwyIUNQFgo00EDbmirSXYmMQw6C3S/1lYRTI2v/Hjlp7qy5M6 NEJT89C961Y2gv4sr/I9dUiFhwKlilzyiWmVDRmX3MxEyqaT0y6tWENHEYRvnq4jpAIkkU +M7I8/pg60cDeVXdyteBSeXOsbzC1Xty1e59iKuJ5O1QZZvi4aOmfCZXN16t9mnQ0OFdCx HQxOtKw+4BJXm8HZoWE+S7SpLOWMizdSbJwvZL+G7T8TwRUaP3tJuiBTwNluzg== 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=1702423849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo5XJkOJYPzAqYRTuI0JehUEGKAkFovYLdlKdO9HJCo=; b=HOa/+evxXN4f8yM6q05xlnCo6Wa/htdLxyzkGesH9ofzfm3hdNCBM/YJwNCiYgEYmQeAYv IxfLFU3PcFt34xs0QzaA5AIWrTX5zUHYohTtWu55Rpncy7IdOI875ELSurpaeX1JunV+94 p06SoMHPpWgiBLnOPYhJZfKtbr4umCbKWopKytkVGMyxAztICGU7jUn2x//jeY06CB8UBd f4gYZeOhrqAnhYQEnjmEs2uAyYQea5IyLgENGZFQskKFhmHmlChvY2rVrHf5qyjf9lKnZa UD7ztugi5/I//O/6LlfPSbEgPLwlQD/S9ViZbdYnECv4RvroGe+m0WWnhZgQ+Q== 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 4SqZc86XCkzbL1; Tue, 12 Dec 2023 23:30: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 3BCNUmTg020104; Tue, 12 Dec 2023 23:30:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCNUmgI020101; Tue, 12 Dec 2023 23:30:48 GMT (envelope-from git) Date: Tue, 12 Dec 2023 23:30:48 GMT Message-Id: <202312122330.3BCNUmgI020101@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: 4a3cf5f329d6 - main - Stop #defining FREEBSD_ELF List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 4a3cf5f329d69076aa9d093d596eb0ee82d917f5 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4a3cf5f329d69076aa9d093d596eb0ee82d917f5 commit 4a3cf5f329d69076aa9d093d596eb0ee82d917f5 Author: John Baldwin AuthorDate: 2023-12-12 23:30:00 +0000 Commit: John Baldwin CommitDate: 2023-12-12 23:30:00 +0000 Stop #defining FREEBSD_ELF This was originally used (along with FREEBSD_AOUT) to prefer the use of ELF in various tools instead of a.out as part of the a.out to ELF transition in the 3.x days. The last use of it was removed from in commit 66422f5b7a1a6055f0b2358268eb902aab6e2e3e back in 2002, but various files still #define it. Reviewed by: kevans, imp, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42964 --- libexec/rtld-elf/Makefile | 2 +- stand/common/load_elf.c | 1 - stand/common/load_elf_obj.c | 1 - stand/common/reloc_elf.c | 1 - usr.sbin/kldxref/ef.c | 1 - usr.sbin/kldxref/ef_obj.c | 1 - usr.sbin/kldxref/kldxref.c | 1 - 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 06922c718b2b..fe7e39a6b788 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -38,7 +38,7 @@ SRCS= \ libmap.c MAN?= rtld.1 ACFLAGS+= -DLOCORE -CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -ffreestanding +CFLAGS+= -Wall -DIN_RTLD -ffreestanding CFLAGS+= -I${SRCTOP}/lib/csu/common .if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) RTLD_ARCH= ${MACHINE_ARCH:S/powerpc64le/powerpc64/} diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c index d53c0f8b5b84..8877e5f8b7e0 100644 --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -34,7 +34,6 @@ #include #include #include -#define FREEBSD_ELF #include #include "bootstrap.h" diff --git a/stand/common/load_elf_obj.c b/stand/common/load_elf_obj.c index 263553df5e90..9ff1d238b8c8 100644 --- a/stand/common/load_elf_obj.c +++ b/stand/common/load_elf_obj.c @@ -34,7 +34,6 @@ #include #include #include -#define FREEBSD_ELF #include #include "bootstrap.h" diff --git a/stand/common/reloc_elf.c b/stand/common/reloc_elf.c index cf5010a06ccd..e68e59a303a1 100644 --- a/stand/common/reloc_elf.c +++ b/stand/common/reloc_elf.c @@ -32,7 +32,6 @@ #include -#define FREEBSD_ELF #include #include "bootstrap.h" diff --git a/usr.sbin/kldxref/ef.c b/usr.sbin/kldxref/ef.c index 5d052cc90a6c..72e023e30783 100644 --- a/usr.sbin/kldxref/ef.c +++ b/usr.sbin/kldxref/ef.c @@ -43,7 +43,6 @@ #include #include #include -#define FREEBSD_ELF #include "ef.h" diff --git a/usr.sbin/kldxref/ef_obj.c b/usr.sbin/kldxref/ef_obj.c index 953e54dc0d28..027408876a5e 100644 --- a/usr.sbin/kldxref/ef_obj.c +++ b/usr.sbin/kldxref/ef_obj.c @@ -45,7 +45,6 @@ #include #include #include -#define FREEBSD_ELF #include "ef.h" diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c index 59b4f346c7ec..ae0d22181688 100644 --- a/usr.sbin/kldxref/kldxref.c +++ b/usr.sbin/kldxref/kldxref.c @@ -42,7 +42,6 @@ #include #include #include -#define FREEBSD_ELF #include #include From nobody Tue Dec 12 23:30:49 2023 X-Original-To: dev-commits-src-all@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 4SqZcB5GKPz53TLh; Tue, 12 Dec 2023 23:30: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 4SqZcB1QNsz4GWP; Tue, 12 Dec 2023 23:30:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702423850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S88hpbKmWZVUry0noHFEvxThR1lsbu5jj5U0v4kIpSQ=; b=KJCsPHAdbtfjkODpfuNNpYByfELL+WZwmEk3cnX3VgTCbnIyXyvgkOC4BXAsRRwVA9rMrr tnDM4Va86HEAOlF6Fcjf7q4SdaG64FG5THW1+7F7Q12APYBKFTgjj+yLW6IwsdXIzFefV7 hslxTPLRoac+3LnsholyYrm7BXl/PF3SNnn91OufnlXC+19lslOmyaJwB05/WzJdx8xcvG 0iXhtwc92+fc6rZ3ez1hvwW3fpQTuWjdKuT0l0x/h0g9F/M/WQdQww4ZsOG/S7OYrnE5JC fMdvtMOfhBdLfFnrGnN7bV6w2aRYnPnUCqeMv5uo331hJS5/YqxiVfZ/vFh0dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702423850; a=rsa-sha256; cv=none; b=wtSlbR7+oPim1FVhr+jU3qY0xh8/oAlXdzKsa3PE4I/JIDtJYR4OL+m/eeMkilNEZiGwHD 70T+DeZ+xzmt6A6K0m+jXTM6Jc5ge4F30QiP485W7WRrHDW2kWec421/Uvz6VZ4CE+4hVn 6sW3T/nNKXh6nzE1PAm1BgWq8brE1x0VUHi4hpYmlZCirdiW4hV2q+rkn8OEbqZYRKTCl2 8khqqJGUm1JKv+Vm390/oZJkvDn0m96sRog2gHz8uoK3ix31eHF+hlX8ETwEufZ/NWQuzV FyZgJg6Tsfa4mlgovXIw9BjXzQJwZdFvfQ1n3DEGUmc4KcWKTOzy2+3IkmWFfA== 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=1702423850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S88hpbKmWZVUry0noHFEvxThR1lsbu5jj5U0v4kIpSQ=; b=TRDvK2gNIv8+lQbTY95gvHBm1j7KNY99phqXh157cbzdIFWneP3MWZ0JxT0qduIuJRYMZZ 12miDCduBFaWsoR5E7beVlg0nHvMFjvZPuXBKF6nfBZWt/8kV1XV3sIuOLgHiStLBJjzoM IGXGga17L97EoCzFo46tVtPuWWL5JpkJdSuvMlXs1U3AvH3UZWO4GutE0qSU/hVNVgRQyB eteDhug39VTrirTnbO8h9drSV1TooqecXrlPUSm/K2DLuJZfotZcpviZTBPXwZuzR0aVpo Xdi2ziLbF/FCyqlKrbrn0z1dP6Fk71kz6hF3+8/r9KfZcv7xUa0Ph+PWWwp7RQ== 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 4SqZcB0S9Nzb6g; Tue, 12 Dec 2023 23:30: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 3BCNUnTJ020155; Tue, 12 Dec 2023 23:30:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCNUnQB020152; Tue, 12 Dec 2023 23:30:49 GMT (envelope-from git) Date: Tue, 12 Dec 2023 23:30:49 GMT Message-Id: <202312122330.3BCNUnQB020152@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: c40fa3dc98d3 - main - kldxref: Refactor PNP entry parsing, no functional change List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c40fa3dc98d3cd8c39605c19c9cc08026d8e72c9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c40fa3dc98d3cd8c39605c19c9cc08026d8e72c9 commit c40fa3dc98d3cd8c39605c19c9cc08026d8e72c9 Author: John Baldwin AuthorDate: 2023-12-12 23:30:16 +0000 Commit: John Baldwin CommitDate: 2023-12-12 23:30:16 +0000 kldxref: Refactor PNP entry parsing, no functional change - Add a free_pnp_list to complement parse_pnp_list. Add freeing of 'new_desc' which was previously leaked. - Move body of loop that checked a single pnp list element against a table entry into a parse_pnp_entry function to reduce indentation and split parse_entry into a smaller function. - Similarly, split out a record_pnp_info function from parse_entry which builds the pnp_list and walks a table. Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42965 --- usr.sbin/kldxref/kldxref.c | 247 +++++++++++++++++++++++++-------------------- 1 file changed, 139 insertions(+), 108 deletions(-) diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c index ae0d22181688..913b64ee2a16 100644 --- a/usr.sbin/kldxref/kldxref.c +++ b/usr.sbin/kldxref/kldxref.c @@ -237,6 +237,7 @@ parse_pnp_list(const char *desc, char **new_desc, pnp_list *list) size_t new_desc_size; FILE *fp; + TAILQ_INIT(list); walker = desc; ep = desc + strlen(desc); off = 0; @@ -379,6 +380,142 @@ err: errx(1, "Parse error of description string %s", desc); } +static void +free_pnp_list(char *new_desc, pnp_list *list) +{ + struct pnp_elt *elt, *elt_tmp; + + TAILQ_FOREACH_SAFE(elt, list, next, elt_tmp) { + TAILQ_REMOVE(list, elt, next); + free(elt); + } + free(new_desc); +} + +static void +parse_pnp_entry(struct elf_file *ef, struct pnp_elt *elt, const char *walker) +{ + uint8_t v1; + uint16_t v2; + uint32_t v4; + int value; + char buffer[1024]; + + if (elt->pe_kind == TYPE_W32) { + memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); + value = v4 & 0xffff; + record_int(value); + if (verbose > 1) + printf("W32:%#x", value); + value = (v4 >> 16) & 0xffff; + record_int(value); + if (verbose > 1) + printf(":%#x;", value); + } else if (elt->pe_kind & TYPE_INT) { + switch (elt->pe_kind & TYPE_SZ_MASK) { + case 1: + memcpy(&v1, walker + elt->pe_offset, sizeof(v1)); + if ((elt->pe_kind & TYPE_FLAGGED) && v1 == 0xff) + value = -1; + else + value = v1; + break; + case 2: + memcpy(&v2, walker + elt->pe_offset, sizeof(v2)); + if ((elt->pe_kind & TYPE_FLAGGED) && v2 == 0xffff) + value = -1; + else + value = v2; + break; + case 4: + memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); + if ((elt->pe_kind & TYPE_FLAGGED) && v4 == 0xffffffff) + value = -1; + else + value = v4; + break; + default: + errx(1, "Invalid size somehow %#x", elt->pe_kind); + } + if (verbose > 1) + printf("I:%#x;", value); + record_int(value); + } else if (elt->pe_kind == TYPE_T) { + /* Do nothing */ + } else { /* E, Z or D -- P already filtered */ + if (elt->pe_kind == TYPE_E) { + memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); + strcpy(buffer, pnp_eisaformat(v4)); + } else { + char *ptr; + + ptr = *(char **)(walker + elt->pe_offset); + buffer[0] = '\0'; + if (ptr != NULL) { + EF_SEG_READ_STRING(ef, (Elf_Off)ptr, + sizeof(buffer), buffer); + buffer[sizeof(buffer) - 1] = '\0'; + } + } + if (verbose > 1) + printf("%c:%s;", elt->pe_kind == TYPE_E ? 'E' : + (elt->pe_kind == TYPE_Z ? 'Z' : 'D'), buffer); + record_string(buffer); + } +} + +static void +record_pnp_info(struct elf_file *ef, const char *cval, + struct mod_pnp_match_info *pnp, const char *descr) +{ + pnp_list list; + struct pnp_elt *elt; + char *new_descr, *walker; + void *table; + size_t len; + int error, i; + + if (verbose > 1) + printf(" pnp info for bus %s format %s %d entries of %d bytes\n", + cval, descr, pnp->num_entry, pnp->entry_len); + + /* + * Parse descr to weed out the chaff and to create a list + * of offsets to output. + */ + parse_pnp_list(descr, &new_descr, &list); + record_int(MDT_PNP_INFO); + record_string(cval); + record_string(new_descr); + record_int(pnp->num_entry); + len = pnp->num_entry * pnp->entry_len; + table = malloc(len); + error = EF_SEG_READ_REL(ef, (Elf_Off)pnp->table, len, table); + if (error != 0) { + free_pnp_list(new_descr, &list); + free(table); + return; + } + + /* + * Walk the list and output things. We've collapsed all the + * variant forms of the table down to just ints and strings. + */ + walker = table; + for (i = 0; i < pnp->num_entry; i++) { + TAILQ_FOREACH(elt, &list, next) { + parse_pnp_entry(ef, elt, walker); + } + if (verbose > 1) + printf("\n"); + walker += pnp->entry_len; + } + + /* Now free it */ + free_pnp_list(new_descr, &list); + free(table); +} + static int parse_entry(struct mod_metadata *md, const char *cval, struct elf_file *ef, const char *kldname) @@ -388,10 +525,7 @@ parse_entry(struct mod_metadata *md, const char *cval, struct mod_pnp_match_info pnp; char descr[1024]; Elf_Off data; - int error, i; - size_t len; - char *walker; - void *table; + int error; data = (Elf_Off)md->md_data; error = 0; @@ -432,110 +566,7 @@ parse_entry(struct mod_metadata *md, const char *cval, printf(" pnp info for bus %s format %s %d entries of %d bytes\n", cval, descr, pnp.num_entry, pnp.entry_len); } else { - pnp_list list; - struct pnp_elt *elt, *elt_tmp; - char *new_descr; - - if (verbose > 1) - printf(" pnp info for bus %s format %s %d entries of %d bytes\n", - cval, descr, pnp.num_entry, pnp.entry_len); - /* - * Parse descr to weed out the chaff and to create a list - * of offsets to output. - */ - TAILQ_INIT(&list); - parse_pnp_list(descr, &new_descr, &list); - record_int(MDT_PNP_INFO); - record_string(cval); - record_string(new_descr); - record_int(pnp.num_entry); - len = pnp.num_entry * pnp.entry_len; - walker = table = malloc(len); - check(EF_SEG_READ_REL(ef, (Elf_Off)pnp.table, len, table)); - - /* - * Walk the list and output things. We've collapsed all the - * variant forms of the table down to just ints and strings. - */ - for (i = 0; i < pnp.num_entry; i++) { - TAILQ_FOREACH(elt, &list, next) { - uint8_t v1; - uint16_t v2; - uint32_t v4; - int value; - char buffer[1024]; - - if (elt->pe_kind == TYPE_W32) { - memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); - value = v4 & 0xffff; - record_int(value); - if (verbose > 1) - printf("W32:%#x", value); - value = (v4 >> 16) & 0xffff; - record_int(value); - if (verbose > 1) - printf(":%#x;", value); - } else if (elt->pe_kind & TYPE_INT) { - switch (elt->pe_kind & TYPE_SZ_MASK) { - case 1: - memcpy(&v1, walker + elt->pe_offset, sizeof(v1)); - if ((elt->pe_kind & TYPE_FLAGGED) && v1 == 0xff) - value = -1; - else - value = v1; - break; - case 2: - memcpy(&v2, walker + elt->pe_offset, sizeof(v2)); - if ((elt->pe_kind & TYPE_FLAGGED) && v2 == 0xffff) - value = -1; - else - value = v2; - break; - case 4: - memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); - if ((elt->pe_kind & TYPE_FLAGGED) && v4 == 0xffffffff) - value = -1; - else - value = v4; - break; - default: - errx(1, "Invalid size somehow %#x", elt->pe_kind); - } - if (verbose > 1) - printf("I:%#x;", value); - record_int(value); - } else if (elt->pe_kind == TYPE_T) { - /* Do nothing */ - } else { /* E, Z or D -- P already filtered */ - if (elt->pe_kind == TYPE_E) { - memcpy(&v4, walker + elt->pe_offset, sizeof(v4)); - strcpy(buffer, pnp_eisaformat(v4)); - } else { - char *ptr; - - ptr = *(char **)(walker + elt->pe_offset); - buffer[0] = '\0'; - if (ptr != NULL) { - EF_SEG_READ_STRING(ef, (Elf_Off)ptr, - sizeof(buffer), buffer); - buffer[sizeof(buffer) - 1] = '\0'; - } - } - if (verbose > 1) - printf("%c:%s;", elt->pe_kind == TYPE_E ? 'E' : (elt->pe_kind == TYPE_Z ? 'Z' : 'D'), buffer); - record_string(buffer); - } - } - if (verbose > 1) - printf("\n"); - walker += pnp.entry_len; - } - /* Now free it */ - TAILQ_FOREACH_SAFE(elt, &list, next, elt_tmp) { - TAILQ_REMOVE(&list, elt, next); - free(elt); - } - free(table); + record_pnp_info(ef, cval, &pnp, descr); } break; default: From nobody Tue Dec 12 23:45:07 2023 X-Original-To: dev-commits-src-all@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 4SqZwg6m5fz53VT7; Tue, 12 Dec 2023 23:45: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 4SqZwg6DBmz4JrY; Tue, 12 Dec 2023 23:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702424707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ZcrLQbOJhSQnqXf2nEcjEOShv+WjL4fa3ErWhgqLss=; b=aYFzHNXsKRtPaGpWKmrn1NoH8O72g8zo9xD/IsG4b9hbgP2YVHt1pw4LpNzWFziqUEfsJx EYbcRAUqEtBouKUqfEm8GX5AzFQGtO/q9Z4KZMgA2R3rkgzfhqTwRM/iCwrFlLtDIJYr34 qYtxsY2IYDhiSiE9JUDg0P4lmccd/7fpEOxGgh0p03XmRImbpMnYMfaGHJOCjjNhOnRSS2 ZxmjQqScW4HLdJztngItv3oUbPd6hk+hO2h2hjpXb1V0K4h5o0RWhltrjgEzlcNxfeWyJM Ctcr+AVeMfOi48m0VxyqveUeD6evofocYNs8vFMGGG/n5eOikTmKL4IS2uf+fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702424707; a=rsa-sha256; cv=none; b=XvyOhLXwXh0YMLKcIHDvGPwOQERg0/G1+MuZyZsaWMhMC3bmyRfv4LFcgHPgITFtH4JCKd fJ7NO4eRNXEyTIrx80sBq1rfYCYktDJTNLm13RC1g6dprZE6JwYxaYmiWitHn8Gkp5YtT8 zWy7b/0NCCucSSicmIxn4XjjWgJnHCkcbUaXJMLUZ0IKRCQu+K2+evTAByC5/p0hybyNKE N+XQt8QIWjasvyJ3v+KhY5NAU5jfre0HCtWQUavJq+XGaXcP5ePpnQxH/Bdz6P5v8yOe8s Uzv756bElP5scDVxVV88ZcqgegsAVR1KYx+TJnPgHWXkq2a+MHk26ta/YVjcWQ== 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=1702424707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ZcrLQbOJhSQnqXf2nEcjEOShv+WjL4fa3ErWhgqLss=; b=V6tRPUZs+AJILVwsH7C88w0xADpPmkWXZgsPT3LulDuzx9F7xX7V+BNUbjzfX/MwWARuDs C+nG7HrrRC0kZGVIUX8cz/0mMtbz9IK+lQK7yWSDWvRrBZQrdcN3F8pbFDgHNCLKQQpUzd 4Dc12IEKqbE//9H34aIA03KBrALDh1useaSSwZ5tuhhYmrfRpBWqokhtqmnf4ArVoNBhpn onS2Xm5zMmHVrzCOuBALYotfrZD2/MSk0b7kcX1vlo4QcvUbcul1sYRl1PH8J4owygYuS2 RlUhNi9k2cSsXN/OYL/p/P5x+0gDFdFufBff2ZIi9rNRUSqrt14H9fpl8e9v2g== 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 4SqZwg5Gq0zbgt; Tue, 12 Dec 2023 23:45: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 3BCNj7tJ040565; Tue, 12 Dec 2023 23:45:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCNj7ga040562; Tue, 12 Dec 2023 23:45:07 GMT (envelope-from git) Date: Tue, 12 Dec 2023 23:45:07 GMT Message-Id: <202312122345.3BCNj7ga040562@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: 0299afdff145 - main - kldxref: Make use of libelf to be a portable cross tool List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0299afdff145e5d861797fe9c2de8b090c456fba Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0299afdff145e5d861797fe9c2de8b090c456fba commit 0299afdff145e5d861797fe9c2de8b090c456fba Author: John Baldwin AuthorDate: 2023-12-12 23:43:00 +0000 Commit: John Baldwin CommitDate: 2023-12-12 23:43:00 +0000 kldxref: Make use of libelf to be a portable cross tool This allows kldxref to operate on kernel objects from any architecture, not just the native architecture. In particular, this will permit generating linker.hints files as part of a cross-arch release build. - elf.c is a new file that includes various wrappers around libelf including routines to read ELF data structures such as program and section headers and ELF relocations into the "generic" forms described in . This file also provides routines for converting a linker set into an array of addresses (GElf_Addr) as well as reading architecture-specific mod_* structures and converting them into "generic" Gmod_* forms where pointers are replaced with addresses. - The various architecture-specific reloc handlers now use GElf_* types for most values (including GElf_Rel and GElf_Rela for relocation structures) and use routines from to read and write target values. A new linker set matches reloc handlers to specific ELF (class, encoding, machine) tuples. - The bits of kldxref.c that write out linker.hints now use the encoding (ELFDATA2[LM]SB) of the first file encountered in a directory to set the endianness of the output file. Input files with a different architecture in the same directory are skipped with a warning. In addition, the initial version record for the file must be deferred until the first record is finished since the architecture of the output file is not known until then. - Various places that used 'sizeof(void *)' throughout now use 'elf_pointer_size()' to determine the size of a pointer in the target architecture. Tested by: amd64 binary on both amd64 and i386 /boot/kernel Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42966 --- usr.sbin/kldxref/Makefile | 9 +- usr.sbin/kldxref/ef.c | 730 ++++++++++++++++++++---------------------- usr.sbin/kldxref/ef.h | 291 ++++++++++++++--- usr.sbin/kldxref/ef_aarch64.c | 32 +- usr.sbin/kldxref/ef_amd64.c | 65 ++-- usr.sbin/kldxref/ef_i386.c | 56 ++-- usr.sbin/kldxref/ef_mips.c | 79 +++-- usr.sbin/kldxref/ef_nop.c | 40 --- usr.sbin/kldxref/ef_obj.c | 341 ++++++-------------- usr.sbin/kldxref/ef_powerpc.c | 62 ++-- usr.sbin/kldxref/ef_riscv.c | 35 +- usr.sbin/kldxref/elf.c | 674 ++++++++++++++++++++++++++++++++++++++ usr.sbin/kldxref/kldxref.c | 196 +++++++----- 13 files changed, 1685 insertions(+), 925 deletions(-) diff --git a/usr.sbin/kldxref/Makefile b/usr.sbin/kldxref/Makefile index 3d4ce7163b48..6e0a7244328b 100644 --- a/usr.sbin/kldxref/Makefile +++ b/usr.sbin/kldxref/Makefile @@ -2,14 +2,11 @@ PACKAGE= runtime PROG= kldxref MAN= kldxref.8 -SRCS= kldxref.c ef.c ef_obj.c +SRCS= kldxref.c ef.c ef_obj.c elf.c +SRCS+= ef_aarch64.c ef_amd64.c ef_i386.c ef_mips.c ef_powerpc.c ef_riscv.c WARNS?= 2 -.if exists(ef_${MACHINE_CPUARCH}.c) -SRCS+= ef_${MACHINE_CPUARCH}.c -.else -SRCS+= ef_nop.c -.endif +LIBADD= elf .include diff --git a/usr.sbin/kldxref/ef.c b/usr.sbin/kldxref/ef.c index 72e023e30783..aa9123d7f540 100644 --- a/usr.sbin/kldxref/ef.c +++ b/usr.sbin/kldxref/ef.c @@ -33,16 +33,13 @@ */ #include -#include #include #include -#include +#include #include #include #include -#include -#include #include "ef.h" @@ -50,76 +47,52 @@ struct ef_file { char *ef_name; struct elf_file *ef_efile; - Elf_Phdr *ef_ph; - int ef_fd; - int ef_type; - Elf_Ehdr ef_hdr; + GElf_Phdr *ef_ph; void *ef_fpage; /* First block of the file */ int ef_fplen; /* length of first block */ - Elf_Dyn *ef_dyn; /* Symbol table etc. */ - Elf_Hashelt ef_nbuckets; - Elf_Hashelt ef_nchains; - Elf_Hashelt *ef_buckets; - Elf_Hashelt *ef_chains; - Elf_Hashelt *ef_hashtab; - Elf_Off ef_stroff; + GElf_Hashelt ef_nbuckets; + GElf_Hashelt ef_nchains; + GElf_Hashelt *ef_buckets; + GElf_Hashelt *ef_chains; + GElf_Hashelt *ef_hashtab; caddr_t ef_strtab; - int ef_strsz; - Elf_Off ef_symoff; - Elf_Sym *ef_symtab; + long ef_strsz; + GElf_Sym *ef_symtab; int ef_nsegs; - Elf_Phdr *ef_segs[MAXSEGS]; + GElf_Phdr *ef_segs[MAXSEGS]; int ef_verbose; - Elf_Rel *ef_rel; /* relocation table */ - int ef_relsz; /* number of entries */ - Elf_Rela *ef_rela; /* relocation table */ - int ef_relasz; /* number of entries */ + GElf_Rel *ef_rel; /* relocation table */ + long ef_relsz; /* number of entries */ + GElf_Rela *ef_rela; /* relocation table */ + long ef_relasz; /* number of entries */ }; -static void ef_print_phdr(Elf_Phdr *); -static Elf_Off ef_get_offset(elf_file_t, Elf_Off); -static int ef_parse_dynamic(elf_file_t); +static void ef_print_phdr(GElf_Phdr *); +static GElf_Off ef_get_offset(elf_file_t, GElf_Addr); -static int ef_get_type(elf_file_t ef); -static int ef_close(elf_file_t ef); -static int ef_read(elf_file_t ef, Elf_Off offset, size_t len, void *dest); -static int ef_read_entry(elf_file_t ef, Elf_Off offset, size_t len, - void **ptr); +static void ef_close(elf_file_t ef); -static int ef_seg_read(elf_file_t ef, Elf_Off offset, size_t len, +static int ef_seg_read_rel(elf_file_t ef, GElf_Addr address, size_t len, void *dest); -static int ef_seg_read_rel(elf_file_t ef, Elf_Off offset, size_t len, - void *dest); -static int ef_seg_read_string(elf_file_t ef, Elf_Off offset, size_t len, +static int ef_seg_read_string(elf_file_t ef, GElf_Addr address, size_t len, char *dest); -static int ef_seg_read_entry(elf_file_t ef, Elf_Off offset, size_t len, - void **ptr); -static int ef_seg_read_entry_rel(elf_file_t ef, Elf_Off offset, size_t len, - void **ptr); - -static Elf_Addr ef_symaddr(elf_file_t ef, Elf_Size symidx); -static int ef_lookup_set(elf_file_t ef, const char *name, long *startp, - long *stopp, long *countp); + +static GElf_Addr ef_symaddr(elf_file_t ef, GElf_Size symidx); +static int ef_lookup_set(elf_file_t ef, const char *name, + GElf_Addr *startp, GElf_Addr *stopp, long *countp); static int ef_lookup_symbol(elf_file_t ef, const char *name, - Elf_Sym **sym); + GElf_Sym **sym); static struct elf_file_ops ef_file_ops = { - .get_type = ef_get_type, .close = ef_close, - .read = ef_read, - .read_entry = ef_read_entry, - .seg_read = ef_seg_read, .seg_read_rel = ef_seg_read_rel, .seg_read_string = ef_seg_read_string, - .seg_read_entry = ef_seg_read_entry, - .seg_read_entry_rel = ef_seg_read_entry_rel, .symaddr = ef_symaddr, .lookup_set = ef_lookup_set, - .lookup_symbol = ef_lookup_symbol }; static void -ef_print_phdr(Elf_Phdr *phdr) +ef_print_phdr(GElf_Phdr *phdr) { if ((phdr->p_flags & PF_W) == 0) { @@ -133,53 +106,29 @@ ef_print_phdr(Elf_Phdr *phdr) } } -static Elf_Off -ef_get_offset(elf_file_t ef, Elf_Off off) +static GElf_Off +ef_get_offset(elf_file_t ef, GElf_Addr addr) { - Elf_Phdr *ph; + GElf_Phdr *ph; int i; for (i = 0; i < ef->ef_nsegs; i++) { ph = ef->ef_segs[i]; - if (off >= ph->p_vaddr && off < ph->p_vaddr + ph->p_memsz) { - return (ph->p_offset + (off - ph->p_vaddr)); + if (addr >= ph->p_vaddr && addr < ph->p_vaddr + ph->p_memsz) { + return (ph->p_offset + (addr - ph->p_vaddr)); } } return (0); } -static int -ef_get_type(elf_file_t ef) -{ - - return (ef->ef_type); -} - /* - * next three functions copied from link_elf.c + * next two functions copied from link_elf.c */ -static unsigned long -elf_hash(const char *name) -{ - unsigned long h, g; - const unsigned char *p; - - h = 0; - p = (const unsigned char *)name; - while (*p != '\0') { - h = (h << 4) + *p++; - if ((g = h & 0xf0000000) != 0) - h ^= g >> 24; - h &= ~g; - } - return (h); -} - static int -ef_lookup_symbol(elf_file_t ef, const char *name, Elf_Sym **sym) +ef_lookup_symbol(elf_file_t ef, const char *name, GElf_Sym **sym) { unsigned long hash, symnum; - Elf_Sym *symp; + GElf_Sym *symp; char *strp; /* First, search hashed global symbols */ @@ -205,7 +154,7 @@ ef_lookup_symbol(elf_file_t ef, const char *name, Elf_Sym **sym) if (strcmp(name, strp) == 0) { if (symp->st_shndx != SHN_UNDEF || (symp->st_value != 0 && - ELF_ST_TYPE(symp->st_info) == STT_FUNC)) { + GELF_ST_TYPE(symp->st_info) == STT_FUNC)) { *sym = symp; return (0); } else @@ -219,10 +168,10 @@ ef_lookup_symbol(elf_file_t ef, const char *name, Elf_Sym **sym) } static int -ef_lookup_set(elf_file_t ef, const char *name, long *startp, long *stopp, - long *countp) +ef_lookup_set(elf_file_t ef, const char *name, GElf_Addr *startp, + GElf_Addr *stopp, long *countp) { - Elf_Sym *sym; + GElf_Sym *sym; char *setsym; int error, len; @@ -246,258 +195,340 @@ ef_lookup_set(elf_file_t ef, const char *name, long *startp, long *stopp, *stopp = sym->st_value; /* and the number of entries */ - *countp = (*stopp - *startp) / sizeof(void *); + *countp = (*stopp - *startp) / elf_pointer_size(ef->ef_efile); out: free(setsym); return (error); } -static Elf_Addr -ef_symaddr(elf_file_t ef, Elf_Size symidx) +static GElf_Addr +ef_symaddr(elf_file_t ef, GElf_Size symidx) { - const Elf_Sym *sym; + const GElf_Sym *sym; if (symidx >= ef->ef_nchains) return (0); sym = ef->ef_symtab + symidx; - if (ELF_ST_BIND(sym->st_info) == STB_LOCAL && + if (GELF_ST_BIND(sym->st_info) == STB_LOCAL && sym->st_shndx != SHN_UNDEF && sym->st_value != 0) return (sym->st_value); return (0); } static int -ef_parse_dynamic(elf_file_t ef) +ef_parse_dynamic(elf_file_t ef, const GElf_Phdr *phdyn) { - Elf_Dyn *dp; - Elf_Hashelt hashhdr[2]; + GElf_Shdr *shdr; + GElf_Dyn *dyn, *dp; + size_t i, ndyn, nshdr, nsym; int error; - Elf_Off rel_off; - Elf_Off rela_off; + GElf_Off hash_off, sym_off, str_off; + GElf_Off rel_off; + GElf_Off rela_off; int rel_sz; int rela_sz; - int rel_entry; - int rela_entry; + int dynamic_idx; + + /* + * The kernel linker parses the PT_DYNAMIC segment to find + * various important tables. The gelf API of libelf is + * section-oriented and requires extracting data from sections + * instead of segments (program headers). As a result, + * iterate over section headers to read various tables after + * parsing values from PT_DYNAMIC. + */ + error = elf_read_shdrs(ef->ef_efile, &nshdr, &shdr); + if (error != 0) + return (EFTYPE); + dyn = NULL; + + /* Find section for .dynamic. */ + dynamic_idx = -1; + for (i = 0; i < nshdr; i++) { + if (shdr[i].sh_type == SHT_DYNAMIC) { + if (shdr[i].sh_offset != phdyn->p_offset || + shdr[i].sh_size != phdyn->p_filesz) { + warnx(".dynamic section doesn't match phdr"); + error = EFTYPE; + goto out; + } + if (dynamic_idx != -1) { + warnx("multiple SHT_DYNAMIC sections"); + error = EFTYPE; + goto out; + } + dynamic_idx = i; + } + } + + error = elf_read_dynamic(ef->ef_efile, dynamic_idx, &ndyn, &dyn); + if (error != 0) + goto out; - rel_off = rela_off = 0; + hash_off = rel_off = rela_off = sym_off = str_off = 0; rel_sz = rela_sz = 0; - rel_entry = rela_entry = 0; - for (dp = ef->ef_dyn; dp->d_tag != DT_NULL; dp++) { + for (i = 0; i < ndyn; i++) { + dp = &dyn[i]; + if (dp->d_tag == DT_NULL) + break; + switch (dp->d_tag) { case DT_HASH: - error = ef_read(ef, ef_get_offset(ef, dp->d_un.d_ptr), - sizeof(hashhdr), hashhdr); - if (error != 0) { - warnx("can't read hash header (%jx)", - (uintmax_t)ef_get_offset(ef, dp->d_un.d_ptr)); - return (error); - } - ef->ef_nbuckets = hashhdr[0]; - ef->ef_nchains = hashhdr[1]; - error = ef_read_entry(ef, -1, - (hashhdr[0] + hashhdr[1]) * sizeof(Elf_Hashelt), - (void **)&ef->ef_hashtab); - if (error != 0) { - warnx("can't read hash table"); - return (error); - } - ef->ef_buckets = ef->ef_hashtab; - ef->ef_chains = ef->ef_buckets + ef->ef_nbuckets; + if (hash_off != 0) + warnx("second DT_HASH entry ignored"); + else + hash_off = ef_get_offset(ef, dp->d_un.d_ptr); break; case DT_STRTAB: - ef->ef_stroff = dp->d_un.d_ptr; - break; - case DT_STRSZ: - ef->ef_strsz = dp->d_un.d_val; + if (str_off != 0) + warnx("second DT_STRTAB entry ignored"); + else + str_off = ef_get_offset(ef, dp->d_un.d_ptr); break; case DT_SYMTAB: - ef->ef_symoff = dp->d_un.d_ptr; + if (sym_off != 0) + warnx("second DT_SYMTAB entry ignored"); + else + sym_off = ef_get_offset(ef, dp->d_un.d_ptr); break; case DT_SYMENT: - if (dp->d_un.d_val != sizeof(Elf_Sym)) - return (EFTYPE); + if (dp->d_un.d_val != elf_object_size(ef->ef_efile, + ELF_T_SYM)) { + error = EFTYPE; + goto out; + } break; case DT_REL: if (rel_off != 0) warnx("second DT_REL entry ignored"); - rel_off = dp->d_un.d_ptr; + else + rel_off = ef_get_offset(ef, dp->d_un.d_ptr); break; case DT_RELSZ: if (rel_sz != 0) warnx("second DT_RELSZ entry ignored"); - rel_sz = dp->d_un.d_val; + else + rel_sz = dp->d_un.d_val; break; case DT_RELENT: - if (rel_entry != 0) - warnx("second DT_RELENT entry ignored"); - rel_entry = dp->d_un.d_val; + if (dp->d_un.d_val != elf_object_size(ef->ef_efile, + ELF_T_REL)) { + error = EFTYPE; + goto out; + } break; case DT_RELA: if (rela_off != 0) warnx("second DT_RELA entry ignored"); - rela_off = dp->d_un.d_ptr; + else + rela_off = ef_get_offset(ef, dp->d_un.d_ptr); break; case DT_RELASZ: if (rela_sz != 0) - warnx("second DT_RELASZ entry ignored"); - rela_sz = dp->d_un.d_val; + warnx("second DT_RELSZ entry ignored"); + else + rela_sz = dp->d_un.d_val; break; case DT_RELAENT: - if (rela_entry != 0) - warnx("second DT_RELAENT entry ignored"); - rela_entry = dp->d_un.d_val; + if (dp->d_un.d_val != elf_object_size(ef->ef_efile, + ELF_T_RELA)) { + error = EFTYPE; + goto out; + } break; } } - if (ef->ef_symoff == 0) { + if (hash_off == 0) { + warnx("%s: no .hash section found\n", ef->ef_name); + error = EFTYPE; + goto out; + } + if (sym_off == 0) { warnx("%s: no .dynsym section found\n", ef->ef_name); - return (EFTYPE); + error = EFTYPE; + goto out; } - if (ef->ef_stroff == 0) { + if (str_off == 0) { warnx("%s: no .dynstr section found\n", ef->ef_name); - return (EFTYPE); - } - if (ef_read_entry(ef, ef_get_offset(ef, ef->ef_symoff), - ef->ef_nchains * sizeof(Elf_Sym), - (void **)&ef->ef_symtab) != 0) { - if (ef->ef_verbose) - warnx("%s: can't load .dynsym section (0x%jx)", - ef->ef_name, (uintmax_t)ef->ef_symoff); - return (EIO); - } - if (ef_read_entry(ef, ef_get_offset(ef, ef->ef_stroff), ef->ef_strsz, - (void **)&ef->ef_strtab) != 0) { - warnx("can't load .dynstr section"); - return (EIO); - } - if (rel_off != 0) { - if (rel_entry == 0) { - warnx("%s: no DT_RELENT for DT_REL", ef->ef_name); - return (EFTYPE); - } - if (rel_entry != sizeof(Elf_Rel)) { - warnx("%s: inconsistent DT_RELENT value", - ef->ef_name); - return (EFTYPE); - } - if (rel_sz % rel_entry != 0) { - warnx("%s: inconsistent values for DT_RELSZ and " - "DT_RELENT", ef->ef_name); - return (EFTYPE); - } - if (ef_read_entry(ef, ef_get_offset(ef, rel_off), rel_sz, - (void **)&ef->ef_rel) != 0) { - warnx("%s: cannot load DT_REL section", ef->ef_name); - return (EIO); - } - ef->ef_relsz = rel_sz / rel_entry; - if (ef->ef_verbose) - warnx("%s: %d REL entries", ef->ef_name, - ef->ef_relsz); + error = EFTYPE; + goto out; } - if (rela_off != 0) { - if (rela_entry == 0) { - warnx("%s: no DT_RELAENT for DT_RELA", ef->ef_name); - return (EFTYPE); - } - if (rela_entry != sizeof(Elf_Rela)) { - warnx("%s: inconsistent DT_RELAENT value", - ef->ef_name); - return (EFTYPE); - } - if (rela_sz % rela_entry != 0) { - warnx("%s: inconsistent values for DT_RELASZ and " - "DT_RELAENT", ef->ef_name); - return (EFTYPE); - } - if (ef_read_entry(ef, ef_get_offset(ef, rela_off), rela_sz, - (void **)&ef->ef_rela) != 0) { - warnx("%s: cannot load DT_RELA section", ef->ef_name); - return (EIO); - } - ef->ef_relasz = rela_sz / rela_entry; - if (ef->ef_verbose) - warnx("%s: %d RELA entries", ef->ef_name, - ef->ef_relasz); + if (rel_off == 0 && rela_off == 0) { + warnx("%s: no ELF relocation table found\n", ef->ef_name); + error = EFTYPE; + goto out; } - return (0); -} -static int -ef_read(elf_file_t ef, Elf_Off offset, size_t len, void *dest) -{ - ssize_t r; + for (i = 0; i < nshdr; i++) { + switch (shdr[i].sh_type) { + case SHT_HASH: + if (shdr[i].sh_offset != hash_off) { + warnx("%s: ignoring SHT_HASH at different offset from DT_HASH", + ef->ef_name); + break; + } - if (offset != (Elf_Off)-1) { - if (lseek(ef->ef_fd, offset, SEEK_SET) == -1) - return (EIO); - } + /* + * libelf(3) mentions ELF_T_HASH, but it is + * not defined. + */ + if (shdr[i].sh_size < sizeof(*ef->ef_hashtab) * 2) { + warnx("hash section too small"); + error = EFTYPE; + goto out; + } + error = elf_read_data(ef->ef_efile, ELF_T_WORD, + shdr[i].sh_offset, shdr[i].sh_size, + (void **)&ef->ef_hashtab); + if (error != 0) { + warnc(error, "can't read hash table"); + goto out; + } + ef->ef_nbuckets = ef->ef_hashtab[0]; + ef->ef_nchains = ef->ef_hashtab[1]; + if ((2 + ef->ef_nbuckets + ef->ef_nchains) * + sizeof(*ef->ef_hashtab) != shdr[i].sh_size) { + warnx("inconsistent hash section size"); + error = EFTYPE; + goto out; + } - r = read(ef->ef_fd, dest, len); - if (r != -1 && (size_t)r == len) - return (0); - else - return (EIO); -} + ef->ef_buckets = ef->ef_hashtab + 2; + ef->ef_chains = ef->ef_buckets + ef->ef_nbuckets; + break; + case SHT_DYNSYM: + if (shdr[i].sh_offset != sym_off) { + warnx("%s: ignoring SHT_DYNSYM at different offset from DT_SYMTAB", + ef->ef_name); + break; + } + error = elf_read_symbols(ef->ef_efile, i, &nsym, + &ef->ef_symtab); + if (error != 0) { + if (ef->ef_verbose) + warnx("%s: can't load .dynsym section (0x%jx)", + ef->ef_name, (uintmax_t)sym_off); + goto out; + } + break; + case SHT_STRTAB: + if (shdr[i].sh_offset != str_off) + break; + error = elf_read_string_table(ef->ef_efile, + &shdr[i], &ef->ef_strsz, &ef->ef_strtab); + if (error != 0) { + warnx("can't load .dynstr section"); + error = EIO; + goto out; + } + break; + case SHT_REL: + if (shdr[i].sh_offset != rel_off) + break; + if (shdr[i].sh_size != rel_sz) { + warnx("%s: size mismatch for DT_REL section", + ef->ef_name); + error = EFTYPE; + goto out; + } + error = elf_read_rel(ef->ef_efile, i, &ef->ef_relsz, + &ef->ef_rel); + if (error != 0) { + warnx("%s: cannot load DT_REL section", + ef->ef_name); + goto out; + } + break; + case SHT_RELA: + if (shdr[i].sh_offset != rela_off) + break; + if (shdr[i].sh_size != rela_sz) { + warnx("%s: size mismatch for DT_RELA section", + ef->ef_name); + error = EFTYPE; + goto out; + } + error = elf_read_rela(ef->ef_efile, i, &ef->ef_relasz, + &ef->ef_rela); + if (error != 0) { + warnx("%s: cannot load DT_RELA section", + ef->ef_name); + goto out; + } + break; + } + } -static int -ef_read_entry(elf_file_t ef, Elf_Off offset, size_t len, void **ptr) -{ - int error; + if (ef->ef_hashtab == NULL) { + warnx("%s: did not find a symbol hash table", ef->ef_name); + error = EFTYPE; + goto out; + } + if (ef->ef_symtab == NULL) { + warnx("%s: did not find a dynamic symbol table", ef->ef_name); + error = EFTYPE; + goto out; + } + if (nsym != ef->ef_nchains) { + warnx("%s: symbol count mismatch", ef->ef_name); + error = EFTYPE; + goto out; + } + if (ef->ef_strtab == NULL) { + warnx("%s: did not find a dynamic string table", ef->ef_name); + error = EFTYPE; + goto out; + } + if (rel_off != 0 && ef->ef_rel == NULL) { + warnx("%s: did not find a DT_REL relocation table", + ef->ef_name); + error = EFTYPE; + goto out; + } + if (rela_off != 0 && ef->ef_rela == NULL) { + warnx("%s: did not find a DT_RELA relocation table", + ef->ef_name); + error = EFTYPE; + goto out; + } - *ptr = malloc(len); - if (*ptr == NULL) - return (errno); - error = ef_read(ef, offset, len, *ptr); - if (error != 0) - free(*ptr); + error = 0; +out: + free(dyn); + free(shdr); return (error); } static int -ef_seg_read(elf_file_t ef, Elf_Off offset, size_t len, void *dest) +ef_seg_read_rel(elf_file_t ef, GElf_Addr address, size_t len, void *dest) { - Elf_Off ofs; - - ofs = ef_get_offset(ef, offset); - if (ofs == 0) { - if (ef->ef_verbose) - warnx("ef_seg_read(%s): zero offset (%jx:%ju)", - ef->ef_name, (uintmax_t)offset, (uintmax_t)ofs); - return (EFAULT); - } - return (ef_read(ef, ofs, len, dest)); -} - -static int -ef_seg_read_rel(elf_file_t ef, Elf_Off offset, size_t len, void *dest) -{ - Elf_Off ofs; - const Elf_Rela *a; - const Elf_Rel *r; + GElf_Off ofs; + const GElf_Rela *a; + const GElf_Rel *r; int error; - ofs = ef_get_offset(ef, offset); + ofs = ef_get_offset(ef, address); if (ofs == 0) { if (ef->ef_verbose) warnx("ef_seg_read_rel(%s): zero offset (%jx:%ju)", - ef->ef_name, (uintmax_t)offset, (uintmax_t)ofs); + ef->ef_name, (uintmax_t)address, (uintmax_t)ofs); return (EFAULT); } - if ((error = ef_read(ef, ofs, len, dest)) != 0) + error = elf_read_raw_data(ef->ef_efile, ofs, dest, len); + if (error != 0) return (error); for (r = ef->ef_rel; r < &ef->ef_rel[ef->ef_relsz]; r++) { - error = ef_reloc(ef->ef_efile, r, EF_RELOC_REL, 0, offset, len, - dest); + error = elf_reloc(ef->ef_efile, r, ELF_T_REL, 0, address, + len, dest); if (error != 0) return (error); } for (a = ef->ef_rela; a < &ef->ef_rela[ef->ef_relasz]; a++) { - error = ef_reloc(ef->ef_efile, a, EF_RELOC_RELA, 0, offset, len, - dest); + error = elf_reloc(ef->ef_efile, a, ELF_T_RELA, 0, address, + len, dest); if (error != 0) return (error); } @@ -505,168 +536,115 @@ ef_seg_read_rel(elf_file_t ef, Elf_Off offset, size_t len, void *dest) } static int -ef_seg_read_string(elf_file_t ef, Elf_Off offset, size_t len, char *dest) +ef_seg_read_string(elf_file_t ef, GElf_Addr address, size_t len, char *dest) { - Elf_Off ofs; - ssize_t r; + GElf_Off ofs; + int error; - ofs = ef_get_offset(ef, offset); - if (ofs == 0 || ofs == (Elf_Off)-1) { + ofs = ef_get_offset(ef, address); + if (ofs == 0 || ofs == (GElf_Off)-1) { if (ef->ef_verbose) warnx("ef_seg_read_string(%s): bad offset (%jx:%ju)", - ef->ef_name, (uintmax_t)offset, (uintmax_t)ofs); + ef->ef_name, (uintmax_t)address, (uintmax_t)ofs); return (EFAULT); } - r = pread(ef->ef_fd, dest, len, ofs); - if (r < 0) - return (errno); + error = elf_read_raw_data(ef->ef_efile, ofs, dest, len); + if (error != 0) + return (error); if (strnlen(dest, len) == len) return (EFAULT); return (0); } -static int -ef_seg_read_entry(elf_file_t ef, Elf_Off offset, size_t len, void **ptr) -{ - int error; - - *ptr = malloc(len); - if (*ptr == NULL) - return (errno); - error = ef_seg_read(ef, offset, len, *ptr); - if (error != 0) - free(*ptr); - return (error); -} - -static int -ef_seg_read_entry_rel(elf_file_t ef, Elf_Off offset, size_t len, void **ptr) -{ - int error; - - *ptr = malloc(len); - if (*ptr == NULL) - return (errno); - error = ef_seg_read_rel(ef, offset, len, *ptr); - if (error != 0) - free(*ptr); - return (error); -} - int -ef_open(const char *filename, struct elf_file *efile, int verbose) +ef_open(struct elf_file *efile, int verbose) { elf_file_t ef; - Elf_Ehdr *hdr; - int fd; + GElf_Ehdr *hdr; + size_t i, nphdr, nsegs; int error; - int phlen, res; - int nsegs; - Elf_Phdr *phdr, *phdyn, *phlimit; + GElf_Phdr *phdr, *phdyn; - if (filename == NULL) - return (EINVAL); - if ((fd = open(filename, O_RDONLY)) == -1) - return (errno); + hdr = &efile->ef_hdr; + if (hdr->e_phnum == 0 || + hdr->e_phentsize != elf_object_size(efile, ELF_T_PHDR) || + hdr->e_shnum == 0 || hdr->e_shoff == 0 || + hdr->e_shentsize != elf_object_size(efile, ELF_T_SHDR)) + return (EFTYPE); ef = malloc(sizeof(*ef)); - if (ef == NULL) { - close(fd); + if (ef == NULL) return (errno); - } efile->ef_ef = ef; efile->ef_ops = &ef_file_ops; bzero(ef, sizeof(*ef)); ef->ef_verbose = verbose; - ef->ef_fd = fd; - ef->ef_name = strdup(filename); + ef->ef_name = strdup(efile->ef_filename); ef->ef_efile = efile; - hdr = (Elf_Ehdr *)&ef->ef_hdr; - do { - res = read(fd, hdr, sizeof(*hdr)); - error = EFTYPE; - if (res != sizeof(*hdr)) - break; - if (!IS_ELF(*hdr)) - break; - if (hdr->e_ident[EI_CLASS] != ELF_TARG_CLASS || - hdr->e_ident[EI_DATA] != ELF_TARG_DATA || - hdr->e_ident[EI_VERSION] != EV_CURRENT || - hdr->e_version != EV_CURRENT || - hdr->e_machine != ELF_TARG_MACH || - hdr->e_phentsize != sizeof(Elf_Phdr)) - break; - phlen = hdr->e_phnum * sizeof(Elf_Phdr); - if (ef_read_entry(ef, hdr->e_phoff, phlen, - (void **)&ef->ef_ph) != 0) - break; - phdr = ef->ef_ph; - phlimit = phdr + hdr->e_phnum; - nsegs = 0; - phdyn = NULL; - while (phdr < phlimit) { - if (verbose > 1) - ef_print_phdr(phdr); - switch (phdr->p_type) { - case PT_LOAD: - if (nsegs < MAXSEGS) - ef->ef_segs[nsegs] = phdr; - nsegs++; - break; - case PT_PHDR: - break; - case PT_DYNAMIC: - phdyn = phdr; - break; - } - phdr++; - } + + error = elf_read_phdrs(efile, &nphdr, &ef->ef_ph); + if (error != 0) { + phdr = NULL; + goto out; + } + + error = EFTYPE; + nsegs = 0; + phdyn = NULL; + phdr = ef->ef_ph; + for (i = 0; i < nphdr; i++, phdr++) { if (verbose > 1) - printf("\n"); - if (phdyn == NULL) { - warnx("Skipping %s: not dynamically-linked", - filename); + ef_print_phdr(phdr); + switch (phdr->p_type) { + case PT_LOAD: + if (nsegs < MAXSEGS) + ef->ef_segs[nsegs] = phdr; + nsegs++; break; - } else if (nsegs > MAXSEGS) { - warnx("%s: too many segments", filename); + case PT_PHDR: break; - } - ef->ef_nsegs = nsegs; - if (ef_read_entry(ef, phdyn->p_offset, - phdyn->p_filesz, (void **)&ef->ef_dyn) != 0) { - printf("ef_read_entry failed\n"); + case PT_DYNAMIC: + phdyn = phdr; break; } *** 2714 LINES SKIPPED *** From nobody Wed Dec 13 01:36:56 2023 X-Original-To: dev-commits-src-all@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 4SqdPh3jG7z53dNt; Wed, 13 Dec 2023 01:36: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 4SqdPh3CLJz4V6G; Wed, 13 Dec 2023 01:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702431416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8r3zTlGg36EeGl5egnE0H7wdAQYkU7wipG7ZCFyBJc=; b=BeaE+RkZU5JA3+XsptCY4MK9BmdHWC++4VItq1KRlfo9r1OkfJCYyYEqbM11ubq19Iy12b I/BiA5TUOiNc8scDyz8OhNABGwg5TpOXy6A0Q6ckRR+E7m2mD//6/1qhSKCgV1bluUsEdz pQCL4Amb4lZzuneH0GvbsDfeZIx0KXzqldAKBYgYsjqJrp5dRbMvfLjYn2I8LgJ2oOHsPJ c4IXqxgap4zxUTpNu2wXWubu5859qFaKjzv85TnN7XeTb7jCkgyc0eurXlXEifXQFM0V2s zwDe2ZqDGe0wCL7ahwv307NRVStlZjf8YKJMiNrzlGRRg7QsFm9hLmIJBffzWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702431416; a=rsa-sha256; cv=none; b=J6fx0xNb8FIGaWqU8i3BgvekV2yfH7fvrQedTnRyI7mcaCDmSx5Ay64HGrygOiFdWUARjI BXcKfavPXh0H35mULTCOT0afSBWhD+9gDTeu8dy3wwyKN8U5Fmr0lw5yPyn+sUmfv/hB8u NOybr9erSEI3CRqZFS9fUdgzePXYw8HGGZcFutXOQ+Ge1Z25L2lmZRRisGbKszeFJ5+8/6 qynohBTvmDdFVMvQxOOMFCRg6B8/YuMVtw/HlosMTwQQuODTQie5tukivy9hBtbjl5PI+9 XeDcvGjsomrKh0sTOccOOD3HF6XWUhw7nSnbHb9mZNKhPGS+L0MmhPwyui781g== 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=1702431416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8r3zTlGg36EeGl5egnE0H7wdAQYkU7wipG7ZCFyBJc=; b=kCZwiNuewhUEh+2xMOUGf4VZd+N1FENnbEVsE6IfdfsI24kmX+1LVEVxn4nw33SK2NXn0W VoMwbzUF983Dn+nW7UQBS56vuj1v4rxNtZJpO2hes0JZ8t8Y48HUVBEG3yNOPcTfJzYw+U BIATxoD673hXXoJf70n29lXc5HzWjfWqZgpnSgNcilVWSh25o+EoR0zrK3kV39EJhxSpVy OqBYkAyO9wMJM2CdITMlfTIibR/9LZ+dTsSfHa61nkRzMFhiH3/MNilm8VDJM5RMifIoga fTkDK/Uz2LAjgXfDtzhVHXhLdgvkkSpnH0xInwBKqPohZp40+KRFawGW2oVZsg== 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 4SqdPh2HLxzfHp; Wed, 13 Dec 2023 01:36: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 3BD1au63024576; Wed, 13 Dec 2023 01:36:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BD1auwK024573; Wed, 13 Dec 2023 01:36:56 GMT (envelope-from git) Date: Wed, 13 Dec 2023 01:36:56 GMT Message-Id: <202312130136.3BD1auwK024573@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: 92aa071dc711 - main - Cirrus-CI: stop forcibly installing pkg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 92aa071dc711d465c41e691bc2f836ab10055483 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=92aa071dc711d465c41e691bc2f836ab10055483 commit 92aa071dc711d465c41e691bc2f836ab10055483 Author: Ed Maste AuthorDate: 2023-12-09 22:12:33 +0000 Commit: Ed Maste CommitDate: 2023-12-13 00:50:19 +0000 Cirrus-CI: stop forcibly installing pkg Updated pkg is now in quarterly and there is no need to forcibly install a specific version. This reverts commit 1c376684c7441a90e64f082c19e3da7942716ad1. This reverts commit 3c097b06a71715ec9ae86430ee94e25e954a1e36. Reported by: bapt Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index bcb6b411847e..96fbb873136c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -93,11 +93,6 @@ task: install_script: - sh .cirrus-ci/pkg-install.sh ${TOOLCHAIN_PKG} git-lite - xxx_upgrade_pkg_script: - - fetch https://pkg.freebsd.org/FreeBSD:13:amd64/latest/All/pkg-1.20.9.pkg - - pkg install -y ./pkg-1.20.9.pkg - - rm -f pkg-1.20.9.pkg - setup_script: - uname -a - gpart show From nobody Wed Dec 13 11:05:10 2023 X-Original-To: dev-commits-src-all@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 4Sqt1L3Bf2z53c0L; Wed, 13 Dec 2023 11:05: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 4Sqt1L1q35z4Wsw; Wed, 13 Dec 2023 11:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702465510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7wbfH6JTg7pMhew9+lgYsDiajuMCthr4SWrQH6/KeU=; b=m3VaqajrJapt4MeIGSGbgx+fSHD0LVECTGmuurwMG2PKRas4uYi3yUiA+QCj+nxZ2oprfn W7Jl2HkysZ8qpEZQAw8sw4FO89zNn+3IjH4sEJZldONB6LYyIwD7CgIZ2R1ff1JVACrXL+ MkeHNNfEmSK44EFEYJ3IQuvZMV13AdRNFJBC83K/K/A4WsMx07Cmx7c/rXj880eLPwHTPi yZoIRGoDV34cDeZ13k1AIDQ19hPjvK6r80R5VrMkQyyExjWnC4qKctS843WZoLALVCzF8Q Y22lq72P0vcYc5R89S151w28WsfXcsuGt6r/9NSirernVb+rTz7r6YKSyaJcuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702465510; a=rsa-sha256; cv=none; b=sHpOHW9h0XQFu4rgvtqe7cq23j8+pCR/6eAMcFtOiKTCIXEBfCB4w56k/06qgSmbgWrWDB kMqjgjzqvM2HxFgPYROSOIFKT/I+7fbUvpKbFUlApnWUH7mXLWVMe4PTLhxSjQwcJATuKG R1PXU7vOWEPX1kAHRVTleoYhupDohnTnPlMhG5gHC7orOh8xxKmEY39HRJ8tTTjDKUNj1a 7g7DTX53qLBB1dQUm9lZvobm8P6kujILrEeymlr8zlnOTQTb2k8N7vXB8NirPx3N6ODNeP T8d0kT7F1vs26aUaEhjrQvs7WKMcuBHMgf23SekxPOIBp2R1+HT1evKBtyScNQ== 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=1702465510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7wbfH6JTg7pMhew9+lgYsDiajuMCthr4SWrQH6/KeU=; b=yjzyMHAz1NY8hqU4pAnred8dLhq6uzj4lORKjMURqLnq3vEJHPvCKieD39eQgjlZNIIgYK zgf4pNBKKEvIqcPbTlIh5AmR3YwWTsE/8O8xsjsJ+d6d9fzdlesyiPvtI5JMSXWJP4Fzwt ucyzkoJeED9nVf7ScZDZ5sbJv/bd6QsGIVxbE7WoYJuf1jTwxwyhDhXVmSVfZDj2P+TxCu /94+vd9Cciz3evwm+uPKAG9mgbCFEzya4xCNzn8WGVIhwV82AbjkeZWJJf1awqPIlh0/XU Yy5jsYSuoERZoXTAf3I2C6pYjnxMBygvzgYfq92mF4atW6ATjwFFY/Xmq0DKxQ== 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 4Sqt1L0crszw2Q; Wed, 13 Dec 2023 11:05: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 3BDB5AD3082238; Wed, 13 Dec 2023 11:05:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDB5AfA082235; Wed, 13 Dec 2023 11:05:10 GMT (envelope-from git) Date: Wed, 13 Dec 2023 11:05:10 GMT Message-Id: <202312131105.3BDB5AfA082235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 97530894fc14 - main - kldxref: fix build on 32 bits arches List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97530894fc142a9c44a5909e6ae668dc95a5036a Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=97530894fc142a9c44a5909e6ae668dc95a5036a commit 97530894fc142a9c44a5909e6ae668dc95a5036a Author: Baptiste Daroussin AuthorDate: 2023-12-13 08:19:18 +0000 Commit: Baptiste Daroussin CommitDate: 2023-12-13 11:04:43 +0000 kldxref: fix build on 32 bits arches --- usr.sbin/kldxref/ef.h | 4 ++-- usr.sbin/kldxref/ef_obj.c | 4 ++-- usr.sbin/kldxref/elf.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/kldxref/ef.h b/usr.sbin/kldxref/ef.h index a96bd72d6931..2909704bf2d1 100644 --- a/usr.sbin/kldxref/ef.h +++ b/usr.sbin/kldxref/ef.h @@ -218,7 +218,7 @@ int elf_read_shdrs(struct elf_file *efile, size_t *nshdrp, * Read the dynamic table from a section of an ELF file into a * dynamically-allocated array of GElf_Dyn objects. */ -int elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, +int elf_read_dynamic(struct elf_file *efile, int section_index, size_t *ndynp, GElf_Dyn **dynp); /* @@ -226,7 +226,7 @@ int elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, * dynamically-allocated array of GElf_Sym objects. */ int elf_read_symbols(struct elf_file *efile, int section_index, - long *nsymp, GElf_Sym **symp); + size_t *nsymp, GElf_Sym **symp); /* * Read a string table described by a section header of an ELF file diff --git a/usr.sbin/kldxref/ef_obj.c b/usr.sbin/kldxref/ef_obj.c index a1d46241b803..36c0dce432b6 100644 --- a/usr.sbin/kldxref/ef_obj.c +++ b/usr.sbin/kldxref/ef_obj.c @@ -82,7 +82,7 @@ struct ef_file { int nrel; GElf_Sym *ddbsymtab; /* The symbol table we are using */ - long ddbsymcnt; /* Number of symbols */ + size_t ddbsymcnt; /* Number of symbols */ caddr_t ddbstrtab; /* String table */ long ddbstrcnt; /* number of bytes in string table */ @@ -155,7 +155,7 @@ ef_obj_symaddr(elf_file_t ef, GElf_Size symidx) { const GElf_Sym *sym; - if (symidx >= (size_t)ef->ddbsymcnt) + if (symidx >= ef->ddbsymcnt) return (0); sym = ef->ddbsymtab + symidx; diff --git a/usr.sbin/kldxref/elf.c b/usr.sbin/kldxref/elf.c index a30eb4456a76..f8a6510ed352 100644 --- a/usr.sbin/kldxref/elf.c +++ b/usr.sbin/kldxref/elf.c @@ -329,7 +329,7 @@ out: } int -elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, +elf_read_dynamic(struct elf_file *efile, int section_index, size_t *ndynp, GElf_Dyn **dynp) { GElf_Shdr shdr; @@ -365,14 +365,14 @@ elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp, } int -elf_read_symbols(struct elf_file *efile, int section_index, long *nsymp, +elf_read_symbols(struct elf_file *efile, int section_index, size_t *nsymp, GElf_Sym **symp) { GElf_Shdr shdr; Elf_Scn *scn; Elf_Data *data; GElf_Sym *sym; - long i, nsym; + size_t i, nsym; scn = elf_getscn(efile->ef_elf, section_index); if (scn == NULL) From nobody Wed Dec 13 14:48:41 2023 X-Original-To: dev-commits-src-all@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 4SqyzF6MJcz53shs; Wed, 13 Dec 2023 14:48: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 4SqyzF5x2kz3Sjb; Wed, 13 Dec 2023 14:48:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702478921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nuWiMAlZUSd3X1j0LUaPmktwnCLfkNpL194q+vLHof8=; b=szznmJk67dw8pVD2dOtfXWv2LVnT2hpZVOFrprk1d5VWe77+x3uOEpO+b4OrBw/2pvlFi0 Ze+Iqemo1CKPcBXr4POd8bdF4Qn03zj1zXXn6i73P1BwrxVY/si2X2+WtuRT0L4uwzrFGs Il66IweSv9o+SJ0pz3gzh0POmuGowc+nIt6BUecoRBpIAGlmdadqktUBWSBjCiLJo6g9x7 b2M87zLJg7E/dPOYXxqHKKzMHELEmeMmnDndANRe9H84JAhVWgAnwErJByE2BZ8f5BXNpH 5oCargjRwKgH7QgJOA6HDooFIvqlEDkj6UqJdxrA3xIMudRekzHZuL1I9f9YXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702478921; a=rsa-sha256; cv=none; b=vvXxpe4z0yCEzgAKa5FQLaXt2eVcNT0ggh+q+aINGajn/dA9s9je8Vg/ZbSTRxoyGuQJ6B P3Xv7OhoHUanIiskzZ6xFU+bqJasI4FHMrVtNI1oN8pjgdGVHWrsZYUeB8xLDTWKmVg7wG 9QCAdfU8awXkg+kp2r4QYufCViSj+dr01rEQLWgKufy2EY8WZG70FEg/M6ZNYvueUJ7JQR 66qubaAVj1WwH6DUM7p/QIxNlq9ybs0rQEOvF7TPGepVBnuF7ifZVs1PHZtWDbsaw8RpoR L3t2HAM5zLuzgkmzdqnu7HH3naSxtHleCC/b99+AUrrDNlJcidvpvBjDbcaC4Q== 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=1702478921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nuWiMAlZUSd3X1j0LUaPmktwnCLfkNpL194q+vLHof8=; b=AAm/ViuQT7hGo+kPG9B9xFSBjJKuZrqgrnH60aKX6+EaLC9QIxlEvr5X82HdUPw2QcZZs1 07QXndWUTsbnO7Pj26ZUd/bvAZ1L8vwJCA0N21ut776KMqSHL5UG6Saqyr2ft8/j6qnmjw WqDwsSf1mJgwwXke4T1RpIxVTnfF6/RHev6M4J+5JqFF8O3G8aVzDMyTlQpd0UF4yS0/W6 gZ8xgQWs+g6Upj0ie9vvg1UFK0GFAl8lo6fRaJy4cpQm8HGO/Z1og4za2/uZvcPfi5MLuf 0Mrydv56P0PtrKR3fZVvyMwPaj0liR7nCqbgkpmGoHWSFYqXIdl1MHZj7MYzRg== 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 4SqyzF4zjJz12QX; Wed, 13 Dec 2023 14:48:41 +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 3BDEmfHx049781; Wed, 13 Dec 2023 14:48:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDEmfwf049778; Wed, 13 Dec 2023 14:48:41 GMT (envelope-from git) Date: Wed, 13 Dec 2023 14:48:41 GMT Message-Id: <202312131448.3BDEmfwf049778@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: 5437c3b6adad - main - qat: Update firmware for 4xxx devices to version 1.1.20 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5437c3b6adade1d72971fa214ead90a0296c79f3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5437c3b6adade1d72971fa214ead90a0296c79f3 commit 5437c3b6adade1d72971fa214ead90a0296c79f3 Author: Michal Gulbicki AuthorDate: 2023-11-20 15:25:57 +0000 Commit: Mark Johnston CommitDate: 2023-12-13 14:47:37 +0000 qat: Update firmware for 4xxx devices to version 1.1.20 Key features: - added zeropadding feature for compression - added partial decompression support - added DC rate limiting support - added Admin ME capabilities reporting - added Hash+Compress chaining support MFC after: 2 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D42864 --- sys/contrib/dev/qat/qat_4xxx.bin | Bin 665356 -> 665356 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/contrib/dev/qat/qat_4xxx.bin b/sys/contrib/dev/qat/qat_4xxx.bin index 66dd803fe419..23eb8077241a 100644 Binary files a/sys/contrib/dev/qat/qat_4xxx.bin and b/sys/contrib/dev/qat/qat_4xxx.bin differ From nobody Wed Dec 13 15:32:08 2023 X-Original-To: dev-commits-src-all@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 4Sqzxj5Pkcz53vq8; Wed, 13 Dec 2023 15:32:25 +0000 (UTC) (envelope-from dim@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 4Sqzxj4zFvz3YKP; Wed, 13 Dec 2023 15:32:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702481545; 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=tH6DWYQ6qeL9kzvbuk6vbagldprRVNMm/AaL+h/GCok=; b=fbLmHMPHWjx6agJ3gE9H0kV5Va1gqTs8mSVcbyzeezce3O91VwyYjsHHMNg21BrEsAl4jP v4xfP3THaIaZHdA2e8Pvbd+g2JNn0v+RNJz5nLhSkVjRGbptH9ndysxtc/R0PVUZbCM2wY BfjcQz7TbuazFGDmzBNB6f80oaz+8NKjaRGfhz84k7AOIFcPxah3H+J6/Lsal1u/wqZvBQ BQomz8ihck6y9BFOsnUC3ymkqVBMjrBpYkqRpeyF4mtklCgkC3dSSMoBFZriqTYsgshNaB 9MHkWHTH5PcIXIbXGy6o1iqpuHe+ULD5bTVNujyFMVrou2zJ4moGAGAExmm/Ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702481545; a=rsa-sha256; cv=none; b=OIl99rahGjwgk4lEXnJlJV+31AMA4H7WOKHfKz1gDXsW1IvT0uVPCioBXQcq/lKvQimVe4 ldsi5krG9hzp+yzCkhOknh6OOjmVkfySuuGVuZDF0tKu83Avt7xFOIsbRq4iXjZu7p2YF0 bt1G5GupC5od7CZhmwEvPZFSCV4gxyR2d3lRpTuC1tGNvQf/TA0Z7PqxNHzSuEZxkjolkw OIp1AA5+3n/XOx3LlGsJutGiAarz3Cc5oJU0AatEhIimm8pbsx8kWN8INXwDOCJhDb6N2k XYyZFaY0//g71rEBXkvb7S9sZHrNQVDAcHPg6NCjLe8EsujhJ/wwPnGDg9I9LA== 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=1702481545; 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=tH6DWYQ6qeL9kzvbuk6vbagldprRVNMm/AaL+h/GCok=; b=DMnPzZnJ5KoeZLUDEKbkEYqWuZhAa3oG0ctZuE48hgzYKxJ0sL22Ml7QiTHd20v08NYiKM MEpr0/gAMGlpxVIQK/5EFVfPD39olX1WtpfpYZbfuCudmHH4X4rCzzt/YzyMNt9fQgBUSJ 49UrjmAxRinCfYtapNJ53Wy4CcYi8XWqNOp3c8sCKUgxo2+Y5IPGRVhwZUQOmVjjFxnuLI AdfIgtUHpb/IIDXvdMQb+biv9mGWAZ/DGwCestAxl7pUkgP0DSWD+tVagNilgs2GVU7G/B uTG6ktpNmvrKhQg8Nnbj3yUSGhsGympDpRp/ysaC0Hu8lyMrZjOcTCeiiHScjg== 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 4Sqzxj3VB1z1K35; Wed, 13 Dec 2023 15:32:25 +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 8A19B399F4; Wed, 13 Dec 2023 16:32:24 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_311CB307-E569-4F89-9DAB-4C117DDCBBBE"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 From: Dimitry Andric In-Reply-To: Date: Wed, 13 Dec 2023 16:32:08 +0100 Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> <94773081-ed7b-46c4-929f-7426d59110fc@FreeBSD.org> To: Dima Panov X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_311CB307-E569-4F89-9DAB-4C117DDCBBBE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 12 Dec 2023, at 09:37, Dima Panov wrote: >=20 > On 11.12.2023 21:26, Dimitry Andric wrote: >> On 11 Dec 2023, at 19:10, Dima Panov wrote: >>>=20 >>> On 11.12.2023 18:15, Dimitry Andric wrote: >>>> On 11 Dec 2023, at 16:03, Kristof Provost wrote: ... >>> BTW, lang/gcc13 fails to build on 15/aarch64 after this import with = lots of >>>=20 >>> /usr/include/c++/v1/locale:3434:31: error: attempt to use a poisoned = identifier >>> 3434 | __h.reset((char_type*)malloc(__exn * = sizeof(char_type))); >>> | ^ >>>=20 >>>=20 >>> Full log: = https://people.freebsd.org/~fluffy/-log/150aarch64/gcc13-13.2.0_1.log >>>=20 >>>=20 >>> Just curious but gcc12 is fine now >> I have seen this error too, but could only reproduce it outside of = poudriere, so I didn't take it too seriously. It is easy to fix; I have = a patch, shall I commit it? :) Sorry, this took a bit longer than expected, since I went over the other = gcc ports too. So I thought to ask the maintainer first: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275748 -Dimitry --Apple-Mail=_311CB307-E569-4F89-9DAB-4C117DDCBBBE 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZXnOeAAKCRCwXqMKLiCW o4mCAKC7eDSV/ARPx9amGmsumvvdHUsakgCggVolv3HNeej2iiF1X14ZTCmHaEA= =EoLH -----END PGP SIGNATURE----- --Apple-Mail=_311CB307-E569-4F89-9DAB-4C117DDCBBBE-- From nobody Wed Dec 13 16:49:31 2023 X-Original-To: dev-commits-src-all@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 4Sr1fh05Wpz541Tx; Wed, 13 Dec 2023 16:49: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 4Sr1fg6jXyz3fTR; Wed, 13 Dec 2023 16:49:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702486171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LabRJFmg/FWZzANsQfXlAo8yKepB7v8hMvDsqR2wq9s=; b=xLidUK0yVos78wRHEukGL2LgMgZdiXeey5oIK5czJIH77eiju+rBuLJyEq5mv/lnswBH8y ywtiFR3GW0KYyK2x7xa721xZ1rFh1Nbg5AZB9PC5jHj+5CREwMl49Nb+iPIYZIwJCAJQp4 6KkXEhG+BQ/yEkLbNTxGsLFCbeqfBRbNhpgauB2obQIU3D6fWpHZ0yyYiKm1hL12FEp0jb 508UvaIk72ORpVkZxsoC6gdZl7SuTiK2r+igCEyx/ixT9MJa7TWxQpiseLYci0c1/Skq+V 71sKWcyoBdAoV6ncoIjShdrgmtZCkgsMxaleOpzqXfBBXoWfcmyfoq6zHbH86w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702486171; a=rsa-sha256; cv=none; b=oLTN0pHZC0k8f012PeB4KCo7KMQEg5kRZAJQ/RBiXIgU19ak3WkVh4KaUlx0KGCky0aoQo Wnru6/df1B4iXtaaqgGcnI+dMRu6dSTOxQGHa08sDiobjmyJieAkRWY9rJLVSbFHE/XcZN zf+93wIfTDn5FZozFuDdHbLt9Xb6QXWPGAN15kPWjXgH6CrLp5NOhs/SHIIQkQCA5fzxnI PswVXn2F0+GpTOc4LUU/n9yxhibQ8b0oLflSCnsLX4KxeJTeHnKRkQRKtdZFtJpHayMLFC 9ve3zOWj1J945H+jLhqyzDW7s6L97gWtrhdbaT4PTJeDE6aDNAEA6th4+8Qggg== 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=1702486171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LabRJFmg/FWZzANsQfXlAo8yKepB7v8hMvDsqR2wq9s=; b=PALYuSmJvP33jPagTsHz+GA0ubuLFiLFACTeVHzcM2JT5eMVs49Bz085DA40FUSQ1c465V vvIVbL74nfA6gtNiE2FFoxJTyz0gy2MuxR0naYBu5UOrO3Z0bBdaHBSJOVCfzUJYMlBJY2 5rlPCth1WTEHAFmph0zEoIJyZPeBHkOci0AFny2M7AN/vxtcLBHd23E4GOrWuwC+L+jRhZ /ERvuDCFdHVGplGu85YQby40mk4SxswbKkNCFMc0DOGyCeuAdnxc6s309m1LHyPwjQEvGD JL9/0whm326EaiRfjaIcU8DGO2LEUReIiHDEX3XakKIsh7n3Lz43nD9H8b6Ygg== 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 4Sr1fg5ntfz1612; Wed, 13 Dec 2023 16:49: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 3BDGnVcF050659; Wed, 13 Dec 2023 16:49:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDGnVNr050656; Wed, 13 Dec 2023 16:49:31 GMT (envelope-from git) Date: Wed, 13 Dec 2023 16:49:31 GMT Message-Id: <202312131649.3BDGnVNr050656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: a206524709bd - main - kdump: use print_mask_arg0 appropriately List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a206524709bdfbd577bcfe76676da80b8250f84c Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a206524709bdfbd577bcfe76676da80b8250f84c commit a206524709bdfbd577bcfe76676da80b8250f84c Author: Kyle Evans AuthorDate: 2023-12-13 16:49:03 +0000 Commit: Kyle Evans CommitDate: 2023-12-13 16:49:03 +0000 kdump: use print_mask_arg0 appropriately Some callers are using print_mask_arg() when they should be using print_mask_arg0(); the latter should be used when all flags are optional and there's not a flag to be decoded with a 0-mask. This turns: nmount(0x6991e009000,0x8,0<>0) into: nmount(0x6991e009000,0x8,0) Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D43007 --- usr.bin/kdump/kdump.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index ce68f4522e0f..0253fdc9e87b 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -922,7 +922,8 @@ ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip, print_number(ip, narg, c); print_number(ip, narg, c); putchar(','); - print_mask_arg(sysdecode_close_range_flags, *ip); + print_mask_arg0(sysdecode_close_range_flags, + *ip); ip += 3; narg -= 3; break; @@ -988,14 +989,14 @@ ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip, print_number(ip, narg, c); print_number(ip, narg, c); putchar(','); - print_mask_arg(sysdecode_mount_flags, *ip); + print_mask_arg0(sysdecode_mount_flags, *ip); ip++; narg--; break; case SYS_unmount: print_number(ip, narg, c); putchar(','); - print_mask_arg(sysdecode_mount_flags, *ip); + print_mask_arg0(sysdecode_mount_flags, *ip); ip++; narg--; break; @@ -1453,7 +1454,7 @@ ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip, print_number(ip, narg, c); print_number(ip, narg, c); putchar(','); - print_mask_arg(sysdecode_mount_flags, *ip); + print_mask_arg0(sysdecode_mount_flags, *ip); ip++; narg--; break; From nobody Wed Dec 13 16:52:20 2023 X-Original-To: dev-commits-src-all@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 4Sr1jx2V8kz54282; Wed, 13 Dec 2023 16:52: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 4Sr1jw71k0z3fmK; Wed, 13 Dec 2023 16:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702486341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/HiX+whBC6QfL645UiWd/6yRxofWwt/imPV9sLBp7VA=; b=Ahaa/WuPai4WC8Mq2fD1gvUnzGN4ZJf8TWX9zOV0d2lI3L2E1uJDZwENJJNzFtu6rgx+aZ a2WZ5Qs/4kp1wtM/0SYVVyBTXjoiGYOFFzlbFiSAwSYa1RBdIF/FZcyO6e/m19KRaoN2pG rw4MfPfHIzo3qzBIFX1TRQjTM4b3w+eOyRlh7H0y9qzVVAEf2oVPvF3E1TqNqRa2+adVD9 7Jc8GeEsMyVJcPzIP6zUTy4DAqZNEGk+zG4qDRp3+FJXUHtWKaIxDToPwtTmeT9GWW2qDw WHoXgs3DL1BhD83WCrpMfCC8zruwz1tuxQW6idzAsSSKsYarVhkqjZyWAZWAbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702486341; a=rsa-sha256; cv=none; b=B+cbMm7vXnpb0pQerBLObEAiNM8H2o2PQw4kNLSULjk38iZJbTczS/ycISmiYkMD/ZqFiu iD+vZ54To255AXMuvrsu3oggpkW/ul+pGiDabWNwd6Runi195D8SHminSiZsS1ZRLofub5 kisiImfyb5UjDCeS7Wn+PAQqQZEIdwmRxSXY4bVahZc49jM+CuhpfZPBZgD1D8U3mp6LTJ myVe3fYRraupzboz1Y9evYZpKld8FVUQxbUVspC9jiGf5DR+luoSK9ZOHNdflPMwhdTy4d 2BzAVYr1/OwZRfYaOHpMkvI6kW1vQL61FsRejM32mWOz+83E48WFUz6Fz5G+hw== 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=1702486341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/HiX+whBC6QfL645UiWd/6yRxofWwt/imPV9sLBp7VA=; b=SBTRfTXhnCyl8y+vq6sHcomszM9I/1mfkK8Niu3HY7MYh9vdPjmUJrfSLMGfWSBkVG9paW 7SGRYAPLgu+6wQ41WKSRUhJ7rVOmvwjxN+tE9AZCaxXp8RW9furMLFfz+CqgTaSh2xZyu7 avzTLB2rKvizU0iylCT4a+GJLHWggXLcEPbcHBDVRdURzPSK3fpp8sGryYCFRsFjAsdLXL mca9XiiJphiDkprgBiRI9wzr0slcWGSDqom/sB9SoTE5QXZYc1bYoi0i/7lWQRVLW5m0Jm jT5YpjtYHpVF2GEU6vhaf0K9L5o/6OIswBWJE2w2Opl9w4K/ib7F72We/QIFYg== 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 4Sr1jw66SZz15lB; Wed, 13 Dec 2023 16:52:20 +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 3BDGqK6U064836; Wed, 13 Dec 2023 16:52:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDGqKHP064834; Wed, 13 Dec 2023 16:52:20 GMT (envelope-from git) Date: Wed, 13 Dec 2023 16:52:20 GMT Message-Id: <202312131652.3BDGqKHP064834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: d04415c520b0 - main - loader: lua: remove the default kernel if it doesn't exist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d04415c520b031fb8eb93cb252e4acee66149c87 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d04415c520b031fb8eb93cb252e4acee66149c87 commit d04415c520b031fb8eb93cb252e4acee66149c87 Author: Kyle Evans AuthorDate: 2023-12-13 16:52:14 +0000 Commit: Kyle Evans CommitDate: 2023-12-13 16:52:14 +0000 loader: lua: remove the default kernel if it doesn't exist The `kernel` env var provides the default kernel, usually "kernel". It may be the case that the user doesn't have a "kernel" kernel, just "kernel.*" kernels, but have left `kernel` to the default because we autodetect entries by default anyways. If we're doing autodetection, take note of whether the default kernel exists or not and remove it from the list if it doesn't and we had found any other kernels. We avoid it in the #kernels == 1 case because something fishy has likely happened and we should just trust the configuration. Reviewed by: imp, manu Differential Revision: https://reviews.freebsd.org/D42967 --- stand/lua/core.lua | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index c7581b296b8f..9226de564348 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -201,17 +201,18 @@ function core.kernelList() return core.cached_kernels end - local k = loader.getenv("kernel") + local default_kernel = loader.getenv("kernel") local v = loader.getenv("kernels") local autodetect = loader.getenv("kernels_autodetect") or "" local kernels = {} local unique = {} local i = 0 - if k ~= nil then + + if default_kernel then i = i + 1 - kernels[i] = k - unique[k] = true + kernels[i] = default_kernel + unique[default_kernel] = true end if v ~= nil then @@ -239,6 +240,8 @@ function core.kernelList() return core.cached_kernels end + local present = {} + -- Automatically detect other bootable kernel directories using a -- heuristic. Any directory in /boot that contains an ordinary file -- named "kernel" is considered eligible. @@ -267,8 +270,25 @@ function core.kernelList() unique[file] = true end + present[file] = true + ::continue:: end + + -- If we found more than one kernel, prune the "kernel" specified kernel + -- off of the list if it wasn't found during traversal. If we didn't + -- actually find any kernels, we just assume that they know what they're + -- doing and leave it alone. + if default_kernel and not present[default_kernel] and #kernels > 1 then + for i = 1, #kernels do + if i == #kernels then + kernels[i] = nil + else + kernels[i] = kernels[i + 1] + end + end + end + core.cached_kernels = kernels return core.cached_kernels end From nobody Wed Dec 13 18:02:55 2023 X-Original-To: dev-commits-src-all@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 4Sr3HM3VWHz5460T; Wed, 13 Dec 2023 18:02: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 4Sr3HM2YTgz4Gd6; Wed, 13 Dec 2023 18:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702490575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8r+ARCSISj6o+RmsQ81kdCGHf25ie3J8K3W6oQGJTdg=; b=hKbngngKzohmMVjXxJJe3cmOXPR4djiqtpy91w1av5hg3k2VmjQnqpR9LP1gwaSN6tgrz1 pWVoVyYatdWAO4WWYBIRUUOfOw72fLvTJBMvXQ2kF+2abW3VGNt7/OcscahtzyUhyOUO0D 6P2ecZzK0FIxyEX3RSKkih1msgCDiVQqBPKgzSq4m2OaZ8ZPUIIW9/SFhN1gtBgNWnB7/g Vtrd9u5UfpS/vgEftkq7U2NZupkwwtORs199rkUtyL+6fB0uERpm4LTSzxjrS+7arWMkMu 5BdUjUfeCU3x9XeXV12GH5h0UQuLiHVcT6ZjPNBm2541kNwNx2Y+NmF7elvElA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702490575; a=rsa-sha256; cv=none; b=YZ5VzOhPvG026rII3j2KdGkOD+b3x/JmyY0+ItHNfNCAYtv6oT30OymMdj6amGxqUcjZpt hjzpRe/O/GxqnjgakK59KNM/KnQlcHKBTanWVa0praRU57mV2omYOvi3bBZqSmLyeczMZ+ YbMTn37Co6JNh+/oEYUxVeZkQCS7tvkJ8rd7gbEH8oKH1lPZCWnt5en1wtwVYxCTOAdzII BlPA27qHlqrj0OKJZl5aCA9EKC/W4bRJQZQllOAhelS6UO0O5btaxYMudVr2iKid2or3iU BnnMaL5wPWIeqKwTKnISYGXSw0OjkLzC68lDhIuSxY0LW3fPkA68Pcf7OteQsg== 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=1702490575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8r+ARCSISj6o+RmsQ81kdCGHf25ie3J8K3W6oQGJTdg=; b=k+VTkD+Al2aAunHxcuy4AX2lBd7AYo2+YFzEn4KxHtt1ZuULVmvCbwih2IwBopIEBxqUkc WXVWcTzbetqbpUoOTUNuN2rlY72/YwAQyqBYhzar8CoyYLhwUy45u6/ohW1GoqIvepOCaA cuMYvaE2K+0TPVVjor68OXoy28T7uN8wSuuLZpq/6CWNQhU/9QvCT+b4UNiTa4D3+lnUvx 9zWqBWEphHvAc7Fh+DTU06NaVQlcKEMTWHklQn4vxeZJLionzWhWPuFNI5suh2xXjLktNn F1Xm8ohViOINbx+fIADuiVAATKcoOak/Hb8hyJE/Rr41JVnUeBtgq5HYR3K0zQ== 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 4Sr3HM1d5gz17Hl; Wed, 13 Dec 2023 18:02:55 +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 3BDI2txp084650; Wed, 13 Dec 2023 18:02:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDI2tH1084647; Wed, 13 Dec 2023 18:02:55 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:02:55 GMT Message-Id: <202312131802.3BDI2tH1084647@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: 641eba2de4b4 - main - Makefile.inc1: Reinstate building sbin/md5 for BOOTSTRAP_ALL_TOOLS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 641eba2de4b4f238d2a9d37ab975a13129376d29 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=641eba2de4b4f238d2a9d37ab975a13129376d29 commit 641eba2de4b4f238d2a9d37ab975a13129376d29 Author: Jessica Clarke AuthorDate: 2023-12-13 18:02:45 +0000 Commit: Jessica Clarke CommitDate: 2023-12-13 18:02:45 +0000 Makefile.inc1: Reinstate building sbin/md5 for BOOTSTRAP_ALL_TOOLS The sha256 and sha512 binaries are used when building release images. Bootstrapping them used to be gated on MK_BOOT, which wasn't quite right but in practice worked, at least in our use cases downstream. Add back bootstrapping sbin/md5 and its aliases for this purpose to fix building release images on Linux and macOS. Fixes: f213da893ca8 ("Makefile.inc1: Remove beri straggler") --- Makefile.inc1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index b509b603821b..3d982e45fd63 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2594,6 +2594,11 @@ _basic_bootstrap_tools+=usr.bin/mkfifo # jot is needed for the mkimg tests _basic_bootstrap_tools+=usr.bin/jot +.if defined(BOOTSTRAP_ALL_TOOLS) +# sha256 and sha512 are used by release/ (and possibly others) +_basic_bootstrap_tools+=sbin/md5 +.endif + # tzsetup is needed as an install tool .if ${MK_ZONEINFO} != "no" _basic_bootstrap_tools+=usr.sbin/tzsetup From nobody Wed Dec 13 18:28:43 2023 X-Original-To: dev-commits-src-all@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 4Sr3s72Bvvz547hx; Wed, 13 Dec 2023 18:28: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 4Sr3s71hlfz4JdQ; Wed, 13 Dec 2023 18:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qCta/EuKtE3+wz2gtgo+7Hp62ZoejoFTgsOpCcLpU1Y=; b=QktPI2nKAK9wQ0HBQJgKeGU+DvtwBO+mjeZzdVW6JlPgKHDTb0OYvQ9B6Y0x/ZK3RaZgQE WZRfutviMAFOW4L++Pa4k2kiGA8bdvmslv9evp/A0hKFevuZX18zEDkCPHTbBjG2rX3TTg W4MHFEkgkaswOSJftIgbPyesaM5RN6xrUhQsCyTD3cjJIcyfNCW31c5OluhBKI2+TYJS62 WKLcQ7OiakHBGrPWTGEqpAns1qOVxOF48t/aGEsfvXYTlHvSRDvrxkgf/pN1u8ofLLdJLN 1OoPr+Ejjh9EJ+pIKzD61ylJHjzTKhCpNh5SdKEL70AKx136+Za6st4ue6cTyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492123; a=rsa-sha256; cv=none; b=nsZo+0tDxC+jzoXXspIyDR8q8uuWSyswFdoDnJ4sC05R75+GlKdZD7UJYEvRdHqe5AyX5t YL6D2GL42npdeZt3bbxznoAUEwZLLgwHNmsO3alkJkEgVCAZ8MxT9y/JAOwIN6H+9jaoDy Jpw6QYlsF7z8eu6OxMpTd8ApA8nm8agRsr2sqcDET2HPHkHf5iapi6gNrip3OaishSpshR w/cFFmVA6maFCqXiBzMw9QhyOVcSxAinPf2ku6UR1ErkgFTkxJdH8xmRWrJAuZWwClW8CW bEPmtsK3wFFrx/RpQp6O0Gt8mch4CtCXTmbOxBnCMzlBE4dHgv1FigweorxFmg== 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=1702492123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qCta/EuKtE3+wz2gtgo+7Hp62ZoejoFTgsOpCcLpU1Y=; b=IVMme69E5WV72imyBoqEBmKE56BYKEE17l2mze31mSrnNnBSju2Ct6AGoerNxuv5bm2sRO BwUS4AzTEk8KnPePx0KTlDw/rJp0JuXnNQZiAhCPs4a6W5NtLz7GNORBIbfbkflPsr+Ipq SDdXk3lAGJWfBTn+cRQC2nrp4pWN41TfAFzxZmXwR3/gX+LaFeMwNuc7tEaMh48ecMw5+0 zCZjQml1r+RTchoGJSttvHNQZk4AO60JTk2tcFypNGl2t192TMiXeD4Tpet11uLGxjF3X6 P9UeQEgem/aovQ02iDmHz/xlwnlvc8yZyxfqel5uLMlVga//hkPnrIovF8lQEg== 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 4Sr3s70mBNz17sN; Wed, 13 Dec 2023 18:28: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 3BDIShDp018826; Wed, 13 Dec 2023 18:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDIShxw018823; Wed, 13 Dec 2023 18:28:43 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:43 GMT Message-Id: <202312131828.3BDIShxw018823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 50a56453dadb - main - linuxkpi: Include from List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50a56453dadbd05eb1c43addaf2773a1ef417445 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=50a56453dadbd05eb1c43addaf2773a1ef417445 commit 50a56453dadbd05eb1c43addaf2773a1ef417445 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-04 22:02:02 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:42 +0000 linuxkpi: Include from [Why] We need this for the `bool` type. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43016 --- sys/compat/linuxkpi/common/include/linux/cc_platform.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/cc_platform.h b/sys/compat/linuxkpi/common/include/linux/cc_platform.h index 727dbc98dab2..01c0de17f7d2 100644 --- a/sys/compat/linuxkpi/common/include/linux/cc_platform.h +++ b/sys/compat/linuxkpi/common/include/linux/cc_platform.h @@ -3,6 +3,9 @@ #ifndef _LINUXKPI_LINUX_CC_PLATFORM_H_ #define _LINUXKPI_LINUX_CC_PLATFORM_H_ +#include +#include + enum cc_attr { CC_ATTR_MEM_ENCRYPT, }; From nobody Wed Dec 13 18:28:44 2023 X-Original-To: dev-commits-src-all@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 4Sr3s83wS7z547n0; Wed, 13 Dec 2023 18:28: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 4Sr3s83G5jz4K0j; Wed, 13 Dec 2023 18:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96JqSeblIukyTlfUpKrVSLBINX980kMSKPnL01x88Vw=; b=gttDcs93Y61a5zW39/Hjfu/8gGXWUsgOsbdJivuMGZUOLg03HcN6ysidpXzreguz1SkEae VQaRcGRrZA3x9cRDerlftLD5Ahk339vl+hZCaNp9gYlPn4q048H7muAwMRS64F+adx5t/Q L1FmlEKXPkHo9kRFdTZeB/xJzelT7k/bnzglYSB/ZVNO+nM79odUsnKcOQH+tCYk7esNJP 6iLbRFxg9XSBIaswZKv58Vdd/boeDU1fJxDPIxFsG8PEEbRkwo2lAIe47+YO7Or0n3a0Ph 7pHzIStCQtpoUPJC/HaUQB69fid4LfxgP60VSTbRlYr95CXqYLit9dsa5cmsuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492124; a=rsa-sha256; cv=none; b=paC2ODRm8hJiJUiThhjWrT3JLawk4egd/Czpl17Uwkng7m/n8GodsHOBDfz7JvlKisxM/s 3tu4FtAEGF/UXBhyAEiF90leWk780wWNJyL6EShNKN53wcTm24VQSsklSmVCYCGs3aA0ZK bSh9fnz/S7CnnBHgWOTcjuIkwgtig5AnoDI/g75+J4O5Iqg79+eW5wMiQPM9O7gEFrNKSs ARbzdmdh0K9++wnjqcygej3u/pzdYFlD3eFBXSlQwVd9a8XG9dgQsADoBaAprg/X8EhJ2p pM0iiG6qRcZ5oh4ggJQWlszCYyw3SMV9dL1gSxVGC/KSc5eds9jMun3YndLSCg== 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=1702492124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96JqSeblIukyTlfUpKrVSLBINX980kMSKPnL01x88Vw=; b=Z4L99IZBkpQNNSPnGmqVXKDPmrJ6szijBbXJ8vxlozMIkGdbJrM3xRu6wnW8PtrkIlIHK4 TPk2P/+b1JRjIkn3sdkWhVZJULxQAMMg9W6+UjJq5el4kfsSp0tb3tzloVOD2J1zLPBnIx tW1h2qs9sv4dkBzK10UPNh8OOpCCb9t1Likk3pAmjLWpmaYcscXPD9mmXwI0wCTr8v6IOK mXRFvC2494NAXV+n/45Ngy6pueygiNcX2/2Xmk1hDxHXCrhLz56JiJuAcdA7xSBa9ZwxFx icDiFyhQ6ZCQFG8r/+IpY7i2jMOligNLJ+3XuD+hZAWVy+VdqNpMnI3wOt7Low== 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 4Sr3s81lNFz17yG; Wed, 13 Dec 2023 18:28: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 3BDISi5v018879; Wed, 13 Dec 2023 18:28:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISiDa018876; Wed, 13 Dec 2023 18:28:44 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:44 GMT Message-Id: <202312131828.3BDISiDa018876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 4e0d3f7b3c32 - main - linuxkpi: Move `invalidate_mapping_pages()` to List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e0d3f7b3c3295e51ded2bab39f36842f405b4eb Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=4e0d3f7b3c3295e51ded2bab39f36842f405b4eb commit 4e0d3f7b3c3295e51ded2bab39f36842f405b4eb Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 17:07:00 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +0000 linuxkpi: Move `invalidate_mapping_pages()` to [Why] This is consistent with Linux. [How] The definition is moved from to and the latter is included from the former. This is how it is done on Linux. Prototypes are also expanded with argument names. I got a build failure in the DRM 5.18 drivers because the compiler considered that the `pgoff_t` argument was there twice. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43018 --- sys/compat/linuxkpi/common/include/linux/pagemap.h | 6 ++++++ sys/compat/linuxkpi/common/include/linux/shmem_fs.h | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pagemap.h b/sys/compat/linuxkpi/common/include/linux/pagemap.h index aa2e2a4e3950..7244b61257dc 100644 --- a/sys/compat/linuxkpi/common/include/linux/pagemap.h +++ b/sys/compat/linuxkpi/common/include/linux/pagemap.h @@ -33,6 +33,12 @@ #include #include +#define invalidate_mapping_pages(...) \ + linux_invalidate_mapping_pages(__VA_ARGS__) + +unsigned long linux_invalidate_mapping_pages(vm_object_t obj, pgoff_t start, + pgoff_t end); + static inline void release_pages(struct page **pages, int nr) { diff --git a/sys/compat/linuxkpi/common/include/linux/shmem_fs.h b/sys/compat/linuxkpi/common/include/linux/shmem_fs.h index eb31c5ad827a..d373cfa1d611 100644 --- a/sys/compat/linuxkpi/common/include/linux/shmem_fs.h +++ b/sys/compat/linuxkpi/common/include/linux/shmem_fs.h @@ -29,14 +29,15 @@ #ifndef _LINUXKPI_LINUX_SHMEM_FS_H_ #define _LINUXKPI_LINUX_SHMEM_FS_H_ -/* Shared memory support */ -unsigned long linux_invalidate_mapping_pages(vm_object_t, pgoff_t, pgoff_t); -struct page *linux_shmem_read_mapping_page_gfp(vm_object_t, int, gfp_t); -struct linux_file *linux_shmem_file_setup(const char *, loff_t, unsigned long); -void linux_shmem_truncate_range(vm_object_t, loff_t, loff_t); +#include -#define invalidate_mapping_pages(...) \ - linux_invalidate_mapping_pages(__VA_ARGS__) +/* Shared memory support */ +struct page *linux_shmem_read_mapping_page_gfp(vm_object_t obj, int pindex, + gfp_t gfp); +struct linux_file *linux_shmem_file_setup(const char *name, loff_t size, + unsigned long flags); +void linux_shmem_truncate_range(vm_object_t obj, loff_t lstart, + loff_t lend); #define shmem_read_mapping_page(...) \ linux_shmem_read_mapping_page_gfp(__VA_ARGS__, 0) From nobody Wed Dec 13 18:28:45 2023 X-Original-To: dev-commits-src-all@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 4Sr3s94kYsz54823; Wed, 13 Dec 2023 18:28: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 4Sr3s93Lgsz4JwH; Wed, 13 Dec 2023 18:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7C69hAWCk0SEoYAq1yVhVnNqPtIddz0VNQz8hZjvd5A=; b=L4cJxJOGxrMXC5MoyV1NKlBLlbtqXdeBCVQ/tPQwFpC23r8TwxEWb58Q7wnHS9D3OOzmij k/2Nzktr8caMwvfCIU8FEWMMk6pkCM0nnQD8NcHMStlCyabRyvmFEaLrdW59/fy519iPxD ae6wZTDJH488skUshuoHnFqMOT+xnXbi1hzEVAjRt3xJs6qGy0G2goCufGAcJlbnvaK0gV X9sL+0L3nDk2vySDMubD55wrTXjEDv3IFqZrccsXyxmOgYqhf2ahBVvgy3aEoG7kQ+acPu 1xvi2Sq24881celvthoAtkdPhiW/BMlME7Cv51RsTg9t2uIHQDu2k15umA/vGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492125; a=rsa-sha256; cv=none; b=Qo3j/XxyWWcJ2qXvYVx5FmQxyqgTMLSptesM3VmAxRC9qui2itH8hJyQru+u27/1R3F3ro qNebI2As3xREEC8//liKTa5qOIsxU5k9jLxf2lKDjL7P02bced24nUV+/SnuJZPpWuFHp5 itA1hpOeVfk6y7ZVj8tE0Kt58p4SjJHH//eZYIDYKrxTVBWzZ13iReKTr4iyTjS8rfmpZ/ /mNanVPXpwGx6eHvKnkNWaAkvdo8qugY5R2bgqXvfMMUc3NBTYDP8hz1ZPy1FxW9MgbFUm sIXlhSBR/RN7dWaIU8XeWok2Hd4eZR1P6zYJrcSmAbD7JN8yRh/qRebmWEReVg== 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=1702492125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7C69hAWCk0SEoYAq1yVhVnNqPtIddz0VNQz8hZjvd5A=; b=MS840PfblFvyemYVBj6S8dBO4xUOOvdjwXvjKQ1YEWayccNIP0Wfv3MGsbI6mNOzUoeF6k Xuslc2zaDkxmaPBTELB6sf0apyaEIWAm60zUM9hTITpx5dK9o93VWJLrDiOVMDq1RmKouc zTFCHHUHfw9mCnU9Nk9dFx2It9djRYwJkLejn/V8/3p8mbklrjiEcTcHgPgBDg1/1pkdiZ 2712Qf4qjHd2xDyuNwMwu9TTME9Qm7pfWnj7LZXdiN3Hf0yLkJegMCDP9FI44IdNxzHMOz pt76U6nxVVFpqU8pcTYN9tNwfPJ63Dynp5Q0mFal8EECqvpP5pXRFnK8/dagXg== 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 4Sr3s92SMBz18Qr; Wed, 13 Dec 2023 18:28: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 3BDISj2r018935; Wed, 13 Dec 2023 18:28:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISjcm018932; Wed, 13 Dec 2023 18:28:45 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:45 GMT Message-Id: <202312131828.3BDISjcm018932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 80446fc7b5e5 - main - linuxkpi: Move `struct kobject` code to `linux_kobject.c` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80446fc7b5e5d22e2bac28bc0474dbe2fec83e43 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=80446fc7b5e5d22e2bac28bc0474dbe2fec83e43 commit 80446fc7b5e5d22e2bac28bc0474dbe2fec83e43 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 17:58:03 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +0000 linuxkpi: Move `struct kobject` code to `linux_kobject.c` [Why] `linux_compat.c` is already too long. I will need to add `struct kset` in a follow-up commit, so let's move the existing `struct kobject` code to its own file. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43019 --- sys/compat/linuxkpi/common/include/linux/kobject.h | 2 + sys/compat/linuxkpi/common/src/linux_compat.c | 190 ------------------ sys/compat/linuxkpi/common/src/linux_kobject.c | 221 +++++++++++++++++++++ sys/conf/files | 2 + sys/modules/linuxkpi/Makefile | 1 + 5 files changed, 226 insertions(+), 190 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kobject.h b/sys/compat/linuxkpi/common/include/linux/kobject.h index 6e59e0952d62..06d71faaa873 100644 --- a/sys/compat/linuxkpi/common/include/linux/kobject.h +++ b/sys/compat/linuxkpi/common/include/linux/kobject.h @@ -154,4 +154,6 @@ kobject_uevent_env(struct kobject *kobj, int action, char *envp[]) */ } +void linux_kobject_kfree_name(struct kobject *kobj); + #endif /* _LINUXKPI_LINUX_KOBJECT_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index b913ae602ab3..a493dc2538ec 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -159,176 +159,6 @@ RB_GENERATE(linux_root, rb_node, __entry, panic_cmp); INTERVAL_TREE_DEFINE(struct interval_tree_node, rb, unsigned long,, START, LAST,, lkpi_interval_tree) -struct kobject * -kobject_create(void) -{ - struct kobject *kobj; - - kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); - if (kobj == NULL) - return (NULL); - kobject_init(kobj, &linux_kfree_type); - - return (kobj); -} - - -int -kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list args) -{ - va_list tmp_va; - int len; - char *old; - char *name; - char dummy; - - old = kobj->name; - - if (old && fmt == NULL) - return (0); - - /* compute length of string */ - va_copy(tmp_va, args); - len = vsnprintf(&dummy, 0, fmt, tmp_va); - va_end(tmp_va); - - /* account for zero termination */ - len++; - - /* check for error */ - if (len < 1) - return (-EINVAL); - - /* allocate memory for string */ - name = kzalloc(len, GFP_KERNEL); - if (name == NULL) - return (-ENOMEM); - vsnprintf(name, len, fmt, args); - kobj->name = name; - - /* free old string */ - kfree(old); - - /* filter new string */ - for (; *name != '\0'; name++) - if (*name == '/') - *name = '!'; - return (0); -} - -int -kobject_set_name(struct kobject *kobj, const char *fmt, ...) -{ - va_list args; - int error; - - va_start(args, fmt); - error = kobject_set_name_vargs(kobj, fmt, args); - va_end(args); - - return (error); -} - -static int -kobject_add_complete(struct kobject *kobj, struct kobject *parent) -{ - const struct kobj_type *t; - int error; - - kobj->parent = parent; - error = sysfs_create_dir(kobj); - if (error == 0 && kobj->ktype && kobj->ktype->default_attrs) { - struct attribute **attr; - t = kobj->ktype; - - for (attr = t->default_attrs; *attr != NULL; attr++) { - error = sysfs_create_file(kobj, *attr); - if (error) - break; - } - if (error) - sysfs_remove_dir(kobj); - } - return (error); -} - -int -kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...) -{ - va_list args; - int error; - - va_start(args, fmt); - error = kobject_set_name_vargs(kobj, fmt, args); - va_end(args); - if (error) - return (error); - - return kobject_add_complete(kobj, parent); -} - -void -linux_kobject_release(struct kref *kref) -{ - struct kobject *kobj; - char *name; - - kobj = container_of(kref, struct kobject, kref); - sysfs_remove_dir(kobj); - name = kobj->name; - if (kobj->ktype && kobj->ktype->release) - kobj->ktype->release(kobj); - kfree(name); -} - -static void -linux_kobject_kfree(struct kobject *kobj) -{ - kfree(kobj); -} - -static void -linux_kobject_kfree_name(struct kobject *kobj) -{ - if (kobj) { - kfree(kobj->name); - } -} - -const struct kobj_type linux_kfree_type = { - .release = linux_kobject_kfree -}; - -static ssize_t -lkpi_kobj_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) -{ - struct kobj_attribute *ka = - container_of(attr, struct kobj_attribute, attr); - - if (ka->show == NULL) - return (-EIO); - - return (ka->show(kobj, ka, buf)); -} - -static ssize_t -lkpi_kobj_attr_store(struct kobject *kobj, struct attribute *attr, - const char *buf, size_t count) -{ - struct kobj_attribute *ka = - container_of(attr, struct kobj_attribute, attr); - - if (ka->store == NULL) - return (-EIO); - - return (ka->store(kobj, ka, buf, count)); -} - -const struct sysfs_ops kobj_sysfs_ops = { - .show = lkpi_kobj_attr_show, - .store = lkpi_kobj_attr_store, -}; - static void linux_device_release(struct device *dev) { @@ -518,26 +348,6 @@ class_create(struct module *owner, const char *name) return (class); } -int -kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype, - struct kobject *parent, const char *fmt, ...) -{ - va_list args; - int error; - - kobject_init(kobj, ktype); - kobj->ktype = ktype; - kobj->parent = parent; - kobj->name = NULL; - - va_start(args, fmt); - error = kobject_set_name_vargs(kobj, fmt, args); - va_end(args); - if (error) - return (error); - return kobject_add_complete(kobj, parent); -} - static void linux_kq_lock(void *arg) { diff --git a/sys/compat/linuxkpi/common/src/linux_kobject.c b/sys/compat/linuxkpi/common/src/linux_kobject.c new file mode 100644 index 000000000000..ddd0a58660f1 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linux_kobject.c @@ -0,0 +1,221 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013-2021 Mellanox Technologies, Ltd. + * 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 unmodified, 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 ``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 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 + +struct kobject * +kobject_create(void) +{ + struct kobject *kobj; + + kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); + if (kobj == NULL) + return (NULL); + kobject_init(kobj, &linux_kfree_type); + + return (kobj); +} + + +int +kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list args) +{ + va_list tmp_va; + int len; + char *old; + char *name; + char dummy; + + old = kobj->name; + + if (old && fmt == NULL) + return (0); + + /* compute length of string */ + va_copy(tmp_va, args); + len = vsnprintf(&dummy, 0, fmt, tmp_va); + va_end(tmp_va); + + /* account for zero termination */ + len++; + + /* check for error */ + if (len < 1) + return (-EINVAL); + + /* allocate memory for string */ + name = kzalloc(len, GFP_KERNEL); + if (name == NULL) + return (-ENOMEM); + vsnprintf(name, len, fmt, args); + kobj->name = name; + + /* free old string */ + kfree(old); + + /* filter new string */ + for (; *name != '\0'; name++) + if (*name == '/') + *name = '!'; + return (0); +} + +int +kobject_set_name(struct kobject *kobj, const char *fmt, ...) +{ + va_list args; + int error; + + va_start(args, fmt); + error = kobject_set_name_vargs(kobj, fmt, args); + va_end(args); + + return (error); +} + +static int +kobject_add_complete(struct kobject *kobj, struct kobject *parent) +{ + const struct kobj_type *t; + int error; + + kobj->parent = parent; + error = sysfs_create_dir(kobj); + if (error == 0 && kobj->ktype && kobj->ktype->default_attrs) { + struct attribute **attr; + t = kobj->ktype; + + for (attr = t->default_attrs; *attr != NULL; attr++) { + error = sysfs_create_file(kobj, *attr); + if (error) + break; + } + if (error) + sysfs_remove_dir(kobj); + } + return (error); +} + +int +kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...) +{ + va_list args; + int error; + + va_start(args, fmt); + error = kobject_set_name_vargs(kobj, fmt, args); + va_end(args); + if (error) + return (error); + + return kobject_add_complete(kobj, parent); +} + +int +kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype, + struct kobject *parent, const char *fmt, ...) +{ + va_list args; + int error; + + kobject_init(kobj, ktype); + kobj->ktype = ktype; + kobj->parent = parent; + kobj->name = NULL; + + va_start(args, fmt); + error = kobject_set_name_vargs(kobj, fmt, args); + va_end(args); + if (error) + return (error); + return kobject_add_complete(kobj, parent); +} + +void +linux_kobject_release(struct kref *kref) +{ + struct kobject *kobj; + char *name; + + kobj = container_of(kref, struct kobject, kref); + sysfs_remove_dir(kobj); + name = kobj->name; + if (kobj->ktype && kobj->ktype->release) + kobj->ktype->release(kobj); + kfree(name); +} + +static void +linux_kobject_kfree(struct kobject *kobj) +{ + kfree(kobj); +} + +const struct kobj_type linux_kfree_type = { + .release = linux_kobject_kfree +}; + +void +linux_kobject_kfree_name(struct kobject *kobj) +{ + if (kobj) { + kfree(kobj->name); + } +} + +static ssize_t +lkpi_kobj_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) +{ + struct kobj_attribute *ka = + container_of(attr, struct kobj_attribute, attr); + + if (ka->show == NULL) + return (-EIO); + + return (ka->show(kobj, ka, buf)); +} + +static ssize_t +lkpi_kobj_attr_store(struct kobject *kobj, struct attribute *attr, + const char *buf, size_t count) +{ + struct kobj_attribute *ka = + container_of(attr, struct kobj_attribute, attr); + + if (ka->store == NULL) + return (-EIO); + + return (ka->store(kobj, ka, buf, count)); +} + +const struct sysfs_ops kobj_sysfs_ops = { + .show = lkpi_kobj_attr_show, + .store = lkpi_kobj_attr_store, +}; diff --git a/sys/conf/files b/sys/conf/files index 377d65926462..bf951d789de3 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4567,6 +4567,8 @@ compat/linuxkpi/common/src/linux_i2cbb.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_interrupt.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_kobject.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_kthread.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_lock.c optional compat_linuxkpi \ diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index bf40d64de9df..692f69c1f4e1 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -14,6 +14,7 @@ SRCS= linux_compat.c \ linux_i2c.c \ linux_i2cbb.c \ linux_kmod.c \ + linux_kobject.c \ linux_kthread.c \ linux_lock.c \ linux_netdev.c \ From nobody Wed Dec 13 18:28:46 2023 X-Original-To: dev-commits-src-all@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 4Sr3sB4b2Yz547lR; Wed, 13 Dec 2023 18:28: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 4Sr3sB3wgWz4K6L; Wed, 13 Dec 2023 18:28:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=64aO1NzkJtEZr4pRYm4JV7M6MM8NM3gwZEZUNvdWMFM=; b=F/MuJrdW/LFj64l+OLssLyipNLpQzminTn2zDEfEmDCUH9cZ9PEaP65y1oawkREIJrJUa7 fXGXIQS6ZQn3/cO9Y57zWYrQ3i2Y6NHWbJgFs291RbW4Bx8r09vvRp8GEuUhw3UnXhZcbK GtoAlGMpInwZZKugE6R+pt2TxFAFa4X7KFniugjYTPGmOZMvXP4vFRK7evrbS08Hxw/s1Z neNmcDtw0+OJ9BvPZAAYGOjzmqf8llJX3NgeU9gpRtgCnFh8TGAFHShRuBTC7+b7LHsJ4R JgBMunuBLgsDEmLlUVFvM1mSolUmBvxjOoL+4PGyl3OEMbL6kRd8RdMVZde92A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492126; a=rsa-sha256; cv=none; b=lEaOkQPjisFtyZOmySSzv5E7si1e0ndby38F7YcWQiig5Rxzd7xpMBzQFxeKCFnrBt31VW 4gyaV431XAz4AxY3eYcZICul0NGOWO9MW2zX1r99zob517xCp20zEmK3bxkMQsOsDR4fh1 H4kvrCYZB6XvTPa5xJanepN4ZWDnaav5uwHNleSAP353TLV75Zaa5QQtS8OfqZ0J3UzKCk It+WwH9Ot2syS0vIJ5gbaKZFTt4qtNZuZWUDkTgjzRzUqGISMyP951jZUWBYUtaOEFC90Q hHsMz0vqZKiidKlY1+FPU010F/vbp29TiNyUPkzRqpTcjU6WWflG+yyzKB+m+A== 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=1702492126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=64aO1NzkJtEZr4pRYm4JV7M6MM8NM3gwZEZUNvdWMFM=; b=ohdf7XEEoqkQkzNNawBHM6cjDAIaQecHou9gRjFOs36so0i1saBVQWJ8TXBb4iLH0RgwFY PemYrZm42eWNMjBA8mqVrEfac8S+BoClp7LMDYXM3T0/nwq5Oii0yNaHF7sN8VrLhwIho/ CAMxYOgIDNjm672ieY8C2ifw9cTkrNHtPQ5jbkhFjlYYxYQyuos92XeQWndom9PdwZSWU8 G7ifINpBOlkAsOEC8vXT9GJsmeuKi92zAAYFSWmHhdodqI2y6JL0wl2J1PvNP2U8dNFKRD oUD7E9Nus4EbPynpjYy7QqvzH6BikGAwaCMm+Zm+ZbxqGxbvEPTEBoRuDQFkeg== 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 4Sr3sB32mgz18Nj; Wed, 13 Dec 2023 18:28: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 3BDISkes018983; Wed, 13 Dec 2023 18:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISk3w018980; Wed, 13 Dec 2023 18:28:46 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:46 GMT Message-Id: <202312131828.3BDISk3w018980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: b723bcd05a99 - main - linuxkpi: Add `list_for_each_prev_safe()` in List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b723bcd05a991d446491e914f2b9f35e66227398 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=b723bcd05a991d446491e914f2b9f35e66227398 commit b723bcd05a991d446491e914f2b9f35e66227398 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 21:53:21 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +0000 linuxkpi: Add `list_for_each_prev_safe()` in [Why] The amdgpu DRM driver started to use it in Linux 5.18. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43021 --- sys/compat/linuxkpi/common/include/linux/list.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index a27abedc55b0..ca103a670109 100644 --- a/sys/compat/linuxkpi/common/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h @@ -225,6 +225,11 @@ list_del_init(struct list_head *entry) #define list_for_each_prev(p, h) for (p = (h)->prev; p != (h); p = (p)->prev) +#define list_for_each_prev_safe(p, n, h) \ + for (p = (h)->prev, n = (p)->prev; \ + p != (h); \ + p = n, n = (p)->prev) + #define list_for_each_entry_from_reverse(p, h, field) \ for (; &p->field != (h); \ p = list_prev_entry(p, field)) From nobody Wed Dec 13 18:28:47 2023 X-Original-To: dev-commits-src-all@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 4Sr3sC58G0z548CJ; Wed, 13 Dec 2023 18:28:47 +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 4Sr3sC4hw2z4K2b; Wed, 13 Dec 2023 18:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xy/n48wNGMsDpSUXEj2UeuVsrbg6DyA/1aDoSgbWYsc=; b=tPEh0hbaw94giot4DZyWYOmWo1MzdzqINw5MsLPRgcW37412IRXASRp7SQWnveI9Mmw4wl FiReKeqxbdWVbd52q+y1aeF00npUyB7EkLQvjFG/obfKa94Jw+Vdfr2C554/qhk2Wkb+eP y5+R1cosVXdJITdWzhz1VvCiixjyqkPPzFB+keVO+hlv4ssObdC92Bw1SBmQrIR7xrEBWP nBc0OL49+lz7xRTfV5nxmkwtJNvNEkcTXV2wpvB4ng8kma0A/PZ21SR9/DxUtkhGhoebM5 8hvjQ5MwXEfRA5qNnlxTfeVKVWFq4tRkf8w67sf/kSjD1KBRAA9qSbpZmKV6Ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492127; a=rsa-sha256; cv=none; b=xK3hFbqKoUNI3+ydRyw0mLEafZI2HAunTm/XMxe3ilNsm5aj7lB/fdz3QkZRQrMp8CDLAD bJGrCyzUmDRq+k9aezd8c4uCNAt5DcA/pwZwm5SfkPpYlxUx9UF7bfLS2Y/DB69bi/iQlT J5JCLW0AfAeq6+jnG5qqE+hG3/P6+LmpXldKgywkE5/1/kpz1mLUcUNDUsOCC4YkjnzRDv js4wneN+EcPaMi2ah6cGDJ5HOTvpaaqg7SdUazB5ZHY5Au7vBqAzOhQ55cEYzPzY7g+zaM YhDvMewDsaBOpxRtL7V8oZb7XgO0qIxTpdMQrBCTyPDat2LtpvbqlMPt9GEznA== 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=1702492127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xy/n48wNGMsDpSUXEj2UeuVsrbg6DyA/1aDoSgbWYsc=; b=iPBdP4aE6NWbkC/YCfp1e0S2DyXbaCJsldXv9d9Y5/IAoc8M0aPHdtiSyKWBue2xll9Tay Fdtrf5VFHi/V9X+73r3rVF2AKLcVTosi18PSG8+EcECACxFF82eL7g/+ummQxpQFmkLg/8 5oJkwc/dFTD36qv+QGO/3qmfwXJ2KhXqdgOpQcCG9aEwIzsnatONbkQFrMA5+rrXyE116S Jaq0JD0+fe5iDhXre04kgwgrHOrQ34hlKZcC0FQDgiGI7iy73+s8bra8fHiXOKcT2a5dYY ujWqTKFga0iml5QD9ZklF8zeihGG7MFO4fMck31OCqclNvl3jEWZL//kCiRHMA== 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 4Sr3sC3ng3z18Nk; Wed, 13 Dec 2023 18:28:47 +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 3BDISlYK019037; Wed, 13 Dec 2023 18:28:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISllg019034; Wed, 13 Dec 2023 18:28:47 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:47 GMT Message-Id: <202312131828.3BDISllg019034@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 509707e8b6b7 - main - linuxkpi: Add `sysfs_create_link()` in List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 509707e8b6b7326c7f4793b6e291f0a8e6939412 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=509707e8b6b7326c7f4793b6e291f0a8e6939412 commit 509707e8b6b7326c7f4793b6e291f0a8e6939412 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 21:54:29 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +0000 linuxkpi: Add `sysfs_create_link()` in [Why] The amdgpu DRM driver started to use it in Linux 5.18. [How] The function is a no-op as I'm not sure how to implement this with sysctls yet. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43022 --- sys/compat/linuxkpi/common/include/linux/sysfs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index 3dc1a18fdbd3..8b4160453a3a 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -152,6 +152,15 @@ sysfs_remove_file(struct kobject *kobj, const struct attribute *attr) sysctl_remove_name(kobj->oidp, attr->name, 1, 1); } +static inline int +sysfs_create_link(struct kobject *kobj __unused, + struct kobject *target __unused, const char *name __unused) +{ + /* TODO */ + + return (0); +} + static inline int sysfs_create_files(struct kobject *kobj, const struct attribute * const *attrs) { From nobody Wed Dec 13 18:28:48 2023 X-Original-To: dev-commits-src-all@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 4Sr3sD6JWtz547n7; Wed, 13 Dec 2023 18:28: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 4Sr3sD5lzfz4KNb; Wed, 13 Dec 2023 18:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iQBjgfs+tnpgJBL0E4cRIeSE//vjUqx4KMSwrut6p/M=; b=YBJ0zKRJkNwefP82zy9cEBJbs9KNnSH8xgz56kCcG0EHlzaNf1vItHt8jVvcR8gpaOg58e NFsNIcpA7lWjHfeGXSqwRRS9M4xZQJnmjs6J0g9fmQDhV+tWVADDqoMiNfsavFp7IwbtTH K3lxB+8kEW65fxJ5g745Yx8o/32Plbb7p2XMHz8xYFuW3ZnfVqtKRnTo0H3FZuQE8E7XXj F1gpzOyCN6pKm+5TCej5iy7nPH+1W8jqCKM2uJc8AA4+lGBkt493d2j1ZtCz+29P8dckz7 BeDPVbKcvBBXWpcitPxYyQ/nfATdprMVS4+Kdy1PcXfZuJLUJasKG6wpew3Vkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492128; a=rsa-sha256; cv=none; b=AX85JFjxxqh09C0AXYxuuKVK+I/9U4JzUgdQt+ufmPa5Po6vniHz8ljiZH5kMH8gEBVaaR pmrJgzsjZyQ5FC6uPCze1wr6ZgPEyXtdDvkOjTgYorFIAzPESAvpyojuUS4J4ytR8wWuKy muQHkYb4tjndPdzr89WnAfUdlZAN618eGWScEriOBQrerlbiJpO5AKif5BH7NCBPLbWBqg Z8ETb2biLdTEDWb3lrQ4wgCpaV49V3gxusioOo2GtM8Yy06IMlDzGfBKtqk/qdTVEupYZa 7UKPURBkxA/gw6J5nVsd1UfCg3OV7wrcyNgd0NTuL0wfQ0vNVDt8RnAINp72cg== 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=1702492128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iQBjgfs+tnpgJBL0E4cRIeSE//vjUqx4KMSwrut6p/M=; b=eeEfyosiQgG49xltLueur6Fls83AtoDdrWdxPUeHVGUwTIvy+rFP0gF/yufTx2zL/7MOd+ zZIo6EJeOdYH/Wb4SynXdSaz8FTiUD09SzqhSw7fwchKSqbcfp5u6RQXvjDCXvxrTC1qoP J26aVF9VWYJXd6wavx7knkSJ+mdT8jTl43PnpGHjAXTesQ37yfXfjy3Q2b2Phbvoct7Bff uppwmaN+swYk5Hz5POs5OUnttFuojxXdYWcFHZwFr/HyaGokycYnY5EwycTvuUCWT5MHEp VpNE4mprzUmNFlhkN77t5OQgbjrx4odekHzVqmDvI4g8hUZnIG5xynobwsml4g== 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 4Sr3sD4s1Gz189F; Wed, 13 Dec 2023 18:28: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 3BDISmh7019087; Wed, 13 Dec 2023 18:28:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISmSp019083; Wed, 13 Dec 2023 18:28:48 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:48 GMT Message-Id: <202312131828.3BDISmSp019083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: d752a5e82ac9 - main - linuxkpi: Fix `__ATTR_RO()` in List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d752a5e82ac92603fadf82e7de75878e1f5d054a Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=d752a5e82ac92603fadf82e7de75878e1f5d054a commit d752a5e82ac92603fadf82e7de75878e1f5d054a Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 21:57:24 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +0000 linuxkpi: Fix `__ATTR_RO()` in [Why] The passed structure may not have a `.store` field. This is the case in the amdgpu DRM driver starting with Linux 5.18. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43023 --- sys/compat/linuxkpi/common/include/linux/sysfs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index 8b4160453a3a..4a65095d9eb1 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -54,7 +54,10 @@ struct attribute_group { .attr = { .name = __stringify(_name), .mode = _mode }, \ .show = _show, .store = _store, \ } -#define __ATTR_RO(_name) __ATTR(_name, 0444, _name##_show, NULL) +#define __ATTR_RO(_name) { \ + .attr = { .name = __stringify(_name), .mode = 0444 }, \ + .show = _name##_show, \ +} #define __ATTR_WO(_name) __ATTR(_name, 0200, NULL, _name##_store) #define __ATTR_RW(_name) __ATTR(_name, 0644, _name##_show, _name##_store) #define __ATTR_NULL { .attr = { .name = NULL } } From nobody Wed Dec 13 18:28:49 2023 X-Original-To: dev-commits-src-all@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 4Sr3sG02PBz5484Z; Wed, 13 Dec 2023 18: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 4Sr3sF6ZDqz4K5W; Wed, 13 Dec 2023 18:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FhqmJH25/tRpx/oyfDNIndiGsuYuMlOkJJ8S3NJvN4k=; b=nn+Vc8BWtlV845XnvLX7p4KgJFMl1F5b6Me5cmdVt+AIvbz34EazSKQsTMn5ygGJEXzMJa PEe23XGMgADOzNBJakpwa/fAFabj71W7kSFndM81+zOCAhGhXI/gDaMAg4rVQCGY4H1/LL //Bq3o0lzWB6cVZKJ379d+hDGsSyu/VaDbsi53Ym4oXFaQp3RmIHYVzP1AxVAt8cOy0UN9 lsHGKaOd5nVj8ze0EUOZCYk1srp4vnXNkOzaGE9psE38EGwEhpTOP18Ggp1+QpeEDXQZsZ rHZ6r8Fb+ygyVHCiawkWj5XO6GjFOntmvSEPx7jObQ9mH3ph9Vc5UMaEexUpXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492129; a=rsa-sha256; cv=none; b=YcYYUOeaZWv9Ozrdud1WpMxtkOcE/TWmuNm2VuoD2XOVppNxtlvz8Lmm+ORVLRdny8y6SN Ionh32honUF6iUdJQ/C4UCpjXHYWtRFKOfRvyk1EuvkDN9oCG5TGGR5lWYbl3eS1R0qYRs O8Ooo1ILzXC3BocW6GjNRaasfwkGuIFoK/jT5lo8XjCPgWGK5PRdbp+8rKUNa5CqWm4Z4b OF0M9VoPUgt9pliaxpnKB2Zhv65v86IiFL7/vN/xOGW37AhPiSDzB23rMA0TFj3RmSKxGk XETUExu/QTwGq+UyYC43Z/wZ53RyTS3hpAFI6kgDF8ImVEsN1Svl4hoDF7Vgzg== 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=1702492129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FhqmJH25/tRpx/oyfDNIndiGsuYuMlOkJJ8S3NJvN4k=; b=XyYy5ck6Ny/STvYWIFkG8Hyhp4AUP758HQVG9ZB2/r42w5e8s17bt6Tn2ct4BDwO0R7Lcm fltivLo2DsZ4dMA75pftH3P5mrIrapIhMil7SWBXV582a0r4nLEcImMQOBVtWeYiLZAySh GPsA1hUiVm3bJuvG7aagKqqe5diWPnidL3wlRKPlRUqwOIfwl9BkUCs+7V3lVOmINMUIA4 ZbRo/8OdrMDS0fwkCQxmGRVK6CC/GZCcMJpbiaX2AgbCFaF6OHRs0BIC71WPBpVgh6L3Rn EvMTHhj1KqRgz8nna7NnYHmsBTApHdmhUdfKWgCQwlBj9XPXgTuQW5fEgjwRpQ== 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 4Sr3sF5g29z18Qs; Wed, 13 Dec 2023 18:28: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 3BDISnsK019142; Wed, 13 Dec 2023 18:28:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISnlt019139; Wed, 13 Dec 2023 18:28:49 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:49 GMT Message-Id: <202312131828.3BDISnlt019139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: b30637c100f1 - main - linuxkpi: Add
--000000000000721b8e060c6b5315-- From nobody Wed Dec 13 22:29:02 2023 X-Original-To: dev-commits-src-all@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 4Sr9BT0Fqjz54Q2c; Wed, 13 Dec 2023 22:29:05 +0000 (UTC) (envelope-from des@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 4Sr9BS6rBGz3RyQ; Wed, 13 Dec 2023 22:29:04 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702506545; 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=ZrxwzH3uWTHWs9UAeuVZG7VP7qXPZ0QmLG6pJtdxS4I=; b=LIyWQaTe/kh9AFxn6lK0BD9iuIURydcoKMPlHYE8azKD2o7ThBidaaSHkxz0E/T23t2D5U CiaGs+X8EboFiYcWAHuMkP5DOhkPPn99vnFv+RY7cYEYNEYbleH/WgTnNDvn8JK5/92KMb hnkYZ19khDJzHj7dbpNiONbAFirZLkqEeMYW474l9CJLx1P8npnZlEQV5M5F1Xh/nHPIO0 zPXEb6UC9O5zTZMCp8+VLhiUuo/ZdW0aDpR7NABbEdkcYAmXLZ6q90cHjC01boGuMotOMj QmV3AvRCKopI+KvAsqIdKAcXMbsLmmJUXDmeUEGsgkWDDkrX0l/AIIn3sumsnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702506545; a=rsa-sha256; cv=none; b=FPILBcyeQoHsgrw4Kd12SarQdwBmrlW2j84qOe+hzUr1eCLicZggsmwIc+gbROUeN5yoS8 hTqjh812QD8aRUK5uMjvvFyQ+pUPp2zCojnGEY7Fm5QAvKWgJLR27nskWwLwO4tliiXLdO 5Qy9usVyi6aoyuIf1xQFP5lDJqdDGrD/tDk20mnmAuPYChiQ68v0Rzsw7htBXXzsQvvW2J xeC5CYInp6Vt2TvyGOsES6IjWZZRrnY6FwnuES8vGVXjrO2Ky1vWnV9T/87GjyNgp2WVFD R0dTEZ2m7vowC5BmMRKEi++y3HlDRQTKyhgsmZt5EuYXtewaM7+bE9oViLXp3Q== 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=1702506545; 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=ZrxwzH3uWTHWs9UAeuVZG7VP7qXPZ0QmLG6pJtdxS4I=; b=KovC8dH88JdPALleT9oTikkFWq0pSktCgUXXUYv/8JGfHdVaVnDQToTRpOZvjnap3XmDZq sMXjcVoKzg8WdkROeBkM4lsvkoUUn2zxDt1grD6g06ERLjmRXQjdEJNd2nuwVSPmLl0m4t ugIaFtxcDhemWCZ9gJl4j9a4fE57cNbkJxtZOMx8exeDPq3OBAF5lYIUTZ7UwrnffrGRL0 KWytQH7MTOsboWBEozHAHFPSWTSk0ESkxPyVFrl4XbPHRRUBwxGHPV2UD5O+OOTT3vwtZf +X3TqtuPg7iriK11+Ug4RCfzj1VAbvmS3e1tryp3RTkncnaOuAXVsg0HVX6G5A== Received: from ltc.des.no (48.115.65.81.rev.sfr.net [81.65.115.48]) (using TLSv1.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 4Sr9BS56mLz1QTq; Wed, 13 Dec 2023 22:29:04 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.no (Postfix, from userid 1001) id 3F1023374B; Wed, 13 Dec 2023 23:29:02 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Xin LI Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 585762c3733f - stable/13 - Improve usability of head(1) and tail(1): In-Reply-To: (Xin LI's message of "Wed, 13 Dec 2023 13:28:09 -0800") References: <202312132006.3BDK6VLv087438@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Wed, 13 Dec 2023 23:29:02 +0100 Message-ID: <86cyv9ybwx.fsf@ltc.des.no> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Xin LI writes: > Thanks! (Somehow I missed the MFC notification...) MFC notifications have been broken for ages. I got a few in April but before that I haven't gotten one since 2019. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Wed Dec 13 22:29:45 2023 X-Original-To: dev-commits-src-all@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 4Sr9CG2DmXz54Q56; Wed, 13 Dec 2023 22:29: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 4Sr9CG1Pbwz3SKJ; Wed, 13 Dec 2023 22:29:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702506586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C1MuSrcdMo1GTe3+aYyrZc7cQcILEdpPGsvk4yWgaP8=; b=dTpgzTJaNXyT/bqoaJOz0STo7QkEkb9pvQedhvAwGkPBCRj7HRqCs7clesnhkTIPKhTwsp 09DyyPnq5UBhjhXnLb+BGD10OBSWipgozq1EYK7gdxKMD5saUO3It+TZZRyYP3/M9IaylR 0enOTttjL3avucO4Slvf4jBtM7cp81OrlIMl1G9LzQXBeBhKLI3v/5rXiJLrKlhCgwcSce NkvjJulHedGAkSowj0Ig7eke169UohlaRplBS09WY4FgMrS8r6mXOc/q0ePo3gKJrykbXZ VA6DJ8vS9ZbBWh7MjtGsfqjF+K5gLXDk1ly4Vb0eIOtb4zG7JxnNHju49VCL7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702506586; a=rsa-sha256; cv=none; b=yz9YH+4jBtE4K6Wzp8TzTb96XaT1imv7oQMGFmKhRertt7Kv9e+ZjNESfVt2Teo+JyZOzm SatN461see0qQqdi4v4b82dIFGXrfDH1Cy43yPHZbh/qpRtlzQxZsu0cjt+2OHlbXeIzIu SogzHIIgOA4bk8BUuzIBt+gcvkCJw6obPYtICYUzNlniyi3A/8WWF25hQ5GJ/X7hhyJx5e i3h1ricPwgvxHlQOAbkfGSdrqPXSMvnqyriNvoLqzYkMhCA3QNk9BS5a1Tx6/Wt5Fx08u+ 2Ln1vlt6gjXsnyUGgJIfg4L6l+5LoZr3zoMaer1wsHf7YDdCuBS5hFXM5uRGoA== 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=1702506586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C1MuSrcdMo1GTe3+aYyrZc7cQcILEdpPGsvk4yWgaP8=; b=sBbnrx5DwpCXjkj3TuMLKbUTOLLhp+BhSXnvKOWmIjLDKnS8QFaXX8K/2+JXzuQtGP2rWo ElYRVRZagv6+XH6kAXDISm9Rps/oIBo51m9btKGwKpel5fYEtimmNozRG6LnvR3JWxURGS nuM0QxPWfgW34JBDp016p7ty4fBW91DaF2KPPAPO4qQMXOVOYgYPo/hB1wEpuWToN2Xht1 6uWWss9kSVd83m5SIqOOYuleo3htqxbkFg/B4NjHA5CWqP7HDxP+EEpKec7VW+ybVxK8QM XxHRZN1uwE7l/M5onNpx8/L0pJcqZVpM+dyHXHgegNM0KhyGi9yygIvdBip8WQ== 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 4Sr9CG0GK9z1GGJ; Wed, 13 Dec 2023 22:29: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 3BDMTjFb024387; Wed, 13 Dec 2023 22:29:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDMTjIL024384; Wed, 13 Dec 2023 22:29:45 GMT (envelope-from git) Date: Wed, 13 Dec 2023 22:29:45 GMT Message-Id: <202312132229.3BDMTjIL024384@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 9a2bee998b38 - stable/14 - libc//sys/Makefile.inc: remove cruft List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9a2bee998b38b6cc2fc540ee50bb66d111904309 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9a2bee998b38b6cc2fc540ee50bb66d111904309 commit 9a2bee998b38b6cc2fc540ee50bb66d111904309 Author: Brooks Davis AuthorDate: 2023-11-15 17:50:53 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 22:08:13 +0000 libc//sys/Makefile.inc: remove cruft Remove stray blank lines left over from $FreeBSD$ removal as well as some CVS-era (perhaps pre-repocopy) version comments. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42611 (cherry picked from commit b73eace889f1db518a7b0b3372351e0cbf550085) --- lib/libc/aarch64/sys/Makefile.inc | 1 - lib/libc/amd64/sys/Makefile.inc | 2 -- lib/libc/arm/sys/Makefile.inc | 1 - lib/libc/i386/sys/Makefile.inc | 2 -- lib/libc/powerpc/sys/Makefile.inc | 1 - lib/libc/powerpc64/sys/Makefile.inc | 1 - lib/libc/powerpcspe/sys/Makefile.inc | 1 - lib/libc/riscv/sys/Makefile.inc | 1 - lib/libc/x86/sys/Makefile.inc | 1 - 9 files changed, 11 deletions(-) diff --git a/lib/libc/aarch64/sys/Makefile.inc b/lib/libc/aarch64/sys/Makefile.inc index eb8b600208b7..7cb0544a2997 100644 --- a/lib/libc/aarch64/sys/Makefile.inc +++ b/lib/libc/aarch64/sys/Makefile.inc @@ -1,4 +1,3 @@ - MIASM:= ${MIASM:Nfreebsd[467]_*} SRCS+= __vdso_gettc.c \ diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libc/amd64/sys/Makefile.inc index 43af1d2a85a2..32c03ccf2963 100644 --- a/lib/libc/amd64/sys/Makefile.inc +++ b/lib/libc/amd64/sys/Makefile.inc @@ -1,5 +1,3 @@ -# from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp - SRCS+= \ amd64_get_fsbase.c \ amd64_get_gsbase.c \ diff --git a/lib/libc/arm/sys/Makefile.inc b/lib/libc/arm/sys/Makefile.inc index dcc1bdb3ea03..398ac494f2bc 100644 --- a/lib/libc/arm/sys/Makefile.inc +++ b/lib/libc/arm/sys/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= __vdso_gettc.c \ sched_getcpu_gen.c diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libc/i386/sys/Makefile.inc index f89099385dc9..accdc3367ac8 100644 --- a/lib/libc/i386/sys/Makefile.inc +++ b/lib/libc/i386/sys/Makefile.inc @@ -1,5 +1,3 @@ -# from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp - SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ioperm.c i386_get_ldt.c \ i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c \ i386_clr_watch.c i386_set_watch.c i386_vm86.c diff --git a/lib/libc/powerpc/sys/Makefile.inc b/lib/libc/powerpc/sys/Makefile.inc index 17b7b3b26111..9979d5179f51 100644 --- a/lib/libc/powerpc/sys/Makefile.inc +++ b/lib/libc/powerpc/sys/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= __vdso_gettc.c \ sched_getcpu_gen.c diff --git a/lib/libc/powerpc64/sys/Makefile.inc b/lib/libc/powerpc64/sys/Makefile.inc index 17b7b3b26111..9979d5179f51 100644 --- a/lib/libc/powerpc64/sys/Makefile.inc +++ b/lib/libc/powerpc64/sys/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= __vdso_gettc.c \ sched_getcpu_gen.c diff --git a/lib/libc/powerpcspe/sys/Makefile.inc b/lib/libc/powerpcspe/sys/Makefile.inc index 8f48df0d6021..328c43d2b1ca 100644 --- a/lib/libc/powerpcspe/sys/Makefile.inc +++ b/lib/libc/powerpcspe/sys/Makefile.inc @@ -1,3 +1,2 @@ - .PATH: ${LIBC_SRCTOP}/powerpc/sys .sinclude "${LIBC_SRCTOP}/powerpc/sys/Makefile.inc" diff --git a/lib/libc/riscv/sys/Makefile.inc b/lib/libc/riscv/sys/Makefile.inc index e98d2ceeccad..f1cc8d489553 100644 --- a/lib/libc/riscv/sys/Makefile.inc +++ b/lib/libc/riscv/sys/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= __vdso_gettc.c \ sched_getcpu_gen.c diff --git a/lib/libc/x86/sys/Makefile.inc b/lib/libc/x86/sys/Makefile.inc index c06d18b06e3d..cbc28773ab79 100644 --- a/lib/libc/x86/sys/Makefile.inc +++ b/lib/libc/x86/sys/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/x86/sys SRCS+= \ From nobody Wed Dec 13 22:29:47 2023 X-Original-To: dev-commits-src-all@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 4Sr9CH2VFYz54Q2k; Wed, 13 Dec 2023 22:29:47 +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 4Sr9CH1jm6z3SXP; Wed, 13 Dec 2023 22:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702506587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R7WmLwN1rkvMY70gkAAfkcY9T86cNuzaKi8wup0Jr2Y=; b=adIETyyoYtnAMc47m0pSdFNLI8H9skNabgQI1LQkFT9+WUy4TweI8NDW3sazlGP+yjzViB 8CVKnFeZnrW7ApvwERHY9rnEv2Ygvp4O6iphaVOhAFJ+9Dnm75KklSNTgKCUfPDJgpPtg/ vuJhUkVzqSAe9GZ91YqqQDLA84g6QRQg/vD+efUZUiltG7Akl2iFDxyevhwEJp+mqcm78W d73Tl4QObXNb+Y6yi2LBdYlnLw2Fj9ae5ebU2KHRfketuUCI12xqAPJu71H+Kf+lOUYqso nExVlpe4wF4L8tdOMSn9MGNCzHqfxsqEkxYeKkKZULU0OQaCPYj8GN42fbhEzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702506587; a=rsa-sha256; cv=none; b=oIHD+7A48jV0vcdz+vXS81otYbXL3kfa+jgc3mf3n5kiHRVnHD831CE6c37o5lGglHKf7q kAv1myrW9hqIQ8ZDhrq7nbjkcs9UwUVCjOPfDcnatxIN2uFZVpMhLYDfwrHc+3+LExIp9y 8gAdk9bDMXoSANgrZLQz5a0zfyP3enHOGZsJpxbFcuyvB/Ic8OiSiwss/sPqF1F0KRHj5E +mKim1FBnMLKNgQKN0+dDezhR7HDPpe+3xVLkq9w9xv7POlKHQnEHH4DVcTQg05ip26kZm mg4GhfLSjBgjqJY6WcmSr6Qy8mfkUiAWw+g0GAOjp/96MSxIEsun8YMXvUgnqw== 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=1702506587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R7WmLwN1rkvMY70gkAAfkcY9T86cNuzaKi8wup0Jr2Y=; b=QFh/7vmyVxAVoa1CiYXvj1ASa6PPbgk2NLqWSGgYHvqJtsrQtPR5RmjZae81kNpF+MPn01 7Gr63wrpHFMRyVWduz+OlggtHCrMkH4VYiNn0x1MrXgg3Jkb3NAmp0R1F0VorJUAHXE4j6 hrf05P3NNypMjbBsXwwir1c8ERBZDhyr0cXukx8erlCq0B4IUZF+cbqF69/KRRR4XG9U/f RWBZ165TO+R1RgUMjIai+RTzpQ1nQSUUQEPRKxlvO8sT25EU5o27Mi7cErTcQcJp8m3pV2 TQa9miW6N1WdAN8XxAONNPZu2m1NEvwdFxYG2DGD8teZu+O0/mj6sBqyvF4FiQ== 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 4Sr9CH0jnnz1GD2; Wed, 13 Dec 2023 22:29:47 +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 3BDMTlD7024432; Wed, 13 Dec 2023 22:29:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDMTlx7024429; Wed, 13 Dec 2023 22:29:47 GMT (envelope-from git) Date: Wed, 13 Dec 2023 22:29:47 GMT Message-Id: <202312132229.3BDMTlx7024429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 695639d2f4e1 - stable/14 - libc: Remove empty comments in Symbol.map List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 695639d2f4e1d618ffa10cf44a91db6dddf0709f Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=695639d2f4e1d618ffa10cf44a91db6dddf0709f commit 695639d2f4e1d618ffa10cf44a91db6dddf0709f Author: Brooks Davis AuthorDate: 2023-11-15 17:51:03 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 22:08:13 +0000 libc: Remove empty comments in Symbol.map These were left over from $FreeBSD$ removal. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42612 (cherry picked from commit 1ca63a8219b88b752b064d19bd3428c61dbcf1f9) --- lib/libc/aarch64/Symbol.map | 3 --- lib/libc/amd64/Symbol.map | 3 --- lib/libc/arm/Symbol.map | 3 --- lib/libc/arm/aeabi/Symbol.map | 3 --- lib/libc/capability/Symbol.map | 3 --- lib/libc/compat-43/Symbol.map | 3 --- lib/libc/db/Symbol.map | 3 --- lib/libc/gdtoa/Symbol.map | 3 --- lib/libc/gen/Symbol.map | 3 --- lib/libc/gmon/Symbol.map | 3 --- lib/libc/i386/Symbol.map | 3 --- lib/libc/iconv/Symbol.map | 3 --- lib/libc/inet/Symbol.map | 3 --- lib/libc/locale/Symbol.map | 3 --- lib/libc/nameser/Symbol.map | 3 --- lib/libc/net/Symbol.map | 3 --- lib/libc/nls/Symbol.map | 3 --- lib/libc/posix1e/Symbol.map | 3 --- lib/libc/powerpc/Symbol.map | 3 --- lib/libc/powerpc64/Symbol.map | 3 --- lib/libc/quad/Symbol.map | 3 --- lib/libc/regex/Symbol.map | 3 --- lib/libc/resolv/Symbol.map | 3 --- lib/libc/riscv/Symbol.map | 3 --- lib/libc/rpc/Symbol.map | 3 --- lib/libc/secure/Symbol.map | 3 --- lib/libc/softfloat/Symbol.map | 3 --- lib/libc/stdio/Symbol.map | 3 --- lib/libc/stdlib/Symbol.map | 3 --- lib/libc/stdlib/malloc/Symbol.map | 3 --- lib/libc/stdtime/Symbol.map | 3 --- lib/libc/string/Symbol.map | 3 --- lib/libc/sys/Symbol.map | 3 --- lib/libc/uuid/Symbol.map | 3 --- lib/libc/xdr/Symbol.map | 3 --- lib/libc/yp/Symbol.map | 3 --- 36 files changed, 108 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index 7f5b9ee9b56c..574b5e49d106 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 39a913bd5e84..0bd3dabdb19e 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 7b3d173d72ed..d91e681f4478 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/arm/aeabi/Symbol.map b/lib/libc/arm/aeabi/Symbol.map index 823e4ad0d79d..175884c82881 100644 --- a/lib/libc/arm/aeabi/Symbol.map +++ b/lib/libc/arm/aeabi/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain AEABI symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/capability/Symbol.map b/lib/libc/capability/Symbol.map index 65e112348012..0deff024a046 100644 --- a/lib/libc/capability/Symbol.map +++ b/lib/libc/capability/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.3 { __cap_rights_clear; cap_rights_contains; diff --git a/lib/libc/compat-43/Symbol.map b/lib/libc/compat-43/Symbol.map index 588a693dabb7..b0ce99f4e416 100644 --- a/lib/libc/compat-43/Symbol.map +++ b/lib/libc/compat-43/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { creat; gethostid; diff --git a/lib/libc/db/Symbol.map b/lib/libc/db/Symbol.map index cb00d6bd1290..2cca589af9f0 100644 --- a/lib/libc/db/Symbol.map +++ b/lib/libc/db/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { dbopen; dbm_open; diff --git a/lib/libc/gdtoa/Symbol.map b/lib/libc/gdtoa/Symbol.map index a3cfd8df6819..55fe12e87c57 100644 --- a/lib/libc/gdtoa/Symbol.map +++ b/lib/libc/gdtoa/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { /* * Standard functions from contrib/gdtoa diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index bdd659197644..1fa5478b7918 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { __xuname; pthread_atfork; diff --git a/lib/libc/gmon/Symbol.map b/lib/libc/gmon/Symbol.map index 9d880afd8841..7fd880a1b898 100644 --- a/lib/libc/gmon/Symbol.map +++ b/lib/libc/gmon/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { _mcleanup; monstartup; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index 9d6ea7fff9f3..d09c98487f64 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/iconv/Symbol.map b/lib/libc/iconv/Symbol.map index f883fe0d3e87..49dd63aca9da 100644 --- a/lib/libc/iconv/Symbol.map +++ b/lib/libc/iconv/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.3 { __bsd___iconv; __bsd___iconv_free_list; diff --git a/lib/libc/inet/Symbol.map b/lib/libc/inet/Symbol.map index e26556cd5fe4..11e22a1f6945 100644 --- a/lib/libc/inet/Symbol.map +++ b/lib/libc/inet/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { __inet_addr; __inet_aton; diff --git a/lib/libc/locale/Symbol.map b/lib/libc/locale/Symbol.map index f29e6226855b..a38771e9c3fc 100644 --- a/lib/libc/locale/Symbol.map +++ b/lib/libc/locale/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { btowc; digittoint; diff --git a/lib/libc/nameser/Symbol.map b/lib/libc/nameser/Symbol.map index db66ed0951ec..0d328cb0f23c 100644 --- a/lib/libc/nameser/Symbol.map +++ b/lib/libc/nameser/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { __ns_makecanon; __ns_msg_getflag; diff --git a/lib/libc/net/Symbol.map b/lib/libc/net/Symbol.map index b2ecd4f08735..fa76adce06a1 100644 --- a/lib/libc/net/Symbol.map +++ b/lib/libc/net/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { __b64_ntop; __b64_pton; diff --git a/lib/libc/nls/Symbol.map b/lib/libc/nls/Symbol.map index d8ee248d60f0..0703131b8415 100644 --- a/lib/libc/nls/Symbol.map +++ b/lib/libc/nls/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { catopen; catgets; diff --git a/lib/libc/posix1e/Symbol.map b/lib/libc/posix1e/Symbol.map index 87e18493d1ec..92a0bf85cfa2 100644 --- a/lib/libc/posix1e/Symbol.map +++ b/lib/libc/posix1e/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { acl_calc_mask; acl_copy_entry; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index fb82bcdb27f0..ff99e09028db 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index 7d010fda6693..bad72c5a6efc 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/quad/Symbol.map b/lib/libc/quad/Symbol.map index 2752be26abb4..86fc2ee9c334 100644 --- a/lib/libc/quad/Symbol.map +++ b/lib/libc/quad/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { /* * These symbols really shouldn't be exported since they should diff --git a/lib/libc/regex/Symbol.map b/lib/libc/regex/Symbol.map index 3b9072571740..436398f639c7 100644 --- a/lib/libc/regex/Symbol.map +++ b/lib/libc/regex/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { regerror; regexec; diff --git a/lib/libc/resolv/Symbol.map b/lib/libc/resolv/Symbol.map index c93d8bea6f15..6b9c43298fb5 100644 --- a/lib/libc/resolv/Symbol.map +++ b/lib/libc/resolv/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { /* h_nerr; */ /* Why is this not staticized in net/herror.c? */ h_errlist; diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index c19f7ddf631e..6726863e9b97 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map index 89b434ce67db..5bf364f28d81 100644 --- a/lib/libc/rpc/Symbol.map +++ b/lib/libc/rpc/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { /* From crypt_clnt.c (generated by rpcgen - include/rpcsvc/crypt.x) */ des_crypt_1; diff --git a/lib/libc/secure/Symbol.map b/lib/libc/secure/Symbol.map index 4f9f34844131..641f451b5421 100644 --- a/lib/libc/secure/Symbol.map +++ b/lib/libc/secure/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { __chk_fail; __stack_chk_fail; diff --git a/lib/libc/softfloat/Symbol.map b/lib/libc/softfloat/Symbol.map index ee6d1b0eac52..9c5229a18066 100644 --- a/lib/libc/softfloat/Symbol.map +++ b/lib/libc/softfloat/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { _fpgetmask; fpgetmask; diff --git a/lib/libc/stdio/Symbol.map b/lib/libc/stdio/Symbol.map index 575dc3cd923c..f5e74eeddfd4 100644 --- a/lib/libc/stdio/Symbol.map +++ b/lib/libc/stdio/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { flockfile; ftrylockfile; diff --git a/lib/libc/stdlib/Symbol.map b/lib/libc/stdlib/Symbol.map index e10789ceab1a..d74df869cf54 100644 --- a/lib/libc/stdlib/Symbol.map +++ b/lib/libc/stdlib/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { _Exit; a64l; diff --git a/lib/libc/stdlib/malloc/Symbol.map b/lib/libc/stdlib/malloc/Symbol.map index 4356337d1c37..15e4f9e6c69c 100644 --- a/lib/libc/stdlib/malloc/Symbol.map +++ b/lib/libc/stdlib/malloc/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { _malloc_options; _malloc_message; diff --git a/lib/libc/stdtime/Symbol.map b/lib/libc/stdtime/Symbol.map index acdd3bbb89b4..0dca02903a1a 100644 --- a/lib/libc/stdtime/Symbol.map +++ b/lib/libc/stdtime/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { _time32_to_time; _time_to_time32; diff --git a/lib/libc/string/Symbol.map b/lib/libc/string/Symbol.map index ec4778ff3c24..fd854d1f9479 100644 --- a/lib/libc/string/Symbol.map +++ b/lib/libc/string/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { bcmp; bcopy; diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index 7937661e3787..05a2f21d554e 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * It'd be nice to automatically generate the syscall symbols, but we * don't know to what version they will eventually belong to, so for now diff --git a/lib/libc/uuid/Symbol.map b/lib/libc/uuid/Symbol.map index 49fb239913d2..e1e587199a92 100644 --- a/lib/libc/uuid/Symbol.map +++ b/lib/libc/uuid/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { uuid_to_string; uuid_is_nil; diff --git a/lib/libc/xdr/Symbol.map b/lib/libc/xdr/Symbol.map index 1ee5afda2425..0a964fecdbdb 100644 --- a/lib/libc/xdr/Symbol.map +++ b/lib/libc/xdr/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { xdr_free; xdr_void; diff --git a/lib/libc/yp/Symbol.map b/lib/libc/yp/Symbol.map index ecd17af4a29a..fff2b2e60e39 100644 --- a/lib/libc/yp/Symbol.map +++ b/lib/libc/yp/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { xdr_datum; xdr_ypresp_all_seq; From nobody Wed Dec 13 22:29:48 2023 X-Original-To: dev-commits-src-all@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 4Sr9CJ3pV8z54Q7W; Wed, 13 Dec 2023 22:29: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 4Sr9CJ2wNlz3SQs; Wed, 13 Dec 2023 22:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702506588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kxgieUQAWasFS/cl2Lf2aDQ0Y5l18wJlUpKfBa2UibI=; b=h0CqffmaCZHvHZD9vvUcg6N6qZ3jOXDuS/3b5ZU/SDMWMc+2IUwym3k6w+PGWMPO4YsGZi 4uIBZZy1Ask9n/1LcraJ1H0Wj7/SDDlzqSOJY9a4wrYl78EZYst75kt/bzKRXfNYeZ6Ze6 UZpnsUltu4Gz5SiLaQZVYYNF8c2W/U0o4w/dpIYiCwzrikjiFdF64Frw+pYHdYC9pSozhF H0TMn2Fa8n6V6s1a1dXIZKJ05QgKbayXf+ZhRhCFrjP/MBIAmqUwTxrGBKHIMviyfjb3rN l71EJxqu8FAy/YNZ/CyCiX+94ryKy7vi+cDwglh4C6MOEseD9mkJZnpNGOVvug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702506588; a=rsa-sha256; cv=none; b=VzTHHJKlXNyUyHBlU3T8C+96Lq+baglatCeYDzbTlblN8mbCDs77dINwahmYuvSfvSydMs 7sreniQ3076n+/fzXYBXoWTlM7hI6GGbgBEML7IbdNawllzhqRPSzpyTTQWOWcBLa8KVfp jEshQoKsrq9efCfuS84j0V88Yy/Twdy8UEIpL9hitRPCws1xTMXMdZxFM3AGCKXwkW0c8e ds2ikgEQoZVSDedXo8zGts7RBj/k22HA1YXn9TQdBxR5RBWHs7tXQZRtNcyisQ3KotqHHv xxJ3rnvXDfqSi7Afr8rCLYIl094aWguqB35+pUGkmVJ5b+fzrsD4OwWU46LVVA== 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=1702506588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kxgieUQAWasFS/cl2Lf2aDQ0Y5l18wJlUpKfBa2UibI=; b=pe5Vb2qGzUT+DT1Zeu9paz1PSXIRaYzn/G+GhouW/lxIiUfko/33Qut7Ia+tWSwT2PG6Hr Sv5T+f6utoy5ohbyBu+Wgze1pIjWIIVwDd1+q0f7IwI1CcPyPqpW75fScHRrYCvt1o9o/S eSfEU5MBQyJ7m7QjWv+sKr6PMlIF9sKtLxSmm/kQMbBFc+PHIcO+Jk7e1i5j2yqYz84bVk E0CJztlZhnrHpEnpgJvI9rgzZjr0qN+iGB091JPDW8cjTw0ku1Zqkev3xSNpbI99eFBI24 l2ck0Wj38V6o88RoaFlqtArAdQUtJaPG/QLI2xYwQLWVn29bEVoi3KvDnNLq/Q== 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 4Sr9CJ1l0pz1Fvs; Wed, 13 Dec 2023 22:29: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 3BDMTmsX024480; Wed, 13 Dec 2023 22:29:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDMTmYi024477; Wed, 13 Dec 2023 22:29:48 GMT (envelope-from git) Date: Wed, 13 Dec 2023 22:29:48 GMT Message-Id: <202312132229.3BDMTmYi024477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: e0f6b29f6a6c - stable/14 - lib{c,lzma,z}: remove -DSYMBOL_VERSIONING from CFLAGS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e0f6b29f6a6cb38b46318818db60ff5e7bfbb2c1 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e0f6b29f6a6cb38b46318818db60ff5e7bfbb2c1 commit e0f6b29f6a6cb38b46318818db60ff5e7bfbb2c1 Author: Brooks Davis AuthorDate: 2023-11-15 23:39:46 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 22:08:13 +0000 lib{c,lzma,z}: remove -DSYMBOL_VERSIONING from CFLAGS This was part of a libkse and libpthread transition aide when libc gained symbol versions in e62165c8b0f7d6452c0033127a0fd8ad1d9e34d3 (March 2006). The code that cared about this macro was removed in commit 00fb440c1a145b56b6c75fd405d80071aef2aab1 (May 2007) when symbol versioning was enabled by default and libthr became the default threading library. For unknown reasons, it stayed in libc (which seemingly never used it) and seems to have been copied to liblzma and libz. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42613 (cherry picked from commit e3e9c205ff54aac287309e03a808d9e9ec5c49eb) --- lib/libc/Makefile | 1 - lib/liblzma/Makefile | 1 - lib/libz/Makefile | 1 - 3 files changed, 3 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 7540eb8c21ad..fbfd6619784d 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -151,7 +151,6 @@ STATICOBJS+=${LIBC_NONSHARED_SRCS:S/.c$/.o/} VERSION_DEF=${LIBC_SRCTOP}/Versions.def SYMBOL_MAPS=${SYM_MAPS} -CFLAGS+= -DSYMBOL_VERSIONING # If there are no machine dependent sources, append all the # machine-independent sources: diff --git a/lib/liblzma/Makefile b/lib/liblzma/Makefile index 9e228d277896..85e7b87bbbf0 100644 --- a/lib/liblzma/Makefile +++ b/lib/liblzma/Makefile @@ -156,7 +156,6 @@ LIBADD+= md pthread VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map -CFLAGS+= -DSYMBOL_VERSIONING CLEANFILES+= liblzma.pc diff --git a/lib/libz/Makefile b/lib/libz/Makefile index 7dd1204c5435..6a135158e134 100644 --- a/lib/libz/Makefile +++ b/lib/libz/Makefile @@ -51,7 +51,6 @@ CFLAGS+= -DUNALIGNED_OK VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map -CFLAGS+= -DSYMBOL_VERSIONING INCS= zconf.h zlib.h From nobody Wed Dec 13 22:29:49 2023 X-Original-To: dev-commits-src-all@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 4Sr9CK4030z54PrZ; Wed, 13 Dec 2023 22:29: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 4Sr9CK3VM9z3ST9; Wed, 13 Dec 2023 22:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702506589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U4G5i+9MP722Y0fh+XnFzGk/pJBquICdhIg5DYlPJ5g=; b=WBMUybONabzRC70N5QE7gG9t/DNKmuyKsuLMRZrWYAZzjS54yoGvnam3n5EtPxTQrH0UIx 4Ak3mK3hsdO0M8gpJkETrziRAfMUFbhiZZ/5Lgf5gImbk17u2A/oaAagEssNdSse0WWfJI cinZB9r/TqjJAQ75WxSvCGty3f38i/iQ2xc8tm9T3h8tBIy0XOPWhKEGk3NNus0/x8qMvU E2B+sEuK+xxg/kmrBi36VXPLclT8TgHa7pEjlLSHlGmYRVbAv27Z1mhzOzsxRf7sZkT0Pc xLKlD66C6/v0SjvS+/pCzofdhJrrxhf2LkirRj0OSnehv8XLFjUVYVdt0L5SjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702506589; a=rsa-sha256; cv=none; b=H7UPrp9ZtZB1lMVaceEiHhfbOH7xpIhlFt8jQdhmoAQBm+CKayEVF3RXCmhHYWBOSlgNRr yAUL9SRgF9pxcA9fX+vdLMt6PxxN4vifiDfC+Yd+EKCGi+XCBagXP5UZnPMEAGY0iZigpp J/ucag4Ol3a/qJi4VjqMYKMYHAmw2k/OlrCH5OjAP1w803c/TuYzxNxVpivDrYpZPLmOdy EJd4o8/+NfuWzhhWgK0vKoh3W0opoFd8rqxT/lO+ns2As6tUV7OR9FJndFCYSE+sRqFByP e2/Uer2LQBW49uuIgdPmLqndG/rqEvoBfV1b7PCJGqITshf+cdRyC3piIEB6tw== 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=1702506589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U4G5i+9MP722Y0fh+XnFzGk/pJBquICdhIg5DYlPJ5g=; b=ulRHpW7JYynvxCh+hR70XqiBZpGOvsXLu/Moo8N6UStdhb9uJ14XpMgo8S0yMMHNkjNNNv CITIZJbJvQRnmbuMkk+VUJLT3b2OZgZHq76ADBTNq2lBtS9mKoiohoh6QxHlRVrqY2UQTB /+DU3ZhVbN02F0lmh2kwwoCL2mjegbhc1pA7Wf3mZdlp6KVLh17YaFOSbqtYwxhAsxDbkv Dgsu7JC3rCgCKcPydAtmzqRPjHCcevXR8Lt+TGyUBhrbkT7r25SFziFodCkZ5d9dhnVjH1 ZQfos+3FVbwMPSO8e8/IzqVGpFRtmQJrh0jQuHGJzPos4h6Qjjdhy9k84v4UmA== 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 4Sr9CK2VzQz1Gd6; Wed, 13 Dec 2023 22:29: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 3BDMTnLx024524; Wed, 13 Dec 2023 22:29:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDMTnN6024521; Wed, 13 Dec 2023 22:29:49 GMT (envelope-from git) Date: Wed, 13 Dec 2023 22:29:49 GMT Message-Id: <202312132229.3BDMTnN6024521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: e1508337641a - stable/14 - libc: further centralize syscall symbols List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e1508337641ac21ac71e92681edf4f156039c769 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e1508337641ac21ac71e92681edf4f156039c769 commit e1508337641ac21ac71e92681edf4f156039c769 Author: Brooks Davis AuthorDate: 2023-11-15 23:40:33 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 22:08:13 +0000 libc: further centralize syscall symbols All architectures necessarily implement _exit(2) and vfork(2) so declare them in sys/Symbol.map. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42614 (cherry picked from commit e4a1800f06884dc00931f55d0fa8cd9ce473a83e) --- lib/libc/aarch64/Symbol.map | 4 ---- lib/libc/amd64/Symbol.map | 4 ---- lib/libc/arm/Symbol.map | 4 ---- lib/libc/i386/Symbol.map | 4 ---- lib/libc/powerpc/Symbol.map | 4 ---- lib/libc/powerpc64/Symbol.map | 4 ---- lib/libc/riscv/Symbol.map | 4 ---- lib/libc/sys/Symbol.map | 2 ++ 8 files changed, 2 insertions(+), 28 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index 574b5e49d106..5e71a32786b4 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - .mcount; _setjmp; _longjmp; @@ -24,7 +21,6 @@ FBSD_1.0 { htons; ntohl; ntohs; - vfork; makecontext; }; diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 0bd3dabdb19e..445220db11b7 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - .mcount; _setjmp; _longjmp; @@ -37,7 +34,6 @@ FBSD_1.0 { amd64_set_gsbase; brk; sbrk; - vfork; }; FBSD_1.6 { diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index d91e681f4478..8cb5cbe232d8 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - __mcount; _setjmp; _longjmp; @@ -23,7 +20,6 @@ FBSD_1.0 { htons; ntohl; ntohs; - vfork; brk; sbrk; }; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index d09c98487f64..1ecfb4ecda00 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - .mcount; _setjmp; _longjmp; @@ -25,7 +22,6 @@ FBSD_1.0 { htons; ntohl; ntohs; - vfork; brk; i386_clr_watch; i386_get_fsbase; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index ff99e09028db..2d883a02eeb9 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - _mcount; _setjmp; _longjmp; @@ -30,7 +27,6 @@ FBSD_1.0 { ntohs; brk; sbrk; - vfork; }; FBSD_1.3 { diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index bad72c5a6efc..2de7ffb241e7 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - _mcount; _setjmp; _longjmp; @@ -30,7 +27,6 @@ FBSD_1.0 { ntohs; brk; sbrk; - vfork; }; FBSDprivate_1.0 { diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 6726863e9b97..359a8238fb32 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - _setjmp; _longjmp; fabs; @@ -23,7 +20,6 @@ FBSD_1.0 { htons; ntohl; ntohs; - vfork; makecontext; }; diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index 05a2f21d554e..b59ec1858ffd 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -30,6 +30,7 @@ FBSD_1.0 { __setugid; __syscall; __sysctl; + _exit; _umtx_op; abort2; accept; @@ -283,6 +284,7 @@ FBSD_1.0 { utrace; uuidgen; vadvise; + vfork; wait4; write; writev; From nobody Wed Dec 13 22:29:50 2023 X-Original-To: dev-commits-src-all@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 4Sr9CL6TJsz54QB1; Wed, 13 Dec 2023 22:29: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 4Sr9CL4b0nz3Shm; Wed, 13 Dec 2023 22:29:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702506590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=og9o7Af6dexrmz2c9HzdFAEedjfDYP9RKqgbQaqeeiw=; b=SFJkS7gSOXZqOHQRTY0aRu9kMgyVwlGR/4kVXY/w3mPzm38+zlTWeWj7Vj2JkLiW7OLpAt X40cU4eo4fNjlW4aC8+dkQ1DSIKrG04FR8AfSpw1P1Tr55MsuRx00FtSRV2DgFVOxKyStx ZOQVe483j584vLq3rznTtnwSRlnfBLcylYNsEN3wgAPu3RdM+dHwFPPslYLkxhLjHanJtP g59pc3KU+EWtzgO4iF6yNmhjnssjNxjfRK0dmk4HIzwAEVNd+qOKVktz0QjY+TcKxhWkfa CptAulQZcEHKrpVv+NG0l2PisPT06GyyMCuceU8zosBbJccfpg7bmtpUYKJRhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702506590; a=rsa-sha256; cv=none; b=GiVGJWPtX5BhWjDrDrY62gRYSTngZTbaRVUKpRSWN8PhB8aTLL0PuzVLgwfoV4eb35KWHS /cWQYBzGPoeJdj1GVYTzBrHq8AEFp02s8MxvqewbBlHu4fqxyeB6sKSAZbbTtHIr+gjnUP 2YpmKuXpM/G4hTW3Fn5TrRUp7kDEH0OcDUSfP9lnDJRFaw5SX8oc2tZ2wT3xW0ZDRODNq8 QUjkU5319oSWg0wOPZpmtoA4sjCOd+Fmi79FE0onfGM0gf5U0d6gZrdjwWAaB38Pc4o6UY IdCbW32sWnDm7LuXRu9edIVp7hSZk/+vA6qUL0huSpgVpUpAJ5VH7U47dC4dgw== 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=1702506590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=og9o7Af6dexrmz2c9HzdFAEedjfDYP9RKqgbQaqeeiw=; b=S4wBdy0MhdnoZ58whVVaApUrwclNqnCLHp4l4EMpNOaW06Z3I5J4Grv24wfrk4dmF4A21H ext4PmVdbVV3IdFEU7x9viDTVcwyFDYYaU+UJLqDiXIKEovcypd99UNCktkiv/nJd1oLAR 0Lh219bW9oW+eZ9xp+hqLPwC6zVRfKHfRFplAbzCV1u80F2Aq0b2375nie0PsGx2nF8Ha1 4Ak6lWV9jnf7MrwtrUlAHtSRDQPM2AuqrCQot8C+Ve6gk7TCi+7WeYRxR7oYxINXiACLVz F4Y/nr/sGUTC9SJ96dg8JngE2iYvz7jn3Uox2YYYJhrn5rlCPtNxsipzdtB5hw== 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 4Sr9CL3hnZz1G9C; Wed, 13 Dec 2023 22:29: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 3BDMToKh024563; Wed, 13 Dec 2023 22: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 3BDMTo58024560; Wed, 13 Dec 2023 22:29:50 GMT (envelope-from git) Date: Wed, 13 Dec 2023 22:29:50 GMT Message-Id: <202312132229.3BDMTo58024560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 9d67dced8385 - stable/14 - libc: centralize ntoh symbols List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9d67dced83851c6b509426ba6f3d9dde5583ce06 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9d67dced83851c6b509426ba6f3d9dde5583ce06 commit 9d67dced83851c6b509426ba6f3d9dde5583ce06 Author: Brooks Davis AuthorDate: 2023-11-15 23:40:54 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 22:08:14 +0000 libc: centralize ntoh symbols These are implemented by net/ntoh.c via headers and compiler intrinsics so declare them in net/Symbol.map. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42615 (cherry picked from commit ff3a9d8e2909692c73ce9f9279cac2f15848b3f4) --- lib/libc/aarch64/Symbol.map | 4 ---- lib/libc/amd64/Symbol.map | 4 ---- lib/libc/arm/Symbol.map | 4 ---- lib/libc/i386/Symbol.map | 4 ---- lib/libc/net/Symbol.map | 4 ++++ lib/libc/powerpc/Symbol.map | 4 ---- lib/libc/powerpc64/Symbol.map | 4 ---- lib/libc/riscv/Symbol.map | 4 ---- 8 files changed, 4 insertions(+), 28 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index 5e71a32786b4..691c77f345b9 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -17,10 +17,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; makecontext; }; diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 445220db11b7..3ceb1cd9682a 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -24,10 +24,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; amd64_get_fsbase; amd64_get_gsbase; amd64_set_fsbase; diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 8cb5cbe232d8..5a7aec7c4089 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -16,10 +16,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; brk; sbrk; }; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index 1ecfb4ecda00..f2424a9b64c4 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -18,10 +18,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; brk; i386_clr_watch; i386_get_fsbase; diff --git a/lib/libc/net/Symbol.map b/lib/libc/net/Symbol.map index fa76adce06a1..4831868c0e55 100644 --- a/lib/libc/net/Symbol.map +++ b/lib/libc/net/Symbol.map @@ -64,6 +64,10 @@ FBSD_1.0 { hes_resolve; hes_error; hes_free; + htonl; + htons; + ntohl; + ntohs; if_indextoname; if_nameindex; if_freenameindex; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index 2d883a02eeb9..ed5dd5884736 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -21,10 +21,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; brk; sbrk; }; diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index 2de7ffb241e7..dabf6f4434c5 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -21,10 +21,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; brk; sbrk; }; diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 359a8238fb32..8067ddca10cd 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -16,10 +16,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; makecontext; }; From nobody Wed Dec 13 22:29:51 2023 X-Original-To: dev-commits-src-all@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 4Sr9CN0Twyz54Q7f; Wed, 13 Dec 2023 22:29: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 4Sr9CM5ny9z3SlW; Wed, 13 Dec 2023 22:29:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702506591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7DjAkIATcE8BVxihd9OIUcJxoI7TOR+cNLSalnhF5Vo=; b=Cn9m64Jw+28wojkkoskJuaxwlFuFL2XuffStyYHtfEbmDO7kmVHPewSDa+QCJlbOhGlBii uv2M1DuFgslDr5kNtbWZuCvpDitDERM7zQAXbx4tfSVWiemddfwuH8Q1MFewifmoXB8buG VoQUCzg5dpL8s5JFgAYcpUvzOoZvrBZvhJm+5I9xXRogVyBHYTO2+KsmeA5du+wV0Cs+Bs 6vbZkwYvpgzgw2fp0K9eVdxenLW3uVU3udogE2wkv8aQJ1ccOobv9V7Al7AYa/19U6J797 l8eZfoe9fN7azBGNNzQz9yZCP1EbnsPIyChbe3geSnhaip6hGpC6azOc/M1Ztg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702506591; a=rsa-sha256; cv=none; b=De+/2mL8++aCzJuYbXorBOz3isHnUPIRQTATQMfeBSJiqK1wYaCsTQwU6oMcCebGT6yyXB Lf7YrJZSrkB9afpFVHVaTCZoA0Jxw7RJEQEZPZLRLDRYlrlfMsPwqhjTZwBYQCfZLRCrtw /ccNeBu75l6XnUsTOAOzXYbBnsiOVQeuCUWDX1TuEMwu3KREp60h4l6rZul3z1bMRxpxTe qoat8ddR2KkX392ZdI5080P2BEs8xsEesYY5WXDRGdHrR4wjM+y8tyEtf9F/cmojwVO3DZ VE85XuxWeoFBd4RwtF/Cm4yGuEae8qZd8K9qDtRJBr/iEPFPzbATOix85V2X3A== 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=1702506591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7DjAkIATcE8BVxihd9OIUcJxoI7TOR+cNLSalnhF5Vo=; b=e/WZuZ4mUtrJbfCEFMAhGseIvD8PRXWHTFa5ixPF17piusPsWYPl91FbYySXnfAwxy8cda AHButk2xZh0fPFb/flxJTUbHIjME52IgM9HyuYFNrHima5sZC3EYHXJP7K76RqXzVHLLku 2YfiJcVD1ywr1DnYKGs+ZbUBSdS1GmyWZnajgTZzsexUveSTfE3FQcjiRjtiBjGTNTvVmd iL2ZmVjNNGV5QTEeQz+xOva5BrI8nVzZ3/vhconbV52WIAzGqS6Wpp0qeEOYdQySmowP4v fF9rnxaimgRzu1V7inbLJ22LGhPp5WUYsuaeqV8vPMoQ3WLS2a3HalFfphvp/Q== 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 4Sr9CM4RqPz1GYx; Wed, 13 Dec 2023 22:29:51 +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 3BDMTpeZ024603; Wed, 13 Dec 2023 22:29:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDMTpS0024600; Wed, 13 Dec 2023 22:29:51 GMT (envelope-from git) Date: Wed, 13 Dec 2023 22:29:51 GMT Message-Id: <202312132229.3BDMTpS0024600@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: ba1279da0f6d - stable/14 - libc: centralize {_,sig,}{set,long}jmp symbols List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ba1279da0f6d2eda7ea5e748951b10af013144ef Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ba1279da0f6d2eda7ea5e748951b10af013144ef commit ba1279da0f6d2eda7ea5e748951b10af013144ef Author: Brooks Davis AuthorDate: 2023-11-15 23:41:35 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 22:08:14 +0000 libc: centralize {_,sig,}{set,long}jmp symbols These symbols are universally exposed and documented so declare them centrally. Double- and triple-underscore versions exist on some platforms, but leave those alone for now. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D42616 (cherry picked from commit 1c656143be734de4b1e1bac27c0c48ef4d974510) --- lib/libc/aarch64/Symbol.map | 6 ------ lib/libc/amd64/Symbol.map | 6 ------ lib/libc/arm/Symbol.map | 6 ------ lib/libc/gen/Symbol.map | 6 ++++++ lib/libc/i386/Symbol.map | 6 ------ lib/libc/powerpc/Symbol.map | 6 ------ lib/libc/powerpc64/Symbol.map | 6 ------ lib/libc/riscv/Symbol.map | 6 ------ 8 files changed, 6 insertions(+), 42 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index 691c77f345b9..a02c71c82b7d 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -5,18 +5,12 @@ */ FBSD_1.0 { .mcount; - _setjmp; - _longjmp; fabs; __flt_rounds; fpgetmask; fpsetmask; __infinity; __nan; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; makecontext; }; diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 3ceb1cd9682a..ea3b7866b718 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -5,8 +5,6 @@ */ FBSD_1.0 { .mcount; - _setjmp; - _longjmp; fabs; __flt_rounds; fpgetmask; @@ -20,10 +18,6 @@ FBSD_1.0 { __nan; makecontext; rfork_thread; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; amd64_get_fsbase; amd64_get_gsbase; amd64_set_fsbase; diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 5a7aec7c4089..4be0a7b02964 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -5,17 +5,11 @@ */ FBSD_1.0 { __mcount; - _setjmp; - _longjmp; alloca; fabs; __infinity; __nan; makecontext; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; brk; sbrk; }; diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 1fa5478b7918..2b8195244734 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -217,6 +217,12 @@ FBSD_1.0 { group_from_gid; setdomainname; sethostname; + _setjmp; + _longjmp; + setjmp; + longjmp; + sigsetjmp; + siglongjmp; longjmperror; getmode; setmode; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index f2424a9b64c4..3b3df6b37202 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -5,8 +5,6 @@ */ FBSD_1.0 { .mcount; - _setjmp; - _longjmp; alloca; fabs; __flt_rounds; @@ -14,10 +12,6 @@ FBSD_1.0 { __infinity; makecontext; rfork_thread; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; brk; i386_clr_watch; i386_get_fsbase; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index ed5dd5884736..93e79fe96733 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -5,8 +5,6 @@ */ FBSD_1.0 { _mcount; - _setjmp; - _longjmp; fabs; __flt_rounds; fpgetmask; @@ -17,10 +15,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; brk; sbrk; }; diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index dabf6f4434c5..6af9a0103816 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -5,8 +5,6 @@ */ FBSD_1.0 { _mcount; - _setjmp; - _longjmp; fabs; __flt_rounds; fpgetmask; @@ -17,10 +15,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; brk; sbrk; }; diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 8067ddca10cd..2e0467744778 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -4,18 +4,12 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - _setjmp; - _longjmp; fabs; __flt_rounds; fpgetmask; fpsetmask; __infinity; __nan; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; makecontext; }; From nobody Wed Dec 13 22:29:52 2023 X-Original-To: dev-commits-src-all@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 4Sr9CP13s0z54QB4; Wed, 13 Dec 2023 22:29: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 4Sr9CN75Yjz3SgF; Wed, 13 Dec 2023 22:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702506593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+CMRIpY40jrrm930qt+yT34KtMLgOdOf437HYM88Sv0=; b=mT503OX1V+0onH5USkDC1ZyOCvkXqQrKQdYDT1L0mlELGnWhoyNvGJ3TAgAHrZvwe0V7Th E9Q0qtdsVcrH3vrHqN76/InVzvZp1GlYh30YlEKJwTzeziailHpDywsfxTTLGIWwH59zFS lKHN8i7UR/U+d5IXLCZENBF1yoGrZkvA8eE0Hz2SiOawnIIwq2CSH/j4yOBWLsb8I9S9K5 BPiOdrY9t1z0saofbdg8crIoFWIJY5zB7PJPmXC7LYgkP76UXO8ozgDdfPIgpiH5pFPVil UHeT3Tnyq7kvKRP/LbNDQmYmWCwOsb1GlQ8ybzi2bb8E4T8BFUo1nFyNxL2+DA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702506593; a=rsa-sha256; cv=none; b=LiwNsLcXR9nzf6VC2W3ENyRlbD1PD+fk/KCxG7WNjc7GYmMm8mnBpA9g/+eJh5EqcFwwOs aqX9mGDAqhK9PGLRGZji2wAT9S8E1jDBWNyk+Gs8ns8prrT9/qfh+9QWOwpqB0WdFxSiLQ stKj7PfGBL1jlkhLRCeg90WpuhZAm2H1J7Jh9Knguw8upDWrZxOEzNshOsJY+m/rAl+8bk wexOgDOwU/1Hjo+hx75rqsQGdC2gOQrfz81wFdeAq0Me3mlZFa2xPFfN/15N2/XwDSScYn iKaeZ4iqCI2jrYLtT5tfwdfyCKPCdHJTMhHu+vdjc+B5ur0Rlw/TPGt91Gylsw== 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=1702506593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+CMRIpY40jrrm930qt+yT34KtMLgOdOf437HYM88Sv0=; b=kvxGLK5y5jQ/iHL5sJCXqP4wDHTiXMYeTch/6xShYwXz3AAX6gY10wOjrYS+dn2ydSv3Wk ikpsCzTNUeVcwNVq4HvrRTFFdoHVys583V88uwny+ajSO1d8Sh+s4ILsv/Z9Xh/rfOfcvM qa75+NIK8zC4jmtZzQtq46Tf+U+skhmulkrwxS2qqaW7susqXeBe5v/6IDEEA1YjjHfeZj DCuJzXR3xQp6cCBLaSLQtMALkNhxpYtD2y5LC3VbxRaEsghHvEIB0qMJZz00uVJmsSA4D8 C0PTgCTscKRkan4bIBAThOcerP83sGJSdUGtaCDOZ4DS8eYOR6mXVCF3j4Aa9A== 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 4Sr9CN5RtPz1Gb4; Wed, 13 Dec 2023 22:29: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 3BDMTqb5024642; Wed, 13 Dec 2023 22:29:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDMTqLa024639; Wed, 13 Dec 2023 22:29:52 GMT (envelope-from git) Date: Wed, 13 Dec 2023 22:29:52 GMT Message-Id: <202312132229.3BDMTqLa024639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 01edb548c52e - stable/14 - libc: centralize makecontext symbols List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 01edb548c52ee7e3916f8f272d6b45e9e0f7fa6d Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=01edb548c52ee7e3916f8f272d6b45e9e0f7fa6d commit 01edb548c52ee7e3916f8f272d6b45e9e0f7fa6d Author: Brooks Davis AuthorDate: 2023-11-15 23:42:18 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 22:08:14 +0000 libc: centralize makecontext symbols Declare makecontext() and __makecontext() symbols centrally as they are always implemented. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D42617 (cherry picked from commit 5d79b5445e12873b316a04de352d12a02bfe2d53) --- lib/libc/aarch64/Symbol.map | 5 ----- lib/libc/amd64/Symbol.map | 2 -- lib/libc/arm/Symbol.map | 2 -- lib/libc/gen/Symbol.map | 2 ++ lib/libc/i386/Symbol.map | 2 -- lib/libc/powerpc/Symbol.map | 2 -- lib/libc/powerpc64/Symbol.map | 2 -- lib/libc/riscv/Symbol.map | 5 ----- 8 files changed, 2 insertions(+), 20 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index a02c71c82b7d..39cc43d12c26 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -11,9 +11,4 @@ FBSD_1.0 { fpsetmask; __infinity; __nan; - makecontext; -}; - -FBSDprivate_1.0 { - __makecontext; }; diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index ea3b7866b718..6c514097dd0e 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -16,7 +16,6 @@ FBSD_1.0 { fpsetround; __infinity; __nan; - makecontext; rfork_thread; amd64_get_fsbase; amd64_get_gsbase; @@ -43,7 +42,6 @@ FBSDprivate_1.0 { _getlogin; ___longjmp; - __makecontext; __longjmp; __signalcontext; signalcontext; diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 4be0a7b02964..5f6cc934410f 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -9,7 +9,6 @@ FBSD_1.0 { fabs; __infinity; __nan; - makecontext; brk; sbrk; }; @@ -34,7 +33,6 @@ FBSDprivate_1.0 { __aeabi_read_tp; ___longjmp; - __makecontext; __longjmp; signalcontext; _signalcontext; diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 2b8195244734..a21bf2430846 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -196,6 +196,7 @@ FBSD_1.0 { ldexp; lockf; lrand48; + makecontext; modf; mrand48; nice; @@ -577,4 +578,5 @@ FBSDprivate_1.0 { __fillcontextx; __fillcontextx2; __getcontextx_size; + __makecontext; }; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index 3b3df6b37202..ac2cb068d946 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -10,7 +10,6 @@ FBSD_1.0 { __flt_rounds; __nan; __infinity; - makecontext; rfork_thread; brk; i386_clr_watch; @@ -40,7 +39,6 @@ FBSDprivate_1.0 { _getlogin; ___longjmp; - __makecontext; __longjmp; __signalcontext; signalcontext; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index 93e79fe96733..9f6f88048984 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -14,7 +14,6 @@ FBSD_1.0 { fpsetround; __infinity; __nan; - makecontext; brk; sbrk; }; @@ -28,7 +27,6 @@ FBSDprivate_1.0 { _getlogin; _fpgetsticky; - __makecontext; __longjmp; signalcontext; __signalcontext; diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index 6af9a0103816..63638bbb8908 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -14,7 +14,6 @@ FBSD_1.0 { fpsetround; __infinity; __nan; - makecontext; brk; sbrk; }; @@ -24,7 +23,6 @@ FBSDprivate_1.0 { _getlogin; _fpgetsticky; - __makecontext; __longjmp; signalcontext; __signalcontext; diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 2e0467744778..79ee74e81a88 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -10,9 +10,4 @@ FBSD_1.0 { fpsetmask; __infinity; __nan; - makecontext; -}; - -FBSDprivate_1.0 { - __makecontext; }; From nobody Wed Dec 13 22:29:53 2023 X-Original-To: dev-commits-src-all@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 4Sr9CQ12prz54Prh; Wed, 13 Dec 2023 22:29: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 4Sr9CQ0W7Cz3T2T; Wed, 13 Dec 2023 22:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702506594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QQv0fHUbznz+5xtpDQMYh32SJnek3jCvv+6+aOWvHLo=; b=Ola7ySnylgLhuLI2jhtjUiw8xwyjIQiuEOVZrNqGvsGpGoPurAzB8gdgdrjKkYkLOT5VHM xmuK+9h8HoRtTnIC7/gzOGV2Fn0+xDUVnxEa185IaSi01koUzQss2i0jy0htinYryvk8r3 txPYB+Dt6+zykRdnbJc4xPcTYjZuxHlowb6Xp1wqelMRNZy0eaJ/HsPkisejw5flMstMhd BsIPO+EvOZfuwrQxFUF+BYkd7XYkw+tANZnBCKthYwNtfDyIjdWGIF6//v1BrNqla2y72A ch+o6tpyD1y343IVif9w/vgHZIrNF7kzZjzJK8Y78N72in6YoopY/0Nu9Ie3EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702506594; a=rsa-sha256; cv=none; b=bhCrgj1cYaa4+uNM7YHhhfs1G02tnC1dFBHw8w3UXdTpaE4lu8OAzV6YWule2wj5oPPZXo gbE6L5xy45LJwTtPE3bH3zb6TQjfCbBGACSr2dG+hNHJ4vkJ9V+S+zt3vyrzF5kaLm6bSA zc0v7bhbBWvYEeRaj7nqxrDpEHV1EqRp8EZlNheQ7HUms8lAbFlSDGIDGQ8/3awGnWXljF WI6uqRHhrR7MCbW0QvTpSJRdNYD6GCgG8dSNIb8ymKM2S1KQCXiIAHTdLlOiMoQbZIi3IV XmHcVHy3Mw4195yZSZD/UKCpxY3qEmbysqlHRkh7spA5Yw9XR3q2tBgoUx2LBQ== 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=1702506594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QQv0fHUbznz+5xtpDQMYh32SJnek3jCvv+6+aOWvHLo=; b=PcGiynAMv9Zq2Bv+tcLj6R4iuDZHdryb/GI4dW4cE62W63n/iR3oOTfP0N2Gxs209qt/Xd l2rRlTM97dbcfsmymZDvefaGrJ3M912F57PVkqbAJkxHX5kJ0ehdNpappkXAPu5OMmz875 vSdJWM0O/sZEnjLfZTi8/AIDnvTfDUTFDMyTLUJp56M5hxp5Bdl7KueLosl4B8XYZkP4Up dbxlU4ecdFoBTpcAadCRFqu4sFc813O7yr993SKEP9uU7a6YkZUp2he0FH1owZKz0cM1wL S+VpeURzljtRAn1VaFFPNngQFTAib+dRFnrY20Uk3nDO0+fXw8a1ftOfALxG9A== 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 4Sr9CP6hp3z1GD3; Wed, 13 Dec 2023 22: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 3BDMTrbp024689; Wed, 13 Dec 2023 22:29:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDMTrwc024686; Wed, 13 Dec 2023 22:29:53 GMT (envelope-from git) Date: Wed, 13 Dec 2023 22:29:53 GMT Message-Id: <202312132229.3BDMTrwc024686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: f695db9fbae9 - stable/14 - libc: centralize a few numeric symbols List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f695db9fbae9786aac0e8b925bef6b78f745c13a Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f695db9fbae9786aac0e8b925bef6b78f745c13a commit f695db9fbae9786aac0e8b925bef6b78f745c13a Author: Brooks Davis AuthorDate: 2023-11-15 23:42:37 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 22:08:14 +0000 libc: centralize a few numeric symbols fabs, __infinity, and __nan are universally implemented so declare them in gen/Symbol.map. We would also include __flt_rounds, but it's under FBSD_1.3 on arm so until that's gone we're stuck with it. Likewise, everyone but i386 implements fp[gs]etmask. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42618 (cherry picked from commit c7045186819dbc64c3f005cb1138a1948868cf5a) --- lib/libc/aarch64/Symbol.map | 3 --- lib/libc/amd64/Symbol.map | 3 --- lib/libc/arm/Symbol.map | 3 --- lib/libc/gen/Symbol.map | 3 +++ lib/libc/i386/Symbol.map | 3 --- lib/libc/powerpc/Symbol.map | 3 --- lib/libc/powerpc64/Symbol.map | 3 --- lib/libc/riscv/Symbol.map | 3 --- 8 files changed, 3 insertions(+), 21 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index 39cc43d12c26..cb4669039942 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -5,10 +5,7 @@ */ FBSD_1.0 { .mcount; - fabs; __flt_rounds; fpgetmask; fpsetmask; - __infinity; - __nan; }; diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 6c514097dd0e..aa2744b15a74 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -5,7 +5,6 @@ */ FBSD_1.0 { .mcount; - fabs; __flt_rounds; fpgetmask; fpgetprec; @@ -14,8 +13,6 @@ FBSD_1.0 { fpsetmask; fpsetprec; fpsetround; - __infinity; - __nan; rfork_thread; amd64_get_fsbase; amd64_get_gsbase; diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 5f6cc934410f..6fef9598e7ef 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -6,9 +6,6 @@ FBSD_1.0 { __mcount; alloca; - fabs; - __infinity; - __nan; brk; sbrk; }; diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index a21bf2430846..559c0252c338 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -107,6 +107,7 @@ FBSD_1.0 { execv; execvp; execvP; + fabs; fmtcheck; fmtmsg; fnmatch; @@ -181,10 +182,12 @@ FBSD_1.0 { endusershell; setusershell; getvfsbyname; + __nan; __isnan; isnan; __isnanf; isnanf; + __infinity; __isinf; isinf; __isinff; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index ac2cb068d946..66939e2eb55d 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -6,10 +6,7 @@ FBSD_1.0 { .mcount; alloca; - fabs; __flt_rounds; - __nan; - __infinity; rfork_thread; brk; i386_clr_watch; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index 9f6f88048984..5074596b3c09 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -5,15 +5,12 @@ */ FBSD_1.0 { _mcount; - fabs; __flt_rounds; fpgetmask; fpgetround; fpgetsticky; fpsetmask; fpsetround; - __infinity; - __nan; brk; sbrk; }; diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index 63638bbb8908..1bf990a52088 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -5,15 +5,12 @@ */ FBSD_1.0 { _mcount; - fabs; __flt_rounds; fpgetmask; fpgetround; fpgetsticky; fpsetmask; fpsetround; - __infinity; - __nan; brk; sbrk; }; diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 79ee74e81a88..bebcecb879f4 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -4,10 +4,7 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - fabs; __flt_rounds; fpgetmask; fpsetmask; - __infinity; - __nan; }; From nobody Wed Dec 13 22:29:54 2023 X-Original-To: dev-commits-src-all@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 4Sr9CR23zGz54Q2x; Wed, 13 Dec 2023 22:29: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 4Sr9CR1Kc4z3T14; Wed, 13 Dec 2023 22:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702506595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G9s8fEEwTxas+uDm8PINk/XObSqajQ9dfPEVes1wutY=; b=Lfgy0Uw7oC/LV3LopqOlBTn2ap3hpjNQ85qQAHXH+n7e56n6Fc9DmhVtQemE0cs6f1g/kJ WNq4E4Lk0LN/YlvgqkEf57zQxmdAIO6U7ZWgM1Ed8oCzs+G6JsWi8rReFHKh8mSG98ht9O 6B5eFQ0iQzgYVLbQRaIP9QqwdXu0PchSjoodrDdt4JWHdu4egEEGD+HBPMAPwi1FYT8yJR miRocJqrgAMuNRvAYjTrcBVjt6T17sL26Fw1Ky+G64qyB72XSTLAOGjPdgmjCvMoSX+3Wb e2jMklZ9PMnDg1UHCDxQH/J7Eldk0ZWrf+RztLyee7Vs7GAtp1SLdM7lMKWp9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702506595; a=rsa-sha256; cv=none; b=GbHvz4UjEHPW58gtk+Mc2Bef0VJJJikRyPQ+/MSdMnmUOh8s7tFFnjuaPHvWm6ySiuUkn5 m71Xd+QN25EkSyDX4igSwlZ2K0EKbzCNjF7reF7HcsaGNz+NVW9YqYWqg45A3bzp03vrhT QoKrRzzKy8EvL6oSwUODEr4K86yzIPbBIf1pGOW/6DGN3b30lzvPidCIFxikQn6pUbpTOI W+oMSrQdEmfI9WFSXpStG8iZBpJTjMMTk1sjfw+QZK2bzmQ+7/+Leq9SAfZFkObz8cn4ch R+IkL3WV/S2xKZMFj1mD6XSSGcFD89S/oxL89u1fREsBvjYsJmYMFsUzbpkJvA== 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=1702506595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G9s8fEEwTxas+uDm8PINk/XObSqajQ9dfPEVes1wutY=; b=HPphVsB3KDD1KaleviOY79iD1ZeiupdYNrxWwGHvSlnRobU6N89VlOI0H2AC+1vciy8ooY u4RK8uwfCghpxr++A+oeN1Zi16cuktl3K4yKbH+54fykuPbdzkeeZos2D56oZSULsZjSZ5 0xr2Sd7dfgWINTXfW0mg2zTwvCc/A5Bar1EUH7rmws2dOC1R0hR+tvKDUhIQ5b+85EL1mT Atdh0RFS3De6E7Hp+ctQcPIU4HQSVo+s8TSit3dGswSURbV4Wfb+L4Sg7yM+1ntctzQ0mV 0v1Vt/ppdYMLZJl8gJXH4J+3KAnYi5qRGUnHJtrEmmQObC6AaU6pv8POahUbZw== 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 4Sr9CR0MM9z1Gd7; Wed, 13 Dec 2023 22:29:55 +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 3BDMTs8D024741; Wed, 13 Dec 2023 22:29:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDMTss4024738; Wed, 13 Dec 2023 22:29:54 GMT (envelope-from git) Date: Wed, 13 Dec 2023 22:29:54 GMT Message-Id: <202312132229.3BDMTss4024738@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: acf0f65f52f0 - stable/14 - libc: remove unused stub vdso timecounter implementations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: acf0f65f52f0a4957ed09b0ceafdcc037a7dab90 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=acf0f65f52f0a4957ed09b0ceafdcc037a7dab90 commit acf0f65f52f0a4957ed09b0ceafdcc037a7dab90 Author: Brooks Davis AuthorDate: 2023-11-15 23:43:56 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 22:08:14 +0000 libc: remove unused stub vdso timecounter implementations All supported architectures have shared page support so remove this unused stub. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D42619 (cherry picked from commit 500bf0592cf1de1d26369efe3877d812f724f5c0) --- lib/libc/sys/trivial-vdso_tc.c | 45 ------------------------------------------ 1 file changed, 45 deletions(-) diff --git a/lib/libc/sys/trivial-vdso_tc.c b/lib/libc/sys/trivial-vdso_tc.c deleted file mode 100644 index 4a626b7f6cae..000000000000 --- a/lib/libc/sys/trivial-vdso_tc.c +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * Copyright (c) 2013 Konstantin Belousov - * - * 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 - -#pragma weak __vdso_gettc -int -__vdso_gettc(const struct vdso_timehands *th, u_int *tc) -{ - - return (ENOSYS); -} - -#pragma weak __vdso_gettimekeep -int -__vdso_gettimekeep(struct vdso_timekeep **tk) -{ - - return (ENOSYS); -} From nobody Wed Dec 13 22:58:50 2023 X-Original-To: dev-commits-src-all@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 4Sr9s45J5vz54S3r for ; Wed, 13 Dec 2023 22:59:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (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 4Sr9s43RDpz3ZRc for ; Wed, 13 Dec 2023 22:59:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2cc4029dc6eso4879991fa.1 for ; Wed, 13 Dec 2023 14:59:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1702508342; x=1703113142; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=QwzC3p8gDcgx4daDAByeEdJND6vuhGQ0qSnAGbKYgoc=; b=kuKve9BzVVwXvI04GYuH0/HAVfXhmtdDL4V1xod58G/izjahp6kEJHmyOJGjgUqxMc B9DIVWKUnGYVl5phzE59qS3g8+CBvqpYO+xEuTC/YqJo3jAvHZ4OGj2AYuGNE4xzFyPT ovWTvQe+5Bb0i6UGn8FxpmO9GtBPbFwS+Tt+TD9YgBiAeAfby7XM6HR8AV4bVSWnxlq5 Vz0ldAUX7lEKMH8VurWpqpKmO3LzYoJZa5w+JHM9eRDSn4dusnxPeRTVjC0cSGRigm0u qEiuJPiXajssdsnfFZP8+QIKRE4uOY7y3g7VySjA4bAn5aOifu3DJUa27mwZqBYuhfyf ShXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702508342; x=1703113142; 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=QwzC3p8gDcgx4daDAByeEdJND6vuhGQ0qSnAGbKYgoc=; b=WZd9eLDA/DtkXDb9wkFZUVsSPUcPFtFSKWg8gfuGwvw7TDY9y5Rm77f9HwgOsoJ3Gt VDuaai7GS4uCpTTmnLuhZSPaGtIGTTP3jYF6pG4SkgHhY0SAL2UfeERkxirjTQUQPLTl GM6e8H95lEp5xk+R9YPRh1Z89rHebTlSktZcrzFyfb0ZaOXvpx17tqqZjCnyug39QbpT qHWPkzGyflajgwFe/IicojXScfshN12CGFoZ4/nICKztyqY86Gcnx1znKRBPLvzXiVxq X2GpRGHMtm4h7yWzjnAR94E5gWYbCoQnI6aFvhebFaBBuGPIOvb8PhDFFE3BxdJ522f8 oYUg== X-Gm-Message-State: AOJu0Ywc9ymY7lWK1ObYrEujykOzy0rjpaPnIKMUBk/K+WTh+vPhfl3U nv4iJPXyKR5yuMLUQHxgzw5Bot0pkh9W7Pv7uRKtuQ== X-Google-Smtp-Source: AGHT+IFBRyJtvTiJqJseB+OB6J7CG25QzTl/P+8Pp/m3LSTBtZl7rtpgDAH3HP3Fgmy7O7Whh1JYJqpiiLIm/Ga5BSE= X-Received: by 2002:a05:6512:b26:b0:50c:180:2156 with SMTP id w38-20020a0565120b2600b0050c01802156mr5120370lfu.7.1702508341721; Wed, 13 Dec 2023 14:59:01 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202312070550.3B75o8WV066387@gitrepo.freebsd.org> <389AB29C-D5C0-4091-91ED-219F33351B35@freebsd.org> <20231207222716.obSthG6r@steffen%sdaoden.eu> <20231208010731.3hijmSTL@steffen%sdaoden.eu> <20231208171712.nWToJe0v@steffen%sdaoden.eu> In-Reply-To: From: Warner Losh Date: Wed, 13 Dec 2023 15:58:50 -0700 Message-ID: Subject: Re: git: b1c95af45488 - main - rc.conf: correct $ntp_leapfile_sources To: Xin LI Cc: FreeBSD Security Team , Xin Li , Philip Paeps , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000ef95a7060c6c1ca6" 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:2a00:1450::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4Sr9s43RDpz3ZRc --000000000000ef95a7060c6c1ca6 Content-Type: text/plain; charset="UTF-8" On Wed, Dec 13, 2023, 3:02 PM Xin LI wrote: > Hi! > > I've written a draft errata at > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275419#c27 . > > The commits to address the issue are: > > 832c63f5e07e6f960d051747ccb4358695a393ec > Updated > list (14: 2acec38b91fdf8520ca1ca6aebbde5c527040d14 > 13: b1d3826ededc09b271bef8aa9dae6a838ab05c8d) > 3b3195f6767b39eb33b3523134ef988931c9c86d > Don't > download without ntpd (14: 52369c5d29f5f291bfc98270cf13768633abe322 13: > 3ef596c6e80562710da09c16558d7351749ea143) > b1c95af45488bef649e9a84890e2414ff80b3a00 > Changed > to download IANA location > > Have we decided to go with the IANA location? If so we should include > philip's change above too. > IANA location is fine. This file is really only used as a backup when ntpd hasn't learned the truth from upstream ntp severs Warner I think we should issue an EN for at least the first two so FreeBSD systems > won't go to IETF until ~mid 2024. Can someone (other from myself :) from > secteam@ help with the actual EN process? > > Cheers, > --000000000000ef95a7060c6c1ca6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Dec 13, 2023, 3:02 PM Xin LI <delphij@gmail.com> wrote:
Hi!


The commits=C2=A0to ad= dress the issue are:

832c63f5e07e6f960d051747ccb4358695a393ec=C2=A0Updated list=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0(14: 2acec38b91fd= f8520ca1ca6aebbde5c527040d14 13:=C2=A0b1d3826ededc09b271bef8aa9dae6a838ab05= c8d)
3b3195f6= 767b39eb33b3523134ef988931c9c86d=C2=A0Don't download without ntpd (= 14:=C2=A052369c5d29f5f291bfc98270cf13768633abe322 13: 3ef596c6e80562710da09= c16558d7351749ea143)
b1c95af45488bef649e9a84890e2414ff80b3a00=C2=A0Changed to downlo= ad IANA location

Have we decided to go with the IANA location?= =C2=A0 If so we should include philip's change above too.

IANA l= ocation is fine. This file is really only used as a backup when ntpd hasn&#= 39;t learned the truth from upstream ntp severs=C2=A0

Warner

I think we should issue an EN for at least the first two so FreeBS= D systems won't go to IETF until ~mid 2024.=C2=A0 Can someone (other fr= om myself :) from secteam@ help with the actual EN process?

Cheers,<= /div>
--000000000000ef95a7060c6c1ca6-- From nobody Wed Dec 13 23:22:46 2023 X-Original-To: dev-commits-src-all@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 4SrBNR0dHYz54TWZ; Wed, 13 Dec 2023 23:22:47 +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 4SrBNQ6vmjz3bqv; Wed, 13 Dec 2023 23:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+FLyqdq2b4yfMtUk0brXcDo4hLys1Q98VH3xjJM4a54=; b=eZFz0OPEZmEbsCr/l0uBdb41hj9GJvRYi1a8xr6MN2r7r+2I3o/Ur2f8keq6G9gkPNKu4H cN3rxLCNrJzWR/LBCPCafY/lurAd4jOX0du/FY8X0K5lISNDCTlKOBe1GYvAe76Kh0dOKK nF2nC1+JXfL8EZdC0SrHgQIcKQeWmj8C3zeoWy2eW9ljLvbqhPcttFVGe2u372eMa6VQ/B pEAeCOm+RVr1lg1ur6Yd0ZUgyaSqiEn8lH1D74rNrHENSl/i1OjgdamwG0hB6fLbTFQE/D s6aGbhYyUNYd9JeWmEQOTgartedTOnbh5CR5m1RwzCtjlL0K9g3UKJNdfuNxQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509767; a=rsa-sha256; cv=none; b=UGMmh0a5FsuuzfDol96d+vCK1RT1+vr5FYM6YuB0tkv6CwEsKQY7kQluzLUeaJeVbip3G+ sE2J0zQWc1tMu0j2uF+gS8f9cpLiXCa4J0PSrFMH7bqL4cAYf88xd+tWuwABGrwvdYq4XU w8UuRfSGc2gu+tbtlRwR9mbLHa+TnBeW67UgHfpZdhZ+6Est3+kbTGYG7xKm453Ti8tVJv kji8VqY0FVNSGMbJ6o05b4AfQiEr9Y+rQ3t04RxSWRJQGdFj9UH8kTLzjTL1huSJBFGlqf EovF3QAjPGW1xN65PQYfxYP4zo7ND5kB5xpQYMh/w3ocQ7udi6KUFsMzDLYXXA== 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=1702509767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+FLyqdq2b4yfMtUk0brXcDo4hLys1Q98VH3xjJM4a54=; b=Mu7Drq3BSBskiyfJHazxmkmsgWwfBbkL/KQEPMeD74k9P42HPthLRgx+vBitk7Om1GyFh9 sKuZgBra36CPOxCtgfwumGV531YLqGLNv5k4npxC+QEQ4gMbwfUs6y4V/klacNn2nYbp/9 /1GH8a+w3aViXBCW90ggdRtHfzalrjXQziJncRgOHIJHjl2oD2NFU/UV3WcU9t0NFOwQNH O1iTy+IQ5GgonWEuEtk8CcMa8iCYPnI97p5BZZjiySsGOKL+qvQoqa1AkgyGLw/o6cd+0O qfGERMybmC621UPcXcelsj0eiYePh5FM+c3bcJZHMJ7L8UfdUV8TWlv2hXgufg== 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 4SrBNQ5y3jz1Hhc; Wed, 13 Dec 2023 23:22: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 3BDNMkj0024440; Wed, 13 Dec 2023 23:22:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMkv6024437; Wed, 13 Dec 2023 23:22:46 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:46 GMT Message-Id: <202312132322.3BDNMkv6024437@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 3ad2fd6fb11d - stable/14 - makesyscalls: don't make syscall.mk by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3ad2fd6fb11d36566aa9322bbc360eaf5232634f Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=3ad2fd6fb11d36566aa9322bbc360eaf5232634f commit 3ad2fd6fb11d36566aa9322bbc360eaf5232634f Author: Brooks Davis AuthorDate: 2023-11-18 00:48:14 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:07:06 +0000 makesyscalls: don't make syscall.mk by default We only want to produce syscall.mk for the main syscall table so default to not producing it (send it to /dev/null) and add a syscalls.conf to sys/kern to trigger the creation of sys/sys/syscall.mk. This eliminates the need for entries in other syscalls.conf files and is a cleaner pattern going forward. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D42663 (cherry picked from commit 54d487c4d01d68ef0ac03eae1fc574f7533d46f6) --- sys/amd64/linux/syscalls.conf | 1 - sys/amd64/linux32/syscalls.conf | 1 - sys/arm64/linux/syscalls.conf | 1 - sys/compat/freebsd32/syscalls.conf | 1 - sys/i386/linux/syscalls.conf | 1 - sys/kern/Makefile | 1 - sys/kern/syscalls.conf | 1 + sys/tools/makesyscalls.lua | 2 +- 8 files changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/amd64/linux/syscalls.conf b/sys/amd64/linux/syscalls.conf index b46b9e500553..2c6c1e45f8d9 100644 --- a/sys/amd64/linux/syscalls.conf +++ b/sys/amd64/linux/syscalls.conf @@ -3,7 +3,6 @@ sysproto="linux_proto.h" sysproto_h=_LINUX_SYSPROTO_H_ syshdr="linux_syscall.h" syssw="linux_sysent.c" -sysmk="/dev/null" syscallprefix="LINUX_SYS_" switchname="linux_sysent" namesname="linux_syscallnames" diff --git a/sys/amd64/linux32/syscalls.conf b/sys/amd64/linux32/syscalls.conf index 82ffa49fdbb8..e1b92f011d21 100644 --- a/sys/amd64/linux32/syscalls.conf +++ b/sys/amd64/linux32/syscalls.conf @@ -3,7 +3,6 @@ sysproto="linux32_proto.h" sysproto_h=_LINUX32_SYSPROTO_H_ syshdr="linux32_syscall.h" syssw="linux32_sysent.c" -sysmk="/dev/null" syscallprefix="LINUX32_SYS_" switchname="linux32_sysent" namesname="linux32_syscallnames" diff --git a/sys/arm64/linux/syscalls.conf b/sys/arm64/linux/syscalls.conf index b46b9e500553..2c6c1e45f8d9 100644 --- a/sys/arm64/linux/syscalls.conf +++ b/sys/arm64/linux/syscalls.conf @@ -3,7 +3,6 @@ sysproto="linux_proto.h" sysproto_h=_LINUX_SYSPROTO_H_ syshdr="linux_syscall.h" syssw="linux_sysent.c" -sysmk="/dev/null" syscallprefix="LINUX_SYS_" switchname="linux_sysent" namesname="linux_syscallnames" diff --git a/sys/compat/freebsd32/syscalls.conf b/sys/compat/freebsd32/syscalls.conf index af0409d8b3f1..055a041cf72a 100644 --- a/sys/compat/freebsd32/syscalls.conf +++ b/sys/compat/freebsd32/syscalls.conf @@ -3,7 +3,6 @@ sysproto="freebsd32_proto.h" sysproto_h=_FREEBSD32_SYSPROTO_H_ syshdr="freebsd32_syscall.h" syssw="freebsd32_sysent.c" -sysmk="/dev/null" syscallprefix="FREEBSD32_SYS_" switchname="freebsd32_sysent" namesname="freebsd32_syscallnames" diff --git a/sys/i386/linux/syscalls.conf b/sys/i386/linux/syscalls.conf index b46b9e500553..2c6c1e45f8d9 100644 --- a/sys/i386/linux/syscalls.conf +++ b/sys/i386/linux/syscalls.conf @@ -3,7 +3,6 @@ sysproto="linux_proto.h" sysproto_h=_LINUX_SYSPROTO_H_ syshdr="linux_syscall.h" syssw="linux_sysent.c" -sysmk="/dev/null" syscallprefix="LINUX_SYS_" switchname="linux_sysent" namesname="linux_syscallnames" diff --git a/sys/kern/Makefile b/sys/kern/Makefile index 839ad83b02e4..505175412661 100644 --- a/sys/kern/Makefile +++ b/sys/kern/Makefile @@ -2,7 +2,6 @@ # # Makefile for init_sysent -SYSENT_CONF= GENERATED= init_sysent.c \ syscalls.c \ systrace_args.c \ diff --git a/sys/kern/syscalls.conf b/sys/kern/syscalls.conf new file mode 100644 index 000000000000..d328b992a45d --- /dev/null +++ b/sys/kern/syscalls.conf @@ -0,0 +1 @@ +sysmk="../sys/syscall.mk" diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index a800de26a282..8a56310f0068 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -46,7 +46,7 @@ local config = { sysproto = "../sys/sysproto.h", sysproto_h = "_SYS_SYSPROTO_H_", syshdr = "../sys/syscall.h", - sysmk = "../sys/syscall.mk", + sysmk = "/dev/null", syssw = "init_sysent.c", syscallprefix = "SYS_", switchname = "sysent", From nobody Wed Dec 13 23:22:47 2023 X-Original-To: dev-commits-src-all@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 4SrBNS116Bz54TMq; Wed, 13 Dec 2023 23: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 4SrBNS0Tcnz3cGw; Wed, 13 Dec 2023 23:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GuIkdIPhBYO2emBifqboiilhBpVA1Mvujfi2fZUH0TA=; b=Du1H+XvjvCUEsOUYs691Vlb8YjD5rVYPVUwc8gSvYHeCBgqmuFXvvH2sqlQQECzFJUhWQV rqZduZUofc6O8Ryx3WFv5pyQURaJ2BVuoaOwLgP7kxvD5sZxJOJEfa/Jy5htMPOM7eOeT5 wXp+aB9OxAZlNTfkJyYtMaRy1/OEfbrFceyKXZx96SgMBjfBzHCrIAqPg21HD6uc2uyWUq mV7RgalS4UK0V2QXDbPu4oRjR2YvIx7lyOR0GQZfXHZd9bXxG1d+oKS5Ew0DaGlWLuZUU2 XfnDROdSwhd9oeUibAsM2s1G/VUMaDib0iI7G7cEtz9xsah0TyBu2WTGG5hxCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509768; a=rsa-sha256; cv=none; b=KACyTNTDXRE47eo3o4TCdV3SAEQnUuj2BjzN81YnbaPzXJaKjTJSnUdX3KCmV5vXpJfweV IaRrbc/amK7k7nRCIrvHkTqFX1fBz6GG6A6/O6ZSyQtEAJz8wzu16o38Uc1iN/EH+ceAte QItovwLw60332MqrrhQOLphTuYvOPXltoRREpJNzStGULPLWNLGd1YH3FBQfJaz02pHbgQ sJORWjgO30/MQKAjoK5OKv9gZMZeGm3py98TbqC/h05Txf71/5jxNJiU0xVbfak892+rSb 2S6BvqatdOheFtMLYdcyeguvJ4VY/1ZdZpsxkbNxiLirIi7CwvqG+PsmyidpiA== 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=1702509768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GuIkdIPhBYO2emBifqboiilhBpVA1Mvujfi2fZUH0TA=; b=BI2wQsCbKTIu2QfUiv5OGt4uTFBaXZloHyk7f2+X9ihi+tNAeMpwmPJcLJ510S4cX8JIlm V/DnZIIRRaXVP916aSrTZb+9w96mOeO+kyqbTlqWYOpkGiV0NeYKw3tgSWLTh0AlHLMM4C RTlY8BIdXxItyOU7PH17bOG0xGDnuCvcFI0epVV/EWNJD2bOLgvMJH4MH+XJRLiRuQXlVa TtPe/9LP0awSRBuwR1H3ghUKbe9YXmTZrdlVFwA1lsCWV9wIWx2wrzxIy5SoTXtSNLjbrY JTcV4SaoFpyhare/RYZ5RwSE0AEBiE5QMReYsr212njGquh2BXY0g+5ntfoSCQ== 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 4SrBNR6dWhz1Hhd; Wed, 13 Dec 2023 23:22:47 +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 3BDNMlA2024479; Wed, 13 Dec 2023 23:22:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMlOg024476; Wed, 13 Dec 2023 23:22:47 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:47 GMT Message-Id: <202312132322.3BDNMlOg024476@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 0f6bc5ca95b7 - stable/14 - vis: relocate _DIAGASSERT() define List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0f6bc5ca95b73f42d70b8879daf969304c9c21b6 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0f6bc5ca95b73f42d70b8879daf969304c9c21b6 commit 0f6bc5ca95b73f42d70b8879daf969304c9c21b6 Author: Brooks Davis AuthorDate: 2023-11-21 00:21:11 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:49 +0000 vis: relocate _DIAGASSERT() define Other similar files from NetBSD define it unconditionally as a local diff. Reviewed by: imp (as part of D42686) (cherry picked from commit db94e7c3f9a2344958667e756015393ad3124b3e) --- contrib/libc-vis/vis.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/libc-vis/vis.c b/contrib/libc-vis/vis.c index fc3b50d6c7a5..2f9eab25b480 100644 --- a/contrib/libc-vis/vis.c +++ b/contrib/libc-vis/vis.c @@ -61,7 +61,6 @@ __RCSID("$NetBSD: vis.c,v 1.83 2023/08/12 12:48:52 riastradh Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef __FBSDID __FBSDID("$FreeBSD$"); -#define _DIAGASSERT(x) assert(x) #endif #include "namespace.h" @@ -86,6 +85,8 @@ __weak_alias(strvisx,_strvisx) #include #include +#define _DIAGASSERT(x) assert(x) + /* * The reason for going through the trouble to deal with character encodings * in vis(3), is that we use this to safe encode output of commands. This From nobody Wed Dec 13 23:22:49 2023 X-Original-To: dev-commits-src-all@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 4SrBNT2q6Zz54TCC; Wed, 13 Dec 2023 23: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 4SrBNT1tCCz3cHY; Wed, 13 Dec 2023 23:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lxYk4SgVRWWpzBVIIRRSeO6TvWs3oeZJCdsjKj2gdQc=; b=CjAfdSFPADba61nWq6CAg9MuJiUKpiJSmdAwQiC+22MsTvXqe2Kdq2ySYeO4/JHOxJ2ujc JUWTlPT0V39eXWDxOCl9p3yG8DTRRbKebwMPwEYLZcKbjmdQZB5T3JFB/VHgICj/RV3r55 ItuKr64TB/OAFWnyrOtYJiFN6QKFZEwQNrWzzWL+I5mbRiQbO3f0nLb4tK/+o4PkDB0VyE CWskVvLFizeHRwtmzWoutJfWCsNN3nW1/OnhZJ7PUni+zPDdYRTQtad7aawjEIG/4en3Np oTTOqKWMS1vsIdb35EKiXMAsv4E3sW8Qnl5TINRugxiZVdycbxBWGVCdDrAdXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509769; a=rsa-sha256; cv=none; b=IAQienWrm5Ihih93NHzW4AoS+hVeR/Iu7AT90Gk8+ZWm2XmesFW6VVMaOOtA0tg2KI2AnY PEjee2bIsUAAYeB3EekViSZxqnYLihPenZkE5TB+sbR3EzScDHkFS+2oSQKbLoY4nmRQnn o1LC6tpORTet4sWs4BF0Lbl2sDoS3HIfutMLpbNCKqLusiyE7V4jG71MORd3wk9Sm+iSqG +NaDos3gChqjC5YiyA5UsdoQjLoOn4iqhJCfENVB4htDHSAul4qPozGHO4ROKnvpCjQAet 3+tmRyZWZhVpYZmglGzI7+0+kEDTe+vhX5/3bWoPynR3ERpr5DDWywy0W76p0Q== 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=1702509769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lxYk4SgVRWWpzBVIIRRSeO6TvWs3oeZJCdsjKj2gdQc=; b=xipU3kVMWUYV0r/jgOwZIMvXcCJDv1yfZmX0NpOEKpS42uYHDtPzv2SUh4eJyErtlHfc7d OKxO78RfqhXOTD92sylzl5vSG0t9aa5ugVq/HZalIsmoalonWDuJvWYC4FJg4NSz66DI8l gsIg2f/kYh1HyemzvsZimgF4/zX6THtJ4EqiN6ccTgfXOk/wY1tCygGosMQg4aggbRm45X mpp3hgrhqqqWvhXdeM/ANzXeXKPxAEFV34NMT2hyGZA4qRzZpLSqmtszGdwKcVjbKAcSZd gt29QkAykWIxznd2Qk7my6j0sNl1F9NxYYFei/hZMsiFGkg3TkoH0MKDf8EnMQ== 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 4SrBNT0p1sz1Hhf; Wed, 13 Dec 2023 23:22: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 3BDNMnHg024524; Wed, 13 Dec 2023 23:22:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMnuj024521; Wed, 13 Dec 2023 23:22:49 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:49 GMT Message-Id: <202312132322.3BDNMnuj024521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 52b970f98df5 - stable/14 - Remove __FBSDID from netbsd libc sources List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 52b970f98df5eb85d4e363e4d3b9aeb9ff6106ed Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=52b970f98df5eb85d4e363e4d3b9aeb9ff6106ed commit 52b970f98df5eb85d4e363e4d3b9aeb9ff6106ed Author: Brooks Davis AuthorDate: 2023-11-21 00:21:11 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:50 +0000 Remove __FBSDID from netbsd libc sources I added them per then-current practice when I imported them, but now they are just gratuious local diffs. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42686 (cherry picked from commit ea2be8ed283597062853935a5a29dfd67973044b) --- contrib/libc-pwcache/pwcache.c | 1 - contrib/libc-vis/unvis.c | 1 - contrib/libc-vis/vis.c | 3 --- 3 files changed, 5 deletions(-) diff --git a/contrib/libc-pwcache/pwcache.c b/contrib/libc-pwcache/pwcache.c index 321e43900bd1..180935c75b42 100644 --- a/contrib/libc-pwcache/pwcache.c +++ b/contrib/libc-pwcache/pwcache.c @@ -77,7 +77,6 @@ static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93"; __RCSID("$NetBSD: pwcache.c,v 1.31 2010/03/23 20:28:59 drochner Exp $"); #endif #endif /* LIBC_SCCS and not lint */ -__FBSDID("$FreeBSD$"); #include "namespace.h" diff --git a/contrib/libc-vis/unvis.c b/contrib/libc-vis/unvis.c index f290d8db271a..62a350bfa912 100644 --- a/contrib/libc-vis/unvis.c +++ b/contrib/libc-vis/unvis.c @@ -37,7 +37,6 @@ static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93"; __RCSID("$NetBSD: unvis.c,v 1.45 2022/04/19 20:32:15 rillig Exp $"); #endif #endif /* LIBC_SCCS and not lint */ -__FBSDID("$FreeBSD$"); #include "namespace.h" #include diff --git a/contrib/libc-vis/vis.c b/contrib/libc-vis/vis.c index 2f9eab25b480..623acfe92e1d 100644 --- a/contrib/libc-vis/vis.c +++ b/contrib/libc-vis/vis.c @@ -59,9 +59,6 @@ #if defined(LIBC_SCCS) && !defined(lint) __RCSID("$NetBSD: vis.c,v 1.83 2023/08/12 12:48:52 riastradh Exp $"); #endif /* LIBC_SCCS and not lint */ -#ifdef __FBSDID -__FBSDID("$FreeBSD$"); -#endif #include "namespace.h" #include From nobody Wed Dec 13 23:22:50 2023 X-Original-To: dev-commits-src-all@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 4SrBNW0JzHz54TCG; Wed, 13 Dec 2023 23:22: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 4SrBNV4KzCz3cJ3; Wed, 13 Dec 2023 23:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lprMWUfMTD7Yv8sJuK4q4ZHLoRJozbsGbVNJ1GHN5gE=; b=yqxZkNkyHEPi3yiy7gedxXDjUK32uz9aVcMNDtLKd4wJhdwxeFuA3h0ePgrLpEqDPUqB1b XXPrM5iaegEIFc0NYu4zDebAN6g4qmJx0r1zToQ3KLpAHletEr+jooCpKw2Hl5gzIN2ZXG bvSiOHi4TZSQ1gGVeEV5+ZX/g1kf2FQUyPomBTon7Y2YxXQKxb8wE7qkf78+LB0uDND6JG OCNwbUYPsQi5IUi3dCtTJI4Ihn7WikZMvufiuDV8ZE/tNl4C/z5zMBKK0jOP7cG7x3FpYP 9YicVLRAotPUivZ6Jxc1zWsljBDHbzqOwx21JSjccycNUw5GgCiKBI0ZEQqXwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509770; a=rsa-sha256; cv=none; b=H66RgGGspavPB4klioYXhhhnfap0QVjv6v43gvE5PPjpEW3MXFp5dHfMKeR/6MsFzElopd ErkK2LyisvMVR3d5fu66lpAjCPmjgDi5BVDQsndQLltqBDgP1jAYtXKK1x+OyiR0USzCYd yb/l3FXjc1Uk/fHuqUWTz3fC6E5KEPbBVw52oYttLjhEF/vvR19SOR/1ru6r3D5XpqV6hN 2BQ5uG7ywWyMg/iBSQSgyqTYZllPoYqLwhAieH1NNt/2PjoD/sYXgtBvyO1VJHpyJ3SKEo g4I4YuJ9bUltx7/oOjXYp8ZXJQlHno27IijzyA4+TT2uZhgAwZ/szb/QmJBCQw== 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=1702509770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lprMWUfMTD7Yv8sJuK4q4ZHLoRJozbsGbVNJ1GHN5gE=; b=UsQim60P3JquQCWYoygS5bLkwBEf4cfkSu5tadrY2rUlalLelhgRW+csLbx2w67VLK7+4T CCHgwUWc8L7e8YSx1JVFKDIGbWtDHARmpfBxIdhXMBtAlIbZlad59A0RxtJ/n3AHN8kOSZ T3hVKQANaO1ibRE5ElOaB52QJPmAe7f/q6rM8aW6EQT/tlp8WsbcmhRwgkEXzKVdS2kocL CMO3uW8TRLbboLuy3z8SCWXlZhD8xOhyaMpZlRi63Q/ctBSdPkLxsk11wjExh81SeBcr4g CN2J8VneQ1YUzI4jrkFUVepMe3/nG9kg9+J7JoTTYv7oZ508Mu19c05IcXRvSw== 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 4SrBNV1pV9z1Hhg; Wed, 13 Dec 2023 23:22: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 3BDNMoMu024566; Wed, 13 Dec 2023 23:22:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMoEQ024563; Wed, 13 Dec 2023 23:22:50 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:50 GMT Message-Id: <202312132322.3BDNMoEQ024563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: cbbe7c135b9b - stable/14 - pf: Remove __FBSDID() macro use List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cbbe7c135b9bf002729e53ca63c8e673c84fa70a Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=cbbe7c135b9bf002729e53ca63c8e673c84fa70a commit cbbe7c135b9bf002729e53ca63c8e673c84fa70a Author: Brooks Davis AuthorDate: 2023-11-21 00:21:11 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:50 +0000 pf: Remove __FBSDID() macro use These are local additions that no longer make sense with the transition to git. This partially reverts a10f530f936b7b2e3a19c406ae199b91a48f34d3. Reviewed by: kp, imp Differential Revision: https://reviews.freebsd.org/D42687 (cherry picked from commit bbde5c0725a5b34c456b3818cc69d17f22cef9f8) --- contrib/pf/authpf/authpf.c | 3 --- contrib/pf/ftp-proxy/ftp-proxy.c | 3 --- contrib/pf/pflogd/pflogd.c | 3 --- contrib/pf/pflogd/privsep.c | 3 --- 4 files changed, 12 deletions(-) diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c index 5ffa5b9cfe43..9858c1c50ced 100644 --- a/contrib/pf/authpf/authpf.c +++ b/contrib/pf/authpf/authpf.c @@ -16,9 +16,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include -__FBSDID("$FreeBSD$"); - #include #include #include diff --git a/contrib/pf/ftp-proxy/ftp-proxy.c b/contrib/pf/ftp-proxy/ftp-proxy.c index 04d749dd0fff..d8f8b8e67d1f 100644 --- a/contrib/pf/ftp-proxy/ftp-proxy.c +++ b/contrib/pf/ftp-proxy/ftp-proxy.c @@ -16,9 +16,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include -__FBSDID("$FreeBSD$"); - #include #include #include diff --git a/contrib/pf/pflogd/pflogd.c b/contrib/pf/pflogd/pflogd.c index 2b1b0df769a7..6df97f8b84f4 100644 --- a/contrib/pf/pflogd/pflogd.c +++ b/contrib/pf/pflogd/pflogd.c @@ -30,9 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -__FBSDID("$FreeBSD$"); - #include #include #include diff --git a/contrib/pf/pflogd/privsep.c b/contrib/pf/pflogd/privsep.c index 2e3895d2be77..326b4af6fe66 100644 --- a/contrib/pf/pflogd/privsep.c +++ b/contrib/pf/pflogd/privsep.c @@ -17,9 +17,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include -__FBSDID("$FreeBSD$"); - #include #include #include From nobody Wed Dec 13 23:22:51 2023 X-Original-To: dev-commits-src-all@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 4SrBNW4Gkvz54T4b; Wed, 13 Dec 2023 23:22: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 4SrBNW3kJQz3cFq; Wed, 13 Dec 2023 23:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w0EulyiqhWXUu3SqLKI9v5YtRyNIol2001gUCLekFHk=; b=dLxPNnvLasUZ/BK0qV9om13waD6JwZYr5BrCzA/xX1pWMSZbrDdbbp6prNU6Xk7xN8u8Xl PyBMKxzHEwGNqxn9uM/jg9oHjEPS6fUDdW8/04jjpBWjBuDDbAtTvSRGU0D8OBqW3q+5NM FMVbkGYuwBrqBK+w7ZtlfH4C+n6E0Ntbfph3fHr2H6Dj5i6l5zNcGppPLtcSnJr7sSYDOy U+MA6brkR5HeS6nJvxXx5SjRfxO/KJu9cbg1x8IB/zlmCbMbtlmAMLaXTQJ9zEPEUMj7Kl dHahl7HLrJDJTiPLRrg1l7qpY/epRXbeEYiuEXgrhaO0KkkQS49qCEjL8lxSAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509771; a=rsa-sha256; cv=none; b=w2tUPqke//5GY5KA+vCJrdVTgws6qfLyhEP5WY2Ar3ZuEbaycUiYdnI8e6ssB6DfJfPBZY MvMaqBop48r1m8hBnU7g0ZdeQhMdm6kEvssAdqN65ea/JwwI09inkRHsP0xwr1YbsudT0L yA7Y97WUyv9UcTb5s8OFO4TraV2I9p2dE9Dbvm92dioW9QWQfIsgUZ9pgtvJGSdfQNv6gS 6/QQPBHg5r9UmzJaYzDEGCMH6H/Cc0dCqDLugX/F9d8OJ335ygV96Ohhp0bN24/oQfKfc6 BAIBzk3QBrRES0IjWB+oPj+j1/52N1l6hvX9It9tI4Smfe43kFt5cgJNGOzV6Q== 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=1702509771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w0EulyiqhWXUu3SqLKI9v5YtRyNIol2001gUCLekFHk=; b=eg0O/XcIbtLqHdmZNs/ogTIe52tBKXUdXmOTzhIYkkPniOw53VxOKgN5MPLHZvWqlebOgY QqQ0nZFx+WDjm1mS+fi//FLDfetbnW5sLDjfEujCp9unbb+btAovQ17bhASlG6RIgk5rBU upyIZKETzA/4aPtlzsIKk8vubhrCBM1fIwVrtm+fEpcj4TaSc9UlaAeZCYllGHFwB6Opo4 s5hgvEDKsCoIzI+nLRTYkC/gwAcI3371/I/wm65Qabr8Wq+56x4k8O9p599F5XsRo4XOnK TdNP4cFvwqTvW35BBVEAGd8WjCl1X5AzPlzHN3eNLyTDWR2LL/0Qq/CgaK8Pjg== 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 4SrBNW2qXbz1Hr4; Wed, 13 Dec 2023 23:22:51 +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 3BDNMpIe024609; Wed, 13 Dec 2023 23:22:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMpSe024606; Wed, 13 Dec 2023 23:22:51 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:51 GMT Message-Id: <202312132322.3BDNMpSe024606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 5136530bc481 - stable/14 - ps: s/kern.max_pid/kern.pid_max/ in a comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5136530bc48106593baec841c093b551a1d3e67a Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5136530bc48106593baec841c093b551a1d3e67a commit 5136530bc48106593baec841c093b551a1d3e67a Author: Brooks Davis AuthorDate: 2023-11-21 22:43:14 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:50 +0000 ps: s/kern.max_pid/kern.pid_max/ in a comment Sponsored by: DARPA (cherry picked from commit 1818f3fda9c1a9a97f23b6dc6d0a63eb6f8d8b20) --- bin/ps/ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 3a7a0f54cca0..16d8a0a58d3c 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -112,7 +112,7 @@ static int needcomm; /* -o "command" */ static int needenv; /* -e */ static int needuser; /* -o "user" */ static int optfatal; /* Fatal error parsing some list-option. */ -static int pid_max; /* kern.max_pid */ +static int pid_max; /* kern.pid_max */ static enum sort { DEFAULT, SORTMEM, SORTCPU } sortby = DEFAULT; From nobody Wed Dec 13 23:22:52 2023 X-Original-To: dev-commits-src-all@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 4SrBNX5Kx2z54TZC; Wed, 13 Dec 2023 23:22: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 4SrBNX4tBgz3cKp; Wed, 13 Dec 2023 23:22:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uit3hnPowJyqvoDN5GyUiN4qowBuK5W1XjFhd+2MFHg=; b=QRWVuqg4VDOHeIYO8w0xCv6JcNEpYEqXR32LYupCbLmPkw8Pm/q214Vfvn5JsKeEbDGOxZ xsUzCi9iHdoEWt9a5epQgOL8Lzt887raFDnVPBFM4q0UHM5Z2LhMHZ2Vvox3YUeAByODdX ahW/UJut1VLjEcXb94uxTBSsIdkKgMwyqV5nyHwNc/OzHwuho9Q2QgTi5DSTWJjYdDpbio kHi8GFwYyWcZpB76IreiutEreTpE4W05/MqUXTxKl1bAjiRmMUpnYskJ3yIxGwOF+qJ+i6 BFfbkBvEX4KnW67pYBN/5k3UIXgoLuJc/gWphGq/n+FpGt2EJ3A8xUE4zpsJwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509772; a=rsa-sha256; cv=none; b=RdhiXvG0LjIboyFTVlhqj8E8VMSEq0cKVmwVKwWze+E0u7bCNrfNQeK5NTOOEkq2P43GqJ uuemYcK8UNS1Pn/4NBVAq+PLtDuuTKYKiIHTU6nMoHaiiyGitn1buQVRLZC6V0h4E2jlMl UuS7kA66dTaH2sojZXCteomfffq1tdObIuOYtBXKQQJUMsBYPSO7k15fe7jb1d5CbjUZZt 3UC3TTnK5T9/CY1HbjIU3YdIk68BzUQfoULYAQ1wLWXLoB64WOIuZCGZgBCzqmaA9N34+m DgAHoaixw9Sv6dkPY9EBZ/NsBNwJK3zRRx70v26AeQ1D8mKbUh6CSDi4XO1HBg== 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=1702509772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uit3hnPowJyqvoDN5GyUiN4qowBuK5W1XjFhd+2MFHg=; b=Q4VHdHd2JqNYuVRJazZgY5+mTdXQZfrGGJXEQSVeptrkPH/vQzVEE9vUCuzMOVnxqJbr/G 85DSkgIc21/Pwkxc8Q8+y17/33KcZcTrHyC78jgmwG2mFOpsNpF+VQTdDM/UETzOOtIteR F+BkKJmcI5jzwnb8u5Z+dPQwBAnvD7dK5n+fjlhT4mbqpwjC9savCxW/XBxSg3x/Ih+yvv Q/xHSqzizkMwreyPlRzlUUIp3dLxzMZ21TKjpbF+rW0Z+yMv0Z75XcOqtFJSI0FWED+qpB 3WxLRMj4ctyoH2FKhU/BRtVmZf3UFnA9qkrudTB5YYMU9LItYlf6qKNp1WW4pA== 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 4SrBNX3hksz1HZn; Wed, 13 Dec 2023 23:22: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 3BDNMq4F024661; Wed, 13 Dec 2023 23:22:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMqVd024658; Wed, 13 Dec 2023 23:22:52 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:52 GMT Message-Id: <202312132322.3BDNMqVd024658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 83c9481db962 - stable/14 - libc: remove some obsolete VCS data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 83c9481db962fd8a9e37fcabcc5ef15d1baf1704 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=83c9481db962fd8a9e37fcabcc5ef15d1baf1704 commit 83c9481db962fd8a9e37fcabcc5ef15d1baf1704 Author: Brooks Davis AuthorDate: 2023-11-21 22:46:43 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:50 +0000 libc: remove some obsolete VCS data These wide char support files were copied from the previous versions with expanded $FreeBSD$ strings in #if 0 blocks. Remove them and the scssid definitions in the same #if 0 blocks. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42688 (cherry picked from commit 9fc0ff9d85b1497b45a4c6d74e0bc7eea9dcf37b) --- lib/libc/locale/wcstoimax.c | 6 ------ lib/libc/locale/wcstoll.c | 6 ------ lib/libc/locale/wcstoull.c | 6 ------ lib/libc/locale/wcstoumax.c | 6 ------ lib/libc/stdio/vswprintf.c | 3 --- lib/libc/stdio/vswscanf.c | 6 ------ 6 files changed, 33 deletions(-) diff --git a/lib/libc/locale/wcstoimax.c b/lib/libc/locale/wcstoimax.c index 2c0997e7ea91..29e12f809812 100644 --- a/lib/libc/locale/wcstoimax.c +++ b/lib/libc/locale/wcstoimax.c @@ -34,12 +34,6 @@ * SUCH DAMAGE. */ -#if 0 -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "from @(#)strtol.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ -__FBSDID("FreeBSD: src/lib/libc/stdlib/strtoimax.c,v 1.8 2002/09/06 11:23:59 tjr Exp "); -#endif #include #include #include diff --git a/lib/libc/locale/wcstoll.c b/lib/libc/locale/wcstoll.c index 1712c6be3f56..01ee701af016 100644 --- a/lib/libc/locale/wcstoll.c +++ b/lib/libc/locale/wcstoll.c @@ -34,12 +34,6 @@ * SUCH DAMAGE. */ -#if 0 -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)strtoq.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ -__FBSDID("FreeBSD: src/lib/libc/stdlib/strtoll.c,v 1.19 2002/09/06 11:23:59 tjr Exp "); -#endif #include #include #include diff --git a/lib/libc/locale/wcstoull.c b/lib/libc/locale/wcstoull.c index b2edd3d9cea1..db77acd2a55d 100644 --- a/lib/libc/locale/wcstoull.c +++ b/lib/libc/locale/wcstoull.c @@ -34,12 +34,6 @@ * SUCH DAMAGE. */ -#if 0 -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)strtouq.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ -__FBSDID("FreeBSD: src/lib/libc/stdlib/strtoull.c,v 1.18 2002/09/06 11:23:59 tjr Exp "); -#endif #include #include #include diff --git a/lib/libc/locale/wcstoumax.c b/lib/libc/locale/wcstoumax.c index bf517965ba3e..6a3861618e3e 100644 --- a/lib/libc/locale/wcstoumax.c +++ b/lib/libc/locale/wcstoumax.c @@ -34,12 +34,6 @@ * SUCH DAMAGE. */ -#if 0 -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "from @(#)strtoul.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ -__FBSDID("FreeBSD: src/lib/libc/stdlib/strtoumax.c,v 1.8 2002/09/06 11:23:59 tjr Exp "); -#endif #include #include #include diff --git a/lib/libc/stdio/vswprintf.c b/lib/libc/stdio/vswprintf.c index d8c1d6720ebe..e90a05c4cc14 100644 --- a/lib/libc/stdio/vswprintf.c +++ b/lib/libc/stdio/vswprintf.c @@ -34,9 +34,6 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if 0 -__FBSDID("FreeBSD: src/lib/libc/stdio/vasprintf.c,v 1.16 2002/08/21 16:19:57 mike Exp "); -#endif #include #include #include diff --git a/lib/libc/stdio/vswscanf.c b/lib/libc/stdio/vswscanf.c index 8fecb81f96bb..be21f4a53f7b 100644 --- a/lib/libc/stdio/vswscanf.c +++ b/lib/libc/stdio/vswscanf.c @@ -37,12 +37,6 @@ * SUCH DAMAGE. */ -#if 0 -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)vsscanf.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ -__FBSDID("FreeBSD: src/lib/libc/stdio/vsscanf.c,v 1.11 2002/08/21 16:19:57 mike Exp "); -#endif #include #include #include From nobody Wed Dec 13 23:22:53 2023 X-Original-To: dev-commits-src-all@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 4SrBNY66BCz54TCN; Wed, 13 Dec 2023 23:22: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 4SrBNY5bR1z3cTc; Wed, 13 Dec 2023 23:22:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pwr02h8BKrX+WXiYYpPPC8Bg7awG+VBqsLHj+LcrPJw=; b=f1A2mn6RI9G8Lc7t06EzziOZAhynXrkCJ3gI7TGD3AH8u615jAheXOitS7V/ITJ6jMulWp fAH8aGdRfNOsFUPfasalCYS3x7HAzQsbbo5R/woV01Fdmpk2Hq6aycczlORCt36Mzk8q3f GQAR/VnqFE/dZgIJ79HehOucwvv4nX6y1doJBl+WOVl+BtQ4Irw/ZuVboRY/BjPzPY8IkD 3ifH73gHGGP+/71MTLhZFP8ebhskRR8XBK6HEcLN4LsbKrUQ/TtIgD+nT14gwc07qnQ9PU +sxpCU1WTW0Ojp1WuBJvYqrRaWKYcf8EDrDnypvltUIy5AFkGIqLXBA7xf5iUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509773; a=rsa-sha256; cv=none; b=ulZjuqcZjjVGRlO7/MHTuUBF5eFw9QBluJ3V2OB9zOl3EPEd2CyAACuW2A6YSjfCMC22bd BnDgJeNisUhm4LDVtbJEK983APC0LnFTM2vDXYIsPa5CX8WxqVfXqyZgVEvtjA3/s9SD6L sfJFcX6LfgC+TyvTAEl5dbu3uBWcvo9c3qNpMG8aGBa0c5153/9yesYseg3AwuxmL4Bytq SV5P+5eRgME0FYtslChjo3v7SPtOpHI30Df1JWbvrLoDZufe9b0onlWHwqyE/I7Y3RP22W H8MVv5DolyikMtMmXoLWZmmZJud4kZav8H557XTUm25sM4DONYWGHni1287V0w== 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=1702509773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pwr02h8BKrX+WXiYYpPPC8Bg7awG+VBqsLHj+LcrPJw=; b=ptlmGmMt0de76xNDRUWpwqaBsmCePV4ph0ikZfuvBaAwZ6KTuHVHZawY1EC/X/NQtqaco9 YmD8DILKqa5GTyDKDfnOwQs5i6pbLhbpGNDbte3rYdhBEeVtArCME45jVYe964A7ZA/9Ko Z9BVg07m1Kzy4D7SklJmC2jHBvoA1T+Wn9D2ypgvbbr6ndzz49D6r3uBUbcOkki5uxzFhK 6ONiBc7eHvAgoeP6FmS2Y2gyfBPJ4w3wSPiMPkUCIizavfgAMPQ79ZKuIoHrb7CX0MSPHz IXPAypIhIx5NhgboQYXX8CzoNyT4BD9+qs8dlSmh7KwORo67aujprmYFvlqi6w== 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 4SrBNY4SLRz1Hvm; Wed, 13 Dec 2023 23:22: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 3BDNMrvW024703; Wed, 13 Dec 2023 23:22:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMr7t024700; Wed, 13 Dec 2023 23:22:53 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:53 GMT Message-Id: <202312132322.3BDNMr7t024700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 74b8927f82b9 - stable/14 - bzip2: remove locally added __FBSDID List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 74b8927f82b92fd2f1832c84df266a2218061de3 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=74b8927f82b92fd2f1832c84df266a2218061de3 commit 74b8927f82b92fd2f1832c84df266a2218061de3 Author: Brooks Davis AuthorDate: 2023-11-27 16:47:22 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:50 +0000 bzip2: remove locally added __FBSDID Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42700 (cherry picked from commit ae477ca7da55f76d28859e1bd01cd1051e36f28f) --- contrib/bzip2/bzlib.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/contrib/bzip2/bzlib.c b/contrib/bzip2/bzlib.c index 9496d5abc951..2574a87b2932 100644 --- a/contrib/bzip2/bzlib.c +++ b/contrib/bzip2/bzlib.c @@ -28,9 +28,6 @@ bzBuffToBuffDecompress. Fixed. */ -#include -__FBSDID("$FreeBSD$"); - #include "bzlib_private.h" #ifndef BZ_NO_COMPRESS From nobody Wed Dec 13 23:22:54 2023 X-Original-To: dev-commits-src-all@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 4SrBNb1ct9z54TWg; Wed, 13 Dec 2023 23:22: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 4SrBNZ6HkBz3cSD; Wed, 13 Dec 2023 23:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+grV/hJABjZguOOcSml9XYnDIS/P094pFUMay8cXiQ=; b=dWaBBB2nGi8esqvY9J16FULQuIosJcKiNJ8xF6tYqHy8qUQo2STvnTHaN2mijxFrh+W9r4 6Irp6+Mo8evxMa00hzgo2UQIUL+Zez1bWwNc7UwWFQCXXdl3KafPXrYX55YONYHQNKSJIo OvyZKlrYpMLER6GEesUUwC+ogl8hc56c1qge+F7lVnbELF8g/izEE6GJE5u9tIHMpHCohL SlW8Y8G4G4kNkCfw6Nu4b2Q/FRfclNZoJi7tdHpPkCinaBcR2cp5dMuUg1ZXenFa1qgszk d+mmPGRCZrHFBXMEs08pUYVdeaSDUG2xjW7YxQrYew5v/VSJwJ4Ie0ppKEj6tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509774; a=rsa-sha256; cv=none; b=kEK0qkoNAb9x/J3AlCHP9sZjifk0uYj3ScT4yOjAmwQ8/Tkp6Gs+xEHzn0NdSCG9yk3iz+ +V1Nqt0dM2Rwk2/j8P+PI/SY1MJ2vc0OoysugFHdLDQhTeLSmbPGPD0zbkUwEK6katim0P 9u83Shi4EVvsPxuSJT9oinG7Da9QqLTE21Se2yb4mdmSIBKLewSuS9KIESkRAGjudBYH6t lyDQfpb5DFus9pZYqyR+lEZJhE3mtqFdZ4Uy6ztbh2H4v27AVHeFmqkqzX0xlSNyxHXT67 u+4njwhnimFZkLOtaElZZEfTZo3s8PemFzJk9uxH5TOjfdb3Qy4T4jqdjExOPw== 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=1702509774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+grV/hJABjZguOOcSml9XYnDIS/P094pFUMay8cXiQ=; b=jdiN+WAPD8VPNd5pGffGCBJnTarpN1hNlkA1ATOx/upWobG4/5f3yNgvC5yTn29iXzK4dm E3A2D2FQGQMgHKKhEGiG12+kbTcPTvhSej2IOiCyg+ChIRJxsKM9NI6A3ErfHO3tNiyaJy w/EZ0R+Lxe3Nsvru5mlXmdfTDtZtoyXRM3pwJN5SpBfBF6aesg9OUDMhxtgvaTAGqYhWZU VTMpkm8Gg0rjIIaUlXI2nMzkGxt/4Wdb9Yg7hKeh/UZCmOUcNOyoK908Izd801ZKgM6z2B Ze/YIhhh9UC1VExNrwLX4iAE6qvDFXyhvMSoajm0kg7KkQgXSt+u9h0BP43h/Q== 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 4SrBNZ5NRTz1HLk; Wed, 13 Dec 2023 23:22: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 3BDNMsPh024748; Wed, 13 Dec 2023 23:22:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMsIg024745; Wed, 13 Dec 2023 23:22:54 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:54 GMT Message-Id: <202312132322.3BDNMsIg024745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 4fe486b8c82a - stable/14 - ee: remove locally added __FBSDID List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4fe486b8c82a3f38b8162b5a3bace6e7b4e97659 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=4fe486b8c82a3f38b8162b5a3bace6e7b4e97659 commit 4fe486b8c82a3f38b8162b5a3bace6e7b4e97659 Author: Brooks Davis AuthorDate: 2023-11-27 16:47:26 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:50 +0000 ee: remove locally added __FBSDID Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42701 (cherry picked from commit 3f944f3bb75fe6eae6000511ad19799d90da54ba) --- contrib/ee/ee.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c index 21523ece9c70..072d26519f4c 100644 --- a/contrib/ee/ee.c +++ b/contrib/ee/ee.c @@ -54,9 +54,6 @@ | */ -#include -__FBSDID("$FreeBSD$"); - char *ee_copyright_message = "Copyright (c) 1986, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2009 Hugh Mahon "; From nobody Wed Dec 13 23:22:55 2023 X-Original-To: dev-commits-src-all@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 4SrBNc1fV0z54TCP; Wed, 13 Dec 2023 23:22: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 4SrBNc0343z3cM7; Wed, 13 Dec 2023 23:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dmlNIBTpYXzikjY5knP8pKuC6MBtMYl4mLOaqZH+Zwc=; b=F+uN6wFVyTyTytB+GlbCYbKEswuBVao50Ywdo/4PyGiFP76uk0fLNaOnhQCb6tgLeK4yDi tlRMHokcMizWO78gipMsQY83aOK6fDlEDQByKkkCDF13kh/gFClj1IXdzAtnleeczzjpKj pPsP7A4DXb3gZ5F0mnXVO78VGmu4OJDkLzLuYguM1yv/K6RZgmX8QY+HTcrjYoZ4KBegOf fDTonfSdxASXYO1RdDDiIuJZ79rVSMT19GeODqOiERXGbMQwlfp9l+RyIoiTvH3NT6H7r9 FrqCWcOgfmM1B67jopqGnj++0QtXDFsRzCfHM0hgcgEUyMAgJstfLSyRpWt4jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509776; a=rsa-sha256; cv=none; b=DFYyZ12sB0j2MkW0vAcUlNBEpOkfCL1cdieNgQWDGkFwq9w2UXVzBxkyrnRgXtcDySpvcv rAZBJDHfZ7IHNf4NMuUoZNptXrTsAfUaWrzWLqBbMPA1OscTgLDJoibfi+qWQzY7pqiF0N J7mYLLuuO8prw9uQVD6HU57cH05l1+AeHtQ12XtfT45o1BgY4YIXjxXud4N3JJLcQr+4Zd H0Hskel9FO6+4BxtYok43V7JMDdgOma5NbIp6v7Rn3gDpCmGlrqFxNvgRavoMfX4t6N5dp zzN7t1Zx+K9P7f7aEuY1+byo6hONfLXYXZ/rQVmnKOOwWUuDgkfhtNl5cf9xXw== 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=1702509776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dmlNIBTpYXzikjY5knP8pKuC6MBtMYl4mLOaqZH+Zwc=; b=RfFIx3zRxLnMAZfgdCk5ywlfjwfDOWH8rCHb6DUSchne4jI8xyQEf7skdrKDc+RzUGLbtq lamz5a1A0AehpFIRreVv59lQdvpY8IMtxkOIsTbl4br2BmIZm+s5CiBpBYEIb8YTJY85rJ jSn3KpMmperJbwnpndFct2UYhdL1UGDikihKTqmkLc5hhywywzt8lBU8P86Ik6/U9fC+zD FT9SnNMnhCm4W6fD7+SqkUIL+BpkW/tQwSuXHOiQY33ZBUGtvv5BjE1tOgI6iiKsU5bPjr Q9+ZNYfGmz1K79E31YA2hWEd7dqqPCI/Lri89who2erGSb+9nmZ9csf54IdjIw== 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 4SrBNb6GWJz1HLl; Wed, 13 Dec 2023 23:22:55 +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 3BDNMtoY024790; Wed, 13 Dec 2023 23:22:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMt5k024787; Wed, 13 Dec 2023 23:22:55 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:55 GMT Message-Id: <202312132322.3BDNMt5k024787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: a9bc0a5a0885 - stable/14 - pnpinfo: remove locally added __FBSDID List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a9bc0a5a08852a9572ea90ef6ab294b246705b5c Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a9bc0a5a08852a9572ea90ef6ab294b246705b5c commit a9bc0a5a08852a9572ea90ef6ab294b246705b5c Author: Brooks Davis AuthorDate: 2023-11-27 16:47:30 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:50 +0000 pnpinfo: remove locally added __FBSDID Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42702 (cherry picked from commit 78e6a1bd063884ae2c42256bcaee6824efbcfbc8) --- contrib/pnpinfo/pnpinfo.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/contrib/pnpinfo/pnpinfo.c b/contrib/pnpinfo/pnpinfo.c index e13ea0d99f57..29f4eb79cbc3 100644 --- a/contrib/pnpinfo/pnpinfo.c +++ b/contrib/pnpinfo/pnpinfo.c @@ -24,9 +24,6 @@ * SUCH DAMAGE. */ -#include -__FBSDID("$FreeBSD$"); - #include #include From nobody Wed Dec 13 23:22:56 2023 X-Original-To: dev-commits-src-all@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 4SrBNd1mb8z54TRD; Wed, 13 Dec 2023 23:22: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 4SrBNd1DbFz3cdM; Wed, 13 Dec 2023 23:22:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kjqw3i6TP73Cal5Vign0EXypTXnIcCuZlArY1/LIx1s=; b=cEsdI/5Jf2AJf+3oFs22H1NRwx0B6nhW+jhyfmFRiMAcPAmmugYry4ENt1A1tAgM1PRa8B 417IvEQA5E5id9MIi5HsG1Tx0hg0eexEnJ/AT3P09Lnc7hnpvrMQaHvn6bDwPSMXUwQXIa iIiKSnhvEWEaqV0JWb+wYLP+0yHBtpTNwQMrKf8cpD67yt+uW7e6xGA1lH7LdsmgyOmU/1 dsDX4/xZYC8BVo2ow7rsRg3REDOpz/U/jVk+OLnSsDnU/wqQN0WAwRXxQccEsVYUZ24sV5 0D8PlJOg1Cj+8R2WRS03HKd9DgpTPE9cDnGoS3SjSw1pIaAxNF/qcJqfyUUqjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509777; a=rsa-sha256; cv=none; b=YDNG4/J0ATLRqg/04fOJ14+9p0wzNcmMU8BLrBqOCzJ2/M708HGQ4XnkjsPzs8ADdW7gOa QJgY5rbyUqLKddx/Y5SC38LG8eQtWouRYYCUv7N/nohvq2Ghuy1apAcWzMZdXHBkTEDnTm 5YXFfyR3h7hjIsko9sfkjpALhuaSlZkSCYbIVzz7R/o5lUsQwz3pp4sWtRRGPBCdN+Ci4w 2CaVOelWArPt0ydQ14CudEqSGohNmNRSL33j4Ibdl78+XkSbALgickFF2kkBtwRtK5RiJC bjocS9BRx+AZaGZYwzXRga7VWRuhrycEBQuYP+Sz9NcU1l+7AwR2pARBZiOmyA== 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=1702509777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kjqw3i6TP73Cal5Vign0EXypTXnIcCuZlArY1/LIx1s=; b=IK5j/Dor0VSoKWqcZ/9tFRdgOUD3iD2s+YIVpGdJevpZskoYyQIzdWaIHB2k9TUOPHHTMm +BIVRBf0x7UmqN5sxBKjAlhysEDTibtvHnX3xwb1S19C6ejV1zJfJpr2RP35fOBbLMAXN/ JKYWMvPZ67whg6MyE2UT2xFdNn0cvZ3EwElHpHmKTnpRZRPdNHIN566Sfu31wnyrqxLSFR u+BHYq7TgIPeTHg+V35GYm1jAaMPqdqwkLD0OktTVmHcflOiBY2rgJGFYMTdBb3HNr2ADO PUKP0kdBrC7Oc4XpY1iRzdrPTcJ8E5YGCLlqV0rmdMt+VIRrNSAbP2s6taz3LQ== 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 4SrBNd0LQ1z1HZp; Wed, 13 Dec 2023 23:22: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 3BDNMu2g024832; Wed, 13 Dec 2023 23:22:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMul7024829; Wed, 13 Dec 2023 23:22:56 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:56 GMT Message-Id: <202312132322.3BDNMul7024829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 80e123a3c366 - stable/14 - smbfs: remove locally added __FBSDID List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 80e123a3c36654972d142fa4f81854aee14ae8c7 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=80e123a3c36654972d142fa4f81854aee14ae8c7 commit 80e123a3c36654972d142fa4f81854aee14ae8c7 Author: Brooks Davis AuthorDate: 2023-11-27 16:47:33 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:51 +0000 smbfs: remove locally added __FBSDID Differential Revision: https://reviews.freebsd.org/D42703 (cherry picked from commit a159b74a5d86e89eb86dcb5df3ec402e662012a6) --- contrib/smbfs/lib/smb/mbuf.c | 3 --- contrib/smbfs/lib/smb/nb_name.c | 3 --- contrib/smbfs/lib/smb/nls.c | 3 --- contrib/smbfs/lib/smb/rcfile.c | 3 --- 4 files changed, 12 deletions(-) diff --git a/contrib/smbfs/lib/smb/mbuf.c b/contrib/smbfs/lib/smb/mbuf.c index 729b5c53d11e..ac3b94524683 100644 --- a/contrib/smbfs/lib/smb/mbuf.c +++ b/contrib/smbfs/lib/smb/mbuf.c @@ -32,9 +32,6 @@ * $Id: mbuf.c,v 1.6 2001/02/24 15:56:04 bp Exp $ */ -#include -__FBSDID("$FreeBSD$"); - #include #include #include diff --git a/contrib/smbfs/lib/smb/nb_name.c b/contrib/smbfs/lib/smb/nb_name.c index a953ce0a0a9c..319d3c353b01 100644 --- a/contrib/smbfs/lib/smb/nb_name.c +++ b/contrib/smbfs/lib/smb/nb_name.c @@ -32,9 +32,6 @@ * $Id: nb_name.c,v 1.2 2001/08/22 03:31:36 bp Exp $ */ -#include -__FBSDID("$FreeBSD$"); - #include #include #include diff --git a/contrib/smbfs/lib/smb/nls.c b/contrib/smbfs/lib/smb/nls.c index b79d49c29c58..99693f3aba84 100644 --- a/contrib/smbfs/lib/smb/nls.c +++ b/contrib/smbfs/lib/smb/nls.c @@ -32,9 +32,6 @@ * $Id: nls.c,v 1.10 2002/07/22 08:33:59 bp Exp $ */ -#include -__FBSDID("$FreeBSD$"); - #include #include #include diff --git a/contrib/smbfs/lib/smb/rcfile.c b/contrib/smbfs/lib/smb/rcfile.c index 26a31d6f37ee..f97cb5abbf35 100644 --- a/contrib/smbfs/lib/smb/rcfile.c +++ b/contrib/smbfs/lib/smb/rcfile.c @@ -32,9 +32,6 @@ * $Id: rcfile.c,v 1.5 2001/04/16 12:46:46 bp Exp $ */ -#include -__FBSDID("$FreeBSD$"); - #include #include #include From nobody Wed Dec 13 23:22:58 2023 X-Original-To: dev-commits-src-all@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 4SrBNf3lwZz54TCW; Wed, 13 Dec 2023 23:22: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 4SrBNf2w60z3chg; Wed, 13 Dec 2023 23:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1gcSNonaTaYnEp5X0EhqVrNCe+UDMWBiXuY2FSIPuXI=; b=KKFpgcBbZigRvOduGrW/kAtc/aVk869By+WaHuCb44gMFUnZR08tS+bioGW+AsSyYr31xt TlEZNMzbS6v/7sQCzJqXtWpTtTYYBJl8tuF1O+XWlI4bq/BlAVnSIGfGevSvXJ99sNAL5H ++O5igrDFvM0eQTidiczDf4rd8wJ37qvOXIdqWxHbIsSutJl5v3z5+DZScrvA7yPskttod AdM0DXc1AynVz6oJWw5Q2egWm0WPsuqHa+H3KCmEYIkc6da3IHKOrSvW2bTIgzN/q8Y/O+ U3rkh0iKN0yloSkNbmjDi4jB7qdB5/wyrpNnWP9t1nusmhRDDl4IPjg/KKmb0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509778; a=rsa-sha256; cv=none; b=yY7olAYY3FAyzSz8jGWoLCilaOn/4LkBWTpFU0WMCDjRvf6ggwMSm/cwrMfXUxBQuNfV+3 uvfpjMvAbEpeMGdg10lFx/oay3uequgdXxnFulfgsgw+CIP3tAX/P0NNHQLsPQC10wVYiE 8u51Wg9hR7P5hD8M2otSh/BCAyeItYJBFj51XfrPxBMAmzlzLzKqQ5VE1fnv3+6m8pUyIs Uu4MDDOiIZ2s86p+wL0SqJvBBP/9JI3QaFiYNMikw35mVx/4rpzSeeKNpk+b04h/Bmoc6e sMpLmYls10DRnO3Mbv35c22f+LY7115Pog2GQ7S/1MdY19o+Iz4qikC0G5hOyA== 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=1702509778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1gcSNonaTaYnEp5X0EhqVrNCe+UDMWBiXuY2FSIPuXI=; b=rvhxTfNMzW6wPEs1sI12U2SLa8ke1ADTDlZ5XX8rLYMnmN9CiN1zMQ1zvbzE5jGIogbACi xncWDXhFcW36R1E+LN/7+R+WINSKp0+StQsTRAA5ondcmK7pz2/WsNCqHEG4fFEQi370io byBJWPUhVH01rt5DobHf8bx1ZiLNQQJ6bANpYzclHBSsGHo+VXrrnqCrlnxmUAfH3Y4lMo mTTva1x8ql15ZrGwdbnh+p3eEBWLMEIEUyxCvP4quGKtcj5RCQpQxVgB3Q4XTb7NnZk3pX PuZohdTHZVSsiYsoOqyqUVWQIbsTkKoCvyVKvZW0lfKIC62hE+FwtuKbTQsr7A== 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 4SrBNf1sMsz1Hhh; Wed, 13 Dec 2023 23:22: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 3BDNMwUv024880; Wed, 13 Dec 2023 23:22:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMwdV024876; Wed, 13 Dec 2023 23:22:58 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:58 GMT Message-Id: <202312132322.3BDNMwdV024876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 9d39900498eb - stable/14 - telnet: remove locally added __FBSDID List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9d39900498eb815570c8ffdc760c222d52041f48 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9d39900498eb815570c8ffdc760c222d52041f48 commit 9d39900498eb815570c8ffdc760c222d52041f48 Author: Brooks Davis AuthorDate: 2023-11-27 16:47:37 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:51 +0000 telnet: remove locally added __FBSDID This partially reverts 77b7cdf1999ee965ad494fddd184b18f532ac91a. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42704 (cherry picked from commit a3c858005cae175e277f6f6735ca9eaea7eaf3c3) --- contrib/telnet/libtelnet/auth.c | 3 --- contrib/telnet/libtelnet/enc_des.c | 2 -- contrib/telnet/libtelnet/encrypt.c | 4 ---- contrib/telnet/libtelnet/genget.c | 4 ---- contrib/telnet/libtelnet/getent.c | 4 ---- contrib/telnet/libtelnet/kerberos.c | 4 ---- contrib/telnet/libtelnet/kerberos5.c | 4 ---- contrib/telnet/libtelnet/krb4encpwd.c | 4 ---- contrib/telnet/libtelnet/misc.c | 4 ---- contrib/telnet/libtelnet/pk.c | 4 ---- contrib/telnet/libtelnet/read_password.c | 4 ---- contrib/telnet/libtelnet/rsaencpwd.c | 4 ---- contrib/telnet/libtelnet/sra.c | 4 ---- contrib/telnet/telnet/authenc.c | 2 -- contrib/telnet/telnet/commands.c | 2 -- contrib/telnet/telnet/main.c | 2 -- contrib/telnet/telnet/network.c | 2 -- contrib/telnet/telnet/ring.c | 2 -- contrib/telnet/telnet/sys_bsd.c | 2 -- contrib/telnet/telnet/telnet.c | 2 -- contrib/telnet/telnet/terminal.c | 2 -- contrib/telnet/telnet/utilities.c | 2 -- 22 files changed, 67 deletions(-) diff --git a/contrib/telnet/libtelnet/auth.c b/contrib/telnet/libtelnet/auth.c index 3488edd84b1c..fa1cfdc52869 100644 --- a/contrib/telnet/libtelnet/auth.c +++ b/contrib/telnet/libtelnet/auth.c @@ -33,9 +33,6 @@ static const char sccsid[] = "@(#)auth.c 8.3 (Berkeley) 5/30/95"; #endif /* not lint */ #endif -#include -__FBSDID("$FreeBSD$"); - /* * Copyright (C) 1990 by the Massachusetts Institute of Technology diff --git a/contrib/telnet/libtelnet/enc_des.c b/contrib/telnet/libtelnet/enc_des.c index 2c12ad5e0cf2..0cd9cb44ce05 100644 --- a/contrib/telnet/libtelnet/enc_des.c +++ b/contrib/telnet/libtelnet/enc_des.c @@ -32,8 +32,6 @@ static const char sccsid[] = "@(#)enc_des.c 8.3 (Berkeley) 5/30/95"; #endif /* not lint */ #endif -#include -__FBSDID("$FreeBSD$"); #ifdef ENCRYPTION # ifdef AUTHENTICATION diff --git a/contrib/telnet/libtelnet/encrypt.c b/contrib/telnet/libtelnet/encrypt.c index 398c7321510c..3c4a2ab1abc1 100644 --- a/contrib/telnet/libtelnet/encrypt.c +++ b/contrib/telnet/libtelnet/encrypt.c @@ -27,10 +27,6 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - #ifndef lint #if 0 static const char sccsid[] = "@(#)encrypt.c 8.2 (Berkeley) 5/30/95"; diff --git a/contrib/telnet/libtelnet/genget.c b/contrib/telnet/libtelnet/genget.c index e7b48f6b2af0..4bb119315746 100644 --- a/contrib/telnet/libtelnet/genget.c +++ b/contrib/telnet/libtelnet/genget.c @@ -27,10 +27,6 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - #ifndef lint #if 0 static const char sccsid[] = "@(#)genget.c 8.2 (Berkeley) 5/30/95"; diff --git a/contrib/telnet/libtelnet/getent.c b/contrib/telnet/libtelnet/getent.c index 3df81409a7d8..3be745e96c0b 100644 --- a/contrib/telnet/libtelnet/getent.c +++ b/contrib/telnet/libtelnet/getent.c @@ -27,10 +27,6 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - #ifndef lint #if 0 static char sccsid[] = "@(#)getent.c 8.2 (Berkeley) 12/15/93"; diff --git a/contrib/telnet/libtelnet/kerberos.c b/contrib/telnet/libtelnet/kerberos.c index 5f00fd40187f..a5dc774d54ca 100644 --- a/contrib/telnet/libtelnet/kerberos.c +++ b/contrib/telnet/libtelnet/kerberos.c @@ -27,10 +27,6 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - #ifndef lint static const char sccsid[] = "@(#)kerberos.c 8.3 (Berkeley) 5/30/95"; #endif /* not lint */ diff --git a/contrib/telnet/libtelnet/kerberos5.c b/contrib/telnet/libtelnet/kerberos5.c index 63f515310f9b..bc90ec9cfa6a 100644 --- a/contrib/telnet/libtelnet/kerberos5.c +++ b/contrib/telnet/libtelnet/kerberos5.c @@ -47,10 +47,6 @@ * or implied warranty. */ -#include - -__FBSDID("$FreeBSD$"); - #ifdef KRB5 #include diff --git a/contrib/telnet/libtelnet/krb4encpwd.c b/contrib/telnet/libtelnet/krb4encpwd.c index e87b5c41272e..345e24317228 100644 --- a/contrib/telnet/libtelnet/krb4encpwd.c +++ b/contrib/telnet/libtelnet/krb4encpwd.c @@ -27,10 +27,6 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - #ifndef lint static char sccsid[] = "@(#)krb4encpwd.c 8.3 (Berkeley) 5/30/95"; #endif /* not lint */ diff --git a/contrib/telnet/libtelnet/misc.c b/contrib/telnet/libtelnet/misc.c index ef5de4ee45e7..a514376e2b69 100644 --- a/contrib/telnet/libtelnet/misc.c +++ b/contrib/telnet/libtelnet/misc.c @@ -27,10 +27,6 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - #ifndef lint #if 0 static const char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/4/93"; diff --git a/contrib/telnet/libtelnet/pk.c b/contrib/telnet/libtelnet/pk.c index a3d17f396c64..a36733c4e73d 100644 --- a/contrib/telnet/libtelnet/pk.c +++ b/contrib/telnet/libtelnet/pk.c @@ -28,10 +28,6 @@ * */ -#include - -__FBSDID("$FreeBSD$"); - /* public key routines */ /* functions: genkeys(char *public, char *secret) diff --git a/contrib/telnet/libtelnet/read_password.c b/contrib/telnet/libtelnet/read_password.c index 0faaa09c57d5..37baf92e288d 100644 --- a/contrib/telnet/libtelnet/read_password.c +++ b/contrib/telnet/libtelnet/read_password.c @@ -27,10 +27,6 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - #ifndef lint #if 0 static char sccsid[] = "@(#)read_password.c 8.3 (Berkeley) 5/30/95"; diff --git a/contrib/telnet/libtelnet/rsaencpwd.c b/contrib/telnet/libtelnet/rsaencpwd.c index 9dcf4a658cf6..10225ac0070b 100644 --- a/contrib/telnet/libtelnet/rsaencpwd.c +++ b/contrib/telnet/libtelnet/rsaencpwd.c @@ -27,10 +27,6 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - #ifndef lint static char sccsid[] = "@(#)rsaencpwd.c 8.3 (Berkeley) 5/30/95"; #endif /* not lint */ diff --git a/contrib/telnet/libtelnet/sra.c b/contrib/telnet/libtelnet/sra.c index 4a759685ca42..abacda12b495 100644 --- a/contrib/telnet/libtelnet/sra.c +++ b/contrib/telnet/libtelnet/sra.c @@ -28,10 +28,6 @@ * */ -#include - -__FBSDID("$FreeBSD$"); - #ifdef SRA #ifdef ENCRYPTION #include diff --git a/contrib/telnet/telnet/authenc.c b/contrib/telnet/telnet/authenc.c index 593d061d125d..6fd4b9f4dd85 100644 --- a/contrib/telnet/telnet/authenc.c +++ b/contrib/telnet/telnet/authenc.c @@ -32,8 +32,6 @@ static const char sccsid[] = "@(#)authenc.c 8.1 (Berkeley) 6/6/93"; #endif #endif -#include -__FBSDID("$FreeBSD$"); #ifdef AUTHENTICATION #ifdef ENCRYPTION diff --git a/contrib/telnet/telnet/commands.c b/contrib/telnet/telnet/commands.c index dbc06a10b9c6..ca3460e455ad 100644 --- a/contrib/telnet/telnet/commands.c +++ b/contrib/telnet/telnet/commands.c @@ -32,8 +32,6 @@ static const char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95"; #endif #endif -#include -__FBSDID("$FreeBSD$"); #include #include diff --git a/contrib/telnet/telnet/main.c b/contrib/telnet/telnet/main.c index 8ebcc0a86259..973e2b09a58f 100644 --- a/contrib/telnet/telnet/main.c +++ b/contrib/telnet/telnet/main.c @@ -32,8 +32,6 @@ static const char sccsid[] = "@(#)main.c 8.3 (Berkeley) 5/30/95"; #endif #endif -#include -__FBSDID("$FreeBSD$"); #include #include diff --git a/contrib/telnet/telnet/network.c b/contrib/telnet/telnet/network.c index 9a62e8a94fab..438673ce3e0e 100644 --- a/contrib/telnet/telnet/network.c +++ b/contrib/telnet/telnet/network.c @@ -32,8 +32,6 @@ static const char sccsid[] = "@(#)network.c 8.2 (Berkeley) 12/15/93"; #endif #endif -#include -__FBSDID("$FreeBSD$"); #include #include diff --git a/contrib/telnet/telnet/ring.c b/contrib/telnet/telnet/ring.c index 138e3c661045..d0e194c7d413 100644 --- a/contrib/telnet/telnet/ring.c +++ b/contrib/telnet/telnet/ring.c @@ -32,8 +32,6 @@ static const char sccsid[] = "@(#)ring.c 8.2 (Berkeley) 5/30/95"; #endif #endif -#include -__FBSDID("$FreeBSD$"); /* * This defines a structure for a ring buffer. diff --git a/contrib/telnet/telnet/sys_bsd.c b/contrib/telnet/telnet/sys_bsd.c index fd57df7a88a3..01209782cdbb 100644 --- a/contrib/telnet/telnet/sys_bsd.c +++ b/contrib/telnet/telnet/sys_bsd.c @@ -32,8 +32,6 @@ static const char sccsid[] = "@(#)sys_bsd.c 8.4 (Berkeley) 5/30/95"; #endif #endif -#include -__FBSDID("$FreeBSD$"); /* * The following routines try to encapsulate what is system dependent diff --git a/contrib/telnet/telnet/telnet.c b/contrib/telnet/telnet/telnet.c index b6b2432ef3ec..a35ea40c4cd8 100644 --- a/contrib/telnet/telnet/telnet.c +++ b/contrib/telnet/telnet/telnet.c @@ -32,8 +32,6 @@ static const char sccsid[] = "@(#)telnet.c 8.4 (Berkeley) 5/30/95"; #endif #endif -#include -__FBSDID("$FreeBSD$"); #include diff --git a/contrib/telnet/telnet/terminal.c b/contrib/telnet/telnet/terminal.c index b42f861c6f30..dccfab410998 100644 --- a/contrib/telnet/telnet/terminal.c +++ b/contrib/telnet/telnet/terminal.c @@ -32,8 +32,6 @@ static const char sccsid[] = "@(#)terminal.c 8.2 (Berkeley) 2/16/95"; #endif #endif -#include -__FBSDID("$FreeBSD$"); #include #include diff --git a/contrib/telnet/telnet/utilities.c b/contrib/telnet/telnet/utilities.c index 36432e6a32f0..516c1e5e538a 100644 --- a/contrib/telnet/telnet/utilities.c +++ b/contrib/telnet/telnet/utilities.c @@ -32,8 +32,6 @@ static const char sccsid[] = "@(#)utilities.c 8.3 (Berkeley) 5/30/95"; #endif #endif -#include -__FBSDID("$FreeBSD$"); #define TELOPTS #define TELCMDS From nobody Wed Dec 13 23:22:59 2023 X-Original-To: dev-commits-src-all@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 4SrBNh1LNWz54TTY; Wed, 13 Dec 2023 23:23: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 4SrBNg3wYZz3d1V; Wed, 13 Dec 2023 23:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dm/BeSmkh8KZjktortXD36HKCDHTexb6ewYXbtNgVeM=; b=sOvfAtTBpL9SXaXa0zqVMbrTUQ2CXSXKXJo/WAJ9kVCbAP0plJIOajSywSjLc1xXiPMvaM 0DBXQGqoi/733LtJv2sJE+C/LKNk/YwCXuQAFlwq4P4sbfj5p8pXq0uOZK7fCzUJ4fJkOX tSMTOcM7K0y1IKU1wsmhfr1pj7wIK5EGehrytC0lmt+SyV3xwEvOoi0/khwHr7X/rXtK8T EhjH5QzCQJSdXy40uL56ZlyV6y3DCcZxl+QVH33KqGr1GZ88x6nUp1PW+kaEsk/upzG0+i 4OFup80+ZNuQgJPOO+PgLostmSTkjeUMhXxjq8q3BMyIjZWHwycVTBSu6Ggecw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509779; a=rsa-sha256; cv=none; b=pJwuz8tlPEIzLB8vMROnbw7JFbfpmBfrK8szSyGByxMQ8nCu7pBnoe7fgAgOhyb2YZbNmH p6TnHPrl9drTj01ZusLV1c9NkSGdQJOnI4Zw4tHcDP/VBLLl6ITju2FCpgYE/26K4WnBXC FWiQOucHnlLI4obtVTdZGKm6mOzwrBnuLL3s3AScN0Fm/eCMoQg2a+GbFemKXQzpdRSiVC mUuddPXft1Ivm/fY4FHTtPvQ/5wCvA9fGy/m4VEAvi7O5Rz02PWd+JdEXj9dY72Wh4ytgx CllA+hogLNLH3N3bo0l4uhnknFvs0cYFp5oxvQ74prrb3QsebyG1BwQqw5g7mw== 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=1702509779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dm/BeSmkh8KZjktortXD36HKCDHTexb6ewYXbtNgVeM=; b=UcgKhVvhJQT7lp310w72CdSpDylyjHaf4hwwLxa5rU2np/Qt+FZAQeYhSaXqFuLUnaZS4q KWJLNf53D3NgxEpYtoqJtGG7muppJ6rlwp3YfoHBWacUj8lQr3HXKIxLD2BORVfEoCTyrV iZAHr6tqb0OLZWtdbaEiv6KPIhnJqZr3Vb6CzFgRUsgOdTkBj/T6ra5nD8NMYPLPjwmKuz ntF4OinKc7nTpRfhc0UEz+nw+ChsnyY0oKsK+sD8Yrsxv3tRuAZwON3SGn7JBT0oxOI9+U IcVSVYruF7KCnByC4WOVLnicf3H9J8++HyVABPl+Dj558fhI+Ma72UhZ88Pp/g== 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 4SrBNg30MYz1J97; Wed, 13 Dec 2023 23:22: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 3BDNMxQq024923; Wed, 13 Dec 2023 23:22:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNMxIB024921; Wed, 13 Dec 2023 23:22:59 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:22:59 GMT Message-Id: <202312132322.3BDNMxIB024921@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: edcdfc5b681b - stable/14 - x86emu: remove localy added __FBSDID List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: edcdfc5b681be089fcb42fef0ed609ec96e2faf6 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=edcdfc5b681be089fcb42fef0ed609ec96e2faf6 commit edcdfc5b681be089fcb42fef0ed609ec96e2faf6 Author: Brooks Davis AuthorDate: 2023-11-27 16:47:41 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:08:51 +0000 x86emu: remove localy added __FBSDID This partially reverts 0a2e9846fdf3f3d42a9ee65d0d8669f6be11c879. Reviewed by: imp, delphij Differential Revision: https://reviews.freebsd.org/D42705 (cherry picked from commit 3faba3002f466e1bdad4767c55257e04433ee96b) --- sys/contrib/x86emu/x86emu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/contrib/x86emu/x86emu.c b/sys/contrib/x86emu/x86emu.c index 60a154952f27..44c322849754 100644 --- a/sys/contrib/x86emu/x86emu.c +++ b/sys/contrib/x86emu/x86emu.c @@ -32,9 +32,6 @@ * */ -#include -__FBSDID("$FreeBSD$"); - #include #include From nobody Wed Dec 13 23:23:00 2023 X-Original-To: dev-commits-src-all@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 4SrBNj0Fnsz54TRG; Wed, 13 Dec 2023 23:23: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 4SrBNh55xBz3d3d; Wed, 13 Dec 2023 23:23:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702509780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+EHxpfQ3l7hji1hi43GWdX6O1K6iKzNC08B+IAMutTA=; b=WhArmJ867fz/vImqRgdVXFmVcgfyzuHOUG0H5+DwzuGbthaKgV6Io8QAcC6f1v/Y0Xqlkp O7wdAdaW/CaYwJFsrePxDhht6zkWOq2C4i8OTY/TJTa4wcQoOc12rgTNhKYaXTIxL2+UJC TE7ckOyv3lfH7eONi1F42/LvD+REDHYFoBaYqTdCRtwji3O4lc/KWwJg5G2h3U6rQtEm3f ri/5PJdqj93lyeV00B9jZTukANAgucf/9+209SglrlVKp+6RWie7aCdkkfs6JxIJ/s223m +ZX69KnsIVEqqmhhel5LH/Q1pZP9DCQhaA+dboVp+u+RvkBr3pA2haNYnHDE7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702509780; a=rsa-sha256; cv=none; b=dhWmeCDh3z3cE4XxcEyv1djAIYFzDKp0ZpF//TGTzLp5Q4gDr1E2Pm3bHmuMNiwuy3NFku lpYB7uRbj5xiq2wSJKTatlF0amuk9z6oonvx8hkEDf8WnsN6lKZRfaofWfsZzcYeeeqz6S GB+4eDfF8Zn5nwVzwTfFK9t10ESSFA57ac0iU0tx10xug/1OoTeq+V5zQ7zH8MwUrQHTVH 7mCiS1TxDu/O4KTMqG2jr2Pt+wuZ8fu2czK+9R2cUQkd3XzU3zBhXqkcbyR8EJbn1OguOV mDmn1PYIiHccLBx0XG+VbL4uxX+BuTiURold+pMoe3JI18y5Vs5MEq7saGHtHA== 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=1702509780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+EHxpfQ3l7hji1hi43GWdX6O1K6iKzNC08B+IAMutTA=; b=pLEnDmXTdJ5AU9PzNHhbMDTZ5hW9OeP8RjGZN6XHpieSiywp2a0r0WAgrB1PR3hGkIbHRq 6HEVhnqKdzPC5w1Ol+ZLD06g8d482VEmjayqb8K7U9zoXBEyBa/6xFzNhAxZ8TofI2U3N/ Z3Lk0AFWsf/tJ3sb6rmWdKggSzRqqV+gJN7tFhZnMADbnGksr1aE20OTfjQOS5p7vbezaS bjd5aLRijQdbUOM9vfs1RXIQQH60u3m4QVLPeNPDizOJXcQd8QCfCAc+u7mu+NhsWvaw2m 3oRo679ANVkHLpVvklxEZbVEzXmWNo7s+wFbftqPxT6zWqUuiu+bMqTis8L7hg== 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 4SrBNh4CM4z1HyM; Wed, 13 Dec 2023 23:23: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 3BDNN0CD024974; Wed, 13 Dec 2023 23:23:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNN0qA024971; Wed, 13 Dec 2023 23:23:00 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:23:00 GMT Message-Id: <202312132323.3BDNN0qA024971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: cc77811bf02c - stable/14 - sysvipc: Fix 32-bit compat on !i386 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cc77811bf02c4a32c5303fc9de1e4596bbbc94e1 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=cc77811bf02c4a32c5303fc9de1e4596bbbc94e1 commit cc77811bf02c4a32c5303fc9de1e4596bbbc94e1 Author: Brooks Davis AuthorDate: 2023-12-01 20:48:29 +0000 Commit: Brooks Davis CommitDate: 2023-12-13 23:10:53 +0000 sysvipc: Fix 32-bit compat on !i386 The various time fields are time_t's which are only 32-bit on i386. Fixing the old versions is probably of little use, but it's more correct and in theory there could be powerpc binaries from 6.x. PR: 240035 Fixes: fbb273bc05bef Properly support for FreeBSD 4 32bit System V shared memory. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D42870 (cherry picked from commit 957f014dc076a7f74ed0c8c8699e6f39b55785e7) --- sys/compat/freebsd32/freebsd32_ipc.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_ipc.h b/sys/compat/freebsd32/freebsd32_ipc.h index e74f4659247f..4ff8af359428 100644 --- a/sys/compat/freebsd32/freebsd32_ipc.h +++ b/sys/compat/freebsd32/freebsd32_ipc.h @@ -43,8 +43,8 @@ struct semid_ds32 { struct ipc_perm32 sem_perm; uint32_t __sem_base; unsigned short sem_nsems; - int32_t sem_otime; - int32_t sem_ctime; + time32_t sem_otime; + time32_t sem_ctime; }; #ifdef _KERNEL @@ -73,9 +73,9 @@ struct msqid_ds32 { uint32_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; - int32_t msg_stime; - int32_t msg_rtime; - int32_t msg_ctime; + time32_t msg_stime; + time32_t msg_rtime; + time32_t msg_ctime; }; #ifdef _KERNEL @@ -95,9 +95,9 @@ struct shmid_ds32 { pid_t shm_lpid; pid_t shm_cpid; unsigned int shm_nattch; - int32_t shm_atime; - int32_t shm_dtime; - int32_t shm_ctime; + time32_t shm_atime; + time32_t shm_dtime; + time32_t shm_ctime; }; #ifdef _KERNEL @@ -142,9 +142,9 @@ struct semid_ds_old32 { struct ipc_perm_old32 sem_perm; uint32_t __sem_base; unsigned short sem_nsems; - int32_t sem_otime; + time32_t sem_otime; int32_t sem_pad1; - int32_t sem_ctime; + time32_t sem_ctime; int32_t sem_pad2; int32_t sem_pad3[4]; }; @@ -158,11 +158,11 @@ struct msqid_ds_old32 { uint32_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; - int32_t msg_stime; + time32_t msg_stime; int32_t msg_pad1; - int32_t msg_rtime; + time32_t msg_rtime; int32_t msg_pad2; - int32_t msg_ctime; + time32_t msg_ctime; int32_t msg_pad3; int32_t msg_pad4[4]; }; @@ -173,9 +173,9 @@ struct shmid_ds_old32 { pid_t shm_lpid; pid_t shm_cpid; int16_t shm_nattch; - int32_t shm_atime; - int32_t shm_dtime; - int32_t shm_ctime; + time32_t shm_atime; + time32_t shm_dtime; + time32_t shm_ctime; uint32_t shm_internal; }; From nobody Wed Dec 13 23:34:34 2023 X-Original-To: dev-commits-src-all@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 4SrBf32n7mz54TYR; Wed, 13 Dec 2023 23:34: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 4SrBf32Bnyz4CnH; Wed, 13 Dec 2023 23:34:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702510475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DR3hM2rkSxUMdwCSc5hRRbQxo5FlqIDYdyI+pV3rkts=; b=aUVwP6uZ7S4g/OKK3H9l47fPaJUxX/0cAUWxe7DmVZy2GCVowfOtpJuFBWZ86dwmw0WprS dQh23xVNcyLcoJczumqP73+b8aRpLq0ESYDK7X5fL3mOavdaPl54w7eprMMNwOJynMu4q0 FQ9iDVHiQptnL1Rl67I+vHYsp9F6jroTmxqsO4228kk+miURQZNQtZw9Dd+5p2a3SmSjFp 5VFcrIO/3PRp2W0rppOd+UyA2inWad2wqcb3pe7AWz5OB3KIkD/7WntDsTPXOW/E+R1tI0 f6/CyYXYXg18xqk28aQo8dRpFugnuZ+F5IxG74FjZcjzD4NYMXoXkoYLaworSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702510475; a=rsa-sha256; cv=none; b=PbcO5Zrs+xrIxxZAf0mxhB2Qs4S2xLLknyZgQmMdldUqXN7PcfRFl0IVQhFvaCjhq2FII9 6oUd99VTUWfZWDZ49N/0dXVFS3helAMun/xJbmQ4nAPewWcIKnnXSbsuUWRqVeFn+M2wE3 wjlM0icwUeNNBBD+U9hw+uB2ltTNpbJG7LyXNrf0KsYPQ2FDefsFha8YlhgT8207811QQd 8bQKuAiXsm59N6swzo+1uFA6RI5qcXeAhO6TqyarumH7kOaIVpPZjJkZE8DReg/drhVvGc 7SYezUxR+rhcwCj5kRht3WYZmQbaGTYY+nEdTAtE6iTYIepCCMWbn2x8FOYyxg== 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=1702510475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DR3hM2rkSxUMdwCSc5hRRbQxo5FlqIDYdyI+pV3rkts=; b=gdn6uakZHT14WTWolmFdxmZosu1d1LWFqppSXdBAE8FjktuFdBAjtgg7QFlUf5H9V+myIt D+M3251Hi7TXMrt89oWE9ktpkmdyx5cGHlYK/6reMlqfqoGdXIEXIQwdo2KnItVclV0ClI bjOEdVl8gOt3x0JojoqnQ+39IwJjPpof1rS/Nf6Lt1di7OyRAx1MIx9gblGUEX+taQXMfi b6psO90KXFqKmfnCT6GHKN30wsEyTDt6TR/i4IUtewiMxEeagH64wv1atTgdL7Ik+2LnpC hePOfRXYvdW75b1RAv9mhroMurXNb0swHVxh8yWoqrVl68SIzNYOMNT0BUNK3g== 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 4SrBf311Gpz1J9f; Wed, 13 Dec 2023 23:34: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 3BDNYYZD041714; Wed, 13 Dec 2023 23:34:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNYYTs041711; Wed, 13 Dec 2023 23:34:34 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:34:34 GMT Message-Id: <202312132334.3BDNYYTs041711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d3a8e9b43b4c - main - cp: Add tests for symbolic link case. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d3a8e9b43b4cef5b80e3845dfa8fd1fec6e568f9 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d3a8e9b43b4cef5b80e3845dfa8fd1fec6e568f9 commit d3a8e9b43b4cef5b80e3845dfa8fd1fec6e568f9 Author: Dag-Erling Smørgrav AuthorDate: 2023-12-13 23:33:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-13 23:33:37 +0000 cp: Add tests for symbolic link case. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D43054 --- bin/cp/tests/cp_test.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh index 52f33c93d31a..a9e419bb39a9 100755 --- a/bin/cp/tests/cp_test.sh +++ b/bin/cp/tests/cp_test.sh @@ -322,6 +322,34 @@ standalone_Pflag_body() atf_check -o inline:'Symbolic Link\n' stat -f %SHT baz } +atf_test_case symlink +symlink_body() +{ + echo "foo" >foo + atf_check cp -s foo bar + atf_check -o inline:"foo\n" cat bar + atf_check -o inline:"foo\n" readlink bar +} + +atf_test_case symlink_exists +symlink_exists_body() +{ + echo "foo" >foo + echo "bar" >bar + atf_check -s not-exit:0 -e match:exists cp -s foo bar + atf_check -o inline:"bar\n" cat bar +} + +atf_test_case symlink_exists_force +symlink_exists_force_body() +{ + echo "foo" >foo + echo "bar" >bar + atf_check cp -fs foo bar + atf_check -o inline:"foo\n" cat bar + atf_check -o inline:"foo\n" readlink bar +} + atf_init_test_cases() { atf_add_test_case basic @@ -343,4 +371,7 @@ atf_init_test_cases() atf_add_test_case sparse_to_dev atf_add_test_case sparse_trailing_hole atf_add_test_case standalone_Pflag + atf_add_test_case symlink + atf_add_test_case symlink_exists + atf_add_test_case symlink_exists_force } From nobody Wed Dec 13 23:41:58 2023 X-Original-To: dev-commits-src-all@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 4SrBpZ3jvqz54VC1; Wed, 13 Dec 2023 23:41: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 4SrBpZ3F7Wz4D8r; Wed, 13 Dec 2023 23:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702510918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z+e0b6uG/YkbIYQqtC8POkLXxg0uzdgBvMTTxprq6fQ=; b=DXQ/7voEis7mykEzHkXaewZjibiaTCr/YvyFGKpqrDtXYvG5CdvIJhzfk+Z99+1cas4Od4 hgtvPQ+/IXUAd0/WlhU73xX6aDAgFmMOvsGPeAZMDlOoHusxaWAQdlHD7nSMgdzpR1C0/f D/GCtv6tipcM5eAgqeKVUajJnsuI3FfqTgqZnIsptOwJv0bJUp5biKC/FXtuUeW3gA84dM 1A60UgjYJ+5MtgByMBQyrEFeY67vxwbdrmOE5U7rZ95WDZoRqWi/Io5s3Ec4QndS4h3Pkb tmE7qbRrTq3OZl7s8fOIfd/kh+noAU/6052UQDZSL17MwGiOSYOlCEm0PiSVYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702510918; a=rsa-sha256; cv=none; b=ogWQWjOPK4wLLGfaaYxmqO84EGE2XKyGF2ZRZp+vN/QqlJz9mJ+hQIVyy9ZOO5j73360PC tl15VjGWV1hcO7S+tDDmCSR/Z1h9JRBvtStCsaGbusXQBD09NHVjiwVBE/FK+PTYFULrME NdyzIf3tChIxsTIVkqFNmAof8pSzvcwekHbFC0s+dpampGRD0jkJlyB8/XaNGp1udBvauf +2UN71a+HR/Jp6X1UmDU/nldL175WakqjothrLCQCl0pdLCw+UACAwHq2mQIN7jZ72WYhD f7VZXb2y2kmsomi6Kf0q1OfSSeJNIM368A4V1QbbYdScOqPKS7eaNs8lhwx/Yw== 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=1702510918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z+e0b6uG/YkbIYQqtC8POkLXxg0uzdgBvMTTxprq6fQ=; b=RJ31u3avEmVPT7x0KDCwazA/GwMDy0I+PUCB29FY+IZyTJutSxzj315MMOxYdKTvJ1aqLI sQd9QGwIt+IQjsCVdKrBUApo/7yZ0wR7Oru5WOJt0tZufCd9Z3gYUeAbAlP+ffkfajsAGk YfF1JI4SHNqIBPFaPDH3ZenoldZfBaujvIAjuqNBWQgvmmttbuxhf4DdbPKrRutgVF+feb bTXJeePWEUgw+XPGjzpgYlGUew4I3WKfEZVQDoI+hjPW0MJGxmp7Q0s+2wMIwMZ0hNl9qx gwhAtXf5ZWgbgkcjsldJceDFAzh0O2/ExhKN3Ex2rsfg9SSG1I0Vpgm2BeSCMw== 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 4SrBpZ2Hq8z1JMq; Wed, 13 Dec 2023 23:41: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 3BDNfwZf057526; Wed, 13 Dec 2023 23:41:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNfwDU057523; Wed, 13 Dec 2023 23:41:58 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:41:58 GMT Message-Id: <202312132341.3BDNfwDU057523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d002316fd7bf - main - cp: Refactor the core logic. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d002316fd7bf0b359ea2f5518f3c10f6ad89a9ac Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d002316fd7bf0b359ea2f5518f3c10f6ad89a9ac commit d002316fd7bf0b359ea2f5518f3c10f6ad89a9ac Author: Dag-Erling Smørgrav AuthorDate: 2023-12-13 23:40:45 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-13 23:40:55 +0000 cp: Refactor the core logic. Rewrite `copy_file()` so the lflag and sflag are handled as early as possible instead of constantly checking that they're not set and then handling them at the end. This also opens the door to changing the failure logic at some future point (for instance, we might decide to fall back to copying if `errno` indicates that the file system does not support links). MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D43055 --- bin/cp/utils.c | 121 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 60 insertions(+), 61 deletions(-) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 3621c89dd2f2..891360604631 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -62,6 +62,11 @@ */ #define BUFSIZE_SMALL (MAXPHYS) +/* + * Prompt used in -i case. + */ +#define YESNO "(y/n [n]) " + static ssize_t copy_fallback(int from_fd, int to_fd) { @@ -119,7 +124,6 @@ copy_file(const FTSENT *entp, int dne) * modified by the umask.) */ if (!dne) { -#define YESNO "(y/n [n]) " if (nflag) { if (vflag) printf("%s not overwritten\n", to.p_path); @@ -139,70 +143,68 @@ copy_file(const FTSENT *entp, int dne) } if (fflag) { - /* - * Remove existing destination file name create a new - * file. - */ + /* remove existing destination file */ (void)unlink(to.p_path); - if (!lflag && !sflag) { - to_fd = open(to.p_path, - O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); - } - } else if (!lflag && !sflag) { - /* Overwrite existing destination file name. */ - to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); } - } else if (!lflag && !sflag) { + } + + rval = 0; + + if (lflag) { + if (link(entp->fts_path, to.p_path) != 0) { + warn("%s", to.p_path); + rval = 1; + } + goto done; + } + + if (sflag) { + if (symlink(entp->fts_path, to.p_path) != 0) { + warn("%s", to.p_path); + rval = 1; + } + goto done; + } + + if (!dne && !fflag) { + /* overwrite existing destination file */ + to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); + } else { + /* create new destination file */ to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, fs->st_mode & ~(S_ISUID | S_ISGID)); } - - if (!lflag && !sflag && to_fd == -1) { + if (to_fd == -1) { warn("%s", to.p_path); rval = 1; goto done; } - rval = 0; - - if (!lflag && !sflag) { - wtotal = 0; - do { - if (use_copy_file_range) { - wcount = copy_file_range(from_fd, NULL, - to_fd, NULL, SSIZE_MAX, 0); - if (wcount < 0 && errno == EINVAL) { - /* Prob a non-seekable FD */ - use_copy_file_range = 0; - } - } - if (!use_copy_file_range) { - wcount = copy_fallback(from_fd, to_fd); - } - wtotal += wcount; - if (info) { - info = 0; - (void)fprintf(stderr, - "%s -> %s %3d%%\n", - entp->fts_path, to.p_path, - cp_pct(wtotal, fs->st_size)); + wtotal = 0; + do { + if (use_copy_file_range) { + wcount = copy_file_range(from_fd, NULL, + to_fd, NULL, SSIZE_MAX, 0); + if (wcount < 0 && errno == EINVAL) { + /* probably a non-seekable descriptor */ + use_copy_file_range = 0; } - } while (wcount > 0); - if (wcount < 0) { - warn("%s", entp->fts_path); - rval = 1; } - } else if (lflag) { - if (link(entp->fts_path, to.p_path)) { - warn("%s", to.p_path); - rval = 1; + if (!use_copy_file_range) { + wcount = copy_fallback(from_fd, to_fd); } - } else if (sflag) { - if (symlink(entp->fts_path, to.p_path)) { - warn("%s", to.p_path); - rval = 1; + wtotal += wcount; + if (info) { + info = 0; + (void)fprintf(stderr, + "%s -> %s %3d%%\n", + entp->fts_path, to.p_path, + cp_pct(wtotal, fs->st_size)); } + } while (wcount > 0); + if (wcount < 0) { + warn("%s", entp->fts_path); + rval = 1; } /* @@ -211,16 +213,13 @@ copy_file(const FTSENT *entp, int dne) * or its contents might be irreplaceable. It would only be safe * to remove it if we created it and its length is 0. */ - - if (!lflag && !sflag) { - if (pflag && setfile(fs, to_fd)) - rval = 1; - if (pflag && preserve_fd_acls(from_fd, to_fd) != 0) - rval = 1; - if (close(to_fd)) { - warn("%s", to.p_path); - rval = 1; - } + if (pflag && setfile(fs, to_fd)) + rval = 1; + if (pflag && preserve_fd_acls(from_fd, to_fd) != 0) + rval = 1; + if (close(to_fd)) { + warn("%s", to.p_path); + rval = 1; } done: From nobody Wed Dec 13 23:55:00 2023 X-Original-To: dev-commits-src-all@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 4SrC5d0yrlz54VyW; Wed, 13 Dec 2023 23:55: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 4SrC5c64lsz4FhR; Wed, 13 Dec 2023 23:55:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702511700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SiEwWKp1mzCvteHOo4FiniV6vmqqnluCt9v9RMREXxk=; b=vRt/dosvfQqNdOiNWA2EHXfBUqQixyCrd+ZEcu0yMcD5DuMB4f5exHtWtUt7MlAb2rRmij cJPdOh7SPq6f6mKGbNs6Ss3fcZjRE/sNRpjk5lX/D4WSkSlEWz+lDQwcsHtMpQMHH8PlHI MVzm9rxmmUxjQPY+yNY3NP04OkwehBt35SY0UkWHC2ax4i5Y1SRD3KvGd+c0uMLBZEru+6 cxN9idKu5NuAUiEK09sf7YHsaLNIklz0CtG4VhkLVIxkh8Zwopiaw7bCEnCkeZQJ6UOA1d au88I2+lvt8WQZPIsDa0kohPWpV3lqmZNZbUL/ygAcrslZJTCdyl8hxFHyNtVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702511700; a=rsa-sha256; cv=none; b=ZgErKOxQnzoq5elHmVSzxjEFsbE7r0N4rcMOZh+Yf3Vgp4Kdp/dk1vL6oaouB5FR8r0B46 2Fl7EVXRfsXHGMrZLtVUIhHa38LczKVWFpHk/w+Wwm2pGEqgQmAc26A0o6OP+RDDS+MgVt 1AsdFCLl1DbVIG4EavA7secstwAydKcrr32AGXbYg6NCkJ4qavwp7yvED2V8Lf7Gp3G7QI g+KBrwu0XQ5TZlobojnzSPmRJAqpWscKL0JjlZDDP/DIArcS3Zv/ShpvCKn6ZlI4pSKl+Y t8akZ6y8BVjtLoGjLRvbS4Bc19T32s0UdPj8BCcirBXP5u7LKkZOQ6GH5g4x5Q== 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=1702511700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SiEwWKp1mzCvteHOo4FiniV6vmqqnluCt9v9RMREXxk=; b=TMaCiGO8EQVQoyQcrMZc/b0NinS1bIFO2K166q+y1k2gaLzhkgE67jUKcVeSvGM8w0nFI7 NE/DOu0QKL0deqfCtZ1eBRJz9mDMGx6mOgVFkz1glez8PqCUSHT2cdTkiA1O67Cf3LeLYp DyjAguU3z6i4QX6UUILEnLSrwUQQcOv5Nlx4tCOQdx9Z6BRh0E8Bv5fQOvwlSUQ1+JgibD wTfUk8oBHqP6hzZZTYRPtbTRqJhS3ZHTOGLQiBnuYsKJV3wRws9rA8K3mrXs/kbFzyOHbF TEsuN+XegXigGhO1M3XaXTqec+WmULQ8v9J8FyprfQU6acSskbmhUA03DOGLVg== 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 4SrC5c579cz1JPH; Wed, 13 Dec 2023 23:55: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 3BDNt05w075453; Wed, 13 Dec 2023 23:55:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDNt0so075450; Wed, 13 Dec 2023 23:55:00 GMT (envelope-from git) Date: Wed, 13 Dec 2023 23:55:00 GMT Message-Id: <202312132355.3BDNt0so075450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 59dba901f227 - main - bwn: remove unused ic_headroom List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59dba901f227420647e4856f03cb782a3375c220 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=59dba901f227420647e4856f03cb782a3375c220 commit 59dba901f227420647e4856f03cb782a3375c220 Author: Frank Hilgendorf AuthorDate: 2023-12-13 23:48:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-12-13 23:54:05 +0000 bwn: remove unused ic_headroom Unlike bwi(4), bwn(4) does not rely on ic_headroom (despite having it set) but splits the bwn_txhdr (first) segment into its own transaction. Remove ic_headroom to avoid net80211 troubles with not enough space in the mbuf around ieee80211_mbuf_adjust(). PR: 275616 MFC after: 3 days --- sys/dev/bwn/if_bwn.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c index 501bcc1e958e..742ed63a92aa 100644 --- a/sys/dev/bwn/if_bwn.c +++ b/sys/dev/bwn/if_bwn.c @@ -808,8 +808,6 @@ bwn_attach_post(struct bwn_softc *sc) /* call MI attach routine. */ ieee80211_ifattach(ic); - ic->ic_headroom = sizeof(struct bwn_txhdr); - /* override default methods */ ic->ic_raw_xmit = bwn_raw_xmit; ic->ic_updateslot = bwn_updateslot; From nobody Thu Dec 14 00:01:38 2023 X-Original-To: dev-commits-src-all@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 4SrCFN497rz54WBP; Thu, 14 Dec 2023 00:01:44 +0000 (UTC) (envelope-from philip@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 4SrCFN3jBPz4FtK; Thu, 14 Dec 2023 00:01:44 +0000 (UTC) (envelope-from philip@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512104; 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=3hkvf/YGUVQ+/UTQVJAJhL39eMaoPqgZX+82d3obuaQ=; b=tjYU5lOb94NU2NbZ3MzY1ulhYx2COzMq1NGnLSr6SG0k/3yXMmwtPC9yCcA+KloD+zG0Jk Irpd6bDZbUtGPofwWZfD461JGljRHuI3XpCRZ+f1siXzIyQxRAxV1taDczzJBjpR6fA6nQ b7a4pT1CSFeYjCcSCsaUV1FvPc88pItsJ4NOygltx9/hZjiv0fKAtv9fDZCnnJwRdsdjki LUXNrkpwnAaBRSHkfYmDrMAYbDsW/xV8bss+dIF83j2vTddKAU6Q/2k9h49ko/x4/JXDby GnwIAmK3JgP1Rvyd1lAxtvIl+jJ80BGYqd7rm0RWKjc1hDsbFXmDtfzaJPV0tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702512104; a=rsa-sha256; cv=none; b=pTD5ZpaLwA0iFCfKGjcmG1mDU4KHsuabtGAZyZdl805qJW5q60Z6k94Idro2679NFU5eKq hHtIYR7/UMUP8Bn3lVK9npV9nVNSKvmvP34Y+Eahy2oLkVAtPh4RpHtLdflPoefPBsocrO NHjA+WBagavlTEuB6sViVNBqi5eRt7WAjWF25uaX0n5dKxF/30TqkOwUItxx6vWi0qHax6 NdvXTpvVT2F/WmGYrngLtYmiTBsJ8x9UvxKt7DOJ3FzFx7Mj02VxbFwFSWPzVMXroGpVz6 kfCuC2N7UFWH78FZlyLsIjaPW3DyI4PAoFW5nE8/cG8L2gQDtjiMwATTGLIsHw== 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=1702512104; 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=3hkvf/YGUVQ+/UTQVJAJhL39eMaoPqgZX+82d3obuaQ=; b=J8ByQI9gVn6NVznKSr0E/pNjBhPtY9F9BkJ57kH/IA5rBLqaRkYQ/Af7I/MG8X1v7Cf7WB wXl1EAEP6/TOEag6XYzE2QH7TbVXPK1B8RAwIwKwyBt8MtA5C/Shv9mQYhRca65bvM/ktS xoaNG0eKgD7pR//3PLnqLUAaHFVFzXkqZ7A2BEk8CdhFL+5PNzhrQ5CoKaMzbipYRKHth1 GWIw+zWFtgwM2UhklV2R4cCngnqjEebLlvYQ51EsHfX2cS67JzbgyVnVhNqC+BJI6fiWO4 s8Yx19ORdhYPKJv43sjXLAC7yW9Ct57nGlToc68xVQyoS2E5w2cWz+aAFUcOiw== Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.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: philip/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SrCFN2WXZzbn; Thu, 14 Dec 2023 00:01:44 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 2571027C005A; Wed, 13 Dec 2023 19:01:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 13 Dec 2023 19:01:44 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelkedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffokfgjfhggtgesthdtmhdtredttdenucfhrhhomheprfhhihhl ihhpucfrrggvphhsuceophhhihhlihhpsehfrhgvvggsshgurdhorhhgqeenucggtffrrg htthgvrhhnpedvheehkefghfeiteehteduudeuhfdvgeettdeihfffleeuteeggeetuddt tddufeenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidqudduieeivdeivdegkedqvdefhedukedttdekqdhphh hilhhipheppehfrhgvvggsshgurdhorhhgsehtrhhouhgslhgvrdhish X-ME-Proxy: Feedback-ID: ia691475d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Dec 2023 19:01:41 -0500 (EST) From: Philip Paeps To: Xin LI Cc: FreeBSD Security Team , Xin Li , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Warner Losh Subject: Re: git: b1c95af45488 - main - rc.conf: correct $ntp_leapfile_sources Date: Thu, 14 Dec 2023 08:01:38 +0800 X-Mailer: MailMate (1.14r6010) Message-ID: In-Reply-To: References: <202312070550.3B75o8WV066387@gitrepo.freebsd.org> <389AB29C-D5C0-4091-91ED-219F33351B35@freebsd.org> <20231207222716.obSthG6r@steffen%sdaoden.eu> <20231208010731.3hijmSTL@steffen%sdaoden.eu> <20231208171712.nWToJe0v@steffen%sdaoden.eu> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; format=flowed On 2023-12-14 06:02:28 (+0800), Xin LI wrote: > I've written a draft errata at > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275419#c27 . Thanks. I think it's worth doing an EN for this, but I'd rather do it when the IANA leap-seconds.list file is updated. Otherwise we'll get complaints from folks who have installed the EN but note their leap-seconds.list still complains of imminent / past expiry. Regardless of whether we do an EN, I do think we should do an announcement (possibly signed by security-officer@) that the imminent expiry of leap-seconds.list is not an actual problem. No leap second will be introduced at the end of 2023. > Have we decided to go with the IANA location? If so we should include > philip's change above too. I believe IANA Is the best upstream for leap-seconds.list. IERS is really authoritative but there are copyright concerns (no public domain in France). NIST's version has no copyright concerns but is only available over FTP (and it's 2023. > I think we should issue an EN for at least the first two so FreeBSD > systems > won't go to IETF until ~mid 2024. Can someone (other from myself :) > from > secteam@ help with the actual EN process? I'll pick this up. Thanks for the draft! Philip -- Philip Paeps Senior Reality Engineer Alternative Enterprises From nobody Thu Dec 14 00:02:47 2023 X-Original-To: dev-commits-src-all@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 4SrCGk06Ttz54WS4; Thu, 14 Dec 2023 00:02:54 +0000 (UTC) (envelope-from bz@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 4SrCGj703Hz4GMk; Thu, 14 Dec 2023 00:02:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512173; 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=UOblTXyep7gynUOvTBDgNZ0mgxYwbMeoO9goGgDabWc=; b=YzfEI0mayNNOy69HqIChcw6Cy5cwhC5IYjDIqOt37tHauC3BYpVvCWobh41WsufhBUFPGP xE9lAq5Ukue1lPLHnL46GEybuTPFUnRHGBjBbTRKg6w31S4Mw1k4dQ2vQ0pJrKOXez0Ufj wiOzJr9g8E3HaMAwh+OtUvs/opdfltL/P+CmBRPqwWc08zQdYVwFRdTBkYffqTD57S9cGG FBtsjDhhEdICBHFGmZptA/d34PQVrl6rnR4U/tfuNzeouYnD6azE8JVq0PLT/q4ZlqoKmd j5TtmfZ9BpW/ulEnCwY4MI4l5QeU8VNh3vPQsV9Srz2DvCdOZQURrxaKtRAvwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702512173; a=rsa-sha256; cv=none; b=JE2DkBhqlkX6Kt/6MjdtP06FiYOGQ/luCMjZ3wkFtyv4n9pvMVivIV29Xq/q6Xz6bIhq5K L/rQ5VL8+8UeaO/LJzQJO709q/SlT0Ow4BfBlLKm77oWP0vXNzEW8myR+rqH0KbV2Dq6WX +zfy/KWxHEQwul34FY16p+rKnvdw1Tdkup7s2EU2yKy0+/Sg1lFr8WXX1kS7v/76QodQyQ a7MlTL9TiIjQ5r8i5nTxo86cPVNQd9hv939pY0P3GXpJPGIq4xx4sGBJt46GFlYBSk6VO3 gq6JLpfz3zMgcRQWUnlBCYVZqM28InwwFC1+qFQG3UJmcmoShpAsjgbDqMHltg== 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=1702512173; 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=UOblTXyep7gynUOvTBDgNZ0mgxYwbMeoO9goGgDabWc=; b=SRmc19y2LKQDVA7cFcEf6WKu2goXViJAkopfaDllz0fUJxpgJDaghRic8/+1KsFyGHF5ow BRENVLivlZLm3a5IQvc86Tu9T2/k2xRQr/y9O2tpIRoCl+xQk90Ue7mkjePG/hj3D+AQxd 3XIs7ychbbZJqIpXhn0Z4UTJVkD7tAQ131h2blbJnGaHsA2hxWqe6ZK5BU8bpuw3KWxRO9 PNaPXnWomo89jpyNQ6kfFKp7wEeEFrpZsV2xMZ54kMZ02Dmllhbk2XmuUyMielhC7WhUf4 M17XS9o/GqlqvhbdmpI8X/x9BBrXFPxFeaC9shme0A/31akpb5Ynbk+LKZA2qw== Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SrCGj4qXbz16g; Thu, 14 Dec 2023 00:02:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 7872F8D4A213; Thu, 14 Dec 2023 00:02:50 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 274D92D029D7; Thu, 14 Dec 2023 00:02:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id wsKRS1jIHi7G; Thu, 14 Dec 2023 00:02:47 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id A7E312D029D2; Thu, 14 Dec 2023 00:02:47 +0000 (UTC) Date: Thu, 14 Dec 2023 00:02:47 +0000 (UTC) From: "Bjoern A. Zeeb" To: =?UTF-8?Q?Jean-S=C3=A9bastienP=C3=A9dron?= cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 80446fc7b5e5 - main - linuxkpi: Move `struct kobject` code to `linux_kobject.c` In-Reply-To: <202312131828.3BDISjcm018932@gitrepo.freebsd.org> Message-ID: <1p234o1s-555q-o818-8307-or6n2p874079@SerrOFQ.bet> References: <202312131828.3BDISjcm018932@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1098556516-354143444-1702512167=:54546" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1098556516-354143444-1702512167=:54546 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Wed, 13 Dec 2023, Jean-SébastienPédron wrote: > The branch main has been updated by dumbbell: > > URL: https://cgit.FreeBSD.org/src/commit/?id=80446fc7b5e5d22e2bac28bc0474dbe2fec83e43 > > commit 80446fc7b5e5d22e2bac28bc0474dbe2fec83e43 > Author: Jean-Sébastien Pédron > AuthorDate: 2023-12-08 17:58:03 +0000 > Commit: Jean-Sébastien Pédron > CommitDate: 2023-12-13 18:18:46 +0000 > > linuxkpi: Move `struct kobject` code to `linux_kobject.c` > > [Why] > `linux_compat.c` is already too long. I will need to add `struct kset` > in a follow-up commit, so let's move the existing `struct kobject` code > to its own file. > > Reviewed by: manu > Approved by: manu > Differential Revision: https://reviews.freebsd.org/D43019 > --- > sys/compat/linuxkpi/common/include/linux/kobject.h | 2 + > sys/compat/linuxkpi/common/src/linux_compat.c | 190 ------------------ > sys/compat/linuxkpi/common/src/linux_kobject.c | 221 +++++++++++++++++++++ > sys/conf/files | 2 + > sys/modules/linuxkpi/Makefile | 1 + > 5 files changed, 226 insertions(+), 190 deletions(-) > > diff --git a/sys/compat/linuxkpi/common/include/linux/kobject.h b/sys/compat/linuxkpi/common/include/linux/kobject.h > index 6e59e0952d62..06d71faaa873 100644 > --- a/sys/compat/linuxkpi/common/include/linux/kobject.h > +++ b/sys/compat/linuxkpi/common/include/linux/kobject.h > @@ -154,4 +154,6 @@ kobject_uevent_env(struct kobject *kobj, int action, char *envp[]) > */ > } > > +void linux_kobject_kfree_name(struct kobject *kobj); This is not part of the Linux KPI but an internal function? If so this should go into an internal header in the src/ directory? > #endif /* _LINUXKPI_LINUX_KOBJECT_H_ */ > diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c > index b913ae602ab3..a493dc2538ec 100644 > --- a/sys/compat/linuxkpi/common/src/linux_compat.c > +++ b/sys/compat/linuxkpi/common/src/linux_compat.c > @@ -159,176 +159,6 @@ RB_GENERATE(linux_root, rb_node, __entry, panic_cmp); > INTERVAL_TREE_DEFINE(struct interval_tree_node, rb, unsigned long,, START, > LAST,, lkpi_interval_tree) > > -struct kobject * > -kobject_create(void) > -{ > - struct kobject *kobj; > - > - kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); > - if (kobj == NULL) > - return (NULL); > - kobject_init(kobj, &linux_kfree_type); > - > - return (kobj); > -} > - > - > -int > -kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list args) > -{ > - va_list tmp_va; > - int len; > - char *old; > - char *name; > - char dummy; > - > - old = kobj->name; > - > - if (old && fmt == NULL) > - return (0); > - > - /* compute length of string */ > - va_copy(tmp_va, args); > - len = vsnprintf(&dummy, 0, fmt, tmp_va); > - va_end(tmp_va); > - > - /* account for zero termination */ > - len++; > - > - /* check for error */ > - if (len < 1) > - return (-EINVAL); > - > - /* allocate memory for string */ > - name = kzalloc(len, GFP_KERNEL); > - if (name == NULL) > - return (-ENOMEM); > - vsnprintf(name, len, fmt, args); > - kobj->name = name; > - > - /* free old string */ > - kfree(old); > - > - /* filter new string */ > - for (; *name != '\0'; name++) > - if (*name == '/') > - *name = '!'; > - return (0); > -} > - > -int > -kobject_set_name(struct kobject *kobj, const char *fmt, ...) > -{ > - va_list args; > - int error; > - > - va_start(args, fmt); > - error = kobject_set_name_vargs(kobj, fmt, args); > - va_end(args); > - > - return (error); > -} > - > -static int > -kobject_add_complete(struct kobject *kobj, struct kobject *parent) > -{ > - const struct kobj_type *t; > - int error; > - > - kobj->parent = parent; > - error = sysfs_create_dir(kobj); > - if (error == 0 && kobj->ktype && kobj->ktype->default_attrs) { > - struct attribute **attr; > - t = kobj->ktype; > - > - for (attr = t->default_attrs; *attr != NULL; attr++) { > - error = sysfs_create_file(kobj, *attr); > - if (error) > - break; > - } > - if (error) > - sysfs_remove_dir(kobj); > - } > - return (error); > -} > - > -int > -kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...) > -{ > - va_list args; > - int error; > - > - va_start(args, fmt); > - error = kobject_set_name_vargs(kobj, fmt, args); > - va_end(args); > - if (error) > - return (error); > - > - return kobject_add_complete(kobj, parent); > -} > - > -void > -linux_kobject_release(struct kref *kref) > -{ > - struct kobject *kobj; > - char *name; > - > - kobj = container_of(kref, struct kobject, kref); > - sysfs_remove_dir(kobj); > - name = kobj->name; > - if (kobj->ktype && kobj->ktype->release) > - kobj->ktype->release(kobj); > - kfree(name); > -} > - > -static void > -linux_kobject_kfree(struct kobject *kobj) > -{ > - kfree(kobj); > -} > - > -static void > -linux_kobject_kfree_name(struct kobject *kobj) > -{ > - if (kobj) { > - kfree(kobj->name); > - } > -} > - > -const struct kobj_type linux_kfree_type = { > - .release = linux_kobject_kfree > -}; > - > -static ssize_t > -lkpi_kobj_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) > -{ > - struct kobj_attribute *ka = > - container_of(attr, struct kobj_attribute, attr); > - > - if (ka->show == NULL) > - return (-EIO); > - > - return (ka->show(kobj, ka, buf)); > -} > - > -static ssize_t > -lkpi_kobj_attr_store(struct kobject *kobj, struct attribute *attr, > - const char *buf, size_t count) > -{ > - struct kobj_attribute *ka = > - container_of(attr, struct kobj_attribute, attr); > - > - if (ka->store == NULL) > - return (-EIO); > - > - return (ka->store(kobj, ka, buf, count)); > -} > - > -const struct sysfs_ops kobj_sysfs_ops = { > - .show = lkpi_kobj_attr_show, > - .store = lkpi_kobj_attr_store, > -}; > - > static void > linux_device_release(struct device *dev) > { > @@ -518,26 +348,6 @@ class_create(struct module *owner, const char *name) > return (class); > } > > -int > -kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype, > - struct kobject *parent, const char *fmt, ...) > -{ > - va_list args; > - int error; > - > - kobject_init(kobj, ktype); > - kobj->ktype = ktype; > - kobj->parent = parent; > - kobj->name = NULL; > - > - va_start(args, fmt); > - error = kobject_set_name_vargs(kobj, fmt, args); > - va_end(args); > - if (error) > - return (error); > - return kobject_add_complete(kobj, parent); > -} > - > static void > linux_kq_lock(void *arg) > { > diff --git a/sys/compat/linuxkpi/common/src/linux_kobject.c b/sys/compat/linuxkpi/common/src/linux_kobject.c > new file mode 100644 > index 000000000000..ddd0a58660f1 > --- /dev/null > +++ b/sys/compat/linuxkpi/common/src/linux_kobject.c > @@ -0,0 +1,221 @@ > +/*- > + * Copyright (c) 2010 Isilon Systems, Inc. > + * Copyright (c) 2010 iX Systems, Inc. > + * Copyright (c) 2010 Panasas, Inc. > + * Copyright (c) 2013-2021 Mellanox Technologies, Ltd. > + * 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 unmodified, 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 ``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 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 > + > +struct kobject * > +kobject_create(void) > +{ > + struct kobject *kobj; > + > + kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); > + if (kobj == NULL) > + return (NULL); > + kobject_init(kobj, &linux_kfree_type); > + > + return (kobj); > +} > + > + > +int > +kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list args) > +{ > + va_list tmp_va; > + int len; > + char *old; > + char *name; > + char dummy; > + > + old = kobj->name; > + > + if (old && fmt == NULL) > + return (0); > + > + /* compute length of string */ > + va_copy(tmp_va, args); > + len = vsnprintf(&dummy, 0, fmt, tmp_va); > + va_end(tmp_va); > + > + /* account for zero termination */ > + len++; > + > + /* check for error */ > + if (len < 1) > + return (-EINVAL); > + > + /* allocate memory for string */ > + name = kzalloc(len, GFP_KERNEL); > + if (name == NULL) > + return (-ENOMEM); > + vsnprintf(name, len, fmt, args); > + kobj->name = name; > + > + /* free old string */ > + kfree(old); > + > + /* filter new string */ > + for (; *name != '\0'; name++) > + if (*name == '/') > + *name = '!'; > + return (0); > +} > + > +int > +kobject_set_name(struct kobject *kobj, const char *fmt, ...) > +{ > + va_list args; > + int error; > + > + va_start(args, fmt); > + error = kobject_set_name_vargs(kobj, fmt, args); > + va_end(args); > + > + return (error); > +} > + > +static int > +kobject_add_complete(struct kobject *kobj, struct kobject *parent) > +{ > + const struct kobj_type *t; > + int error; > + > + kobj->parent = parent; > + error = sysfs_create_dir(kobj); > + if (error == 0 && kobj->ktype && kobj->ktype->default_attrs) { > + struct attribute **attr; > + t = kobj->ktype; > + > + for (attr = t->default_attrs; *attr != NULL; attr++) { > + error = sysfs_create_file(kobj, *attr); > + if (error) > + break; > + } > + if (error) > + sysfs_remove_dir(kobj); > + } > + return (error); > +} > + > +int > +kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...) > +{ > + va_list args; > + int error; > + > + va_start(args, fmt); > + error = kobject_set_name_vargs(kobj, fmt, args); > + va_end(args); > + if (error) > + return (error); > + > + return kobject_add_complete(kobj, parent); > +} > + > +int > +kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype, > + struct kobject *parent, const char *fmt, ...) > +{ > + va_list args; > + int error; > + > + kobject_init(kobj, ktype); > + kobj->ktype = ktype; > + kobj->parent = parent; > + kobj->name = NULL; > + > + va_start(args, fmt); > + error = kobject_set_name_vargs(kobj, fmt, args); > + va_end(args); > + if (error) > + return (error); > + return kobject_add_complete(kobj, parent); > +} > + > +void > +linux_kobject_release(struct kref *kref) > +{ > + struct kobject *kobj; > + char *name; > + > + kobj = container_of(kref, struct kobject, kref); > + sysfs_remove_dir(kobj); > + name = kobj->name; > + if (kobj->ktype && kobj->ktype->release) > + kobj->ktype->release(kobj); > + kfree(name); > +} > + > +static void > +linux_kobject_kfree(struct kobject *kobj) > +{ > + kfree(kobj); > +} > + > +const struct kobj_type linux_kfree_type = { > + .release = linux_kobject_kfree > +}; > + > +void > +linux_kobject_kfree_name(struct kobject *kobj) > +{ > + if (kobj) { > + kfree(kobj->name); > + } > +} > + > +static ssize_t > +lkpi_kobj_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) > +{ > + struct kobj_attribute *ka = > + container_of(attr, struct kobj_attribute, attr); > + > + if (ka->show == NULL) > + return (-EIO); > + > + return (ka->show(kobj, ka, buf)); > +} > + > +static ssize_t > +lkpi_kobj_attr_store(struct kobject *kobj, struct attribute *attr, > + const char *buf, size_t count) > +{ > + struct kobj_attribute *ka = > + container_of(attr, struct kobj_attribute, attr); > + > + if (ka->store == NULL) > + return (-EIO); > + > + return (ka->store(kobj, ka, buf, count)); > +} > + > +const struct sysfs_ops kobj_sysfs_ops = { > + .show = lkpi_kobj_attr_show, > + .store = lkpi_kobj_attr_store, > +}; > diff --git a/sys/conf/files b/sys/conf/files > index 377d65926462..bf951d789de3 100644 > --- a/sys/conf/files > +++ b/sys/conf/files > @@ -4567,6 +4567,8 @@ compat/linuxkpi/common/src/linux_i2cbb.c optional compat_linuxkpi \ > compile-with "${LINUXKPI_C}" > compat/linuxkpi/common/src/linux_interrupt.c optional compat_linuxkpi \ > compile-with "${LINUXKPI_C}" > +compat/linuxkpi/common/src/linux_kobject.c optional compat_linuxkpi \ > + compile-with "${LINUXKPI_C}" > compat/linuxkpi/common/src/linux_kthread.c optional compat_linuxkpi \ > compile-with "${LINUXKPI_C}" > compat/linuxkpi/common/src/linux_lock.c optional compat_linuxkpi \ > diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile > index bf40d64de9df..692f69c1f4e1 100644 > --- a/sys/modules/linuxkpi/Makefile > +++ b/sys/modules/linuxkpi/Makefile > @@ -14,6 +14,7 @@ SRCS= linux_compat.c \ > linux_i2c.c \ > linux_i2cbb.c \ > linux_kmod.c \ > + linux_kobject.c \ > linux_kthread.c \ > linux_lock.c \ > linux_netdev.c \ > -- Bjoern A. Zeeb r15:7 --1098556516-354143444-1702512167=:54546-- From nobody Thu Dec 14 00:06:48 2023 X-Original-To: dev-commits-src-all@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 4SrCMJ3DdXz54WT7; Thu, 14 Dec 2023 00:06:52 +0000 (UTC) (envelope-from bz@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 4SrCMJ2gxfz4Gk3; Thu, 14 Dec 2023 00:06:52 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512412; 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=YrdSxXNSqK88CmCEw2kMoFwQ5Zz2nKu+nuRFbZb9FDU=; b=gForuEnnWpMEviEglQCZGOs7NMP3aJiRsV7Voc/4E8+LFbrcLiRBRAhO9/njM9Y4uj5LjF z4wbee4pircls1FVbGNlodyw5yfDGkNUm7qxiqsStxMZF/zrzikRxiTS/IFQyGUVx4RS+s kzldRehJDccnwOy0YxCYIFKzfmqWplGYbIGxiPI4mdggDJfUZo/TNSa9I/2/YH47sQAZHA 3m83F5MMOyqqeKWwLE9rLiW5W78XnV0sm0pmIgTDewZLQ/axPPj5Skku2yL8zLspw48VLe 8uIPSyurGJ53DP5JgwvZwoGApRGvAi+pMUDUdeeAeMI9fjI+fF0eB5kS+1Fhvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702512412; a=rsa-sha256; cv=none; b=o6QnDOlNItgcEszYqvKSlxNRbaedV8oVqiFtnFQByzKtiKYi+mV0fGXRPcZ1idVeZ56+OD opFjmHOcjZhbwgUAsFo9Ah/aCeoua3TUm9XPdmIxAAfx27Z9ZfUsUt3XM5ezBgaDmuhvjH SVgh9vzO5je00IzdBywgHqMl2GUJGBquEixGDvAKIv16jyIkhJxm8Yxb920CnIYNDnX+OU 1bcVOl28ef1yJtvfUV0U0as/gcDSe1QGSZNQk9IrrnMnPPps117acKgzBHLN4JXbHv0Hvl gYoW/Jus2msYdThdTd6oTKuoqJk7JCFTyqCAvrMmjraiGq7zsYkXK+ouGObj1w== 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=1702512412; 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=YrdSxXNSqK88CmCEw2kMoFwQ5Zz2nKu+nuRFbZb9FDU=; b=qvZjmHDZU5LjPz8scXlPiZTO+8TgAh+jfqX5VcNKlVDvbPtQlqBOZh0SsFjYxeu72iNt1n t3HLKWDjDXVJMQi6v52O4NkErSdul3Kee0R0w7BjOsXkdOdFWtb1xVZUCxRPTNVn/TsF59 W53ig6cHq2IU/QIaHlZ02LDwytYNqBBo0ViwaeIHzcNXiPPPO6ac3oX17xpu/oRHW++r2j gpN7aYUevaDPZML56+zjMR+UmpPjG5NLSxiVp8J1N+4Ohe6CTbmnMwo8ZrQgPbWt41ivLj WrcQCVpaBoYwSXU7HChSUVEEN2vpQlOkokvD/7TX6G+i4SgvFIt8+PU2M7C9OQ== Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SrCMJ0LyGz16h; Thu, 14 Dec 2023 00:06:52 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id E329F8D4A162; Thu, 14 Dec 2023 00:06:50 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 8F9142D029D6; Thu, 14 Dec 2023 00:06:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id uVvgu2sJiH-P; Thu, 14 Dec 2023 00:06:49 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 4FE712D029D2; Thu, 14 Dec 2023 00:06:49 +0000 (UTC) Date: Thu, 14 Dec 2023 00:06:48 +0000 (UTC) From: "Bjoern A. Zeeb" To: =?UTF-8?Q?Jean-S=C3=A9bastienP=C3=A9dron?= cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 509707e8b6b7 - main - linuxkpi: Add `sysfs_create_link()` in In-Reply-To: <202312131828.3BDISllg019034@gitrepo.freebsd.org> Message-ID: References: <202312131828.3BDISllg019034@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1098556516-735906049-1702512409=:54546" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1098556516-735906049-1702512409=:54546 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Wed, 13 Dec 2023, Jean-SébastienPédron wrote: > The branch main has been updated by dumbbell: > > URL: https://cgit.FreeBSD.org/src/commit/?id=509707e8b6b7326c7f4793b6e291f0a8e6939412 > > commit 509707e8b6b7326c7f4793b6e291f0a8e6939412 > Author: Jean-Sébastien Pédron > AuthorDate: 2023-12-08 21:54:29 +0000 > Commit: Jean-Sébastien Pédron > CommitDate: 2023-12-13 18:18:46 +0000 > > linuxkpi: Add `sysfs_create_link()` in > > [Why] > The amdgpu DRM driver started to use it in Linux 5.18. > > [How] > The function is a no-op as I'm not sure how to implement this with > sysctls yet. > > Reviewed by: manu > Approved by: manu > Differential Revision: https://reviews.freebsd.org/D43022 > --- > sys/compat/linuxkpi/common/include/linux/sysfs.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h > index 3dc1a18fdbd3..8b4160453a3a 100644 > --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h > +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h > @@ -152,6 +152,15 @@ sysfs_remove_file(struct kobject *kobj, const struct attribute *attr) > sysctl_remove_name(kobj->oidp, attr->name, 1, 1); > } > > +static inline int > +sysfs_create_link(struct kobject *kobj __unused, > + struct kobject *target __unused, const char *name __unused) > +{ > + /* TODO */ We've started to add these as pr_debug("%s: TODO\n", __func__); as that way they will at least show up if linuxkpi.debug is turned on rather than being silent NOPs. That said, is the link supposed to go away along with the "file" if removed or do both need to be removed independently? > + return (0); > +} > + > static inline int > sysfs_create_files(struct kobject *kobj, const struct attribute * const *attrs) > { > -- Bjoern A. Zeeb r15:7 --1098556516-735906049-1702512409=:54546-- From nobody Thu Dec 14 00:09:50 2023 X-Original-To: dev-commits-src-all@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 4SrCQp3J4cz54WgC; Thu, 14 Dec 2023 00:09:54 +0000 (UTC) (envelope-from bz@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 4SrCQp2bqwz4H8w; Thu, 14 Dec 2023 00:09:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702512594; 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=X7ITpZW7bYjchsIAqB2iuqWS4J3RcsaZgC6kPhxKYd4=; b=pv6n02SqdcVe+vo4osmPaH1ZiEt/i6yMU/d+tjV+KtTKO+EQySKSb6mXb63ewqrtx8kdTo vYmB7V2JUNaZzujiniJQwNG6pdoz9sadfUelSBFVr1i4VbalX0buQm+9wUKI6VVVhpD3yP TxJ+C+vdiBmj5LRSym4vuYSqqgJIbv5QENQ/GPghd8NEBy1s4t1lIgBjNd151xss5CEA8Q ZPJ6Ty6VK4slmXGCMiRQ1LJUFYcn+xhBvQThtd6JXRCpE1H5hAxqkORl1cfyeKoiexxbiR VItuAApt0+caxIUXRib25QEtPtijV4eMJ93nfsa2AnGvdiuhbqkbK6ffeJBmCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702512594; a=rsa-sha256; cv=none; b=Dq9UgzX1o7k2yHNyiGJn/Dr8if0o4rkP1TSXSh2BkZvKxviZ7QoQh10oaV6gTg85kXbsWE mqoeob+wKYM4DaqVMI5N+IkkQRfwvKU32EcQNSbnEi1noFjE1TMK7hIbBdwVWSNlej5H5+ e0iHH5E0zOg2x4vHlBSdruwBfI/Qgv4MJdBD3/rKX0DryRyaiKd2aGZt+R/gJxwufwLnNU qLYQvqaJWWU1YCY1mWDf8XCl5iKHRIqgX7QqhxH70MyPMzK20/5YPLe5yPVf4YFgr1UOVp J831rS+DGoZPQ63ACF9mL6K9F4QWZA/DDoyeLXh0ZXvvhsb5z7cXJa3PhoinXQ== 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=1702512594; 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=X7ITpZW7bYjchsIAqB2iuqWS4J3RcsaZgC6kPhxKYd4=; b=qea91u/HO5zucXpzKIL/Aah4+BcnXnjIBLYeWe7Om+wN8RhCk/kTscUtPjA2TfpHyjrgvs UUqI6wbDJeLmWlJFJo25jYYBUXnK2xOd1Jjsua60BXDdfDeuTzRBYteaWMDMJ6ghhGLkYO 0Vup70WSrESNF9tXv4LUBXcQe4iwpAjPg5C1EU1CdQtIIOT3kDSCvOpzpap4U3fNIonD+d 0SAQs1ORz5mAz/eqiq5uhfc4Nc1Z0PKlvF+2LCb+/oyjsIdQVQ8cRtcsa6a1zKxOvM6Ra6 dvUtm200o3aU3ip8Cizd8je84qYUV2Ef+qsfzO9VTLs4e18PwWcuOUyq5ngy0Q== Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SrCQp03Hwzwy; Thu, 14 Dec 2023 00:09:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 42BAC8D4A162; Thu, 14 Dec 2023 00:09:52 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id E25B42D029D6; Thu, 14 Dec 2023 00:09:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id KzZfr43RHmYY; Thu, 14 Dec 2023 00:09:50 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id A8E082D029D2; Thu, 14 Dec 2023 00:09:50 +0000 (UTC) Date: Thu, 14 Dec 2023 00:09:50 +0000 (UTC) From: "Bjoern A. Zeeb" To: =?UTF-8?Q?Jean-S=C3=A9bastienP=C3=A9dron?= cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 59cbead6b15f - main - linuxkpi: Add support for `suspend_noirq` callback in `struct dev_pm_ops` In-Reply-To: <202312131828.3BDISons019199@gitrepo.freebsd.org> Message-ID: <3rrqsr57-255q-pro4-5rn3-o725214q07n7@SerrOFQ.bet> References: <202312131828.3BDISons019199@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1098556516-716910007-1702512590=:54546" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1098556516-716910007-1702512590=:54546 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Wed, 13 Dec 2023, Jean-SébastienPédron wrote: > The branch main has been updated by dumbbell: > > URL: https://cgit.FreeBSD.org/src/commit/?id=59cbead6b15fd2320fa0a98dc680aef5d6e1438f > > commit 59cbead6b15fd2320fa0a98dc680aef5d6e1438f > Author: Jean-Sébastien Pédron > AuthorDate: 2023-12-09 16:24:20 +0000 > Commit: Jean-Sébastien Pédron > CommitDate: 2023-12-13 18:18:47 +0000 > > linuxkpi: Add support for `suspend_noirq` callback in `struct dev_pm_ops` > > [Why] > This callback is being used by the amdgpu DRM driver in Linux 5.18. > > [How] > The callback is called after `suspend_late()`. > > Reviewed by: emaste, manu > Approved by: emaste, manu > Differential Revision: https://reviews.freebsd.org/D43029 > --- > sys/compat/linuxkpi/common/include/linux/device.h | 1 + > sys/compat/linuxkpi/common/src/linux_pci.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h > index df06b356e092..7a5d813063a9 100644 > --- a/sys/compat/linuxkpi/common/include/linux/device.h > +++ b/sys/compat/linuxkpi/common/include/linux/device.h > @@ -81,6 +81,7 @@ struct dev_pm_ops { This struct is embedded in driver source code in struct pci_driver; that means all LinuxKPI based drivers need to be recompiled. In case you MFC please at least append at the end! > int (*poweroff_late)(struct device *dev); > int (*restore)(struct device *dev); > int (*restore_early)(struct device *dev); > + int (*suspend_noirq)(struct device *dev); > int (*runtime_suspend)(struct device *dev); > int (*runtime_resume)(struct device *dev); > int (*runtime_idle)(struct device *dev); > diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c > index 99750d5ced26..852cec9cdc94 100644 > --- a/sys/compat/linuxkpi/common/src/linux_pci.c > +++ b/sys/compat/linuxkpi/common/src/linux_pci.c > @@ -643,6 +643,8 @@ linux_pci_suspend(device_t dev) > error = -pmops->suspend(&pdev->dev); > if (error == 0 && pmops->suspend_late != NULL) > error = -pmops->suspend_late(&pdev->dev); > + if (error == 0 && pmops->suspend_noirq != NULL) > + error = -pmops->suspend_noirq(&pdev->dev); > } > return (error); > } > -- Bjoern A. Zeeb r15:7 --1098556516-716910007-1702512590=:54546-- From nobody Thu Dec 14 08:56:40 2023 X-Original-To: dev-commits-src-all@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 4SrR6c3NKwz53gR7 for ; Thu, 14 Dec 2023 08:56: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 4SrR6c2s7vz4Jxx; Thu, 14 Dec 2023 08:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702544200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2+zbSDe15Mtym/xXNh5myHFnNBMRNg8fvoP39gd2EXw=; b=ueam0E+ZVSEKl8ZuIG3wNAXqe8OSTp6Q4queAC6pkyZw1n9G+M86cZJa+AUJVH0XqNGyNU NCZob3od/LfhFkwoSYIK6jB3rY2eMZ/8fPljef9RwwoW6zht22p757FN1x8HfKmmIpxYVb G9/goMIdRrY9tbNezk4/bOobBMmCotx8VB4yRdmsH8R3VCzYzPdy7iJozs9G+AtRjh0uLo T497i6JRlHzecn/l+fIDYFUt1veOZJp8HsDJNer0j7eh0fvxc3gTzBbtve2s1lOuV6V6Hg VT68wSvtfA6L2uDaWMPZUuXPIC8vfRkchkE5BxAzsxei7gVaBvk6zmrHyWLobA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702544200; a=rsa-sha256; cv=none; b=PxCs6NCn15QMP77kXwqGUJnKKYYDqekPtJAzYC0EWNNKpN27vpuSLyR+nCjy/fqWmEweRe VyMakCNlqrdbFkOMLl0iziydsoM4yPI7qBeLS0PJpJWCAJOCBae0ER7+mumQ0bUatg/oVy MnoLWmsiBarDCAIlUK695sOeakZw094fqDGhgy46pzEXTBr4iNqDW8Ce7s92Jo/Hz3nE/G /6pzSLPBXw3A6fYWyzbiQlAok4/nPDbzLBiPh5zq3h/IA0ApKg36EfA32/6oE/0zK0EJly u9pAbge+gfB9oDpSyS4tOCjcefQRn350XvaMVtpxeihvGAM3m+kR5N/yY3HxXQ== 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=1702544200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2+zbSDe15Mtym/xXNh5myHFnNBMRNg8fvoP39gd2EXw=; b=UDAtd/P4c8afoQpz2hzOOSZSuyP06n/Of+7+UdlFaQHb6EJ2BnrgF0NfZKvZiS+BjH8m9u wiSy1B6aYSEqmIteHixXiPvo3ZBIIMZ8eLzcZiAWdQkjQc1Sd/Ko4H0CSvxaamQ9qCbUwG oKFWtI6DeTq9GHpChaedV+DeKZweesG7r2TowmiA/inJVG8+bCaYItZ0I8kgQw/5b2ZHLY txbUjqQ2K14jwVcyN63jfTopSdxfMlmE/hdeO5zhy8rVo5ZMPgUwMTjqP0VmeZJYvdSa/z WBwiAu8exKc7j7gpCOSpP+3Naul97Q6NhXHEfFMSOemeL2MrWyk85TN20AydKw== 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 4SrR6c1s0Bz5lw; Thu, 14 Dec 2023 08:56: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 3BE8ueSu092424; Thu, 14 Dec 2023 08:56:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BE8ueUX092423; Thu, 14 Dec 2023 08:56:40 GMT (envelope-from git) Date: Thu, 14 Dec 2023 08:56:40 GMT Message-Id: <202312140856.3BE8ueUX092423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 450f2d0b08e7..86e115e21e5b - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: 86e115e21e5bdeee73c88c5a1a73a29d9637380a X-Git-Oldrev: 450f2d0b08e73cfb057d0e301a813418b70d64b9 X-Git-Newrev: 86e115e21e5bdeee73c88c5a1a73a29d9637380a Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=450f2d0b08e7..86e115e21e5b 3c7650491b9a zed: fix typo in variable ZED_POWER_OFF_ENCLO*US*RE_SLOT_ON_FAULT 5ff43969e7bf ZTS: block_cloning: Use numeric sort for get_same_blocks 2ebb9a4811ce ZTS: Add test cases for block cloning replay e53e60c0bda6 DMU: Fix lock leak on dbuf_hold() error 8ad73bf4497e ZTS: Disable io_uring test on CentOS 9 9f6ad4dcb6ae ZTS: Add zpool_import_status.ksh to Makefile.am b1748eaee0dd ZTS: Add dirty dnode stress test a9b937e06664 For db_marker inherit the db pointer for AVL comparision. f4b97c1e0090 ZTS: Update raidz_expand_005_pos.ksh 86063d90319a dbuf: Handle arcbuf assignment after block cloning 86e115e21e5b dbuf: Set dr_data when unoverriding after clone From nobody Thu Dec 14 09:23:59 2023 X-Original-To: dev-commits-src-all@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 4SrRk75HdMz53hg9; Thu, 14 Dec 2023 09:23: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 4SrRk74Sf4z4M7F; Thu, 14 Dec 2023 09:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702545839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=268jIA/ttsRePvMfS+pjVr8lrfPxOcQ2l1jAkBdb1CA=; b=OJ4Tfyshs5iYGstCun4wfK08egrJrPG83ggNOF4ekKvwfozoCXyZPOIKIXybhNgw8WuVpp bdQHDRyyo9AfRn8kHhz21j6HN9p5OmdVLEVmAKoO/5XvNRNz+K2Oq2IChpKkx05WzIdft4 tdEpXl7jk1fWFwg3wIFqspBMG+Jxr9C3pxmGzwFvs+ISMGXUzyio/C8lk50kjsX97RuG18 jyqRdxDMKJI0mcLtMHIeIJHGyTxnNWB7+8tpl//0jKI8b4WBK7Ic0IcGkR02XgEaG/Sl5b LfVcHIUmmQRyiCRUsvP6Faxc8eUFQtc65xC8d5vSNW1JkMgGr4K1U/wlo8ss0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702545839; a=rsa-sha256; cv=none; b=iQ2If0pffwEMvrxUoGO1ih2xD1BpyJinGIdACc/J9szPA8g0HKPIyYuTV4u9DEqGVZKH3n koYQVpXlmxMsfx0dztpDGY7LCZSpJ02b61l/ScWf7RU/IL2raNV0kuUSzQwkTAgz6ul7iK jaiA8/ndnruwdI6V+pIABX4XOstX/gqiU3UX9JGtGsMv2bKYL/SN2rfW49UDsNhVrZH2AA Pm/jcuiP0UoU1loPgy2GGIwsdXQ3dDiDuzfXF2aUA2Eyhgt+VEB+WSDpep4sAWzfaX01c2 XkVb3lq57HurBpgXxGq25OUG0N5rRB64CuM9N8zvN+Lu3KVmHwBThiyLjuH/tA== 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=1702545839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=268jIA/ttsRePvMfS+pjVr8lrfPxOcQ2l1jAkBdb1CA=; b=xHnHhtNIx9H2IdUbfgajM9qn8n2xWsG1K29ZPLLep3mw3wVRPzYWSCLAwgMUZPaDYCQFwa /VYUvMpANli4+CWAZWZimfhXuikJtd3DBqu+hW1WwE8+vs/pSCjv2Z49lYNQJNgbuhUNez zkCO9wCAI1mPcB7EjgeoGzFiE3vHGzrejeRYlRTdeZoPJ6eU8f0d6TNCzgCed17yumD8CA M8cIj9xmoI5Kv7HL8opXGdc85uptYq4VYxk2qVULm8ply5sLBT8UBVc1kHehdoUQRlaDim dPnmOjquBjEJhcbQ5E9bWBMsEz3rW1WMyb1bvxKkjx5qprtBjZP5DLwlAQzQvw== 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 4SrRk723dwz6Q5; Thu, 14 Dec 2023 09:23: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 3BE9NxcV043227; Thu, 14 Dec 2023 09:23:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BE9Nxaj043224; Thu, 14 Dec 2023 09:23:59 GMT (envelope-from git) Date: Thu, 14 Dec 2023 09:23:59 GMT Message-Id: <202312140923.3BE9Nxaj043224@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: 8fab83d2c5c5 - main - pf tests: fix typos in the abort_v6 test case head / cleanup function name List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8fab83d2c5c5e801105dbf25c28252fc97935b00 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8fab83d2c5c5e801105dbf25c28252fc97935b00 commit 8fab83d2c5c5e801105dbf25c28252fc97935b00 Author: Kristof Provost AuthorDate: 2023-12-14 09:22:26 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 09:23:41 +0000 pf tests: fix typos in the abort_v6 test case head / cleanup function name MFC after: 1 week --- tests/sys/netpfil/pf/sctp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index 86356128bb7e..66225e132d1c 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -240,7 +240,7 @@ abort_v4_cleanup() } atf_test_case "abort_v6" "cleanup" -abort_v4_head() +abort_v6_head() { atf_set descr 'Test sending ABORT messages over IPv6' atf_set require.user root @@ -292,7 +292,7 @@ abort_v6_body() fi } -abort_v4_cleanup() +abort_v6_cleanup() { pft_cleanup } From nobody Thu Dec 14 11:05:19 2023 X-Original-To: dev-commits-src-all@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 4SrTz33F75z53prq; Thu, 14 Dec 2023 11:05: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 4SrTz32q3Yz4TCV; Thu, 14 Dec 2023 11:05:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702551919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T9xuGeagLnBESg+jDIy9vJDAQJwiQLMo0IGfxz95FLA=; b=B9verkWg7iEhIBIAfsy8cJkbXNM/hx9CC7cAGQ8sNVlG/bqFUfA+0BsSVUzqpQcCQmMBwK YU2Wad90YWJdsLqrkkTfZCqSnz+b6OeyAfew/uarjCkuEeA/GqkHMgt4gpTJBOshIlhUBM AMnN1tBhYtL/VElMgTNjoY1TFl6fEGlMCc94W++4bMdXnHIXU1Zqivmn/tEBc1J9Yz3bJ5 tmBqskLvw3HpVT8hADkd/PEDS6nkMQne77PAqzRSRnbKXdzHk+/9MjDtgto49sSQll1kQq YFNF1ELBfDq2QMdyl+1w3XTWE56J0K2dCIWv7BUSKjnH50gZlbJrXWqkWB7jUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702551919; a=rsa-sha256; cv=none; b=LFzM3fkzhbHGn48hcr/I9p1W/5Vob2PVExOvHdh0F9H0LeUwATb3DgAj1sPkAPTCcLvDnQ UvGTb2r4z8ev7GJBZvMBAyG6H1lO4k0pcKA6d2Lu0OD7FSQmRBINdz9B9/xcqBpSc5+JMf 4Bc82lF3a2sa8ax/6cacNQIA2rzxEc03JaC7NLp0EXzFuA/5bAHCugsRfsVokF7x/L2XY/ rwGWBApqxy+fumN37Kr7BHml4gCHlL0khf3LN1bDMJOXM4Chrs/GJf9+TveYR/b0yO8Ss8 veBestljy/nckSA+/aQ3XLi6qriCBvGp6sktGjzvNx8owmFjSmDOaoIah3dWLA== 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=1702551919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T9xuGeagLnBESg+jDIy9vJDAQJwiQLMo0IGfxz95FLA=; b=lFvtkZIHNGhyKrysj/uAqrq2nboQrU3atfSd+ujuWAEPzzFk6xP+tJUZmgWTQdwcb3ej95 KClUG/bdNkwYT3WlmvLiMHoEr+2JPoXg4VxqSEUaM81b4vonatziG1Jw9VOGZW/VlCWJy9 +le1WAiiBJqo7sHZKlWjW3+nbzTcxebdCSPRp/oMpuvPIL1XMthM7ZxcDAZz6wHI+48Ntp gf/RQ5ruSqaCduR57QJw2oYtfqPBvvFohak7XuJ0nwJnCIyH9hzdsdijCVamAt/4U2sRFW 7F7hIBT/UL41BuTHUTfkMO7q9U9QNijUHLxRd5OqXWfy7tMxccjKQEABw/UbJQ== 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 4SrTz31mFyz994; Thu, 14 Dec 2023 11:05:19 +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 3BEB5JnL010709; Thu, 14 Dec 2023 11:05:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEB5Jgs010706; Thu, 14 Dec 2023 11:05:19 GMT (envelope-from git) Date: Thu, 14 Dec 2023 11:05:19 GMT Message-Id: <202312141105.3BEB5Jgs010706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 35707083c6fb - stable/14 - tcp: shift PRR sending cadence slightly left List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 35707083c6fb47d28aea5e421ea99b3f0daea0a6 Auto-Submitted: auto-generated The branch stable/14 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=35707083c6fb47d28aea5e421ea99b3f0daea0a6 commit 35707083c6fb47d28aea5e421ea99b3f0daea0a6 Author: Richard Scheffenegger AuthorDate: 2023-12-07 14:13:05 +0000 Commit: Richard Scheffenegger CommitDate: 2023-12-14 10:13:09 +0000 tcp: shift PRR sending cadence slightly left Don't let PRR pass up on the opportunity of clocking out packets on arrival of ACKs - by pulling sends forward by about half a packet. Prevents unexpectedly long runs of incoming ACKs without eliciting a packet transmission. MFC after: 1 week Reviewed By: #transport, tuexen Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D42918 (cherry picked from commit 9276ad23b872eddc42e05304acb10bf5421b043c) --- sys/netinet/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 11ec7d2d74d2..15b7311f4605 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -3972,7 +3972,7 @@ tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to) imax(1, tp->snd_nxt - tp->snd_una); snd_cnt = howmany((long)tp->sackhint.prr_delivered * tp->snd_ssthresh, tp->sackhint.recover_fs) - - tp->sackhint.prr_out; + tp->sackhint.prr_out + maxseg - 1; } else { if (V_tcp_do_prr_conservative || (del_data == 0)) limit = tp->sackhint.prr_delivered - From nobody Thu Dec 14 11:20:40 2023 X-Original-To: dev-commits-src-all@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 4SrVJm51lyz53qZf; Thu, 14 Dec 2023 11:20: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 4SrVJm30dGz4Vgt; Thu, 14 Dec 2023 11:20:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702552840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n1pkKDeauOgbxq59fadfEmIic7baAiNq4RZdxMuIOSE=; b=xqORuhg5dpN50VvwyPJg37V3QySWAGXYRtjK741uXnETsgCS8mC/drGtmAVe+bUTZxHZZA wIIv71Qzx0NjbcY+uaPGAID0kAoIfO+MFUmSdXmugiS9hkU4Xr0amvhfcZ9Kr7mnvEWIYi R9Gxlso5sOH9LjEe8EINtpkqtZLOHus1uMtx6pHllq6y7d8uSxZm6LvlW7gEgSEYHeu0nK 2VX2S4VkfGKZcKcu4CqktzXK0BBiHdoKEZNH5mqu+EvBaiJ1+olr2rIhC/P1lOIkt4THDi w9SlSfkU35QoJRKGL/dt1wI2392dfPnuyYfgApMUiPvWI/e8QOn0gMkCvvxYHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702552840; a=rsa-sha256; cv=none; b=MvsqgaeIhSrYhOPN7aBl3emwa9XIxepRHNDyrvCUD5fRo8rK4TSoCLQwrLKt33zN0V7z8m QAQidbaydpfJMip0f/a7P32YyyQcn7CMb6pF2P91OVwciPTwjCq4YpXOMNwaeRm15yV0Bj imM2QZMSIx07j+i50GcYR+Rojn9ohAY7+i9J+GQAHlyn2ZjjHD82ZEkfZ9XczjLEIdWzn8 NsZPMUGA4BQacAfQ+K2fGo7n1T0tq8eU11NRrztTL+LSdhhqqJpNex09Z9AqTqfUJVZcr2 KYjLA4gWVMDWs0JlfNX+I8lV+Rj7BAMkxJy5GwzCeh0g7gRQ2oQyMnl+lm7aeg== 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=1702552840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n1pkKDeauOgbxq59fadfEmIic7baAiNq4RZdxMuIOSE=; b=tXfYQOlLd2aaur/ewJpzY3tKU4UqUCEV2/UTS2UCj78eK0ovFEXSuMAgwqnkkAJxuc8dDn MsBK5pZ9GNVsCBJ5mzfchJjfr/x3s49nRIU72leIjXvHvq+qaQVMmYKGj8AgUwHOIqYjzG 9cldr6IjCjuZuVYxy6Iy1KHAQgxr3BCvFwRCVu+tXn4OfQ360HCYFZF6ieYHn/lQBZRxUG tKZknO2QJIN8+BkRPkLZZuzZ8qbT9LdgA6qZOLhg59qD0TUD3ysIIfOsJq5E19zZa7v3G4 npilCv2u+YDse8O+wenRqMR33MTReTSktfojY5UYlY3Wh1im5xYRLbyQhaefPg== 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 4SrVJm234bz9Sg; Thu, 14 Dec 2023 11:20: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 3BEBKeIB036762; Thu, 14 Dec 2023 11:20:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEBKeX3036759; Thu, 14 Dec 2023 11:20:40 GMT (envelope-from git) Date: Thu, 14 Dec 2023 11:20:40 GMT Message-Id: <202312141120.3BEBKeX3036759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 4102ee128b9f - stable/13 - vnet: (read) lock the vnet list while iterating it List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4102ee128b9f0159f00e48c2f00f1b3b80cd0f1a Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4102ee128b9f0159f00e48c2f00f1b3b80cd0f1a commit 4102ee128b9f0159f00e48c2f00f1b3b80cd0f1a Author: Kristof Provost AuthorDate: 2023-12-05 19:08:11 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 08:34:32 +0000 vnet: (read) lock the vnet list while iterating it Ensure that the vnet list cannot be modified while we're running through it. Reviewed by: mjg (previous version), zlei (previous version) MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42927 (cherry picked from commit bd7b2f95019e9715150c34736279805de0818d09) --- sys/net/vnet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/net/vnet.c b/sys/net/vnet.c index 4f61061853da..9bcc0a779d59 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -503,11 +503,13 @@ vnet_register_sysinit(void *arg) * Invoke the constructor on all the existing vnets when it is * registered. */ + VNET_LIST_RLOCK(); VNET_FOREACH(vnet) { CURVNET_SET_QUIET(vnet); vs->func(vs->arg); CURVNET_RESTORE(); } + VNET_LIST_RUNLOCK(); VNET_SYSINIT_WUNLOCK(); } @@ -559,6 +561,7 @@ vnet_deregister_sysuninit(void *arg) * deregistered. */ VNET_SYSINIT_WLOCK(); + VNET_LIST_RLOCK(); VNET_FOREACH(vnet) { CURVNET_SET_QUIET(vnet); vs->func(vs->arg); @@ -568,6 +571,7 @@ vnet_deregister_sysuninit(void *arg) /* Remove the destructor from the global list of vnet destructors. */ TAILQ_REMOVE(&vnet_destructors, vs, link); VNET_SYSINIT_WUNLOCK(); + VNET_LIST_RUNLOCK(); } /* From nobody Thu Dec 14 11:20:44 2023 X-Original-To: dev-commits-src-all@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 4SrVJr6Jzzz53qX5; Thu, 14 Dec 2023 11:20: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 4SrVJr5vnnz4WSH; Thu, 14 Dec 2023 11:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702552844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UviZVb5Pz1j/3GoUHf3gvNKx5Q2bMM9mXEKRLCD/G2o=; b=UCK9eiAbz02Nd7Mr0xk81Hsz4TtAmZm87lFsqqW05NTN1O0LExR1Dm7qnUGTcovAwnDCSh VESmjKjAOIE8jZ33uV2Qih4+VqOoZCnWQvsloSc3Kh6gIaasx9d9yGboljubchjybKaK7S fZCZZXmK2WXoekL+J/1oJM8IbJV0qGDukggMBUMopsDBhcgt6Ch2TaL2ZpxfCFfWr0O0du OnYyqjIlylVO+/4SoH0QJ7MiQlv5sFObItrxZO53q6m6xbjflVi8e2mEJumpq1S03wDI8A VPU7trqHpDH6Ci4GFthZtW1jHA6Sc3Gz9mqD3Q8eBDnxJ433duPup7AN3Y2Hjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702552844; a=rsa-sha256; cv=none; b=W9//95YJD12U7WbgcmgT7U3gzZZLYQ6CuzDZ/uHiwd3DHvegqF2aQLGctOgzMsdNEnSk3X 3Hv2xfG2b5+phq8LS291SPFydHGP7D06xFJO4EmyNinALEr2cbzDszq4gjx/+K8/DYJtzL u6XWnwb7zc9TAOn5Q04+uhTRnKknAosRuRktjkRwP45E3dm3MFqT9Gzd7pp3+cMowxaNB5 Ld/7hrDy3WLQTQDSEffmv4dPnzEK7+QmOhYS72omZtVTm7w7+n2kMupD8sgXjbOsoRe/Kb wvhLqmwO8ZW0sewEjZBsGcFD8oyNETQ6kNKbQhY5r1UxyEf488GuargVwHtkzA== 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=1702552844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UviZVb5Pz1j/3GoUHf3gvNKx5Q2bMM9mXEKRLCD/G2o=; b=vtfJPAkfQOKKHZpPpx/WzmeXqI6MvNleH1icRNxkSyPr3gA9+Jo66T9rJ1VAbMNQKSukOZ KKHOnIhSI19kW3fgNHjSF52iNhTJ4k+sNKmfayFPTKLjIujL82mL1/uwIut1s04UilNcIe ib7Cu1ROOLivQ1KPsfeJHQBO7FUNsUL4hF+ZhRFzQTkbYYH0WtMntJHZyMiGVNz0c8pmIO Tz6wEvFPHSYILpfVwourZCDLj6uW+Um29+8BMKaWs7Gl5557wn488xTZ/pg+WN7ELPU76X JhF4GwDJgtIwnNornENfLj2DqfsJwN214mJSdVRDPphLcV/vwjruBXIf60inSQ== 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 4SrVJr51LYz9gX; Thu, 14 Dec 2023 11:20: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 3BEBKibW036905; Thu, 14 Dec 2023 11:20:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEBKiX8036902; Thu, 14 Dec 2023 11:20:44 GMT (envelope-from git) Date: Thu, 14 Dec 2023 11:20:44 GMT Message-Id: <202312141120.3BEBKiX8036902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: daaaeb3051bf - stable/14 - vnet: (read) lock the vnet list while iterating it List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: daaaeb3051bfb9b1a030b7623778c3ec251b2b2b Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=daaaeb3051bfb9b1a030b7623778c3ec251b2b2b commit daaaeb3051bfb9b1a030b7623778c3ec251b2b2b Author: Kristof Provost AuthorDate: 2023-12-05 19:08:11 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 11:20:25 +0000 vnet: (read) lock the vnet list while iterating it Ensure that the vnet list cannot be modified while we're running through it. Reviewed by: mjg (previous version), zlei (previous version) MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42927 (cherry picked from commit bd7b2f95019e9715150c34736279805de0818d09) --- sys/net/vnet.c | 4 ++++ sys/netinet/ip_reass.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/sys/net/vnet.c b/sys/net/vnet.c index c4a623698341..5dec0433d31a 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -503,11 +503,13 @@ vnet_register_sysinit(void *arg) * Invoke the constructor on all the existing vnets when it is * registered. */ + VNET_LIST_RLOCK(); VNET_FOREACH(vnet) { CURVNET_SET_QUIET(vnet); vs->func(vs->arg); CURVNET_RESTORE(); } + VNET_LIST_RUNLOCK(); VNET_SYSINIT_WUNLOCK(); } @@ -559,6 +561,7 @@ vnet_deregister_sysuninit(void *arg) * deregistered. */ VNET_SYSINIT_WLOCK(); + VNET_LIST_RLOCK(); VNET_FOREACH(vnet) { CURVNET_SET_QUIET(vnet); vs->func(vs->arg); @@ -568,6 +571,7 @@ vnet_deregister_sysuninit(void *arg) /* Remove the destructor from the global list of vnet destructors. */ TAILQ_REMOVE(&vnet_destructors, vs, link); VNET_SYSINIT_WUNLOCK(); + VNET_LIST_RUNLOCK(); } /* diff --git a/sys/netinet/ip_reass.c b/sys/netinet/ip_reass.c index 6f33c7a8a54b..2876e5bfdcdc 100644 --- a/sys/netinet/ip_reass.c +++ b/sys/netinet/ip_reass.c @@ -663,11 +663,13 @@ ipreass_drain(void) { VNET_ITERATOR_DECL(vnet_iter); + VNET_LIST_RLOCK(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); ipreass_drain_vnet(); CURVNET_RESTORE(); } + VNET_LIST_RUNLOCK(); } From nobody Thu Dec 14 14:29:23 2023 X-Original-To: dev-commits-src-all@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 4SrZVW58dkz542Ts; Thu, 14 Dec 2023 14:29: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 4SrZVW40Wyz3J38; Thu, 14 Dec 2023 14:29:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702564163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FqyHi3xOPTf+tKeog0PVleVMUJ+9QLMTizGeYRrFAqk=; b=sXTIDlnwewvJ+hW0tmf40heEbwe2FvHDApuPzM6b408OGULO/JwcBDIpqUTPiPYQ0SdDTh 8HGApuTy0TSwJ7j32J86AWu4lEQ96Wb0WRRrXYGxrZJLbAzFqhYTEYn3G09g4V+VubGkU3 xnkUklKgYy4Y23hdrM2vDCblXnsiCw3mpPXTJJ7XOTy2kQowsZCFSWElkVDFGt+DM1MQVJ yIbWLyJMU8GkYiX728EJ7eMufNLkFWb6N7xN0cfUpWLqZvmi7UcdwEzFJB0lNfrYh34F61 B7rL1njIBDw51YjS8luC+TDxMceJFDcDC1O/cUQtkODgn/VvjHrpfLws8EOLXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702564163; a=rsa-sha256; cv=none; b=QVIMUa45eTWzwaXyrhEFZk4fRjJ+jpB+UhINQdcLCyqVjypjB8ibl5o/qGKt3HGUc8TJPx 95tcTNVc+uKBNmPL78eiMZ/p0ym+8qvTueND4WXKAhBTf0/JcyoqN1GIydyXIB+SJMFb7c mOhn0/mWwoqoCnkJ6Iy1G8yacWmDQA9webBybMWPA/hOt04bWt/qLvoNeWyPAPVrztwDPp keR0YcsnHZv4YDwhiqBxLWvgtz+CcqDIjrjK/5X+o175koVNkgeR87lvExV/PIBEfQqr+d UbGcFf5NweV3JA3XWXDRwrNAZUAoo+bGI3zW2ElabWzEBO7RLwRpGg2kAs1P+g== 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=1702564163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FqyHi3xOPTf+tKeog0PVleVMUJ+9QLMTizGeYRrFAqk=; b=dKxAM5qikiMgyzmP5f6JyRFg40a3kjheUb7xaLkdS0IknjZhVILZlhk2L2TA+b4BEYJweh FCbQmSTMB7qqAMq4UZ8MRcnFSMQfpipA+UVX4pBLkbDh68Rtp4SrilPQtRNjYcIwhzqYCp LNjiAqRkeN6kOGZR4JyQA1bcc9irtMsTUThv4yeLd0+G1nNza8tcDcj0/m83TYDGMm1Iki xRfLxiKGdQ+135AsfSRJgxbcBmURGAr/HR0BuSf0sIWSrWIxKrOfXsqqWBDUy0jJRIPWuP JnVklbKgNeajjys7+3BAcRkSFzXrfBie9ms9oOHwx99+59Z1XhNIzgSg4fEDcA== 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 4SrZVW33jpzVsw; Thu, 14 Dec 2023 14:29: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 3BEETN6k046927; Thu, 14 Dec 2023 14:29:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEETN3a046925; Thu, 14 Dec 2023 14:29:23 GMT (envelope-from git) Date: Thu, 14 Dec 2023 14:29:23 GMT Message-Id: <202312141429.3BEETN3a046925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: df81b1511854 - stable/14 - tty: Avoid a kernel memory discloure via kern.ttys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: df81b15118542f0d2426490bd2605b7abd3c4d71 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=df81b15118542f0d2426490bd2605b7abd3c4d71 commit df81b15118542f0d2426490bd2605b7abd3c4d71 Author: Mark Johnston AuthorDate: 2023-12-11 14:19:09 +0000 Commit: Mark Johnston CommitDate: 2023-12-14 14:29:15 +0000 tty: Avoid a kernel memory discloure via kern.ttys Four pad bytes at the end of each xtty structure were not being cleared before being copied out. Fix this by clearing the whole structure before populating fields. MFC after: 3 days Reported by: KMSAN (cherry picked from commit 3c0fb026b2fc998fa9bea8aed76e96c58671aee3) --- sys/kern/tty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 620233947410..e051c66ab0c9 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1288,6 +1288,7 @@ tty_to_xtty(struct tty *tp, struct xtty *xt) tty_assert_locked(tp); + memset(xt, 0, sizeof(*xt)); xt->xt_size = sizeof(struct xtty); xt->xt_insize = ttyinq_getsize(&tp->t_inq); xt->xt_incc = ttyinq_bytescanonicalized(&tp->t_inq); From nobody Thu Dec 14 14:29:37 2023 X-Original-To: dev-commits-src-all@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 4SrZVn3N97z542f9; Thu, 14 Dec 2023 14:29: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 4SrZVn2pmbz3JJX; Thu, 14 Dec 2023 14:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702564177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JqzxwYQH2LaGW+UGZluR8rb9zWGxvKm7Qt9J5zTFXcs=; b=Wt/Ru/k+sxODx39UI4UF3z84E8kEDVEwWVji5PDH768N5+fxy2YS4FzVFBWZA+7XX6f25R EU7iDI2FdzOY++nqSJqFvH7BBhRJJ7yPgEHQ65YJWEMGFJUKcZ06f9ubM5RRbMvFS8EUYU 08PcRfY0YdxGQPPC51gfxhTgDYoFRc0znH91T2n7/JrDZ65fKG1qRI0TK8pXpw7oCL3RwX WlfJNNEdP+0rU/sg3JcclYJfu4TdTHEDZQy/WQRtEJA1OrA3GlHd7Bqjj+Icf/Bms29jSb OS/vjGxTWNydZVqDlsNTjNFMIqDPexFtyowSa3gHlkHSbK/pNRJrso+4Fm0T5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702564177; a=rsa-sha256; cv=none; b=sfKBTAnaotNdBPDlHXsl7tSvJzEx2LcrzQYjaIkKLrNSy711m8uOpAE+SSUPpihZqFav4o CCKItHIgBQNlNOyygcpz8ySLc7TAFFj2GX+U03sR3JH5NpZXZXseQtGGcjhVxVvxGMb1RM gxesn/5bomQymZISOtt9VbmCHG+QXNnn/Y9UbHbhTgN/t2Vgtm5RX2YHSsSQpI3JNxnjwz LcdeEmtA64PUSouZf6bEseBE0DZ9rD63GX+WTCVrvsx0pvcT6vtmkUTMHvGI2Vz32DZ5yg Eyo3GBEx53A2KyZY0woXYd8eGz/a4Aiv8oergRiFbTFoQ8QNv6r+P4t39g3Phg== 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=1702564177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JqzxwYQH2LaGW+UGZluR8rb9zWGxvKm7Qt9J5zTFXcs=; b=xSgjvopDBr8HGSTPBCJ6fgPuCAJI5PySv+V4H2E6jEy+LA6wJH2oF/5q5P7Sh3BVazQoPq etJuoV1DA5hG41ubCPG69r735td108xpbl/80mjJkuhekazLwV1VVmWhAtd6ybki8TLUz5 QTLGSDfcb+ZiCAWnnsXC/xGdIQi7EwTDk0ebv8vVAU9JcfhRNNA2ESZTtgHwuzMwqNLcom sEsG6G8WXT8g77jO8+cuixTSbbKzgKEjR0Nf6dyVsAiaP20e3WOWAaizzEN/AajjkUrqvE 45Sx1Fe1bG3iVjs8IwZ73KR40j49ytgcVwfOiItFlcv7mUkQPLlyddbh8V7Veg== 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 4SrZVn1sqHzWhW; Thu, 14 Dec 2023 14:29: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 3BEETb3t047093; Thu, 14 Dec 2023 14:29:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEETb6e047090; Thu, 14 Dec 2023 14:29:37 GMT (envelope-from git) Date: Thu, 14 Dec 2023 14:29:37 GMT Message-Id: <202312141429.3BEETb6e047090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 89951a4a11ee - stable/13 - tty: Avoid a kernel memory discloure via kern.ttys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 89951a4a11ee79d13ad472fe003cdf00b4fbe18b Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=89951a4a11ee79d13ad472fe003cdf00b4fbe18b commit 89951a4a11ee79d13ad472fe003cdf00b4fbe18b Author: Mark Johnston AuthorDate: 2023-12-11 14:19:09 +0000 Commit: Mark Johnston CommitDate: 2023-12-14 14:29:28 +0000 tty: Avoid a kernel memory discloure via kern.ttys Four pad bytes at the end of each xtty structure were not being cleared before being copied out. Fix this by clearing the whole structure before populating fields. MFC after: 3 days Reported by: KMSAN (cherry picked from commit 3c0fb026b2fc998fa9bea8aed76e96c58671aee3) --- sys/kern/tty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 00a5670d84cf..eaf69446afa2 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1288,6 +1288,7 @@ tty_to_xtty(struct tty *tp, struct xtty *xt) tty_assert_locked(tp); + memset(xt, 0, sizeof(*xt)); xt->xt_size = sizeof(struct xtty); xt->xt_insize = ttyinq_getsize(&tp->t_inq); xt->xt_incc = ttyinq_bytescanonicalized(&tp->t_inq); From nobody Thu Dec 14 14:29:51 2023 X-Original-To: dev-commits-src-all@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 4SrZW428Ykz54310; Thu, 14 Dec 2023 14:29: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 4SrZW41Fdqz3JpP; Thu, 14 Dec 2023 14:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702564192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ichz8a9cL2doAUHvrKCRORhTX1DX1dZJvjrnsu0IVks=; b=tonTblt/9cUvcpcTL1u+vt9Ql+e7QOo5qFeyFhDljKol8KqEc/5XEHsphflHGRPkpB0EvM tYbChh44xLDIKW9L9ocPU5iv/OWBAOUGeUMHMk1uopERZbry1ysT4f4v1+VtTZwbk0eSGO 6jJpnhw98nrcw4Q7sOo1rkVhLgz6/fBZ07X6iBB3eW/xKW3udaufLgSmZcwfyKE0yITQl9 ux/8BzRvQj5kFCxBBD+ynci3WoEKokYlSPlSmI9hYULlWA4lipTYm2o3bmklIacjV6C/hv WHE+28Zoh1Im1RVBGBMz6AMiN1yrUcEkSRZzWVbqRaslZocJNu4vg8LnwhqxEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702564192; a=rsa-sha256; cv=none; b=QsKWjvNX/j+WQEHW60tf9SwLaOtzw840SaLwWePG1hfOLIckPsU/LHAhDrE42JQ/hWG6cO jro2STuQ7gCXCz1Ae1x51O3LtJCpF3B1GggBlFFbvQRdHmrP7HTTQx/2j0gkT+J3/SXBH/ goCIskqTbpQHgsWKP5kaKJgWv0YeWRFo+ng2FwG4RgsoUOwtBUZNvclBiAIvLFYDE03xec r2r3Lypo7NHPR6VKA+NL75H1PWsoTyJMEPILAt/2Uzy7cignROYXQz+6U/nK3N+gMglyBF cjcc1Nx6A6RTOKFkcEpgKC+0zX850SxKW3lDnn1sQCTyfnoX1yYZj5iOU/nVNg== 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=1702564192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ichz8a9cL2doAUHvrKCRORhTX1DX1dZJvjrnsu0IVks=; b=byy0v+hSbbuNbxa7MplV4fXvrY1ykbEWKJSTOBgq7b1cShAZvujIOUs+YDa7JDX5KDx8m1 0Pj2IbkBQZlndRr2+nJRaAeUH0gFfyCuAAh0DWgCyPvtEdVHZzGjraksjr3hNOiwWrSkv2 wqZzINKHy4k6HW7n1tFC5gT22hvSCI9SiIPtLhhPQUd8zkZRFNJS4gxSIQ6A6ShEK7jjyM WrV4IVx4C5RY0C5p9zOfE/JA2fjUZcT5b5QNTxn6isO+qsvkpX7DeBPepF/aFnfkd2ULf5 bBn3Wde7ReH75gA/LVL4kECbXK3HkW8aKso+fKQZyi3QwtXfGctY45ljbr3ThQ== 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 4SrZW40K4NzWhX; Thu, 14 Dec 2023 14:29: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 3BEETp1Y047274; Thu, 14 Dec 2023 14:29:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEETpRJ047271; Thu, 14 Dec 2023 14:29:51 GMT (envelope-from git) Date: Thu, 14 Dec 2023 14:29:51 GMT Message-Id: <202312141429.3BEETpRJ047271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d76303c9d326 - stable/12 - tty: Avoid a kernel memory discloure via kern.ttys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/12 X-Git-Reftype: branch X-Git-Commit: d76303c9d326f1543fbe64f98b8a875228020910 Auto-Submitted: auto-generated The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d76303c9d326f1543fbe64f98b8a875228020910 commit d76303c9d326f1543fbe64f98b8a875228020910 Author: Mark Johnston AuthorDate: 2023-12-11 14:19:09 +0000 Commit: Mark Johnston CommitDate: 2023-12-14 14:29:42 +0000 tty: Avoid a kernel memory discloure via kern.ttys Four pad bytes at the end of each xtty structure were not being cleared before being copied out. Fix this by clearing the whole structure before populating fields. MFC after: 3 days Reported by: KMSAN (cherry picked from commit 3c0fb026b2fc998fa9bea8aed76e96c58671aee3) --- sys/kern/tty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index f80ffd4921e6..c63a03183f1b 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1279,6 +1279,7 @@ tty_to_xtty(struct tty *tp, struct xtty *xt) tty_assert_locked(tp); + memset(xt, 0, sizeof(*xt)); xt->xt_size = sizeof(struct xtty); xt->xt_insize = ttyinq_getsize(&tp->t_inq); xt->xt_incc = ttyinq_bytescanonicalized(&tp->t_inq); From nobody Thu Dec 14 14:43:29 2023 X-Original-To: dev-commits-src-all@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 4SrZpp1WWZz543bC; Thu, 14 Dec 2023 14:43:30 +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 4SrZpp197Mz3Kpr; Thu, 14 Dec 2023 14:43:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702565010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qCStRFUtVtKgq7ku8PLqaYLRJxU0j2/A7UJLM/QNork=; b=uLgqPI7BM5wZgp0tv8T559BedGLv/sQxN5CZsqyiQDFfjVcBFPGTzdC48uZ6jG8+k4iY29 JokKYREJyhFuHufEH7jYietrueuJwIWyliG+OS2EJypkv5WDxtnyKuPCNOpx4PwBRR1o0/ e2o+ewhSbN6UgIz8G0MKzvZBvKj3w8Dt+EFez0xDpdPNNarFyMfqAsoPYiP0BOjsS2XxXR dq504GA+x650OpaZRgWn/+2jD4t111vQw4vUXA/NgyB7mSEFKJe6gboFNLI1JVIX/t84Rd NxVBAQz0i/LTZZYKNkVAXWSJzmVxErFtycebYRVnVaFDvuR1FCOsPCpk+SASVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702565010; a=rsa-sha256; cv=none; b=R0HeYf0aGDhA6dGGaCOQWCgu4Cc5ECHA1qQ9itdw1f7Ubt6sdQKsB9BCT7NAgqZ1GcQJ2S fcvNxtfXA2TUon785zOOdv0VtXDiKI7NVUNE70A7uz6GPl/jQYoGzqvU/C/BXcV/bNj6GK Io3f/T1ySI6/TG2qb9Gj+2QB9skR6HSdiVS3+us2/l3d0Wmj3V0Vk3W/OfoVc6/RE8e49H V7HiVZ5jjrNWXDCKUDoEQtcjg3BViEmiCRFnzB72UY+C5w7q2yH+rjG+J3dGQPVUeYJ8xq 38Ji8kjzRW1MJ3UG9NISpw5Lw+0RKnUuGlhBqs8y1WK5k5ydq342qbn8bYD0pw== 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=1702565010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qCStRFUtVtKgq7ku8PLqaYLRJxU0j2/A7UJLM/QNork=; b=lsdf0oJF3CkZQd8NB6a0lWdjRJPsI0BLW+pPlv1gvby5xkEPQSbVTY5zGpjsmYGJWE/7qx WPwIOdCzy8T8P6o0poT8UMcasJ6cYYnl4sO/1v4f7/uwYBE+Mw8hb3aUi1ZTwVayE7gled tWegpJC82We4a238qPGTIRRcZ8Evik0YDicDIG8wF/ZAbRLdr4ZykPBOQbolXoCiH868wz RuGJU7t/kmBbSxgaLITXqdHndXEji1CSCX1C6DKcxlJInH3pxd3zOmPwMeFaiQsjM1odxj iikKSfceI/jEFlp/WYWTFQxH//1wQfLc5Ldlx8VmWU8dYlMlnQkfLyOrex0tXA== 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 4SrZpp0BZMzXKd; Thu, 14 Dec 2023 14:43:30 +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 3BEEhTZ3079666; Thu, 14 Dec 2023 14:43:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEEhTxK079663; Thu, 14 Dec 2023 14:43:29 GMT (envelope-from git) Date: Thu, 14 Dec 2023 14:43:29 GMT Message-Id: <202312141443.3BEEhTxK079663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 40993deee7d6 - stable/14 - bhyve: Split backends into separate files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 40993deee7d624ccea318881b60c779ee4306c2d Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=40993deee7d624ccea318881b60c779ee4306c2d commit 40993deee7d624ccea318881b60c779ee4306c2d Author: Mark Johnston AuthorDate: 2023-11-22 19:10:27 +0000 Commit: Mark Johnston CommitDate: 2023-12-14 14:43:02 +0000 bhyve: Split backends into separate files Currently the net_backend structure definition is private to net_backends.c, so all of the backend definitions are there. While adding a new backend to use libslirp, it was noted that this file is somewhat cluttered. Move the netmap and netgraph backends to their own files and clean up includes a bit. No functional change intended. Reviewed by: corvink, jhb MFC after: 3 weeks Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D42689 (cherry picked from commit be74aede49fb480792448bf563c5079998de7cbd) --- usr.sbin/bhyve/Makefile | 5 +- usr.sbin/bhyve/net_backend_netgraph.c | 191 ++++++++++ usr.sbin/bhyve/net_backend_netmap.c | 384 ++++++++++++++++++++ usr.sbin/bhyve/net_backends.c | 661 +--------------------------------- usr.sbin/bhyve/net_backends.h | 7 +- usr.sbin/bhyve/net_backends_priv.h | 152 ++++++++ 6 files changed, 756 insertions(+), 644 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index de8e87d2ad49..6ce7f6c7ba62 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -33,6 +33,7 @@ SRCS= \ iov.c \ mem.c \ mevent.c \ + net_backend_netmap.c \ net_backends.c \ net_utils.c \ pci_emul.c \ @@ -92,8 +93,8 @@ CFLAGS+=-DINET CFLAGS+=-DINET6 .endif .if ${MK_NETGRAPH_SUPPORT} != "no" -CFLAGS+=-DNETGRAPH -LIBADD+= netgraph +SRCS+= net_backend_netgraph.c +LIBADD+= netgraph .endif .if ${MK_OPENSSL} == "no" CFLAGS+=-DNO_OPENSSL diff --git a/usr.sbin/bhyve/net_backend_netgraph.c b/usr.sbin/bhyve/net_backend_netgraph.c new file mode 100644 index 000000000000..7d1659d611e3 --- /dev/null +++ b/usr.sbin/bhyve/net_backend_netgraph.c @@ -0,0 +1,191 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Vincenzo Maffione + * + * 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. + */ + +#ifndef WITHOUT_CAPSICUM +#include +#endif +#include +#include + +#ifndef WITHOUT_CAPSICUM +#include +#endif +#include +#include +#include +#include +#include + +#include "config.h" +#include "debug.h" +#include "net_backends.h" +#include "net_backends_priv.h" + +#define NG_SBUF_MAX_SIZE (4 * 1024 * 1024) + +static int +ng_init(struct net_backend *be, const char *devname __unused, + nvlist_t *nvl, net_be_rxeof_t cb, void *param) +{ + struct tap_priv *p = NET_BE_PRIV(be); + struct ngm_connect ngc; + const char *value, *nodename; + int sbsz; + int ctrl_sock; + int flags; + unsigned long maxsbsz; + size_t msbsz; +#ifndef WITHOUT_CAPSICUM + cap_rights_t rights; +#endif + + if (cb == NULL) { + EPRINTLN("Netgraph backend requires non-NULL callback"); + return (-1); + } + + be->fd = -1; + + memset(&ngc, 0, sizeof(ngc)); + + value = get_config_value_node(nvl, "path"); + if (value == NULL) { + EPRINTLN("path must be provided"); + return (-1); + } + strncpy(ngc.path, value, NG_PATHSIZ - 1); + + value = get_config_value_node(nvl, "hook"); + if (value == NULL) + value = "vmlink"; + strncpy(ngc.ourhook, value, NG_HOOKSIZ - 1); + + value = get_config_value_node(nvl, "peerhook"); + if (value == NULL) { + EPRINTLN("peer hook must be provided"); + return (-1); + } + strncpy(ngc.peerhook, value, NG_HOOKSIZ - 1); + + nodename = get_config_value_node(nvl, "socket"); + if (NgMkSockNode(nodename, + &ctrl_sock, &be->fd) < 0) { + EPRINTLN("can't get Netgraph sockets"); + return (-1); + } + + if (NgSendMsg(ctrl_sock, ".", + NGM_GENERIC_COOKIE, + NGM_CONNECT, &ngc, sizeof(ngc)) < 0) { + EPRINTLN("can't connect to node"); + close(ctrl_sock); + goto error; + } + + close(ctrl_sock); + + flags = fcntl(be->fd, F_GETFL); + + if (flags < 0) { + EPRINTLN("can't get socket flags"); + goto error; + } + + if (fcntl(be->fd, F_SETFL, flags | O_NONBLOCK) < 0) { + EPRINTLN("can't set O_NONBLOCK flag"); + goto error; + } + + /* + * The default ng_socket(4) buffer's size is too low. + * Calculate the minimum value between NG_SBUF_MAX_SIZE + * and kern.ipc.maxsockbuf. + */ + msbsz = sizeof(maxsbsz); + if (sysctlbyname("kern.ipc.maxsockbuf", &maxsbsz, &msbsz, + NULL, 0) < 0) { + EPRINTLN("can't get 'kern.ipc.maxsockbuf' value"); + goto error; + } + + /* + * We can't set the socket buffer size to kern.ipc.maxsockbuf value, + * as it takes into account the mbuf(9) overhead. + */ + maxsbsz = maxsbsz * MCLBYTES / (MSIZE + MCLBYTES); + + sbsz = MIN(NG_SBUF_MAX_SIZE, maxsbsz); + + if (setsockopt(be->fd, SOL_SOCKET, SO_SNDBUF, &sbsz, + sizeof(sbsz)) < 0) { + EPRINTLN("can't set TX buffer size"); + goto error; + } + + if (setsockopt(be->fd, SOL_SOCKET, SO_RCVBUF, &sbsz, + sizeof(sbsz)) < 0) { + EPRINTLN("can't set RX buffer size"); + goto error; + } + +#ifndef WITHOUT_CAPSICUM + cap_rights_init(&rights, CAP_EVENT, CAP_READ, CAP_WRITE); + if (caph_rights_limit(be->fd, &rights) == -1) + errx(EX_OSERR, "Unable to apply rights for sandbox"); +#endif + + memset(p->bbuf, 0, sizeof(p->bbuf)); + p->bbuflen = 0; + + p->mevp = mevent_add_disabled(be->fd, EVF_READ, cb, param); + if (p->mevp == NULL) { + EPRINTLN("Could not register event"); + goto error; + } + + return (0); + +error: + tap_cleanup(be); + return (-1); +} + +static struct net_backend ng_backend = { + .prefix = "netgraph", + .priv_size = sizeof(struct tap_priv), + .init = ng_init, + .cleanup = tap_cleanup, + .send = tap_send, + .peek_recvlen = tap_peek_recvlen, + .recv = tap_recv, + .recv_enable = tap_recv_enable, + .recv_disable = tap_recv_disable, + .get_cap = tap_get_cap, + .set_cap = tap_set_cap, +}; + +DATA_SET(net_backend_set, ng_backend); diff --git a/usr.sbin/bhyve/net_backend_netmap.c b/usr.sbin/bhyve/net_backend_netmap.c new file mode 100644 index 000000000000..5ba11b96797c --- /dev/null +++ b/usr.sbin/bhyve/net_backend_netmap.c @@ -0,0 +1,384 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Vincenzo Maffione + * + * 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 +#define NETMAP_WITH_LIBS +#include + +#include + +#include "debug.h" +#include "iov.h" +#include "mevent.h" +#include "net_backends.h" +#include "net_backends_priv.h" + +/* The virtio-net features supported by netmap. */ +#define NETMAP_FEATURES (VIRTIO_NET_F_CSUM | VIRTIO_NET_F_HOST_TSO4 | \ + VIRTIO_NET_F_HOST_TSO6 | VIRTIO_NET_F_HOST_UFO | \ + VIRTIO_NET_F_GUEST_CSUM | VIRTIO_NET_F_GUEST_TSO4 | \ + VIRTIO_NET_F_GUEST_TSO6 | VIRTIO_NET_F_GUEST_UFO) + +struct netmap_priv { + char ifname[IFNAMSIZ]; + struct nm_desc *nmd; + uint16_t memid; + struct netmap_ring *rx; + struct netmap_ring *tx; + struct mevent *mevp; + net_be_rxeof_t cb; + void *cb_param; +}; + +static void +nmreq_init(struct nmreq *req, char *ifname) +{ + + memset(req, 0, sizeof(*req)); + strlcpy(req->nr_name, ifname, sizeof(req->nr_name)); + req->nr_version = NETMAP_API; +} + +static int +netmap_set_vnet_hdr_len(struct net_backend *be, int vnet_hdr_len) +{ + int err; + struct nmreq req; + struct netmap_priv *priv = NET_BE_PRIV(be); + + nmreq_init(&req, priv->ifname); + req.nr_cmd = NETMAP_BDG_VNET_HDR; + req.nr_arg1 = vnet_hdr_len; + err = ioctl(be->fd, NIOCREGIF, &req); + if (err) { + EPRINTLN("Unable to set vnet header length %d", vnet_hdr_len); + return (err); + } + + be->be_vnet_hdr_len = vnet_hdr_len; + + return (0); +} + +static int +netmap_has_vnet_hdr_len(struct net_backend *be, unsigned vnet_hdr_len) +{ + unsigned prev_hdr_len = be->be_vnet_hdr_len; + int ret; + + if (vnet_hdr_len == prev_hdr_len) { + return (1); + } + + ret = netmap_set_vnet_hdr_len(be, vnet_hdr_len); + if (ret) { + return (0); + } + + netmap_set_vnet_hdr_len(be, prev_hdr_len); + + return (1); +} + +static uint64_t +netmap_get_cap(struct net_backend *be) +{ + + return (netmap_has_vnet_hdr_len(be, VNET_HDR_LEN) ? + NETMAP_FEATURES : 0); +} + +static int +netmap_set_cap(struct net_backend *be, uint64_t features __unused, + unsigned vnet_hdr_len) +{ + + return (netmap_set_vnet_hdr_len(be, vnet_hdr_len)); +} + +static int +netmap_init(struct net_backend *be, const char *devname, + nvlist_t *nvl __unused, net_be_rxeof_t cb, void *param) +{ + struct netmap_priv *priv = NET_BE_PRIV(be); + + strlcpy(priv->ifname, devname, sizeof(priv->ifname)); + priv->ifname[sizeof(priv->ifname) - 1] = '\0'; + + priv->nmd = nm_open(priv->ifname, NULL, NETMAP_NO_TX_POLL, NULL); + if (priv->nmd == NULL) { + EPRINTLN("Unable to nm_open(): interface '%s', errno (%s)", + devname, strerror(errno)); + return (-1); + } + + priv->memid = priv->nmd->req.nr_arg2; + priv->tx = NETMAP_TXRING(priv->nmd->nifp, 0); + priv->rx = NETMAP_RXRING(priv->nmd->nifp, 0); + priv->cb = cb; + priv->cb_param = param; + be->fd = priv->nmd->fd; + + priv->mevp = mevent_add_disabled(be->fd, EVF_READ, cb, param); + if (priv->mevp == NULL) { + EPRINTLN("Could not register event"); + return (-1); + } + + return (0); +} + +static void +netmap_cleanup(struct net_backend *be) +{ + struct netmap_priv *priv = NET_BE_PRIV(be); + + if (priv->mevp) { + mevent_delete(priv->mevp); + } + if (priv->nmd) { + nm_close(priv->nmd); + } + be->fd = -1; +} + +static ssize_t +netmap_send(struct net_backend *be, const struct iovec *iov, + int iovcnt) +{ + struct netmap_priv *priv = NET_BE_PRIV(be); + struct netmap_ring *ring; + ssize_t totlen = 0; + int nm_buf_size; + int nm_buf_len; + uint32_t head; + uint8_t *nm_buf; + int j; + + ring = priv->tx; + head = ring->head; + if (head == ring->tail) { + EPRINTLN("No space, drop %zu bytes", count_iov(iov, iovcnt)); + goto txsync; + } + nm_buf = NETMAP_BUF(ring, ring->slot[head].buf_idx); + nm_buf_size = ring->nr_buf_size; + nm_buf_len = 0; + + for (j = 0; j < iovcnt; j++) { + uint8_t *iov_frag_buf = iov[j].iov_base; + int iov_frag_size = iov[j].iov_len; + + totlen += iov_frag_size; + + /* + * Split each iovec fragment over more netmap slots, if + * necessary. + */ + for (;;) { + int copylen; + + copylen = iov_frag_size < nm_buf_size ? iov_frag_size : nm_buf_size; + memcpy(nm_buf, iov_frag_buf, copylen); + + iov_frag_buf += copylen; + iov_frag_size -= copylen; + nm_buf += copylen; + nm_buf_size -= copylen; + nm_buf_len += copylen; + + if (iov_frag_size == 0) { + break; + } + + ring->slot[head].len = nm_buf_len; + ring->slot[head].flags = NS_MOREFRAG; + head = nm_ring_next(ring, head); + if (head == ring->tail) { + /* + * We ran out of netmap slots while + * splitting the iovec fragments. + */ + EPRINTLN("No space, drop %zu bytes", + count_iov(iov, iovcnt)); + goto txsync; + } + nm_buf = NETMAP_BUF(ring, ring->slot[head].buf_idx); + nm_buf_size = ring->nr_buf_size; + nm_buf_len = 0; + } + } + + /* Complete the last slot, which must not have NS_MOREFRAG set. */ + ring->slot[head].len = nm_buf_len; + ring->slot[head].flags = 0; + head = nm_ring_next(ring, head); + + /* Now update ring->head and ring->cur. */ + ring->head = ring->cur = head; +txsync: + ioctl(be->fd, NIOCTXSYNC, NULL); + + return (totlen); +} + +static ssize_t +netmap_peek_recvlen(struct net_backend *be) +{ + struct netmap_priv *priv = NET_BE_PRIV(be); + struct netmap_ring *ring = priv->rx; + uint32_t head = ring->head; + ssize_t totlen = 0; + + while (head != ring->tail) { + struct netmap_slot *slot = ring->slot + head; + + totlen += slot->len; + if ((slot->flags & NS_MOREFRAG) == 0) + break; + head = nm_ring_next(ring, head); + } + + return (totlen); +} + +static ssize_t +netmap_recv(struct net_backend *be, const struct iovec *iov, int iovcnt) +{ + struct netmap_priv *priv = NET_BE_PRIV(be); + struct netmap_slot *slot = NULL; + struct netmap_ring *ring; + uint8_t *iov_frag_buf; + int iov_frag_size; + ssize_t totlen = 0; + uint32_t head; + + assert(iovcnt); + + ring = priv->rx; + head = ring->head; + iov_frag_buf = iov->iov_base; + iov_frag_size = iov->iov_len; + + do { + uint8_t *nm_buf; + int nm_buf_len; + + if (head == ring->tail) { + return (0); + } + + slot = ring->slot + head; + nm_buf = NETMAP_BUF(ring, slot->buf_idx); + nm_buf_len = slot->len; + + for (;;) { + int copylen = nm_buf_len < iov_frag_size ? + nm_buf_len : iov_frag_size; + + memcpy(iov_frag_buf, nm_buf, copylen); + nm_buf += copylen; + nm_buf_len -= copylen; + iov_frag_buf += copylen; + iov_frag_size -= copylen; + totlen += copylen; + + if (nm_buf_len == 0) { + break; + } + + iov++; + iovcnt--; + if (iovcnt == 0) { + /* No space to receive. */ + EPRINTLN("Short iov, drop %zd bytes", + totlen); + return (-ENOSPC); + } + iov_frag_buf = iov->iov_base; + iov_frag_size = iov->iov_len; + } + + head = nm_ring_next(ring, head); + + } while (slot->flags & NS_MOREFRAG); + + /* Release slots to netmap. */ + ring->head = ring->cur = head; + + return (totlen); +} + +static void +netmap_recv_enable(struct net_backend *be) +{ + struct netmap_priv *priv = NET_BE_PRIV(be); + + mevent_enable(priv->mevp); +} + +static void +netmap_recv_disable(struct net_backend *be) +{ + struct netmap_priv *priv = NET_BE_PRIV(be); + + mevent_disable(priv->mevp); +} + +static struct net_backend netmap_backend = { + .prefix = "netmap", + .priv_size = sizeof(struct netmap_priv), + .init = netmap_init, + .cleanup = netmap_cleanup, + .send = netmap_send, + .peek_recvlen = netmap_peek_recvlen, + .recv = netmap_recv, + .recv_enable = netmap_recv_enable, + .recv_disable = netmap_recv_disable, + .get_cap = netmap_get_cap, + .set_cap = netmap_set_cap, +}; + +/* A clone of the netmap backend, with a different prefix. */ +static struct net_backend vale_backend = { + .prefix = "vale", + .priv_size = sizeof(struct netmap_priv), + .init = netmap_init, + .cleanup = netmap_cleanup, + .send = netmap_send, + .peek_recvlen = netmap_peek_recvlen, + .recv = netmap_recv, + .recv_enable = netmap_recv_enable, + .recv_disable = netmap_recv_disable, + .get_cap = netmap_get_cap, + .set_cap = netmap_set_cap, +}; + +DATA_SET(net_backend_set, netmap_backend); +DATA_SET(net_backend_set, vale_backend); diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index de6afab53854..2d11c45f217a 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -32,8 +32,7 @@ * features) is exported by net_backends.h. */ -#include -#include /* u_short etc */ +#include #ifndef WITHOUT_CAPSICUM #include #endif @@ -43,153 +42,35 @@ #include #include -#include -#include -#define NETMAP_WITH_LIBS -#include +#include #ifndef WITHOUT_CAPSICUM #include #endif #include #include #include +#include +#include +#include #include #include #include #include -#include #include -#include -#include -#include -#include -#include - -#ifdef NETGRAPH -#include -#include -#include -#endif +#include #include "config.h" #include "debug.h" #include "iov.h" #include "mevent.h" #include "net_backends.h" +#include "net_backends_priv.h" #include "pci_emul.h" -#include - -/* - * Each network backend registers a set of function pointers that are - * used to implement the net backends API. - * This might need to be exposed if we implement backends in separate files. - */ -struct net_backend { - const char *prefix; /* prefix matching this backend */ - - /* - * Routines used to initialize and cleanup the resources needed - * by a backend. The cleanup function is used internally, - * and should not be called by the frontend. - */ - int (*init)(struct net_backend *be, const char *devname, - nvlist_t *nvl, net_be_rxeof_t cb, void *param); - void (*cleanup)(struct net_backend *be); - - /* - * Called to serve a guest transmit request. The scatter-gather - * vector provided by the caller has 'iovcnt' elements and contains - * the packet to send. - */ - ssize_t (*send)(struct net_backend *be, const struct iovec *iov, - int iovcnt); - - /* - * Get the length of the next packet that can be received from - * the backend. If no packets are currently available, this - * function returns 0. - */ - ssize_t (*peek_recvlen)(struct net_backend *be); - - /* - * Called to receive a packet from the backend. When the function - * returns a positive value 'len', the scatter-gather vector - * provided by the caller contains a packet with such length. - * The function returns 0 if the backend doesn't have a new packet to - * receive. - */ - ssize_t (*recv)(struct net_backend *be, const struct iovec *iov, - int iovcnt); - - /* - * Ask the backend to enable or disable receive operation in the - * backend. On return from a disable operation, it is guaranteed - * that the receive callback won't be called until receive is - * enabled again. Note however that it is up to the caller to make - * sure that netbe_recv() is not currently being executed by another - * thread. - */ - void (*recv_enable)(struct net_backend *be); - void (*recv_disable)(struct net_backend *be); - - /* - * Ask the backend for the virtio-net features it is able to - * support. Possible features are TSO, UFO and checksum offloading - * in both rx and tx direction and for both IPv4 and IPv6. - */ - uint64_t (*get_cap)(struct net_backend *be); - - /* - * Tell the backend to enable/disable the specified virtio-net - * features (capabilities). - */ - int (*set_cap)(struct net_backend *be, uint64_t features, - unsigned int vnet_hdr_len); - - struct pci_vtnet_softc *sc; - int fd; - - /* - * Length of the virtio-net header used by the backend and the - * frontend, respectively. A zero value means that the header - * is not used. - */ - unsigned int be_vnet_hdr_len; - unsigned int fe_vnet_hdr_len; - - /* Size of backend-specific private data. */ - size_t priv_size; - - /* Backend-specific private data follows. */ -}; - -#define NET_BE_PRIV(be) ((void *)((be) + 1)) #define NET_BE_SIZE(be) (sizeof(*be) + (be)->priv_size) -SET_DECLARE(net_backend_set, struct net_backend); - -#define VNET_HDR_LEN sizeof(struct virtio_net_rxhdr) - -#define WPRINTF(params) PRINTLN params - -/* - * The tap backend - */ - -struct tap_priv { - struct mevent *mevp; - /* - * A bounce buffer that allows us to implement the peek_recvlen - * callback. In the future we may get the same information from - * the kevent data. - */ - char bbuf[1 << 16]; - ssize_t bbuflen; -}; - -static void +void tap_cleanup(struct net_backend *be) { struct tap_priv *priv = NET_BE_PRIV(be); @@ -216,7 +97,7 @@ tap_init(struct net_backend *be, const char *devname, #endif if (cb == NULL) { - WPRINTF(("TAP backend requires non-NULL callback")); + EPRINTLN("TAP backend requires non-NULL callback"); return (-1); } @@ -225,7 +106,7 @@ tap_init(struct net_backend *be, const char *devname, be->fd = open(tbuf, O_RDWR); if (be->fd == -1) { - WPRINTF(("open of tap device %s failed", tbuf)); + EPRINTLN("open of tap device %s failed", tbuf); goto error; } @@ -234,12 +115,12 @@ tap_init(struct net_backend *be, const char *devname, * notifications with the event loop */ if (ioctl(be->fd, FIONBIO, &opt) < 0) { - WPRINTF(("tap device O_NONBLOCK failed")); + EPRINTLN("tap device O_NONBLOCK failed"); goto error; } if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, up)) { - WPRINTF(("tap device link up failed")); + EPRINTLN("tap device link up failed"); goto error; } @@ -254,7 +135,7 @@ tap_init(struct net_backend *be, const char *devname, priv->mevp = mevent_add_disabled(be->fd, EVF_READ, cb, param); if (priv->mevp == NULL) { - WPRINTF(("Could not register event")); + EPRINTLN("Could not register event"); goto error; } @@ -268,13 +149,13 @@ error: /* * Called to send a buffer chain out to the tap device */ -static ssize_t +ssize_t tap_send(struct net_backend *be, const struct iovec *iov, int iovcnt) { return (writev(be->fd, iov, iovcnt)); } -static ssize_t +ssize_t tap_peek_recvlen(struct net_backend *be) { struct tap_priv *priv = NET_BE_PRIV(be); @@ -304,7 +185,7 @@ tap_peek_recvlen(struct net_backend *be) return (ret); } -static ssize_t +ssize_t tap_recv(struct net_backend *be, const struct iovec *iov, int iovcnt) { struct tap_priv *priv = NET_BE_PRIV(be); @@ -332,7 +213,7 @@ tap_recv(struct net_backend *be, const struct iovec *iov, int iovcnt) return (ret); } -static void +void tap_recv_enable(struct net_backend *be) { struct tap_priv *priv = NET_BE_PRIV(be); @@ -340,7 +221,7 @@ tap_recv_enable(struct net_backend *be) mevent_enable(priv->mevp); } -static void +void tap_recv_disable(struct net_backend *be) { struct tap_priv *priv = NET_BE_PRIV(be); @@ -348,14 +229,14 @@ tap_recv_disable(struct net_backend *be) mevent_disable(priv->mevp); } -static uint64_t +uint64_t tap_get_cap(struct net_backend *be __unused) { return (0); /* no capabilities for now */ } -static int +int tap_set_cap(struct net_backend *be __unused, uint64_t features, unsigned vnet_hdr_len) { @@ -395,508 +276,6 @@ static struct net_backend vmnet_backend = { DATA_SET(net_backend_set, tap_backend); DATA_SET(net_backend_set, vmnet_backend); -#ifdef NETGRAPH - -/* - * Netgraph backend - */ - -#define NG_SBUF_MAX_SIZE (4 * 1024 * 1024) - -static int -ng_init(struct net_backend *be, const char *devname __unused, - nvlist_t *nvl, net_be_rxeof_t cb, void *param) -{ - struct tap_priv *p = NET_BE_PRIV(be); - struct ngm_connect ngc; - const char *value, *nodename; - int sbsz; - int ctrl_sock; - int flags; - unsigned long maxsbsz; - size_t msbsz; -#ifndef WITHOUT_CAPSICUM - cap_rights_t rights; -#endif - - if (cb == NULL) { - WPRINTF(("Netgraph backend requires non-NULL callback")); - return (-1); - } - - be->fd = -1; - - memset(&ngc, 0, sizeof(ngc)); - - value = get_config_value_node(nvl, "path"); - if (value == NULL) { - WPRINTF(("path must be provided")); - return (-1); - } - strncpy(ngc.path, value, NG_PATHSIZ - 1); - - value = get_config_value_node(nvl, "hook"); - if (value == NULL) - value = "vmlink"; - strncpy(ngc.ourhook, value, NG_HOOKSIZ - 1); - - value = get_config_value_node(nvl, "peerhook"); - if (value == NULL) { - WPRINTF(("peer hook must be provided")); - return (-1); - } - strncpy(ngc.peerhook, value, NG_HOOKSIZ - 1); - - nodename = get_config_value_node(nvl, "socket"); - if (NgMkSockNode(nodename, - &ctrl_sock, &be->fd) < 0) { - WPRINTF(("can't get Netgraph sockets")); - return (-1); - } - - if (NgSendMsg(ctrl_sock, ".", - NGM_GENERIC_COOKIE, - NGM_CONNECT, &ngc, sizeof(ngc)) < 0) { *** 625 LINES SKIPPED *** From nobody Thu Dec 14 14:44:46 2023 X-Original-To: dev-commits-src-all@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 4SrZrG2fj8z54421; Thu, 14 Dec 2023 14:44: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 4SrZrG254Jz3LLB; Thu, 14 Dec 2023 14:44:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702565086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njNz3A7LsNh84rfHYv/cepWKOvRj+mzZ2CCdkkRHAeo=; b=vIcGkTs4prHggR2BfaNAfDowh2qpdOYxaHGRPmGyZR9GXQRVw9PL9SS2h2/5AjH4YBhben kw834hCh23KG4FM/7/bMT5JJ8qAjhI2YzLTzAhVhLtlZGnHE0S0lOBLKYpZIyGhE+8ag2F yerN48mEYbjQ+a9jhrgIwCLgjzGMRPBhJkOzbJu1OVJud+NJExdf0rwj1sdT1oV5cjkCxF TQiq2Lev90mNzWjpePawDKDYfEs8MdszbtsRDxGT6YS+d2yx5Lt1EmcBZRg93YvVLlOaSa G3GxpdDpjuBlm4p5A24yijTUTZJrmKv2undJN/YUC6W4mlnqiwrV4IAjoMCOQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702565086; a=rsa-sha256; cv=none; b=jD4D3AKqQSjMsBi2p7evUmSMeG2ZOVnLTIEb+QfB6qCPQw9pQxbr5gztGkYQ6eI1mjcUpe VhtG0iWjxcBXVZAVOXwlEPvyU3MmPHdXuYwQIWgSEZHzEEqBB5XyiHEojERnGvpeyomaGm pECrp4NYycOFCCdWpO3CK0xlG9BSOq5MiWaD79gtWDUZDP2/p6RaB+sM/xfkDZGNCOVL7T IJoOoVUirSZ+5iAKZVrbBT8zrv5eMY0cMvcsTahxI3VwuAb/h78S9jPkyKlFcZlAAlO18j j1CYJD2LlNKb7hQ2mXfGN3tnueMPZ+4Eayqj720uut9yUQeuuBAD+v3w8UPvWQ== 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=1702565086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njNz3A7LsNh84rfHYv/cepWKOvRj+mzZ2CCdkkRHAeo=; b=BX59UFS++/oqea3NZE3h2+e5nDZ0mOoy2Iow0C1Wxip490jxEn+W3YSqArdmlUM8CI22Un F+O+XpwYeU0iddt0EKTliMv4A8jYAFo5OMxer1Qd1PiXh37+syIRkEP0gj0qxQon/V/YNY mv6400m6jnpEzL6V83HwZOptp3mRoD8ntdI9upYthfrUvd6BK6oISHarlSLnzpPZXuTYRX 9vvCnKKiUtYj1CSVhSWlJvP6CaYy9XRq0wuRyu/W9HuDzcBrfXQf0a5TxgbVqctN2FO2UK mc6iDM3ORhcAMr1E+EuapXJ0mQYy+r3iiWDvG0ma3OA3e7XH9jp9lSTk+SXMnQ== 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 4SrZrG17GJzXJd; Thu, 14 Dec 2023 14:44: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 3BEEikAc079971; Thu, 14 Dec 2023 14:44:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEEikVU079968; Thu, 14 Dec 2023 14:44:46 GMT (envelope-from git) Date: Thu, 14 Dec 2023 14:44:46 GMT Message-Id: <202312141444.3BEEikVU079968@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c07ebf5becae - stable/14 - kmsan: Add kmsan_check_uio() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c07ebf5becae76dd9843b8a835df9f7ccd65e897 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c07ebf5becae76dd9843b8a835df9f7ccd65e897 commit c07ebf5becae76dd9843b8a835df9f7ccd65e897 Author: Mark Johnston AuthorDate: 2023-12-06 16:31:15 +0000 Commit: Mark Johnston CommitDate: 2023-12-14 14:44:38 +0000 kmsan: Add kmsan_check_uio() This was handy for some ad-hoc debugging and fits in with other kmsan_check_*() routines which operate on some kind of data container. MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit be5464ae233ada46a778cc82f7107a10a7d5343b) --- share/man/man9/Makefile | 1 + share/man/man9/kmsan.9 | 5 ++++- sys/kern/subr_msan.c | 9 +++++++++ sys/sys/msan.h | 3 +++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index c82ce254f681..99ec5219d8e0 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1369,6 +1369,7 @@ MLINKS+=kmsan.9 KMSAN.9 \ kmsan.9 kmsan_check_bio.9 \ kmsan.9 kmsan_check_ccb.9 \ kmsan.9 kmsan_check_mbuf.9 \ + kmsan.9 kmsan_check_uio.9 \ kmsan.9 kmsan_mark.9 \ kmsan.9 kmsan_oirg.9 MLINKS+=kobj.9 DEFINE_CLASS.9 \ diff --git a/share/man/man9/kmsan.9 b/share/man/man9/kmsan.9 index 714442e4d9fe..90faf8f82e5e 100644 --- a/share/man/man9/kmsan.9 +++ b/share/man/man9/kmsan.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 13, 2023 +.Dd December 6, 2023 .Dt KMSAN 9 .Os .Sh NAME @@ -56,6 +56,8 @@ kernel configuration file: .Fn kmsan_check_ccb "const union ccb *" "const char *descr" .Ft void .Fn kmsan_check_mbuf "const struct mbuf *" "const char *descr" +.Ft void +.Fn kmsan_check_uio "const struct uio *" "const char *descr" .Sh DESCRIPTION .Nm is a subsystem which leverages compiler instrumentation to detect uses of @@ -306,6 +308,7 @@ f(size_t osz) .Xr busdma 9 , .Xr copyout 9 , .Xr KASAN 9 , +.Xr uio 9 , .Xr uma 9 .Rs .%A Evgeniy Stepanov diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c index abac71da6d64..ef3c6c10b0ba 100644 --- a/sys/kern/subr_msan.c +++ b/sys/kern/subr_msan.c @@ -587,6 +587,15 @@ kmsan_check_mbuf(const struct mbuf *m, const char *descr) } while ((m = m->m_next) != NULL); } +void +kmsan_check_uio(const struct uio *uio, const char *descr) +{ + for (int i = 0; i < uio->uio_iovcnt; i++) { + kmsan_check(uio->uio_iov[i].iov_base, uio->uio_iov[i].iov_len, + descr); + } +} + void kmsan_init(void) { diff --git a/sys/sys/msan.h b/sys/sys/msan.h index 4baa71ec8113..58110d7306e6 100644 --- a/sys/sys/msan.h +++ b/sys/sys/msan.h @@ -50,6 +50,7 @@ union ccb; struct bio; struct mbuf; struct memdesc; +struct uio; void kmsan_init(void); @@ -69,6 +70,7 @@ void kmsan_check(const void *, size_t, const char *); void kmsan_check_bio(const struct bio *, const char *); void kmsan_check_ccb(const union ccb *, const char *); void kmsan_check_mbuf(const struct mbuf *, const char *); +void kmsan_check_uio(const struct uio *, const char *); #else #define kmsan_init(u) @@ -85,6 +87,7 @@ void kmsan_check_mbuf(const struct mbuf *, const char *); #define kmsan_check_bio(b, d) #define kmsan_check_ccb(c, d) #define kmsan_check_mbuf(m, d) +#define kmsan_check_uio(u, d) #define kmsan_bus_dmamap_sync(d, op) #endif From nobody Thu Dec 14 16:07:28 2023 X-Original-To: dev-commits-src-all@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 4Srcgj0GXDz52gDg; Thu, 14 Dec 2023 16:07: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 4Srcgh6q0Mz3S8P; Thu, 14 Dec 2023 16:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702570049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFOPfsAaCRFaGtjicpHgLgNcfJMw0AuToOkzqw+lgFg=; b=NSZBbReG6NyaGd9J4+Z6CbFrjrl/OolfmQg54tWnQ+aDXzZFXSK/GClX/MKDq4+Ade72JD +tgIWYZdvu1xDeo9hzO+BBxH19Epnj2aTrQ+Ac9OthBPCl6A7Ycr1J2Fl2gmblOVHJwsi6 W4tSNfKM723IawNXarLO4hKPEypaQcILTxMuyxZM9QIQENUbAMLyOLuQzHlQl78l1txBQZ E/d6iF62koj+E6S2xR1jaJasV9TomlbjvsyCnqkxT1VzYSowNLFhRF6NN2j3jL+djeWvyQ o7CuSPrZj8OwhMDQ2n/CjqIkTZf06ZFI0Mx6rPvTAXijFcgXCgVKHEDCfS98pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702570049; a=rsa-sha256; cv=none; b=X8nQ+mjb7hGfoNr0UpA4nS5xLNEZ5TAQvSB31qI1LCoG4Qs5wZjR5reRX0QgDw2JytfNcT YlyZ/uVDXnf/u2g3AUvwC0+4b6Zl2YvSPHBX2A63R2z50Y2AEA28qRMmM1POtcIjOdxvJ4 YDyuczpAYtv8KG3NfsflaKZ6D0b3n2iPncI5ekxF0tf9P+klfhPaWNQk2mFmFywXb1mveK WZ1v6UZl+f4P8xDLd1WJ2l3qaNRPW7kChc6bmFEV72y8QyLKSOlutVX4hQfNO9WRrxcVYL G9b53YSQ5Dl7XGWyx/Y/nfGqMoYEB3/Oe4RjciuNTHUFLmTZUS+qIkWVAYpMWA== 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=1702570049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFOPfsAaCRFaGtjicpHgLgNcfJMw0AuToOkzqw+lgFg=; b=X7r0VeWIVFBshe23tWhho3p6fy0soO5f3KNMZaTKXLWGZQogynJQM6IXbgmiA8wkR08TnN GV6ZZAtp03gfJ/QdPBjmWzICtdqFy1Foa7+m+A7TjgXWcw5lBPGVy6y2Nl27C/NVQPll5h WMLrrfn89LmaDeeymcSZ4AGGA03WSyx12CRY+D6EG2NNRPZDSObf9sr09XVpJ1zpzP2Jc3 UrP4vmwGXAeE6ebCPCeRpX2rBObv80kYuFyTAvb4nhWaruOqmTdEQ552pFntGjQe+L2Zr7 HSQiopqY1cbSoniV8WMkfqgJpxT4cJAHbZ+RPwCjtGgmq3er6/YRrKHsXgmx7Q== 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 4Srcgh5rJgzYr2; Thu, 14 Dec 2023 16:07: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 3BEG7ScZ015406; Thu, 14 Dec 2023 16:07:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEG7SdP015403; Thu, 14 Dec 2023 16:07:28 GMT (envelope-from git) Date: Thu, 14 Dec 2023 16:07:28 GMT Message-Id: <202312141607.3BEG7SdP015403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: ac56b9d83c75 - main - cp: Split the basic_symlink test case in two. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ac56b9d83c75f548667912ffe422be6bd4f5c27e Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ac56b9d83c75f548667912ffe422be6bd4f5c27e commit ac56b9d83c75f548667912ffe422be6bd4f5c27e Author: Dag-Erling Smørgrav AuthorDate: 2023-12-14 16:06:57 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-14 16:06:57 +0000 cp: Split the basic_symlink test case in two. This test case tests two different things: first, that copying a symlink results in a file with the same contents as the target of the symlink, rather than a second symlink, and second, that cp will refuse to copy a file to itself, or to a link to itself, or a link to its target. Leave the first part in basic_symlink, move the second part to a new test case named samefile, and slightly expand both cases. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43062 --- bin/cp/tests/cp_test.sh | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh index a9e419bb39a9..397c06d75bbb 100755 --- a/bin/cp/tests/cp_test.sh +++ b/bin/cp/tests/cp_test.sh @@ -51,10 +51,7 @@ basic_symlink_body() atf_check cp baz foo atf_check test '!' -L foo - atf_check -e inline:"cp: baz and baz are identical (not copied).\n" \ - -s exit:1 cp baz baz - atf_check -e inline:"cp: bar and baz are identical (not copied).\n" \ - -s exit:1 cp baz bar + atf_check cmp foo bar } atf_test_case chrdev @@ -227,6 +224,22 @@ recursive_link_Lflag_body() '(' ! -L foo-mirror/foo/baz ')' } +atf_test_case samefile +samefile_body() +{ + echo "foo" >foo + ln foo bar + ln -s bar baz + atf_check -e match:"baz and baz are identical" \ + -s exit:1 cp baz baz + atf_check -e match:"bar and baz are identical" \ + -s exit:1 cp baz bar + atf_check -e match:"foo and baz are identical" \ + -s exit:1 cp baz foo + atf_check -e match:"bar and foo are identical" \ + -s exit:1 cp foo bar +} + file_is_sparse() { atf_check ${0%/*}/sparse "$1" @@ -234,7 +247,7 @@ file_is_sparse() files_are_equal() { - atf_check test "$(stat -f "%d %i" "$1")" != "$(stat -f "%d %i" "$2")" + atf_check_not_equal "$(stat -f%d,%i "$1")" "$(stat -f%d,%i "$2")" atf_check cmp "$1" "$2" } @@ -365,6 +378,7 @@ atf_init_test_cases() atf_add_test_case recursive_link_dflt atf_add_test_case recursive_link_Hflag atf_add_test_case recursive_link_Lflag + atf_add_test_case samefile atf_add_test_case sparse_leading_hole atf_add_test_case sparse_multiple_holes atf_add_test_case sparse_only_hole From nobody Thu Dec 14 16:07:29 2023 X-Original-To: dev-commits-src-all@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 4Srcgk10p4z52gVW; Thu, 14 Dec 2023 16:07:30 +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 4Srcgk0NlWz3S6T; Thu, 14 Dec 2023 16:07:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702570050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayAvdkKsNaytsx0IT9PN6Qs3Njwe9+Bt1fQ3gUWr+/M=; b=WC7Gfs2C92sG+DGvaS2ufJ1dJGP0jgxmmR4kR6RnZKAJ/4Tib7vrOtkWKghBuZSBt/T4LL +Yl3HoIugNhL46H6yxSrnsu3QBQx4jaz+yDisT/cNNWkM8pu4j1CfSOB1rv7vQhzBUBqR5 CCLxrF5S3sxu3qaXnVMYNtRcRXkw8hGt3MXMiFryEeookZnNjCwIdwwzEMXsahcEE0oIu5 r0BsOsDFEQf3hpOeQ2qJa2ich1M6adExegb1gqH4YjutgDiaW+mP/Ek6j3suks8KIPFpFu TW/7xyP+jaNaYtzXAP9pYYDGwkplr7opvddtRjG3/MW0Xw3MLGZoGzcxZsmSYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702570050; a=rsa-sha256; cv=none; b=IthVqX2A6RE0O1/2YWwBf5WhaDqKCy1KVjFD6M3oisO9QFU/DtAfnB+tyzQWt+ZOc9g7f3 IIYKe6VsouFPpNY6BRc/myJFg2MkZGB5do1gHaKlMqdS9DU6RFGv+XXxuARpBouQ6il+J9 K5D5yMAyCWFqc2caGtzz69dPZVJNJpYVRk/upkayRQ81AbVlZfRgFbUq/0sRLDsP3jUpmC kiuFAYZEe9E1eswN2OZkja19zw0PC6gnmQlrUy5Q6qdQG7Zg8Ar6UOW+gXdglBhkX+4qW7 0iwq7WUsY77YxRpdC1AFJTTrv4QrVOPUgi8bg2vFRJEosHcd2x2aZ/bSGptHVw== 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=1702570050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayAvdkKsNaytsx0IT9PN6Qs3Njwe9+Bt1fQ3gUWr+/M=; b=LBSzinH7nEyEU2+pLNiCXWasav7YnhJc65SzpMA5ukHaCnMMpc/f8pp6ZtJJK1u3DkiXXl Uaqbfho0+USBSRwXUzcwNTXhx80DhV+Om2sWVAnVId9dPJrJZCt6oHvkwfN2yXouCi3xwU l54RYwhFoe2E1D3K14Ph3xE8EH47TuyrATcxCzTLrAyLSMDK4MGuZW/7UfXyFaf89Yl5R0 HxN01DInFYaAFLdHJ6604QsVU33YQ3DjaIcPZaMCEUa0Na5Wew5CAeOFPaMCvfGbyw5kAX pFskCJI6DdTTozE0i68FCd6oKbf6ckGrUcz1IWfa1TYpXdKU0oWlZwG6rWKJAg== 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 4Srcgj6bG3zZ9S; Thu, 14 Dec 2023 16:07: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 3BEG7TBx015457; Thu, 14 Dec 2023 16:07:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEG7TsA015454; Thu, 14 Dec 2023 16:07:29 GMT (envelope-from git) Date: Thu, 14 Dec 2023 16:07:29 GMT Message-Id: <202312141607.3BEG7TsA015454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 0f4467ce444b - main - cp: Move the flags around a bit. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0f4467ce444b201468d2268958130f495951ca3c Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=0f4467ce444b201468d2268958130f495951ca3c commit 0f4467ce444b201468d2268958130f495951ca3c Author: Dag-Erling Smørgrav AuthorDate: 2023-12-14 16:07:00 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-14 16:07:00 +0000 cp: Move the flags around a bit. - The HLPR flags are grouped together at the beginning because they are the standard flags for programs using FTS. Move the N flag out from among them to its correct place in the sequence. - The Pflag variable isn't used outside main(), but moving it out lets us skip initialization and keeps it with its friends H, L and R. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43063 --- bin/cp/cp.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 78ded7af3d5a..1455979bdb6e 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -73,7 +73,7 @@ static char emptystring[] = ""; PATH_T to = { to.p_path, emptystring, "" }; int Nflag, fflag, iflag, lflag, nflag, pflag, sflag, vflag; -static int Hflag, Lflag, Rflag, rflag; +static int Hflag, Lflag, Pflag, Rflag, rflag; volatile sig_atomic_t info; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; @@ -86,12 +86,11 @@ main(int argc, char *argv[]) { struct stat to_stat, tmp_stat; enum op type; - int Pflag, ch, fts_options, r, have_trailing_slash; + int ch, fts_options, r, have_trailing_slash; char *target; fts_options = FTS_NOCHDIR | FTS_PHYSICAL; - Pflag = 0; - while ((ch = getopt(argc, argv, "HLNPRafilnprsvx")) != -1) + while ((ch = getopt(argc, argv, "HLPRafilNnprsvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -101,9 +100,6 @@ main(int argc, char *argv[]) Lflag = 1; Hflag = Pflag = 0; break; - case 'N': - Nflag = 1; - break; case 'P': Pflag = 1; Hflag = Lflag = 0; @@ -128,6 +124,9 @@ main(int argc, char *argv[]) case 'l': lflag = 1; break; + case 'N': + Nflag = 1; + break; case 'n': nflag = 1; fflag = iflag = 0; From nobody Thu Dec 14 16:07:31 2023 X-Original-To: dev-commits-src-all@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 4Srcgl2WbRz52gSD; Thu, 14 Dec 2023 16:07: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 4Srcgl1dVSz3SCm; Thu, 14 Dec 2023 16:07:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702570051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ux45kw+913AzvG2CP2pjf9PecAPD/08C4IV47O3WwWc=; b=BuC2NAZqOD+uoejtKQqCrFaw4i0AQsXohoUu+ToGYEYoTWD0r+K4GiieuBC5J2oKceEOJE aRjucjOtJDTmaUYsd6/B64tzojMW57sCq8pixgzF/NGX3IUEMqs54Uvyr28cll6jc+oYh+ J2n4KyLzoxulliHZCCguUI8ExjK5zLQrBKA/o2MyBKcU0rRXdiJjDJuiAe/wpx2KjywBkF p/q9XWFENQ6MAC5ig8/kvZcq+x9nAEAyfR7DaD8o04tsPNucUh1uvABuiwldUHou8jdyw2 yqv58S247eL7TI3puhusfUjQoJX8LjPd7+G828ovxry00gHXeDFCLJ8+Cbq2eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702570051; a=rsa-sha256; cv=none; b=lCo0UnhsaKnqpqpdWesOo8qN2rrvY/FEQ2Q8+SugxV1FPQw1KAGz08CN6kv+ggimM9sEPJ 9XQ2tEIv+y6l/Y4dZEENP0jXz2ljUDZrtYPI2R8Vwo66ejxs5Yw2a0j7ZktXsp3mqrBQ0f rDSyaMGYDjqZ6oIUkAyJ6FQvxYOtMWGutOfGSE6u/2HFTDRKlHPCFKsLV/muNqUMvG6mJ+ dkbIJiCq9bl3w9sSk9PA9TkZDugHcuCicAkP82Ca6PiMwideMqtZMY5GZ380ffApXZoEH2 BJLanQPrDMbWtsSgKNSa+gT6cS13AD9V2/I8xVADBkkc3vWXnbOSDWbgDXOrBg== 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=1702570051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ux45kw+913AzvG2CP2pjf9PecAPD/08C4IV47O3WwWc=; b=PhtrnpCoAi7WuT+4bBeWIXB9bVyVIEtfoWNGiYLtrk5QTL1LRG4GYXx9mWXpsFTUwj/kNK cHmhKTjWiBKfoJ9vGCHsPsyh41a/hxWjaPTdcrZHk/264kE0OjfnT+5JknSo/USFO9Bzr9 U48ZFeshzuhn70KQkh83lDoQyLjXEIUc3lX7wROPZujCkLwKqI3MXQwe2p3CmZi1R22rfr yX2XNiVcGHvl0sVBszq/PksJA2viqML221Cyswd/yrqvUiEAABb6EZ1GEKEHqMXiNjIDEJ 5zv/7yOh58r+m7bzB5uimbacshioXf0b56J0qROvf4zViGL3S2ArjzplXwsYig== 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 4Srcgl0kGRzZJs; Thu, 14 Dec 2023 16:07: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 3BEG7V05015505; Thu, 14 Dec 2023 16:07:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEG7VlU015502; Thu, 14 Dec 2023 16:07:31 GMT (envelope-from git) Date: Thu, 14 Dec 2023 16:07:31 GMT Message-Id: <202312141607.3BEG7VlU015502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 38509270663f - main - cp: Further simplify the core logic. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 38509270663f336103273878cc8ddc88a225b9d8 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=38509270663f336103273878cc8ddc88a225b9d8 commit 38509270663f336103273878cc8ddc88a225b9d8 Author: Dag-Erling Smørgrav AuthorDate: 2023-12-14 16:07:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-14 16:07:04 +0000 cp: Further simplify the core logic. If the destination file exists but we decide unlink it, set the dne flag. This means we don't need to re-check the conditions that would have caused us to delete the file when we later need to decide whether to create or replace it. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43064 --- bin/cp/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 891360604631..80a0c1fce824 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -145,6 +145,7 @@ copy_file(const FTSENT *entp, int dne) if (fflag) { /* remove existing destination file */ (void)unlink(to.p_path); + dne = 1; } } @@ -166,7 +167,7 @@ copy_file(const FTSENT *entp, int dne) goto done; } - if (!dne && !fflag) { + if (!dne) { /* overwrite existing destination file */ to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); } else { From nobody Thu Dec 14 16:44:25 2023 X-Original-To: dev-commits-src-all@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 4SrdVK2nynz52jgf; Thu, 14 Dec 2023 16:44: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 4SrdVK2FGRz3Wcx; Thu, 14 Dec 2023 16:44:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702572265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VffTHOvYee6E5XVCKSMX04sQOy3ih3Zz0e2hualaPXk=; b=NE+NAdooaEkbBWyoOn8a2v8mflX/vPxWpD+zgTXGWETB5h8g2MGzJDb15EI8tzLeY/bBif qoLRb3BKTZFGQNTmYQrcII/YxFnlQV81+oh73J654DdQm4zfa+NQHrtTOvEBjtL9dA+Hbv WYun3eBHz6cOz15CcKwgNR7PKeR88Ez44lO6mJWHV12k+XDkTj7mCLHzeotladyhi3+M8X 8dMDkdn6swDAwfp8WOZ0K+PAYnD+Lie5e95pmsGeKxeTZOdMfKbwbZXUvChFWGHzozGume 7nq5oEJkB+NSkRgYJ5VKA1f8/RWleQVTztEvdwH3cFX2/4cjA3mG6VlA2woG4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702572265; a=rsa-sha256; cv=none; b=krT0re+n51PtNqx7Kze/JpTRwW3ig8EN+MHKL0N5wzGtYx24LZfKVKXSouqrLqPJW3qfgq ClFk8d26feWZYNEPrjZMoj+IUyzZMEG3m3uUzHmlUNs6XHL4GNsu/C+z5mTE4+GjMXzW+T bm04ayM2Qy7znIiKxcDPckD0i8LWeJ3caMmfyfizjtLHxwcFFiFuveKZBJgBfJZRLSlS3H 3Czwmqcwkij2me1ow763cuUWrjuJs4RqJ4gGVewh+CRhQxCdqHExqzrunYTvTmqT5CPrlB koaTT42PporeylS37d0yhbgr8nJAYzEJKktf/F3Ud0G7MUZzo227w6J8YMRncQ== 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=1702572265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VffTHOvYee6E5XVCKSMX04sQOy3ih3Zz0e2hualaPXk=; b=Jt8xkaxfcZX7l/tZjen2s1Z7t31HYJy+1841V/O12+n/lwFIE/7M9BkNsOMMDlpK+XerI6 Af3ItfCveOU5l6bM/5joMOO327ZRa5mkBWSfO/uYLhL7P/gXQbP1yeRZGr2jgMm0yDPtdB 64CUjxvZ5H5iYG2mc6eUYwSA+/Ru32eBJlIC4BOjzWUGGayzk8TtHMkBTCpv2BIrPaeTe+ r6LmJjMBEZLWnhncAobkf50NJ4X4ufZ4ekPAM0xERwwVqhHmbVIzBId8jv4839FcIK2+Bz 2SjKeUU9UokhUzzeM3dp7ptZqFDTIZbslV6HcVUI4vco9ykcM/59fWucam4LVA== 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 4SrdVK1Jg0zbHy; Thu, 14 Dec 2023 16:44: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 3BEGiPQ6081449; Thu, 14 Dec 2023 16:44:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEGiPoU081446; Thu, 14 Dec 2023 16:44:25 GMT (envelope-from git) Date: Thu, 14 Dec 2023 16:44:25 GMT Message-Id: <202312141644.3BEGiPoU081446@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: d1ce87ae0ddc - main - kldxref: Fix for 32-bit powerpc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d1ce87ae0ddca413b098b6be8f5d3b4da87422ef Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=d1ce87ae0ddca413b098b6be8f5d3b4da87422ef commit d1ce87ae0ddca413b098b6be8f5d3b4da87422ef Author: Jessica Clarke AuthorDate: 2023-12-14 16:37:34 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 16:37:34 +0000 kldxref: Fix for 32-bit powerpc R_PPC_RELATIVE lost its 32-bit handling in the libelf conversion. Reported by: bapt Fixes: 0299afdff145 ("kldxref: Make use of libelf to be a portable cross tool") --- usr.sbin/kldxref/ef_powerpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/kldxref/ef_powerpc.c b/usr.sbin/kldxref/ef_powerpc.c index 068c8117e4a6..ab33e170b488 100644 --- a/usr.sbin/kldxref/ef_powerpc.c +++ b/usr.sbin/kldxref/ef_powerpc.c @@ -69,7 +69,8 @@ ef_ppc_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, le64enc(where, val); else be64enc(where, val); - } + } else + be32enc(where, val); break; case R_PPC_ADDR32: /* word32 S + A */ val = EF_SYMADDR(ef, symidx) + addend; From nobody Thu Dec 14 16:44:26 2023 X-Original-To: dev-commits-src-all@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 4SrdVL4cd7z52jdm; Thu, 14 Dec 2023 16:44: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 4SrdVL3D1Kz3WtW; Thu, 14 Dec 2023 16:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702572266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=osltNOoweVh1AEfDgioYBPi+fVu0ZjiX4RDG1mJnNI8=; b=WqLkVIuUsDRmeIbk949qT+KRejwHgU0ObKNN180x4e6ATK5Jx/5uwOtUGZwmo+685hKZtM 2f0QPsJ39FRmaIVPZr/xAMkbK3EG8FAFNkkz/DMMP5E94KEM5C8yNMKztb8w0ERQ1XKvpq tB23MsT9a/yMHTQVKzCD+n/MvOQmuU2g4w/eOVm3Dn85Da7KnoFAV0FvzB8hVccJ32YLjn WAbyW4meN4UusDTCiVWAVHJC0cYvciMOyW4OUmxRgsjBQYo5GjkG74qjZNGd72C/bnaYbB QXXqpDfihLxL5gku7+HSjX4mM479DsF9fLSovNSeIJhQHcNTNbn5fvXfMr3wvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702572266; a=rsa-sha256; cv=none; b=hsmg4NGhtwgkV4VeIzkZNY0NLw6laqUxlRDauQ68nuuY7h/yAfKxcyG2INoZeB5dy6gtBH dY/cWe/FPdVSfSbWntzJgx0ELVn82l7S/N6UFc214F1GAaxahilT53St7Mi/0Z8/lSzWPM jBTjegdajDsyLGad5Y7rU7baIwk2OvsDWzZ0L8+5rAMhyyujkpQPE7k6N1ZLCsH532Qetc kkioSewVrpm82Gpb40t4e+boyQMi1TW9E7XhJnAHezMXk9PUeLaCnprX73ziiAJOcLZIkR Jv1Eo5NRkTDu0Anbp086PvHGSNRmUZ6jIx4tifWmr68iETG2kUeRNqCHSSF58w== 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=1702572266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=osltNOoweVh1AEfDgioYBPi+fVu0ZjiX4RDG1mJnNI8=; b=anJ3zVFjw/BpZ5XkzNKP46WClGwgMWp0yebCU7XxZsjvejsz9kRLWyq96eWt3pyWno1YKn fMRD14z/hQ1WP8Dj0bOfVXZtA1CdIMiWAv1zK6pfcUkkRzdNVvvixAWKNVTKwTtJecCd53 wy8SVmaODZCNfa4NKGGcjM2zxSB0D09a3Zn/wW524USFxFBdULlURnwdUdBoUb0Ep8ZZf2 e/uq8JTaQbOnWHlxqqNw+C68aCOqh/HFiHnURjIGPAEIS2PhXLS+ubQGBXiMtw15QSlubs 96voonPW776jt++amdIF0ZiMjcofHBnQBDNXXTxeJZWEJmoATwWPHcRFiv2dWw== 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 4SrdVL2435zbGK; Thu, 14 Dec 2023 16:44: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 3BEGiQWj081500; Thu, 14 Dec 2023 16:44:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEGiQKZ081497; Thu, 14 Dec 2023 16:44:26 GMT (envelope-from git) Date: Thu, 14 Dec 2023 16:44:26 GMT Message-Id: <202312141644.3BEGiQKZ081497@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: 0840bdbf2a07 - main - Don't try and run kldxref for arm kernels List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0840bdbf2a07b68e29267bc49057ca6df2351360 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=0840bdbf2a07b68e29267bc49057ca6df2351360 commit 0840bdbf2a07b68e29267bc49057ca6df2351360 Author: Jessica Clarke AuthorDate: 2023-12-14 16:40:08 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 16:40:08 +0000 Don't try and run kldxref for arm kernels Surprisingly, kldxref does not currently support arm, and unhelpfully this means it silently does nothing rather than give an error, so the linker.hints entry added to the METALOG for -DNO_ROOT builds (and pkgbase ones) refers to a file that doesn't exist. Ideally it would be supported (and ideally the METALOG handling would be less fragile, but without integrating it into kldxref the only real option would be to just run find(1) to get the list of linker.hints files, which feels a little backwards), but for now just paper over this by skipping the build step on arm. Reported by: bapt Fixes: ff7c12c1f17e ("Make kldxref a bootstrap tool and use unconditionally") --- sys/conf/kmod.mk | 3 ++- sys/modules/Makefile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 5d4dcd4371bc..4482034baf67 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -354,7 +354,8 @@ _kmodinstall: .PHONY .include -.if !defined(NO_XREF) +# XXX: kldxref lacks support for arm +.if !defined(NO_XREF) && ${MACHINE_CPUARCH} != "arm" afterinstall: _kldxref .ORDER: realinstall _kldxref .ORDER: _installlinks _kldxref diff --git a/sys/modules/Makefile b/sys/modules/Makefile index c14933eebda4..dc914946ff41 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -908,7 +908,8 @@ SUBDIR:= ${SUBDIR:N${reject}} .endif # MODULES_OVERRIDE -- Keep last # Calling kldxref(8) for each module is expensive. -.if !defined(NO_XREF) +# XXX: kldxref lacks support for arm +.if !defined(NO_XREF) && ${MACHINE_CPUARCH} != "arm" .MAKEFLAGS+= -DNO_XREF afterinstall: .PHONY ${KLDXREF_CMD} ${DESTDIR}${KMODDIR} From nobody Thu Dec 14 17:48:50 2023 X-Original-To: dev-commits-src-all@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 4Srfwh3wYgz52nQ7; Thu, 14 Dec 2023 17:48:52 +0000 (UTC) (envelope-from jhb@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 4Srfwh3L9Qz3fPf; Thu, 14 Dec 2023 17:48:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702576132; h=from:from:reply-to:subject: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=SvoH2upjyu+nxatEXX7RZ/UHvaoxrq5+YVmPS2L7DJw=; b=q0rL3TFQhPstZ3Hs1Tw6yq7BjnjFpSUZwOi38Xqm2wwAuCIn1HElm/HYt9WNweZcm2+9lw Eyorvw6Fu6WEgPTuE1r1NZlhBM0G0AEeJUTOoRvDjNBgoavMkqzogh+1wbFoPboiQcxghN AbzStkJA6f82b7l8U7UXDXg2LVlEiFkXz7v5etvUVA/WNadE5NUeCZ+j0n4CEBYAbHp5Im p7YtWjsHN82WciRva4lQ0LrofSRNZD3bdci8JjEsy49+memjNyYVTkIyQ2EQijs2ic+ivd YVdHalBKLKYaVRDopxhBHKkKtHq10eJhs8cMV4Gw1DnHwolT2W73EI41qwosbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702576132; a=rsa-sha256; cv=none; b=bWQNzWhpqxjRbR86PTYJUYwigUFT5NIQToVaH50cSB/0TKkagoC7lxg8kYdrWBdB0ngGXI 8nSPTRkoXfkLhTFjCzQI3CxIotNbOlavPSKVMwXgydGvC00Pb4oo20YQir8rpIgIbKuX3u 9AnOVo7Ld9IFR18wpKaA6V31mAsVzYu9tgEr5/yIdHKjoM5h6AhKULr7OQN+8hUa3CzLKJ In9dOxFKdY4RQH75Dz5PoLDDIQTdGcdiFXgnAIh4IP4Om0sn7bJb3ZPPPWzMYqmuA01kpT 422Yg9DW0dHFlpA6bpU5n2f4tMXfkZSXAZhxLQr4VziiX3rmd9RL9aUdTKrpOQ== 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=1702576132; h=from:from:reply-to:subject: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=SvoH2upjyu+nxatEXX7RZ/UHvaoxrq5+YVmPS2L7DJw=; b=R2hBjPR4qligNzu4jP3yp8WUdtjO15a2epL9Ckji8eR6Toxl1bK238P8AnoX1MOVU0R7/v 8b0Bq6z3DZhbdD4C9Xua1xTOZ7SBhqa2ktYP+K4yDntLIdqoI/Ailta22a1uqgvaGMwDQH shkVPGRXmUWb/pRNpHWgr0V/lUF9KePFmUg9UUy0VMX5eYzROP6WD500iX6dL3CmttAJed vX5ub8sr4PwTyz2LBY6gxu6BsdGHcs1V76pu2H3gRLW7dvrxe0qjDumHlNCJn2SjDWdUWn Yf2Uin+Mxn174v/6YOc6FQraAn6q3iYGZSQK8oHEOhz64zfft2Z0I5vwiy0uZA== Received: from [IPV6:2601:648:8384:fd00:655e:b60a:b20c:6a5f] (unknown [IPv6:2601:648:8384:fd00:655e:b60a:b20c:6a5f]) (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 4Srfwg6S57zpXd; Thu, 14 Dec 2023 17:48:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <92a185f3-ab96-4dd0-b455-a3e28aa595f6@FreeBSD.org> Date: Thu, 14 Dec 2023 09:48:50 -0800 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 0840bdbf2a07 - main - Don't try and run kldxref for arm kernels Content-Language: en-US To: Jessica Clarke , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202312141644.3BEGiQKZ081497@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202312141644.3BEGiQKZ081497@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/14/23 8:44 AM, Jessica Clarke wrote: > The branch main has been updated by jrtc27: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0840bdbf2a07b68e29267bc49057ca6df2351360 > > commit 0840bdbf2a07b68e29267bc49057ca6df2351360 > Author: Jessica Clarke > AuthorDate: 2023-12-14 16:40:08 +0000 > Commit: Jessica Clarke > CommitDate: 2023-12-14 16:40:08 +0000 > > Don't try and run kldxref for arm kernels > > Surprisingly, kldxref does not currently support arm, and unhelpfully > this means it silently does nothing rather than give an error, so the > linker.hints entry added to the METALOG for -DNO_ROOT builds (and > pkgbase ones) refers to a file that doesn't exist. Ideally it would be > supported (and ideally the METALOG handling would be less fragile, but > without integrating it into kldxref the only real option would be to > just run find(1) to get the list of linker.hints files, which feels a > little backwards), but for now just paper over this by skipping the > build step on arm. > > Reported by: bapt > Fixes: ff7c12c1f17e ("Make kldxref a bootstrap tool and use unconditionally") > --- > sys/conf/kmod.mk | 3 ++- > sys/modules/Makefile | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) I think before the libelf changes it was creating a file, but with only a single version record. Now it defers emitting the version record until it emits at least one "real" record since it doesn't know which endianness to use until it has successfully opened and parsed a file. As a result it is now leaving the file empty rather than with the version record. It should not be hard to add ef_arm.c to fix for arm. Another fun project btw would be for someone to add a "read" mode to kldxref to read a linker.hints file and dump the contents in a human readable fashion similar to the output one gets from 'kldxref -d'. -- John Baldwin From nobody Thu Dec 14 18:02:02 2023 X-Original-To: dev-commits-src-all@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 4SrgD70ZWrz52pVc for ; Thu, 14 Dec 2023 18:02:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (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 4SrgD661mHz4CwN for ; Thu, 14 Dec 2023 18:02:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a1e83adfe72so774435566b.1 for ; Thu, 14 Dec 2023 10:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1702576933; x=1703181733; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=UE4ufFZvqgCYoB9zA80OcULRfoCCy0+yBSpw7Cf5S/8=; b=d9xjLDut0uAm4+csXBC55SrVZWAPCVeYqRn7XFg2j2wFx2r4zvBURhV4WjIVsDlTMZ rMbhOZfiXsXV1nrS+tXW4akXIVa1Wyif7qSiTm2bjYtdeVSS617crF/nHW+3/uqGGq5M U/s9I41y/emvB7fdceu2ydRAO/20vSHmp9be70MKjViW+KMWvVJHjnC+p2uUt//E83LL zV4w0CGsSK+ooA+bh9KgT4TksG0Fqy16pwvcEMWbMVX75CHpf7g+oHSNF+q9fojiSfpw P3AGfoUYA6oTmzl6YQNTbBGIm4ttyeDK+yDg5J6Xs3N829kScoo5UoOJXeuSgpPUHBIU 04RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702576933; x=1703181733; 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=UE4ufFZvqgCYoB9zA80OcULRfoCCy0+yBSpw7Cf5S/8=; b=BEBd9aPGvtPRqgyLeUZ+SILKJgvZCG/IY72QRBcSp3MedxW7Bt4QGTxsB3sELk1bz6 9uMDyVRmF56UqNzMJ0mkZ984dfOQEce1+be5GdZBu11AjTfqwCGbH3INtKyaAxXVV86/ 9g4Wz1Ct3/Uu39Bh6zZ7Wvax1E8dSV4nYQ6hoICjU+N0XYDUzROM4Xol5G1GRWNMscxl VVkDUE2KwID3mbpNR9Gafvu/rxlz1QRu+aAxR64kzIQbz3XQZ6RATAYYY8acDQhSKAvM h1kbuqhZ3AWuOHMwFwLbmRYj9w52HG5cLsKQ4AhQHGaBh9Owe610eBNRB5YoSLfXkMXX eT8g== X-Gm-Message-State: AOJu0YxS7VbB2JhS59MH/Sv8RzFnKYBEqFMXnfNrS5b9fyGnSbSdAL9c r6F7BtPwuDqCXOGTmLr4z7bInd7H4rODF4bw+4DL9zVglSYYjwnUprI= X-Google-Smtp-Source: AGHT+IF6rfWeLcdxyrM8HGkHYv/zNeyRzAuKugaigUsvl77kXPgEeHdpJOcFkRBtzBc09i3JRRd03DS4envdr6XUSYY= X-Received: by 2002:a17:906:cc96:b0:a1d:8259:98d2 with SMTP id oq22-20020a170906cc9600b00a1d825998d2mr5070203ejb.61.1702576932941; Thu, 14 Dec 2023 10:02:12 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202312141644.3BEGiQKZ081497@gitrepo.freebsd.org> <92a185f3-ab96-4dd0-b455-a3e28aa595f6@FreeBSD.org> In-Reply-To: <92a185f3-ab96-4dd0-b455-a3e28aa595f6@FreeBSD.org> From: Warner Losh Date: Thu, 14 Dec 2023 11:02:02 -0700 Message-ID: Subject: Re: git: 0840bdbf2a07 - main - Don't try and run kldxref for arm kernels To: John Baldwin Cc: Jessica Clarke , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000004a89b5060c7c15ef" 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:2a00:1450::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4SrgD661mHz4CwN --0000000000004a89b5060c7c15ef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 14, 2023 at 10:48=E2=80=AFAM John Baldwin wro= te: > On 12/14/23 8:44 AM, Jessica Clarke wrote: > > The branch main has been updated by jrtc27: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D0840bdbf2a07b68e29267bc49057ca6= df2351360 > > > > commit 0840bdbf2a07b68e29267bc49057ca6df2351360 > > Author: Jessica Clarke > > AuthorDate: 2023-12-14 16:40:08 +0000 > > Commit: Jessica Clarke > > CommitDate: 2023-12-14 16:40:08 +0000 > > > > Don't try and run kldxref for arm kernels > > > > Surprisingly, kldxref does not currently support arm, and > unhelpfully > > this means it silently does nothing rather than give an error, so > the > > linker.hints entry added to the METALOG for -DNO_ROOT builds (and > > pkgbase ones) refers to a file that doesn't exist. Ideally it woul= d > be > > supported (and ideally the METALOG handling would be less fragile, > but > > without integrating it into kldxref the only real option would be = to > > just run find(1) to get the list of linker.hints files, which feel= s > a > > little backwards), but for now just paper over this by skipping th= e > > build step on arm. > > > > Reported by: bapt > > Fixes: ff7c12c1f17e ("Make kldxref a bootstrap tool and > use unconditionally") > > --- > > sys/conf/kmod.mk | 3 ++- > > sys/modules/Makefile | 3 ++- > > 2 files changed, 4 insertions(+), 2 deletions(-) > > I think before the libelf changes it was creating a file, but with only a > single > version record. Now it defers emitting the version record until it emits > at least > one "real" record since it doesn't know which endianness to use until it > has > successfully opened and parsed a file. As a result it is now leaving the > file > empty rather than with the version record. > > It should not be hard to add ef_arm.c to fix for arm. > > Another fun project btw would be for someone to add a "read" mode to > kldxref to > read a linker.hints file and dump the contents in a human readable fashio= n > similar > to the output one gets from 'kldxref -d'. > devmatch -v I think does this. But it's not nice. Warner --0000000000004a89b5060c7c15ef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Dec 14, 2023 at 10:48=E2=80= =AFAM John Baldwin <jhb@freebsd.org> wrote:
On= 12/14/23 8:44 AM, Jessica Clarke wrote:
> The branch main has been updated by jrtc27:
>
> URL:
https://= cgit.FreeBSD.org/src/commit/?id=3D0840bdbf2a07b68e29267bc49057ca6df2351360<= /a>
>
> commit 0840bdbf2a07b68e29267bc49057ca6df2351360
> Author:=C2=A0 =C2=A0 =C2=A0Jessica Clarke <jrtc27@FreeBSD.org> > AuthorDate: 2023-12-14 16:40:08 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Jessica Clarke <jrtc27@FreeBSD.org> > CommitDate: 2023-12-14 16:40:08 +0000
>
>=C2=A0 =C2=A0 =C2=A0 Don't try and run kldxref for arm kernels
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Surprisingly, kldxref does not currently support a= rm, and unhelpfully
>=C2=A0 =C2=A0 =C2=A0 this means it silently does nothing rather than gi= ve an error, so the
>=C2=A0 =C2=A0 =C2=A0 linker.hints entry added to the METALOG for -DNO_R= OOT builds (and
>=C2=A0 =C2=A0 =C2=A0 pkgbase ones) refers to a file that doesn't ex= ist. Ideally it would be
>=C2=A0 =C2=A0 =C2=A0 supported (and ideally the METALOG handling would = be less fragile, but
>=C2=A0 =C2=A0 =C2=A0 without integrating it into kldxref the only real = option would be to
>=C2=A0 =C2=A0 =C2=A0 just run find(1) to get the list of linker.hints f= iles, which feels a
>=C2=A0 =C2=A0 =C2=A0 little backwards), but for now just paper over thi= s by skipping the
>=C2=A0 =C2=A0 =C2=A0 build step on arm.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 bapt
>=C2=A0 =C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ff7c12c1f= 17e ("Make kldxref a bootstrap tool and use unconditionally")
> ---
>=C2=A0 =C2=A0sys/conf/
kmod.mk=C2=A0 =C2=A0 =C2=A0| 3 ++-
>=C2=A0 =C2=A0sys/modules/Makefile | 3 ++-
>=C2=A0 =C2=A02 files changed, 4 insertions(+), 2 deletions(-)

I think before the libelf changes it was creating a file, but with only a s= ingle
version record.=C2=A0 Now it defers emitting the version record until it em= its at least
one "real" record since it doesn't know which endianness to u= se until it has
successfully opened and parsed a file.=C2=A0 As a result it is now leaving = the file
empty rather than with the version record.

It should not be hard to add ef_arm.c to fix for arm.

Another fun project btw would be for someone to add a "read" mode= to kldxref to
read a linker.hints file and dump the contents in a human readable fashion = similar
to the output one gets from 'kldxref -d'.

=
devmatch -v I think does this. But it's not nice.
=
Warner=C2=A0
--0000000000004a89b5060c7c15ef-- From nobody Thu Dec 14 18:31:57 2023 X-Original-To: dev-commits-src-all@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 4SrgtP3bDVz52pyS; Thu, 14 Dec 2023 18:31: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 4SrgtP374Gz4GgN; Thu, 14 Dec 2023 18:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702578717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwsGzW/ec9XAP0ptkc/Dw/GeJoWaRCawBB+4K4O+akQ=; b=YcqcGzzwf0IsejwoPpgg4aCxlaVro0jx+Obd0woOPjIdJo1N0+QRnvmKKLLdpZnToZIIRo rmKoqPCATJ7Pnw94SPXEsrRVLggOmOn28chYVREx3aZqEvcWAJiQ2yQB9KWmWOpM35Fk2t Rt/PbAAlAsp4ZKsfuycYK0BPrD3v74m5E+YFcgx/9zxseKtNPcdRR2K0dQB9kkWOYTrQPU NMb1Vv27OqO2qLzzd+OX4JE6oIDn0C3c7qq46AefzO72Q+eE/hQucqa6D2hiDLFT5HBCx3 fp8q1/DOZSzqsBNm+vcWh1MMBb864uFajz1KaSg8qbwm8FR6+zrU3dU6+8yJ1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702578717; a=rsa-sha256; cv=none; b=oBwziViMS4Wx09zK+R3uCzoRO5eYXtAP3BxR7hQWFD1Z6obWm7i65dBN0VFY2vFOmVrjCy Z63pgBD8Fpt1pXlVz2DPXuurQ1JRI5TEKxGH5uwATHWFVdOfZEZQgwTMX/qg61uzqZxxj3 NUgSEM0+3cIEGKNMOfkyVz9GPC1u9MSa/aTb/UGrC9nVSfskdmzKq2I9YAfO8AhpMA9lQ3 Wo6UgkudH6nB8rnRfcPPPO8ZFbV8f0wNFc6hL2mnbqOyEl9dnhjsOKRNcYUpFGk2XwH8rk KRwX/fOpw2cs7L2jNZny29a5hv6i659yMdKoBblWkQ6gNQyAqka/gryQ6t+gKQ== 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=1702578717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MwsGzW/ec9XAP0ptkc/Dw/GeJoWaRCawBB+4K4O+akQ=; b=v0nHUgx+cmjuqcQSA+CKUe4K581PYIU3USDb5CMXMXiibC8cYDzKSlskKmn1aBaOyeSyrq 2GRnu7iu7J5wftMrBarpRyKy1iOVh6pDHNVKdMr0FivTS67PSSccBTSgxMXl+V+QTX5zgk x40g/TRackq5m75Og0vlPiEvUyWDLUEneOAPci8QSm2k5cyMJ7dLwqJ7HfJROelXKLQUBk ouMMn0NY55olZBI0Fx7wGP5vEUvvutlXxdRNQ4I7yimdACzKy0+lCbDbiE0Pgw/Xs/otab Hi7Lw9iVm5pmt+pe0vhmrYl8xXRYF40PyseJM+EzPP1X8PXoctQ2YpV1YWSNJQ== 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 4SrgtP29rWzdpj; Thu, 14 Dec 2023 18:31: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 3BEIVvaU067165; Thu, 14 Dec 2023 18:31:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEIVvQK067162; Thu, 14 Dec 2023 18:31:57 GMT (envelope-from git) Date: Thu, 14 Dec 2023 18:31:57 GMT Message-Id: <202312141831.3BEIVvQK067162@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: ada9d12f9512 - main - kldxref: Put each ef_CPUARCH.c on its own line to prepare for ef_arm.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ada9d12f951201e13d831edc10acc36dd37d625e Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=ada9d12f951201e13d831edc10acc36dd37d625e commit ada9d12f951201e13d831edc10acc36dd37d625e Author: Jessica Clarke AuthorDate: 2023-12-14 18:27:09 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 18:27:09 +0000 kldxref: Put each ef_CPUARCH.c on its own line to prepare for ef_arm.c Adding ef_arm.c would push this past 80 columns, so prepare for its addition by splitting the line up. --- usr.sbin/kldxref/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/kldxref/Makefile b/usr.sbin/kldxref/Makefile index 6e0a7244328b..07451ba8f42b 100644 --- a/usr.sbin/kldxref/Makefile +++ b/usr.sbin/kldxref/Makefile @@ -3,7 +3,12 @@ PACKAGE= runtime PROG= kldxref MAN= kldxref.8 SRCS= kldxref.c ef.c ef_obj.c elf.c -SRCS+= ef_aarch64.c ef_amd64.c ef_i386.c ef_mips.c ef_powerpc.c ef_riscv.c +SRCS+= ef_aarch64.c \ + ef_amd64.c \ + ef_i386.c \ + ef_mips.c \ + ef_powerpc.c \ + ef_riscv.c WARNS?= 2 From nobody Thu Dec 14 18:31:58 2023 X-Original-To: dev-commits-src-all@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 4SrgtQ4c8Dz52r8V; Thu, 14 Dec 2023 18:31: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 4SrgtQ47BVz4Gkb; Thu, 14 Dec 2023 18:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702578718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UbVgKgu39jhwnOwYVNeykVHrf8XI8rIbaCnBdfh2Aps=; b=fpz7lB2BRpEzO4ltdr81pciCJ/CH4hPJpSiYAoqMHGcVmHxJUI8Vj7Qj6pk1p2TacrZogY Aeko3ENPKJw80CteIj2ZN+osiW3XFN2dwGCeuQfhBa0+FmsOuTZ8A4vvNnaWoxJ+iXgCzF MEsmIZ3QgewOiz2AwNr5TLje7+UYeDjv0/paVfjv05n+g2Tbvf5g/WEC1TYP0uPNSd7+dt AXwX50G05VKvg0tuQ6GahrZujaNYAzPJIAXVpRBLPvfshwFaHJAhXlAj5e2LAjiGJIsgin 1+L+0L7mPBENZ6ffCK8stciXKY0/cUNMCPbqjrGigTGAXuVVzfVXawSrV0YOGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702578718; a=rsa-sha256; cv=none; b=ENrqUVmJDMK8GQWvTdmdOQmz5VRIzam4V/XUK3FuA6juKFPfu1FwO9RseZ/Jm27/SRBgPN oXchRc0W+s/GyFIVDHKDT0kDdSY7Jk9CU8vdbgm3Tl1WxFr/GI+n59HrVlsqjh512d1wf/ Ye0NrkRIutSmZ5eaV/pn7BuELBSReeMztrcgCyMjKFAn0PlYrxydKEpE5oRGnkJnWPomgQ 63Jg+fY07tYVPO+epnHTLBRkgZsk4oJ+0u0Kx2Na4a96Z5pC1cS/BVcd+KN1v3jp1/G3U0 lE5xqLFgm/kM40QB2Y2jNZI/UFBuUiCnGZUxNVoMDnQrpipDWblGBy0tdKJIyg== 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=1702578718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UbVgKgu39jhwnOwYVNeykVHrf8XI8rIbaCnBdfh2Aps=; b=qN/Y8oIJBLq7DTQCIxs5XWlfiMjNJ3JPeBJK06KacJ7uuz90RBf5uMa+EIa/nH69Ycu7xw xPf799xINNPrSJazWyA6lCxj7MSWv2AgCN12eHa8y1THMN6/yU9452ZIA7Lttmose8YH16 SuXL6vFHccsxEBVKAPfRar3rYtCR8S5gluJkSuw7KIjZlxCFYSwLhjZ7JUh3tmwB75wZBc Q00ymGnPm8PsROfw89D03FLF52pYiHQ/mqIrgzu4OSmi5K8rAqRAxuXG2QTfUlb0nTPwH+ QJJ6nrtMBzodqUnx/2v990idavf4fiUgYwg++ghta8HcQQTGCwt2rZETti2jjQ== 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 4SrgtQ3Cymzf6Q; Thu, 14 Dec 2023 18:31: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 3BEIVwBe067204; Thu, 14 Dec 2023 18:31:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEIVwMG067201; Thu, 14 Dec 2023 18:31:58 GMT (envelope-from git) Date: Thu, 14 Dec 2023 18:31:58 GMT Message-Id: <202312141831.3BEIVwMG067201@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: c88f7d8fb540 - main - kldxref: Add arm support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c88f7d8fb54051366d91acfc6c80aca6154da3b4 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c88f7d8fb54051366d91acfc6c80aca6154da3b4 commit c88f7d8fb54051366d91acfc6c80aca6154da3b4 Author: Jessica Clarke AuthorDate: 2023-12-14 18:27:09 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 18:27:09 +0000 kldxref: Add arm support --- usr.sbin/kldxref/Makefile | 1 + usr.sbin/kldxref/ef_arm.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/usr.sbin/kldxref/Makefile b/usr.sbin/kldxref/Makefile index 07451ba8f42b..7b392e020939 100644 --- a/usr.sbin/kldxref/Makefile +++ b/usr.sbin/kldxref/Makefile @@ -4,6 +4,7 @@ PROG= kldxref MAN= kldxref.8 SRCS= kldxref.c ef.c ef_obj.c elf.c SRCS+= ef_aarch64.c \ + ef_arm.c \ ef_amd64.c \ ef_i386.c \ ef_mips.c \ diff --git a/usr.sbin/kldxref/ef_arm.c b/usr.sbin/kldxref/ef_arm.c new file mode 100644 index 000000000000..4b926839ee5d --- /dev/null +++ b/usr.sbin/kldxref/ef_arm.c @@ -0,0 +1,94 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2003 Jake Burkholder. + * Copyright 1996-1998 John D. Polstra. + * All rights reserved. + * Copyright (c) 2023 Jessica Clarke + * + * 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 "ef.h" + +/* + * Apply relocations to the values we got from the file. `relbase' is the + * target relocation address of the section, and `dataoff' is the target + * relocation address of the data in `dest'. + */ +static int +ef_arm_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, + GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) +{ + char *where; + GElf_Addr addr, addend; + GElf_Size rtype, symidx; + const GElf_Rel *rel; + const GElf_Rela *rela; + + switch (reltype) { + case ELF_T_REL: + rel = (const GElf_Rel *)reldata; + where = (char *)dest + relbase + rel->r_offset - dataoff; + addend = 0; + rtype = GELF_R_TYPE(rel->r_info); + symidx = GELF_R_SYM(rel->r_info); + break; + case ELF_T_RELA: + rela = (const GElf_Rela *)reldata; + where = (char *)dest + relbase + rela->r_offset - dataoff; + addend = rela->r_addend; + rtype = GELF_R_TYPE(rela->r_info); + symidx = GELF_R_SYM(rela->r_info); + break; + default: + return (EINVAL); + } + + if (where < (char *)dest || where >= (char *)dest + len) + return (0); + + if (reltype == ELF_T_REL) + addend = le32dec(where); + + switch (rtype) { + case R_ARM_ABS32: /* S + A */ + addr = EF_SYMADDR(ef, symidx) + addend; + le32enc(where, addr); + break; + case R_ARM_RELATIVE: /* B + A */ + addr = addend + relbase; + le32enc(where, addr); + break; + default: + warnx("unhandled relocation type %d", (int)rtype); + } + return (0); +} + +ELF_RELOC(ELFCLASS32, ELFDATA2LSB, EM_ARM, ef_arm_reloc); From nobody Thu Dec 14 18:31:59 2023 X-Original-To: dev-commits-src-all@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 4SrgtR5pQjz52pyV; Thu, 14 Dec 2023 18:31: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 4SrgtR5CGwz4Gyl; Thu, 14 Dec 2023 18:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702578719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Trx3AEy8AjRUpriFu0ziSGyDDpCutZy5PiCaVdwhpiQ=; b=UPGNCiqWgvne8MLbj0Q5MmCEx75EmJv79yIS9F4fIvgsfu8ONXAoHPcWSRNt4Ad5Hnk2qf e6zNq5MhjHNe+Ob9yutWgdVVisEa/GeMyF9WeVWuXqFdzG1g5KqJZUbrVhbt6apwjB0b1K HkzunMKI/cfDzBsTNYqK4SxEJWF+FkMNTYattZyJimDfVA503w3a+C4YdzRNbk0JFl3oyl NxLX6r4qFsyDwGLNa8JdLjV+6mkSQBTqncR0uQCfeQIMgzRizjGfcAyghz/Zhcna+651Jp 0MzBWjOd0c9cIqF1rGv4QuoPNZl/0pSR/NARFCjD1719zvpriadKgwGUmpfHHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702578719; a=rsa-sha256; cv=none; b=dKxkXq1xm+YneozqQXTGk6hh4eiR9YTiDei8ThMk3Q80lAm7hBhIeAzdj/bXtvii3HbDqj sUBDbPTILGJG+FVcrEV6v/nnVFiQdG2EQbZ0T0yMHT9qSFWsC79kigrhQleQdPNVxqSQeK Uge9csVm5UpT/1aefZezbk5PkNi9hrg6rjzVWSwYTfc3jt1Czhj4KgT+GiWXomPSNFiZM2 9kSE8egKhAy5+QAQjdh9HWlfzhupmhc7s134YWlTXeqELC+j/nD7GSQA+r1s0R9LUF4exw VbxfUiMxPnZfM9hmjkq/B423g2Ff5o4tlQ1ysax6liYdmv89Syps2tYMfS3ZxQ== 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=1702578719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Trx3AEy8AjRUpriFu0ziSGyDDpCutZy5PiCaVdwhpiQ=; b=FxjPpzkTCerzmdwBnJa7drYGZBpv4Mcf+BvnFn5KKRUoJQuuQaPo8c4WiHj/CKGRFpG1po UhdGO7WXrnuD04UYKYYwH9yfWYkl+ZMKOWq/jGeOH3YN69ND5wZDEzntuKfOOrr4wFJGpS CWQ+DDh03lCxz9eq4KQT1kEMcVMzKrq0Va90kfphgQbw+K5w5MVZxAdRf5vT32wHTD623y elfpHO3CygRVlNENwWkk0+Tn/a1o3Z9kMGT0P4DLQ/zmfW26wkkJZxnQO5l3TIwQysTVME Fvag3W2Rf73NliQhjSyGM704FkD5KT2ZSub9GucOZ+5GuAKlIWI3LXLBxqW6jA== 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 4SrgtR4Ffwzf41; Thu, 14 Dec 2023 18:31: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 3BEIVxSI067259; Thu, 14 Dec 2023 18:31:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEIVxUQ067256; Thu, 14 Dec 2023 18:31:59 GMT (envelope-from git) Date: Thu, 14 Dec 2023 18:31:59 GMT Message-Id: <202312141831.3BEIVxUQ067256@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: 3812c653b146 - main - Revert "Don't try and run kldxref for arm kernels" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3812c653b1468bc97003c9f59cc13cfd9afb6ed1 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=3812c653b1468bc97003c9f59cc13cfd9afb6ed1 commit 3812c653b1468bc97003c9f59cc13cfd9afb6ed1 Author: Jessica Clarke AuthorDate: 2023-12-14 18:27:09 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 18:27:09 +0000 Revert "Don't try and run kldxref for arm kernels" Now that kldxref supports arm this should not be needed. This reverts commit 0840bdbf2a07b68e29267bc49057ca6df2351360. --- sys/conf/kmod.mk | 3 +-- sys/modules/Makefile | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 4482034baf67..5d4dcd4371bc 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -354,8 +354,7 @@ _kmodinstall: .PHONY .include -# XXX: kldxref lacks support for arm -.if !defined(NO_XREF) && ${MACHINE_CPUARCH} != "arm" +.if !defined(NO_XREF) afterinstall: _kldxref .ORDER: realinstall _kldxref .ORDER: _installlinks _kldxref diff --git a/sys/modules/Makefile b/sys/modules/Makefile index dc914946ff41..c14933eebda4 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -908,8 +908,7 @@ SUBDIR:= ${SUBDIR:N${reject}} .endif # MODULES_OVERRIDE -- Keep last # Calling kldxref(8) for each module is expensive. -# XXX: kldxref lacks support for arm -.if !defined(NO_XREF) && ${MACHINE_CPUARCH} != "arm" +.if !defined(NO_XREF) .MAKEFLAGS+= -DNO_XREF afterinstall: .PHONY ${KLDXREF_CMD} ${DESTDIR}${KMODDIR} From nobody Thu Dec 14 20:02:25 2023 X-Original-To: dev-commits-src-all@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 4Srjtn754Lz53hJ3; Thu, 14 Dec 2023 20:02: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 4Srjtn6X6pz4Pct; Thu, 14 Dec 2023 20:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702584145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0RjFV1gOdWZ1PiZNxx2fTZWc4FOKDjNFQ+geD6ObJo0=; b=vTlKCXw76ZMZQ9d5msVJDJKWlW9GIGiNPDc0pYoj8IYHgxL6IllR6sKGGfCsqRyiYoPaCl QI2f2oRQ6jqnsw9d+GPRRMFEWMjerJdRRYNzaIjBgIWYu8iuaUKq7HeiAltEz2sBYKKz6W JJwZI8/RYeu8x/zf9AXD0dS3AUCEbnF6E7Og9pI2UBoEI2FD7O6BbqTuzvuPWr34HpteEs nZ6D+u0IShibdw/f/aAhWaUSf2gRzrPkcXunN57QD4OVjUDwelew6ZO45RK69q3ENhWISU XoLJ/Pvc41xJzLM3VbspwwNK2kGWa89GjG75nLamR/TVrAGG2WW4lsrNRyZTpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702584145; a=rsa-sha256; cv=none; b=gFoGEOuPby0GnyZCwbBtRMTYZ2FrOLdebgVLHvDiu4y2xVjE7iCKhP3Ek4ayLMY2GboNoH +coIstRR+UhySFsmwsMVLrXaVQJn9cg4PnAjwHbm94klIW/88WRORwrD7RVL15nmumXRvV RifqE13oKA8jFxPjXri8LS2CpkwxeHmKFoC6ML+BxqI02RXDa1G3D3T7uATIwIJtUBkyFD NBULVTYhihSxzu60zBeFsmyWJzeoxdEEUXtQlLrgCPE0m4/57FzvBo0wJy6p6OwQPbV/yn g5leg6Nen/N3ZohRXyUCRguvGNtRNHO7Nx6ay3d0YbtQIZIMPVcoZKGJ901pIw== 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=1702584145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0RjFV1gOdWZ1PiZNxx2fTZWc4FOKDjNFQ+geD6ObJo0=; b=pFbRCFatPdPpL5Ax34X6IyV8I+SxjRnHBZn5mVtdFNeLQ8IseunFWZca0q09e+3HadD5QK RQBWvoANwuWBytSVqca/aGx0HKqtPu9vowjrOvbVkuRPYTjxsueR6F0eqRtXNqnd3xNlpi IDiuatDZjSjpdf+zgRQGQwi407HqlxzZ85jT8XaYM6WXqAO6CVbITjObCCTu4Jc2Bd3H4/ MDfbWsTsn+LUM39hvWeMIBngCFkZwzH7HN4Dw/mCPgb1iE3RKIyFUwlzCtfQtQCvvQhjbX Q4MYcY7vCFKOEPCk624esKo6Q8W8feLx4JN0v5paeAlWbDo/7i1lGzyZHUskHg== 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 4Srjtn5cnszhHC; Thu, 14 Dec 2023 20:02: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 3BEK2PoV017948; Thu, 14 Dec 2023 20:02:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEK2Pfi017945; Thu, 14 Dec 2023 20:02:25 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:02:25 GMT Message-Id: <202312142002.3BEK2Pfi017945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 53fc8e190241 - main - cp: Move the -N flag in the manual page. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 53fc8e190241233d94e183f8a39ec39f2154dfa8 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=53fc8e190241233d94e183f8a39ec39f2154dfa8 commit 53fc8e190241233d94e183f8a39ec39f2154dfa8 Author: Dag-Erling Smørgrav AuthorDate: 2023-12-14 20:02:06 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-12-14 20:02:06 +0000 cp: Move the -N flag in the manual page. This accidentally got left out of 0f4467ce444b. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D43067 --- bin/cp/cp.1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/cp/cp.1 b/bin/cp/cp.1 index 32e6fe295b35..66d4ab04f5d3 100644 --- a/bin/cp/cp.1 +++ b/bin/cp/cp.1 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 7, 2023 +.Dd December 14, 2023 .Dt CP 1 .Os .Sh NAME @@ -88,10 +88,6 @@ option is specified, symbolic links on the command line are followed. If the .Fl R option is specified, all symbolic links are followed. -.It Fl N -When used with -.Fl p , -suppress copying file flags. .It Fl P No symbolic links are followed. This is the default if the @@ -159,6 +155,10 @@ or options.) .It Fl l Create hard links to regular files in a hierarchy instead of copying. +.It Fl N +When used with +.Fl p , +suppress copying file flags. .It Fl n Do not overwrite an existing file. (The From nobody Thu Dec 14 20:16:34 2023 X-Original-To: dev-commits-src-all@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 4SrkC64zqGz53hqb; Thu, 14 Dec 2023 20:16: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 4SrkC64RF1z4QqF; Thu, 14 Dec 2023 20:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702584994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZBKQQZeoA1Od6ibscz/qRXy8nSueI6t5xFLUl5/bYg=; b=kEY46z3f60QEoDDGR6cmg3nmgRhzWO8mnHPr67BsN1wN1TwzOFB69rfDex542DIDmI7ge+ 4aSL+Q+obS9leYfl2I/G2bWR4Qvoeg3CLiXdoKP0SqtOQBk7RxedWTsKVqVzufjdV6b/tz QriyGyr3JW2tLnUyqg2WPmGU3F2pKh4Zf+fuQZay0LiY5YIxiFzlncze0arEC9zDEFI85x aUVJhE6eAQ4wKdc2f4zh4fB0L9q+aO2kfI7xd5gxD13LmYX3AiBaKM8GOX7MHZaR5Xat4k cKNLOkQI9nXV2p6XrD/k7w0++stJ+Degk4jpuPp6lNX7u5ejztQiUSyTSAGkGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702584994; a=rsa-sha256; cv=none; b=eAx6hlS18MfNQnmhR1CTGMfLICVNyL+E08Qv2uKxpjyKtLyuXn3arsc2RKsglilufV4O9N wEy4ihmXBpGtG7TmFJRySBDqKJNN+nUnmQcPBsyxmkWs0NoCmxPNbGwawy+nhSSh2B3DtU 3vPWO3TPIs8LbTVoJMl1HFx6qvWjZ8HVCsu9Djb3a9yrjrCVJKAjlz/qfeelaMZEiMwuE8 cj/5YudMcZol1TTmt8aoPeSmTfwwq55LqKMa4zbDbi9XSXYjppgX+tUdQAxZsH/lqc8JNe fubZIZVflaC28Ssyaw1e8+c+C+T3HMNAWrwXpf1KOP1KvO1qmqFjdWldELtvzw== 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=1702584994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZBKQQZeoA1Od6ibscz/qRXy8nSueI6t5xFLUl5/bYg=; b=Lbz4I0nAwiSBlCRehevvwikvM7ZrR5soaqZZP3mnHiYy08Kf1weT1sCUlRUdIDtjd4mGF0 UwqWFihiUiInH3GuEfU1cmTUCoqrsCF+unNwzHTpEWLtOkjzPxHCJ2HC7iKrvswkBHrD5+ rO8Xjc2GTUW9e1yDd1S1x2BzVZGFfvnaoiuMPsHISdwTsU21HJHNZowJpV1wcVzHKBdsNS n9dCxirILc6SjRNMSdXm9jbNNqYwLfcuFYWJZxplSx3vfLfmV84R/s568yNzuUmQQo/9/B pffhX03SxsFiTva5xfHZhY8hYrlHP7snAJDHwxM3KrnTGAe3h2MmVbVxos3MhA== 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 4SrkC63Tm6zhnR; Thu, 14 Dec 2023 20:16: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 3BEKGYfh035712; Thu, 14 Dec 2023 20:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEKGY7f035709; Thu, 14 Dec 2023 20:16:34 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:16:34 GMT Message-Id: <202312142016.3BEKGY7f035709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Kenneth D. Merry" Subject: git: 264610a86e14 - main - mpr, mps: Establish busdma boundaries for memory pools List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ken X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 264610a86e14f8e123d94c3c3bd9632d75c078a3 Auto-Submitted: auto-generated The branch main has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=264610a86e14f8e123d94c3c3bd9632d75c078a3 commit 264610a86e14f8e123d94c3c3bd9632d75c078a3 Author: Kenneth D. Merry AuthorDate: 2023-12-14 20:05:17 +0000 Commit: Kenneth D. Merry CommitDate: 2023-12-14 20:05:17 +0000 mpr, mps: Establish busdma boundaries for memory pools Most all of the memory used by the cards in the mpr(4) and mps(4) drivers is required, according to the specs and Broadcom developers, to be within a 4GB segment of memory. This includes: System Request Message Frames pool Reply Free Queues pool ReplyDescriptorPost Queues pool Chain Segments pool Sense Buffers pool SystemReply message pool We got a bug report from Dwight Engen, who ran into data corruption in the BAE port of FreeBSD: > We have a port of the FreeBSD mpr driver to our kernel and recently > I found an issue under heavy load where a DMA may go to the wrong > address. The test system is a Supermicro X10SRH-CLN4F with the > onboard SAS3008 controller setup with 2 enterprise Micron SSDs in > RAID 0 (striped). I have debugged the issue and narrowed down that > the errant DMA is one that has a segment that crosses a 4GB > physical boundary. There are more details I can provide if you'd > like, but with the attached patch in place I can no longer > re-create the issue. > I'm not sure if this is a known limit of the card (have not found a > datasheet/programming docs for the chip) or our system is just > doing something a bit different. Any helpful info or insight would > be welcome. > Anyway, just thought this might be helpful info if you want to > apply a similar fix to FreeBSD. You can ignore/discard the commit > message as it is my internal commit (blkio is our own tool we use > to write/read every block of a device with CRC verification which > is how I found the problem). The commit message was: > [PATCH 8/9] mpr: fix memory corrupting DMA when sg segment crosses > 4GB boundary > Test case was two SSD's in RAID 0 (stripe). The logical disk was > then partitioned into two partitions. One partition had lots of > filesystem I/O and the other was initially filled using blkio with > CRCable data and then read back with blkio CRC verify in a loop. > Eventually blkio would report a bad CRC block because the physical > page being read-ahead into didn't contain the right data. If the > physical address in the arq/segs was for example 0x500003000 the > data would actually be DMAed to 0x400003000. The original patch was against mpr(4) before busdma templates were introduced, and only affected the buffer pool (sc->buffer_dmat) in the mpr(4) driver. After some discussion with Dwight and the LSI/Broadcom developers and looking through the driver, it looks like most of the queues in the driver are ok, because they limit the memory used to memory below 4GB. The buffer queue and the chain frames seem to be the exceptions. This is pretty much the same between the mpr(4) and mps(4) drivers. So, apply a 4GB boundary limitation for the buffer and chain frame pools in the mpr(4) and mps(4) drivers. Reported by: Dwight Engen Reviewed by: imp Obtained from: Dwight Engen Differential Revision: --- sys/dev/mpr/mpr.c | 6 ++++-- sys/dev/mps/mps.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 23f7ff0c3e9a..d5c02f9608ca 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -1500,7 +1500,8 @@ mpr_alloc_requests(struct mpr_softc *sc) rsize = sc->chain_frame_size * sc->num_chains; bus_dma_template_init(&t, sc->mpr_parent_dmat); BUS_DMA_TEMPLATE_FILL(&t, BD_ALIGNMENT(16), BD_MAXSIZE(rsize), - BD_MAXSEGSIZE(rsize), BD_NSEGMENTS((howmany(rsize, PAGE_SIZE)))); + BD_MAXSEGSIZE(rsize), BD_NSEGMENTS((howmany(rsize, PAGE_SIZE))), + BD_BOUNDARY(BUS_SPACE_MAXSIZE_32BIT+1)); if (bus_dma_template_tag(&t, &sc->chain_dmat)) { mpr_dprint(sc, MPR_ERROR, "Cannot allocate chain DMA tag\n"); return (ENOMEM); @@ -1552,7 +1553,8 @@ mpr_alloc_requests(struct mpr_softc *sc) BUS_DMA_TEMPLATE_FILL(&t, BD_MAXSIZE(BUS_SPACE_MAXSIZE_32BIT), BD_NSEGMENTS(nsegs), BD_MAXSEGSIZE(BUS_SPACE_MAXSIZE_32BIT), BD_FLAGS(BUS_DMA_ALLOCNOW), BD_LOCKFUNC(busdma_lock_mutex), - BD_LOCKFUNCARG(&sc->mpr_mtx)); + BD_LOCKFUNCARG(&sc->mpr_mtx), + BD_BOUNDARY(BUS_SPACE_MAXSIZE_32BIT+1)); if (bus_dma_template_tag(&t, &sc->buffer_dmat)) { mpr_dprint(sc, MPR_ERROR, "Cannot allocate buffer DMA tag\n"); return (ENOMEM); diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index f358ab8a73a9..adad2450a3d4 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -1431,7 +1431,8 @@ mps_alloc_requests(struct mps_softc *sc) rsize = sc->reqframesz * sc->num_chains; bus_dma_template_clone(&t, sc->req_dmat); BUS_DMA_TEMPLATE_FILL(&t, BD_MAXSIZE(rsize), BD_MAXSEGSIZE(rsize), - BD_NSEGMENTS(howmany(rsize, PAGE_SIZE))); + BD_NSEGMENTS(howmany(rsize, PAGE_SIZE)), + BD_BOUNDARY(BUS_SPACE_MAXSIZE_32BIT+1)); if (bus_dma_template_tag(&t, &sc->chain_dmat)) { mps_dprint(sc, MPS_ERROR, "Cannot allocate chain DMA tag\n"); return (ENOMEM); @@ -1473,7 +1474,8 @@ mps_alloc_requests(struct mps_softc *sc) BUS_DMA_TEMPLATE_FILL(&t, BD_MAXSIZE(BUS_SPACE_MAXSIZE_32BIT), BD_NSEGMENTS(nsegs), BD_MAXSEGSIZE(BUS_SPACE_MAXSIZE_24BIT), BD_FLAGS(BUS_DMA_ALLOCNOW), BD_LOCKFUNC(busdma_lock_mutex), - BD_LOCKFUNCARG(&sc->mps_mtx)); + BD_LOCKFUNCARG(&sc->mps_mtx), + BD_BOUNDARY(BUS_SPACE_MAXSIZE_32BIT+1)); if (bus_dma_template_tag(&t, &sc->buffer_dmat)) { mps_dprint(sc, MPS_ERROR, "Cannot allocate buffer DMA tag\n"); return (ENOMEM); From nobody Thu Dec 14 20:18:15 2023 X-Original-To: dev-commits-src-all@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 4SrkF40HXGz53jMh; Thu, 14 Dec 2023 20:18: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 4SrkF36tByz4RnD; Thu, 14 Dec 2023 20:18:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702585096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePIbju++NK3vkRzO+Qbyg74696OYnkpuyN7UQju+f/8=; b=Ys6QbKuxU/UKkkPaSNVDoJTSPyDiLrZuK7AvTXsJSdr2/z8+A1Xe193vLMGFzouTunakmN XDAMzNhbtI/+alK8zWbVdBDvVEZqXIwVIe/AmR1q4tXVsMQ7YozaTDMGcYsxGYWrtFP0Ew z/d92SGbII8+Xlyni2L4TxIWy4gbPPEoO2rzhokP1xEYM2l+NZ9hSZjvPlXrezFFfWtJeR dpgaEL6H27gG/SjB+mt0HhXAnwJr4FIJfN0UCA76kGqxU6NLh9WidfX/nXIHR/9KN63RTy Fij6Hw0ErefCHzejQ1EEDxGHlNgl/W94xOV3BWmVgziy95f6QBT8lqZokx02Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702585096; a=rsa-sha256; cv=none; b=vBECArFsUrXhClz5hCY26361CV3uEpXiWMbbZheOlZPTH6h+uVwAsDZipDlEEuq6tvMSWl vLkUO5UBs1Kfrly6S5klvBnr/7tPhwLshhJ3GKJncZbx6/RFlOcD8iQm4Z0tjz16qNMcBT /Jr82DfpWmxpzuXMqQGt+BsutjDFne0/MP0bgIlw3V27xTyGPDJ+VEeaHcoP0arRZQtUHk H0iBv05lceVMS9ZgNcLagNj1kOAWl6HZOJ8heLDtgHx9h+uWgWOk9V57q0OJ/sTLYQCqdN KGClb6giE4pMXpjTLJni/R7j47/VLMZRmgLjjnXQoB3RBClnc63vxBvH01SnRg== 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=1702585096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePIbju++NK3vkRzO+Qbyg74696OYnkpuyN7UQju+f/8=; b=m2UnxaSQmiRDnyC6diOwW+/Dc6q5zfpaAvfOH0qMwsPzRBChDvEgZrZraEgZD70rdXXGSs MetOD0Cp4mjL+nAp2dMPUB1sjbyX4tgJgAuES4yLmkUZaw0diLHLdxtMgE6AuotV51VjoI CbOilQ+gUYUXycL9Zo6gSzujtoEL9obXcFhe5AMnCV3d23ZJ9p62+V3dRkfzP2rEzQt5ih AuPqBbyGl+VrcEMhFbUOGPxv5OTpnaWX+uRNx6F9z4FPXwCaiLQ6koskheZeSCY+N2OgfA wae6Ry5NxxvSpLcK80nyTwaeADjw/yZ7nDkysPi2Nq+Gmdi41+Pe5TIgMFsDGg== 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 4SrkF35wvFzhQf; Thu, 14 Dec 2023 20:18: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 3BEKIFKL036119; Thu, 14 Dec 2023 20:18:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEKIFCx036116; Thu, 14 Dec 2023 20:18:15 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:18:15 GMT Message-Id: <202312142018.3BEKIFCx036116@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: ae7925cafeee - main - kldxref: Fix MIPS Elf_Rel addend computation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ae7925cafeee1136bd1761b2ce75614ee47b0039 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=ae7925cafeee1136bd1761b2ce75614ee47b0039 commit ae7925cafeee1136bd1761b2ce75614ee47b0039 Author: Jessica Clarke AuthorDate: 2023-12-14 20:17:19 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 20:17:19 +0000 kldxref: Fix MIPS Elf_Rel addend computation Fixes: 0299afdff145 ("kldxref: Make use of libelf to be a portable cross tool") --- usr.sbin/kldxref/ef_mips.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/kldxref/ef_mips.c b/usr.sbin/kldxref/ef_mips.c index edc99a7d2505..60fd35390d7e 100644 --- a/usr.sbin/kldxref/ef_mips.c +++ b/usr.sbin/kldxref/ef_mips.c @@ -88,7 +88,6 @@ ef_mips_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, else addend = be32dec(where); } - addend = *where; } switch (rtype) { From nobody Thu Dec 14 20:18:16 2023 X-Original-To: dev-commits-src-all@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 4SrkF51M26z53jPc; Thu, 14 Dec 2023 20:18:17 +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 4SrkF50jbdz4RlQ; Thu, 14 Dec 2023 20:18:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702585097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+GNG+SVdlhDm0qBozjx3DqFA+PDq/zKlWFj1yRpXuKs=; b=Upap4QOLI0FdW7wM04x6BOkLE7W1LiEYGHNhQMaQ8j0X/yD1DoQ5HWze/WxWCIioafHPij LcN97B/DrRN7GRyUfjGYlwKvXoFkR5R/iMYV6HtU4/2QcOq+oOaKJObAnS6SEKqlzlG0qn Y0pG6cOhpGfkVBpu1FcT7IMeVPwTBV8QjltMD0w1BUnsGG4YkVwoU47lgDJaIJMIBlWPbV w9eHyqyh2iG4UEl9G1e9srRz7VidBNyy3ZjQXYvRoLaEJWVJgR4k0iaQkqJy0cOjRzmfLR R0N+CUlVW56b8MVzDpuczhe8HuWCiZzRdd81xbh/yYrbFKUi7p8hknV3ClwG1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702585097; a=rsa-sha256; cv=none; b=lstD+5FfZ4Uwb1EuREjEI0D4OnwMalYron6rKNz2WicRzjz1lS2jVZnQsAuUqTLpchn2iO 5G9eueFFoIZCkUneIVlWt1GOYjvvxpinO6LDLSCuiiS8EvnROdf1Brm1jQOF59cshJ+2/z qkBGGx4w+td8h9XNWcOBAJscu7QXXYD6vjSRXOgkSqVLurpTwzzTAMUSkwlvYu1lslDy53 J8ueQbJBowv6Qf+LKahWaNeLxHkp13to5ngtdc4NB/c3cem+86hTuOfoRTMCFBtLTSs+WS rkxaP8yDrvUZCJNvQVxq63vFMwg/XOhJMtCeN+tF1wxB+3fliS4YA4ZrKuZXEQ== 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=1702585097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+GNG+SVdlhDm0qBozjx3DqFA+PDq/zKlWFj1yRpXuKs=; b=RP0vbCBtvYVkELjMQ3HLFughz+7b665gLo1EVxvJ0W5YOMNCO7O7MlClbDFUY+pi7D4H6P OWk20bIpWjrozBPjyiAsnrWJ+cjjE0RgauF55LqXFmuSZZSo2KmdO2p4uk3ylLx5OyFfWx QtkYFK8C+owf7labDU2+HnxfdrnjE/vQcRgqauWPHT7DuSMA11dzO5KJzIu/zxY0bzjPz0 fn3KmAlJknAY0EJqC2vFjZkyXjp0XTy9QJ5YnGXgALXLy+0Jdvq61dr1h4jtLwJnhfhyzm 4c3zVOCIWeabokYJH7w2xoVwsXYm6vWzeD80qJ5+J40fgQ5P8TosnYIp1Ii8Nw== 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 4SrkF46s89zh5h; Thu, 14 Dec 2023 20:18:16 +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 3BEKIGCv036161; Thu, 14 Dec 2023 20:18:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEKIGEb036158; Thu, 14 Dec 2023 20:18:16 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:18:16 GMT Message-Id: <202312142018.3BEKIGEb036158@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: aaba1490ec4b - main - kldxref: Implement aarch64 R_AARCH64_AB64 relocation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: aaba1490ec4b17dea750b1e58dfded7aeb4e9816 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=aaba1490ec4b17dea750b1e58dfded7aeb4e9816 commit aaba1490ec4b17dea750b1e58dfded7aeb4e9816 Author: Jessica Clarke AuthorDate: 2023-12-14 20:17:20 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 20:17:20 +0000 kldxref: Implement aarch64 R_AARCH64_AB64 relocation Doing nothing seems to be sufficient but is strange, inconsistent with other architectures, and not necessary when it's easy to support properly. --- usr.sbin/kldxref/ef_aarch64.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/kldxref/ef_aarch64.c b/usr.sbin/kldxref/ef_aarch64.c index f1e499e76ef1..4365a7ff1f66 100644 --- a/usr.sbin/kldxref/ef_aarch64.c +++ b/usr.sbin/kldxref/ef_aarch64.c @@ -43,8 +43,8 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - Elf64_Addr addend; - GElf_Size rtype; + GElf_Addr addr, addend; + GElf_Size rtype, symidx; const GElf_Rela *rela; if (reltype != ELF_T_RELA) @@ -54,6 +54,7 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, where = (char *)dest - dataoff + rela->r_offset; addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); + symidx = GELF_R_SYM(rela->r_info); if (where < (char *)dest || where >= (char *)dest + len) return (0); @@ -63,6 +64,8 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, le64enc(where, relbase + addend); break; case R_AARCH64_ABS64: + addr = EF_SYMADDR(ef, symidx) + addend; + le64enc(where, addr); break; default: warnx("unhandled relocation type %d", (int)rtype); From nobody Thu Dec 14 20:18:18 2023 X-Original-To: dev-commits-src-all@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 4SrkF625qrz53jB9; Thu, 14 Dec 2023 20:18: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 4SrkF61nk3z4S0V; Thu, 14 Dec 2023 20:18:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702585098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7uls7kBmo1/sWwr9XbFKLIWmoMlHtlgxp5WJ7lK0zm0=; b=M5Lzgiuk2d/zaHI3GXNASURfyks7VgGlC3ftME1vTyki76SAQHxXvPjVpiTxbxCczE8jzl JRKVzanpjJuYocrJy+DTsNqcxVGdPl3tTVrN+yAvxWRjrl2uTgI/WDD0XmM2ayQvxJKeTG IBbIYtpMVvfrSRHTL3QAQNutcjxzVSRHxawMV1IZuI9Fyq8EYWrdnighFzjeKthFsxek4E dYnXezQCPMZYfP6z7x9kUqwgy73sZMpcShYu2+vGFS+dhfUJus9+pCZo2h/35Lktqk9sM0 4oQ3CBJjfYYnHcTs77E4mQntkeg+Ig0inoE+4bcepLUGbUVFD9MpsiuSjnmTdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702585098; a=rsa-sha256; cv=none; b=geYow9Oc3hzIhouRXVBSsIeGP/fjUBBJZcth4K8Irs2Tymw67piWIXvsDf32YTcEcoM7ol 0Vj7N45/DTNoh+aFT+0S3mvqnbN6sFxkhJ0Qu/pp76omh1iPdsW1T9PKly0d6CbHQIHEWl HjauRESUL2sdube1baeRuJclZ7HH5HEyXGD2mybiy2G6mn+CQAbtdh7InnQgrgrwovJ3MV ssJUxzloo4cQkNT8zUtVRBAlzU/MDK0AjlMIUxgtKJ26IiuH6EKqQf//8e9B6OrKW4CezI Z5hLZn9OpYP/lb2mGeg+1ysgrAq5j1yNfEvlwYn4eyL2oxPJ89Vw6TCdizwWaQ== 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=1702585098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7uls7kBmo1/sWwr9XbFKLIWmoMlHtlgxp5WJ7lK0zm0=; b=q+mgVr9chSkp8zr55qokUAQo4EOjO7LTRDHfiLhssyUNl3weYFVPV+KSgCLw6pE+/QN7zj e2/hJOW3KvP5kttCbhgwInsJx4YUZsL6Xh1MuKMZsiijBXpzEdze6IN0QPnYMPV02p2wCQ O7gj+nApsTzl17Nz+d0E4EGl+FRmkFbMzgNvSRiFzi1zzBDtz1Xa704hJFgyfrUPicI4SN KqE4lKJvsDrFYqhK1CMF3PHgKzi7dJmRTYGycoyIdG4nY0QYs4S1rlcMWNGpZ2PqXJKrMR exmFIEO74s4aaM9xob1KdhCYo2Gzb6hm6Fmh8ru0roGTQMFrsiQFdpECibs2iA== 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 4SrkF60mynzhQg; Thu, 14 Dec 2023 20:18: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 3BEKIIPw036209; Thu, 14 Dec 2023 20:18:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEKIIW3036206; Thu, 14 Dec 2023 20:18:18 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:18:18 GMT Message-Id: <202312142018.3BEKIIW3036206@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: 2a622f14e8a5 - main - kldxref: Reduce divergence between per-architecture files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 2a622f14e8a588de654847ae264cdc3616528c9d Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=2a622f14e8a588de654847ae264cdc3616528c9d commit 2a622f14e8a588de654847ae264cdc3616528c9d Author: Jessica Clarke AuthorDate: 2023-12-14 20:17:20 +0000 Commit: Jessica Clarke CommitDate: 2023-12-14 20:17:20 +0000 kldxref: Reduce divergence between per-architecture files Note that relbase is always 0 for DSOs so its omission for __KLD_SHARED architectures was not a bug in practice. Whilst here, also parenthesise the dest offset for where to avoid transiently creating an out-of-bounds pointer, which is UB (though even on CHERI architectures, where capability bounds compression can result in that creating invalid capabilities that will trap on dereference, optimisation will reassociate to the correct form in practice and thus work just fine). --- usr.sbin/kldxref/ef_aarch64.c | 22 +++++++++++++--------- usr.sbin/kldxref/ef_amd64.c | 28 ++++++++++++---------------- usr.sbin/kldxref/ef_arm.c | 12 ++++++------ usr.sbin/kldxref/ef_i386.c | 17 ++++++++--------- usr.sbin/kldxref/ef_mips.c | 29 +++++++++++++---------------- usr.sbin/kldxref/ef_powerpc.c | 39 +++++++++++++++++++++------------------ usr.sbin/kldxref/ef_riscv.c | 15 ++++++++++----- 7 files changed, 83 insertions(+), 79 deletions(-) diff --git a/usr.sbin/kldxref/ef_aarch64.c b/usr.sbin/kldxref/ef_aarch64.c index 4365a7ff1f66..b61de3b032ab 100644 --- a/usr.sbin/kldxref/ef_aarch64.c +++ b/usr.sbin/kldxref/ef_aarch64.c @@ -47,21 +47,25 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Size rtype, symidx; const GElf_Rela *rela; - if (reltype != ELF_T_RELA) + switch (reltype) { + case ELF_T_RELA: + rela = (const GElf_Rela *)reldata; + where = (char *)dest + (relbase + rela->r_offset - dataoff); + addend = rela->r_addend; + rtype = GELF_R_TYPE(rela->r_info); + symidx = GELF_R_SYM(rela->r_info); + break; + default: return (EINVAL); - - rela = (const GElf_Rela *)reldata; - where = (char *)dest - dataoff + rela->r_offset; - addend = rela->r_addend; - rtype = GELF_R_TYPE(rela->r_info); - symidx = GELF_R_SYM(rela->r_info); + } if (where < (char *)dest || where >= (char *)dest + len) return (0); - switch(rtype) { + switch (rtype) { case R_AARCH64_RELATIVE: - le64enc(where, relbase + addend); + addr = relbase + addend; + le64enc(where, addr); break; case R_AARCH64_ABS64: addr = EF_SYMADDR(ef, symidx) + addend; diff --git a/usr.sbin/kldxref/ef_amd64.c b/usr.sbin/kldxref/ef_amd64.c index 729039daa509..fde032dcabc2 100644 --- a/usr.sbin/kldxref/ef_amd64.c +++ b/usr.sbin/kldxref/ef_amd64.c @@ -36,17 +36,16 @@ #include "ef.h" /* - * Apply relocations to the values we got from the file. `relbase' is the - * target relocation address of the section, and `dataoff' is the target - * relocation address of the data in `dest'. + * Apply relocations to the values obtained from the file. `relbase' is the + * target relocation address of the section, and `dataoff/len' is the region + * that is to be relocated, and has been copied to *dest */ static int ef_amd64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - GElf_Addr val; - GElf_Addr addend, addr; + GElf_Addr addr, addend; GElf_Size rtype, symidx; const GElf_Rel *rel; const GElf_Rela *rela; @@ -54,14 +53,14 @@ ef_amd64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, switch (reltype) { case ELF_T_REL: rel = (const GElf_Rel *)reldata; - where = (char *)dest + relbase + rel->r_offset - dataoff; + where = (char *)dest + (relbase + rel->r_offset - dataoff); addend = 0; rtype = GELF_R_TYPE(rel->r_info); symidx = GELF_R_SYM(rel->r_info); break; case ELF_T_RELA: rela = (const GElf_Rela *)reldata; - where = (char *)dest + relbase + rela->r_offset - dataoff; + where = (char *)dest + (relbase + rela->r_offset - dataoff); addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); symidx = GELF_R_SYM(rela->r_info); @@ -90,23 +89,20 @@ ef_amd64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, case R_X86_64_NONE: /* none */ break; case R_X86_64_64: /* S + A */ - addr = EF_SYMADDR(ef, symidx); - val = addr + addend; - le64enc(where, val); + addr = EF_SYMADDR(ef, symidx) + addend; + le64enc(where, addr); break; case R_X86_64_32S: /* S + A sign extend */ - addr = EF_SYMADDR(ef, symidx); - val = (Elf32_Addr)(addr + addend); - le32enc(where, val); + addr = EF_SYMADDR(ef, symidx) + addend; + le32enc(where, addr); break; case R_X86_64_GLOB_DAT: /* S */ addr = EF_SYMADDR(ef, symidx); le64enc(where, addr); break; case R_X86_64_RELATIVE: /* B + A */ - addr = addend + relbase; - val = addr; - le64enc(where, val); + addr = relbase + addend; + le64enc(where, addr); break; default: warnx("unhandled relocation type %d", (int)rtype); diff --git a/usr.sbin/kldxref/ef_arm.c b/usr.sbin/kldxref/ef_arm.c index 4b926839ee5d..cc5e265f821e 100644 --- a/usr.sbin/kldxref/ef_arm.c +++ b/usr.sbin/kldxref/ef_arm.c @@ -37,9 +37,9 @@ #include "ef.h" /* - * Apply relocations to the values we got from the file. `relbase' is the - * target relocation address of the section, and `dataoff' is the target - * relocation address of the data in `dest'. + * Apply relocations to the values obtained from the file. `relbase' is the + * target relocation address of the section, and `dataoff/len' is the region + * that is to be relocated, and has been copied to *dest */ static int ef_arm_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, @@ -54,14 +54,14 @@ ef_arm_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, switch (reltype) { case ELF_T_REL: rel = (const GElf_Rel *)reldata; - where = (char *)dest + relbase + rel->r_offset - dataoff; + where = (char *)dest + (relbase + rel->r_offset - dataoff); addend = 0; rtype = GELF_R_TYPE(rel->r_info); symidx = GELF_R_SYM(rel->r_info); break; case ELF_T_RELA: rela = (const GElf_Rela *)reldata; - where = (char *)dest + relbase + rela->r_offset - dataoff; + where = (char *)dest + (relbase + rela->r_offset - dataoff); addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); symidx = GELF_R_SYM(rela->r_info); @@ -82,7 +82,7 @@ ef_arm_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, le32enc(where, addr); break; case R_ARM_RELATIVE: /* B + A */ - addr = addend + relbase; + addr = relbase + addend; le32enc(where, addr); break; default: diff --git a/usr.sbin/kldxref/ef_i386.c b/usr.sbin/kldxref/ef_i386.c index e4f73877c430..962ed2bc0664 100644 --- a/usr.sbin/kldxref/ef_i386.c +++ b/usr.sbin/kldxref/ef_i386.c @@ -36,9 +36,9 @@ #include "ef.h" /* - * Apply relocations to the values we got from the file. `relbase' is the - * target relocation address of the section, and `dataoff' is the target - * relocation address of the data in `dest'. + * Apply relocations to the values obtained from the file. `relbase' is the + * target relocation address of the section, and `dataoff/len' is the region + * that is to be relocated, and has been copied to *dest */ static int ef_i386_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, @@ -53,14 +53,14 @@ ef_i386_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, switch (reltype) { case ELF_T_REL: rel = (const GElf_Rel *)reldata; - where = (char *)dest + relbase + rel->r_offset - dataoff; + where = (char *)dest + (relbase + rel->r_offset - dataoff); addend = 0; rtype = GELF_R_TYPE(rel->r_info); symidx = GELF_R_SYM(rel->r_info); break; case ELF_T_RELA: rela = (const GElf_Rela *)reldata; - where = (char *)dest + relbase + rela->r_offset - dataoff; + where = (char *)dest + (relbase + rela->r_offset - dataoff); addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); symidx = GELF_R_SYM(rela->r_info); @@ -76,13 +76,12 @@ ef_i386_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, addend = le32dec(where); switch (rtype) { - case R_386_RELATIVE: /* A + B */ - addr = addend + relbase; + case R_386_RELATIVE: /* B + A */ + addr = relbase + addend; le32enc(where, addr); break; case R_386_32: /* S + A - P */ - addr = EF_SYMADDR(ef, symidx); - addr += addend; + addr = EF_SYMADDR(ef, symidx) + addend; le32enc(where, addr); break; case R_386_GLOB_DAT: /* S */ diff --git a/usr.sbin/kldxref/ef_mips.c b/usr.sbin/kldxref/ef_mips.c index 60fd35390d7e..e4aeedb5c08b 100644 --- a/usr.sbin/kldxref/ef_mips.c +++ b/usr.sbin/kldxref/ef_mips.c @@ -39,32 +39,31 @@ #include "ef.h" /* - * Apply relocations to the values we got from the file. `relbase' is the - * target relocation address of the section, and `dataoff' is the target - * relocation address of the data in `dest'. + * Apply relocations to the values obtained from the file. `relbase' is the + * target relocation address of the section, and `dataoff/len' is the region + * that is to be relocated, and has been copied to *dest */ static int ef_mips_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - GElf_Addr val; + GElf_Addr addr, addend; + GElf_Size rtype, symidx; const GElf_Rel *rel; const GElf_Rela *rela; - GElf_Addr addend, addr; - GElf_Size rtype, symidx; switch (reltype) { case ELF_T_REL: rel = (const GElf_Rel *)reldata; - where = (char *)dest + relbase + rel->r_offset - dataoff; + where = (char *)dest + (relbase + rel->r_offset - dataoff); addend = 0; rtype = GELF_R_TYPE(rel->r_info); symidx = GELF_R_SYM(rel->r_info); break; case ELF_T_RELA: rela = (const GElf_Rela *)reldata; - where = (char *)dest + relbase + rela->r_offset - dataoff; + where = (char *)dest + (relbase + rela->r_offset - dataoff); addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); symidx = GELF_R_SYM(rela->r_info); @@ -92,20 +91,18 @@ ef_mips_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, switch (rtype) { case R_MIPS_64: /* S + A */ - addr = EF_SYMADDR(ef, symidx); - val = addr + addend; + addr = EF_SYMADDR(ef, symidx) + addend; if (elf_encoding(ef) == ELFDATA2LSB) - le64enc(where, val); + le64enc(where, addr); else - be64enc(where, val); + be64enc(where, addr); break; case R_MIPS_32: /* S + A */ - addr = EF_SYMADDR(ef, symidx); - val = addr + addend; + addr = EF_SYMADDR(ef, symidx) + addend; if (elf_encoding(ef) == ELFDATA2LSB) - le32enc(where, val); + le32enc(where, addr); else - be32enc(where, val); + be32enc(where, addr); break; default: warnx("unhandled relocation type %d", (int)rtype); diff --git a/usr.sbin/kldxref/ef_powerpc.c b/usr.sbin/kldxref/ef_powerpc.c index ab33e170b488..f72cc1d85e20 100644 --- a/usr.sbin/kldxref/ef_powerpc.c +++ b/usr.sbin/kldxref/ef_powerpc.c @@ -40,48 +40,51 @@ * target relocation address of the section, and `dataoff/len' is the region * that is to be relocated, and has been copied to *dest */ -int +static int ef_ppc_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - GElf_Addr addend, val; + GElf_Addr addr, addend; GElf_Size rtype, symidx; const GElf_Rela *rela; - if (reltype != ELF_T_RELA) + switch (reltype) { + case ELF_T_RELA: + rela = (const GElf_Rela *)reldata; + where = (char *)dest + (relbase + rela->r_offset - dataoff); + addend = rela->r_addend; + rtype = GELF_R_TYPE(rela->r_info); + symidx = GELF_R_SYM(rela->r_info); + break; + default: return (EINVAL); - - rela = (const GElf_Rela *)reldata; - where = (char *)dest - dataoff + rela->r_offset; - addend = rela->r_addend; - rtype = GELF_R_TYPE(rela->r_info); - symidx = GELF_R_SYM(rela->r_info); + } if (where < (char *)dest || where >= (char *)dest + len) return (0); switch (rtype) { case R_PPC_RELATIVE: /* word32|doubleword64 B + A */ - val = relbase + addend; + addr = relbase + addend; if (elf_class(ef) == ELFCLASS64) { if (elf_encoding(ef) == ELFDATA2LSB) - le64enc(where, val); + le64enc(where, addr); else - be64enc(where, val); + be64enc(where, addr); } else - be32enc(where, val); + be32enc(where, addr); break; case R_PPC_ADDR32: /* word32 S + A */ - val = EF_SYMADDR(ef, symidx) + addend; - be32enc(where, val); + addr = EF_SYMADDR(ef, symidx) + addend; + be32enc(where, addr); break; case R_PPC64_ADDR64: /* doubleword64 S + A */ - val = EF_SYMADDR(ef, symidx) + addend; + addr = EF_SYMADDR(ef, symidx) + addend; if (elf_encoding(ef) == ELFDATA2LSB) - le64enc(where, val); + le64enc(where, addr); else - be64enc(where, val); + be64enc(where, addr); break; default: warnx("unhandled relocation type %d", (int)rtype); diff --git a/usr.sbin/kldxref/ef_riscv.c b/usr.sbin/kldxref/ef_riscv.c index 38299a1e9b46..46b9b66bee58 100644 --- a/usr.sbin/kldxref/ef_riscv.c +++ b/usr.sbin/kldxref/ef_riscv.c @@ -38,19 +38,24 @@ #include "ef.h" -int +/* + * Apply relocations to the values obtained from the file. `relbase' is the + * target relocation address of the section, and `dataoff/len' is the region + * that is to be relocated, and has been copied to *dest + */ +static int ef_riscv_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - const GElf_Rela *rela; - GElf_Addr addend, addr; + GElf_Addr addr, addend; GElf_Size rtype, symidx; + const GElf_Rela *rela; switch (reltype) { case ELF_T_RELA: rela = (const GElf_Rela *)reldata; - where = (char *)dest + relbase + rela->r_offset - dataoff; + where = (char *)dest + (relbase + rela->r_offset - dataoff); addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); symidx = GELF_R_SYM(rela->r_info); @@ -68,7 +73,7 @@ ef_riscv_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, le64enc(where, addr); break; case R_RISCV_RELATIVE: /* B + A */ - addr = addend + relbase; + addr = relbase + addend; le64enc(where, addr); break; default: From nobody Thu Dec 14 20:25:43 2023 X-Original-To: dev-commits-src-all@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 4SrkPg29M4z53jWb; Thu, 14 Dec 2023 20:25: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 4SrkPg1l2Zz4TqB; Thu, 14 Dec 2023 20:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702585543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NiAI/oJM0obWa/a4Dc3L41DtpBV+cD8dr3x05m/4Is0=; b=uzIOqgEt+e/n8JjUKYYvtVcNDe5X5VgElLUg3BkDBdUZMOQcxa4YKqHi7JQeM/JsPzXktu BbUazZLHdQI1qURjbcn4B2zzULXsiABwzQZZqtAmOTXFCBQbx6lWBkmG8hOSSyv9mbBdS9 HrixzwiKst/HvXyxuSqQFtPkgAZ1zn1vcN/XzJlg7o8frfrpuTl4f+HcMQdwCdzAVii+dG zAlF0f3fJt7690NnEr8OhPFaVDcWYcevAlfydb3P+Gn7+7eYZGLILFuKPlcUl5bxI7k6QL 6gslP2glR33znUJoThrrZVKvD7SPIfyFmsK9AceWeLLk7uVkdlmfPTUNAN9D9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702585543; a=rsa-sha256; cv=none; b=T4lEfhVylpYAin+kipVbWyge33awB6dGXhYL3c3ry5IvQ5WXTPEvXjEy8K+Z6bEo5Hpgof oOomiLu8UByGbvaL6inkgus96SJyVbJNNxkVKtTNZO4yO4LWQsonfuEKSy3gQBGOHJ+Fu2 +7vPaGXLnxvw2wIeo2sBX8BtXGEWzb203AQ2q7UyP2NwWM0XVkC7WvORgtPO70/9Qs+iYX zlXVe7Z/9D+lESd0WUpimeHWtvHk63hvxRQpUN3DQbUEUY6xPLt9JHDVHHL/blnX0ya++h XckvaZjzZgn6jLqn1pRbFsa8qqM7yYm+b3QkpHt/ja97uBEBGyFBWvuzZaLYbw== 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=1702585543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NiAI/oJM0obWa/a4Dc3L41DtpBV+cD8dr3x05m/4Is0=; b=GlbWaOTdyASP/vC4f1iU5yjZWsW2Yszmx4ic03qUvQ52WmHRxRwDFcBBA611YDtxKDLsH/ Q4KnWOdFgH2eNYcNsFwGPjWxbtQz80N+SWNvN5yuFlGHxclj3l0MZSYpeflFh5oZBpXTdR HDqQcTNglcnx74C2V3N06iNbAy1pO+iHPd+e41NzJZ0MfmK34vUnV18gktn8OhR+TkO+y2 Qjy7RttRdttAoZ9wQBmQLAhAdLDX/OUxbau+Ydab/XhkWuR0AVYEtaDdK5/AtSLbqf8KN8 fJDfaGoBMx83V7RBuNPMpugLyyqSrLEL2vRoGMY+ePOtzkLt66yF5mfhByjsmw== 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 4SrkPg0pkLzj0l; Thu, 14 Dec 2023 20:25: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 3BEKPhR5052062; Thu, 14 Dec 2023 20:25:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEKPh9t052059; Thu, 14 Dec 2023 20:25:43 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:25:43 GMT Message-Id: <202312142025.3BEKPh9t052059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 9ba8c825a392 - stable/13 - sysvipc: Fix 32-bit compat on !i386 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9ba8c825a392e141bc05efb71595f949b00a3719 Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9ba8c825a392e141bc05efb71595f949b00a3719 commit 9ba8c825a392e141bc05efb71595f949b00a3719 Author: Brooks Davis AuthorDate: 2023-12-01 20:48:29 +0000 Commit: Brooks Davis CommitDate: 2023-12-14 20:25:27 +0000 sysvipc: Fix 32-bit compat on !i386 The various time fields are time_t's which are only 32-bit on i386. Fixing the old versions is probably of little use, but it's more correct and in theory there could be powerpc binaries from 6.x. PR: 240035 Fixes: fbb273bc05bef Properly support for FreeBSD 4 32bit System V shared memory. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D42870 (cherry picked from commit 957f014dc076a7f74ed0c8c8699e6f39b55785e7) --- sys/compat/freebsd32/freebsd32_ipc.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_ipc.h b/sys/compat/freebsd32/freebsd32_ipc.h index e31fef9a38fe..5ded02045875 100644 --- a/sys/compat/freebsd32/freebsd32_ipc.h +++ b/sys/compat/freebsd32/freebsd32_ipc.h @@ -43,8 +43,8 @@ struct semid_ds32 { struct ipc_perm32 sem_perm; uint32_t __sem_base; unsigned short sem_nsems; - int32_t sem_otime; - int32_t sem_ctime; + time32_t sem_otime; + time32_t sem_ctime; }; #ifdef _KERNEL @@ -73,9 +73,9 @@ struct msqid_ds32 { uint32_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; - int32_t msg_stime; - int32_t msg_rtime; - int32_t msg_ctime; + time32_t msg_stime; + time32_t msg_rtime; + time32_t msg_ctime; }; #ifdef _KERNEL @@ -95,9 +95,9 @@ struct shmid_ds32 { pid_t shm_lpid; pid_t shm_cpid; unsigned int shm_nattch; - int32_t shm_atime; - int32_t shm_dtime; - int32_t shm_ctime; + time32_t shm_atime; + time32_t shm_dtime; + time32_t shm_ctime; }; #ifdef _KERNEL @@ -142,9 +142,9 @@ struct semid_ds32_old { struct ipc_perm32_old sem_perm; uint32_t __sem_base; unsigned short sem_nsems; - int32_t sem_otime; + time32_t sem_otime; int32_t sem_pad1; - int32_t sem_ctime; + time32_t sem_ctime; int32_t sem_pad2; int32_t sem_pad3[4]; }; @@ -158,11 +158,11 @@ struct msqid_ds32_old { uint32_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; - int32_t msg_stime; + time32_t msg_stime; int32_t msg_pad1; - int32_t msg_rtime; + time32_t msg_rtime; int32_t msg_pad2; - int32_t msg_ctime; + time32_t msg_ctime; int32_t msg_pad3; int32_t msg_pad4[4]; }; @@ -173,9 +173,9 @@ struct shmid_ds32_old { pid_t shm_lpid; pid_t shm_cpid; int16_t shm_nattch; - int32_t shm_atime; - int32_t shm_dtime; - int32_t shm_ctime; + time32_t shm_atime; + time32_t shm_dtime; + time32_t shm_ctime; uint32_t shm_internal; }; From nobody Thu Dec 14 20:59:27 2023 X-Original-To: dev-commits-src-all@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 4Srl8b3cbqz53mCh; Thu, 14 Dec 2023 20:59: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 4Srl8b33FJz4lNh; Thu, 14 Dec 2023 20:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702587567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5PixW+iUQHNpqSR4KHs/XNKGqKFE07Iw+I+7D97xZoA=; b=MY+n+iz0R51TnQdl35Xv9H2bEnzQhzcaIgEgM8+sZx71xKczrBlyVFfnS6nA8GSeIMlNkT rXQXPzFsBXkTIpi8ZsI5fvKEUZNIpGkxsDzAXWnsOGxQvqNwN/+XmSTncyJqG0U8/po6pf StSxzaislSe8hZpEhulVHuoajfx1xQ5oLhKYdra5iGkflBzt66+hkAhRg/HUn/I+YhDWKd BheNMb7QyLL0IcH7aYmPjIMUaOeXqlS9Qg+3Z5+lw7vgJfg2bGYjQ4+iNATXTcH5ZMKxCw zoWI74vC1NFSzU1gQF7PmBm2+8xnGqTJn84/BMlHSkHDG8+MecJ6oO5xEpiLnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702587567; a=rsa-sha256; cv=none; b=tKRLAya1uJQWvwJATDUq1KRxJFIWox3QHINaJS+wBoSye2JBZgI5gA0qQIZDG9w0zh8TN9 MaScMsEuOM82Zrn9mq62d06GiVryFctQeGmRQPJcTPneE+vdsottsi/SuCuiG8qnsqUP2h 8m4jSYtp/kD0xYyl+1cyxZ2XPOf6rzFZ9aP4awktD00a5rYC1/CfpkQAeOfxNYhZaxpr99 mPD6wYDpDZ9SEOQEm+Gr2RYsluVjqVDcveeUKQ63tj94YhMxZRuK81xCAxtN/v1Xq4l5Vq TKYFVw27MyHc5Ni1kXfoIWbLV+i9B2he1nqAq5VoxzWUcWh1G59N2+GxfU2xdw== 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=1702587567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5PixW+iUQHNpqSR4KHs/XNKGqKFE07Iw+I+7D97xZoA=; b=vH3lkJpB1xrj3AyenG2bKQLPE+JH5LIBQndClodELVkqAC5QV/W4L40o9Dz9YArfQZk0u9 j5mG/0V1mmBukTz0b0TSLd8cYeED6niebEJs9CP1+lLxxMjXV5/CrOAoiyeGSI5EsyK0MU bZKE+ruGxzM0dtBDw+vn6M1cfZKRZQk0oOaxoSIIdomKa5O+ondscjEPYbefj1FXTre5ek QYaVufrvhbDz8uOdeFrL79Irz7h8KY+eo7R25RklduG7ogZxNi/w/4bPzYDOmKaVWOlJ6b tbaMpJKTpWSVhmCTqxTIXBKb+Okc+1BYYcYXIlqJK7n/7BSFZc4rDTFDWn91Rw== 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 4Srl8b26knzjb3; Thu, 14 Dec 2023 20:59: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 3BEKxR3P009385; Thu, 14 Dec 2023 20:59:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEKxRTG009382; Thu, 14 Dec 2023 20:59:27 GMT (envelope-from git) Date: Thu, 14 Dec 2023 20:59:27 GMT Message-Id: <202312142059.3BEKxRTG009382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Kenneth D. Merry" Subject: git: a9262d053b63 - stable/14 - Add IBM TS1170 density codes and specs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ken X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a9262d053b6322155fe844e798cab35cc8ed0c2e Auto-Submitted: auto-generated The branch stable/14 has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=a9262d053b6322155fe844e798cab35cc8ed0c2e commit a9262d053b6322155fe844e798cab35cc8ed0c2e Author: Kenneth D. Merry AuthorDate: 2023-10-31 19:20:36 +0000 Commit: Kenneth D. Merry CommitDate: 2023-12-14 20:55:24 +0000 Add IBM TS1170 density codes and specs. These were obtained from a drive, but they agree with the IBM documentation. The bpi/bpmm values are the same as TS1160, but the number of tracks is much larger (18944 tracks vs 8704 for TS1160). The tapes are also longer, 1337m total. (According to the MAM on a sample JF tape. I don't have a JE tape handy to compare.) The end result is a 50TB raw capacity (150TB compressed) for TS1170 with a JF cartridge vs 20TB raw capacity (60TB compressed) for TS1160 with a JE cartridge. lib/libmt/mtlib.c: Add the TS1170 density codes to the denstiy table in libmt. usr.bin/mt/mt.1: Add the TS1170 density codes and specs to the density table in the mt(1) man page. As usual for TS drives, there is an encrypted and non-encrypted density code (0x79 and 0x59 respectively). Sponsored by: Spectra Logic (cherry picked from commit 83823d063ab57db8d3954c1530d036f1ccdceb41) --- lib/libmt/mtlib.c | 2 ++ usr.bin/mt/mt.1 | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libmt/mtlib.c b/lib/libmt/mtlib.c index edcf747bd808..43f9c95bb797 100644 --- a/lib/libmt/mtlib.c +++ b/lib/libmt/mtlib.c @@ -642,6 +642,7 @@ static struct densities { { 0x56, 20670, 525018, "3592B5 (unencrypted)" }, { 0x57, 21850, 554990, "3592A6 (unencrypted)" }, { 0x58, 15142, 384607, "LTO-5" }, + { 0x59, 21850, 554990, "3592A7 (unencrypted)" }, { 0x5A, 15142, 384607, "LTO-6" }, { 0x5C, 19107, 485318, "LTO-7" }, { 0x5D, 19107, 485318, "LTO-M8" }, @@ -654,6 +655,7 @@ static struct densities { { 0x75, 20670, 525018, "3592A5 (encrypted)" }, { 0x76, 20670, 525018, "3592B5 (encrypted)" }, { 0x77, 21850, 554990, "3592A6 (encrypted)" }, + { 0x79, 21850, 554990, "3592A7 (encrypted)" }, { 0x8c, 1789, 45434, "EXB-8500c" }, { 0x90, 1703, 43245, "EXB-8200c" }, { 0, 0, 0, NULL } diff --git a/usr.bin/mt/mt.1 b/usr.bin/mt/mt.1 index 2cc649c43f13..5eb584336b2a 100644 --- a/usr.bin/mt/mt.1 +++ b/usr.bin/mt/mt.1 @@ -28,7 +28,7 @@ .\" .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" -.Dd December 10, 2020 +.Dd October 31, 2023 .Dt MT 1 .Os .Sh NAME @@ -520,6 +520,7 @@ Value Width Tracks Density Code Type Reference Note 0x56 12.7 (0.5) 7680 20,670 (525,018) C 3592B5 (unencrypted) 0x57 12.7 (0.5) 8704 21,850 (554,990) C 3592A6 (unencrypted) 0x58 12.7 (0.5) 1280 15,142 (384,607) C LTO-5 +0x59 12.7 (0.5)18944 21,850 (554,990) C 3592A7 (unencrypted) 0x5A 12.7 (0.5) 2176 15,142 (384,607) C LTO-6 0x5C 12.7 (0.5) 3584 19,107 (485,318) C LTO-7 0x5D 12.7 (0.5) 5376 19,107 (485,318) C LTO-M8 14 @@ -532,6 +533,7 @@ Value Width Tracks Density Code Type Reference Note 0x75 12.7 (0.5) 5120 20,670 (525,018) C 3592A5 (encrypted) 0x76 12.7 (0.5) 7680 20,670 (525,018) C 3592B5 (encrypted) 0x77 12.7 (0.5) 8704 21,850 (554,990) C 3592A6 (encrypted) +0x79 12.7 (0.5)18944 21,850 (554,990) C 3592A7 (encrypted) 0x8c 8.0 (0.315) 1 1,789 (45,434) RLL CS EXB-8500c 5,9 0x90 8.0 (0.315) 1 1,703 (43,245) RLL CS EXB-8200c 5,9 .Ed From nobody Thu Dec 14 21:01:22 2023 X-Original-To: dev-commits-src-all@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 4SrlBq0WLdz53lx7; Thu, 14 Dec 2023 21:01: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 4SrlBq00JKz4lMn; Thu, 14 Dec 2023 21:01:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702587683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ofl/xZCfxwswDtUFvr8JGJf8yNEkFNqZEgfekKeTdx0=; b=LHwId5b4p/Jiy1RrRg1pKMjoiG6u1AUt/kwOSFVoapAkK1Hq05OmD/08J8w6B+JIcE55mf FCEPLgc+WnDXdHLWE4DseWgNLvuVOtcIb86Ufe+9DSWWkCtfNa/jtGLrvHpjqdmZn5qmQb FeGkFAe7TG8/k5EulHfEipvcgIQyQNZF+4N9HBnD9Qi1S7bWPXkXbuwxZ4BQBZSH+5I7l6 04+/VZb9/EcKXNh5mUlu4Z0JKWlJtzc1JwCfoeTvVTluqiZoDQeaUbDLxxX3oQQlToJD3C 1SnCcWg6vZeOH2PQJkcMW6pIJnV9cOgIU4DF4xVH8RZ7uOHK9wIIq3XHzvNIsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702587683; a=rsa-sha256; cv=none; b=VSW7pwwzkXxIu9p4cVL7OhXCgm+im6x3dW+F0X6TeVEdQZWkFphwOBr66eXD0v+yUMl+gp dXZsq8ySsWaM26fYAhI6k8kgVnipdXo1h+tBpzTIvVVG0TS69DsJEOFX1I3wnw/wdRvkg2 lXinqfKAa0lfsSpC7rKGOfnihB8LbFrMb+PveDpXtq30fAu7S1SJ2kd9n5pZpQy9g4S4um sri4tC3aw7U9zB6mADFiaCAA3I47fWqPwXK9DkV2XUpJs1SBgyR3bYROnc26ew6YVCez/0 PW6Gnasm6wWhGMNJAgEfBQia47IOVOVGQiyBqMo2UOfPPpPFxVhPfHWLSRw3dg== 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=1702587683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ofl/xZCfxwswDtUFvr8JGJf8yNEkFNqZEgfekKeTdx0=; b=jP9ACtI0ejLfeMj4hdYepYWBZCerg/RS+JXL9hgiNx2GlRT49Z/YZvMkeaIgpbfsUjNB4V G1xDA1vr9rpfYTw09JNTmM3qvwdC8fqK6MMOWsfjSF+yOP0xOqqWdcoGBvcWpGxkJOSVC8 BJQt0EZ+ue09WTMJUugGV+YoqJUUDXLZ42ofnGS2FZx3ySIwHt30MEoaF/2T71xW9jNntw bgpStgPxR67EsM+RhZNtdcB3DntK40ckZtiHNy/flwgzW09Q94dwFltTa5/4drfa0d0xi1 obeZyJRcTmpG78TbYjNdmdmBeb43bipzctS5/ohvVVdYutN4utMUnkrQQCLI2g== 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 4SrlBp69gqzjYN; Thu, 14 Dec 2023 21:01: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 3BEL1M26022063; Thu, 14 Dec 2023 21:01:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEL1MAY022060; Thu, 14 Dec 2023 21:01:22 GMT (envelope-from git) Date: Thu, 14 Dec 2023 21:01:22 GMT Message-Id: <202312142101.3BEL1MAY022060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Kenneth D. Merry" Subject: git: 9e6e28bb8ea8 - stable/13 - Add IBM TS1170 density codes and specs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ken X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9e6e28bb8ea80a87c915ac9a107212b87cf7cab7 Auto-Submitted: auto-generated The branch stable/13 has been updated by ken: URL: https://cgit.FreeBSD.org/src/commit/?id=9e6e28bb8ea80a87c915ac9a107212b87cf7cab7 commit 9e6e28bb8ea80a87c915ac9a107212b87cf7cab7 Author: Kenneth D. Merry AuthorDate: 2023-10-31 19:20:36 +0000 Commit: Kenneth D. Merry CommitDate: 2023-12-14 21:00:54 +0000 Add IBM TS1170 density codes and specs. These were obtained from a drive, but they agree with the IBM documentation. The bpi/bpmm values are the same as TS1160, but the number of tracks is much larger (18944 tracks vs 8704 for TS1160). The tapes are also longer, 1337m total. (According to the MAM on a sample JF tape. I don't have a JE tape handy to compare.) The end result is a 50TB raw capacity (150TB compressed) for TS1170 with a JF cartridge vs 20TB raw capacity (60TB compressed) for TS1160 with a JE cartridge. lib/libmt/mtlib.c: Add the TS1170 density codes to the denstiy table in libmt. usr.bin/mt/mt.1: Add the TS1170 density codes and specs to the density table in the mt(1) man page. As usual for TS drives, there is an encrypted and non-encrypted density code (0x79 and 0x59 respectively). Sponsored by: Spectra Logic (cherry picked from commit 83823d063ab57db8d3954c1530d036f1ccdceb41) --- lib/libmt/mtlib.c | 2 ++ usr.bin/mt/mt.1 | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libmt/mtlib.c b/lib/libmt/mtlib.c index edcf747bd808..43f9c95bb797 100644 --- a/lib/libmt/mtlib.c +++ b/lib/libmt/mtlib.c @@ -642,6 +642,7 @@ static struct densities { { 0x56, 20670, 525018, "3592B5 (unencrypted)" }, { 0x57, 21850, 554990, "3592A6 (unencrypted)" }, { 0x58, 15142, 384607, "LTO-5" }, + { 0x59, 21850, 554990, "3592A7 (unencrypted)" }, { 0x5A, 15142, 384607, "LTO-6" }, { 0x5C, 19107, 485318, "LTO-7" }, { 0x5D, 19107, 485318, "LTO-M8" }, @@ -654,6 +655,7 @@ static struct densities { { 0x75, 20670, 525018, "3592A5 (encrypted)" }, { 0x76, 20670, 525018, "3592B5 (encrypted)" }, { 0x77, 21850, 554990, "3592A6 (encrypted)" }, + { 0x79, 21850, 554990, "3592A7 (encrypted)" }, { 0x8c, 1789, 45434, "EXB-8500c" }, { 0x90, 1703, 43245, "EXB-8200c" }, { 0, 0, 0, NULL } diff --git a/usr.bin/mt/mt.1 b/usr.bin/mt/mt.1 index 2cc649c43f13..5eb584336b2a 100644 --- a/usr.bin/mt/mt.1 +++ b/usr.bin/mt/mt.1 @@ -28,7 +28,7 @@ .\" .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" -.Dd December 10, 2020 +.Dd October 31, 2023 .Dt MT 1 .Os .Sh NAME @@ -520,6 +520,7 @@ Value Width Tracks Density Code Type Reference Note 0x56 12.7 (0.5) 7680 20,670 (525,018) C 3592B5 (unencrypted) 0x57 12.7 (0.5) 8704 21,850 (554,990) C 3592A6 (unencrypted) 0x58 12.7 (0.5) 1280 15,142 (384,607) C LTO-5 +0x59 12.7 (0.5)18944 21,850 (554,990) C 3592A7 (unencrypted) 0x5A 12.7 (0.5) 2176 15,142 (384,607) C LTO-6 0x5C 12.7 (0.5) 3584 19,107 (485,318) C LTO-7 0x5D 12.7 (0.5) 5376 19,107 (485,318) C LTO-M8 14 @@ -532,6 +533,7 @@ Value Width Tracks Density Code Type Reference Note 0x75 12.7 (0.5) 5120 20,670 (525,018) C 3592A5 (encrypted) 0x76 12.7 (0.5) 7680 20,670 (525,018) C 3592B5 (encrypted) 0x77 12.7 (0.5) 8704 21,850 (554,990) C 3592A6 (encrypted) +0x79 12.7 (0.5)18944 21,850 (554,990) C 3592A7 (encrypted) 0x8c 8.0 (0.315) 1 1,789 (45,434) RLL CS EXB-8500c 5,9 0x90 8.0 (0.315) 1 1,703 (43,245) RLL CS EXB-8200c 5,9 .Ed From nobody Thu Dec 14 21:59:59 2023 X-Original-To: dev-commits-src-all@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 4SrmVR2hhQz53qWh; Thu, 14 Dec 2023 21:59: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 4SrmVR2D7jz4sXd; Thu, 14 Dec 2023 21:59:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4q3TcuJF2fOitLPirdx+i94FmjDJ60bvlQ0godBv5xs=; b=o5qKpxEYxpgitpR6xfuXw08wNFKg9GaCQkZIET86uzgTx7oqvo9428ZxZvDVgxteXyM2dZ ovgLASut9pnp0CV+PLPMVwDMrpDbtMuTs/3WBTHa1fFIkTiTnzsR+X/7hwtEh/3fg+GhuJ yTVtxS3vjXCWfQw8yMTZCghl/kbYiB1DNA83nlxx3UN9ycVZbwOgD56Cg7D7A48Y2+VkOh 7bNOHd3z1SbiqghanP4XMm6EnWwv/YVQGCSoaQTJLCLD8TA1jFPthdWz+i59Zdy+JZB5GA EkAhvEr/w92i+0yKBtBHlMBLWRFxLWfO2JR4rEq4zhlbvLbIDHfwLdzb/G6CgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702591199; a=rsa-sha256; cv=none; b=hA5YHFXkg26mU0pySTCnYKjg5k3BeSVRGR/913emFaXoNmzCiBz6/bkBiTO0ScDoPPDLSp n708t5hfaKAl/7nyicMxPLsOghPfCRkb+Xiq2wQ60/f0eyAR1ZGQCFicVFnjlp1GN1TaLs bjkblyl5AyXY4HndLRKNSUF/NrbVKbgJMG6BKdPy343BnZrJt7RzIBjVGloYSUDAoXBV39 qckQhShDhMpR0qHjuQz0/ksXGdRqEQ01UZdA+x31J5oMhW3kOWq3nqtSlFNjqHFHbq68w9 r5WPhR7lpDbtFD94sl+QjKDBisM34x49pjhLuhYNReKR8UsTzriCz+AopBQGng== 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=1702591199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4q3TcuJF2fOitLPirdx+i94FmjDJ60bvlQ0godBv5xs=; b=sX3WEW1cA/M0EWIXEnopSusDBIHZsuViv6t9ZUtBOruXzZFSN/PS+jicv2uyGvo2dJuzWW gzC92bPkSX/HymhPY3VL0g52ELEhdWhwenubARav0Wc+QSPMVUQPkKFjIHVo05TTAO1/ZC woba8IZZG8EyuWPN7kznkrk4HTNYpTD/y8dfanayWBeu80BnqAlEXA8Npy+1e3LDCiOzqL Bv6l2+Dg33VvV/KSDeWknGrYLRQIL0roLe/MA9+0Q/5o9uShAUPhRlkoquyJVP6Kf7mjpP P29cCdUXU2ugJb5jDRmdcX/fHzmf1Q1obpOXjKkLrYUbcufqaz7riXg9wdVUFw== 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 4SrmVR1G26zkqV; Thu, 14 Dec 2023 21:59: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 3BELxxMF010540; Thu, 14 Dec 2023 21:59:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BELxxRO010537; Thu, 14 Dec 2023 21:59:59 GMT (envelope-from git) Date: Thu, 14 Dec 2023 21:59:59 GMT Message-Id: <202312142159.3BELxxRO010537@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: 0bc82e4fbbe9 - main - ip_mroute: allow MRT_DEL_MFC even if there are pending upcalls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0bc82e4fbbe9d1eb72b6be512ff92a4908f85fef Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0bc82e4fbbe9d1eb72b6be512ff92a4908f85fef commit 0bc82e4fbbe9d1eb72b6be512ff92a4908f85fef Author: Kristof Provost AuthorDate: 2023-12-12 18:17:40 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 21:04:43 +0000 ip_mroute: allow MRT_DEL_MFC even if there are pending upcalls In del_mfc() we try to find the forwarding entry, but that fails to find the entry if mfc_stall_ring is not empty. We should find the entry anyway, and destroy it (and any pending messages) on delete. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43031 --- sys/netinet/ip_mroute.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 10ac13d7d582..b864a4db5abc 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -1250,22 +1250,17 @@ del_mfc(struct mfcctl2 *mfccp) MRW_WLOCK(); - rt = mfc_find(&origin, &mcastgrp); + LIST_FOREACH(rt, &V_mfchashtbl[MFCHASH(origin, mcastgrp)], mfc_hash) { + if (in_hosteq(rt->mfc_origin, origin) && + in_hosteq(rt->mfc_mcastgrp, mcastgrp)) + break; + } if (rt == NULL) { MRW_WUNLOCK(); return EADDRNOTAVAIL; } - /* - * free the bw_meter entries - */ - free_bw_list(rt->mfc_bw_meter_leq); - rt->mfc_bw_meter_leq = NULL; - free_bw_list(rt->mfc_bw_meter_geq); - rt->mfc_bw_meter_geq = NULL; - - LIST_REMOVE(rt, mfc_hash); - free(rt, M_MRTABLE); + expire_mfc(rt); MRW_WUNLOCK(); From nobody Thu Dec 14 22:00:00 2023 X-Original-To: dev-commits-src-all@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 4SrmVS3m9Qz53qP0; Thu, 14 Dec 2023 22:00: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 4SrmVS3G0jz4sVc; Thu, 14 Dec 2023 22:00:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5HFH41OEAlGmt7N+sR27a04mYDGE9G50td1vsWdNFI=; b=okZkczuuVzHeUdA/KtWuOaZw78tCYHmStCmmBPAH8G3cG511Gfgt7yPOap+MV74mxw2F8M brQP4UB/NsrbFZMNqumkNYeOplvm7x/SApq/CJAE0SnHteTZQ9jxJ+ZLKDXt1pCJBD7hFd p68RNKnYnmvY4uHCl4WlBqrT2u5KzbnJtWaBby2NbJX5sppcQWC7/s+acsFUWlfFUvP5w+ THNB/UduRXfj9ubtsWDJ6Gap/OY4psiS75uGqsSiQLHe+stfqBg1HUHJ62B7rwiOuI0Z5A 3throob+vpaiRC/S62+CLlIXmIvxD5sioJNyVAF/5JhzLGqKsmpF4Lg5gE2tvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702591200; a=rsa-sha256; cv=none; b=BEirdEZ1OpTxtWePz33PzmaAJEMnVAuRLq0C+msseeRizFN7NfA9eq3r2+QwFnNbha0U3o 3ilAkxF7ylRasa3Y9lL0dqWH/RFrjmzGQ3fUWgEx9b9L7nWCqm46LGDEk34fL8rqBfQdY9 GrcoVA8X3MARFWIRXRz2TfQtml65npiuqF3Yd7BeBGllkT28NBDSYcgEUGBsMCIEColkEa I/Tt4jO3ibBdIph/i/r9iU0zs7Toop7yXsMfRFZXwN+xjF3jRn7BPBG9D1naItZoeyVj4t rSsqK3O/sw+EIbR1tNKfPeVENEWPNUBIGrcHXDmLUSdR60X/Lgs6v5K6/UMAsw== 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=1702591200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5HFH41OEAlGmt7N+sR27a04mYDGE9G50td1vsWdNFI=; b=gzDordptoxD8VK3qHv4T3aTWFZMVdoqF0kbrwYTrsaDGFiEtP4dEwxWRw6r3xalhu/8S8t fQuvueA260k18vuQ2GrSWN4Va6oKs1AYbSUn/vFhA8un6Uk62TunhkbDJ1Pbb7uGpPI77Y gX/rLn321X6Lct8NDjB71IXUKxmSBv+TH8fXgU31gc1G2R06pd27CLkBB9jI+ruPlgsErd 3jeukP/vSA6Nrw8KEcMP5c+PzX2HBjm3eTWpEq4pBuXSWSd3dMs+SzFEqk3KI3OlzDA25b 9C9sDDDEBB0PoT0Z6CmzkdNsWUaZDSjHjJSo6DAQVAmmul1FymSQtpaDlVmCcg== 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 4SrmVS1mRxzkqW; Thu, 14 Dec 2023 22:00: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 3BEM00TM010685; Thu, 14 Dec 2023 22:00:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEM007Z010682; Thu, 14 Dec 2023 22:00:00 GMT (envelope-from git) Date: Thu, 14 Dec 2023 22:00:00 GMT Message-Id: <202312142200.3BEM007Z010682@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: c196e43243b8 - main - Revert "mcast: fix memory leak in imf_purge()" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c196e43243b83840cc9f3d1dadc7dacb3b0f556f Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c196e43243b83840cc9f3d1dadc7dacb3b0f556f commit c196e43243b83840cc9f3d1dadc7dacb3b0f556f Author: Kristof Provost AuthorDate: 2023-12-12 18:20:03 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 21:05:34 +0000 Revert "mcast: fix memory leak in imf_purge()" This reverts commit fa03d37432caf17d56a931a9e6f5d9b06f102c5b. This commit caused us to not send IGMP leave messages if the inpcb went away. In other words: we freed pending packets whenever the socket closed rather than when the interface (or address) goes away. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43032 --- sys/netinet/in_mcast.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index ee707414dc42..cae15bc4108a 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -914,8 +914,6 @@ imf_purge(struct in_mfilter *imf) imf->imf_st[0] = imf->imf_st[1] = MCAST_UNDEFINED; KASSERT(RB_EMPTY(&imf->imf_sources), ("%s: imf_sources not empty", __func__)); - if (imf->imf_inm != NULL) - mbufq_drain(&imf->imf_inm->inm_scq); } /* From nobody Thu Dec 14 22:00:01 2023 X-Original-To: dev-commits-src-all@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 4SrmVT3vZQz53qL6; Thu, 14 Dec 2023 22:00: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 4SrmVT3LQ6z4scT; Thu, 14 Dec 2023 22:00:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GTDXJG2Wlp1NAi70DuZUdtp/w4LXyVqY4mtI/XNVwmA=; b=kfYAsguNVSNZof1vLQU3AkodC8q9H0OOjVl+428D3b7lRrotNwRwPeuLMz9y5o6PKefTWb aaFxHCjQqkcrxQBivJPbrOnFe43vE3c5eQr5KxO41MhCwcmvuG8XinM+WcNZO/+iBnQmVU xh7aD4JG7BwTyrMAN1UcYk4DSmEIbWl3i+XSwEBTjiI4HdR9h9o6JEFRH26L1/pNh1CK1A 9HkSUpFuoOAaxtZQMcU9JWWrlNcUX7L3wIAU5JYoLEz7qvGI+1riAVTd+5opJ+Ht/GEI2n sK6Mr+1t8GhU1cuf8kH24jNug/9NeurH3ex6KdZ9J8KYoy+/l9Ae3aGhm+wV8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702591201; a=rsa-sha256; cv=none; b=Qq2zFIYNTOo52vv6Cy7jFZ+VZsqJMShUEtVHMCWn5SZlRpivjeaIGSxKbd9etbH/QIa91B JEIiHPA+6hdm8wgVJNHRNjEiCDHVr/xlx3qJB3Ksmhkddjkjb1Pf8HRYcVUvDG+ECamivl n9C4G2quzdL5LN1zQZ9kgN+rjIcFpc0/5lQ0G9VIwzGzzSP0IE10tbhPm5JhpC60UqT2kC yLY+EEY4nCHuHZIORrN6+WHDJf/b4enWC2yZX3vxK4aes6VPH0zUNuKVwpX0NYXYlHgvuE MqgC2QqjbRNgLvBIbVGTr028Gh+w8rnokBTO7FJOrCJpmeJE34k2RRT27Wg3iw== 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=1702591201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GTDXJG2Wlp1NAi70DuZUdtp/w4LXyVqY4mtI/XNVwmA=; b=oqYPZDQRUN/pFnmASxrYkAAbNo0AQ9dusnMLcPhIw5nCA4/gG4UfDCbfX/fg8/gmjiSTu9 9deMv9XXGCiE4UusGg2KSTUV8krkMpWvPVP0X75B7QsFbtS4M7dYhhXeMCWU3NXlGbb+Dn GaHGW+cMn0klKASED/bTi6FGkC6wiodcH74ZxxiQbbZyXXxGMvRh/qiqXQF3c7QlDz4oGy eCRjSjAgmouLs+63WubXs6ik+1H6agG5looR/4/RJbYZAZiO3MW+jOt2xjM08n2pgvRtmX YaIj21jupe1AqWXOx14b9gQMLmrkbtDl133TN/QnwpESM6HUvP6aL2t7P2EN0g== 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 4SrmVT2SHmzlGH; Thu, 14 Dec 2023 22:00: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 3BEM011F012684; Thu, 14 Dec 2023 22:00:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEM01gU012664; Thu, 14 Dec 2023 22:00:01 GMT (envelope-from git) Date: Thu, 14 Dec 2023 22:00:01 GMT Message-Id: <202312142200.3BEM01gU012664@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: c2e340452c14 - main - mcast: fix leaked igmp packets on multicast cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c2e340452c147b551180f2a1600ae76491342b0e Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c2e340452c147b551180f2a1600ae76491342b0e commit c2e340452c147b551180f2a1600ae76491342b0e Author: Kristof Provost AuthorDate: 2023-12-13 12:32:08 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 21:06:01 +0000 mcast: fix leaked igmp packets on multicast cleanup When we release a multicast address (e.g. on interface shutdown) we may still have packets queued in inm_scq. We have to free those, or we'll leak memory. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43033 --- sys/netinet/in_mcast.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index cae15bc4108a..6d68ebcb188c 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -1180,6 +1180,7 @@ inm_purge(struct in_multi *inm) free(ims, M_IPMSOURCE); inm->inm_nsrc--; } + mbufq_drain(&inm->inm_scq); } /* From nobody Fri Dec 15 00:41:40 2023 X-Original-To: dev-commits-src-all@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 4Srr503zrlz5416f; Fri, 15 Dec 2023 00:41: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 4Srr503Xzkz3XNf; Fri, 15 Dec 2023 00:41:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702600900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/1iekZ2xPcLBxm0wHgetgosNg4ch7U2Cz6V/zbQFC9k=; b=Dpza0fP+duPfUSFsh/vJUYjocShlK3XM9pgaO48/TEX80lOiImtrBjcsHti/yBPxXkqI0E 59cy7PUQfnZYM+XvFb/3fVHRyxJwgscu+81gyeKqOVIm1vfOlOz5ihiwvPlD1+VPWH2Iy0 xFpkZ12ZurTiXOWNUNSwqX1C2Pj0ny/sISNBHksC45mGCDdh7Yxg+EEEAPbHXz2Gi9amiw yfLTMdYWkVtAlr9dtH+8mHHJ6eAc+FQqo4qRuDdDLe9Gw2ewmHL6Uk9uqEL8Ccy80g5Dim gGV6d0O4qEN/X/Tjd6H9v+0NFdahoccTIcaSKZ7G5qC99MLw74NWS/wcgHHcbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702600900; a=rsa-sha256; cv=none; b=WXVjzLkt4Aqa9y9GUj2YaKhksRz/8nrGZLykIwI2iI6XJL5UMlk7w45lBwtdVUfLnD3QD5 vOzj3jW08LeTMXBKQYRw16hrEZYUaxX7/Jb3POeV51Pjhl4UiF2Sjd/eC8DDHp6xIMWiV7 DgAUK+JImx9XH/w2+G1OCByqGsP533XJcOVsnYhDm4OOLVPG94niqpFfC3Dybq4qKbTngu JgKYHKxkGnxQjo8I1/05aa9WKb1VUccpVs09L32EGsRdHwCX6hgHxEiTJA9reTZd3pFTw+ sSnSx4l99TOyvS5o6Nx5gfdygc4onvpKRNdTkuFxAginropnmolIiwGtk7e3Zg== 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=1702600900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/1iekZ2xPcLBxm0wHgetgosNg4ch7U2Cz6V/zbQFC9k=; b=WxElMI8hE5bX2bdnPGeiyuAnb35jaRRxLmo15hR+BTDwZnYUDtZ4GkuYbinOvOWcSFx8Zw S98Q8NxVP5m4NHxPCxL8En9eReBxHuEPGXDYIcuY04YFQ3VOagab+JXhYcpi0ilw8SwSqt CjgJLtM7bu0x0CC0eXCrkQqWvK/Ry9mm4la8M+0jvAjZ+lCY4WzWjSwx8rCMRuUvDsHG1q 5h2wsV1JnPOTmdxnp4QuJCMsjXtehRZiU6+suyNd9HOflsxe738OQvxlF/DqNXenpCPG/c 091s68kuVXH93FEyPoLpj/XfQ/vlAgYxuaYq95MoS2pnhGrS+ruPr+rej2Y1GA== 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 4Srr502KLHzq6r; Fri, 15 Dec 2023 00:41: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 3BF0feNv089965; Fri, 15 Dec 2023 00:41:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BF0fekx089962; Fri, 15 Dec 2023 00:41:40 GMT (envelope-from git) Date: Fri, 15 Dec 2023 00:41:40 GMT Message-Id: <202312150041.3BF0fekx089962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e1028df36d14 - stable/13 - sort: test against all month formats in month-sort List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e1028df36d14920f18bbdd8e89f248bb08083ffe Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e1028df36d14920f18bbdd8e89f248bb08083ffe commit e1028df36d14920f18bbdd8e89f248bb08083ffe Author: Christos Margiolis AuthorDate: 2023-12-01 00:30:10 +0000 Commit: Christos Margiolis CommitDate: 2023-12-15 00:40:14 +0000 sort: test against all month formats in month-sort The CLDR specification [1] defines three possible month formats: - Abbreviation (e.g Jan, Ιαν) - Full (e.g January, Ιανουαρίου) - Standalone (e.g January, Ιανουάριος) Many languages use different case endings depending on whether the month is referenced as a standalone word (nominative case), or in date context (genitive, partitive, etc.). sort(1)'s -M option currently sorts months by testing input against only the abbrevation format, which is essentially a substring of the full format. While this works fine for languages like English, where there are no cases, for languages where there is a different case ending between the abbreviation/full and standalone formats, it is not sufficient. For example, in Greek, "May" can take the following forms: Abbreviation: Μαΐ (genitive case) Full: Μαΐου (genitive case) Standalone: Μάιος (nominative case) If we use the standalone format in Greek, sort(1) will not able to match "Μαΐ" to "Μάιος" and the sort will fail. This change makes sort(1) test against all three formats. It also works when the input contains mixed formats. [1] https://cldr.unicode.org/translation/date-time/date-time-patterns Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42847 (cherry picked from commit 3d44dce90a6946e2ef2ab30ffbf8e2930acf888b) --- usr.bin/sort/bwstring.c | 144 +++++++++++++++++++-------- usr.bin/sort/sort.1.in | 6 +- usr.bin/sort/tests/Makefile | 1 + usr.bin/sort/tests/sort_monthsort_test.sh | 159 ++++++++++++++++++++++++++++++ 4 files changed, 263 insertions(+), 47 deletions(-) diff --git a/usr.bin/sort/bwstring.c b/usr.bin/sort/bwstring.c index fc1b50cb78ac..b0c14e996b23 100644 --- a/usr.bin/sort/bwstring.c +++ b/usr.bin/sort/bwstring.c @@ -43,63 +43,114 @@ bool byte_sort; -static wchar_t **wmonths; -static char **cmonths; +struct wmonth { + wchar_t *mon; + wchar_t *ab; + wchar_t *alt; +}; -/* initialise months */ +struct cmonth { + char *mon; + char *ab; + char *alt; +}; + +static struct wmonth *wmonths; +static struct cmonth *cmonths; + +static int +populate_cmonth(char **field, const nl_item item, int idx) +{ + char *tmp, *m; + size_t i, len; + + tmp = nl_langinfo(item); + if (debug_sort) + printf("month[%d]=%s\n", idx, tmp); + if (*tmp == '\0') + return (0); + m = sort_strdup(tmp); + len = strlen(tmp); + for (i = 0; i < len; i++) + m[i] = toupper(m[i]); + *field = m; + + return (1); +} + +static int +populate_wmonth(wchar_t **field, const nl_item item, int idx) +{ + wchar_t *m; + char *tmp; + size_t i, len; + + tmp = nl_langinfo(item); + if (debug_sort) + printf("month[%d]=%s\n", idx, tmp); + if (*tmp == '\0') + return (0); + len = strlen(tmp); + m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1)); + if (mbstowcs(m, tmp, len) == ((size_t) - 1)) { + sort_free(m); + return (0); + } + m[len] = L'\0'; + for (i = 0; i < len; i++) + m[i] = towupper(m[i]); + *field = m; + + return (1); +} void initialise_months(void) { - const nl_item item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4, + const nl_item mon_item[12] = { MON_1, MON_2, MON_3, MON_4, + MON_5, MON_6, MON_7, MON_8, MON_9, MON_10, + MON_11, MON_12 }; + const nl_item ab_item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4, ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, ABMON_11, ABMON_12 }; - char *tmp; - size_t len; - + const nl_item alt_item[12] = { ALTMON_1, ALTMON_2, ALTMON_3, ALTMON_4, + ALTMON_5, ALTMON_6, ALTMON_7, ALTMON_8, ALTMON_9, ALTMON_10, + ALTMON_11, ALTMON_12 }; + int i; + + /* + * Handle all possible month formats: abbrevation, full name, + * standalone name (without case ending). + */ if (mb_cur_max == 1) { if (cmonths == NULL) { - char *m; - - cmonths = sort_malloc(sizeof(char*) * 12); - for (int i = 0; i < 12; i++) { - cmonths[i] = NULL; - tmp = nl_langinfo(item[i]); - if (debug_sort) - printf("month[%d]=%s\n", i, tmp); - if (*tmp == '\0') + cmonths = sort_malloc(sizeof(struct cmonth) * 12); + for (i = 0; i < 12; i++) { + if (!populate_cmonth(&cmonths[i].mon, + mon_item[i], i)) + continue; + if (!populate_cmonth(&cmonths[i].ab, + ab_item[i], i)) + continue; + if (!populate_cmonth(&cmonths[i].alt, + alt_item[i], i)) continue; - m = sort_strdup(tmp); - len = strlen(tmp); - for (unsigned int j = 0; j < len; j++) - m[j] = toupper(m[j]); - cmonths[i] = m; } } } else { if (wmonths == NULL) { - wchar_t *m; - - wmonths = sort_malloc(sizeof(wchar_t *) * 12); - for (int i = 0; i < 12; i++) { - wmonths[i] = NULL; - tmp = nl_langinfo(item[i]); - if (debug_sort) - printf("month[%d]=%s\n", i, tmp); - if (*tmp == '\0') + wmonths = sort_malloc(sizeof(struct wmonth) * 12); + for (i = 0; i < 12; i++) { + if (!populate_wmonth(&wmonths[i].mon, + mon_item[i], i)) continue; - len = strlen(tmp); - m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1)); - if (mbstowcs(m, tmp, len) == - ((size_t) - 1)) { - sort_free(m); + if (!populate_wmonth(&wmonths[i].ab, + ab_item[i], i)) + continue; + if (!populate_wmonth(&wmonths[i].alt, + alt_item[i], i)) continue; - } - m[len] = L'\0'; - for (unsigned int j = 0; j < len; j++) - m[j] = towupper(m[j]); - wmonths[i] = m; } } } @@ -754,8 +805,11 @@ bws_month_score(const struct bwstring *s0) ++s; for (int i = 11; i >= 0; --i) { - if (cmonths[i] && - (s == strstr(s, cmonths[i]))) + if (cmonths[i].mon && (s == strstr(s, cmonths[i].mon))) + return (i); + if (cmonths[i].ab && (s == strstr(s, cmonths[i].ab))) + return (i); + if (cmonths[i].alt && (s == strstr(s, cmonths[i].alt))) return (i); } @@ -769,7 +823,11 @@ bws_month_score(const struct bwstring *s0) ++s; for (int i = 11; i >= 0; --i) { - if (wmonths[i] && (s == wcsstr(s, wmonths[i]))) + if (wmonths[i].ab && (s == wcsstr(s, wmonths[i].ab))) + return (i); + if (wmonths[i].mon && (s == wcsstr(s, wmonths[i].mon))) + return (i); + if (wmonths[i].alt && (s == wcsstr(s, wmonths[i].alt))) return (i); } } diff --git a/usr.bin/sort/sort.1.in b/usr.bin/sort/sort.1.in index d509c7780f81..ec23ae2d8b70 100644 --- a/usr.bin/sort/sort.1.in +++ b/usr.bin/sort/sort.1.in @@ -30,9 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)sort.1 8.1 (Berkeley) 6/6/93 -.\" -.Dd September 4, 2019 +.Dd November 30, 2023 .Dt SORT 1 .Os .Sh NAME @@ -181,7 +179,7 @@ options (human-readable). .It Fl i , Fl Fl ignore-nonprinting Ignore all non-printable characters. .It Fl M , Fl Fl month-sort , Fl Fl sort=month -Sort by month abbreviations. +Sort by month. Unknown strings are considered smaller than the month names. .It Fl n , Fl Fl numeric-sort , Fl Fl sort=numeric Sort fields numerically by arithmetic value. diff --git a/usr.bin/sort/tests/Makefile b/usr.bin/sort/tests/Makefile index 1982fd1cee0a..752dec06bbff 100644 --- a/usr.bin/sort/tests/Makefile +++ b/usr.bin/sort/tests/Makefile @@ -2,6 +2,7 @@ PACKAGE= tests NETBSD_ATF_TESTS_SH= sort_test +ATF_TESTS_SH= sort_monthsort_test ${PACKAGE}FILES+= d_any_char_dflag_out.txt ${PACKAGE}FILES+= d_any_char_fflag_out.txt diff --git a/usr.bin/sort/tests/sort_monthsort_test.sh b/usr.bin/sort/tests/sort_monthsort_test.sh new file mode 100755 index 000000000000..db42981fb107 --- /dev/null +++ b/usr.bin/sort/tests/sort_monthsort_test.sh @@ -0,0 +1,159 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Christos Margiolis +# + +get_months_fmt() +{ + rm -f in + for i in $(seq 12 1); do + printf "2000-%02d-01\n" ${i} | xargs -I{} \ + date -jf "%Y-%m-%d" {} "${1}" >>in + done +} + +atf_test_case monthsort_english +monthsort_english_head() +{ + atf_set "descr" "Test the -M flag with English months" +} +monthsort_english_body() +{ + export LC_TIME="en_US.UTF-8" + + cat >expout <expout <expout <expout <in <expout < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 4c45ab6ac8c8 - stable/13 - sort: Only build FreeBSD-specific ALTMON_x stuff when ATLMON_1 is defined List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4c45ab6ac8c875fc227a40e4c5304d604b6c2a96 Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4c45ab6ac8c875fc227a40e4c5304d604b6c2a96 commit 4c45ab6ac8c875fc227a40e4c5304d604b6c2a96 Author: Warner Losh AuthorDate: 2023-12-07 20:27:07 +0000 Commit: Christos Margiolis CommitDate: 2023-12-15 00:41:05 +0000 sort: Only build FreeBSD-specific ALTMON_x stuff when ATLMON_1 is defined On MacOS, we bootstrap sort. Since ALTMON_* are not defined there, the build blows up. Since we don't need this feature for the FreeBSD build process, and since we won't use it unless we actually install the NL files that have this data in it, just #ifdef it out for now. In the extremely unlikely event that the FreeBSD bootstrap/build process grows this dependency, we can evaluate the best solution then (which most likely is going to be not depend on the local's month names). Fixes: 3d44dce90a69 (MacOS builds and github CI) Sponsored by: Netflix Reviewed by: jrtc27, jlduran@gmail.com, markj Differential Revision: https://reviews.freebsd.org/D42868 (cherry picked from commit bd234c0d4c8256db7e5a1fdda9ef311c9e0080e4) --- usr.bin/sort/bwstring.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/usr.bin/sort/bwstring.c b/usr.bin/sort/bwstring.c index b0c14e996b23..10679fe631ba 100644 --- a/usr.bin/sort/bwstring.c +++ b/usr.bin/sort/bwstring.c @@ -113,9 +113,11 @@ initialise_months(void) const nl_item ab_item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4, ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, ABMON_11, ABMON_12 }; +#ifdef ALTMON_1 const nl_item alt_item[12] = { ALTMON_1, ALTMON_2, ALTMON_3, ALTMON_4, ALTMON_5, ALTMON_6, ALTMON_7, ALTMON_8, ALTMON_9, ALTMON_10, ALTMON_11, ALTMON_12 }; +#endif int i; /* @@ -132,9 +134,13 @@ initialise_months(void) if (!populate_cmonth(&cmonths[i].ab, ab_item[i], i)) continue; +#ifdef ALTMON_1 if (!populate_cmonth(&cmonths[i].alt, alt_item[i], i)) continue; +#else + cmonths[i].alt = NULL; +#endif } } @@ -148,9 +154,13 @@ initialise_months(void) if (!populate_wmonth(&wmonths[i].ab, ab_item[i], i)) continue; +#ifdef ALTMON_1 if (!populate_wmonth(&wmonths[i].alt, alt_item[i], i)) continue; +#else + wmonths[i].alt = NULL; +#endif } } } From nobody Fri Dec 15 00:42:46 2023 X-Original-To: dev-commits-src-all@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 4Srr6G3gM0z541Z7; Fri, 15 Dec 2023 00:42: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 4Srr6G36s1z3XtP; Fri, 15 Dec 2023 00:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702600966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRl4l9E9WAC4WQOQQ1ZRA3UwdfYJ18sjO1+KPdEK9HU=; b=iC2wgjA4G7u+QR05HkWQG5QrIHc+r/WVfWQtUKLuTISBqeP4xxd4FQ1QAelAzGCLU3HquN Gwqh58M3XPg09MdMC92+rfN0FXrCqipu22Dtdi6j5pO5r1PTGrlWziOMR3u/ytrHgm6RsS hDjDlLbWAXIyPPfiYVpOP8+9E/FaKF7cLSHg8s3GRdqJJUuUJGwf0BgeJyoiwPMbESDMs5 41qyFA+d5OGnNevv1KQgjgqu/a+34dRX4zFnKHtN58QtzznCp2zDm16J0m0HFvvlfKjIBO v2UkV1no9eDtWbqbYuKH/lLG53nUZ4pjtKkkM6wkqUR9uiRIxhRp74MU3MRi1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702600966; a=rsa-sha256; cv=none; b=CPB5OWzOLfKOQb50YYMlAJtXWsqzcPQol9sDuX2m4c7uEucnn0PoOziG5zGIEdtXYe0VLo yWmGz/M0mkKOzk+aKLRE/GYYlInzN2mJ8Bdt0aaVl4AL5htQ3NN7y8pGhNxxZ4cVb2ranq S1K3aVF2VI8EVmNJS8kaqedwKNfS8YJglF6sNQ8DSdHO4brOR+/AMSpUd6eB1qAJaz/YHz HHV0zsK/qR0zxKyrg8TPXXbjqipjuAUxQ1DOdv4UPf/tbaau3wIf+taqBMAGFog675EfVb FYyKpyN1TGtipnOggEeM6tqaHAsdYtQdhBu3SMiaBknzeIoRE18EJrsSFvBlyw== 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=1702600966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRl4l9E9WAC4WQOQQ1ZRA3UwdfYJ18sjO1+KPdEK9HU=; b=xNrEY6+Y5eyQKlVANDm71s5qgU7w/jNmHevftSOAAb5iAh4CgMYEAytMxDH0oNXg8QRfiU loX5kvEVOR9TrWS9OrR/j39uFx4kyoiwFaWvRPJrIWz2hVErhV1vnvQu20yDLGobvRJ5yH P4TPTSH8/vuPocaUUVVWTcE2WdNOlcMo8FdC+k4aYLnwcxBGWZlwyrXbbyyBpg5AaLSsLp Yvs3ig0H1yeEP6cK6u8x0P1brzqg7neQQ44pEeq8/VSgYmZcPkJ0MPQ5QTh4GXnqeix/Ss oWYcv9PoxXNpwVfp9+OnO5Goby+FkiQJewhXYfXNwgtuieRfhQ3dQOdIVwwRBQ== 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 4Srr6G2BRgzq2K; Fri, 15 Dec 2023 00:42: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 3BF0gk4g093445; Fri, 15 Dec 2023 00:42:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BF0gk3Z093442; Fri, 15 Dec 2023 00:42:46 GMT (envelope-from git) Date: Fri, 15 Dec 2023 00:42:46 GMT Message-Id: <202312150042.3BF0gk3Z093442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: bd1739a707ff - stable/14 - sort: test against all month formats in month-sort List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bd1739a707ff0bda50dedb8aa58b2b26254bdda3 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=bd1739a707ff0bda50dedb8aa58b2b26254bdda3 commit bd1739a707ff0bda50dedb8aa58b2b26254bdda3 Author: Christos Margiolis AuthorDate: 2023-12-01 00:30:10 +0000 Commit: Christos Margiolis CommitDate: 2023-12-15 00:42:26 +0000 sort: test against all month formats in month-sort The CLDR specification [1] defines three possible month formats: - Abbreviation (e.g Jan, Ιαν) - Full (e.g January, Ιανουαρίου) - Standalone (e.g January, Ιανουάριος) Many languages use different case endings depending on whether the month is referenced as a standalone word (nominative case), or in date context (genitive, partitive, etc.). sort(1)'s -M option currently sorts months by testing input against only the abbrevation format, which is essentially a substring of the full format. While this works fine for languages like English, where there are no cases, for languages where there is a different case ending between the abbreviation/full and standalone formats, it is not sufficient. For example, in Greek, "May" can take the following forms: Abbreviation: Μαΐ (genitive case) Full: Μαΐου (genitive case) Standalone: Μάιος (nominative case) If we use the standalone format in Greek, sort(1) will not able to match "Μαΐ" to "Μάιος" and the sort will fail. This change makes sort(1) test against all three formats. It also works when the input contains mixed formats. [1] https://cldr.unicode.org/translation/date-time/date-time-patterns Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42847 (cherry picked from commit 3d44dce90a6946e2ef2ab30ffbf8e2930acf888b) --- usr.bin/sort/bwstring.c | 144 +++++++++++++++++++-------- usr.bin/sort/sort.1.in | 6 +- usr.bin/sort/tests/Makefile | 1 + usr.bin/sort/tests/sort_monthsort_test.sh | 159 ++++++++++++++++++++++++++++++ 4 files changed, 263 insertions(+), 47 deletions(-) diff --git a/usr.bin/sort/bwstring.c b/usr.bin/sort/bwstring.c index fc1b50cb78ac..b0c14e996b23 100644 --- a/usr.bin/sort/bwstring.c +++ b/usr.bin/sort/bwstring.c @@ -43,63 +43,114 @@ bool byte_sort; -static wchar_t **wmonths; -static char **cmonths; +struct wmonth { + wchar_t *mon; + wchar_t *ab; + wchar_t *alt; +}; -/* initialise months */ +struct cmonth { + char *mon; + char *ab; + char *alt; +}; + +static struct wmonth *wmonths; +static struct cmonth *cmonths; + +static int +populate_cmonth(char **field, const nl_item item, int idx) +{ + char *tmp, *m; + size_t i, len; + + tmp = nl_langinfo(item); + if (debug_sort) + printf("month[%d]=%s\n", idx, tmp); + if (*tmp == '\0') + return (0); + m = sort_strdup(tmp); + len = strlen(tmp); + for (i = 0; i < len; i++) + m[i] = toupper(m[i]); + *field = m; + + return (1); +} + +static int +populate_wmonth(wchar_t **field, const nl_item item, int idx) +{ + wchar_t *m; + char *tmp; + size_t i, len; + + tmp = nl_langinfo(item); + if (debug_sort) + printf("month[%d]=%s\n", idx, tmp); + if (*tmp == '\0') + return (0); + len = strlen(tmp); + m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1)); + if (mbstowcs(m, tmp, len) == ((size_t) - 1)) { + sort_free(m); + return (0); + } + m[len] = L'\0'; + for (i = 0; i < len; i++) + m[i] = towupper(m[i]); + *field = m; + + return (1); +} void initialise_months(void) { - const nl_item item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4, + const nl_item mon_item[12] = { MON_1, MON_2, MON_3, MON_4, + MON_5, MON_6, MON_7, MON_8, MON_9, MON_10, + MON_11, MON_12 }; + const nl_item ab_item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4, ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, ABMON_11, ABMON_12 }; - char *tmp; - size_t len; - + const nl_item alt_item[12] = { ALTMON_1, ALTMON_2, ALTMON_3, ALTMON_4, + ALTMON_5, ALTMON_6, ALTMON_7, ALTMON_8, ALTMON_9, ALTMON_10, + ALTMON_11, ALTMON_12 }; + int i; + + /* + * Handle all possible month formats: abbrevation, full name, + * standalone name (without case ending). + */ if (mb_cur_max == 1) { if (cmonths == NULL) { - char *m; - - cmonths = sort_malloc(sizeof(char*) * 12); - for (int i = 0; i < 12; i++) { - cmonths[i] = NULL; - tmp = nl_langinfo(item[i]); - if (debug_sort) - printf("month[%d]=%s\n", i, tmp); - if (*tmp == '\0') + cmonths = sort_malloc(sizeof(struct cmonth) * 12); + for (i = 0; i < 12; i++) { + if (!populate_cmonth(&cmonths[i].mon, + mon_item[i], i)) + continue; + if (!populate_cmonth(&cmonths[i].ab, + ab_item[i], i)) + continue; + if (!populate_cmonth(&cmonths[i].alt, + alt_item[i], i)) continue; - m = sort_strdup(tmp); - len = strlen(tmp); - for (unsigned int j = 0; j < len; j++) - m[j] = toupper(m[j]); - cmonths[i] = m; } } } else { if (wmonths == NULL) { - wchar_t *m; - - wmonths = sort_malloc(sizeof(wchar_t *) * 12); - for (int i = 0; i < 12; i++) { - wmonths[i] = NULL; - tmp = nl_langinfo(item[i]); - if (debug_sort) - printf("month[%d]=%s\n", i, tmp); - if (*tmp == '\0') + wmonths = sort_malloc(sizeof(struct wmonth) * 12); + for (i = 0; i < 12; i++) { + if (!populate_wmonth(&wmonths[i].mon, + mon_item[i], i)) continue; - len = strlen(tmp); - m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1)); - if (mbstowcs(m, tmp, len) == - ((size_t) - 1)) { - sort_free(m); + if (!populate_wmonth(&wmonths[i].ab, + ab_item[i], i)) + continue; + if (!populate_wmonth(&wmonths[i].alt, + alt_item[i], i)) continue; - } - m[len] = L'\0'; - for (unsigned int j = 0; j < len; j++) - m[j] = towupper(m[j]); - wmonths[i] = m; } } } @@ -754,8 +805,11 @@ bws_month_score(const struct bwstring *s0) ++s; for (int i = 11; i >= 0; --i) { - if (cmonths[i] && - (s == strstr(s, cmonths[i]))) + if (cmonths[i].mon && (s == strstr(s, cmonths[i].mon))) + return (i); + if (cmonths[i].ab && (s == strstr(s, cmonths[i].ab))) + return (i); + if (cmonths[i].alt && (s == strstr(s, cmonths[i].alt))) return (i); } @@ -769,7 +823,11 @@ bws_month_score(const struct bwstring *s0) ++s; for (int i = 11; i >= 0; --i) { - if (wmonths[i] && (s == wcsstr(s, wmonths[i]))) + if (wmonths[i].ab && (s == wcsstr(s, wmonths[i].ab))) + return (i); + if (wmonths[i].mon && (s == wcsstr(s, wmonths[i].mon))) + return (i); + if (wmonths[i].alt && (s == wcsstr(s, wmonths[i].alt))) return (i); } } diff --git a/usr.bin/sort/sort.1.in b/usr.bin/sort/sort.1.in index 4e27838a9250..80cc1dcb0282 100644 --- a/usr.bin/sort/sort.1.in +++ b/usr.bin/sort/sort.1.in @@ -30,9 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)sort.1 8.1 (Berkeley) 6/6/93 -.\" -.Dd September 4, 2019 +.Dd November 30, 2023 .Dt SORT 1 .Os .Sh NAME @@ -181,7 +179,7 @@ options (human-readable). .It Fl i , Fl Fl ignore-nonprinting Ignore all non-printable characters. .It Fl M , Fl Fl month-sort , Fl Fl sort=month -Sort by month abbreviations. +Sort by month. Unknown strings are considered smaller than the month names. .It Fl n , Fl Fl numeric-sort , Fl Fl sort=numeric Sort fields numerically by arithmetic value. diff --git a/usr.bin/sort/tests/Makefile b/usr.bin/sort/tests/Makefile index 1982fd1cee0a..752dec06bbff 100644 --- a/usr.bin/sort/tests/Makefile +++ b/usr.bin/sort/tests/Makefile @@ -2,6 +2,7 @@ PACKAGE= tests NETBSD_ATF_TESTS_SH= sort_test +ATF_TESTS_SH= sort_monthsort_test ${PACKAGE}FILES+= d_any_char_dflag_out.txt ${PACKAGE}FILES+= d_any_char_fflag_out.txt diff --git a/usr.bin/sort/tests/sort_monthsort_test.sh b/usr.bin/sort/tests/sort_monthsort_test.sh new file mode 100755 index 000000000000..db42981fb107 --- /dev/null +++ b/usr.bin/sort/tests/sort_monthsort_test.sh @@ -0,0 +1,159 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Christos Margiolis +# + +get_months_fmt() +{ + rm -f in + for i in $(seq 12 1); do + printf "2000-%02d-01\n" ${i} | xargs -I{} \ + date -jf "%Y-%m-%d" {} "${1}" >>in + done +} + +atf_test_case monthsort_english +monthsort_english_head() +{ + atf_set "descr" "Test the -M flag with English months" +} +monthsort_english_body() +{ + export LC_TIME="en_US.UTF-8" + + cat >expout <expout <expout <expout <in <expout < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 431d8b78ed26 - stable/14 - sort: Only build FreeBSD-specific ALTMON_x stuff when ATLMON_1 is defined List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 431d8b78ed262af910656930d96088f5a1d90485 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=431d8b78ed262af910656930d96088f5a1d90485 commit 431d8b78ed262af910656930d96088f5a1d90485 Author: Warner Losh AuthorDate: 2023-12-07 20:27:07 +0000 Commit: Christos Margiolis CommitDate: 2023-12-15 00:42:35 +0000 sort: Only build FreeBSD-specific ALTMON_x stuff when ATLMON_1 is defined On MacOS, we bootstrap sort. Since ALTMON_* are not defined there, the build blows up. Since we don't need this feature for the FreeBSD build process, and since we won't use it unless we actually install the NL files that have this data in it, just #ifdef it out for now. In the extremely unlikely event that the FreeBSD bootstrap/build process grows this dependency, we can evaluate the best solution then (which most likely is going to be not depend on the local's month names). Fixes: 3d44dce90a69 (MacOS builds and github CI) Sponsored by: Netflix Reviewed by: jrtc27, jlduran@gmail.com, markj Differential Revision: https://reviews.freebsd.org/D42868 (cherry picked from commit bd234c0d4c8256db7e5a1fdda9ef311c9e0080e4) --- usr.bin/sort/bwstring.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/usr.bin/sort/bwstring.c b/usr.bin/sort/bwstring.c index b0c14e996b23..10679fe631ba 100644 --- a/usr.bin/sort/bwstring.c +++ b/usr.bin/sort/bwstring.c @@ -113,9 +113,11 @@ initialise_months(void) const nl_item ab_item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4, ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, ABMON_11, ABMON_12 }; +#ifdef ALTMON_1 const nl_item alt_item[12] = { ALTMON_1, ALTMON_2, ALTMON_3, ALTMON_4, ALTMON_5, ALTMON_6, ALTMON_7, ALTMON_8, ALTMON_9, ALTMON_10, ALTMON_11, ALTMON_12 }; +#endif int i; /* @@ -132,9 +134,13 @@ initialise_months(void) if (!populate_cmonth(&cmonths[i].ab, ab_item[i], i)) continue; +#ifdef ALTMON_1 if (!populate_cmonth(&cmonths[i].alt, alt_item[i], i)) continue; +#else + cmonths[i].alt = NULL; +#endif } } @@ -148,9 +154,13 @@ initialise_months(void) if (!populate_wmonth(&wmonths[i].ab, ab_item[i], i)) continue; +#ifdef ALTMON_1 if (!populate_wmonth(&wmonths[i].alt, alt_item[i], i)) continue; +#else + wmonths[i].alt = NULL; +#endif } } } From nobody Fri Dec 15 13:18:33 2023 X-Original-To: dev-commits-src-all@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 4Ss8tK4yYSz52nPD; Fri, 15 Dec 2023 13:18: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 4Ss8tK4kZ8z4DVJ; Fri, 15 Dec 2023 13:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702646313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s24+S5zvLRqCIZg7baS9ZY0xrQBaNWdVefjwdvh6Vww=; b=kZNchI4XNrtLa7O0FjiQHg+hHLFZs7SpIQkduQ0ifft+wal3WmUac2EHTpnkqBLqTPlDNy 0vUA9cNx5OjXzPftmK6Z+6icNzGc4N6Nq/G9IUgsZuDLUawJCRrkr/Nnz4M8faMdpyibfi eCKDuyIzVR2tmIJeDKtD1uOwtTvPpOckE+OeYaORlrG2YEvONs2JbATNx62fZjmhOHFimd 2ef8VYEkAwnHcprwJeLwapv39KAhk4Gyw+7/tu45LYPtMb5LWltHm+0kO1o2sdI7WPGF0B R2AQvfUMrBc0oLCixxRlweI2u7wVDQyVEPv8ogMK9/T6SY1Ge9X11TbtcvRdsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702646313; a=rsa-sha256; cv=none; b=VbQeGXDGp9fg7qHa2m+WwuGDLmS0BbIIL2YkF0/1+yQCYUfcNq8+zJDXP/tLmLHHWorGXk hnqzm/J7AP4d1g8umjkHJ/yUEW4MY8uRdYgUPtPrTIlVhCYZYXy6fQiG+RdiUBET8c6Dfq DSZcYkqy/ArSf0h/IglR4SjHkkeDqY5RBtiCLoXyBO9u8Y7r0JWM/NGuefCOU6OJdAjebT Z+SK3/dzel329zenos7LQtCMHyEnDWnEc91IAqG/RjCrRanTmYzaoT9VtGSa0m9t30SorO YqiiiiJCwoWk5Cq+njDtuzy1I38JBqGnq24ZRl9Z5+4UCEmupbGtGehDqc31/g== 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=1702646313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s24+S5zvLRqCIZg7baS9ZY0xrQBaNWdVefjwdvh6Vww=; b=LMBZu99UUliPGfLFn33jxdwrbLOZUKuPHHFfhDocJtGi1pOZqM1jPn/hGEA/jMuyndKUDT ZG7sJ4lACU4OLVr9BR/IBMpcS2ImBQLz6nE3Y5Wk+ZHO7FRBdDvzLvgCWquN7EoG0GwByK CoU+O4j8SstSImYRrCnkNmh3rUlqMJgM6aEaQtPdTDuHPG+p0h050+ZVLRUgmf3qL0xtS5 iG1dPdbZ2MzOuzlEtvsiwdqTEu6waZAN6SU8asgl66Xd1UEe/L+cMSCkBieRn+O7MbkNaO p/4acT2kfzAcJqgJgJ7J+ePgJ4tFKzXRpfvjDao8tL6ij6netQ/8UukkplCPCw== 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 4Ss8tK3qQ3z1BfP; Fri, 15 Dec 2023 13:18: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 3BFDIXHR048790; Fri, 15 Dec 2023 13:18:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDIXK6048787; Fri, 15 Dec 2023 13:18:33 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:18:33 GMT Message-Id: <202312151318.3BFDIXK6048787@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: 5fb307d29b36 - main - zfs: merge openzfs/zfs@86e115e21 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5fb307d29b364982acbde82cbf77db3cae486f8c Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=5fb307d29b364982acbde82cbf77db3cae486f8c commit 5fb307d29b364982acbde82cbf77db3cae486f8c Merge: c2e340452c14 86e115e21e5b Author: Martin Matuska AuthorDate: 2023-12-15 13:17:23 +0000 Commit: Martin Matuska CommitDate: 2023-12-15 13:18:07 +0000 zfs: merge openzfs/zfs@86e115e21 Notable upstream pull request merges: #15643 a9b937e06 For db_marker inherit the db pointer for AVL comparision #15644 e53e60c0b DMU: Fix lock leak on dbuf_hold() error #15653 86063d903 dbuf: Handle arcbuf assignment after block cloning #15656 86e115e21 dbuf: Set dr_data when unoverriding after clone Obtained from: OpenZFS OpenZFS commit: 86e115e21e5bdeee73c88c5a1a73a29d9637380a .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh | 6 +- sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 2 +- sys/contrib/openzfs/include/sys/dbuf.h | 1 + sys/contrib/openzfs/module/zfs/dbuf.c | 20 ++- sys/contrib/openzfs/module/zfs/dmu.c | 2 +- sys/contrib/openzfs/module/zfs/dnode.c | 8 + sys/contrib/openzfs/module/zfs/dnode_sync.c | 9 +- sys/contrib/openzfs/tests/runfiles/common.run | 2 +- sys/contrib/openzfs/tests/runfiles/linux.run | 3 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 5 +- sys/contrib/openzfs/tests/zfs-tests/Makefile.am | 3 + .../openzfs/tests/zfs-tests/tests/Makefile.am | 4 + .../functional/block_cloning/block_cloning.kshlib | 2 +- .../block_cloning/block_cloning_replay.ksh | 131 +++++++++++++++ .../block_cloning_replay_encrypted.ksh | 133 +++++++++++++++ .../zfs-tests/tests/functional/cp_files/.gitignore | 1 + .../tests/functional/cp_files/cp_stress.ksh | 73 +++++++++ .../tests/functional/cp_files/seekflood.c | 180 +++++++++++++++++++++ .../zfs-tests/tests/functional/io/io_uring.ksh | 7 + .../functional/raidz/raidz_expand_005_pos.ksh | 2 +- sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 22 files changed, 582 insertions(+), 18 deletions(-) diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh index 000000000000,1fdf379ed2d2..1fdf379ed2d2 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh index 000000000000,f9f687c83e5b..f9f687c83e5b mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/.gitignore index 000000000000,d15225ac8429..d15225ac8429 mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/.gitignore +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/.gitignore diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_stress.ksh index 000000000000,43bb8ab572d2..43bb8ab572d2 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_stress.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_stress.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/seekflood.c index 000000000000,02c2c8e6eca5..02c2c8e6eca5 mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/seekflood.c +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/seekflood.c diff --cc sys/modules/zfs/zfs_config.h index 03314cf89e35,000000000000..b6e93c8eadf7 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1152 -1,0 +1,1152 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* 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 */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* Define to 1 if you have the `execvpe' function. */ +/* #undef HAVE_EXECVPE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* 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 you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* 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_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ *** 252 LINES SKIPPED *** From nobody Fri Dec 15 13:47:34 2023 X-Original-To: dev-commits-src-all@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 4Ss9Wq2BqLz52qbS; Fri, 15 Dec 2023 13:47: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 4Ss9Wq1kpnz4Gcb; Fri, 15 Dec 2023 13:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eee+FfYkM0DXvcUirBSVSlmz0kw5YcbKQfcTiPGTiWo=; b=XPForr/2doRtVxMQBoC3yOUeJwKwGYLqljNX7TM4a5Q7lWiqnyLxLbKQ4hBJlFwPTHpZMt /IdN7MMCBcqEx8wcGMCP/2mY9GD+Dqj8X+pNC0mpyek+1U0DEVD8PdYx+ubFFzbWqZ0vRD HM4lxaLxQH7LlS9cpV6e9izCRxr/JXZTg/UJxeYw3EJvN6skxkh56jJA7UPElKVthYCABC xJRUT1jeiJ+KA37AxFN0SKXRycqPdMkSh9TaQz5TedF69aeMu4unU32OFEM/qAqxqJ6xF6 R/WLOKptRbtMy+1jHBVBvwTNGaZCHMRi8SrDbOK/l13l9YZCUrJc+ccVQfCpQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702648055; a=rsa-sha256; cv=none; b=vEUabM/hS5nXiLc9w5IT3tUy0KNFcW/4UlyOUtpmBEMvSvgWH4G4bhvfPMQ3CkbudnLBjK UvIQ9yIapCn090NkALAZHHGOFj7Cm21GRsikG5YGIiOnTPF4zquczd1ddc5/KZfspg7Wmb X+Z1Q+CK/2LK6WJEyiwiMW/wOZ7VbhXwHbevIi0ygesnZ/eSDILw4Z8V+iLP7vHfQS/IXA MUWPDI7rdsQleZkfIO7qyNVy34yUNBSGSSkOPHRg/SM61Yi13X8iPvvfFsGC1ViY1uc0t3 QaVqkeD43G44btOx67g50lCRIYlhjyXa8fSr5LE4Ly19N3H5Uy3rvAhDfpDhVQ== 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=1702648055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eee+FfYkM0DXvcUirBSVSlmz0kw5YcbKQfcTiPGTiWo=; b=n7Chderb/U4BxcYhV6oEuKUHEsyi5+8cJdwPWkcseC1vpwXG2J8UAecJwWdY6KS4ZVd9pf PC39SVaQOr1ZMgg2XrKZwIryCaGniTVp7KXkSlnRSLuAnk1qeN703/k5OmvrE38ty0sgjX wh4FxYOmOpcuKKZGjS+Rm8IOD81STdkH53U6fId/hYULASpUA2HK6GagjFye6fwHM/qJ2w s1OeCf0fDVH0JX1AkGgyugnzrCUQ50MFyckyDWuDd3pAkhULW8jrMU7Tt1HbvDSWMf5lDQ rUxH4HD22Q2f6UtuKkHekD0f/2MHg9cQVyWfLuvdV6E9p6upesxy0Ufu4Fjr7w== 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 4Ss9Wq0hcjz1BZv; Fri, 15 Dec 2023 13:47: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 3BFDlYEC098037; Fri, 15 Dec 2023 13:47:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDlY5Z098034; Fri, 15 Dec 2023 13:47:34 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:47:34 GMT Message-Id: <202312151347.3BFDlY5Z098034@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cheng Cui Subject: git: 93b7818226cf - main - libexec/rc/rc.initdiskless: make tar's path flexible List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93b7818226cf5270646725805b4a8c17a1ad3761 Auto-Submitted: auto-generated The branch main has been updated by cc: URL: https://cgit.FreeBSD.org/src/commit/?id=93b7818226cf5270646725805b4a8c17a1ad3761 commit 93b7818226cf5270646725805b4a8c17a1ad3761 Author: Cheng Cui AuthorDate: 2023-11-24 15:47:18 +0000 Commit: Cheng Cui CommitDate: 2023-12-15 08:46:44 +0000 libexec/rc/rc.initdiskless: make tar's path flexible Summary: PR: 274977 Reviewed by: rgrimes,imp Approved by: rgrimes MFC after: 1 month --- libexec/rc/rc.initdiskless | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.initdiskless b/libexec/rc/rc.initdiskless index 9b37497c1e7e..ee891c3f782e 100644 --- a/libexec/rc/rc.initdiskless +++ b/libexec/rc/rc.initdiskless @@ -362,6 +362,8 @@ done # so if the cpio archive is present, it prevents the files from dir/ # from being copied. ++PATH=${PATH}:/rescue + for i in ${templates} ; do for j in /conf/$i/* ; do subdir=${j##*/} @@ -376,7 +378,7 @@ for i in ${templates} ; do if [ -f $j ]; then create_md $subdir echo "Loading /$subdir from cpio archive $j" - (cd / ; /rescue/tar -xpf $j) + (cd / ; tar -xpf $j) fi done for j in /conf/$i/*/extract ; do From nobody Fri Dec 15 13:59:43 2023 X-Original-To: dev-commits-src-all@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 4Ss9nr2HWYz52rW9; Fri, 15 Dec 2023 13:59: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 4Ss9nr1mrlz4Hvj; Fri, 15 Dec 2023 13:59:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/lFmEA5aYcIP4yg0k38FlmrKjbFpPvkT604CZkh0+7o=; b=e0+tS9XdM3j5eOBGzI/hZJg9AjrYrWyPyZQX3OuEvTUu/DSOQWPW2Ysx9fcA7r0eAUc946 ee4Um5cwLdsJoSvj+PKOA1PSKX7uCqYtkbtPAdqq/TE4Fb1KzifsZJ3Z4ZuoWMYQcmfJks whV/OvbVRfr75VWAZHmNEYb2Z9k7TyUQnq5Ajwdqz/y/I8PYX3tOOUcL83+qH56DsDXZ/c unUWlU0deQi0J8lF5uC7Fa/przHT9W67vdCtG14x/iT0URH9OICKQgBtm040MvNzfz1i8c ZjFwl2/qtgBhfCCJGy0QdJpcQJkM4ARSDkTRGRfKu/hk9z7iO+KQK3RRhcbIKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702648784; a=rsa-sha256; cv=none; b=tMGsdvafwzLcqav7fFE/blMfBqRwQ+m6jtgzPkL6tw6W0fGo0ATLb6Qj1ReSOs1jzWIr/6 O+AsSZRlAprkDECPtVR3DQo/YevRKe7UV8+whnGsfcnyp6bvmauxdx2/zK88NE8U3E8YDW 6EeGon2WD9PvYbrx3jWdoTHL8MIhrUbZvKNZRZeIORWO43IK9pT6BWZACj1CdYdo+G9B9h p88R7776xQHwOiZkzMiF61fR1Zrj73aGC3QwnKWLzMQX8wBaOlP2+RIDpg/qajYZhHbqKg lQC0rG3WErHu9Ln6G0B+fXn4BOHzWXqO+KLGbT3SnFoeI7uoT0UtkcQkpa84VQ== 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=1702648784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/lFmEA5aYcIP4yg0k38FlmrKjbFpPvkT604CZkh0+7o=; b=AogErtVPiixfI8M+lVYn3av6tGd2I+qjRBs2g6P/KUiwwCSWqiqdY28OuRjrD4J5DuT0BY lloevYO4bIqKK/5F4o95GODaLwpFEbb1HZlYNvwtWKWBLJ9o31ihaMHaSmUr+U0v4i+AjV Z6t3P7yxTraSHygvYcEFR8G9AsfZcDgUtemWO2fNbMoB+XXbczbBOm4cMO4zz3eZvKHuNO XRR1EKZlZR8lfw97UnlsFi8atzEKxlQs4oO347gv4alpjLdyDOXe3rHHYeXVFiDtHdtN2p CE3pZeIc7EgC2IH5q+wto13Kg0EQzq6t4b0TJT4q72tV1XGFxZiJ8zU38SICwQ== 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 4Ss9nr0jpVz1CM6; Fri, 15 Dec 2023 13:59: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 3BFDxhN3015522; Fri, 15 Dec 2023 13:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDxh1f015519; Fri, 15 Dec 2023 13:59:43 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:59:43 GMT Message-Id: <202312151359.3BFDxh1f015519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 40e1d9d45f0f - main - xen: add SPDX license tags to Xen headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40e1d9d45f0f6798e404eb7d63afb3976e85cc02 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=40e1d9d45f0f6798e404eb7d63afb3976e85cc02 commit 40e1d9d45f0f6798e404eb7d63afb3976e85cc02 Author: Elliott Mitchell AuthorDate: 2021-11-02 05:53:44 +0000 Commit: Roger Pau Monné CommitDate: 2023-12-15 13:59:25 +0000 xen: add SPDX license tags to Xen headers These are in fact GPLv2 when distributed with the Linux kernel, but the license also allows MIT if distributed separately. Add the markers to avoid interference by automated tools. Differential Revision: https://reviews.freebsd.org/D32796 Reviewed by: royger --- sys/amd64/include/xen/hypercall.h | 2 ++ sys/i386/include/xen/hypercall.h | 2 ++ sys/xen/gnttab.h | 2 ++ sys/xen/privcmd.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/sys/amd64/include/xen/hypercall.h b/sys/amd64/include/xen/hypercall.h index f62250679f0f..48d60e345983 100644 --- a/sys/amd64/include/xen/hypercall.h +++ b/sys/amd64/include/xen/hypercall.h @@ -1,4 +1,6 @@ /****************************************************************************** + * SPDX-License-Identifier: MIT OR GPL-2.0-only + * * hypercall.h * * FreeBSD-specific hypervisor handling. diff --git a/sys/i386/include/xen/hypercall.h b/sys/i386/include/xen/hypercall.h index 94bb42e38a39..2a8b36f0f7cd 100644 --- a/sys/i386/include/xen/hypercall.h +++ b/sys/i386/include/xen/hypercall.h @@ -1,4 +1,6 @@ /****************************************************************************** + * SPDX-License-Identifier: MIT OR GPL-2.0-only + * * hypercall.h * * Linux-specific hypervisor handling. diff --git a/sys/xen/gnttab.h b/sys/xen/gnttab.h index d85f882c0c4b..583f19128377 100644 --- a/sys/xen/gnttab.h +++ b/sys/xen/gnttab.h @@ -1,4 +1,6 @@ /****************************************************************************** + * SPDX-License-Identifier: MIT OR GPL-2.0-only + * * gnttab.h * * Two sets of functionality: diff --git a/sys/xen/privcmd.h b/sys/xen/privcmd.h index 8ae1732ae75b..cf620af31f4f 100644 --- a/sys/xen/privcmd.h +++ b/sys/xen/privcmd.h @@ -1,4 +1,6 @@ /****************************************************************************** + * SPDX-License-Identifier: MIT OR GPL-2.0-only + * * privcmd.h * * Interface to /proc/xen/privcmd. From nobody Fri Dec 15 13:59:45 2023 X-Original-To: dev-commits-src-all@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 4Ss9ns389kz52rBN; Fri, 15 Dec 2023 13:59: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 4Ss9ns2ghhz4Hfd; Fri, 15 Dec 2023 13:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2CLlvsI01Fdtob54oQGMwaJ5P9LXnoHU+IBMuuKjHp8=; b=f6lJN7MXsajkTleV0LX72qPovm070CjB7CTleOuf0dZig1THgVns+l1wiFqwpeHbXX5omy fHsoM56j8szE8FstoDVy9kQ+tnyD58zz/Cw28w47eEpAkQ550oyVDdss8zwA5fP8klJE8Q wyCkEeOyjQzbpuZSWvYL+xQ4SOHeyldElFIIl74imNvMjtI3s/v3rBHO60KvKAQkSHnJF1 vmzODblg3gH1D4X7ttwD/tr8q5BxekUKUjwXIJp+7EuzlbLwUHV4y062qCiJoeItv4lYRf eHNuScX0N4juueMPdfJbCtwav11XKv6fVY4QEC1dZ0ilZ9eab6uFAXN0bM6Egg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702648785; a=rsa-sha256; cv=none; b=EeNZhmZ17NKzT5oV1WBNNn9AM1lfMIHW4YvNb/Gq/oYn0BDtNLV+yRQ3KQ2nmcvtoenZim O4R5IZ1imBvbm2qZes/rrX9s2ye312IYNIstLVhbnq0FMtGL/h21dEi87bh15Ra2IP56B6 zAbXuCoOvHGZsUpRBiYYckw1HfuRFw/8qKOB/uNKOpjTFxMvAaPwBC9ic2jWaZHhQT+UkY /VjNvKtGHR69JO/HPmP6kb1o8PgN7y2k0nSz9WXcn9R9Yss1c7TVqAS11DmzA/O/VlNPBl mhyBxARWH0dXa5mWwfgH5zcBfOysj5J/5kvjtsHLErKDchZj9BwKh7NE77zrrg== 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=1702648785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2CLlvsI01Fdtob54oQGMwaJ5P9LXnoHU+IBMuuKjHp8=; b=SZkymOH12ocg0OBTfZyxEsjzfC/jK+BRHU39fIUmZPHoT3ZKhG2kGAtjUjqqAdJWAATlln d82Ojh3lE+vk1O977NqA8StWr7ZWx2IIr0aDSGumABIQNkyvkobLKqTFIPq686wL6ckd9x 1NAiYxVT6VqdC4bg+d6tgmAGv+HK5U/pkEq+UlslhF3upM4zJ7m64l27qHnRPVMIVZbR7B NMTDEX0p/pL0HCAcP5FThIj/w2kjcTHXVDAoVFNRZ35E3nbN3uxqL7KveBJBJ5XWVzYJ5L 1mQVDxvgw0ObRK7dyaBVs3MTBhZg7+YjM7wvTcO4j2Ai4RxUDhTTVlCvV259qA== 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 4Ss9ns1T4Cz1CfF; Fri, 15 Dec 2023 13:59: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 3BFDxjvI015580; Fri, 15 Dec 2023 13:59:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDxjmp015577; Fri, 15 Dec 2023 13:59:45 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:59:45 GMT Message-Id: <202312151359.3BFDxjmp015577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: ea9a9b122d94 - main - sys/conf: make xen_acpi_cpu.c depend on acpi List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea9a9b122d949141fe9e5a49d2d01ca6b48fb1d0 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=ea9a9b122d949141fe9e5a49d2d01ca6b48fb1d0 commit ea9a9b122d949141fe9e5a49d2d01ca6b48fb1d0 Author: Elliott Mitchell AuthorDate: 2023-12-02 06:22:57 +0000 Commit: Roger Pau Monné CommitDate: 2023-12-15 13:59:25 +0000 sys/conf: make xen_acpi_cpu.c depend on acpi Since Xen can function on systems without ACPI, make sure this key dependency is handled. Reviewed by: royger --- sys/conf/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index bf951d789de3..16e3c1ddb6dd 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3480,7 +3480,7 @@ dev/xen/bus/xen_intr.c optional xenhvm dev/xen/bus/xenpv.c optional xenhvm dev/xen/console/xen_console.c optional xenhvm dev/xen/control/control.c optional xenhvm -dev/xen/cpu/xen_acpi_cpu.c optional xenhvm +dev/xen/cpu/xen_acpi_cpu.c optional xenhvm acpi dev/xen/efi/pvefi.c optional xenhvm xenefi efirt dev/xen/grant_table/grant_table.c optional xenhvm dev/xen/netback/netback.c optional xenhvm From nobody Fri Dec 15 13:59:46 2023 X-Original-To: dev-commits-src-all@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 4Ss9nt48YSz52rhb; Fri, 15 Dec 2023 13:59: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 4Ss9nt3TVqz4J73; Fri, 15 Dec 2023 13:59:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UwBtV6A9yc3ttqf0KrFV3k6dv6Eu2sGjTfUCppfLYq4=; b=rHih3BACSpqSLoPX+NFYztf9jGTsLB0r820yr7qsqjHV8oQuzv+jhSzLnZ4AOG4y+5qnMq hpklQoEkyPAWacGzpkzn/YlP4BE0LcDPciqj5TxScYU72Lldxezv0h1f8ud3iI8UZvQhwz aiVwkkGH04xMPihG/fa8hjitybDD70yGn03CXQgpFvUuy4XLzFu6xOpwQCrX0KWwlulFBy eAQwuh4yNOjDjMFkoLj054ilSgmyt+xSk9TXczbQ28oP/ugfClKPzlBvdl3/EMt28tmMbf zVd8Bp2xTPBlbhx0PEiEpxCApNHkngOug43+twvumQEdSkp9RS1ddvjqYyj1zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702648786; a=rsa-sha256; cv=none; b=SGQy2TvzdNojf7jNAuKDX/eNQCrl3J5zg6MI/PyJP31PAoet8l5lxKDzPq6be0pkrWQ5c3 NgsJmefL+/Q/KPAQ4WUyGXvJnKnP4KBCRWCMm0QQNuuT+z5GVDdYEeTSKWWhWSToFl2Pl6 TPU5kyUNnRssvKkQdv/xy85OBR4+vg3vfEtHsOUs4mebbIMbCnI7vL+t3dgodMHr+PDEYu uyPnVcbQ1qEc8Ayy4FefXGDxp5RUCM+02q1lbarcY70vSb2Pyf7rbKTHgpi2xnTghGBuHV ey2NvdTyTGgzTY2izNrWPv2noF21xMpxxSa8DUIkKlHYLZ1MFXxgmuFzNQaJiw== 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=1702648786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UwBtV6A9yc3ttqf0KrFV3k6dv6Eu2sGjTfUCppfLYq4=; b=xUXtXZmDbFOYr7+W3onBAjGI0BGHXU9nBGe64biw0Dib5fQhH+bmaqwD/Qu+sGB0HP74lh HF2kLA4qEg0JObbAK2F9Z08LLnoYiEjxS2FWAKgq7bPuoMP0shzmsxzpSULKiqz/e4gIU2 +mw46cMmrPT8GDTPkqZpquPdxO/hRSF860DO+1MyQeederXQxw+AG8DExF9WUqI6I1bkxS fsCW3XqQykAOMhhQ4fxiYsQuHfp9PHL0Gim1u1yK1900Ax7soTW7jgbTSILEYEkYQLZ+AG DYKSfCoscb+IQsnFeeeDfkkRcY73asoQYiOkRpQNt3IbFIbrpYuwuvYWcUUjfw== 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 4Ss9nt2TKqz1C02; Fri, 15 Dec 2023 13:59: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 3BFDxku3015634; Fri, 15 Dec 2023 13:59:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDxkVX015631; Fri, 15 Dec 2023 13:59:46 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:59:46 GMT Message-Id: <202312151359.3BFDxkVX015631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: ed917e0faea8 - main - xen/intr: correct type of evtchn_enabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed917e0faea8453551b0ee9728c5d328e2e3e412 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=ed917e0faea8453551b0ee9728c5d328e2e3e412 commit ed917e0faea8453551b0ee9728c5d328e2e3e412 Author: Elliott Mitchell AuthorDate: 2023-12-02 15:29:43 +0000 Commit: Roger Pau Monné CommitDate: 2023-12-15 13:59:25 +0000 xen/intr: correct type of evtchn_enabled evtchn_enabled needs to match the type of Xen's evtchn_mask. As Xen's headers have a type for this, use Xen's type. Reviewed by: royger --- sys/dev/xen/bus/xen_intr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/xen/bus/xen_intr.c b/sys/dev/xen/bus/xen_intr.c index 75750aa5b0bf..3e44c05ceeb7 100644 --- a/sys/dev/xen/bus/xen_intr.c +++ b/sys/dev/xen/bus/xen_intr.c @@ -84,7 +84,7 @@ struct xen_intr_pcpu_data { * A bitmap of ports that can be serviced from this CPU. * A set bit means interrupt handling is enabled. */ - u_long evtchn_enabled[sizeof(u_long) * 8]; + xen_ulong_t evtchn_enabled[sizeof(xen_ulong_t) * 8]; }; /* From nobody Fri Dec 15 13:59:47 2023 X-Original-To: dev-commits-src-all@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 4Ss9nw1WRMz52rSp; Fri, 15 Dec 2023 13:59: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 4Ss9nv4TcTz4J9d; Fri, 15 Dec 2023 13:59:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702648787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DIJ4ZrwUnUuYQ1TuGb8klABIiJJSq4f9bb5ok3OVrOo=; b=GY+I9f6NAQJC5RsGSjQyX0Hv7hUL8zdJLQcp6Spzz99VQLpIbJV8q8IVR/xKzt+gwVzF+H Tp9jHEkMZZrrGt5eEADwBSL92zJbdXuooM+0Sjzittd205b4FqN+on+/QAO8yW+8BopB8O Qs8z0hCX1Tvd6kpZ0U9jgZE2Q4g055PveSFKh9+0gGDADo5D3vHY7EQarH6Bu9yoecpimN 9hCq2ajrOiOXmqak+ZgeDxaymZ5d8Nts9JwiM8QHUQRkymR1BnxmZI/B3am0bBlC2Fv3DW nUJVUzTNG/pB9Duz9WslJX1OyBTSKxuEgeTQ4nsbG1jLlJjQFOuUGlCojowiyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702648787; a=rsa-sha256; cv=none; b=VpndNLLYyZX8TzPR0t4QBnnd7X/65xO6l2ObtjyYG3apNUQa+aaXRG8pv5qGGH6jjqocC2 U59jiKCuiGP+W1TRq2NPxmpGpfG4lwwEQuT4jRQsO1XnLEkTqecNx43vpzvu7daSA1im+c BoXvCHg46aDhoQF2CwjVZMASyOpKo2+CAPRfYK2pVn5DfBf2I0NkdvACRBSgRLcAKBR70N tPPVPBSrFd1222aMRy5zFK9+fJzXuiC8Kg/BMipRqhUVDxnlSsFfUgiTWHGPvETCjINsYZ vW9clUtjq3S7AnngGsfl9qtV+4EQ14V1wurXTq6Foa6Pm3COarTX7PmlkY3stw== 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=1702648787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DIJ4ZrwUnUuYQ1TuGb8klABIiJJSq4f9bb5ok3OVrOo=; b=FG8nN3yvCBzXtpQXSpRw4u+AKIoQE86Po825+nWuf8dofHOHFvSRS2KIp4PdqJ6Pgxtv8w AZN3gFnCQBIqbaS2RnFOFKwqbGRjEAhobs/ztmt7wY4NorVsLIxzmPEaWhWvjNpM2s0IIp bsGG2/OyGU7lZK3JNuuxiP5G6p6uVK6FHI0KYvw+4vaiCeAkomR7XPJDTT+lMr/kSJEkWX aZ8tyTAHno/LhcM7WK6zLCcFssUW9vgA80Bq0dNbTsJ0Te/D8alXMA9sxB7b0gihr6RJ7p gVhPlhmzorNznxMMMos55MltxjnwGkcfwKvfKE77mcw0u0COglILwVBOUVyNXA== 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 4Ss9nv3Y5sz1C03; Fri, 15 Dec 2023 13:59:47 +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 3BFDxlnF015694; Fri, 15 Dec 2023 13:59:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFDxlBN015691; Fri, 15 Dec 2023 13:59:47 GMT (envelope-from git) Date: Fri, 15 Dec 2023 13:59:47 GMT Message-Id: <202312151359.3BFDxlBN015691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 4c9e6ad3205a - main - xen: add atomic #defines to accomodate differing xen_ulong_t sizes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c9e6ad3205a770a029cedc3056790258791e6ba Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=4c9e6ad3205a770a029cedc3056790258791e6ba commit 4c9e6ad3205a770a029cedc3056790258791e6ba Author: Elliott Mitchell AuthorDate: 2023-12-02 21:54:48 +0000 Commit: Roger Pau Monné CommitDate: 2023-12-15 13:59:26 +0000 xen: add atomic #defines to accomodate differing xen_ulong_t sizes Alas, ARM declared xen_ulong_t to be 64-bits long, unlike i386 where it matches the word size. As a result, compatibility wrappers are needed for Xen atomic operations. Reviewed by: royger --- sys/dev/xen/bus/xen_intr.c | 6 +++--- sys/x86/include/xen/xen-os.h | 10 ++++++++++ sys/xen/evtchn/evtchnvar.h | 6 +++--- sys/xen/xen-os.h | 12 ++++++------ 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/sys/dev/xen/bus/xen_intr.c b/sys/dev/xen/bus/xen_intr.c index 3e44c05ceeb7..3fc8fb0fe83a 100644 --- a/sys/dev/xen/bus/xen_intr.c +++ b/sys/dev/xen/bus/xen_intr.c @@ -369,7 +369,7 @@ xen_intr_handle_upcall(void *unused __unused) /* Clear master flag /before/ clearing selector flag. */ wmb(); #endif - l1 = atomic_readandclear_long(&v->evtchn_pending_sel); + l1 = atomic_readandclear_xen_ulong(&v->evtchn_pending_sel); l1i = pc->last_processed_l1i; l2i = pc->last_processed_l2i; @@ -475,7 +475,7 @@ xen_intr_init(void *dummy __unused) } for (i = 0; i < nitems(s->evtchn_mask); i++) - atomic_store_rel_long(&s->evtchn_mask[i], ~0); + atomic_store_rel_xen_ulong(&s->evtchn_mask[i], ~0); xen_arch_intr_init(); @@ -582,7 +582,7 @@ xen_intr_resume(void) /* Mask all event channels. */ for (i = 0; i < nitems(s->evtchn_mask); i++) - atomic_store_rel_long(&s->evtchn_mask[i], ~0); + atomic_store_rel_xen_ulong(&s->evtchn_mask[i], ~0); /* Clear existing port mappings */ for (isrc_idx = 0; isrc_idx < NR_EVENT_CHANNELS; ++isrc_idx) diff --git a/sys/x86/include/xen/xen-os.h b/sys/x86/include/xen/xen-os.h index 6a3b82c0ba62..12942375be43 100644 --- a/sys/x86/include/xen/xen-os.h +++ b/sys/x86/include/xen/xen-os.h @@ -54,6 +54,16 @@ extern int xen_disable_pv_nics; extern uint32_t xen_cpuid_base; +/* compatibility for accessing xen_ulong_t with atomics */ +#define atomic_clear_xen_ulong atomic_clear_long +#define atomic_set_xen_ulong atomic_set_long +#define atomic_readandclear_xen_ulong atomic_readandclear_long +#define atomic_testandset_xen_ulong atomic_testandset_long +#define atomic_load_acq_xen_ulong atomic_load_acq_long +#define atomic_store_rel_xen_ulong atomic_store_rel_long +#define atomic_set_xen_ulong atomic_set_long +#define atomic_clear_xen_ulong atomic_clear_long + static inline u_int XEN_CPUID_TO_VCPUID(u_int cpuid) { diff --git a/sys/xen/evtchn/evtchnvar.h b/sys/xen/evtchn/evtchnvar.h index 10eed8434ebe..455f7bcbd620 100644 --- a/sys/xen/evtchn/evtchnvar.h +++ b/sys/xen/evtchn/evtchnvar.h @@ -54,7 +54,7 @@ static inline int evtchn_test_and_set_mask(evtchn_port_t port) { - return (atomic_testandset_long(EVTCHN_PTR(mask, port), + return (atomic_testandset_xen_ulong(EVTCHN_PTR(mask, port), EVTCHN_BIT(port))); } @@ -67,7 +67,7 @@ static inline void evtchn_clear_port(evtchn_port_t port) { - atomic_clear_long(EVTCHN_PTR(pending, port), EVTCHN_MASK(port)); + atomic_clear_xen_ulong(EVTCHN_PTR(pending, port), EVTCHN_MASK(port)); } /** @@ -79,7 +79,7 @@ static inline void evtchn_mask_port(evtchn_port_t port) { - atomic_set_long(EVTCHN_PTR(mask, port), EVTCHN_MASK(port)); + atomic_set_xen_ulong(EVTCHN_PTR(mask, port), EVTCHN_MASK(port)); } /** diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h index d009b1af11fa..d7e9b3ca8632 100644 --- a/sys/xen/xen-os.h +++ b/sys/xen/xen-os.h @@ -120,23 +120,23 @@ xen_initial_domain(void) #define NBPL (NBBY * sizeof(long)) static inline bool -xen_test_bit(int bit, volatile long *addr) +xen_test_bit(int bit, volatile xen_ulong_t *addr) { unsigned long mask = 1UL << (bit % NBPL); - return !!(atomic_load_acq_long(&addr[bit / NBPL]) & mask); + return !!(atomic_load_acq_xen_ulong(&addr[bit / NBPL]) & mask); } static inline void -xen_set_bit(int bit, volatile long *addr) +xen_set_bit(int bit, volatile xen_ulong_t *addr) { - atomic_set_long(&addr[bit / NBPL], 1UL << (bit % NBPL)); + atomic_set_xen_ulong(&addr[bit / NBPL], 1UL << (bit % NBPL)); } static inline void -xen_clear_bit(int bit, volatile long *addr) +xen_clear_bit(int bit, volatile xen_ulong_t *addr) { - atomic_clear_long(&addr[bit / NBPL], 1UL << (bit % NBPL)); + atomic_clear_xen_ulong(&addr[bit / NBPL], 1UL << (bit % NBPL)); } #undef NBPL From nobody Fri Dec 15 16:50:53 2023 X-Original-To: dev-commits-src-all@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 4SsFbK6SNCz53nY5; Fri, 15 Dec 2023 16:50: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 4SsFbK5Wpyz4ZyM; Fri, 15 Dec 2023 16:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702659053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mlph7qDdh5XXUEcETgiFAvFzt+fzyH5U1/pzxm81vck=; b=l2kBr1OR1euvJhQTHsGRyHqCl6OrI51D3a2DchEKR10nTciieq/TBpEFWxj8T6OM9ntV3e IAp54tgPdDcoQzGNQmdrRXPnhXFadMjS7pasyvspVXh1xzHR+2Ed7eGl1sTzibWfIQfTFG MIuuNcsE1N1xSTM1tnZG4xv68fsb04tOsvFRVWITliV5l94GJpyufL5bYU0HGxD3IKJ6+R zr5aGvUiErBCzJDrNwyq3KAkFIQaqh0CYVmwYDLmOrhww1XzPpfu5Csvh57QlzsDpWUgk+ SoZ8LgID1tBHVNVXGaPn6xHBznIgrQo+uXQV0XpnT2vc002ej4mAtBaZZTdKZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702659053; a=rsa-sha256; cv=none; b=ZRklpRIvj1Y0Ca8X3elQqr69FDn6FUsACe/SH5YQYE7jQ36X3AflJYL0vca3MCbniEISGH LlEe7gwY4niehDllLp2AGCW2LI4q166eRdaDUkTetotlzsPUKiq9SQlyFAqlr2Gxkamhy0 XK8GN+k6zmY19BEyQh4n5iyljyAvasalkd0t5ZUucnIFHyed5zGcQqsUL181ozukX/0T4G +P3c3CQKQfmd9Sqv88PdGYFR1Rw7EvVHmEZqYLy0OxUu2sJmKc5MYmGLm7PUiW4RRjfOyp KaOHr5yVE4VjeBYHlNGngsgM0OqC3UtIayHI2G8wqwdVbZfACw7EMhvQWGnHOg== 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=1702659053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mlph7qDdh5XXUEcETgiFAvFzt+fzyH5U1/pzxm81vck=; b=oYNr4I0fkq8VL2NT/ha5sW6zfaY8aorkX8FDL3Z/C2S6llTgevuixfv05mblRUmlOO8xSB pWtg0QRiqS3qFQpbobFGSD3ussDr2JzTdFMupJZ7bxeYq12gW56bEE4J/yyujLK6FnWY8u 22XRMOj6uRAcuYxWd8HMhqR6/CrcRV43+xrQzky3XpwnDgmbw5e3g9JjwhzXE5qQz6Rnn6 hwUBr3h8JLvPCx0qYRwtF2zKSVlu8stBXENVNAbh3TaIJzMiOql+gZ176BcE2mHWNmlmBb pmWql+0Z2URVVK2t7yt2gF5PdoNkppdetEBJbYVM48LQ2ErhKRIWHT+gaytVKA== 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 4SsFbK4Zn5z3ys; Fri, 15 Dec 2023 16:50: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 3BFGorWl010706; Fri, 15 Dec 2023 16:50:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFGorCv010703; Fri, 15 Dec 2023 16:50:53 GMT (envelope-from git) Date: Fri, 15 Dec 2023 16:50:53 GMT Message-Id: <202312151650.3BFGorCv010703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: cdd2624a9759 - stable/14 - localedef: expand the default charmap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cdd2624a9759721ce7973635d079ab04704c8027 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cdd2624a9759721ce7973635d079ab04704c8027 commit cdd2624a9759721ce7973635d079ab04704c8027 Author: Kyle Evans AuthorDate: 2023-09-02 06:13:02 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:57:59 +0000 localedef: expand the default charmap POSIX defines a number of other control characters as well as alternative aliases for some that should be provided in the default set, so let's go ahead and add those. Reviewed by: bapt, yuripv Sponsored by: Klara, Inc. (cherry picked from commit 3a7ffe206ce7e4741fae26432f6d6e5159207f45) --- usr.bin/localedef/charmap.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/usr.bin/localedef/charmap.c b/usr.bin/localedef/charmap.c index 44b7e3292eae..1da4d8921ecb 100644 --- a/usr.bin/localedef/charmap.c +++ b/usr.bin/localedef/charmap.c @@ -70,13 +70,49 @@ static const struct { int ch; } portable_chars[] = { { "NUL", '\0' }, + { "SOH", '\x01' }, + { "STX", '\x02' }, + { "ETX", '\x03' }, + { "EOT", '\x04' }, + { "ENQ", '\x05' }, + { "ACK", '\x06' }, + { "BEL", '\a' }, { "alert", '\a' }, + { "BS", '\b' }, { "backspace", '\b' }, + { "HT", '\t' }, { "tab", '\t' }, - { "carriage-return", '\r' }, + { "LF", '\n' }, { "newline", '\n' }, + { "VT", '\v' }, { "vertical-tab", '\v' }, + { "FF", '\f' }, { "form-feed", '\f' }, + { "CR", '\r' }, + { "carriage-return", '\r' }, + { "SO", '\x0e' }, + { "SI", '\x0f' }, + { "DLE", '\x10' }, + { "DC1", '\x11' }, + { "DC2", '\x12' }, + { "DC3", '\x13' }, + { "DC4", '\x14' }, + { "NAK", '\x15' }, + { "SYN", '\x16' }, + { "ETB", '\x17' }, + { "CAN", '\x18' }, + { "EM", '\x19' }, + { "SUB", '\x1a' }, + { "ESC", '\x1b' }, + { "FS", '\x1c' }, + { "IS4", '\x1c' }, + { "GS", '\x1d' }, + { "IS3", '\x1d' }, + { "RS", '\x1e' }, + { "IS2", '\x1e' }, + { "US", '\x1f' }, + { "IS1", '\x1f' }, + { "DEL", '\x7f' }, { "space", ' ' }, { "exclamation-mark", '!' }, { "quotation-mark", '"' }, From nobody Fri Dec 15 16:50:54 2023 X-Original-To: dev-commits-src-all@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 4SsFbM08B5z53nSm; Fri, 15 Dec 2023 16:50: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 4SsFbL6QJLz4Zwc; Fri, 15 Dec 2023 16:50:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702659054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1AfelgyNgmqtV9XZZQeSzMe1M+YVPmZNEtZ2zHR0CI4=; b=joXWyMtBn/LZlrl2N8GmDndJSmVj4iap0UbryN0qEwM9TqokLVg37QBNHMEbgG9ZsJ6Pds AHcye80aNhLNZMtkCN7wWBXdziYUYX1Lp+d7JqjKiq26FMmxck4/lRTAK1JpThr4r4yb4I 7csHHTtM0K6qA8g6baCHZb0dM/8VFr21vl/s0fUOoYhdPwFTr1uRHeUCfrewOu/0KIFDbf XyrWedTvgCEHfUFIF5l0jwjLk/RcSOKXCrMXNd66LhEJyHCUAj7iExQbrSU+37fiWGDrPP yL8Jh9S9cZ26LjOwHaDVQgP2KqYb0I7K/RZW0RSijFADoxMML7l2UsJI4Ipqxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702659054; a=rsa-sha256; cv=none; b=fp7+eQbp1qdpcmOEFdxTNRJH/B+mHOuvKYBVPOeUSaoziKtf+vTLV7456zp8m47n8Zuv0l inUuusgrBsfuNe15+o05X+bw6ttridDri5ceAYl5irjDWlNkzKQSDTu8GvQe4tLJZQ7ljE RES9lAD+ig3gAoudD5iQ/lpb7JG2DurUf9JHc+ORHHmCF23LmD2XY2mC6RXkLpLqTf2xvg fXzjdDRCzZdVz/dSzLzI6r/h7f48TONqWzfJZBwFBVAaQetdHkN/Lw+2jfPh3w5l1IbdYi pbM2M1lN2QNCEJD+2BwSZH6QNvRF0a/f9LXiKBIl32JPVjv/z9CexS5knvZ8iA== 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=1702659054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1AfelgyNgmqtV9XZZQeSzMe1M+YVPmZNEtZ2zHR0CI4=; b=dFln+OO51qIByaNXOJtsnSeftwn88wFQ937Dybgk+ejmfolUg5ZYLks/yIMi3jFA2NrKIg idONXPXAohel8SPqikYMvl6jwTj4WTIO4hOgq1k9b7j1WjV2hKtQNfbLKoH+xC9BKl5T/K JjvePmM2gPcC9dpSHR8CIR+kSx1HqhoUd5r3SlB/5NuGCyS2mU80pD3d8VrkIsbdRfkVfV DSaMmYQ9Dk5LTRn0pgKO4go3GhNCdLHI8YEkxOEJtfJPUoVVQms9klJo4MJ22lvX+IvBKR oaX4K6Q5rbUKtRpFZDMPTqHnmrEOluyUpxlDgH6LzhKdMD/Cdbegy1FezBq15Q== 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 4SsFbL5Rm4z3wk; Fri, 15 Dec 2023 16:50: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 3BFGosKw010760; Fri, 15 Dec 2023 16:50:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFGossR010757; Fri, 15 Dec 2023 16:50:54 GMT (envelope-from git) Date: Fri, 15 Dec 2023 16:50:54 GMT Message-Id: <202312151650.3BFGossR010757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 20baa89501c7 - stable/14 - ncurses: avoid hardcoded assumptions about the layout of .OBJDIR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 20baa89501c7a7815b5ca4ada916393732af8d42 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=20baa89501c7a7815b5ca4ada916393732af8d42 commit 20baa89501c7a7815b5ca4ada916393732af8d42 Author: Kyle Evans AuthorDate: 2023-09-12 21:00:45 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:58:04 +0000 ncurses: avoid hardcoded assumptions about the layout of .OBJDIR Abstract out the details of the FreeBSD build into a $TINFO_OBJDIR that external builds can override if they orchestrate the build a bit differently and have a different objdir layout as a result. This makes the ncurses build a little bit more flexible without requiring weird backflips. Reviewed by: bapt, sjg Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. (cherry picked from commit c086d1cbc3d13967c031e6420831349967dbcfa2) --- lib/ncurses/config.mk | 6 ++++-- lib/ncurses/ncurses/Makefile | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ncurses/config.mk b/lib/ncurses/config.mk index 0016dc97a72f..8a3e7d0ffa59 100644 --- a/lib/ncurses/config.mk +++ b/lib/ncurses/config.mk @@ -6,6 +6,8 @@ NCURSES_MAJOR= 6 NCURSES_MINOR= 2 NCURSES_PATCH= 20210220 +TINFO_OBJDIR?= ${.OBJDIR:H}/tinfo + CFLAGS+= -D_XOPEN_SOURCE_EXTENDED NCURSES_CFG_H= ${.CURDIR}/ncurses_cfg.h @@ -17,7 +19,7 @@ CFLAGS+= -I${.CURDIR:H}/ncurses CFLAGS+= -I${NCURSES_DIR}/include CFLAGS+= -I${NCURSES_DIR}/ncurses -CFLAGS+= -I${.OBJDIR:H}/tinfo/ +CFLAGS+= -I${TINFO_OBJDIR} CFLAGS+= -Wall @@ -27,7 +29,7 @@ CFLAGS+= -DHAVE_CONFIG_H # everyone needs this .PATH: ${NCURSES_DIR}/include -.PATH: ${.OBJDIR:H}/tinfo/ +.PATH: ${TINFO_OBJDIR} # tools and directories AWK?= awk diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index b52085780952..e1a3dbf61e49 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -180,9 +180,9 @@ libncursesw.ald: ${.CURDIR}/${STATIC_LDSCRIPT} -e 's,@@STATICLIB_SUFFIX@@,${_STATICLIB_SUFFIX},g' \ ${.ALLSRC} > ${.TARGET} -lib_gen.c: MKlib_gen.sh ${.OBJDIR:H}/tinfo/curses.h ncurses_dll.h +lib_gen.c: MKlib_gen.sh ${TINFO_OBJDIR}/curses.h ncurses_dll.h LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CFLAGS}" \ - "${AWK}" generated < ${.OBJDIR:H}/tinfo/curses.h >$@ + "${AWK}" generated < ${TINFO_OBJDIR}/curses.h >$@ expanded.c: MKexpanded.sh sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c From nobody Fri Dec 15 16:50:55 2023 X-Original-To: dev-commits-src-all@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 4SsFbN164Hz53nSp; Fri, 15 Dec 2023 16:50: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 4SsFbN0Zjcz4b6x; Fri, 15 Dec 2023 16:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702659056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p5FcbcPU2JKkaHtRkEVkV5Bacj1fff/1Uqc0b2TI80o=; b=fQ+j/o8hkjQNFeJYYgLMuVFXDiCJyPSFAmAeYV1NqF5ksT8FBr4iadMlmkGbTsuBS/a7Jd UzinRRLg3UTxlc/i+hVCWtIdBwU6RMPO/n+WJW2gc/5Cmjitr1qsdYkMMPhWE87AIe3Ny5 +Dsov9YqN1vc6oithv97IcIvYCMerzIf/6obDHlsqvP+SyZ47jO/s7Jhc6UwUsg/lSlO8A 81ku7Xd/HUqRUpBqo+tbqlOrR00WcdP0jJVSz2TpEmCJh6fxj0Ta2I6q3pLNxqxZyr8rKt 8HNnucZ5DawZf6lJ74vgbXUNOGR83ftqTrxuXy56lzt+j9e2Q9reSNHUvTibfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702659056; a=rsa-sha256; cv=none; b=Vxm++alXqU1HdPyKqpikmxMtvgYsQDUHjRiViK9WV05eHfl1yYDneSvrAkObOoGmvHjQU+ y3DSfhpQTFgRg3VDiCabkmIlJ4PLdNtK2z2IZlDnZ2Q69kR+zSxUfiU+5ynIqh8IXwMCdv m1YcW/P9qvMKR+c4frxap7P4I/Qzp5k8HxaXr5a2e4B/y3oT2NyaD5jhU66wXtZ/XLjN4F e3g63aclRGEZM1IwpHOEw8jHwpGFV2kwUnS1ppiEp1MRbvvCzTvpmb89vrfecHQNhzi4xI 8atTHa+skbUqR8iBsWOwUuBrrVu2/V1Uky3et73oROOnPVZnICWSKQUsxR5k/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=1702659056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p5FcbcPU2JKkaHtRkEVkV5Bacj1fff/1Uqc0b2TI80o=; b=a5yBRVrvpKi1Ylf2IX/44g4rJiNC2df1YuzXvC5bP5acso9Dh17mFQcAZuCNwcM+S21sxm 6nNyX/QWw/MGhPMPDPhiIDTOjdEktK+gkoW2NFNQBncSz0O8edhowYV9NJ4idbDAjjQ+RN WUK0y0OV0b75+wVmYum5H4QeLtPMc5hoMTjhCtAgn3duS4+3FTmw1zAB+ou4CZ3VGbwdvH utFBhohvs6KWc6igexCLgOOTc+mjn+4nUXwWyyTbVqpKSV43bhBqviDFRsOKqhMiK0oevF Lz1FSb/5GCdii51e4DMZwWAZWV9t8s8cNRmTAqfH5+ejrUhjRlXIiT67NT+Hzw== 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 4SsFbM6hwwz3wm; Fri, 15 Dec 2023 16:50:55 +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 3BFGotgW010820; Fri, 15 Dec 2023 16:50:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFGotuu010817; Fri, 15 Dec 2023 16:50:55 GMT (envelope-from git) Date: Fri, 15 Dec 2023 16:50:55 GMT Message-Id: <202312151650.3BFGotuu010817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 9c2aaaa997d0 - stable/14 - arm64: lop off another 24MB of KVA for early device mappings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9c2aaaa997d0ad19cee733a7ee78630d3e94dfb3 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9c2aaaa997d0ad19cee733a7ee78630d3e94dfb3 commit 9c2aaaa997d0ad19cee733a7ee78630d3e94dfb3 Author: Kyle Evans AuthorDate: 2023-11-23 16:21:33 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:58:08 +0000 arm64: lop off another 24MB of KVA for early device mappings This grows the block enough to fit a 4K 32-bit depth framebuffer; some firmware would present smaller GOP modes to be able to boot with a smaller framebuffer on these devices, but the Windows Devkit firmware is simply not that nice. Instead, it offers exactly one GOP mode that matches the current resolution of the attached display, so with limited control over resolution on most of my displays it'd be nice if we could Just Work(TM) at 4K. andrew notes that he has some ideas for removing PMAP_MAPDEV_EARLY_SIZE entirely, so this limitation could end up removed altogether in the future. Reviewed by: andrew, emaste (cherry picked from commit a3ceeef26bc880b86f4e181bddd9924a2b5e0691) --- sys/arm64/include/pte.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/arm64/include/pte.h b/sys/arm64/include/pte.h index aebe24cb82af..a868931604c9 100644 --- a/sys/arm64/include/pte.h +++ b/sys/arm64/include/pte.h @@ -163,7 +163,11 @@ typedef uint64_t pt_entry_t; /* page table entry */ /* 0x2 also marks an invalid address */ #define L3_PAGE 0x3 -#define PMAP_MAPDEV_EARLY_SIZE (L2_SIZE * 8) +/* + * A substantial portion of this is to make sure that we can cope with 4K + * framebuffers in early boot, assuming a common 4K resolution @ 32-bit depth. + */ +#define PMAP_MAPDEV_EARLY_SIZE (L2_SIZE * 20) #if PAGE_SIZE == PAGE_SIZE_4K #define L0_ENTRIES_SHIFT 9 From nobody Fri Dec 15 16:50:56 2023 X-Original-To: dev-commits-src-all@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 4SsFbP4Dhkz53nDb; Fri, 15 Dec 2023 16:50: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 4SsFbP1W4cz4b7Z; Fri, 15 Dec 2023 16:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702659057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en939RxkIDtm9Lxjtd9qtYNoWnmSHL9qsIcWDsqO/WA=; b=O/FTImLbjeTKJHIToENhHpLiDE2LiVgDi22JgfyGjynBVXMiMlDI7t/5GFquk0tfrmcoHX Is6pTE2rXhFpShc1LdaKwUnJ13NA4r12YlEhg7tsnhu/SpjhcChlI6DTD79M59g+2UZdLW 0BXx0C7LbZi7Fe+2PEak+Ln+/ASem/6RXOjOZsi19sG0fpR9nsbBMgQcWjZZEhJmaHJ4GU gj/2VQI21GKBBH6i+rixtpO4HGHdKLsCKam1k8bBzh9rBkJ9NJ7uPJE/cQVk5f+nctAeBD FPZ6JPtkHxphiJs9uIX9aD1Cz0iWHQmpwoCJjueOjHIFpcLLDFLhZ9WLy0DWdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702659057; a=rsa-sha256; cv=none; b=THBzFWY/sbxlWczsBN41uC1m6qbLuLLFxkSwr+h7K1m4HZqzMdvLjc/E83QUGUAVfQn77s kl2JzAqZkRKViBwRWw5eugTeP/RItJFydOxGqL+k30gyGhWMlwN+jKrirircWLxtPUa4ap Tn3hqM8cqESl4kY9fnBfjEc/jKUeFo9UilbNXeOuzp58RM6juz+wHplXrsF38l43V0SEia XLgtBGWY8g4D3P2Gwp8YxMUOeZiYwG/6Xy5Nnkqhe1RhAu+RTFCjp8TTLb0BjIBdPHu2Sn Ey9TpkxyKtk18R+rez7mC7PPV2VRFefsLuTQcH+OV7Aowhbx+LyOos5/cHKzMg== 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=1702659057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en939RxkIDtm9Lxjtd9qtYNoWnmSHL9qsIcWDsqO/WA=; b=lPQM2rMQkpZa6IkrO7B+F/DwoAzbPEm4tZgc09WdJQLOfbqvmTsK04DnMuFojnyFw8QSbo iOGZZxgPU4HdEMTtREyuTE83Djxml+0Uowc2DB/n4IgzgP9Kie51DatiMfXhspKNXUQro1 KzRFvz9M+GyKYPsljbLi6v1qSxFVv5mm4n2opn/dPhdA0vIoJoo+ro6eWnvrzjgAK5c95/ wJxK9YsbGEUWx6dWZFyARztTfjZNSJLOMeFmwstgIOcxKo9YuXdAuOxxmEDU7VvyoQ3CfT ZGultAUIvvBUiYsnto9zPzsdgHrzZO+kbAYIv9OySRnFZL0lukyb7hrveskUZg== 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 4SsFbP0cqfz3wn; Fri, 15 Dec 2023 16:50: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 3BFGoudf010868; Fri, 15 Dec 2023 16:50:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFGouXd010865; Fri, 15 Dec 2023 16:50:56 GMT (envelope-from git) Date: Fri, 15 Dec 2023 16:50:56 GMT Message-Id: <202312151650.3BFGouXd010865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 8a152128dcc5 - stable/14 - lockf: correct omission in the usage statement List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8a152128dcc546745194ef671673b5a0762b6d26 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8a152128dcc546745194ef671673b5a0762b6d26 commit 8a152128dcc546745194ef671673b5a0762b6d26 Author: Kyle Evans AuthorDate: 2023-11-22 04:45:42 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:58:11 +0000 lockf: correct omission in the usage statement The -w flag was added without being noted in the usage statement; fix that now. While we're here, re-sort the getopt() string. Reviewed by: 0mp, allanjude, des Sponsored by: Klara, Inc. (cherry picked from commit 35095fd23f071d03633312b91a5b460eaf811efa) --- usr.bin/lockf/lockf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index c98c584bc6a9..4fbabea8c08f 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -62,7 +62,7 @@ main(int argc, char **argv) silent = keep = 0; flags = O_CREAT | O_RDONLY; waitsec = -1; /* Infinite. */ - while ((ch = getopt(argc, argv, "sknt:w")) != -1) { + while ((ch = getopt(argc, argv, "knst:w")) != -1) { switch (ch) { case 'k': keep = 1; @@ -224,7 +224,7 @@ usage(void) { fprintf(stderr, - "usage: lockf [-kns] [-t seconds] file command [arguments]\n"); + "usage: lockf [-knsw] [-t seconds] file command [arguments]\n"); exit(EX_USAGE); } From nobody Fri Dec 15 16:50:58 2023 X-Original-To: dev-commits-src-all@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 4SsFbR1Hm2z53nWj; Fri, 15 Dec 2023 16:50: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 4SsFbQ2fgdz4bGb; Fri, 15 Dec 2023 16:50:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702659058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=33tm4KXhKaAsgi85fb4eXn99crIRqofmPjLRKKMn7BE=; b=w9yTbicxqRzxUmO8BzAZD6v1VX2ZROuu5bwdugphw75A8NJoL9J3z1KMI3824VK+/7yBF4 +QcBrgVOGvTDKeA2262KaTlq668BPALGz3Dqnbe14RRD+3QW9e140dv1V9B1J009LVOOa5 jPrmw/b7zFNRwodUZ4FmjQA9lIpbs667HTVEf+JShhFlKQAwYqVzwWuFNgEevWAgZ3fmZV wByIpZqlN5zq57FGAu+3OXVxs/8gbqOHJaXuYjYz39bRP4mJi76PERepOkjjcwswx9DPEK FS9SmhOqlzXHod5tzW/8UwcrQeXDfrFCDSkDsKul2WV+q1q490g6I4rlLy2WHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702659058; a=rsa-sha256; cv=none; b=cru9GG4GJ3KSjcDMif3KAhxyLb7LWAXg5PeVA6u6B/MReabFz4TrftBKOXligImpI+kNUH RcigfEBb0tHhDWL79RYiud41+sP8SBy+pkY9fxeQC6+3i7DyS9MQvr5TxT8PO1NPvrORxk BrvV+8J3ZVsZCKqSk1po1MkCjHvfOW8QH78LWzejTE4pXVBpiEM9Xd9yGE8Fnm6xkxujUS e1/o8+X8tiiDT+KZj0pI0oY6iSYBuVLU24v1ivbU2P0A+82gDy8Zjpf0mhSM+Hbs+WgwNH 3cvel7CVzvUdzDXsc8ymuycFQDFYwaZGWcOcPK6ol4+dCGi27YhJ1Cy9z56fDg== 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=1702659058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=33tm4KXhKaAsgi85fb4eXn99crIRqofmPjLRKKMn7BE=; b=wntaTmSKMyfJonty/MuNcrPcgzcKhfv9M83p0l+hUwmBt5z0pUJ00MQHav31P+fER58w1g srcwdYJ1Q7jTMJLozI4BpCBKj74yl+5CRdcLM11WDWLLAE4ApAkF1F6erR0V1uj6ICtnSS ERg21hqigRTNy4hoqd3kIY1OzrijErAAFRzul7aQp2gWNx/P4+ArWftsMT0/X8VbNf8Nyz bKWkAtTf/kzTQu3c1Mkufr3J/uhz0pOjEf+t4eTwlN4STHUmGDvhmvqCcyJjBqplEfUAtG BiAr2A3Lm7gZnzT/vmuo544ROIY1/OixoONNz728cg0vlfbOgIpX4Z9y59ujgw== 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 4SsFbQ1dpYz3wp; Fri, 15 Dec 2023 16:50: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 3BFGowCv011603; Fri, 15 Dec 2023 16:50:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFGowXk011590; Fri, 15 Dec 2023 16:50:58 GMT (envelope-from git) Date: Fri, 15 Dec 2023 16:50:58 GMT Message-Id: <202312151650.3BFGowXk011590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 6128f0c28db5 - stable/14 - lockf: hide unavailable error with -n -s List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6128f0c28db5c77374e1898e16f44131ebebc861 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6128f0c28db5c77374e1898e16f44131ebebc861 commit 6128f0c28db5c77374e1898e16f44131ebebc861 Author: Kyle Evans AuthorDate: 2023-11-22 04:41:36 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:58:15 +0000 lockf: hide unavailable error with -n -s The error message is expected, allow -s to suppress just that one since it would loosely fall under the definition of "failure to acquire the lock" described in the manpage for the -s option. Reviewed by: 0mp, allanjude Feedback from: des Sponsored by: Klara, Inc. (cherry picked from commit 3041e6950d07f0d11c9f91fefbf3c273cbbe4407) --- usr.bin/lockf/lockf.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index 4fbabea8c08f..ff1e7a6d6216 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -38,7 +38,7 @@ #include #include -static int acquire_lock(const char *name, int flags); +static int acquire_lock(const char *name, int flags, int silent); static void cleanup(void); static void killed(int sig); static void timeout(int sig); @@ -125,13 +125,14 @@ main(int argc, char **argv) * avoiding the separate step of waiting for the lock. This * yields fairness and improved performance. */ - lockfd = acquire_lock(lockname, flags | O_NONBLOCK); + lockfd = acquire_lock(lockname, flags | O_NONBLOCK, silent); while (lockfd == -1 && !timed_out && waitsec != 0) { if (keep) - lockfd = acquire_lock(lockname, flags); + lockfd = acquire_lock(lockname, flags, silent); else { wait_for_lock(lockname); - lockfd = acquire_lock(lockname, flags | O_NONBLOCK); + lockfd = acquire_lock(lockname, flags | O_NONBLOCK, + silent); } } if (waitsec > 0) @@ -168,15 +169,18 @@ main(int argc, char **argv) * on success, or -1 on failure. */ static int -acquire_lock(const char *name, int flags) +acquire_lock(const char *name, int flags, int silent) { int fd; if ((fd = open(name, O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); - else if (errno == ENOENT && (flags & O_CREAT) == 0) - err(EX_UNAVAILABLE, "%s", name); + else if (errno == ENOENT && (flags & O_CREAT) == 0) { + if (!silent) + warn("%s", name); + exit(EX_UNAVAILABLE); + } err(EX_CANTCREAT, "cannot open %s", name); } return (fd); From nobody Fri Dec 15 16:50:59 2023 X-Original-To: dev-commits-src-all@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 4SsFbR4Wd3z53nWm; Fri, 15 Dec 2023 16:50: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 4SsFbR3cD5z4b3P; Fri, 15 Dec 2023 16:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702659059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LPdv0KW/FZEJDADIRXhOGvlGVRtoJv/+bBICUjbvHKQ=; b=VZmT7JtWk4k6OQRkN1jWuZptabPDalhxG+DR6HDa2koTFKJrhu0iqbFKizLev098K7yBBs 5nINQ+K0bss4vjI73HzBW7nkCwaumV2po5qYyRx21TuRBJ6T1rGKCCVAQDuY4YtnmIxyCg WpXA920IxMgf2VK6b2Oyh1L/vnTQceS6gom2eCwoOnADJgXSzC7Mcsyq0EsYc/8BmQVYLA uEDIoR614gMs6WCPPAAI+qLmjVw+B3qs9ufc5XCTEy/XfFmKpUnqEL07VhNZNRd+uYED4u uwAO+STUS03kYFDxu9V0rdXEIWWPGDO2lDGdfj9nah3oN2raiE3hXDExz4UhlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702659059; a=rsa-sha256; cv=none; b=Pcrozw7eHJUujIdmL0kKIpaZI7G1ZKT5RKB6hL8rK+z8jCDPdBfB2tlMrjAemWeRvtp8BX T1NTfNfNU8CpiPoE/1e/FMziJiaC7kKFB3t1YimGHuqBJhm5+++XiQQcIfli9vzQuQm7D8 BICq3egnL6Hckd/7Mw6GETCL0ebeD9AMx2jXDpzj8zg7LiCfpMVQRGoiT1/4X7Jbddg7f5 Hw4pmmA+ljWC6QOkzKxaUKR/XkM0qxVQfGAAdxkebTMHpcjGwbZBWc+6hffl615gV61Lz+ 8PSBLEWaApFCGdNDZ8B6yDr/ivUfJN1UFTIhvhGJCWDJ1+OnbB2b7K/cH9EIUg== 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=1702659059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LPdv0KW/FZEJDADIRXhOGvlGVRtoJv/+bBICUjbvHKQ=; b=vz5Gy81qv2S6GmgXetUnaHLNZJfJJH36YnwieT/dCVqL9DgkrNXo0QU3RMJ9hRBnpW6oHd 9tUn5doyMOaF5iDKdpw20lyvyxLShe3gkMRTArPVO3MfkkaZ7rHGCWV2HtV5VDr48xEhXQ pxK1IyZcU+3awzrG5bxbF9ik+O+sMdjNMf8mgvKHJr6rQS5gKKJqlM0JXsE17yhnlR7rxx 6FSjmV2u3VwJ0ihODyyriwgudVz6wgTTtkLeWMOj+hXlGvhOzuwppeuYgfgFzDG2cOOjaj PcANexGB0O1Bf4t4ade+fppjzIiudhUcGb6uyFrmlT+8D3D69qiQT9z0KXl3ug== 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 4SsFbR2dwYz42S; Fri, 15 Dec 2023 16:50: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 3BFGoxN6011880; Fri, 15 Dec 2023 16:50:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFGoxp9011877; Fri, 15 Dec 2023 16:50:59 GMT (envelope-from git) Date: Fri, 15 Dec 2023 16:50:59 GMT Message-Id: <202312151650.3BFGoxp9011877@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 579c24898b89 - stable/14 - lockf: don't hold stdin/stdout/stderr open List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 579c24898b89b87dc86095c3e55c1b1f8fca5e1e Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=579c24898b89b87dc86095c3e55c1b1f8fca5e1e commit 579c24898b89b87dc86095c3e55c1b1f8fca5e1e Author: Alexander Melkov AuthorDate: 2023-11-22 04:46:28 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:58:20 +0000 lockf: don't hold stdin/stdout/stderr open None of these are essential in the lockf monitor (parent post-fork), so close them to maintain the illusion that lockf hasn't been inserted into the pipeline. This ensures that the correct effects happen on other programs in the pipeline if the locked command closes or redirects these elsewhere. The original patch used -s to close stdout/stderr rather than closing them unconditionally, but it's not clear that we really care that much. kevans dropped that part when taking the patch, patch is otherwise by listed author. PR: 112379 Reviewed by: 0mp, allanjude (both earlier version), kevans Feedback from: des Sponsored by: Klara, Inc. (cherry picked from commit 18425c19cae08cbe41801845457ed67285806688) --- usr.bin/lockf/lockf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index ff1e7a6d6216..620193cba1d7 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -157,8 +157,11 @@ main(int argc, char **argv) signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); signal(SIGTERM, killed); + fclose(stdin); + fclose(stdout); + fclose(stderr); if (waitpid(child, &status, 0) == -1) - err(EX_OSERR, "waitpid failed"); + exit(EX_OSERR); return (WIFEXITED(status) ? WEXITSTATUS(status) : EX_SOFTWARE); } @@ -210,7 +213,7 @@ killed(int sig) cleanup(); signal(sig, SIG_DFL); if (kill(getpid(), sig) == -1) - err(EX_OSERR, "kill failed"); + _Exit(EX_OSERR); } /* From nobody Fri Dec 15 16:51:00 2023 X-Original-To: dev-commits-src-all@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 4SsFbS4v0jz53nWp; Fri, 15 Dec 2023 16:51: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 4SsFbS4JVBz4b44; Fri, 15 Dec 2023 16:51:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702659060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q9Vp9VuJFEi1cneieOWhI3g1TM8jF84Tbwg32b2RLbw=; b=A+L+NK8cg4M6lOQjZbTIbkd89xM0v62If0LHCRcZMv+WGhvbXTsepLompjyIcxBGdQWl/c cmBPkBKq/MlO+U1TCMiav2/w9byqNHgeGe5YynUL1K8OlDRCAIfWaNWxA5cqXuarsIWAf1 wbcZIjTqazt0A+AUs/M+RDE4xBj7DwAoOSxYWnuCa3DFEWNeK+JGlUBRdlNLaQmDjaIBwP 00oM3ZUqmLo7u4KZzqm4kaUo/JC7PqvfUkwPHJWcRTBJ5TswEw+fwyyQOQMuxemFO6VZ+T UPG6ec17dLLtQy4qHLa2rm2v59PhCAcgzLPbHfFmhK+FGxSfFDlKuIkchzERgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702659060; a=rsa-sha256; cv=none; b=qIa1WDoHJYrKC6KwwI8PqkZ1+zlP2KyAzpkKDbh98uQsELYIJchFBXTtHdg2Hi3nXl8Zc1 ICAkguPfbLb5Kk6KlWiSLkqLnoeVOv/0ml/zZLDxqw3b9nQXly9fy6p+VTqtqh8wsLFKZW 1Y2Toalodjq5iLqfAjtXr3a7jXIfYUE+hugCjLYlp1zUfQz8Y1FkUd/MbyPJqDeCifHQPX P00/dFomPqck6eiSHgmFTrhwqC1RwefubTVeykSOKQ+p9TkPnQxjPCRf0Y3JLcqfgGqjYi lul2IZEj+4/yQtkeEynlMEJmNTDiYj1HSI91tl2+U5pQVusoh2+EemiZiYwEjw== 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=1702659060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q9Vp9VuJFEi1cneieOWhI3g1TM8jF84Tbwg32b2RLbw=; b=qlMrUuROMxN+SefzcdTOKiANJLBp2b9UxSgvbwXMyFojQR62p5WxQE6ulmGty0AD59Zd+/ IdeM7QOJ3Usr9RXJ9cwZNucafmycJN53LZRKBHz1rn/76RErP+SfnK4EvgEvLrOh2L/6iZ 5vyuvyzHSZ2ZDtFMdu8LS3GzPEqp51lvKM+CZ/LnlBkseqglJdM1N6OmW6R7UUtZJN9dpf N2LE9iTcyishZMDtlV6cUIGYzL7cNJ8pQuxq2xPV4bq+K/4U1bFuS9bth7xJ8i/lLvZXYi iUL/JYSXGmXjRD4Xia8LkQ/0+yRIrsUvv/PB3rMgNivrw35oHOFCjR3CrphmJg== 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 4SsFbS3Prtz3yv; Fri, 15 Dec 2023 16:51: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 3BFGp0G3011925; Fri, 15 Dec 2023 16:51:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFGp0vg011922; Fri, 15 Dec 2023 16:51:00 GMT (envelope-from git) Date: Fri, 15 Dec 2023 16:51:00 GMT Message-Id: <202312151651.3BFGp0vg011922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 40754cd21e70 - stable/14 - lockf: add some tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 40754cd21e70b35341f4f3f9a2d09008fe370f9d Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=40754cd21e70b35341f4f3f9a2d09008fe370f9d commit 40754cd21e70b35341f4f3f9a2d09008fe370f9d Author: Kyle Evans AuthorDate: 2023-11-22 05:09:11 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:58:25 +0000 lockf: add some tests Provide basic coverage for the existing options, nothing deeper (e.g., pipe closing behavior) is tested in this set. Reviewed by: allanjude Feedback from: des Sponsored by: Klara, Inc. (cherry picked from commit 296a5a4db1fc8203f5f6aa8f68321e6ab4652b56) --- etc/mtree/BSD.tests.dist | 2 + usr.bin/lockf/Makefile | 5 ++ usr.bin/lockf/tests/Makefile | 6 ++ usr.bin/lockf/tests/lockf_test.sh | 148 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 161 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 04dc24d772c8..613da00e277d 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1081,6 +1081,8 @@ .. locale .. + lockf + .. m4 .. mkimg diff --git a/usr.bin/lockf/Makefile b/usr.bin/lockf/Makefile index d1905a4510ba..b7d916f20d13 100644 --- a/usr.bin/lockf/Makefile +++ b/usr.bin/lockf/Makefile @@ -1,4 +1,9 @@ +.include + PROG= lockf +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/usr.bin/lockf/tests/Makefile b/usr.bin/lockf/tests/Makefile new file mode 100644 index 000000000000..88a936cc583d --- /dev/null +++ b/usr.bin/lockf/tests/Makefile @@ -0,0 +1,6 @@ + +PACKAGE= tests + +ATF_TESTS_SH+= lockf_test + +.include diff --git a/usr.bin/lockf/tests/lockf_test.sh b/usr.bin/lockf/tests/lockf_test.sh new file mode 100644 index 000000000000..8696ab82a996 --- /dev/null +++ b/usr.bin/lockf/tests/lockf_test.sh @@ -0,0 +1,148 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Klara, Inc. +# +# 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. +# + +# sysexits(3) +: ${EX_USAGE:=64} +: ${EX_UNAVAILABLE:=69} +: ${EX_CANTCREAT:=73} +: ${EX_TEMPFAIL:=75} + +atf_test_case badargs +badargs_body() +{ + atf_check -s exit:${EX_USAGE} -e not-empty lockf + atf_check -s exit:${EX_USAGE} -e not-empty lockf "testlock" +} + +atf_test_case basic +basic_body() +{ + # Something innocent so that it does eventually go away without our + # intervention. + lockf "testlock" sleep 10 & + lpid=$! + + # Make sure that the lock exists... + atf_check test -e "testlock" + + # Attempt both verbose and silent re-lock + atf_check -s exit:${EX_TEMPFAIL} -e not-empty \ + lockf -t 0 "testlock" sleep 0 + atf_check -s exit:${EX_TEMPFAIL} -e empty \ + lockf -t 0 -s "testlock" sleep 0 + + # Make sure it cleans up after the initial sleep 10 is over. + wait "$lpid" + atf_check test ! -e "testlock" +} + +atf_test_case keep +keep_body() +{ + lockf -k "testlock" sleep 10 & + lpid=$! + + # Make sure that the lock exists now... + while ! test -e "testlock"; do + sleep 0.5 + done + + kill "$lpid" + wait "$lpid" + + # And it still exits after the lock has been relinquished. + atf_check test -e "testlock" +} + +atf_test_case needfile +needfile_body() +{ + # Hopefully the clock doesn't jump. + start=$(date +"%s") + + # Should fail if the lockfile does not yet exist. + atf_check -s exit:"${EX_UNAVAILABLE}" lockf -sn "testlock" sleep 30 + + # It's hard to guess how quickly we should have finished that; one would + # hope that it exits fast, but to be safe we specified a sleep 30 under + # lock so that we have a good margin below that duration that we can + # safely test to make sure we didn't actually execute the program, more + # or less. + now=$(date +"%s") + tpass=$((now - start)) + atf_check test "$tpass" -lt 10 +} + +atf_test_case timeout +timeout_body() +{ + lockf "testlock" sleep 30 & + lpid=$! + + while ! test -e "testlock"; do + sleep 0.5 + done + + start=$(date +"%s") + timeout=2 + atf_check -s exit:${EX_TEMPFAIL} lockf -st "$timeout" "testlock" sleep 0 + + # We should have taken no less than our timeout, at least. + now=$(date +"%s") + tpass=$((now - start)) + atf_check test "$tpass" -ge "$timeout" + + kill "$lpid" + wait "$lpid" || true +} + +atf_test_case wrlock +wrlock_head() +{ + atf_set "require.user" "unprivileged" +} +wrlock_body() +{ + touch "testlock" + chmod -w "testlock" + + # Demonstrate that we can lock the file normally, but -w fails if we + # can't write. + atf_check lockf -kt 0 "testlock" sleep 0 + atf_check -s exit:${EX_CANTCREAT} -e not-empty \ + lockf -wt 0 "testlock" sleep 0 +} + +atf_init_test_cases() +{ + atf_add_test_case badargs + atf_add_test_case basic + atf_add_test_case keep + atf_add_test_case needfile + atf_add_test_case timeout + atf_add_test_case wrlock +} From nobody Fri Dec 15 16:51:01 2023 X-Original-To: dev-commits-src-all@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 4SsFbT6NCMz53nkG; Fri, 15 Dec 2023 16:51: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 4SsFbT5YsWz4bLr; Fri, 15 Dec 2023 16: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=1702659061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hK/UppTGtDCUt4p6JFindeNhjjH2gh7ox1l1kBllNG8=; b=sVdyA65BfM5s20kqBJgdQI/pk/DlsiXEJsQYj9Uy6S4d6g+Ss51l/N3E0WWEEd4fbmQ86X jZHXdKUDPue+Dx+MgKbpz6yS/vHrKYmZ0mf5io6g8MCr0FCseV6OWJbptTA/Smq9EAKIYP ItGoggYbWaTYF9Z/tLMb7v46j6khCiegw/8/h124idrXAkxSf1BAn2TLJPDi+eENtuGp+f 98eCFTAQeibSlYpk8LDyC8G+MHsD3sOw3ds5z23S0c9C1W+WH4rZuoWM99BBGissv8Avlz uxtQvuKETe6KyOG7x5F6W/tapbJ99k14wq0dzALceQQyD9d8Uvx+SFT/n/rP2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702659061; a=rsa-sha256; cv=none; b=nMxi9ZkwI7CipGakVJA/tQaTk2f7vsthUimIv+YU0KlF5Eg1XW6U1Pf1j/oa7H9hJNhXfB V+MY6/su6ao4ZKPuCqIQIicZ/esyyX8tTkZv+B/b/HruV8iza7gnQ2Ox7317MNW2gaehk9 tdUYb/t5qw5ysCJclvRHqvhoFeGuw41iggYfV3EGOF291PDwDFYh7eV5X0m+qYnuatrx3Q iWjUYFWkPXBJn2jqNpr/szYCsTd4FA+mTL/CbOGacnxONwm8b2uyQSykhfPOFPXcjHm/2E AnNLbu4RkG0FwNiWpdulhRXhauVBmw7U4u9PSv7chWusATtjG7HPLjkakcbP+g== 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=1702659061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hK/UppTGtDCUt4p6JFindeNhjjH2gh7ox1l1kBllNG8=; b=Q1koQ7Av6NZ5acxlskHNbUAXyyIrEWaciICZF53xVns4CcLKzxoKMJgxJk6JKFkNTPQZh9 oARl6T+2F1evGnIiYr0A8C2a6bWKXE/GFxgUibKJb8f2loRN/fjKyM/0CPSIdvCfIeVYK+ QhYqhplxDqyFBiqceqojGFBFfLeuVy5UfJpVwc2fxBqRcNfw6UymdK14du4jxzu0dhoH+a Bq7jHbP9B5fhtRtaoUZODg8iY8wVCf1a4yF4S2KEd+6rWtIKfZ4Z9WIQeWxqU8o6XNeiE2 6Qiot7f6aFDXlfaajmgeSN4JLv3MyxMxFyFr+vCNMK4kiWH/DM+AlPt8tTXinw== 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 4SsFbT4gWXz3yw; Fri, 15 Dec 2023 16: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 3BFGp16C011968; Fri, 15 Dec 2023 16: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 3BFGp19D011965; Fri, 15 Dec 2023 16:51:01 GMT (envelope-from git) Date: Fri, 15 Dec 2023 16:51:01 GMT Message-Id: <202312151651.3BFGp19D011965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 63b86eb6fa93 - stable/14 - lockf: allow locking file descriptors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 63b86eb6fa935ecf94b9a0f1842b56a223f151be Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=63b86eb6fa935ecf94b9a0f1842b56a223f151be commit 63b86eb6fa935ecf94b9a0f1842b56a223f151be Author: Kyle Evans AuthorDate: 2023-11-22 07:46:14 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:58:29 +0000 lockf: allow locking file descriptors This is most useful inside a shell script, allowing one to lock just portions of a script rather than having to wrap the entire script in a lock. PR: 262738 Reviewed by: 0mp, allanjude (both previous versions) Co-authored-by: Daniel O'Connor Sponsored by: Klara, Inc. (cherry picked from commit 09a7fe0a5523d53ff6c26ddef9a947f293e18c22) --- usr.bin/lockf/lockf.1 | 63 ++++++++++++++++++- usr.bin/lockf/lockf.c | 128 +++++++++++++++++++++++++++++++++----- usr.bin/lockf/tests/lockf_test.sh | 91 +++++++++++++++++++++++++++ 3 files changed, 266 insertions(+), 16 deletions(-) diff --git a/usr.bin/lockf/lockf.1 b/usr.bin/lockf/lockf.1 index 8120b2ed7630..d73033101632 100644 --- a/usr.bin/lockf/lockf.1 +++ b/usr.bin/lockf/lockf.1 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 26, 2020 +.Dd November 25, 2023 .Dt LOCKF 1 .Os .Sh NAME @@ -35,6 +35,10 @@ .Ar file .Ar command .Op Ar arguments +.Nm +.Op Fl s +.Op Fl t Ar seconds +.Ar fd .Sh DESCRIPTION The .Nm @@ -64,6 +68,27 @@ the mere existence of the .Ar file is not considered to constitute a lock. .Pp +.Nm +may also be used to operate on a file descriptor instead of a file. +If no +.Ar command +is supplied, then +.Ar fd +must be a file descriptor. +The version with a +.Ar command +may also be used with a file descriptor by supplying it as a path +.Pa /dev/fd/N , +where N is the desired file descriptor. +The +.Fl k +option is implied when a file descriptor is in use, and the +.Fl n +and +.Fl w +options are silently ignored. +This can be used to lock inside a shell script. +.Pp If the .Nm utility is being used to facilitate concurrency between a number @@ -186,6 +211,42 @@ $ lockf mylock sleep 1 & lockf -t 5 mylock echo "Success" Success [1]+ Done lockf mylock sleep 1 .Ed +Lock a file and run a script, return immediately if the lock is not +available. Do not delete the file afterward so lock order is +guaranteed. +.Pp +.Dl $ lockf -t 0 -k /tmp/my.lock myscript +.Pp +Protect a section of a shell script with a lock, wait up to 5 seconds +for it to become available. +Note that the shell script has opened the lock file +.Fa /tmp/my.lock , +and +.Nm +is performing the lock call exclusively via the passed in file descriptor (9). +In this case +.Fl k +is implied, and +.Fl w +has no effect because the file has already been opened by the shell. +This example assumes that +.Ql > +is implemented in the shell by opening and truncating +.Pa /tmp/my.lock , +rather than by replacing the lock file. +.Bd -literal -offset indent +( + lockf -s -t 5 9 + if [ $? -ne 0 ]; then + echo "Failed to obtain lock" + exit 1 + fi + + echo Start + # Do some stuff + echo End +) 9>/tmp/my.lock +.Ed .Sh SEE ALSO .Xr flock 2 , .Xr lockf 3 , diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index 620193cba1d7..db45f7a6b2e7 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -29,16 +29,26 @@ #include #include +#include #include #include #include +#include #include #include #include +#include #include #include -static int acquire_lock(const char *name, int flags, int silent); +#define FDLOCK_PREFIX "/dev/fd/" + +union lock_subject { + long subj_fd; + const char *subj_name; +}; + +static int acquire_lock(union lock_subject *subj, int flags, int silent); static void cleanup(void); static void killed(int sig); static void timeout(int sig); @@ -48,8 +58,34 @@ static void wait_for_lock(const char *name); static const char *lockname; static int lockfd = -1; static int keep; +static int fdlock; static volatile sig_atomic_t timed_out; +/* + * Check if fdlock is implied by the given `lockname`. We'll write the fd that + * is represented by it out to ofd, and the caller is expected to do any + * necessary validation on it. + */ +static int +fdlock_implied(const char *name, long *ofd) +{ + char *endp; + long fd; + + if (strncmp(name, FDLOCK_PREFIX, sizeof(FDLOCK_PREFIX) - 1) != 0) + return (0); + + /* Skip past the prefix. */ + name += sizeof(FDLOCK_PREFIX) - 1; + errno = 0; + fd = strtol(name, &endp, 10); + if (errno != 0 || *endp != '\0') + return (0); + + *ofd = fd; + return (1); +} + /* * Execute an arbitrary command while holding a file lock. */ @@ -58,6 +94,7 @@ main(int argc, char **argv) { int ch, flags, silent, status, waitsec; pid_t child; + union lock_subject subj; silent = keep = 0; flags = O_CREAT | O_RDONLY; @@ -89,11 +126,54 @@ main(int argc, char **argv) usage(); } } - if (argc - optind < 2) - usage(); - lockname = argv[optind++]; + argc -= optind; argv += optind; + + if (argc == 0) + usage(); + + lockname = argv[0]; + + argc--; + argv++; + + /* + * If there aren't any arguments left, then we must be in fdlock mode. + */ + if (argc == 0 && *lockname != '/') { + fdlock = 1; + subj.subj_fd = -1; + } else { + fdlock = fdlock_implied(lockname, &subj.subj_fd); + if (argc == 0 && !fdlock) { + fprintf(stderr, "Expected fd, got '%s'\n", lockname); + usage(); + } + } + + if (fdlock) { + if (subj.subj_fd < 0) { + char *endp; + + errno = 0; + subj.subj_fd = strtol(lockname, &endp, 10); + if (errno != 0 || *endp != '\0') { + fprintf(stderr, "Expected fd, got '%s'\n", + lockname); + usage(); + } + } + + if (subj.subj_fd < 0 || subj.subj_fd > INT_MAX) { + fprintf(stderr, "fd '%ld' out of range\n", + subj.subj_fd); + usage(); + } + } else { + subj.subj_name = lockname; + } + if (waitsec > 0) { /* Set up a timeout. */ struct sigaction act; @@ -125,13 +205,13 @@ main(int argc, char **argv) * avoiding the separate step of waiting for the lock. This * yields fairness and improved performance. */ - lockfd = acquire_lock(lockname, flags | O_NONBLOCK, silent); + lockfd = acquire_lock(&subj, flags | O_NONBLOCK, silent); while (lockfd == -1 && !timed_out && waitsec != 0) { - if (keep) - lockfd = acquire_lock(lockname, flags, silent); + if (keep || fdlock) + lockfd = acquire_lock(&subj, flags, silent); else { wait_for_lock(lockname); - lockfd = acquire_lock(lockname, flags | O_NONBLOCK, + lockfd = acquire_lock(&subj, flags | O_NONBLOCK, silent); } } @@ -142,7 +222,15 @@ main(int argc, char **argv) exit(EX_TEMPFAIL); errx(EX_TEMPFAIL, "%s: already locked", lockname); } + /* At this point, we own the lock. */ + + /* Nothing else to do for FD lock, just exit */ + if (argc == 0) { + assert(fdlock); + return 0; + } + if (atexit(cleanup) == -1) err(EX_OSERR, "atexit failed"); if ((child = fork()) == -1) @@ -166,25 +254,34 @@ main(int argc, char **argv) } /* - * Try to acquire a lock on the given file, creating the file if + * Try to acquire a lock on the given file/fd, creating the file if * necessary. The flags argument is O_NONBLOCK or 0, depending on * whether we should wait for the lock. Returns an open file descriptor * on success, or -1 on failure. */ static int -acquire_lock(const char *name, int flags, int silent) +acquire_lock(union lock_subject *subj, int flags, int silent) { int fd; - if ((fd = open(name, O_EXLOCK|flags, 0666)) == -1) { + if (fdlock) { + assert(subj->subj_fd >= 0 && subj->subj_fd <= INT_MAX); + fd = (int)subj->subj_fd; + + if (flock(fd, LOCK_EX | LOCK_NB) == -1) { + if (errno == EAGAIN || errno == EINTR) + return (-1); + err(EX_CANTCREAT, "cannot lock fd %d", fd); + } + } else if ((fd = open(subj->subj_name, O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); else if (errno == ENOENT && (flags & O_CREAT) == 0) { if (!silent) - warn("%s", name); + warn("%s", subj->subj_name); exit(EX_UNAVAILABLE); } - err(EX_CANTCREAT, "cannot open %s", name); + err(EX_CANTCREAT, "cannot open %s", subj->subj_name); } return (fd); } @@ -196,7 +293,7 @@ static void cleanup(void) { - if (keep) + if (keep || fdlock) flock(lockfd, LOCK_UN); else unlink(lockname); @@ -231,7 +328,8 @@ usage(void) { fprintf(stderr, - "usage: lockf [-knsw] [-t seconds] file command [arguments]\n"); + "usage: lockf [-knsw] [-t seconds] file command [arguments]\n" + " lockf [-s] [-t seconds] fd\n"); exit(EX_USAGE); } diff --git a/usr.bin/lockf/tests/lockf_test.sh b/usr.bin/lockf/tests/lockf_test.sh index 8696ab82a996..cc6938d2306e 100644 --- a/usr.bin/lockf/tests/lockf_test.sh +++ b/usr.bin/lockf/tests/lockf_test.sh @@ -60,6 +60,96 @@ basic_body() atf_check test ! -e "testlock" } +atf_test_case fdlock +fdlock_body() +{ + # First, make sure we don't get a false positive -- existing uses with + # numeric filenames shouldn't switch to being fdlocks automatically. + atf_check lockf -k "9" sleep 0 + atf_check test -e "9" + rm "9" + + subexit_lockfail=1 + subexit_created=2 + subexit_lockok=3 + subexit_concurrent=4 + ( + lockf -s -t 0 9 + if [ $? -ne 0 ]; then + exit "$subexit_lockfail" + fi + + if [ -e "9" ]; then + exit "$subexit_created" + fi + ) 9> "testlock1" + rc=$? + + atf_check test "$rc" -eq 0 + + sub_delay=5 + + # But is it actually locking? Child 1 will acquire the lock and then + # signal that it's ok for the second child to try. The second child + # will try to acquire the lock and fail immediately, signal that it + # tried, then try again with an indefinite timeout. On that one, we'll + # just check how long we ended up waiting -- it should be at least + # $sub_delay. + ( + lockf -s -t 0 /dev/fd/9 + if [ $? -ne 0 ]; then + exit "$subexit_lockfail" + fi + + # Signal + touch ".lock_acquired" + + while [ ! -e ".lock_attempted" ]; do + sleep 0.5 + done + + sleep "$sub_delay" + + if [ -e ".lock_acquired_again" ]; then + exit "$subexit_concurrent" + fi + ) 9> "testlock2" & + lpid1=$! + + ( + while [ ! -e ".lock_acquired" ]; do + sleep 0.5 + done + + # Got the signal, try + lockf -s -t 0 9 + if [ $? -ne "${EX_TEMPFAIL}" ]; then + exit "$subexit_lockok" + fi + + touch ".lock_attempted" + start=$(date +"%s") + lockf -s 9 + touch ".lock_acquired_again" + now=$(date +"%s") + elapsed=$((now - start)) + + if [ "$elapsed" -lt "$sub_delay" ]; then + exit "$subexit_concurrent" + fi + ) 9> "testlock2" & + lpid2=$! + + wait "$lpid1" + status1=$? + + wait "$lpid2" + status2=$? + + atf_check test "$status1" -eq 0 + atf_check test "$status2" -eq 0 +} + atf_test_case keep keep_body() { @@ -141,6 +231,7 @@ atf_init_test_cases() { atf_add_test_case badargs atf_add_test_case basic + atf_add_test_case fdlock atf_add_test_case keep atf_add_test_case needfile atf_add_test_case timeout From nobody Fri Dec 15 16:51:02 2023 X-Original-To: dev-commits-src-all@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 4SsFbW1Krvz53ngw; Fri, 15 Dec 2023 16:51: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 4SsFbV6Td6z4bQb; Fri, 15 Dec 2023 16:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702659062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uM5z6tyATejL+ZIjsR0uxSI5xmB4QrCYuVvN46+0k/U=; b=ffCjp2fSKsoE4jW1rHntxPZY7UvvnlZq56erBtlRM7txxTJ3dlCveSIcRMylYgRXF+2lW8 rPWY3PGe39jukQo5tPR432vBynn1XbgP54F7LMXthdVSAsQ9dmG44Zj7IdYlvQBDdVro4/ LYNEB0MQlM0u2+3gajlEmIYcDgwIAYvMYCMP8tms9kFv4q8VyKCYWTg768u17Hft3vD6Yn aVtEDb0Ow/BWdiO+kby+m9he6FcVvjfR8PI4IU+2doV2BVCqwFJ+GUukQvVo66tEzAGz5r LMWbntWFPhq45fTWHdfUfqXw2rYaIykByraUkb+y+o35rxsOrj0Ik/HlbyTL9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702659062; a=rsa-sha256; cv=none; b=NpL6XDTdS6hwT/1DVtxqpIfEbLC/tY24aXoRAfg8d7rrNxNU7aBcGO/bJGg3R5bBDXrSKW G0pjaRA6PD/v2pUfI0ACtlUnBPNZLwSn7L4Vt5d/SuxKwFo8WkuUtY4mHHws0pTxPOatMX X5MdL2nSpMTQvSgdPKp9rXwyNFAqzzkWcdWyN5bw/8rI50J4AAoHtMjSuN9EjR36u9EWnU z/5xCEDXWx6gtMPmu0vIt2I02OWgDXEjylo9U66aIkGqal+m34T5wRnTf+rhxs6V25WQ1M +JRNS1RIYDDFK7wIug1yRXp+0Wq6iToMDCh5GkNKeYWJNTNyxOyB+4ELUtwVQw== 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=1702659062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uM5z6tyATejL+ZIjsR0uxSI5xmB4QrCYuVvN46+0k/U=; b=e/7pObT6CWm1FAEenGhN0YaPGZ38MGC2zmNo36XI7XkitOzVdVLWeaEYdu6xwx8OyLAUh+ GKxEXsZLWgLvL3AJ4tibFWRVGTlK/tv0/iBpLtynmimFnDHLKXfE3716R1wI9K4II3c3q7 7kdYNaOsNj2pGzbs5GFRsrpSp4sYvtG8NTo4YuN8Vn07g2jSymVNjrfxI7vbaC3zJT8XfR qmDkOjKCqETK3kPDY1zWbVmPrYsllRtUf7t6kJzMtOtLpKfW2ay92Ucp/HDmYBcZndu+ZK 2AIlFElVQxoMdV6d2QIN45FVWck7cWbgzpb7qFyzqvPxJjUfE2IMJohfPQPiig== 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 4SsFbV5RPDz3by; Fri, 15 Dec 2023 16:51: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 3BFGp2u2012016; Fri, 15 Dec 2023 16:51:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFGp2AU012013; Fri, 15 Dec 2023 16:51:02 GMT (envelope-from git) Date: Fri, 15 Dec 2023 16:51:02 GMT Message-Id: <202312151651.3BFGp2AU012013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 78e30818a06c - stable/14 - lockf: switch to strtonum() for parsing timeout List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 78e30818a06c0cb934637811c3339ea8da9ed16a Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=78e30818a06c0cb934637811c3339ea8da9ed16a commit 78e30818a06c0cb934637811c3339ea8da9ed16a Author: Kyle Evans AuthorDate: 2023-11-26 04:27:11 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:58:33 +0000 lockf: switch to strtonum() for parsing timeout Convert waitsec to a long long to be able to hold the full domain of alarm(3) timeout on all platforms, and let strtonum(3) handle the input validation. strtonum(3) also happens to provide a neater interface for error handling, and it already includes our pre-existing empty input check. Sponsored by: Klara, Inc. (cherry picked from commit e4967d4d48b0a7d873e4f778c0a6e560e09d4dc3) --- usr.bin/lockf/lockf.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index db45f7a6b2e7..dd02bf2a5417 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -92,7 +92,8 @@ fdlock_implied(const char *name, long *ofd) int main(int argc, char **argv) { - int ch, flags, silent, status, waitsec; + int ch, flags, silent, status; + long long waitsec; pid_t child; union lock_subject subj; @@ -112,9 +113,10 @@ main(int argc, char **argv) break; case 't': { - char *endptr; - waitsec = strtol(optarg, &endptr, 0); - if (*optarg == '\0' || *endptr != '\0' || waitsec < 0) + const char *errstr; + + waitsec = strtonum(optarg, 0, UINT_MAX, &errstr); + if (errstr != NULL) errx(EX_USAGE, "invalid timeout \"%s\"", optarg); } @@ -181,7 +183,7 @@ main(int argc, char **argv) sigemptyset(&act.sa_mask); act.sa_flags = 0; /* Note that we do not set SA_RESTART. */ sigaction(SIGALRM, &act, NULL); - alarm(waitsec); + alarm((unsigned int)waitsec); } /* * If the "-k" option is not given, then we must not block when From nobody Fri Dec 15 16:51:03 2023 X-Original-To: dev-commits-src-all@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 4SsFbX2Lm6z53ngy; Fri, 15 Dec 2023 16:51: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 4SsFbX0Dsmz4bTH; Fri, 15 Dec 2023 16:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702659064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eqQ2jb1BzvCvS20pZXDyC7xl+wGuFSvtYoTHao7GPsk=; b=IBpR4j4B8ZoV4tAuyPy2YktaG36Y1S/+Digi0M2aIOX8JePIJxHGrvmROw3iO4ikS4v8gS CooyYb6RfQo24wVCGVMEgbgS+T5OAJ8M2Zsb6fAWESb/wXfF6WhPTzE5/YGHzEMIVbjZQK naWC+nTDpiBlvl1KVd0KyB/1vy4V5iDKwGtwWQTzHw59zG25luW2cgSX5TWNRPCCOgtSdv hkfb3u+4n0FcKfiFuRJWb4FZGeUgIUfXB/FQu2Kxeo/9O6u/dZichEKSy0UICP3837oSmk GwiwfSp/zRjnS2TImRXURFSpNMixfWbIpJHJbEbiurEHRY83SiT+AVwbBG9sqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702659064; a=rsa-sha256; cv=none; b=FGcdE2NA0liqIV+Kt/1+3FU7s7os3rqbfleeRTpaGpsQ7EBIDebOsLzrNXiHD832OzpISr H0TrH3rS3ouAo+5FuUq1ZTvxBRAlK7y3g0MZFmcVkGNkwZz0ZMiPJb3nw0wRdJHwvD13rN 9RC5pOOyg84t1UwdbDg9gFR+V8imGxsZLcSf/Jiezf1uSzRsfZjpVIfu9VjMfGUpykz8qe R8ZXKh1UVE9OxA3A3Tcl6SrzdAYmOpEPLMcDb/g1Qx7NhYqzNpM1kwxXz+A/+Z2+n2Q9TJ 8SO5ndtwEDQuvSxQW8zNoIhQ5qI1og+R/ciNIsvRkNuza/h4Ehp73/0X2W5GLw== 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=1702659064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eqQ2jb1BzvCvS20pZXDyC7xl+wGuFSvtYoTHao7GPsk=; b=cg4Pd/89bJM4Ahe8BSxZwHvtqLOR3vWu7pA1NQYaJAE/3EA4rjEoZQDTROBaEdVDNHcnQI FSwSk4aLNX+jDkqss3JNVdIFcyLRB5SC06aji/wUhZnx6KQxWTf9eK/QBWtq8qIavyy7CU rX5JbqL41pxmkYlZMdrZQjh3NdrkwKaPCBorOLGp/YgcpbLabs9ptFjJ5tGjtVt/sWno4p QxirESkO3HnzXYBwQxk9OdMAsvU7mv68jbvXeNtqaUYSWg5Ei0OOuxWtffgtTCHi47C3XQ 9opxZtxN1o3nuGQVq0aL6Z7vwrGvC5KIQ0gpSy4LDTTDhewsdNuocrA3LSv12Q== 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 4SsFbW6SXyz42W; Fri, 15 Dec 2023 16:51: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 3BFGp3Yx012069; Fri, 15 Dec 2023 16:51:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFGp36x012066; Fri, 15 Dec 2023 16:51:03 GMT (envelope-from git) Date: Fri, 15 Dec 2023 16:51:03 GMT Message-Id: <202312151651.3BFGp36x012066@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 2ef9079ece5a - stable/14 - rtld: add a test for RTLD_DEEPBIND List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ef9079ece5a97aba7a288040fea805d8599a6f4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=2ef9079ece5a97aba7a288040fea805d8599a6f4 commit 2ef9079ece5a97aba7a288040fea805d8599a6f4 Author: Kyle Evans AuthorDate: 2023-12-01 01:26:09 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:58:36 +0000 rtld: add a test for RTLD_DEEPBIND This tests that with RTLD_DEEPBIND, symbols are looked up in all of the object's needed objects before the global object. PR: 275393 Reviewed by: kib Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. (cherry picked from commit d9c543b6b0cabea6e6679d70b4e701018e7eab80) --- etc/mtree/BSD.tests.dist | 2 + libexec/rtld-elf/tests/Makefile | 5 +- libexec/rtld-elf/tests/Makefile.inc | 3 + libexec/rtld-elf/tests/libdeep/Makefile | 15 +++++ libexec/rtld-elf/tests/libdeep/libdeep.c | 28 ++++++++++ libexec/rtld-elf/tests/libval/Makefile | 10 ++++ libexec/rtld-elf/tests/libval/libval.c | 26 +++++++++ libexec/rtld-elf/tests/libval2/Makefile | 8 +++ libexec/rtld-elf/tests/rtld_deepbind/Makefile | 10 ++++ .../rtld-elf/tests/rtld_deepbind/rtld_deepbind.c | 65 ++++++++++++++++++++++ libexec/rtld-elf/tests/target/Makefile | 2 +- 11 files changed, 172 insertions(+), 2 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 613da00e277d..c7a8a4ee27dc 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -436,6 +436,8 @@ rc .. rtld-elf + rtld_deepbind + .. .. tftpd .. diff --git a/libexec/rtld-elf/tests/Makefile b/libexec/rtld-elf/tests/Makefile index 7eacfb899699..06e143a441a1 100644 --- a/libexec/rtld-elf/tests/Makefile +++ b/libexec/rtld-elf/tests/Makefile @@ -1,6 +1,9 @@ -SUBDIR+= libpythagoras target +SUBDIR+= libpythagoras libdeep libval libval2 target +TESTS_SUBDIRS+= rtld_deepbind +SUBDIR_DEPEND_libdeep= libval2 +SUBDIR_DEPEND_rtld_deepbind= libval SUBDIR_DEPEND_target= libpythagoras ATF_TESTS_C= ld_library_pathfds diff --git a/libexec/rtld-elf/tests/Makefile.inc b/libexec/rtld-elf/tests/Makefile.inc new file mode 100644 index 000000000000..dfba72a51ce7 --- /dev/null +++ b/libexec/rtld-elf/tests/Makefile.inc @@ -0,0 +1,3 @@ + +PACKAGE?= tests +TESTSDIR?= ${TESTSBASE}/libexec/rtld-elf diff --git a/libexec/rtld-elf/tests/libdeep/Makefile b/libexec/rtld-elf/tests/libdeep/Makefile new file mode 100644 index 000000000000..9324b6f25efe --- /dev/null +++ b/libexec/rtld-elf/tests/libdeep/Makefile @@ -0,0 +1,15 @@ + +SHLIB?= deep +SHLIB_MAJOR= 0 + +LIBDIR= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind +SHLIBDIR= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind + +SRCS= libdeep.c + +LIBVAL2= ${.OBJDIR}/../libval2 +LDFLAGS+= -L${LIBVAL2} -Wl,-rpath,'$$ORIGIN' +DPADD+= -lval2 +LDADD+= -lval2 + +.include diff --git a/libexec/rtld-elf/tests/libdeep/libdeep.c b/libexec/rtld-elf/tests/libdeep/libdeep.c new file mode 100644 index 000000000000..e570769300cf --- /dev/null +++ b/libexec/rtld-elf/tests/libdeep/libdeep.c @@ -0,0 +1,28 @@ +/*- + * + * Copyright (C) 2023 NetApp, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +#include + +int get_value(void); +int proxy_get_value(void); +void set_value(int); +void proxy_set_value(int); + +int +proxy_get_value(void) +{ + + return (get_value()); +} + +void +proxy_set_value(int val) +{ + + return (set_value(val)); +} diff --git a/libexec/rtld-elf/tests/libval/Makefile b/libexec/rtld-elf/tests/libval/Makefile new file mode 100644 index 000000000000..66728c01dc9b --- /dev/null +++ b/libexec/rtld-elf/tests/libval/Makefile @@ -0,0 +1,10 @@ + +SHLIB?= val +SHLIB_MAJOR= 0 + +LIBDIR= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind +SHLIBDIR= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind + +SRCS= libval.c + +.include diff --git a/libexec/rtld-elf/tests/libval/libval.c b/libexec/rtld-elf/tests/libval/libval.c new file mode 100644 index 000000000000..97c97a0310a7 --- /dev/null +++ b/libexec/rtld-elf/tests/libval/libval.c @@ -0,0 +1,26 @@ +/*- + * + * Copyright (C) 2023 NetApp, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +static int val; + +int get_value(void); +void set_value(int); + +int +get_value(void) +{ + + return (val); +} + +void +set_value(int nval) +{ + + val = nval; +} diff --git a/libexec/rtld-elf/tests/libval2/Makefile b/libexec/rtld-elf/tests/libval2/Makefile new file mode 100644 index 000000000000..2b5cf5342092 --- /dev/null +++ b/libexec/rtld-elf/tests/libval2/Makefile @@ -0,0 +1,8 @@ + +LIBVAL= ${.CURDIR}/../libval + +# Just rebuild libval +.PATH: ${LIBVAL:tA} +SHLIB?= val2 + +.include "${LIBVAL}/Makefile" diff --git a/libexec/rtld-elf/tests/rtld_deepbind/Makefile b/libexec/rtld-elf/tests/rtld_deepbind/Makefile new file mode 100644 index 000000000000..bcc55d945c7e --- /dev/null +++ b/libexec/rtld-elf/tests/rtld_deepbind/Makefile @@ -0,0 +1,10 @@ + +TESTSDIR?= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind +ATF_TESTS_C= rtld_deepbind + +LIBVAL= ${.OBJDIR}/../libval +LDFLAGS.rtld_deepbind+= -L${LIBVAL} -Wl,-rpath,'$$ORIGIN' +DPADD+= -lval +LDADD+= -lval + +.include diff --git a/libexec/rtld-elf/tests/rtld_deepbind/rtld_deepbind.c b/libexec/rtld-elf/tests/rtld_deepbind/rtld_deepbind.c new file mode 100644 index 000000000000..4fe3c185982a --- /dev/null +++ b/libexec/rtld-elf/tests/rtld_deepbind/rtld_deepbind.c @@ -0,0 +1,65 @@ +/*- + * + * Copyright (C) 2023 NetApp, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +#include + +#include + +int get_value(void); +void set_value(int); + +#define APP_VALUE 5 +#define LIB_VALUE 20 + +ATF_TC_WITHOUT_HEAD(deepbind_simple); +ATF_TC_BODY(deepbind_simple, tc) +{ + void *hdl; + void (*proxy_set_value)(int); + int (*proxy_get_value)(void); + int app_value, lib_value; + + set_value(APP_VALUE); + + /* + * libdeep has a dependency on libval2.so, which is a rebuild of + * libval.so that provides get_value() and set_value() for both us and + * the lib. The lib's get_value() and set_value() should bind to the + * versions in libval2 instead of libval with RTLD_DEEPBIND. + */ + hdl = dlopen("$ORIGIN/libdeep.so", RTLD_LAZY | RTLD_DEEPBIND); + ATF_REQUIRE(hdl != NULL); + + proxy_set_value = dlsym(hdl, "proxy_set_value"); + ATF_REQUIRE(proxy_set_value != NULL); + + proxy_get_value = dlsym(hdl, "proxy_get_value"); + ATF_REQUIRE(proxy_get_value != NULL); + + (*proxy_set_value)(LIB_VALUE); + + lib_value = (*proxy_get_value)(); + app_value = get_value(); + + /* + * In the initial implementation or if libdeep.so is *not* linked + * against its own libval2, then these both return the later set + * LIB_VALUE (20) as they bind to the symbol provided by libval and + * use its .bss val. + */ + ATF_REQUIRE_INTEQ(lib_value, LIB_VALUE); + ATF_REQUIRE_INTEQ(app_value, APP_VALUE); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, deepbind_simple); + + return atf_no_error(); +} diff --git a/libexec/rtld-elf/tests/target/Makefile b/libexec/rtld-elf/tests/target/Makefile index f63d8072ae3c..aa4875b6748d 100644 --- a/libexec/rtld-elf/tests/target/Makefile +++ b/libexec/rtld-elf/tests/target/Makefile @@ -2,7 +2,7 @@ .include PROG= target -BINDIR= ${TESTSBASE}/libexec/rtld-elf +BINDIR= ${TESTSDIR} WARNS?= 3 CFLAGS+= -I${.CURDIR}/../libpythagoras From nobody Fri Dec 15 18:10:56 2023 X-Original-To: dev-commits-src-all@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 4SsHMj1YXsz53t4r; Fri, 15 Dec 2023 18:10: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 4SsHMj10Sbz3GWZ; Fri, 15 Dec 2023 18:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702663857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BfChbn5n3iw0mm7vRdcv1q1rJtCLthD2dqPGVJSHmLU=; b=dCl1WAxAGNEniVhYPsolXx22qe8CixEirrlv1v6SDFES1Dej8/0xIm+6y15ZGPcwxIj54c n6jx8g3U0F5inEQW3X8seGi8W6TV/79wsh8vN5+TW3SuDeIzoFo7Z8XupzYKgvtAczVr3E ivFcrzx2YC1wdBzOISXWun8Ja5+3Gp3AErF/aefdDIfONT1+YeM00Cr+bQcPMvra8cWaKt /nzCkyL0F3uZHBsiYF0e2s2joMxE4AJNbH4nUnebYrcrT4tUW93aNTWQLW556rwIY7p4yi PHhw60bX4g/0IV8r/Jy0HIq7oEytc95vm5aB+8K5nnLaPvdzZ7mgWO66GCNQbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702663857; a=rsa-sha256; cv=none; b=DxlxARJj2ra/nHROllhU8C8Tu3xpy5pgqRXME1/zvnU7EB3Iu2QVn9irqn0aTpP1jIEY2P ika7QcPfITDceDuGHdYVbwJPnDH9+DrtIZM45H1oUkyUrwQNN8pznXzuGaJuDS92l8Bo0d KaG1TJ9by1F9a2i3ylgQS3B11SiXbgHOoSsKBUzznBQEGzpEoYuf7tArMFjE+KEoGtIffB EjCFiv6BfysSkOYVgvSNtiXfc5Vl08+j14v6gJ07sM6jRM4C/peyW+rCVYrlf3i+QKhZmI RWq9QWDPfDRG3QkzxtHqDEZNOrs7FLnkQIlz+mVKMOEAdL1AlgdmlBOVaTO9uQ== 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=1702663857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BfChbn5n3iw0mm7vRdcv1q1rJtCLthD2dqPGVJSHmLU=; b=UyQGqnnE1ItUQF4j9POkOVOhwVzZ30ZRB9Mllwe/So8r+HtshtQH5xSBd1W44TcgVaJ4L8 WQgM6O9Om4ogzhz2KGSwuWvJIUiF0sSM4T1IWdAiqEMZxQqv0ypSqK/mToF/AjOH24H1aK GLf1ZwteMFdN7+jetp9AD3gyNyi3F5IfVPAgESL5vQW+GWzhcOay2xqU6znm1FCSPXm3aL IGpIeY1HAbJpmRSpIZNr/Ezp4cKvpbHqoyAdB6xcGzadbMHbrvqbQ2lLDoLCfb1DlCNo8h Scrr5Tf0sIFw/bmMv9RKO2JhcFwBuxI/gVr69L6yaPxG+v7LwFWKlw/22rZDZw== 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 4SsHMh740sz5dX; Fri, 15 Dec 2023 18:10: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 3BFIAuDC043967; Fri, 15 Dec 2023 18:10:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIAurY043964; Fri, 15 Dec 2023 18:10:56 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:10:56 GMT Message-Id: <202312151810.3BFIAurY043964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 863975b6840b - main - release/Makefile.vm: Add cloudware overrides List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 863975b6840b2833b0f772648ba2532806ffece8 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=863975b6840b2833b0f772648ba2532806ffece8 commit 863975b6840b2833b0f772648ba2532806ffece8 Author: Brad Davis AuthorDate: 2023-12-15 18:08:50 +0000 Commit: Colin Percival CommitDate: 2023-12-15 18:08:50 +0000 release/Makefile.vm: Add cloudware overrides Allow the cloudware *_FLAVOURS and *_FSLIST values to be overridden at the command line, to assist users who want to e.g. build only one of the many EC2 AMIs available. --- release/Makefile.vm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 58703de16cf3..cab46bb737b3 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -23,28 +23,28 @@ CLOUDWARE_TYPES?= BASIC-CI \ OCI \ VAGRANT AZURE_FORMAT= vhdf -AZURE_FSLIST= ufs zfs +AZURE_FSLIST?= ufs zfs AZURE_DESC= Microsoft Azure platform image BASIC-CI_FORMAT= raw -BASIC-CI_FSLIST= ufs +BASIC-CI_FSLIST?= ufs BASIC-CI_DESC= Image for CI EC2_FORMAT= raw -EC2_FSLIST= ufs zfs -EC2_FLAVOURS= BASE CLOUD-INIT +EC2_FSLIST?= ufs zfs +EC2_FLAVOURS?= BASE CLOUD-INIT EC2-BASE_DESC= Amazon EC2 image EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image GCE_FORMAT= raw -GCE_FSLIST= ufs zfs +GCE_FSLIST?= ufs zfs GCE_DESC= Google Compute Engine image OCI_FORMAT= qcow2 -OCI_FSLIST= ufs +OCI_FSLIST?= ufs OCI_DESC= Oracle Cloud Infrastructure image OPENSTACK_FORMAT=qcow2 -OPENSTACK_FSLIST= ufs +OPENSTACK_FSLIST?= ufs OPENSTACK_DESC= OpenStack platform image VAGRANT_FORMAT= vmdk -VAGRANT_FSLIST= ufs -VAGRANT_FLAVOURS= VIRTUALBOX VMWARE +VAGRANT_FSLIST?= ufs +VAGRANT_FLAVOURS?= VIRTUALBOX VMWARE VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox VAGRANT-VMWARE_DESC= Vagrant Image for VMWare From nobody Fri Dec 15 18:57:23 2023 X-Original-To: dev-commits-src-all@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 4SsJPH6KJ1z53wWL; Fri, 15 Dec 2023 18:57: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 4SsJPH5Y6pz3Lmm; Fri, 15 Dec 2023 18:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzMyw+VoOw7aD4/AdMHHE6sADUSynKDlQc4f2WmCvMk=; b=W5aVpheRA8RdOV0IwJG0amgAkEqmppXGwB5tMTOrpQufQFAiKOD+XRpav2GrBzv1+idqqQ QIptQBHR8+60oo+YuexaZcNzjsjZjcVlHd9UNT5SHFKCauO/WRw0HyBpSSMgUFj5Eze7bB 8aBP/vp2u+CuXP6+kv1mPMY0cfkD5DO3duxe4esio0RU+CpAZwocYUtjbABEeKs47rHeXo Ai2akRzZhrkqKRWa963ZK9JIKmXDLbwlNNFiim5OSxphoc46gtTp9IH9z3NavtHHiGxIFz /PgHFwhYKXNtIh5lhe+7IU34lxb9WdU1idruQMAEDX9E2+wi0X8k1odCa6FfXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666643; a=rsa-sha256; cv=none; b=CERxTDgyOvkUMA1iDOBI1CxI+WYHrtyOaQv2dQeG7J/P/z8pQfqKgy53oqi2Qpvmc8o8W8 YvHBcli3LI4usIZ47l9fXGES5aGNHeJOjD4xT3HzI8lj9TQJ6WS/Hx5Qwq5lHreRrAK8nG mg+uwnQukZY8ftmLuG5J23rNb9qIv+qKzbFlOzHMszVhYGiDHvxlgb/AX+Ll5uKscwWXe2 ZrBTtmObe4c3e+K1dVo3lrHlEajcYILWqLF+UrIGhp2tNApMtUG5zmemYkZDX8O+NVbsTM 1t1acXSQH2ZomYZQJ1xxAsXLNVGGjfxSgcWlesvprXHUbekQrApGjZduL1zqgQ== 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=1702666643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzMyw+VoOw7aD4/AdMHHE6sADUSynKDlQc4f2WmCvMk=; b=q+nHTfP0g/YUE+nAijcIFRxXkccRxULANUlKjUf0rlzn4+PH/tpli2HuIQcUwNtA63Mkag mdhT5Fyap/+NOw3S1y4PlP2AotW3kqsw/rW5u+smOIs7EtPvD7L6vv99+QlI0nKMkM0hSK RJk2YdPhmnTUjli2/vnGie4a2Mh+tXMwTLqf/a1R/cDxhrrl5HoXHNP+dAs2Lrl3bDSy2b Xv9Tc9S5joMgE+y39ErgF+1cH5z+ag4biuArNjx8O6AyYuslhIZMQLcMeNefixs7NU9puv GEYLwTRfDk6xM2g4SaKns1BdRD23AW3uHVyT1m/RJ8B+2e5A1vEum6TWPMh8LQ== 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 4SsJPH4bdnz7bf; Fri, 15 Dec 2023 18:57: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 3BFIvNc6018011; Fri, 15 Dec 2023 18:57:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvNjg018008; Fri, 15 Dec 2023 18:57:23 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:23 GMT Message-Id: <202312151857.3BFIvNjg018008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 6bfba6097429 - stable/13 - localedef: correct definition of right-parenthesis in default charmap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6bfba6097429c7d3b5048780b8c43d3989860b01 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6bfba6097429c7d3b5048780b8c43d3989860b01 commit 6bfba6097429c7d3b5048780b8c43d3989860b01 Author: Kyle Evans AuthorDate: 2023-09-02 05:56:31 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:58:54 +0000 localedef: correct definition of right-parenthesis in default charmap It turns out that right parentheses do exist and are different than left parentheses, so let's switch to that. Sponsored by: Klara, Inc. (cherry picked from commit 07bc20e4740d09f554c3787bb1940fc503300822) --- usr.bin/localedef/charmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/localedef/charmap.c b/usr.bin/localedef/charmap.c index bc302965de1a..44b7e3292eae 100644 --- a/usr.bin/localedef/charmap.c +++ b/usr.bin/localedef/charmap.c @@ -86,7 +86,7 @@ static const struct { { "ampersand", '&' }, { "apostrophe", '\'' }, { "left-parenthesis", '(' }, - { "right-parenthesis", '(' }, + { "right-parenthesis", ')' }, { "asterisk", '*' }, { "plus-sign", '+' }, { "comma", ','}, From nobody Fri Dec 15 18:57:24 2023 X-Original-To: dev-commits-src-all@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 4SsJPJ6qcbz53wPl; Fri, 15 Dec 2023 18:57: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 4SsJPJ6JYGz3Lfp; Fri, 15 Dec 2023 18:57:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i2njDVBY9JDsZPU03VLlWSHWD0urJRrnWuXvwsxZ3iw=; b=KGzdU8mvK9+o0JqWxwd6cUINx57KCVx4bcIEEZ6zVzBFGIikzqVPkKr6JDyF5wro299BT1 dHU4++X+l/iZKErsP1bSsbpUwZVkkla/KdZvGgYZvMWolpj7u47EsKUk94tHZSSi2wM8Kc GOIeRs/IxhS5x8pErsBRMMvnzWHhaYwm/bvapjDFPMz/NAVe0+JNln1wT5ws85qIiAmKf0 KyW83mxc3j/n0bjK4ijDxDlw+l8Zi9yn2s7X4qlEYVI912vqvkIWNrXc82DihVHpmyFPnJ ivgRTTLB2KVr4hZ8saFJMklwPYyXqAR9LtY9zBTsa2xz0bg9ZXggar0ccq2mmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666644; a=rsa-sha256; cv=none; b=MxRI11RC9duwffUyh/wBOouTNWBkued9o84o/Yu10GFAtk03ocJ8iOkwNsgyRzBd5n7Puc alQ7afn80L0n9PEvMUPxQjMcmyN6tMg870zQSKFG6bAODRBuSlw2XwRqWhhwKZcmn8pwSN GkpiZzRPOee9JFYcHC940VIHnBvDZ3TIr1irjshFf893RvQu467S9RTk8kisIiyln1tB8N oNWYcHgezHdZCkZee4tjp/MSJf9eEQtsqRIWXc0Ng9aEBs6ye9QHTPFMXLdx8KIocyiBeG yiaFeG/m5S1VH9ltF/Sgk6CXKCp0tmyGEX1Q2gSJ7unuHiAWeccdnvTV1Do4HA== 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=1702666644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i2njDVBY9JDsZPU03VLlWSHWD0urJRrnWuXvwsxZ3iw=; b=H8MXyzBzxJqcXY3zYhFJKOX04Z82w4zSipKqoXry/7pVlWFGO7SnXz4yTqyjGgl0zApV1x 61OvuVqCMN81nDoEMZYNWk3cC+iQxD/UB6cjcDDK1+enVmqRJ+yL6JCPk+jEQqqdXs+uCr QswB3IQaLYVna33UPeagy4FHSR1bErT4/OX2JaxIvg5IOPjtJ3nGbR5Su/4vc7dDG+l//9 LRT8DyMBHputXeA0NM+AFWIkOq4e1OajsbWKcSZKvKCpQQN2fIO9on80qOr2ubtSyQ1Dc+ 2utavG7KiWAiXcVvbtp8zs58VI8JKXoAruZWVA/9yAonwh1B3s5ZOfgP9LHl8Q== 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 4SsJPJ5Npbz6rW; Fri, 15 Dec 2023 18:57: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 3BFIvOh1018058; Fri, 15 Dec 2023 18:57:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvOtf018055; Fri, 15 Dec 2023 18:57:24 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:24 GMT Message-Id: <202312151857.3BFIvOtf018055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 03fe51fb88df - stable/13 - localedef: expand the default charmap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 03fe51fb88df70d54cfb597888a75d05e578782b Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=03fe51fb88df70d54cfb597888a75d05e578782b commit 03fe51fb88df70d54cfb597888a75d05e578782b Author: Kyle Evans AuthorDate: 2023-09-02 06:13:02 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:59:01 +0000 localedef: expand the default charmap POSIX defines a number of other control characters as well as alternative aliases for some that should be provided in the default set, so let's go ahead and add those. Reviewed by: bapt, yuripv Sponsored by: Klara, Inc. (cherry picked from commit 3a7ffe206ce7e4741fae26432f6d6e5159207f45) --- usr.bin/localedef/charmap.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/usr.bin/localedef/charmap.c b/usr.bin/localedef/charmap.c index 44b7e3292eae..1da4d8921ecb 100644 --- a/usr.bin/localedef/charmap.c +++ b/usr.bin/localedef/charmap.c @@ -70,13 +70,49 @@ static const struct { int ch; } portable_chars[] = { { "NUL", '\0' }, + { "SOH", '\x01' }, + { "STX", '\x02' }, + { "ETX", '\x03' }, + { "EOT", '\x04' }, + { "ENQ", '\x05' }, + { "ACK", '\x06' }, + { "BEL", '\a' }, { "alert", '\a' }, + { "BS", '\b' }, { "backspace", '\b' }, + { "HT", '\t' }, { "tab", '\t' }, - { "carriage-return", '\r' }, + { "LF", '\n' }, { "newline", '\n' }, + { "VT", '\v' }, { "vertical-tab", '\v' }, + { "FF", '\f' }, { "form-feed", '\f' }, + { "CR", '\r' }, + { "carriage-return", '\r' }, + { "SO", '\x0e' }, + { "SI", '\x0f' }, + { "DLE", '\x10' }, + { "DC1", '\x11' }, + { "DC2", '\x12' }, + { "DC3", '\x13' }, + { "DC4", '\x14' }, + { "NAK", '\x15' }, + { "SYN", '\x16' }, + { "ETB", '\x17' }, + { "CAN", '\x18' }, + { "EM", '\x19' }, + { "SUB", '\x1a' }, + { "ESC", '\x1b' }, + { "FS", '\x1c' }, + { "IS4", '\x1c' }, + { "GS", '\x1d' }, + { "IS3", '\x1d' }, + { "RS", '\x1e' }, + { "IS2", '\x1e' }, + { "US", '\x1f' }, + { "IS1", '\x1f' }, + { "DEL", '\x7f' }, { "space", ' ' }, { "exclamation-mark", '!' }, { "quotation-mark", '"' }, From nobody Fri Dec 15 18:57:25 2023 X-Original-To: dev-commits-src-all@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 4SsJPL0rJjz53wvZ; Fri, 15 Dec 2023 18:57: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 4SsJPK73Pvz3Lcw; Fri, 15 Dec 2023 18:57:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oNG6lH9IN9ZS2BRVglFDADEEj7iH5anvomqXErWEcNk=; b=V5yqr/fSS7INGYBhl09gVkDVZhaTVUSvMRhM9XwtGmYfwJCosiCCqyFDglbWWqAeqohJZM WIPGS5XStbKTM0ZMn1jA7zg07pvfmdRe3Oz8azGQCV9A4rMLpbQ3xH6OMYjiILO6TReQZq kOFb+tpzpv/pbaOQij8DXPjJobxdNKkT73dSlgaGr87Nt3e14h7k6dj5qmlSF5a9NQIadh /upstGx2AvnuknhoRG7fePAKtj12kl/pDwnuwCQSHQesOt5giXsk5ED9BTE4G6y5crBdPk V48eX0U5Q/GK05R1tDgoqBhEGb9fb87TvVGxAZvIAkf9koX+LdGcHFJRfNkrxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666646; a=rsa-sha256; cv=none; b=YY9ieoVXxttg6NNSk6MfUzr6kGuE2wU2u714MH9Ep5zIQTOcTytxDyj4m1kDiE4L5Jt5gg svss6BzjW6WrFvqB3uGI7dFc83ifPobojhD1WH8tEwwiEUBNY7J2RXcHGx1buzZG08Bajg mKaiJQVvGzp/VKDR245Yq4QHGVFlbSh0ooWrOIOF38g2HdUrfMzJ5SONK/EGwfNi0tWRG5 AJi0vFqgzRDvusQ3R7uDdsYAJIkrliqTucjkKNd5V+Na/kR3FJ0R/zfS5xmKv7S1B91+mX IYqHZoHpotOH590kyrYGnaLfztoThGof5GsnsNuMAFrXL1iwp0HjIrE88MVxeg== 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=1702666646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oNG6lH9IN9ZS2BRVglFDADEEj7iH5anvomqXErWEcNk=; b=huMJkl1HSHx8XFeRu39rXKKMPQfn2BAZYAYDaiY/jCyfRXxwOjXnV2c450zp8SM8XzBnFj bXmXiXcL1D89TvltLhDYkpOwurRv12V4sakVJNuwEYeO7rG6BUIb9PPE9Jhrhh9nf1zqGP gBGykDS6f+Oj6QampN1AC9hCd99L0+3GuzbPR+alLNZQ/r1OCLl3WgJvj0ZUh/XgCB6XYB nH6E12YBU+cEtTZQxiXo9WVhdxTR7KHgPg2qnWDuXklBUo3JQFjepzGppyS7FiPnGlguOQ XefF9joco9OXr1cmIfoEew3pNxdtZv9tMYZm6QZo0MQnmWoq/7DZPTrcHoVSTg== 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 4SsJPK68vpz6yM; Fri, 15 Dec 2023 18:57: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 3BFIvPcC018109; Fri, 15 Dec 2023 18:57:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvPP5018106; Fri, 15 Dec 2023 18:57:25 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:25 GMT Message-Id: <202312151857.3BFIvPP5018106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 73f87b9725f8 - stable/13 - localedef: add newlines to error messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 73f87b9725f8f5f4ff226e60b42dbc8c3c5ea70d Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=73f87b9725f8f5f4ff226e60b42dbc8c3c5ea70d commit 73f87b9725f8f5f4ff226e60b42dbc8c3c5ea70d Author: Kyle Evans AuthorDate: 2023-09-02 06:24:34 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:59:05 +0000 localedef: add newlines to error messages These won't be added elsewhere, so add a little bit of room to make these messages a little easier to read. The existing set is a mixed bag, there are somewhere in the ballpark of 45, 46 printfs to stderr and 19 of those had newlines. Reviewed by: yuripv Sponsored by: Klara, Inc. (cherry picked from commit 3141e51d2e38fa7b9e6d81477dfa860d087c514d) --- usr.bin/localedef/collate.c | 34 +++++++++++++++++----------------- usr.bin/localedef/localedef.c | 4 ++-- usr.bin/localedef/localedef.h | 2 +- usr.bin/localedef/monetary.c | 4 ++-- usr.bin/localedef/numeric.c | 2 +- usr.bin/localedef/time.c | 8 ++++---- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/usr.bin/localedef/collate.c b/usr.bin/localedef/collate.c index d76c2c2c08b2..2a080773a95e 100644 --- a/usr.bin/localedef/collate.c +++ b/usr.bin/localedef/collate.c @@ -272,7 +272,7 @@ new_pri(void) maxpri = maxpri ? maxpri * 2 : 1024; prilist = realloc(prilist, sizeof (collpri_t) * maxpri); if (prilist == NULL) { - fprintf(stderr,"out of memory"); + fprintf(stderr,"out of memory\n"); return (-1); } for (i = numpri; i < maxpri; i++) { @@ -333,7 +333,7 @@ resolve_pri(int32_t ref) if (pri->pass == pass) { /* report a line with the circular symbol */ lineno = pri->lineno; - fprintf(stderr,"circular reference in order list"); + fprintf(stderr,"circular reference in order list\n"); return (-1); } if ((pri->pri < 0) || (pri->pri >= numpri)) { @@ -494,7 +494,7 @@ define_collsym(char *name) collsym_t *sym; if ((sym = calloc(1, sizeof(*sym))) == NULL) { - fprintf(stderr,"out of memory"); + fprintf(stderr,"out of memory\n"); return; } sym->name = name; @@ -541,7 +541,7 @@ get_collundef(char *name) if ((ud = RB_FIND(collundefs, &collundefs, &srch)) == NULL) { if (((ud = calloc(1, sizeof(*ud))) == NULL) || ((ud->name = strdup(name)) == NULL)) { - fprintf(stderr,"out of memory"); + fprintf(stderr,"out of memory\n"); free(ud); return (NULL); } @@ -565,7 +565,7 @@ get_collchar(wchar_t wc, int create) cc = RB_FIND(collchars, &collchars, &srch); if ((cc == NULL) && create) { if ((cc = calloc(1, sizeof(*cc))) == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); return (NULL); } for (i = 0; i < NUM_WT; i++) { @@ -687,7 +687,7 @@ start_order(int type) /* this is used to protect ELLIPSIS processing */ if ((lastorder == T_ELLIPSIS) && (type != T_CHAR)) { - fprintf(stderr, "character value expected"); + fprintf(stderr, "character value expected\n"); } for (i = 0; i < COLL_WEIGHTS_MAX; i++) { @@ -728,7 +728,7 @@ start_order_char(wchar_t wc) int i; if (wc < ellipsis_start) { - fprintf(stderr, "malformed range!"); + fprintf(stderr, "malformed range!\n"); return; } while (ellipsis_start < wc) { @@ -776,7 +776,7 @@ start_order_ellipsis(void) start_order(T_ELLIPSIS); if (lastorder != T_CHAR) { - fprintf(stderr, "illegal starting point for range"); + fprintf(stderr, "illegal starting point for range\n"); return; } @@ -792,12 +792,12 @@ define_collelem(char *name, wchar_t *wcs) int i; if (wcslen(wcs) >= COLLATE_STR_LEN) { - fprintf(stderr,"expanded collation element too long"); + fprintf(stderr,"expanded collation element too long\n"); return; } if ((e = calloc(1, sizeof(*e))) == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); return; } e->expand = wcs; @@ -816,7 +816,7 @@ define_collelem(char *name, wchar_t *wcs) /* A character sequence can only reduce to one element. */ if ((RB_FIND(elem_by_symbol, &elem_by_symbol, e) != NULL) || (RB_FIND(elem_by_expand, &elem_by_expand, e) != NULL)) { - fprintf(stderr, "duplicate collating element definition"); + fprintf(stderr, "duplicate collating element definition\n"); free(e); return; } @@ -932,7 +932,7 @@ add_order_subst(void) if (s == NULL) { if ((s = calloc(1, sizeof(*s))) == NULL) { - fprintf(stderr,"out of memory"); + fprintf(stderr,"out of memory\n"); return; } s->key = new_pri(); @@ -976,7 +976,7 @@ static void add_subst_pri(int32_t ref) { if (curr_subst >= COLLATE_STR_LEN) { - fprintf(stderr,"substitution string is too long"); + fprintf(stderr,"substitution string is too long\n"); return; } subst_weights[curr_subst] = ref; @@ -1040,7 +1040,7 @@ add_weight(int32_t ref, int pass) return; if ((w = calloc(1, sizeof(*w))) == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); return; } w->pri = srch.pri; @@ -1214,7 +1214,7 @@ dump_collate(void) RB_COUNT(temp, substs, &substs[i], n); subst_count[i] = n; if ((st = calloc(n, sizeof(collate_subst_t))) == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); return; } n = 0; @@ -1245,7 +1245,7 @@ dump_collate(void) RB_NUMNODES(collelem_t, elem_by_expand, &elem_by_expand, chain_count); chain = calloc(chain_count, sizeof(collate_chain_t)); if (chain == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); return; } n = 0; @@ -1265,7 +1265,7 @@ dump_collate(void) RB_NUMNODES(collchar_t, collchars, &collchars, n); large = calloc(n, sizeof(collate_large_t)); if (large == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); return; } diff --git a/usr.bin/localedef/localedef.c b/usr.bin/localedef/localedef.c index ae0bd052b40c..5ff146d6f655 100644 --- a/usr.bin/localedef/localedef.c +++ b/usr.bin/localedef/localedef.c @@ -167,7 +167,7 @@ copy_category(char *src) } if (rv != 0) { - fprintf(stderr,"source locale data unavailable: %s", src); + fprintf(stderr,"source locale data unavailable: %s\n", src); return; } @@ -182,7 +182,7 @@ copy_category(char *src) (void) mkdir(dirname(category_file()), 0755); if (link(srcpath, category_file()) != 0) { - fprintf(stderr,"unable to copy locale data: %s", + fprintf(stderr,"unable to copy locale data: %s\n", strerror(errno)); return; } diff --git a/usr.bin/localedef/localedef.h b/usr.bin/localedef/localedef.h index 2aece1543d5b..4b141ac8dc09 100644 --- a/usr.bin/localedef/localedef.h +++ b/usr.bin/localedef/localedef.h @@ -174,4 +174,4 @@ const char *get_wide_encoding(void); int max_wide(void); //#define _(x) gettext(x) -#define INTERR fprintf(stderr,"internal fault (%s:%d)", __FILE__, __LINE__) +#define INTERR fprintf(stderr,"internal fault (%s:%d)\n", __FILE__, __LINE__) diff --git a/usr.bin/localedef/monetary.c b/usr.bin/localedef/monetary.c index 659c495a71fe..7a77ac7e256c 100644 --- a/usr.bin/localedef/monetary.c +++ b/usr.bin/localedef/monetary.c @@ -93,7 +93,7 @@ add_monetary_num(int n) (void) asprintf(&str, "%d", n); if (str == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); return; } @@ -167,7 +167,7 @@ add_monetary_group(int n) (void) asprintf(&s, "%s;%d", mon.mon_grouping, n); } if (s == NULL) - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); free((char *)mon.mon_grouping); mon.mon_grouping = s; diff --git a/usr.bin/localedef/numeric.c b/usr.bin/localedef/numeric.c index 358355fe96ae..5533b7c10e1a 100644 --- a/usr.bin/localedef/numeric.c +++ b/usr.bin/localedef/numeric.c @@ -93,7 +93,7 @@ add_numeric_group(int n) (void) asprintf(&s, "%s;%d", numeric.grouping, n); } if (s == NULL) - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); free((char *)numeric.grouping); numeric.grouping = s; diff --git a/usr.bin/localedef/time.c b/usr.bin/localedef/time.c index 2de922a8eb12..7a56e244c921 100644 --- a/usr.bin/localedef/time.c +++ b/usr.bin/localedef/time.c @@ -104,7 +104,7 @@ add_list(const char *ptr[], char *str, int limit) return; } } - fprintf(stderr,"too many list elements"); + fprintf(stderr,"too many list elements\n"); } void @@ -137,7 +137,7 @@ add_time_list(wchar_t *wcs) } else if (tm.pm == NULL) { tm.pm = str; } else { - fprintf(stderr,"too many list elements"); + fprintf(stderr,"too many list elements\n"); free(str); } break; @@ -180,11 +180,11 @@ check_time_list(void) case T_ALT_DIGITS: return; default: - fprintf(stderr,"unknown list"); + fprintf(stderr,"unknown list\n"); break; } - fprintf(stderr,"too few items in list (%d)", last_kw); + fprintf(stderr,"too few items in list (%d)\n", last_kw); } void From nobody Fri Dec 15 18:57:26 2023 X-Original-To: dev-commits-src-all@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 4SsJPM4PRRz53wqD; Fri, 15 Dec 2023 18:57: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 4SsJPM1Q7rz3Lvj; Fri, 15 Dec 2023 18:57:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=svWh8ZCe/q0xNXoZFRDDymKfJp46pQr3VrT38fnhRNU=; b=hcnDzXS/k+bGT/QKahNMLeQmjtTIYDcaJAxMxOkyty6JrS3G1iFg/+g29zMww6e/PpXL1N irPgOjOS05XbjLS+03eSMHOORRaPvQkOA3S6Q1gcM3pGO8k94t1uEqomeEDHRHV4pd2WLk NK78VkQWBup3FjfVF7xScrvhglqezlV6nRrMQkdEYx4P/b8dwt+QyZ3H4NSIYkz5XX3+/b fM5v8d93sMOfRuxrrqRsNKerE1imF2wAgsXMLJhvJCN4nNwcajFfIFEQQPvI2n9nio84jb vifVd+Dy/aFnt9DkuqXncUOUSbxAwekD0iKpGy5zeOtxlM2Evp60X9mHZMAJDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666647; a=rsa-sha256; cv=none; b=X+RmatDDOIDkPGVubTYcYWVomm8qXhhdtBDejPBp/Jwhz3tyO0UlVyZaV9fpRKvH366LX8 w5GFIa9wKdCizQOsJ9USDuqTD4bNyT+SKEBqYJdeOMv7XxWVuPbwdNUmwF17S0UaT9j5jh qN9FxcR2nVLeH6snM6WN/s1oDQ+crmhNXMioKV8+G4vZCCJ+iwOeIRnafGf4i9Gut3TnQj wFi1YhuZic6pxswbzub79gTBvNq531lIvISCZSCW6EFFv/R/uYmaVEYcT0YMWybme8cVD8 1SrXbOddQcBJX4bNDqJdzBw60ykP9iwsYaWnFbr4+GFEH9XjzdP9esStVpEK0w== 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=1702666647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=svWh8ZCe/q0xNXoZFRDDymKfJp46pQr3VrT38fnhRNU=; b=vzGPe4/y96MduNx+dVFSWhVVLZyl2EiUXZHICZ8o4eg7QsgqxJva7FbfHZXpY1lPxkm5HI yrq01+wg+pb4/TU6JkXLEJVHjNZ9OHFtxvyujnQpLR8ZTagrnKEflEV1Zpq/xXuhwILc6/ fxvBBGkcWaCjoNKvKoRXx+C2eoPMmiUuPMXIkAk2HTG4ECkL7V45j46EMzJPy9tIxAYHMR 5iq4oshu9aFOMBvRWav/AaJeHj78bS01nHz4NONnkDhc9Ru25IOGMhGbYC+27bQtj9+CQo g+vDcqpshZ3dzBRijRo2IsrJx8W4XbAJUByh9PyaGaqCAGn+rwPEvahauEdwKw== 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 4SsJPM0Rn9z7ck; Fri, 15 Dec 2023 18:57: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 3BFIvQUB018169; Fri, 15 Dec 2023 18:57:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvQCt018166; Fri, 15 Dec 2023 18:57:26 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:26 GMT Message-Id: <202312151857.3BFIvQCt018166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 6a415720f54d - stable/13 - arm64: lop off another 24MB of KVA for early device mappings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6a415720f54df09aff13fc991c9937cef986674f Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6a415720f54df09aff13fc991c9937cef986674f commit 6a415720f54df09aff13fc991c9937cef986674f Author: Kyle Evans AuthorDate: 2023-11-23 16:21:33 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:59:09 +0000 arm64: lop off another 24MB of KVA for early device mappings This grows the block enough to fit a 4K 32-bit depth framebuffer; some firmware would present smaller GOP modes to be able to boot with a smaller framebuffer on these devices, but the Windows Devkit firmware is simply not that nice. Instead, it offers exactly one GOP mode that matches the current resolution of the attached display, so with limited control over resolution on most of my displays it'd be nice if we could Just Work(TM) at 4K. andrew notes that he has some ideas for removing PMAP_MAPDEV_EARLY_SIZE entirely, so this limitation could end up removed altogether in the future. Reviewed by: andrew, emaste (cherry picked from commit a3ceeef26bc880b86f4e181bddd9924a2b5e0691) --- sys/arm64/include/pte.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/arm64/include/pte.h b/sys/arm64/include/pte.h index f1b11c3a0189..478bd85aa2e2 100644 --- a/sys/arm64/include/pte.h +++ b/sys/arm64/include/pte.h @@ -143,7 +143,11 @@ typedef uint64_t pt_entry_t; /* page table entry */ /* 0x2 also marks an invalid address */ #define L3_PAGE 0x3 -#define PMAP_MAPDEV_EARLY_SIZE (L2_SIZE * 8) +/* + * A substantial portion of this is to make sure that we can cope with 4K + * framebuffers in early boot, assuming a common 4K resolution @ 32-bit depth. + */ +#define PMAP_MAPDEV_EARLY_SIZE (L2_SIZE * 20) #define L0_ENTRIES_SHIFT 9 #define L0_ENTRIES (1 << L0_ENTRIES_SHIFT) From nobody Fri Dec 15 18:57:28 2023 X-Original-To: dev-commits-src-all@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 4SsJPN43Qxz53wqF; Fri, 15 Dec 2023 18:57: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 4SsJPN24f8z3Lw1; Fri, 15 Dec 2023 18:57:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qFyLbwAdT8tRiAROaryEoh+U6s1+kntb7fQhPmPZZKc=; b=VXMUu+8r2XeCx70bnX0IF7s6ZydCYWEKqRvfaJlrX8CJhuOKuGyttOLd0oq6QXkpDT75g/ qzpFjwbXYmAzAHnrz5eYf/n9XFMsBM2JjV4SwXrnf1tv4PjWP6xKkZU8c0LSfntNKoQHqH Bc7U2DZNNDSs9hgTBHOJSXT6HjMhaaUAmX/Np5MeDrKBte6Dv7SwDDKDqDNd1fMyN0lBW6 LGwr2ljZifKFhVgGefeWs5vWtv2rDbRQQrFSrZ4RQMQE1u3Mou7bcJMHBhuH+V01mYDkE7 49BGaaVzkEdQcLKV6P7ElTQ/i2XZpNO9f7UeOl6uV74FQeUFss59OuK1X04gKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666648; a=rsa-sha256; cv=none; b=sjDlCe7KTeQ2v96T9YVpwgYPHg+m58PyEQ0vra5M91Jb/LJpTvnfccXuu4E5LEo8Hg9kN5 Imkhr4wILvJdNubzAB1JdYdBtO5/U4J5KnBfMtik6JLy/C95YqGVZkzSsi29/KDDH0SgYc 0/MhyV6y6UpDu0Qd3FNlNl2nTwkk/3I48/H674VU05L0V3SPUNT7HQlp67TC4ZzDc2bCEg GSB08pgJ6CBrPDrQiRAYtoeZ8mOfhyyR7LZAtxRburG4FPNn77cdhzsgEEBK24tVUqYa2k JCNYYkTv/+c6a7VQMbBiutpGaidHFyIbz3HjYKx2vhbTGhWI/Y44Xo7jXUpuJA== 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=1702666648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qFyLbwAdT8tRiAROaryEoh+U6s1+kntb7fQhPmPZZKc=; b=txrUe3Kebd5OQOAq6pUKQ25veVYwB010d0tNsx8Yb2s1AHere8b1nmQDAHYr6RsgoBIMUO JVn155s3h/PuelgitmROOG/pnZ1mm9SJ3iINxrWLXkQ5FLNZTQBywH8RVuNFmRL9Jt6gOq LOuueeIuQzU2JPwFuw8pyXa23BluRLb5RTyIaesNv7iFUnHc9bLouRbZNRzqfk43f13pTu FL5qJuQAK6l9wZ6fhU4AVcoZVBJQJDOyIgCN9pj+sMjoqHAFWLiumjqDO5oKdWfz1SGfJk wjO5rwbDt6imatonYIE19xEh8Lh+KmROUPlo1N4EKm2QKF3FKb8J1kYjAPdSyQ== 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 4SsJPN19JNz7cl; Fri, 15 Dec 2023 18:57: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 3BFIvSd3018217; Fri, 15 Dec 2023 18:57:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvSE5018214; Fri, 15 Dec 2023 18:57:28 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:28 GMT Message-Id: <202312151857.3BFIvSE5018214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: aa9ad4d484ef - stable/13 - lockf: correct omission in the usage statement List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aa9ad4d484eff42dfd7461fdfcc5d32a03922e8e Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=aa9ad4d484eff42dfd7461fdfcc5d32a03922e8e commit aa9ad4d484eff42dfd7461fdfcc5d32a03922e8e Author: Kyle Evans AuthorDate: 2023-11-22 04:45:42 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:59:12 +0000 lockf: correct omission in the usage statement The -w flag was added without being noted in the usage statement; fix that now. While we're here, re-sort the getopt() string. Reviewed by: 0mp, allanjude, des Sponsored by: Klara, Inc. (cherry picked from commit 35095fd23f071d03633312b91a5b460eaf811efa) --- usr.bin/lockf/lockf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index 3caf8941bdf6..6ca317887cb1 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -62,7 +62,7 @@ main(int argc, char **argv) silent = keep = 0; flags = O_CREAT | O_RDONLY; waitsec = -1; /* Infinite. */ - while ((ch = getopt(argc, argv, "sknt:w")) != -1) { + while ((ch = getopt(argc, argv, "knst:w")) != -1) { switch (ch) { case 'k': keep = 1; @@ -224,7 +224,7 @@ usage(void) { fprintf(stderr, - "usage: lockf [-kns] [-t seconds] file command [arguments]\n"); + "usage: lockf [-knsw] [-t seconds] file command [arguments]\n"); exit(EX_USAGE); } From nobody Fri Dec 15 18:57:29 2023 X-Original-To: dev-commits-src-all@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 4SsJPP3t1Nz53wvd; Fri, 15 Dec 2023 18:57: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 4SsJPP3Sb7z3M5t; Fri, 15 Dec 2023 18:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+lmK3e9ktZGoxYl0zi8pe0m1k0aCptb5UtUQrsBNZQ=; b=hhXghuwcP+Rq/UR2p7quftHvPiqaD2O07rNNWe+eNR+h2gJNZndpgjKlPM4Aj0ib1ZvXFS ZMtymANLPaGuMenenpNBGBQ1HewAFKJXhkVpQXeVTg8q8VGH267hczrY5AVR8Pqyh4T0dv DQ7fSrvFjJdPtFIwcqpzbMU0f+XiPUa7QAfz2zlh6XECjzYBEqCJ2HhaSdCOlaKSpAEHlT iDoR8sz4KUTcSxFrgzTny2FJNpufl5KVZvnFSu9tI3JCzJ1YczEEAP7F7Ty0L/5mPcKXQ+ bwUzMlLR9l8bXuX1/cdSz2xwynCqP9h5O2i//dzyyvwuLf1/OjkLMvnb9uiWYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666649; a=rsa-sha256; cv=none; b=gnCtNLDfgcMQS8XjSF+mXVgqYAuPhvBxCPsq4oafCDYyxjniqhnFv5KPDbVJ5qbohyQ8NH wObGBHfQD+OaycaUf7/heQXXZO4Pb/Djjs3X/KTr5EDFA/yYdXYRjB15jzvJJVyAk1yTkV H6FJhhuErLo5VzMvSkZOpbRklltEKNnZf5QdwkACCD7cch1VQXHZWAquVpDTSsBTgwhKSQ 237Muzqtd4CLflN4kJhoUzeBy4P3iGXhmEAE8dQV3k4Rz4RJFK3e1rZWhYZ0D7j168AgIa 8wKQcbitdEIoY7knZ5/XLC++QSKWV/6XBXmi6O2dT3YVwDcoF08HYgF9CuhUDw== 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=1702666649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+lmK3e9ktZGoxYl0zi8pe0m1k0aCptb5UtUQrsBNZQ=; b=GS63NzJ5OaVqtNMu3DnSDYjzaaRpPbttwPVPQQSGE1FNp/vo/pJsBQpMAqs3i5KQHPbJpA JTI1NG/nZ4YaxA9rgC/xCl2Fn4wUYJT7GOXNmmnxXtB7ibkt6wI6Kk9WZosbYL9fdjuXct YKGgV/JC2wHOdJfFUgCrIxPkOO9Zxb3fJ0mh7F86ypFjmeIVCXUWxI62ZbyHtnE1ib64rZ LbCmDKSMY6DBlC0Z0PCbQc7/qIwZyNY0KUGOcicKTsY+CyQgGqn5EwsdPWlG80SNQuDI18 K9slwdHJpOlRN12OxQyZdN8T8h6N8LA9NoITA+o1OtoGxFy4pLcDjLZKkVYg2A== 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 4SsJPP2SQmz7Pr; Fri, 15 Dec 2023 18:57: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 3BFIvTx3018265; Fri, 15 Dec 2023 18:57:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvTcG018262; Fri, 15 Dec 2023 18:57:29 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:29 GMT Message-Id: <202312151857.3BFIvTcG018262@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 8f5c28046307 - stable/13 - lockf: hide unavailable error with -n -s List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8f5c280463078d10ed4da6fbdba11596e441cf09 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8f5c280463078d10ed4da6fbdba11596e441cf09 commit 8f5c280463078d10ed4da6fbdba11596e441cf09 Author: Kyle Evans AuthorDate: 2023-11-22 04:41:36 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:59:15 +0000 lockf: hide unavailable error with -n -s The error message is expected, allow -s to suppress just that one since it would loosely fall under the definition of "failure to acquire the lock" described in the manpage for the -s option. Reviewed by: 0mp, allanjude Feedback from: des Sponsored by: Klara, Inc. (cherry picked from commit 3041e6950d07f0d11c9f91fefbf3c273cbbe4407) --- usr.bin/lockf/lockf.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index 6ca317887cb1..8b0a13e3ca0f 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -38,7 +38,7 @@ #include #include -static int acquire_lock(const char *name, int flags); +static int acquire_lock(const char *name, int flags, int silent); static void cleanup(void); static void killed(int sig); static void timeout(int sig); @@ -125,13 +125,14 @@ main(int argc, char **argv) * avoiding the separate step of waiting for the lock. This * yields fairness and improved performance. */ - lockfd = acquire_lock(lockname, flags | O_NONBLOCK); + lockfd = acquire_lock(lockname, flags | O_NONBLOCK, silent); while (lockfd == -1 && !timed_out && waitsec != 0) { if (keep) - lockfd = acquire_lock(lockname, flags); + lockfd = acquire_lock(lockname, flags, silent); else { wait_for_lock(lockname); - lockfd = acquire_lock(lockname, flags | O_NONBLOCK); + lockfd = acquire_lock(lockname, flags | O_NONBLOCK, + silent); } } if (waitsec > 0) @@ -168,15 +169,18 @@ main(int argc, char **argv) * on success, or -1 on failure. */ static int -acquire_lock(const char *name, int flags) +acquire_lock(const char *name, int flags, int silent) { int fd; if ((fd = open(name, O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); - else if (errno == ENOENT && (flags & O_CREAT) == 0) - err(EX_UNAVAILABLE, "%s", name); + else if (errno == ENOENT && (flags & O_CREAT) == 0) { + if (!silent) + warn("%s", name); + exit(EX_UNAVAILABLE); + } err(EX_CANTCREAT, "cannot open %s", name); } return (fd); From nobody Fri Dec 15 18:57:30 2023 X-Original-To: dev-commits-src-all@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 4SsJPQ4sgqz53wqK; Fri, 15 Dec 2023 18:57:30 +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 4SsJPQ4BCBz3MKW; Fri, 15 Dec 2023 18:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pXGbr8N5tUbV1/HkYxDgeKHANPPKcdn8uq6U4e4jIWY=; b=c/AiH/eOKkNrm4DjsEaVOQXVYRg1SJ9Gtloig4c4d296MLO0efHIhdb5klYy+AZrAnIEyb pVWNfalumwNzV6f3Agz6TPJw0FY4zdVMozTjB/Zd5UaTQctDked/acws7zO6C8wLYuOsAv MYcJXA5cW9TiuzaUkeroV1R/3nBGL2ako51LY98vdIJz+SKkvDv1TSeZZWs4gcsPuuNzUR WoMSVCsYinWxcGH2llpEh5ZD//Vi/BMGI0lO49suvf9tsXd5wSqdr4PC8pKkW8K8ruDons DMcaNcV4rJCQ3fNTunqghIfJqbUARI+CPq0zRj1UHllsjIwyeuyZJj1YOugnjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666650; a=rsa-sha256; cv=none; b=kwLinlT/chMmS7Zb7fmRzIwE/rGMmr+5lC7ysIjkJnQS0Kt5XUPmGgyouF0xpLBAL5nBLn o3DASe1FULLYod6dGs3TjF0W912osjwi8dk+PnndWNUyI3+oWLr4ueYEAXI/Sk4tLHrx9b IR/A9xQEosC6QUoLQUIps6lobYlKIre/R56CQ4t15Y0HJKi+UTlyBbnlZXeyoxxT38eEcp IR/tJaYVx8PbrGIeQznZVwRfHN4gcjhEzsArRwSDv1zULaEuIuOGucrH7gPzq5eemV4l1M UFtaQb1nd/5KrsO1q70Uw7sG9lkmLUFn0euV6Wy1C1c/K/E5+SOSULM+m5JVOQ== 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=1702666650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pXGbr8N5tUbV1/HkYxDgeKHANPPKcdn8uq6U4e4jIWY=; b=P/VNLpItBKaJu0bniUAN1otssH5eSjLtdS3W4QGK9xhJBPngcifwxK9G+bp6cjspVks/VT CYALW3ZH+AAT3KlI7/0KSe1dH1dEUMg+GxSKoSvvVhtoBYPS2mU0xS8qfnIOwuMenl2jHT 6EhwZeVP9rQqfkASA15lHYn86e07gSrEt4jtIpmaqelYR+CsBwFOdUe9x65lY3vywOb7Rd M5xhLI0EKdHmVMGpLL/+CdBHTDqXv3WbpQxfQDIazGXDzDe/GW0vrCFr1EC/QpY+yaLcT7 w/Oqq0DtEXZ3kFg6KSOe6P4XEgSRzWRLg26uUXBNj3kZBck++I23aXaBJMll2g== 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 4SsJPQ36Nyz7fW; Fri, 15 Dec 2023 18:57:30 +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 3BFIvUEp018308; Fri, 15 Dec 2023 18:57:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvUUo018305; Fri, 15 Dec 2023 18:57:30 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:30 GMT Message-Id: <202312151857.3BFIvUUo018305@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 159d922f4ce9 - stable/13 - lockf: don't hold stdin/stdout/stderr open List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 159d922f4ce9405189b4f92bfe46858bfde75400 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=159d922f4ce9405189b4f92bfe46858bfde75400 commit 159d922f4ce9405189b4f92bfe46858bfde75400 Author: Alexander Melkov AuthorDate: 2023-11-22 04:46:28 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:59:18 +0000 lockf: don't hold stdin/stdout/stderr open None of these are essential in the lockf monitor (parent post-fork), so close them to maintain the illusion that lockf hasn't been inserted into the pipeline. This ensures that the correct effects happen on other programs in the pipeline if the locked command closes or redirects these elsewhere. The original patch used -s to close stdout/stderr rather than closing them unconditionally, but it's not clear that we really care that much. kevans dropped that part when taking the patch, patch is otherwise by listed author. PR: 112379 Reviewed by: 0mp, allanjude (both earlier version), kevans Feedback from: des Sponsored by: Klara, Inc. (cherry picked from commit 18425c19cae08cbe41801845457ed67285806688) --- usr.bin/lockf/lockf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index 8b0a13e3ca0f..1149128021e6 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -157,8 +157,11 @@ main(int argc, char **argv) signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); signal(SIGTERM, killed); + fclose(stdin); + fclose(stdout); + fclose(stderr); if (waitpid(child, &status, 0) == -1) - err(EX_OSERR, "waitpid failed"); + exit(EX_OSERR); return (WIFEXITED(status) ? WEXITSTATUS(status) : EX_SOFTWARE); } @@ -210,7 +213,7 @@ killed(int sig) cleanup(); signal(sig, SIG_DFL); if (kill(getpid(), sig) == -1) - err(EX_OSERR, "kill failed"); + _Exit(EX_OSERR); } /* From nobody Fri Dec 15 18:57:31 2023 X-Original-To: dev-commits-src-all@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 4SsJPR6CvCz53wsW; Fri, 15 Dec 2023 18:57: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 4SsJPR55ztz3MCP; Fri, 15 Dec 2023 18:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jB79hKzHVCXCAzNT5WaTVTJFtRdLVUyvl6RAvcL1zws=; b=Wccl5BQpiM91bSf/RBitzbHMdZpb9/YvOucp792SWTTkblJoQnoPV03Q9bzOf5oO86bLPc JVgSzDkJPeOtmqs88afRReBqvtYmYmMLJNFOI99Hz/myPZ9mZx9KE/x0t4RW8l8Ueq4cro 4Qba6WTmrrLi2OJNqmzmzCVhyF8vRik4pf4ck4nZJ4BGwibVrEsWDA9idUNze06P2qu/Qq sHRI9fL0vtFpT2eeVibGkOwDkgyE+stCq+BzLSAaSMwicrlFrgilITVFUNRaVFA7RyPR3d v/A2FU/rIIFIP3JR1UcFrYuObdE+1zXdovd9AmO61K3EWuIcb1I5xbaoxOZ5xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666651; a=rsa-sha256; cv=none; b=G/xkgbLwuJmX6wEQ+48HF3ql2OI+uwYheaU46SH010nkt0xu7urX1H4Ijn/XdkEHXwueVV pofdKsdy0r/E5I5U3vBpvhmjuQZdHiPwkplsmPLraoiXwn8gvAOT2Jj6xpXi+mv6FyVlCy lEuGa4mYgd+9p/ID1b/JRKhswpfLVVVUkc9A5dqMgJyzQzLXGno/hVHod7DFfNR22U/G/8 N8qnsuDYtY0toCtyaiee+GnT41KqVtjfUDHJ/Ig/zIxetsR+o/nV5V7eVilH0zX2SpsN+W Q0uilRQWIDyOugcysFOzhoqT4hBAqsQGwn+T60c248HYjhYDokt1TTW0hDd1Hw== 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=1702666651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jB79hKzHVCXCAzNT5WaTVTJFtRdLVUyvl6RAvcL1zws=; b=Vy8wPOFzTHz5QckOZA5wKTTmnlbcmXc7rhPJYDoSV4NZ07mqK92JnR7vhxtQPESUSySNcK j3+9Wgu1NI76Rxwb+xPP6XgjisGCT6W0+zi0GJBZyrUq2wL0oNh43c84bcStRHTzIe6khw IXY4uhjbMlFTYPK0I1aN5g+vjUA1PXYIqcnM4u0eC9L4l7c0AeYZIF/3naw4L5BI5bw+0J 9J7IDkwk3b1JSurxY5oBdN7dpx0LzycGLFHUBRD8yYRb4XVIrNefdg2/9YJF0QnBt0gA3f /rwUZ4M7/X0TWcMyfwf5+mocy7XBcvZyCX8dFLXhU2acHhRVFJrkj0hTPEDRQA== 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 4SsJPR4CKXz7cm; Fri, 15 Dec 2023 18:57: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 3BFIvVVE018355; Fri, 15 Dec 2023 18:57:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvVFV018352; Fri, 15 Dec 2023 18:57:31 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:31 GMT Message-Id: <202312151857.3BFIvVFV018352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: fbd1d0bdff1d - stable/13 - lockf: add some tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fbd1d0bdff1d97068c148e0a200ea786eb29fe69 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=fbd1d0bdff1d97068c148e0a200ea786eb29fe69 commit fbd1d0bdff1d97068c148e0a200ea786eb29fe69 Author: Kyle Evans AuthorDate: 2023-11-22 05:09:11 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:59:21 +0000 lockf: add some tests Provide basic coverage for the existing options, nothing deeper (e.g., pipe closing behavior) is tested in this set. Reviewed by: allanjude Feedback from: des Sponsored by: Klara, Inc. (cherry picked from commit 296a5a4db1fc8203f5f6aa8f68321e6ab4652b56) --- etc/mtree/BSD.tests.dist | 2 + usr.bin/lockf/Makefile | 5 ++ usr.bin/lockf/tests/Makefile | 6 ++ usr.bin/lockf/tests/lockf_test.sh | 148 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 161 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 46a305aec62d..f9a551bbc39b 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1055,6 +1055,8 @@ .. locale .. + lockf + .. m4 .. mkimg diff --git a/usr.bin/lockf/Makefile b/usr.bin/lockf/Makefile index d1905a4510ba..b7d916f20d13 100644 --- a/usr.bin/lockf/Makefile +++ b/usr.bin/lockf/Makefile @@ -1,4 +1,9 @@ +.include + PROG= lockf +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/usr.bin/lockf/tests/Makefile b/usr.bin/lockf/tests/Makefile new file mode 100644 index 000000000000..88a936cc583d --- /dev/null +++ b/usr.bin/lockf/tests/Makefile @@ -0,0 +1,6 @@ + +PACKAGE= tests + +ATF_TESTS_SH+= lockf_test + +.include diff --git a/usr.bin/lockf/tests/lockf_test.sh b/usr.bin/lockf/tests/lockf_test.sh new file mode 100644 index 000000000000..8696ab82a996 --- /dev/null +++ b/usr.bin/lockf/tests/lockf_test.sh @@ -0,0 +1,148 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 Klara, Inc. +# +# 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. +# + +# sysexits(3) +: ${EX_USAGE:=64} +: ${EX_UNAVAILABLE:=69} +: ${EX_CANTCREAT:=73} +: ${EX_TEMPFAIL:=75} + +atf_test_case badargs +badargs_body() +{ + atf_check -s exit:${EX_USAGE} -e not-empty lockf + atf_check -s exit:${EX_USAGE} -e not-empty lockf "testlock" +} + +atf_test_case basic +basic_body() +{ + # Something innocent so that it does eventually go away without our + # intervention. + lockf "testlock" sleep 10 & + lpid=$! + + # Make sure that the lock exists... + atf_check test -e "testlock" + + # Attempt both verbose and silent re-lock + atf_check -s exit:${EX_TEMPFAIL} -e not-empty \ + lockf -t 0 "testlock" sleep 0 + atf_check -s exit:${EX_TEMPFAIL} -e empty \ + lockf -t 0 -s "testlock" sleep 0 + + # Make sure it cleans up after the initial sleep 10 is over. + wait "$lpid" + atf_check test ! -e "testlock" +} + +atf_test_case keep +keep_body() +{ + lockf -k "testlock" sleep 10 & + lpid=$! + + # Make sure that the lock exists now... + while ! test -e "testlock"; do + sleep 0.5 + done + + kill "$lpid" + wait "$lpid" + + # And it still exits after the lock has been relinquished. + atf_check test -e "testlock" +} + +atf_test_case needfile +needfile_body() +{ + # Hopefully the clock doesn't jump. + start=$(date +"%s") + + # Should fail if the lockfile does not yet exist. + atf_check -s exit:"${EX_UNAVAILABLE}" lockf -sn "testlock" sleep 30 + + # It's hard to guess how quickly we should have finished that; one would + # hope that it exits fast, but to be safe we specified a sleep 30 under + # lock so that we have a good margin below that duration that we can + # safely test to make sure we didn't actually execute the program, more + # or less. + now=$(date +"%s") + tpass=$((now - start)) + atf_check test "$tpass" -lt 10 +} + +atf_test_case timeout +timeout_body() +{ + lockf "testlock" sleep 30 & + lpid=$! + + while ! test -e "testlock"; do + sleep 0.5 + done + + start=$(date +"%s") + timeout=2 + atf_check -s exit:${EX_TEMPFAIL} lockf -st "$timeout" "testlock" sleep 0 + + # We should have taken no less than our timeout, at least. + now=$(date +"%s") + tpass=$((now - start)) + atf_check test "$tpass" -ge "$timeout" + + kill "$lpid" + wait "$lpid" || true +} + +atf_test_case wrlock +wrlock_head() +{ + atf_set "require.user" "unprivileged" +} +wrlock_body() +{ + touch "testlock" + chmod -w "testlock" + + # Demonstrate that we can lock the file normally, but -w fails if we + # can't write. + atf_check lockf -kt 0 "testlock" sleep 0 + atf_check -s exit:${EX_CANTCREAT} -e not-empty \ + lockf -wt 0 "testlock" sleep 0 +} + +atf_init_test_cases() +{ + atf_add_test_case badargs + atf_add_test_case basic + atf_add_test_case keep + atf_add_test_case needfile + atf_add_test_case timeout + atf_add_test_case wrlock +} From nobody Fri Dec 15 18:57:32 2023 X-Original-To: dev-commits-src-all@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 4SsJPT11nYz53wsZ; Fri, 15 Dec 2023 18:57: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 4SsJPS6Y5Jz3MMw; Fri, 15 Dec 2023 18:57:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r4QJxL0Dk4sYp0shFpOramRQ4DvUkWMFUyOR/Nyae/M=; b=lCbKza67Fs23VduBwWJUn/f/fluEBsF9kKRyQ+WMLMZt481zmFGrXUjxZyxAYru9x5QnHw Bi1GCu4dzbaWs39mB4LIbMXSs7jlAxKLFbzIWqcvlLWQxX/EhP+WEgIhmn897Hp93C1hMs mmKyEg8ReGYoC6cD2p+w+82tlP+w7wGTgAYIqRT8Ck6NXnm1+kRr+kQNeE3/VSVznd+Ozy Q8JMwdUhazFK27trbmF3QYJwkdtjPepydpvqczYwnxfCUXbjFpR/QSr0NWFvmRnk+KRO0V Q0M7+amRlSJfqMy+3z4/iOfaxESGfIXPq7OfAhMLX75wWuXnjvvgyoGRziuOzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666652; a=rsa-sha256; cv=none; b=BpTzZLp3F0V8Jm9kUrdiAkWwkHkuAsbMclBOA6Q1XBgoYlDI7CDb94LW6aI6HX/6hUH23p jTuCj4aToJl2Bl2fydf0xFOP8tB2f5vb1eC5HAD+e/KKpjC2JHPyOHizgCrk/WK7JsEj3n m2NFyWjCDwKNqv9AfHdfMxx4ZG/wvHJrm2HXwD4WszO5mzCu0LhI8ntYq6L2YM6shQySAG olkbt4INwODOD4TWANsWPZhwhK3MWRLUPfVQCO4Rz8z3rE/ZiVcv2j5IXzUopu8pkP8Ww8 KMt542Jj87eQjqIgqKX7p3cxdkJcBjBDGscocP9ig52p14CRUFQaKv9Rbe6GMQ== 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=1702666652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r4QJxL0Dk4sYp0shFpOramRQ4DvUkWMFUyOR/Nyae/M=; b=aLsyuFznpleAo9sB/Ruh3pI/YEtUhwYxX+W5c/Fyv4kzDJhu4EoYPQuD1AXQWGWHrbY/eP MCc0PMTPhzgR+bKLcJZmC0UsfZLnJIzPn0vUbFBHGP9NALpRz0vUZNDCiNkx2M8s/F9wSw SwFj5mQcbfklNOwK1v3NbwBEimqbuRZ3Ppd03IGZ+DWTurqV4BFq491PV/SLahm26hAnPR DJahlT8QBBe0KEAnfcXCMKLqzFVhOV906kSoc2vFDGnIfigiTgL759wwquGSrFafSV2cEn a84Cd3zweDhSqUkulC7J5+ZKEm4Y2u3tvctMGYoRWIZGuzZbOjg3VBmTVIzKdw== 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 4SsJPS5GZxz7Ps; Fri, 15 Dec 2023 18:57: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 3BFIvWpB018398; Fri, 15 Dec 2023 18:57:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvWMM018395; Fri, 15 Dec 2023 18:57:32 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:32 GMT Message-Id: <202312151857.3BFIvWMM018395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 663424957d80 - stable/13 - lockf: allow locking file descriptors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 663424957d8079d514d127ac8c2fb65b247960be Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=663424957d8079d514d127ac8c2fb65b247960be commit 663424957d8079d514d127ac8c2fb65b247960be Author: Kyle Evans AuthorDate: 2023-11-22 07:46:14 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:59:25 +0000 lockf: allow locking file descriptors This is most useful inside a shell script, allowing one to lock just portions of a script rather than having to wrap the entire script in a lock. PR: 262738 Reviewed by: 0mp, allanjude (both previous versions) Co-authored-by: Daniel O'Connor Sponsored by: Klara, Inc. (cherry picked from commit 09a7fe0a5523d53ff6c26ddef9a947f293e18c22) --- usr.bin/lockf/lockf.1 | 63 ++++++++++++++++++- usr.bin/lockf/lockf.c | 128 +++++++++++++++++++++++++++++++++----- usr.bin/lockf/tests/lockf_test.sh | 91 +++++++++++++++++++++++++++ 3 files changed, 266 insertions(+), 16 deletions(-) diff --git a/usr.bin/lockf/lockf.1 b/usr.bin/lockf/lockf.1 index 8120b2ed7630..d73033101632 100644 --- a/usr.bin/lockf/lockf.1 +++ b/usr.bin/lockf/lockf.1 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 26, 2020 +.Dd November 25, 2023 .Dt LOCKF 1 .Os .Sh NAME @@ -35,6 +35,10 @@ .Ar file .Ar command .Op Ar arguments +.Nm +.Op Fl s +.Op Fl t Ar seconds +.Ar fd .Sh DESCRIPTION The .Nm @@ -64,6 +68,27 @@ the mere existence of the .Ar file is not considered to constitute a lock. .Pp +.Nm +may also be used to operate on a file descriptor instead of a file. +If no +.Ar command +is supplied, then +.Ar fd +must be a file descriptor. +The version with a +.Ar command +may also be used with a file descriptor by supplying it as a path +.Pa /dev/fd/N , +where N is the desired file descriptor. +The +.Fl k +option is implied when a file descriptor is in use, and the +.Fl n +and +.Fl w +options are silently ignored. +This can be used to lock inside a shell script. +.Pp If the .Nm utility is being used to facilitate concurrency between a number @@ -186,6 +211,42 @@ $ lockf mylock sleep 1 & lockf -t 5 mylock echo "Success" Success [1]+ Done lockf mylock sleep 1 .Ed +Lock a file and run a script, return immediately if the lock is not +available. Do not delete the file afterward so lock order is +guaranteed. +.Pp +.Dl $ lockf -t 0 -k /tmp/my.lock myscript +.Pp +Protect a section of a shell script with a lock, wait up to 5 seconds +for it to become available. +Note that the shell script has opened the lock file +.Fa /tmp/my.lock , +and +.Nm +is performing the lock call exclusively via the passed in file descriptor (9). +In this case +.Fl k +is implied, and +.Fl w +has no effect because the file has already been opened by the shell. +This example assumes that +.Ql > +is implemented in the shell by opening and truncating +.Pa /tmp/my.lock , +rather than by replacing the lock file. +.Bd -literal -offset indent +( + lockf -s -t 5 9 + if [ $? -ne 0 ]; then + echo "Failed to obtain lock" + exit 1 + fi + + echo Start + # Do some stuff + echo End +) 9>/tmp/my.lock +.Ed .Sh SEE ALSO .Xr flock 2 , .Xr lockf 3 , diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index 1149128021e6..49a4752a967d 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -29,16 +29,26 @@ #include #include +#include #include #include #include +#include #include #include #include +#include #include #include -static int acquire_lock(const char *name, int flags, int silent); +#define FDLOCK_PREFIX "/dev/fd/" + +union lock_subject { + long subj_fd; + const char *subj_name; +}; + +static int acquire_lock(union lock_subject *subj, int flags, int silent); static void cleanup(void); static void killed(int sig); static void timeout(int sig); @@ -48,8 +58,34 @@ static void wait_for_lock(const char *name); static const char *lockname; static int lockfd = -1; static int keep; +static int fdlock; static volatile sig_atomic_t timed_out; +/* + * Check if fdlock is implied by the given `lockname`. We'll write the fd that + * is represented by it out to ofd, and the caller is expected to do any + * necessary validation on it. + */ +static int +fdlock_implied(const char *name, long *ofd) +{ + char *endp; + long fd; + + if (strncmp(name, FDLOCK_PREFIX, sizeof(FDLOCK_PREFIX) - 1) != 0) + return (0); + + /* Skip past the prefix. */ + name += sizeof(FDLOCK_PREFIX) - 1; + errno = 0; + fd = strtol(name, &endp, 10); + if (errno != 0 || *endp != '\0') + return (0); + + *ofd = fd; + return (1); +} + /* * Execute an arbitrary command while holding a file lock. */ @@ -58,6 +94,7 @@ main(int argc, char **argv) { int ch, flags, silent, status, waitsec; pid_t child; + union lock_subject subj; silent = keep = 0; flags = O_CREAT | O_RDONLY; @@ -89,11 +126,54 @@ main(int argc, char **argv) usage(); } } - if (argc - optind < 2) - usage(); - lockname = argv[optind++]; + argc -= optind; argv += optind; + + if (argc == 0) + usage(); + + lockname = argv[0]; + + argc--; + argv++; + + /* + * If there aren't any arguments left, then we must be in fdlock mode. + */ + if (argc == 0 && *lockname != '/') { + fdlock = 1; + subj.subj_fd = -1; + } else { + fdlock = fdlock_implied(lockname, &subj.subj_fd); + if (argc == 0 && !fdlock) { + fprintf(stderr, "Expected fd, got '%s'\n", lockname); + usage(); + } + } + + if (fdlock) { + if (subj.subj_fd < 0) { + char *endp; + + errno = 0; + subj.subj_fd = strtol(lockname, &endp, 10); + if (errno != 0 || *endp != '\0') { + fprintf(stderr, "Expected fd, got '%s'\n", + lockname); + usage(); + } + } + + if (subj.subj_fd < 0 || subj.subj_fd > INT_MAX) { + fprintf(stderr, "fd '%ld' out of range\n", + subj.subj_fd); + usage(); + } + } else { + subj.subj_name = lockname; + } + if (waitsec > 0) { /* Set up a timeout. */ struct sigaction act; @@ -125,13 +205,13 @@ main(int argc, char **argv) * avoiding the separate step of waiting for the lock. This * yields fairness and improved performance. */ - lockfd = acquire_lock(lockname, flags | O_NONBLOCK, silent); + lockfd = acquire_lock(&subj, flags | O_NONBLOCK, silent); while (lockfd == -1 && !timed_out && waitsec != 0) { - if (keep) - lockfd = acquire_lock(lockname, flags, silent); + if (keep || fdlock) + lockfd = acquire_lock(&subj, flags, silent); else { wait_for_lock(lockname); - lockfd = acquire_lock(lockname, flags | O_NONBLOCK, + lockfd = acquire_lock(&subj, flags | O_NONBLOCK, silent); } } @@ -142,7 +222,15 @@ main(int argc, char **argv) exit(EX_TEMPFAIL); errx(EX_TEMPFAIL, "%s: already locked", lockname); } + /* At this point, we own the lock. */ + + /* Nothing else to do for FD lock, just exit */ + if (argc == 0) { + assert(fdlock); + return 0; + } + if (atexit(cleanup) == -1) err(EX_OSERR, "atexit failed"); if ((child = fork()) == -1) @@ -166,25 +254,34 @@ main(int argc, char **argv) } /* - * Try to acquire a lock on the given file, creating the file if + * Try to acquire a lock on the given file/fd, creating the file if * necessary. The flags argument is O_NONBLOCK or 0, depending on * whether we should wait for the lock. Returns an open file descriptor * on success, or -1 on failure. */ static int -acquire_lock(const char *name, int flags, int silent) +acquire_lock(union lock_subject *subj, int flags, int silent) { int fd; - if ((fd = open(name, O_EXLOCK|flags, 0666)) == -1) { + if (fdlock) { + assert(subj->subj_fd >= 0 && subj->subj_fd <= INT_MAX); + fd = (int)subj->subj_fd; + + if (flock(fd, LOCK_EX | LOCK_NB) == -1) { + if (errno == EAGAIN || errno == EINTR) + return (-1); + err(EX_CANTCREAT, "cannot lock fd %d", fd); + } + } else if ((fd = open(subj->subj_name, O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); else if (errno == ENOENT && (flags & O_CREAT) == 0) { if (!silent) - warn("%s", name); + warn("%s", subj->subj_name); exit(EX_UNAVAILABLE); } - err(EX_CANTCREAT, "cannot open %s", name); + err(EX_CANTCREAT, "cannot open %s", subj->subj_name); } return (fd); } @@ -196,7 +293,7 @@ static void cleanup(void) { - if (keep) + if (keep || fdlock) flock(lockfd, LOCK_UN); else unlink(lockname); @@ -231,7 +328,8 @@ usage(void) { fprintf(stderr, - "usage: lockf [-knsw] [-t seconds] file command [arguments]\n"); + "usage: lockf [-knsw] [-t seconds] file command [arguments]\n" + " lockf [-s] [-t seconds] fd\n"); exit(EX_USAGE); } diff --git a/usr.bin/lockf/tests/lockf_test.sh b/usr.bin/lockf/tests/lockf_test.sh index 8696ab82a996..cc6938d2306e 100644 --- a/usr.bin/lockf/tests/lockf_test.sh +++ b/usr.bin/lockf/tests/lockf_test.sh @@ -60,6 +60,96 @@ basic_body() atf_check test ! -e "testlock" } +atf_test_case fdlock +fdlock_body() +{ + # First, make sure we don't get a false positive -- existing uses with + # numeric filenames shouldn't switch to being fdlocks automatically. + atf_check lockf -k "9" sleep 0 + atf_check test -e "9" + rm "9" + + subexit_lockfail=1 + subexit_created=2 + subexit_lockok=3 + subexit_concurrent=4 + ( + lockf -s -t 0 9 + if [ $? -ne 0 ]; then + exit "$subexit_lockfail" + fi + + if [ -e "9" ]; then + exit "$subexit_created" + fi + ) 9> "testlock1" + rc=$? + + atf_check test "$rc" -eq 0 + + sub_delay=5 + + # But is it actually locking? Child 1 will acquire the lock and then + # signal that it's ok for the second child to try. The second child + # will try to acquire the lock and fail immediately, signal that it + # tried, then try again with an indefinite timeout. On that one, we'll + # just check how long we ended up waiting -- it should be at least + # $sub_delay. + ( + lockf -s -t 0 /dev/fd/9 + if [ $? -ne 0 ]; then + exit "$subexit_lockfail" + fi + + # Signal + touch ".lock_acquired" + + while [ ! -e ".lock_attempted" ]; do + sleep 0.5 + done + + sleep "$sub_delay" + + if [ -e ".lock_acquired_again" ]; then + exit "$subexit_concurrent" + fi + ) 9> "testlock2" & + lpid1=$! + + ( + while [ ! -e ".lock_acquired" ]; do + sleep 0.5 + done + + # Got the signal, try + lockf -s -t 0 9 + if [ $? -ne "${EX_TEMPFAIL}" ]; then + exit "$subexit_lockok" + fi + + touch ".lock_attempted" + start=$(date +"%s") + lockf -s 9 + touch ".lock_acquired_again" + now=$(date +"%s") + elapsed=$((now - start)) + + if [ "$elapsed" -lt "$sub_delay" ]; then + exit "$subexit_concurrent" + fi + ) 9> "testlock2" & + lpid2=$! + + wait "$lpid1" + status1=$? + + wait "$lpid2" + status2=$? + + atf_check test "$status1" -eq 0 + atf_check test "$status2" -eq 0 +} + atf_test_case keep keep_body() { @@ -141,6 +231,7 @@ atf_init_test_cases() { atf_add_test_case badargs atf_add_test_case basic + atf_add_test_case fdlock atf_add_test_case keep atf_add_test_case needfile atf_add_test_case timeout From nobody Fri Dec 15 18:57:33 2023 X-Original-To: dev-commits-src-all@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 4SsJPV0rzmz53wnH; Fri, 15 Dec 2023 18:57: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 4SsJPV0Nq4z3MJP; Fri, 15 Dec 2023 18:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zd/hM+fWjTE6/+AXplPIHUQnJ0oVS0fulgI88qWSELo=; b=mTq71kzQHY7YjohqFX8aKyx4B5fHqMVNKM2PMyNHpL2GptrUIERbDdeRRcJlgha7Qt+Dpu TokzUFQPiWg3qnh9vIE73IFs+OjExU+e5lNpiX1FfXxL8Bpyy2UwnYdktNAIwO7jl8kHLf PnL/v6y5KhLdS2afem9JbdmqBft5YTTA8Ig3n7EUXrMk8kw/m8cpiNP7BnEevCe9HWL9hb ljYiVcCrHkApo5kmr2fWHXWTNDcPX3xCEsmXrQ3vGiWjWTXaNZ5fnKtuPziWWXS4GaPxuq Oyn1nwq0m4JBSSXK2at59+dwtl/ACm3t91QRnZg1rQhUOqgZlz1OJt8Faz5QUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666654; a=rsa-sha256; cv=none; b=ZENW8weYnwfUgCafQlqJbLBUuBKPBSG0goI84KcsZsDRlbBZjOi4Sj288UoxOdCUbXmQTL Fwdgu+iRXQ8AJKuyp2SPq3CutgBcHfyGZvroK0r+tbult6cOoJPHiLpEfK/t7Jj4f9jdFL oeTbrScXVduThw8gipLkcEMKK/PPyywWhaJjpVcjP29MU+9ftDeZUgzYOwJi6CZ12+SKqP 5m5TDad2zbLdE8rrt88aZl6FtHJpqFMsWwgxe+vV1tGtjRbkrpS8S6zhIkgJEYKjyxhIXL hqC0u4RNZacwQMLTxw4lHPI7SxyQ7/60qWqTd5z+UMdN+au7fKSwXJfoIBkHBw== 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=1702666654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zd/hM+fWjTE6/+AXplPIHUQnJ0oVS0fulgI88qWSELo=; b=tHnQoohCPwxD60VHbQylZ/ZI0MVS+X+BmKigCkYb+ls9Yi/WRIUFnoYideyaYWcwhnQMW2 sBv/eSAiBLInPceb2rNQwdMyX3wZCgrEYwX3WazMKb1LKlBs7NKfR/0KVe4W6b2yQD6Mlf zj9cPVkC44mO571bZtISu+axxR5vUsdxm4hXv0PL0dteUhsHch24LTad2Xkquyx5WNAQNl aR5sUbn8sfpdEvpgkN/LBleQVoAOcbyEBJ9VcR9BGAfJPkFpjOJJQ0zzZx+VXkyHp3UCso bGz5K5sTvNj+ld1/9d0N2rwg0UK7pfQIC+GbNe9Tf5uIDQWD9MLtJw2Ns+C07A== 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 4SsJPT6JFWz7JD; Fri, 15 Dec 2023 18:57: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 3BFIvXrc018449; Fri, 15 Dec 2023 18:57:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvXA0018446; Fri, 15 Dec 2023 18:57:33 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:33 GMT Message-Id: <202312151857.3BFIvXA0018446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: feafc7d0bc74 - stable/13 - lockf: switch to strtonum() for parsing timeout List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: feafc7d0bc74bdf8506e592590c2e7e48e543a96 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=feafc7d0bc74bdf8506e592590c2e7e48e543a96 commit feafc7d0bc74bdf8506e592590c2e7e48e543a96 Author: Kyle Evans AuthorDate: 2023-11-26 04:27:11 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:59:27 +0000 lockf: switch to strtonum() for parsing timeout Convert waitsec to a long long to be able to hold the full domain of alarm(3) timeout on all platforms, and let strtonum(3) handle the input validation. strtonum(3) also happens to provide a neater interface for error handling, and it already includes our pre-existing empty input check. Sponsored by: Klara, Inc. (cherry picked from commit e4967d4d48b0a7d873e4f778c0a6e560e09d4dc3) --- usr.bin/lockf/lockf.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c index 49a4752a967d..f459b54060aa 100644 --- a/usr.bin/lockf/lockf.c +++ b/usr.bin/lockf/lockf.c @@ -92,7 +92,8 @@ fdlock_implied(const char *name, long *ofd) int main(int argc, char **argv) { - int ch, flags, silent, status, waitsec; + int ch, flags, silent, status; + long long waitsec; pid_t child; union lock_subject subj; @@ -112,9 +113,10 @@ main(int argc, char **argv) break; case 't': { - char *endptr; - waitsec = strtol(optarg, &endptr, 0); - if (*optarg == '\0' || *endptr != '\0' || waitsec < 0) + const char *errstr; + + waitsec = strtonum(optarg, 0, UINT_MAX, &errstr); + if (errstr != NULL) errx(EX_USAGE, "invalid timeout \"%s\"", optarg); } @@ -181,7 +183,7 @@ main(int argc, char **argv) sigemptyset(&act.sa_mask); act.sa_flags = 0; /* Note that we do not set SA_RESTART. */ sigaction(SIGALRM, &act, NULL); - alarm(waitsec); + alarm((unsigned int)waitsec); } /* * If the "-k" option is not given, then we must not block when From nobody Fri Dec 15 18:57:34 2023 X-Original-To: dev-commits-src-all@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 4SsJPW1s9hz53wqS; Fri, 15 Dec 2023 18:57: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 4SsJPW0sDnz3MJl; Fri, 15 Dec 2023 18:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GGi/F2vbxbX3+dEmCs99RvGQTMNWgk4ffT2HgWBdeWw=; b=TjMNPmO81zGZr+UJt5zi/1xhsYWClnJ2CB1clLe2tenCQY/mi5+M8oHDgisPbYE0elPTLj zY80Db122XhyrB+HDRAUKyb2Dz0ZodKHJGyeZ3M9gGzij0RNnrmNxCGrv1vXQvgZZHrLoz x8iWOnhuTff5lJftNnOCg6X22yqR78CTv/XtEj3rjmaYjXm8hk8VICHSodPwkTGc122UJb u/sXhh7IqSnk5v7CBCfmjo0Le5wjV6Z+/w2vNkoP5D63jI59nNyMCOPNHiCvgcYNx7ySui b+5BUiKUfRCgBX4qb/9vQF9l0g++l/FQ68xNLu1eiF/CZz8+8fUrUGPWhriQJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666655; a=rsa-sha256; cv=none; b=u/Vr3Zj1RsUsa00Iu9dB7a5n6nLsQm17e9QNKfMPMgs7Bwy98dyDrhTRxE/nLW4MV2NEFu CKJOl4tErrDlk2GCaSTokVfzrkViyzlA3e0NYE5z8Sdp28U996nec5exbCDRtEl5DQDSFU A+4fSe1UsrCSLuTqf6jypEoqoDWFp7t+vi02ZoWgb7HK/FKhC3jKbq0SOez2Tq7W5rSu0C nFvHE81Sa0YsaSXqg+9tAV4zUBfw83EYON3xpwPExkuM3bmpU9uPu6Tn28DZRYQhyHM3q4 hl49y5b/aZzqreWRA9UAi/VupyZJK2o93ANrReuZiNeWsvthWIM0ugLc8VeyMQ== 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=1702666655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GGi/F2vbxbX3+dEmCs99RvGQTMNWgk4ffT2HgWBdeWw=; b=rHn9o1s8MNTLi3XAabuXUM/5r3hgzVpmjvDDCGHXxxisFfKzLYHAYpqEWK6GDPn8HyZjc+ MXIFI+Jkz04M00QMJcizAuJ5hIuUIjCkl1f257APMhp6xLXPrO6oN5l9yEMBMPYYK3e8Lo pnv3nVEyM8IN6lw/XqVd7U9Emb808IaM1StsqO9VI/eh1SLctJB0iSVyuKca/PIO2Z2GnO s7yuH79CrdxwaA/SSOSxHG5lKosF/nhOETaeYRj4JHsRlCFx++DvNykDH3oXGMGc4eLBkt oyEjT5vPYR6S15dNJDHMMSHLd251n2w3RpqVdeH1H2swI6qkrbCkcjezelwebA== 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 4SsJPV74Gnz7cn; Fri, 15 Dec 2023 18:57: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 3BFIvYOF018494; Fri, 15 Dec 2023 18:57:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFIvYIM018491; Fri, 15 Dec 2023 18:57:34 GMT (envelope-from git) Date: Fri, 15 Dec 2023 18:57:34 GMT Message-Id: <202312151857.3BFIvYIM018491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 9986fd59d855 - stable/13 - rtld: add a test for RTLD_DEEPBIND List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9986fd59d855234cbb999b2a4099ad3cd094aa49 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9986fd59d855234cbb999b2a4099ad3cd094aa49 commit 9986fd59d855234cbb999b2a4099ad3cd094aa49 Author: Kyle Evans AuthorDate: 2023-12-01 01:26:09 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 16:56:59 +0000 rtld: add a test for RTLD_DEEPBIND This tests that with RTLD_DEEPBIND, symbols are looked up in all of the object's needed objects before the global object. ATF_REQUIRE_INTEQ was added after stable/13 branched, so we shim it out here. PR: 275393 Reviewed by: kib Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. (cherry picked from commit d9c543b6b0cabea6e6679d70b4e701018e7eab80) --- etc/mtree/BSD.tests.dist | 2 + libexec/rtld-elf/tests/Makefile | 5 +- libexec/rtld-elf/tests/Makefile.inc | 3 + libexec/rtld-elf/tests/libdeep/Makefile | 15 +++++ libexec/rtld-elf/tests/libdeep/libdeep.c | 28 +++++++++ libexec/rtld-elf/tests/libval/Makefile | 10 +++ libexec/rtld-elf/tests/libval/libval.c | 26 ++++++++ libexec/rtld-elf/tests/libval2/Makefile | 8 +++ libexec/rtld-elf/tests/rtld_deepbind/Makefile | 10 +++ .../rtld-elf/tests/rtld_deepbind/rtld_deepbind.c | 72 ++++++++++++++++++++++ libexec/rtld-elf/tests/target/Makefile | 2 +- 11 files changed, 179 insertions(+), 2 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index f9a551bbc39b..5714d873cb3b 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -432,6 +432,8 @@ rc .. rtld-elf + rtld_deepbind + .. .. tftpd .. diff --git a/libexec/rtld-elf/tests/Makefile b/libexec/rtld-elf/tests/Makefile index 7eacfb899699..06e143a441a1 100644 --- a/libexec/rtld-elf/tests/Makefile +++ b/libexec/rtld-elf/tests/Makefile @@ -1,6 +1,9 @@ -SUBDIR+= libpythagoras target +SUBDIR+= libpythagoras libdeep libval libval2 target +TESTS_SUBDIRS+= rtld_deepbind +SUBDIR_DEPEND_libdeep= libval2 +SUBDIR_DEPEND_rtld_deepbind= libval SUBDIR_DEPEND_target= libpythagoras ATF_TESTS_C= ld_library_pathfds diff --git a/libexec/rtld-elf/tests/Makefile.inc b/libexec/rtld-elf/tests/Makefile.inc new file mode 100644 index 000000000000..dfba72a51ce7 --- /dev/null +++ b/libexec/rtld-elf/tests/Makefile.inc @@ -0,0 +1,3 @@ + +PACKAGE?= tests +TESTSDIR?= ${TESTSBASE}/libexec/rtld-elf diff --git a/libexec/rtld-elf/tests/libdeep/Makefile b/libexec/rtld-elf/tests/libdeep/Makefile new file mode 100644 index 000000000000..9324b6f25efe --- /dev/null +++ b/libexec/rtld-elf/tests/libdeep/Makefile @@ -0,0 +1,15 @@ + +SHLIB?= deep +SHLIB_MAJOR= 0 + +LIBDIR= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind +SHLIBDIR= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind + +SRCS= libdeep.c + +LIBVAL2= ${.OBJDIR}/../libval2 +LDFLAGS+= -L${LIBVAL2} -Wl,-rpath,'$$ORIGIN' +DPADD+= -lval2 +LDADD+= -lval2 + +.include diff --git a/libexec/rtld-elf/tests/libdeep/libdeep.c b/libexec/rtld-elf/tests/libdeep/libdeep.c new file mode 100644 index 000000000000..e570769300cf --- /dev/null +++ b/libexec/rtld-elf/tests/libdeep/libdeep.c @@ -0,0 +1,28 @@ +/*- + * + * Copyright (C) 2023 NetApp, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +#include + +int get_value(void); +int proxy_get_value(void); +void set_value(int); +void proxy_set_value(int); + +int +proxy_get_value(void) +{ + + return (get_value()); +} + +void +proxy_set_value(int val) +{ + + return (set_value(val)); +} diff --git a/libexec/rtld-elf/tests/libval/Makefile b/libexec/rtld-elf/tests/libval/Makefile new file mode 100644 index 000000000000..66728c01dc9b --- /dev/null +++ b/libexec/rtld-elf/tests/libval/Makefile @@ -0,0 +1,10 @@ + +SHLIB?= val +SHLIB_MAJOR= 0 + +LIBDIR= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind +SHLIBDIR= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind + +SRCS= libval.c + +.include diff --git a/libexec/rtld-elf/tests/libval/libval.c b/libexec/rtld-elf/tests/libval/libval.c new file mode 100644 index 000000000000..97c97a0310a7 --- /dev/null +++ b/libexec/rtld-elf/tests/libval/libval.c @@ -0,0 +1,26 @@ +/*- + * + * Copyright (C) 2023 NetApp, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +static int val; + +int get_value(void); +void set_value(int); + +int +get_value(void) +{ + + return (val); +} + +void +set_value(int nval) +{ + + val = nval; +} diff --git a/libexec/rtld-elf/tests/libval2/Makefile b/libexec/rtld-elf/tests/libval2/Makefile new file mode 100644 index 000000000000..2b5cf5342092 --- /dev/null +++ b/libexec/rtld-elf/tests/libval2/Makefile @@ -0,0 +1,8 @@ + +LIBVAL= ${.CURDIR}/../libval + +# Just rebuild libval +.PATH: ${LIBVAL:tA} +SHLIB?= val2 + +.include "${LIBVAL}/Makefile" diff --git a/libexec/rtld-elf/tests/rtld_deepbind/Makefile b/libexec/rtld-elf/tests/rtld_deepbind/Makefile new file mode 100644 index 000000000000..bcc55d945c7e --- /dev/null +++ b/libexec/rtld-elf/tests/rtld_deepbind/Makefile @@ -0,0 +1,10 @@ + +TESTSDIR?= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind +ATF_TESTS_C= rtld_deepbind + +LIBVAL= ${.OBJDIR}/../libval +LDFLAGS.rtld_deepbind+= -L${LIBVAL} -Wl,-rpath,'$$ORIGIN' +DPADD+= -lval +LDADD+= -lval + +.include diff --git a/libexec/rtld-elf/tests/rtld_deepbind/rtld_deepbind.c b/libexec/rtld-elf/tests/rtld_deepbind/rtld_deepbind.c new file mode 100644 index 000000000000..30f71331bc62 --- /dev/null +++ b/libexec/rtld-elf/tests/rtld_deepbind/rtld_deepbind.c @@ -0,0 +1,72 @@ +/*- + * + * Copyright (C) 2023 NetApp, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +#include + +#include + +int get_value(void); +void set_value(int); + +#define APP_VALUE 5 +#define LIB_VALUE 20 + +#ifndef ATF_REQUIRE_INTEQ +/* atf-c/macros.h */ +#define ATF_REQUIRE_INTEQ(expected, actual) \ + ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd)", #expected, \ + #actual, (intmax_t)(expected), (intmax_t)(actual)) +#endif + +ATF_TC_WITHOUT_HEAD(deepbind_simple); +ATF_TC_BODY(deepbind_simple, tc) +{ + void *hdl; + void (*proxy_set_value)(int); + int (*proxy_get_value)(void); + int app_value, lib_value; + + set_value(APP_VALUE); + + /* + * libdeep has a dependency on libval2.so, which is a rebuild of + * libval.so that provides get_value() and set_value() for both us and + * the lib. The lib's get_value() and set_value() should bind to the + * versions in libval2 instead of libval with RTLD_DEEPBIND. + */ + hdl = dlopen("$ORIGIN/libdeep.so", RTLD_LAZY | RTLD_DEEPBIND); + ATF_REQUIRE(hdl != NULL); + + proxy_set_value = dlsym(hdl, "proxy_set_value"); + ATF_REQUIRE(proxy_set_value != NULL); + + proxy_get_value = dlsym(hdl, "proxy_get_value"); + ATF_REQUIRE(proxy_get_value != NULL); + + (*proxy_set_value)(LIB_VALUE); + + lib_value = (*proxy_get_value)(); + app_value = get_value(); + + /* + * In the initial implementation or if libdeep.so is *not* linked + * against its own libval2, then these both return the later set + * LIB_VALUE (20) as they bind to the symbol provided by libval and + * use its .bss val. + */ + ATF_REQUIRE_INTEQ(lib_value, LIB_VALUE); + ATF_REQUIRE_INTEQ(app_value, APP_VALUE); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, deepbind_simple); + + return atf_no_error(); +} diff --git a/libexec/rtld-elf/tests/target/Makefile b/libexec/rtld-elf/tests/target/Makefile index f63d8072ae3c..aa4875b6748d 100644 --- a/libexec/rtld-elf/tests/target/Makefile +++ b/libexec/rtld-elf/tests/target/Makefile @@ -2,7 +2,7 @@ .include PROG= target -BINDIR= ${TESTSBASE}/libexec/rtld-elf +BINDIR= ${TESTSDIR} WARNS?= 3 CFLAGS+= -I${.CURDIR}/../libpythagoras From nobody Fri Dec 15 21:32:54 2023 X-Original-To: dev-commits-src-all@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 4SsMrk5Xp2z546fN for ; Fri, 15 Dec 2023 21:32: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 4SsMrk3QGgz3c24; Fri, 15 Dec 2023 21:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702675974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TzWLGIuyJ5DhV7IBPt6WvPcR1w842No8kbI9RLhQBC8=; b=lxW7bnrW00bxFA5MVa33sAwM6JGC5IiGR6ICwxn7213LxZoiVd6Kvf5exaAudjTeGPaDTI OtGPFB2olPkQc+GJC57/E98OtQmODLd/V6AEHIfAwbzlLQVMK92YfIUB2/cFvQl2JC8uDV PLUNBgf+EAUHP4yOVMqZJleotMn6o4Tnfggs+fJJhrLgAdA1XtkfDaUGq/2p0qramZ2Z4n rUybXX7bctoj14pFubQKiSozo8Pu6COjEOZzyo1N/B8FYi+KPLHJhc0lJjQeiMjozk5186 AffUGvjwlKRMCSiJAQrs6UwaoJMP8SGqoWcr8e17zgeIMTkjNqUsxUUZf3GlGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702675974; a=rsa-sha256; cv=none; b=xh6fzRTGZ8pSAO5NsPDfGhf6b13oJYBvgUJ/jcmyMBy+vhAqr1mNn1CkulNKjJYOkVYxVD VUKs5OWaleThmRfgJwAuFYyawyvUjiwOOf1llZAWq4rEuPyiJCK8eOHR6d+I0awBimm0IR xf2/VbNXkDaxM8/5FQUBZ43/0xK9Wt1yZOkV4xcIuyfPW1KBw0GJGEHYQ5f46u8kugb5tj U3OZXeVpnQVptzJ1uQOqx+mpR0aburKPJXIHgruM2YsgcxKm+LMvv3lRAg7urxUpes913/ i/Yv9aYVMYDJPrjhfaeL+tX2gm1fKNPjBZ+RItJpJYA0c7io+wgmIsJVjF3nDw== 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=1702675974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TzWLGIuyJ5DhV7IBPt6WvPcR1w842No8kbI9RLhQBC8=; b=WR9R4P38PT1eXv6NzbhKEcZlhEOuvKQ/eg+vC/bHtBQiLqtNkybjtOreoME7xuHSdnbZ2m PEhyFugyZIFsDE6NYdtOmLAM0YM4T4h3BZaKaH5JnGqgUAr8aBBvMOq+Z4cfgopQLdbP87 XkLxFsOciAkocWPPlw8jSZdd8fvuTks674IjxuhGeJSEjaFDQ8ko5dXYKQttj5Zr78ByKB eG/P7Y2ORcwHrCv4gQ0NhJfQRXbVh0kdtKiteUFBv2j+0MNzhyLWhAcwAuxZ4HU1eDjYr8 Iaq7MKP6KGPCfyfE5ld2Q59p+1012rPriy9c5mSJTyfFAorK4pf/Tf/5ja7T8g== 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 4SsMrk2Tv8zCf1; Fri, 15 Dec 2023 21:32: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 3BFLWspw086497; Fri, 15 Dec 2023 21:32:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFLWsad086494; Fri, 15 Dec 2023 21:32:54 GMT (envelope-from git) Date: Fri, 15 Dec 2023 21:32:54 GMT Message-Id: <202312152132.3BFLWsad086494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: 2387678b9456 - internal/admin - Welcome Olivier Certner as a src committer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/internal/admin X-Git-Reftype: branch X-Git-Commit: 2387678b94564f517a47e13db25ea79aed65d919 Auto-Submitted: auto-generated The branch internal/admin has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2387678b94564f517a47e13db25ea79aed65d919 commit 2387678b94564f517a47e13db25ea79aed65d919 Author: Ed Maste AuthorDate: 2023-12-15 21:30:46 +0000 Commit: Ed Maste CommitDate: 2023-12-15 21:30:46 +0000 Welcome Olivier Certner as a src committer Olivier has been doing good work, both as an individual and under FreeBSD Foundation sponsorship. emaste and markj will comentor. Approved by: core --- access | 1 + mentors | 1 + 2 files changed, 2 insertions(+) diff --git a/access b/access index a96a59cdc895..4284dd949ef8 100644 --- a/access +++ b/access @@ -120,6 +120,7 @@ nwhitehorn nyan obrien oh +olce oshogbo peter peter@wemm.org peterj diff --git a/mentors b/mentors index 694046ed0e88..c75bc0bbc18f 100644 --- a/mentors +++ b/mentors @@ -17,6 +17,7 @@ dsl bz gordon delphij Co-mentor: emaste jfree imp Co-mentor: markj oh manu +olce emaste Co-mentor: markj pjd allanjude Co-mentor: oshogbo ram ken Co-mentor: mav rcm kp From nobody Fri Dec 15 22:09:19 2023 X-Original-To: dev-commits-src-all@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 4SsNfm10gpz5497q; Fri, 15 Dec 2023 22:09: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 4SsNfl59Z2z3dqq; Fri, 15 Dec 2023 22:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702678159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tIfifwJku5x5ey3DQ6YR5eqfzLXkwLNcdkuUMJUvJm0=; b=nMl3q+Upasui2PmYVepIt4BEcks5uhDe37mKmSSTRNHULqICnoViLcYrBU1ZN7qcjkAQNP fVJcWzWUTfryyFKnAUm/xHhOffw74fIVpJsuWuMiHalppMTPouUOqFd9cBxwVazP175CUe 9u34/XJHFFlxiQnxjIDkrmnhmnSHT7RDwZ0SD7h3hoSkHgUdu72G4St06ta/w0kY9l7LXn sT3aOJ2iPKeWXjR2l/z6EcYy01WZf19/tkPf4abh4luxXx4PXnRLK1MQdPalYOOUmNnWvm /WtCFwv7vHp6/5FQf2f2r4jFYa+voY3bOOxl5IBg1odYOeKHOv2Q3ASbqkBfWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702678159; a=rsa-sha256; cv=none; b=I/LCkjF3I9Do4ZmGH5ZO+h+laInIuuQKOfJNik7TPamYjnwY2b0eBTFlqMvWRsQV3VQwHe jrKZUJfulPqIT34J3jEYTGN3E7wB+ERf0FnlAkqAXHJdaQc+1W+7BAj2llVJHt828Y6zZV KcpdYUdITu6d1ganfIbHSbppRtejmrbBm50wt6mZIzeWuw55aVhZbeuCj+dRnO3OgxzPMm CRSje7ajwzFayOwZoBHePVxG87oMdfzO+s4hZ+dwRxbTqIsALdSm/m6Sg09ic26re1lAlY v0DaLxhL5KbwRHGOLiSRc0Dvfw4ybhfi6Q+NQUhtq537lg1ycicc12tRgHsfwA== 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=1702678159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tIfifwJku5x5ey3DQ6YR5eqfzLXkwLNcdkuUMJUvJm0=; b=NpY5EkHBusQvA+vcuuxRiZ5gAZJkS2IFdB0qwIdws4pHYY7CLgbBgda8zSybdqQV9bJ9Vx FdpeGmF7Jb2166lm8vdkDsXOSQQsdMIWOVE4lHZz/78PMCOtNs2Y26hb4Mh3miyYTygmQY p9WUqxcY4eOE+tlyZKwDcYrJxj6FmH1hhvA7wuVl8iUYyNeVnQbma0iL4jSTspW+tZop+q tY+NeNp2vC+kf6phzknynjGolR3JNLorfs50hvFVT3Jp71IMr05Fy07jfT7NpFZMozA9k3 8Zn8ym0C646QxhQ2x88b2AlLAnNX+kbb/c0mXKHWY5BPvWREqYFoknMX1E214g== 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 4SsNfl4DtLzD8k; Fri, 15 Dec 2023 22:09:19 +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 3BFM9JYQ038545; Fri, 15 Dec 2023 22:09:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BFM9J2o038542; Fri, 15 Dec 2023 22:09:19 GMT (envelope-from git) Date: Fri, 15 Dec 2023 22:09:19 GMT Message-Id: <202312152209.3BFM9J2o038542@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: ca39f23347e1 - main - ufs: do not leave around empty buffers shadowing disk content List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ca39f23347e1416a28dde13279bfe5841ad9a746 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ca39f23347e1416a28dde13279bfe5841ad9a746 commit ca39f23347e1416a28dde13279bfe5841ad9a746 Author: Konstantin Belousov AuthorDate: 2023-12-11 22:57:28 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-15 22:06:10 +0000 ufs: do not leave around empty buffers shadowing disk content If the ffs_write() operation specified to overwrite the whole buffer, ffs tries to save the read by not validating allocated buffer. Then uiommove() might fail with EFAULT, in which case pages are left zeroed and marked valid but not read from the disk. Then vn_io_fault() logic retries the write after holding the user pages to avoid EFAULTs. In erronous case of really faulty buffer, or in contrived case of writing from file to itself, we are left with zeroed buffer instead of valid content written back to disk. Handle the situation by releasing non-cached buffer on fault, instead of clearing it. Note that buffers with alive dependencies cannot be released, but also either they cannot have valid content on the disk because dependency on data buffer means that it was not yet written, or they were reallocated by fragment extension or ffs_reallocbks(), and are already fully valid. Reported by: kevans Discussed with: mav In collaboration with: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_vnops.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 0a327aab155b..e9849008cde2 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -978,8 +978,15 @@ ffs_write( * validated the pages. */ if (error != 0 && (bp->b_flags & B_CACHE) == 0 && - fs->fs_bsize == xfersize) - vfs_bio_clrbuf(bp); + fs->fs_bsize == xfersize) { + if (error == EFAULT && LIST_EMPTY(&bp->b_dep)) { + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + brelse(bp); + break; + } else { + vfs_bio_clrbuf(bp); + } + } vfs_bio_set_flags(bp, ioflag); From nobody Sat Dec 16 01:00:45 2023 X-Original-To: dev-commits-src-all@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 4SsSSZ0GB7z54LD8; Sat, 16 Dec 2023 01:00: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 4SsSSY6y14z4M3Q; Sat, 16 Dec 2023 01:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702688446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h9eDRQ7NbyDM25lu86Xcq33Oqt23yYI2XPccvAmqndo=; b=j8ISOFkHizK04F8y2PxSRjAs2obinIQiVvyzZSzJamARY/mg67L7Z4nuhNc6AkKnvaNJXa ire7c5h3Nm34pWw1vgaskPdf5YRluwELNZ42yz4xpVD1IFHE5TE019oGEAu5qxSIfH66Lz jAJ6lt7QrH1kXBAhYl3TW/r4cQqWkEGTM3I4jXFhZT0iB9vi2rd1SSFh4WQeV85PrE7TWt lkiTk8za1+yxXVGyKW7AXF3/1qzYYLeQwesR1pqO0Qxlnss3U8LyIF1IfwefC+1r/7Vmv2 B0cVHwW9F4yz4ZTIDax9ISvjGPRN93zSob3oi1qHdM5GFjV1PU7LFWMpixUFrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702688446; a=rsa-sha256; cv=none; b=iBRxGBruVjz0sLGHODGl+vcuUH/LKfUj7M+eodvf1re7AhWAX3OP/EIQ3eKi2pSFdbuZGL 0UaPTBG5bDBtdOsptgI8xjvxKxIKeuSny7QbELbIABqK47Iyj1o20s9npaWTgcAp+WOJQP CV60L93rTejEDzjxapK1lY2uyeoK4CT+5pp1lr7Z5O/fNX+jM8fVAhXALbIPHIrxKv60Yb WFw8m0gnx/nvSKq0lNLoxpCvDbfADFAAJYtRGvYrDroHwURxV+TtdxJQ3AozWSdVpU8Xxj ZvJmbuPT7a8cvb9TfncJ4FJ+n/oFQ1cI/e77AUJw4YbQ1JK1gg2HUcOB2KfDLg== 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=1702688446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h9eDRQ7NbyDM25lu86Xcq33Oqt23yYI2XPccvAmqndo=; b=GulP/6bFy+7EiDDdvd0euLOE8tNlQ2g1WL8HHGesahrMMkv7jChwJqxL4WjRT2dmjZqL9i PTd68gl8WLcG6MSfz+i2sP04h8F75nUIzBHHTPdUvwe8UcDNHbDTHe/Ouwp7Z4fgJWgoof +eKfLr6Z7tdXrftpoOysZNZFzljlp2Wyfr9TTBg5cJHSG41DRXRe02J0lrrhHc9B65bRm1 kknmWvkPjIbwLy6QlypUhvXe9lkNCIkRhfnJSPGz8pdUh74Q4z0v2gWG5arHxo2DDZ4czR JrHQNzcmorMnxWSIwnqDwzKYfkX5zRjemnQkHKPOJZe6JSeJRFuX9RR7SDdZVw== 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 4SsSSY63jtzYZr; Sat, 16 Dec 2023 01:00: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 3BG10jlp031637; Sat, 16 Dec 2023 01:00:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG10jTD031634; Sat, 16 Dec 2023 01:00:45 GMT (envelope-from git) Date: Sat, 16 Dec 2023 01:00:45 GMT Message-Id: <202312160100.3BG10jTD031634@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9fc9a302178e - stable/13 - git hooks: add "Tested by" to commit message template List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9fc9a302178ea3f60f18e963236ae31a82e001db Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9fc9a302178ea3f60f18e963236ae31a82e001db commit 9fc9a302178ea3f60f18e963236ae31a82e001db Author: Ed Maste AuthorDate: 2021-02-02 18:36:45 +0000 Commit: Ed Maste CommitDate: 2023-12-16 01:00:26 +0000 git hooks: add "Tested by" to commit message template Reported by: mjg Reviewed by: imp Sponsored by: The FreeBSD Foundation (cherry picked from commit 9d0f1092cf90c8bf161cb946584f703a9998f8cd) --- tools/tools/git/hooks/prepare-commit-msg | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg index 0ebec48fd9a5..6a8db33649f0 100755 --- a/tools/tools/git/hooks/prepare-commit-msg +++ b/tools/tools/git/hooks/prepare-commit-msg @@ -45,6 +45,7 @@ $(awk '1;/^#$/{exit}' $1) # PR: # Reported by: # Reviewed by: +# Tested by: # Approved by: # Obtained from: # MFC after: From nobody Sat Dec 16 01:00:46 2023 X-Original-To: dev-commits-src-all@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 4SsSSb1pYcz54LNg; Sat, 16 Dec 2023 01:00:47 +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 4SsSSb10Grz4MS1; Sat, 16 Dec 2023 01:00:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702688447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mhG0Wegs7AhnUXNMe9ZadwWITOOaHjJ5PKHRGeVNGSg=; b=V0wQ3rdWNiVcpOD/7xhOghzRo6UhGDGv99vZbIFiVnsSBenwzLwPwb+QPq2jzgxPqMEgpE z/QoLHvW9LT5r/Kd4vqX2dgv62VdUh10dXGseiP3w3yQCAVpM7xt4djQEg25zZcpN41JIL fGExRkJdVMhlCqsK75MSm6i8AvD6EVvtWzCR6UBTwhM2EDvBWpIN7NyX2hWnzcWNmS5Fa2 vdJ5tACbhQyzw25ynVdc0CgH8xglW8zKxVGNQaTrfFX7BCIHrbjdPloizy/XIFUtOafI7g o1MljTwzI8NkL4lUyCE750NqCVU+iiUUU6wIVkdnYERfe8ykJpms4BIHpFeHFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702688447; a=rsa-sha256; cv=none; b=Wj50QhjxGZRrv3upSEKfBbiJSnoOliuMf0JGMwWFtmd0ii7HSvVl6hrVG8JAVc3jITXkrC uBj6GriFiMeRzkbvHRY5yBUNcuG3gF/DtnZjqZH9fDWOxP7uHIHP7GSCHyc8GZepoPOQlt 0yRZ/cG/ZL5U1MU5ZZt/TcR1pF0ZNpeHLV46WDamu2eaauWLEdGAZcziXrsJ+jjTwJ8rBS llQmMs/1R/E/iOjXKMgKe97Il4y/tJEXbNjv+pJ3U5yo4+oiuFdsjm+DZSjYXYHbgae7AT lFUPbCBlaTvxu/Fb+hGxwW0mGJmXg1THlnwtrxOLL15Gx4uJuBLiA/ZxsV3JKw== 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=1702688447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mhG0Wegs7AhnUXNMe9ZadwWITOOaHjJ5PKHRGeVNGSg=; b=U0lbHfrutQOEZ1Min8DJlTjUULNz2AuA+VToPxKsQvmq+Uq2xSZCrR3t7TRgKYZc/w1CE9 rdrfAwcsujWQA7o2wUdQFnjIezyO6dJAJxBulHRCAtEHJ9dPEQn7II5gDx9B/nG23UoeB4 NYAibp8Vw0eJmp5jZAgsw+jj+cus7Vhey5ouzrzCVIEONo6lbhjTGKdF2St5lj/Qf9ymVI ZlsGrHNkEmgeMtwJPh2Jj7FFgCq8b6tgMCas/5W769o0fVdiIHRO32yfBP5caz3mpScsrD 3aDfpgp5Bs8rgrRBw3tlx0HQS2/8yZLDJK5mFxSp/x4Q1ALJY2ijCCa4kcxeiA== 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 4SsSSZ704MzYRw; Sat, 16 Dec 2023 01:00: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 3BG10kCE031691; Sat, 16 Dec 2023 01:00:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG10knl031688; Sat, 16 Dec 2023 01:00:46 GMT (envelope-from git) Date: Sat, 16 Dec 2023 01:00:46 GMT Message-Id: <202312160100.3BG10knl031688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 19f7fb2ec731 - stable/13 - git hooks: add "Fixes" trailer to commit message template List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 19f7fb2ec7316d37478c0e2d5dd345f2879f4c3c Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=19f7fb2ec7316d37478c0e2d5dd345f2879f4c3c commit 19f7fb2ec7316d37478c0e2d5dd345f2879f4c3c Author: Ed Maste AuthorDate: 2021-02-20 18:49:31 +0000 Commit: Ed Maste CommitDate: 2023-12-16 01:00:26 +0000 git hooks: add "Fixes" trailer to commit message template A number of projects use "Fixes: " to identify a commit that is fixed by a given change. Adopt that convention. Differential Revision: https://reviews.freebsd.org/D28693 (cherry picked from commit aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3) --- tools/tools/git/hooks/prepare-commit-msg | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg index 6a8db33649f0..9d85b205d968 100755 --- a/tools/tools/git/hooks/prepare-commit-msg +++ b/tools/tools/git/hooks/prepare-commit-msg @@ -48,6 +48,7 @@ $(awk '1;/^#$/{exit}' $1) # Tested by: # Approved by: # Obtained from: +# Fixes: # MFC after: # MFH: # Relnotes: From nobody Sat Dec 16 02:32:34 2023 X-Original-To: dev-commits-src-all@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 4SsVVV5p3yz54Qkf; Sat, 16 Dec 2023 02:32: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 4SsVVV4yXHz4XHk; Sat, 16 Dec 2023 02:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702693954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3O5ovnna72f8mFE55qKGkt1/By67X+iFwC7fHFpo9Uw=; b=CATgGIVKPv/x8XirAhs2mwzR+tcXCESNjAve5AusnK2ot3kJjUnAx9C4Obs7ooPMmwoDG9 rNp4VnZbYRjJ4T+cyYZzO1/4I1LLPybfcuY2oylv7wOKdIvtYSJcxpLvWu4Ii9yYtT68bV nbkAyZloBmVjhsFxTg7rPRrv+vDBUQ+QKF4L5JvRe6jEEt2d4fSSay+DITURJTJC2mbi4A hi/xr/nAa8+iTUHLrovvKmLnnuhOX9yig/Xp7qK0nN1FiK2kYLFFzikxP3MM/CHfe0o+t5 rRV5ykFQYkb5VxqgWjetul2yFZ9XJQRcePUKC9+1Y0GoQTLyj1sdBMf77K1MCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702693954; a=rsa-sha256; cv=none; b=aQPR14l6DZqjnUJl13/Marf/HpXQE5IWUv7GFSewQjk1rL9J47a/GT32Sqwekhx2kGIrA8 O2/tI6WLuaM3SGJYQxMxd7Bdu/5BIbaRe6FT+J+y/yD2kaFFVno96bhRBKWqpLd+CWxhOR 7ngiDBZMgddhoKErTPkgA0AcCBeUgIsU/qth0VK03UFoJfhM0Uqh/hhXK80/PJy4cC+FSB XszQv3vKLKwsMh8km9F+4jiYjxZ17Hus1YJklqA7aCbCv0pL2xOVgLoLLYpLljzLbizaxA NNoyV7yGj4cvFEsyCU6gfnPgHP6nvQJ+b4jAwuxcE2YVHTs6R+Oe+P0oJ3Y2kg== 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=1702693954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3O5ovnna72f8mFE55qKGkt1/By67X+iFwC7fHFpo9Uw=; b=RmbAvbWAYFGtb8+NJmQ9pngVGmZd+XG7px7crreprjYQfIBgb9g+7Ku1oipZVCqcuzTxJK K52YDMDSYMrqi/gq6+gbfVXuBE46crCqWN5zB9TBywxlCmZBwjiK3CKatPyUeTo4bowlvZ MN6Q9/VJ5ufHMEACY8i6DVDzL/38tHWRnxJCTZJ7+zyqY/23rbSG6XgbZgDIwXcrNmemam ePPxDw0ShespvS/G+NQNRcAHF2+NgdBfgcr2czX1WPK4Jon/BtX6tWtuI1nxTM1UktPQjj S67JhwhuXb00R24umoa+vh2dtYXIMs6wni+H8/v67gP8qjIRvuKr6YwS7eR8dQ== 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 4SsVVV41BLzc19; Sat, 16 Dec 2023 02:32: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 3BG2WYG7087868; Sat, 16 Dec 2023 02:32:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG2WYDA087865; Sat, 16 Dec 2023 02:32:34 GMT (envelope-from git) Date: Sat, 16 Dec 2023 02:32:34 GMT Message-Id: <202312160232.3BG2WYDA087865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 163c43423815 - stable/14 - rc.conf: correct $ntp_leapfile_sources List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 163c4342381530cfc5dc78a457cb1f9e355d687a Auto-Submitted: auto-generated The branch stable/14 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=163c4342381530cfc5dc78a457cb1f9e355d687a commit 163c4342381530cfc5dc78a457cb1f9e355d687a Author: Philip Paeps AuthorDate: 2023-12-07 05:48:13 +0000 Commit: Philip Paeps CommitDate: 2023-12-16 02:31:41 +0000 rc.conf: correct $ntp_leapfile_sources IETF is no longer serving leap-seconds.list. Point at IANA instead. This fixes "service ntpd fetch". (cherry picked from commit b1c95af45488bef649e9a84890e2414ff80b3a00) --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index f5d0605c8436..c92bb0135f4d 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -422,7 +422,7 @@ ntp_src_leapfile="/etc/ntp/leap-seconds" # Initial source for ntpd leapfile ntp_db_leapfile="/var/db/ntpd.leap-seconds.list" # Working copy (updated weekly) leapfile -ntp_leapfile_sources="https://www.ietf.org/timezones/data/leap-seconds.list" +ntp_leapfile_sources="https://data.iana.org/time-zones/tzdb/leap-seconds.list" # Source from which to fetch leapfile ntp_leapfile_fetch_opts="-mq" # Options to use for ntp leapfile fetch, # e.g. --no-verify-peer From nobody Sat Dec 16 02:34:20 2023 X-Original-To: dev-commits-src-all@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 4SsVXY20bvz54Qhc; Sat, 16 Dec 2023 02:34: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 4SsVXY1KtMz4XYt; Sat, 16 Dec 2023 02:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702694061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SXCunpzRnjOwiJEdUB/FNsKbu7kl3F/9/BggAVpaxtk=; b=AtpBbLfkr4xMsZk7f9fA42OKbHJN6Un5rFwv8/KTb6kRzpitp1JFF/1kXulPNPLVmZ+5T/ oKLwviVQehCMXml+qBQe80cq0NQ4o2hFMs0d02HrI9jRzzl9YAnks3hACs1x/zvE33MaBc B21S5hEZFXLKLm21EeNgdpVNseD/nZCJED/4rGvJOlgGEIrR+6lQBCoJI81sAk7DKz7tnD ktwBrwKcfWdcWAEJy4hskqJdi0OstT86BWkyQyyJL3vUFgqabOJ7oSnXvvQ9el/xGu3zXx jyBhK2wdqwfX/lyiBaB/UrlBoH4LRAwDFQ0+fseAsxlxjD0ics1l8rFsVotNDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702694061; a=rsa-sha256; cv=none; b=YLTp5S8dz+M3cYygO164ZYvw7SFqBp/J3vB6/y9bmuOYeszgZGJnJXbu2nF3P4B6Rn5c1j s2uyroUA/S1LPa0xku1ic3qSPxucpAb3Sxq0d3AzQdUd71eS93n5Bl2C3bEl2ARjiwZHOW eH4loG2NDnSqRb0rINFGxxrqtPf8+4XrmbCdYIMRs78xTcFk28AJFtw5kqSnX9Qf7rxoyJ IXYVYrYEsUWbXOH2LXyW9MaqiXfZDoWvmxtk+RwSXhLUmBD92+OCZIU2mtAx4bKkgVogVa NTQJBxLAvJ//aPci9BOKyu5kECmknWmm53IZukrvkK2jYFU36mvuMXCLQIKtlQ== 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=1702694061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SXCunpzRnjOwiJEdUB/FNsKbu7kl3F/9/BggAVpaxtk=; b=IoqsieKkuKjB4Y8rWgHKL55loe86VdhbdvIDLtAnxXYqJpuUi3lfB4S4EGXbfDb2W8gJeA 4DGPRVX8qvwChpluBYEFgjPDHlxHOVvHpbYc05763/Gi0fMk+jGZ6pDnQfiA+nICWx/cRH JU9VOsKG8FJwBsFKTjKeFurH0jJevTZOTUejnGlAN2vmdHzSamUKyWp8/Kn8Gc7lYAJUY5 dp8LGxj8fcj6tOJcCXMIeaE0V4pQ0iKb1D42yzbToWDE5UYNyzq4Um3mmqxozvKFbi97up h6qmi0ZinOnrv7qPnJwPRgZ2s5DSkzx0nA4ZFrH1Qn6K78DtSLVl7cifInKNyg== 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 4SsVXY0NSrzbH4; Sat, 16 Dec 2023 02:34: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 3BG2YKL6088276; Sat, 16 Dec 2023 02:34:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG2YKUD088274; Sat, 16 Dec 2023 02:34:20 GMT (envelope-from git) Date: Sat, 16 Dec 2023 02:34:20 GMT Message-Id: <202312160234.3BG2YKUD088274@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 74a8c6da4f28 - stable/13 - rc.conf: correct $ntp_leapfile_sources List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 74a8c6da4f28e691c169aa502713a5aaebc00584 Auto-Submitted: auto-generated The branch stable/13 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=74a8c6da4f28e691c169aa502713a5aaebc00584 commit 74a8c6da4f28e691c169aa502713a5aaebc00584 Author: Philip Paeps AuthorDate: 2023-12-07 05:48:13 +0000 Commit: Philip Paeps CommitDate: 2023-12-16 02:33:58 +0000 rc.conf: correct $ntp_leapfile_sources IETF is no longer serving leap-seconds.list. Point at IANA instead. This fixes "service ntpd fetch". (cherry picked from commit b1c95af45488bef649e9a84890e2414ff80b3a00) --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index a8ea27eb3420..165f0a3ab562 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -419,7 +419,7 @@ ntp_src_leapfile="/etc/ntp/leap-seconds" # Initial source for ntpd leapfile ntp_db_leapfile="/var/db/ntpd.leap-seconds.list" # Working copy (updated weekly) leapfile -ntp_leapfile_sources="https://www.ietf.org/timezones/data/leap-seconds.list" +ntp_leapfile_sources="https://data.iana.org/time-zones/tzdb/leap-seconds.list" # Source from which to fetch leapfile ntp_leapfile_fetch_opts="-mq" # Options to use for ntp leapfile fetch, # e.g. --no-verify-peer From nobody Sat Dec 16 02:35:06 2023 X-Original-To: dev-commits-src-all@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 4SsVYQ63HFz54R97; Sat, 16 Dec 2023 02:35: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 4SsVYQ5Xjdz4Xbf; Sat, 16 Dec 2023 02:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702694106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XXRzJWCdqEQ67+igOYaz9zrGD+wKAxqksNq2g9dm7PI=; b=rUXE6Mfni1rq9yaMZ87unhGjc4nK8gCDZV3uQ9sI6D6yrjU3pZtKYVbe3nMc1Fcpm5q8GB ohRB0nvRq3Mip8ii4os94q0GxRDQUV5MFAB0tY++9/czoqScSVqQ6yX0XV4t2esx0WyC4c FwmlvcO/b9qCLEgZM0j1AlUtdJkssEB807XnWLrXLu1+UquCTYuTdto8KA3mnk6/PPYejx qPdyq7+eR00+mRVj86THJXzEwByiMPgsJZz/Q3RaQMRfCCCR2LNboOr6gMzrk3XrZd7kRL Zk7AZ4AabRish5QVTZwqI71kpmxP6s1ZxCmVf6KvOJG3BotOsmQFgyF1YrJvUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702694106; a=rsa-sha256; cv=none; b=j4bahbDjjKQ23pz0aKJMY8mMpdaYY2vNrSy9Do5AHNTdxiObUbGqlkgMEWIddNaJKhjjRP clFrVZ4A7ijweqXQ34q3bjfqH179rv/cqi9KSiUS61dSRdYnl/MQKpXFlgV1AcZch6uWOs aeJeYlRcZsR+i+myWUqpKRt4Wi7Il6eS94sKqdxKABgVB1aPIecQO+fDl2plUryFr0nKei v/K+B467vm6357pAlcvchBTJWa5QCUxDdcK7KFJ6WfsN5J39v6gtBJx1vz88asGAnOyAoG n5lB/GD7bbtj9KboKxbxxBMKrjvBYadEvqJ/+cEKGrmLqe5R/PhciRScVDikiQ== 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=1702694106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XXRzJWCdqEQ67+igOYaz9zrGD+wKAxqksNq2g9dm7PI=; b=QZs5gIXEX0s5r2gVvx/T3u5g66PRiqe0+h74FTDG4yESIHB2vh9+02H/B9i8EragEP1ktr 2WAwVCQJeCZ/E7rVhJCGujuHyfNvnt55hr2vxjBNu/nryQSYUEPXb/kKYJUmcYBq8rfiil rcyFUE+Ri43q9L3DeE50ohReaSoAsAauvLvheetV9Q7xXaJjctb4cA5yzEUyffNRvdOctW jwNiRyRILLuvRFYboY77KChVIfeq/sM54m6K9NQwNNgTAZX9ji0kccJppFk+mpmeSowi7X yhWqiAtrYX7pJZdKCr3IMH0/V4jiTi+SENWWvsyktkPAlAAm9AjMt/u1O51Tpg== 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 4SsVYQ4bBPzcJD; Sat, 16 Dec 2023 02:35: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 3BG2Z6EM088512; Sat, 16 Dec 2023 02:35:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG2Z6iq088509; Sat, 16 Dec 2023 02:35:06 GMT (envelope-from git) Date: Sat, 16 Dec 2023 02:35:06 GMT Message-Id: <202312160235.3BG2Z6iq088509@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 890afd892c13 - stable/12 - rc.conf: correct $ntp_leapfile_sources List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 890afd892c13d3ab13622a6b9c17ea7236217cf3 Auto-Submitted: auto-generated The branch stable/12 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=890afd892c13d3ab13622a6b9c17ea7236217cf3 commit 890afd892c13d3ab13622a6b9c17ea7236217cf3 Author: Philip Paeps AuthorDate: 2023-12-07 05:48:13 +0000 Commit: Philip Paeps CommitDate: 2023-12-16 02:34:43 +0000 rc.conf: correct $ntp_leapfile_sources IETF is no longer serving leap-seconds.list. Point at IANA instead. This fixes "service ntpd fetch". (cherry picked from commit b1c95af45488bef649e9a84890e2414ff80b3a00) --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 122033d7fd88..37d8754ac908 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -404,7 +404,7 @@ ntp_src_leapfile="/etc/ntp/leap-seconds" # Initial source for ntpd leapfile ntp_db_leapfile="/var/db/ntpd.leap-seconds.list" # Working copy (updated weekly) leapfile -ntp_leapfile_sources="https://www.ietf.org/timezones/data/leap-seconds.list" +ntp_leapfile_sources="https://data.iana.org/time-zones/tzdb/leap-seconds.list" # Source from which to fetch leapfile ntp_leapfile_fetch_opts="-mq" # Options to use for ntp leapfile fetch, # e.g. --no-verify-peer From nobody Sat Dec 16 04:18:34 2023 X-Original-To: dev-commits-src-all@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 4SsXrp6p1Nz54Wyp; Sat, 16 Dec 2023 04:18: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 4SsXrp614Fz4gF2; Sat, 16 Dec 2023 04:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702700314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cnou5jyQI0rW2oB4kIsKku5gd2cH+4xA+YNPxqgL6o8=; b=rfF0kfXBxrAReddtVIJqqzpTW+Bpc1gV2K+dYS0l+aqJSKM3uRdtfqLfD9LL8Aki/sbu81 gUACGC+ZePQWlC911x6hVUjhlJ9FP1+ga8ZYnrjI4ew3lIXIQcjPRzX6AGt/X8WrB27hAv 6X4K2UYF4FBUPTIsLHaFNx4MX+Rt8HCDVwDpA8VcIuzP4lE4uccwlygfZUI9FJZSwdsc/F Mauqqs9sMw9Lv71VjozMI12zt0WLfD/t1IG9aoz9Sx3HpM/7+lOGQw3mTpdG3GDzUwrTaI 0U8t2ewMX+aL4P6IjevRiDDK/lyYS0RyFIUcfieNhfLEv8tOR46IYtrA5X45OA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702700314; a=rsa-sha256; cv=none; b=tX+w7OTrFQeGQx5q2x8OlhbWsBcyFab6t0xij6bmOmachpWbYME/H7myxeT7/6EBQFsovv F9/xlbNYDJKhfNIBF1o58RaGBW89IoXXHVv9PSIiDUzCX46JOAbxCRc2VsIPh6rvQgg023 zujI6FS9hQ9IVR45MvuvnnISUbSf9+5CQsUwiRsthzzdIg9e78e7nKOQuRwKeng4DOf2jX 4QkPl+A9zFxLjE6WQNtdVjV1tEXRw3VzWfYQJ235XhvplNlM5kCfOjW9Icf2Q07acFjUG9 NgBDZhqyq6a0Rs4eS6+o8y12QCO1wITe5+l/ii3hczUIrr53BRNxmWCdZAw9GQ== 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=1702700314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cnou5jyQI0rW2oB4kIsKku5gd2cH+4xA+YNPxqgL6o8=; b=Dwwybg36fDHEB4LQvX3p7EF9+yMYLkjG12iliJrLBRkHxnc0hhzljP4Lo1nOjJO2AD40VS EoT/ONC5F9I9Zk5i61fRxI/+0bNK857zFDe/ALBKgKHlgib1obkVkfdkNtzojBVgyGuqCu fqnSctWR/+rNF6bXvR259aKTO6uUBUPtPQAC/5KczweCAuShQpCwWodREul2kC3N3dXQN2 w+s+X/sKkLHe1JqA9DOvGZN/oJQ1CnrQFzgtBummcfHBi6XiJYRIyCuO9GLjY3k5jndqiB 2PCVZM68B7ur8lIzwK81eELr0sP239U7vKIkoDotRnx5C8+VHPuYk7VZpKHuLQ== 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 4SsXrp4yrTzfhn; Sat, 16 Dec 2023 04:18: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 3BG4IYVI058997; Sat, 16 Dec 2023 04:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG4IYmO058994; Sat, 16 Dec 2023 04:18:34 GMT (envelope-from git) Date: Sat, 16 Dec 2023 04:18:34 GMT Message-Id: <202312160418.3BG4IYmO058994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 9f1c1cfe69d8 - stable/14 - strfmon.3: Cleanup example code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9f1c1cfe69d80b5f17008d6963ac409ecbad817b Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9f1c1cfe69d80b5f17008d6963ac409ecbad817b commit 9f1c1cfe69d80b5f17008d6963ac409ecbad817b Author: Jose Luis Duran AuthorDate: 2023-12-01 06:50:24 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-16 04:17:51 +0000 strfmon.3: Cleanup example code (cherry picked from commit 2a163c3649e59dd616e057994ec02092362f0ae7) --- lib/libc/stdlib/strfmon.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/strfmon.3 b/lib/libc/stdlib/strfmon.3 index 7cd283573239..20cc560d401d 100644 --- a/lib/libc/stdlib/strfmon.3 +++ b/lib/libc/stdlib/strfmon.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 25, 2023 +.Dd December 6, 2023 .Dt STRFMON 3 .Os .Sh NAME @@ -154,10 +154,10 @@ to the string .Bd -literal -offset indent #include #include -#include +#include int -main() +main(void) { char string[100]; double money = 1234567.89; @@ -169,6 +169,8 @@ main() strfmon(string, sizeof(string) - 1, "%n", money); printf("%s\\n", string); + + return (0); } .Ed .Sh ERRORS From nobody Sat Dec 16 04:18:35 2023 X-Original-To: dev-commits-src-all@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 4SsXrr0ssTz54XHb; Sat, 16 Dec 2023 04:18: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 4SsXrr00Wlz3BnK; Sat, 16 Dec 2023 04:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702700316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l2w6PUZ01+oDXorKC5tDIaHSCWzcrB+eF93i1I3REP0=; b=P+JkAlNhGNL1I3jJUuVtca7q5VFWWkasgdKwx00PCBPPJvTtjxWqT9q9j11dwqmOsvTCVQ mXOAd7yyLSpA6UnGATi03QbCzNZilIQKmxxkIsT0scjeEETiNm8/RwFCxkorggVVYG5kK5 qCK7OA1QoWVU/3T9uiVesAv5om8OSkrUNDOl5pB/DK6vx5KQkmc4HSLAuUHF/Sk+VkdoE8 xbVmoXZ+SpvkMFQzIxLNzyCH7DiU7IBxlRaz7TO1vTfc1ftC99TBSknMzp52RritfyL1Ag Ylq4qGH60p7OEH0tQGu+ehX92wOOZJAGSFr6GfvGvaTm8/x4cos8pOw7Qi89Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702700316; a=rsa-sha256; cv=none; b=aCvkbXXSHeiWaQ8WqEJfFhiBGQqCWBH/ZGGi6MNrDH9QY+LkzJ43nsIGkoDsgRxQMQazHl vRL0A/mm8AMJUtw3FcO0xElm+gAA7lKkU7T9wD0UgfulOjHOxgOeIjiVoksfybngup2o6o Qsj2V79/FGnywjFh4Z5vAqztowtJgBvRW0pg8WrXmXRXbffJx1n1kdrlYVgLl0/IFlU6g3 sQHL45KEaZJ95E6AD1FtbllD99HnySpTgPYwQgvK5FHTJahFGQPsiHlZ9g1U05UNW677lv Uv/39v/gzETyiAj1UAUXpmM+WFSb2WKtvH2EfEv48qToLrzCwnVjnBP8ESHoEg== 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=1702700316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l2w6PUZ01+oDXorKC5tDIaHSCWzcrB+eF93i1I3REP0=; b=cVfZD4K4ETgxtV1Qr24nJPm11L48ZxcNBkX3izR9Ga17o28dD7CmXynlFxq1uK3nsV7TBQ lbNIs1Is42stzfR0x/jsiNZyNeWfJTxxGwL26mJAl9g6CppVj/1FmnMwnu/s9Pa2B5wZJM UrZuoCLhHYFccarqB02X78iWmQNNG2Kbqeradbg76xomnY+GKEZ6wysjSbBpvBmNNtNyNy +LJyrbL+CWJ1WRarf0mt0cFBLQ6JZzU0BAgCnu1nmsc23EGytmv4OcrXxCWfQ9vNp9cEqy QrjvGdDlBsM8RyIHW3y0hlq77wQbyrxDLYyFrlediPHxC002F24LF39N5b8PIg== 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 4SsXrq5xn0zg4p; Sat, 16 Dec 2023 04:18: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 3BG4IZ4C059039; Sat, 16 Dec 2023 04:18:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG4IZhR059036; Sat, 16 Dec 2023 04:18:35 GMT (envelope-from git) Date: Sat, 16 Dec 2023 04:18:35 GMT Message-Id: <202312160418.3BG4IZhR059036@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ea99922484b7 - stable/14 - strfmon: Silence scan-build warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: ea99922484b7435ac8001ebd13614006c734b924 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ea99922484b7435ac8001ebd13614006c734b924 commit ea99922484b7435ac8001ebd13614006c734b924 Author: Jose Luis Duran AuthorDate: 2023-11-30 23:30:50 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-16 04:17:51 +0000 strfmon: Silence scan-build warning (cherry picked from commit 6abee52e0d79f68fd725de748d7027ca8eef2294) --- lib/libc/stdlib/strfmon.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index b2d76fbed769..ade1deaffca9 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -156,7 +156,6 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, left_prec = -1; /* no left precision specified */ right_prec = -1; /* no right precision specified */ width = -1; /* no width specified */ - value = 0; /* we have no value to print now */ /* Flags */ while (1) { From nobody Sat Dec 16 04:18:36 2023 X-Original-To: dev-commits-src-all@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 4SsXrs2CDGz54Wvg; Sat, 16 Dec 2023 04:18: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 4SsXrs18mNz3Bnj; Sat, 16 Dec 2023 04:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702700317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fCfcLbOhm+8yyye9oGriiSPLNP+zR9TOuAAOezSjUKo=; b=DWHYGC9ggDv+N9Tq+rDvIRYzxxGttUaLYDhpp47hbNUwrWc6pZeOtfFW/Yk+5Ow9GmolsL NaWF2ETD72HSEsbVOaoZgyrn0I2FgDUOaYlDah01gmm3SUAsM5zcQY5Kn/TQTjsQLP5xeF 9cC1C3WchIzzHXea4ILxLUWg48SQS+m2VdXg+mDim2JyIvNTOh7efkU48zcjBCVNo/HPmM rOTk0mbh3kBsdahdToPcz1lTyQSIlLl6Jl64mLpta7Bma/4aC+ojkAprgeQDGbdM0m47mx 7K8smivbW7hZX0Xkyf8tnOlcDjtV3EhKF/lrO7Lo0V9M0XCq1kTg3FveqXBfJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702700317; a=rsa-sha256; cv=none; b=mo6WK3GdKq9pyT+9D2XFh0S+5Zkiyuszb4vfo2zlmeJAwy4RLqsHLKlTUfsm/ERASxYbpO AjgidQMXx+CUdVsXPREzlDjmnRuvFsYLAQMwxPhD067ryYWE3ddjCfSNkPouNjb++pabZD 5YZ6pnTy/7lZ/p1vLf9Eazin16Cx7PPTHHrzj0TZDPhly2WTyZ1nexJsvPM/wwfLv4bJ1K hTaNrF9YSr+B0rubeU2XodCVam7BNg3xPeyj+9DpDpPvhhrcstzJ3S779X+nHw09OVukQl 38hX/sB55dKQZ2zRJJTZbIuaHmlDICNud8pbWV060biygwL5z8mviEyL7UjqjQ== 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=1702700317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fCfcLbOhm+8yyye9oGriiSPLNP+zR9TOuAAOezSjUKo=; b=lhuV6Xbn0dAVp4+V7OdF5PF8ZN0Xbcpl1DoLCIqD85O93FtyablAZcmlKR5QkxRmcoFpO2 RKhy8bc3LyX2X2t8+UkaAgXb35w3v1KUXZGJmnjKqMMrvJdud71MmHBfjq1H5Twoxr1Pas Yt1JE6yibwDSV4pqbx/ow+kVtSU/iL3WCoxV5uu74FNrafcZWZisucRrNcBGq2LvMXrCB8 PerJZSVyj/hAyz8b1WnHhRpSJQN2jon2wXWzNnM88mVchJX0nrssulxinDXGhhAna8ROyx R8upeXgEMybUsWDM3poBj/nK25EokmXQqUG7GEVfR6TBn2qeyFjscmP20DWIyw== 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 4SsXrr6wyvzfr5; Sat, 16 Dec 2023 04:18: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 3BG4Ia8t059084; Sat, 16 Dec 2023 04:18:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG4Ia7J059081; Sat, 16 Dec 2023 04:18:36 GMT (envelope-from git) Date: Sat, 16 Dec 2023 04:18:36 GMT Message-Id: <202312160418.3BG4Ia7J059081@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2f427cbb3557 - stable/14 - strfmon: style fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2f427cbb3557fbcf19da6ecf0f5dfd14105eff2e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2f427cbb3557fbcf19da6ecf0f5dfd14105eff2e commit 2f427cbb3557fbcf19da6ecf0f5dfd14105eff2e Author: Jose Luis Duran AuthorDate: 2023-11-30 23:28:21 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-16 04:17:51 +0000 strfmon: style fixes (cherry picked from commit 56a0d5444d6f39302f3476b61c1b81ed39abe589) --- lib/libc/stdlib/strfmon.c | 197 +++++++++++++++++++++++----------------------- 1 file changed, 99 insertions(+), 98 deletions(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index ade1deaffca9..4b0389345eb6 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -33,6 +33,7 @@ */ #include + #include #include #include @@ -57,7 +58,7 @@ /* internal macros */ #define PRINT(CH) do { \ - if (dst >= s + maxsize) \ + if (dst >= s + maxsize) \ goto e2big_error; \ *dst++ = CH; \ } while (0) @@ -68,9 +69,9 @@ PRINT(*tmps++); \ } while (0) -#define GET_NUMBER(VAR, LOC) do { \ +#define GET_NUMBER(VAR, LOC) do { \ VAR = 0; \ - while (isdigit_l((unsigned char)*fmt, LOC)) { \ + while (isdigit_l((unsigned char)*fmt, LOC)) { \ if (VAR > INT_MAX / 10) \ goto e2big_error; \ VAR *= 10; \ @@ -101,22 +102,22 @@ static char *__format_grouped_double(double, int *, int, int, int, struct lconv *, locale_t); static ssize_t -vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, - const char * __restrict format, va_list ap) +vstrfmon_l(char *__restrict s, size_t maxsize, locale_t loc, + const char *__restrict format, va_list ap) { char *dst; /* output destination pointer */ const char *fmt; /* current format poistion pointer */ struct lconv *lc; /* pointer to lconv structure */ char *asciivalue; /* formatted double pointer */ - int flags; /* formatting options */ - int pad_char; /* padding character */ - int pad_size; /* pad size */ - int width; /* field width */ - int left_prec; /* left precision */ - int right_prec; /* right precision */ - double value; /* just value */ - char space_char = ' '; /* space after currency */ + int flags; /* formatting options */ + int pad_char; /* padding character */ + int pad_size; /* pad size */ + int width; /* field width */ + int left_prec; /* left precision */ + int right_prec; /* right precision */ + double value; /* just value */ + char space_char = ' '; /* space after currency */ char cs_precedes, /* values gathered from struct lconv */ sep_by_space, @@ -126,6 +127,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, char *tmpptr; /* temporary vars */ int sverrno; + FIX_LOCALE(loc); lc = localeconv_l(loc); @@ -134,7 +136,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, asciivalue = NULL; currency_symbol = NULL; - while (*fmt) { + while (*fmt != 0) { /* pass nonformating characters AS IS */ if (*fmt != '%') goto literal; @@ -144,13 +146,13 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* "%%" mean just '%' */ if (*(fmt + 1) == '%') { fmt++; - literal: +literal: PRINT(*fmt++); continue; } /* set up initial values */ - flags = (NEED_GROUPING|LOCALE_POSN); + flags = NEED_GROUPING | LOCALE_POSN; pad_char = ' '; /* padding character is "space" */ pad_size = 0; /* no padding initially */ left_prec = -1; /* no left precision specified */ @@ -160,32 +162,32 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* Flags */ while (1) { switch (*++fmt) { - case '=': /* fill character */ - pad_char = *++fmt; - if (pad_char == '\0') - goto format_error; - continue; - case '^': /* not group currency */ - flags &= ~(NEED_GROUPING); - continue; - case '+': /* use locale defined signs */ - if (flags & SIGN_POSN_USED) - goto format_error; - flags |= (SIGN_POSN_USED|LOCALE_POSN); - continue; - case '(': /* enclose negatives with () */ - if (flags & SIGN_POSN_USED) - goto format_error; - flags |= (SIGN_POSN_USED|PARENTH_POSN); - continue; - case '!': /* suppress currency symbol */ - flags |= SUPPRESS_CURR_SYMBOL; - continue; - case '-': /* alignment (left) */ - flags |= LEFT_JUSTIFY; - continue; - default: - break; + case '=': /* fill character */ + pad_char = *++fmt; + if (pad_char == '\0') + goto format_error; + continue; + case '^': /* not group currency */ + flags &= ~(NEED_GROUPING); + continue; + case '+': /* use locale defined signs */ + if (flags & SIGN_POSN_USED) + goto format_error; + flags |= (SIGN_POSN_USED | LOCALE_POSN); + continue; + case '(': /* enclose negatives with () */ + if (flags & SIGN_POSN_USED) + goto format_error; + flags |= (SIGN_POSN_USED | PARENTH_POSN); + continue; + case '!': /* suppress currency symbol */ + flags |= SUPPRESS_CURR_SYMBOL; + continue; + case '-': /* alignment (left) */ + flags |= LEFT_JUSTIFY; + continue; + default: + break; } break; } @@ -193,7 +195,8 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* field Width */ if (isdigit_l((unsigned char)*fmt, loc)) { GET_NUMBER(width, loc); - /* Do we have enough space to put number with + /* + * Do we have enough space to put number with * required width ? */ if ((unsigned int)width >= maxsize - (dst - s)) @@ -214,22 +217,24 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, if (!isdigit_l((unsigned char)*++fmt, loc)) goto format_error; GET_NUMBER(right_prec, loc); - if ((unsigned int)right_prec >= maxsize - (dst - s) - - left_prec) + if ((unsigned int)right_prec >= + maxsize - (dst - s) - left_prec) goto e2big_error; } /* Conversion Characters */ switch (*fmt++) { - case 'i': /* use international currency format */ - flags |= USE_INTL_CURRENCY; - break; - case 'n': /* use national currency format */ - flags &= ~(USE_INTL_CURRENCY); - break; - default: /* required character is missing or - premature EOS */ - goto format_error; + case 'i': /* use international currency format */ + flags |= USE_INTL_CURRENCY; + break; + case 'n': /* use national currency format */ + flags &= ~(USE_INTL_CURRENCY); + break; + default: /* + * required character is missing or + * premature EOS + */ + goto format_error; } if (currency_symbol != NULL) @@ -245,7 +250,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, currency_symbol = strdup(lc->currency_symbol); if (currency_symbol == NULL) - goto end_error; /* ENOMEM. */ + goto end_error; /* ENOMEM. */ /* value itself */ value = va_arg(ap, double); @@ -267,15 +272,17 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, if (asciivalue != NULL) free(asciivalue); - asciivalue = __format_grouped_double(value, &flags, - left_prec, right_prec, pad_char, lc, loc); + asciivalue = __format_grouped_double(value, &flags, left_prec, + right_prec, pad_char, lc, loc); if (asciivalue == NULL) - goto end_error; /* errno already set */ - /* to ENOMEM by malloc() */ + goto end_error; /* + * errno already set to ENOMEM by + * malloc() + */ /* set some variables for later use */ - __setup_vars(flags, &cs_precedes, &sep_by_space, - &sign_posn, &signstr, lc); + __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, + &signstr, lc); /* * Description of some LC_MONETARY's values: @@ -306,7 +313,6 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, * $currency_symbol * = 3 - the sign string precedes the $currency_symbol * = 4 - the sign string succeeds the $currency_symbol - * */ tmpptr = dst; @@ -352,12 +358,10 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, } if (!(flags & SUPPRESS_CURR_SYMBOL)) { - if ((sign_posn == 3 && sep_by_space == 2) - || (sep_by_space == 1 - && (sign_posn == 0 - || sign_posn == 1 - || sign_posn == 2 - || sign_posn == 4))) + if ((sign_posn == 3 && sep_by_space == 2) || + (sep_by_space == 1 && + (sign_posn == 0 || sign_posn == 1 || + sign_posn == 2 || sign_posn == 4))) PRINT(space_char); PRINTS(currency_symbol); if (sign_posn == 4) { @@ -398,7 +402,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, PRINT('\0'); free(asciivalue); free(currency_symbol); - return (dst - s - 1); /* return size of put data except trailing '\0' */ + return (dst - s - 1); /* size of put data except trailing '\0' */ e2big_error: errno = E2BIG; @@ -418,15 +422,15 @@ end_error: } static void -__setup_vars(int flags, char *cs_precedes, char *sep_by_space, - char *sign_posn, char **signstr, struct lconv *lc) +__setup_vars(int flags, char *cs_precedes, char *sep_by_space, char *sign_posn, + char **signstr, struct lconv *lc) { if ((flags & IS_NEGATIVE) && (flags & USE_INTL_CURRENCY)) { *cs_precedes = lc->int_n_cs_precedes; *sep_by_space = lc->int_n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_n_sign_posn; - *signstr = (lc->negative_sign[0] == '\0') ? "-" - : lc->negative_sign; + *signstr = (lc->negative_sign[0] == '\0') ? "-" : + lc->negative_sign; } else if (flags & USE_INTL_CURRENCY) { *cs_precedes = lc->int_p_cs_precedes; *sep_by_space = lc->int_p_sep_by_space; @@ -436,8 +440,8 @@ __setup_vars(int flags, char *cs_precedes, char *sep_by_space, *cs_precedes = lc->n_cs_precedes; *sep_by_space = lc->n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn; - *signstr = (lc->negative_sign[0] == '\0') ? "-" - : lc->negative_sign; + *signstr = (lc->negative_sign[0] == '\0') ? "-" : + lc->negative_sign; } else { *cs_precedes = lc->p_cs_precedes; *sep_by_space = lc->p_sep_by_space; @@ -460,8 +464,8 @@ __calc_left_pad(int flags, char *cur_symb, struct lconv *lc) char cs_precedes, sep_by_space, sign_posn, *signstr; int left_chars = 0; - __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, - &signstr, lc); + __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, &signstr, + lc); if (cs_precedes != 0) { left_chars += strlen(cur_symb); @@ -470,17 +474,17 @@ __calc_left_pad(int flags, char *cur_symb, struct lconv *lc) } switch (sign_posn) { - case 0: - if (flags & IS_NEGATIVE) - left_chars++; - break; - case 1: + case 0: + if (flags & IS_NEGATIVE) + left_chars++; + break; + case 1: + left_chars += strlen(signstr); + break; + case 3: + case 4: + if (cs_precedes != 0) left_chars += strlen(signstr); - break; - case 3: - case 4: - if (cs_precedes != 0) - left_chars += strlen(signstr); } return (left_chars); } @@ -510,8 +514,8 @@ get_groups(int size, char *grouping) /* convert double to locale-encoded string */ static char * -__format_grouped_double(double value, int *flags, - int left_prec, int right_prec, int pad_char, struct lconv *lc, locale_t loc) +__format_grouped_double(double value, int *flags, int left_prec, int right_prec, + int pad_char, struct lconv *lc, locale_t loc) { char *rslt; @@ -529,7 +533,7 @@ __format_grouped_double(double value, int *flags, size_t decimal_point_size; size_t thousands_sep_size; - int groups = 0; + int groups = 0; grouping = lc->mon_grouping; decimal_point = lc->mon_decimal_point; @@ -592,10 +596,8 @@ __format_grouped_double(double value, int *flags, avalue_size -= (right_prec + 1); } - if ((*flags & NEED_GROUPING) && - thousands_sep_size > 0 && - *grouping != CHAR_MAX && - *grouping > 0) { + if ((*flags & NEED_GROUPING) && thousands_sep_size > 0 && + *grouping != CHAR_MAX && *grouping > 0) { while (avalue_size > (int)*grouping) { GRPCPY(*grouping); GRPSEP; @@ -638,8 +640,7 @@ __format_grouped_double(double value, int *flags, } ssize_t -strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, - ...) +strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) { ssize_t ret; va_list ap; @@ -652,8 +653,8 @@ strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, } ssize_t -strfmon_l(char * __restrict s, size_t maxsize, locale_t loc, - const char * __restrict format, ...) +strfmon_l(char *__restrict s, size_t maxsize, locale_t loc, + const char *__restrict format, ...) { ssize_t ret; va_list ap; From nobody Sat Dec 16 04:18:38 2023 X-Original-To: dev-commits-src-all@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 4SsXrt3THlz54X8S; Sat, 16 Dec 2023 04:18: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 4SsXrt1zG9z3Bwh; Sat, 16 Dec 2023 04:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702700318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aqkegb0Ct0LqZU6F00ErI81nda1v75gn5m8UM1PRFWw=; b=BH8a9QHrZp66XKezhtLXMk6eHyBtnG+vAR0TgfW9UrpDcV+H+gjLJHkvaa2ppJBIb+6OEp iH+xjSU6Gy9DkeTfyNb6W2GY/I1m9kQVmU6brtFI7S+kofKE7cs06a4cz8rt4hBcN4Ii2h /AJjPh1Ei8yF9sVYaHEkzj3FqqiMDg47HX+zZX3UuWTT2/FIvEbEi9UeWzPq6ESUh+b7XW 8Tm7r9KLrfNqI6hB+y2dAM/vQHcb9y1/geWdDMnSsE0x1Y2S2VteIo+3Q5plttRMZdLlWP +BEKA92BYPQ2vZ/mwRnn2dnVZy2gpsy5oGkSgtzpXKu5ApMKLGCJqYdRTwMygQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702700318; a=rsa-sha256; cv=none; b=MnoRRLwGjzm4JK9Y/EhLG8UEVPlx1pn2KMpinPM6koEXAUw3mYlQRgeTqo29JJPphOzAD8 4GGETxzbnDxB0aLRKSKSzoyxrRsEgCNVgCjKZ/P30mXZwl86S1fPgH2gtC0fus4UfA+twX 5BMz7MkSXrEDeyug+aNEcaowzLG+xPHwrfKrfOTRRz3pZJOOGWW3O4UcvOw+jQcnDThY9Q qG4dn+usVLY3JGF2Gy9/Pg8z3seikeluZzBnMlClKnWiMWdboqAWXrDrkcQB7haGv9Bvby 2NXOFOgNBN3QsR5NBykft2asbZ2DMM9NCUyPBmqYD8hyF3PiHUFwK0boflRr2g== 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=1702700318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aqkegb0Ct0LqZU6F00ErI81nda1v75gn5m8UM1PRFWw=; b=upA0q+ChHjXwj69pdgj9qbdO7bg8j/GTSl//jtmXpI4NN94wbYSaFIcCYVHk9PDYOqrUhj GmPD0+Fg2I/kRJekH4neQ7HocOY3XhrFQ/nRJ3aHmZFQE7P2wNrm4PEcFE3KVbxgRCsdr2 rJnsgMti8dFm2UaOJluuEWNGhS8NKHF0LbJb2NWCI2GVxvRUA6wGaD+WRgPI0x3+OtGMLB rdrAqiC6mfUivQnp81HOOhjg/+1VcjDcB/o3haZDwdrpDihW9O9cCAEIsMel0WiM05jNkD UZBRgjsJnojuhnjZsaGHQeZ+Ldd1ugmAPGTSfY/LkHcQZz6msHoFqHWNBU6RPw== 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 4SsXrt14rLzfhp; Sat, 16 Dec 2023 04:18: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 3BG4Icv0059136; Sat, 16 Dec 2023 04:18:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG4IcE3059133; Sat, 16 Dec 2023 04:18:38 GMT (envelope-from git) Date: Sat, 16 Dec 2023 04:18:38 GMT Message-Id: <202312160418.3BG4IcE3059133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 79ca908fded3 - stable/14 - strfmon.c: Use the restrict keyword directly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 79ca908fded37d25dad76366137bdcbba2bf300c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=79ca908fded37d25dad76366137bdcbba2bf300c commit 79ca908fded37d25dad76366137bdcbba2bf300c Author: Konstantin Belousov AuthorDate: 2023-12-09 01:21:02 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-16 04:17:51 +0000 strfmon.c: Use the restrict keyword directly (cherry picked from commit 86e2bcbf47fb4c8dbd799f2f21c0ed338b2e8f1b) --- lib/libc/stdlib/strfmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index 4b0389345eb6..68a36a6d5567 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -640,7 +640,7 @@ __format_grouped_double(double value, int *flags, int left_prec, int right_prec, } ssize_t -strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) +strfmon(char *restrict s, size_t maxsize, const char *restrict format, ...) { ssize_t ret; va_list ap; @@ -653,8 +653,8 @@ strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) } ssize_t -strfmon_l(char *__restrict s, size_t maxsize, locale_t loc, - const char *__restrict format, ...) +strfmon_l(char *restrict s, size_t maxsize, locale_t loc, + const char *restrict format, ...) { ssize_t ret; va_list ap; From nobody Sat Dec 16 04:19:21 2023 X-Original-To: dev-commits-src-all@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 4SsXsk0Ksrz54Wyx; Sat, 16 Dec 2023 04:19: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 4SsXsj6fdhz3CxV; Sat, 16 Dec 2023 04:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702700361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Xf8yb2D1XMk3X9qy//I1plHC/f0LFMvYk/GqxkYNyg=; b=L3Io8eLTsWjZUhUFdUxHBX9nzB29cwqjmozIgRG9Ul3SxZuVYh3as0Pqmox/puJ9s9onRC 4OMUPmnkuXoUYbgoPoYiZLriP0vgjMkCWZZf+g6232hu+Jxj5fuRUmbs1GmheN62u2o4Uy AP4ROsLOyB2RgN1bXy0qdLrpSwhRSJq8ll4WEOwz57uRXjsSJsFeh6h4PjnV7D9kWeFSc0 /DcB266f/jxGlPpn24NeadyCT0RNikM/+o17PKe0xsZXHbFvCAEsy8XeaKuty25MaHtwn2 GQgMuZD9cQ4pJ53/RFpBedxzjUGu4Ao4N/IcXWh/Ccpgr2LOplSFiFdd3stJRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702700361; a=rsa-sha256; cv=none; b=k8XQkjnCjlJnajw8gAYsRcnxXFvC9A4xcsqRxeCOLX1XPqaER4b6wfI7hgfNpFMYQO7gPY ai67S2D3VoN38XCPKizuVuQqHvSqBOsxnyAuthv8h9fyvnH11ECH2PIgTAYzp1mF4AvB6u Fs8uKscpTm/dNI2Ke6ToDb80f+TOkzeDJhRKWADu7laj4lbYh0dTTvZ784Y9dEuF+/bGni Mi6D3kgDfkp5UmMWm5HaJe7MluhnJYtaXw7NDOlG71p8hJft4mL1lpAZMe3JD/VDmKXm8i k7YFD/L6ughV5kytpLXcnEEUNgISZ0NmArYmaLdNph8014EjC5CFQ7m9bG+Nfg== 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=1702700361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Xf8yb2D1XMk3X9qy//I1plHC/f0LFMvYk/GqxkYNyg=; b=IQRk7/ijWdvvSEqvU/2jBeJr6eVt4Bv79ruejXtmH5D1mtRcenjndFibttTlqcutWvFS1t KVLfrvkq3AuJPjxKOAPo4P/MAAfmKagEyGLmK4lvLGsDGpjM3qy88dniQZUA74DbWELWhD H9WxdcWc+D+AQwETi9/K5fHQvh3/YXD5TnRQo2hNaE0TbuBr7yHMFF5d1lBgR6n8hRdyjo ctA47YbB7pW/ESGRHhE9DTjhGl8O3zJXWGrMElO0TTXr6I+B+WHxWvC7wcX+Hc3uZFX/kw gSPf72+6EV9W3+mC8FtflUeYnERNko15HqEBA7g5Woyw58Fit69QJh2mePWDGA== 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 4SsXsj5ZZPzfhq; Sat, 16 Dec 2023 04:19: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 3BG4JLkv059374; Sat, 16 Dec 2023 04:19:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG4JLA9059371; Sat, 16 Dec 2023 04:19:21 GMT (envelope-from git) Date: Sat, 16 Dec 2023 04:19:21 GMT Message-Id: <202312160419.3BG4JLA9059371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c88024012f5b - stable/13 - strfmon.3: Cleanup example code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c88024012f5bc82823a197bdc89874fb8804dfe5 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c88024012f5bc82823a197bdc89874fb8804dfe5 commit c88024012f5bc82823a197bdc89874fb8804dfe5 Author: Jose Luis Duran AuthorDate: 2023-12-01 06:50:24 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-16 04:18:47 +0000 strfmon.3: Cleanup example code (cherry picked from commit 2a163c3649e59dd616e057994ec02092362f0ae7) --- lib/libc/stdlib/strfmon.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/strfmon.3 b/lib/libc/stdlib/strfmon.3 index 7cd283573239..20cc560d401d 100644 --- a/lib/libc/stdlib/strfmon.3 +++ b/lib/libc/stdlib/strfmon.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 25, 2023 +.Dd December 6, 2023 .Dt STRFMON 3 .Os .Sh NAME @@ -154,10 +154,10 @@ to the string .Bd -literal -offset indent #include #include -#include +#include int -main() +main(void) { char string[100]; double money = 1234567.89; @@ -169,6 +169,8 @@ main() strfmon(string, sizeof(string) - 1, "%n", money); printf("%s\\n", string); + + return (0); } .Ed .Sh ERRORS From nobody Sat Dec 16 04:19:22 2023 X-Original-To: dev-commits-src-all@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 4SsXsl1Wkkz54X02; Sat, 16 Dec 2023 04:19: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 4SsXsl0MQ3z3D2v; Sat, 16 Dec 2023 04:19:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702700363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F4os4PB7GIW4VslbtpO3DFz1RmWxLvN/yu329PlgoqY=; b=Vs8rFVTnN71jNZiuyZCZO9/pQrYyBFDLnuVe5r/gwv8SwXc2tdfyaRLR+vYvHFtb+rLlRm DP7WJB1WDjvLqw+/d/XLQkfbY1orJ1i7+Wd0lKZzkxBH4FYP+sWgILMGnnkzZl3OoiPGJX Xr2iE5Zc74hhE51Gf8l0T9lL33vqijezlzrq4nnN7s+mrT5WmX76YYmb39f7GRRWut2HL1 4hqulmWYfOsOuJfZ6eHbjuImqpMDx57xonztNtR5V7sP43bSEWcaYp8XMTptw5xxe8OlUO ZXD+jwe9r3aOnrHHfu+/vCDkvnJ7fwTh8bNNQW7ardEvTFAQBKsFzRRHspOSgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702700363; a=rsa-sha256; cv=none; b=Vhf8zfRtLaNxwSA8dUvZVLafly7x4unH1ZYQfp96lKf32TmUNUP6CIc35ZJUhr4HGH1dEn Vam6IAHiFahXzqXpE4Yy0ORslDYAqRqwsT7mgwmfdzmF/NBx1/LDKmiIcb2Jbd+yG2E1yz +dMpVwZNC+3k4tAwtEhxKKgJPNAWD0m6B9lYdKXbQSc41NNzgvrMbSOfVvgreEtAD1TUzs ZFzGIOvCEuj7XG0tgpmWkN6uuAujC7W2tANHCStKDVtkfZ5Nbe+C0OlQr8qY2DO5wYAMuV We8Nq6ae/7r14zyujsqQrw/pvrbRKP1pyuPYdeJIdQcnADd19Py74PDDu+zv5A== 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=1702700363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F4os4PB7GIW4VslbtpO3DFz1RmWxLvN/yu329PlgoqY=; b=jdgaNq9dSsH5jHIgz82bdZjMEa6gaRBcYU+ED7oR4pRU9l5A/VzQlAduR6SL3z88il4YLT HBdUE7PQ5st8WdfSJxQSQUEuCIseE5ogRUYjB5oEnmUBR7ug6Yi16XNDrf9/JqbxFldLcp xdNqptJpdWkFKQB77bMKSuAAbncd1Ex1tV1JYh85uJ9RmMDPbUZOevciCVYUTUOoquO4zM UnuQTChVvusFDiiIrzixfvmaOkzPNP//NBNj0nbCislKHUeOX8CHLlt639YUpZq5UJEZZG QR4ipSkAv8AEqR7+Zo51Yk9xrK2pJnMbvR+6LXpkSjDRXU0fYq/Hb//ToC0sAA== 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 4SsXsk6KFszg2Y; Sat, 16 Dec 2023 04:19: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 3BG4JM7q059416; Sat, 16 Dec 2023 04:19:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG4JMP4059413; Sat, 16 Dec 2023 04:19:22 GMT (envelope-from git) Date: Sat, 16 Dec 2023 04:19:22 GMT Message-Id: <202312160419.3BG4JMP4059413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 08f6c7481804 - stable/13 - strfmon: Silence scan-build warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 08f6c7481804e47d93a0f50238eefe4b6211fc37 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=08f6c7481804e47d93a0f50238eefe4b6211fc37 commit 08f6c7481804e47d93a0f50238eefe4b6211fc37 Author: Jose Luis Duran AuthorDate: 2023-11-30 23:30:50 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-16 04:18:47 +0000 strfmon: Silence scan-build warning (cherry picked from commit 6abee52e0d79f68fd725de748d7027ca8eef2294) --- lib/libc/stdlib/strfmon.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index 0e36eb0babe5..d770b6f32bd1 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -157,7 +157,6 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, left_prec = -1; /* no left precision specified */ right_prec = -1; /* no right precision specified */ width = -1; /* no width specified */ - value = 0; /* we have no value to print now */ /* Flags */ while (1) { From nobody Sat Dec 16 04:19:23 2023 X-Original-To: dev-commits-src-all@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 4SsXsm34NKz54X8g; Sat, 16 Dec 2023 04:19: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 4SsXsm1qFxz3Cy3; Sat, 16 Dec 2023 04:19:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702700364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uyrBcYr1rne00skap+DZ5TCktsJaVhDnEHE8gVd6ujU=; b=VKgNQ2qELlPU65QUiPhlu6rs/tDRPrVgD3UVESJQeA5JyPf4S8VD5Oxmh4xaTxfIFmj3Wj o+kYfSJ8WXvLzGZAnZWjY1uPntS6A9UvdI/uK8yEcxH3DBb+Lb09IYI5zwxln4uSmbuQRL /xVmxPfy+2tiIgpxB/E89UjUYgUdaxgQhQsNeg0WSWMUB+jKVRvLkFXAQHYnBLkxqheVNS +0ZG58y31BMEDH+XXUpdF+fT/85lKGugAGy9OWKvK7CFKA5gtYq10576MaVJC162X8l2bJ nzZ0wx9zCXFx9d7qgxyrh3bFbMKwqmTkTg4/WXO5mw04QOhvI8soPwv+qjtakQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702700364; a=rsa-sha256; cv=none; b=VHLNN1KX2HlkKDAqljzjYGX6l1NTEi5fgZRUt92Jafh8gv9RNcCPDpJUoddrVRT5nRHOBU Aufqfzc4mALc2rOn+MCSJjUod2p10YY51qvC4n/gpgbXOdoxunRD2zdo9bP1Xa3TAFmP/k 29kYBSBZyYG8J5BhK1AvIzK2GYJdfjaJz6FuEHJCoy3HyR7U8unLPsva512Fdmye0WJFL+ vDPjuTSnazmkNYOT+yKAqYRmXDIJBgYqOAnA4dCJ9Q2SYcbSb4MwfXIiPn0GWO0V+y95BO LiR7jiYkRsDuwL9DuZxe/o1Wqituzm31pferaW34N8xLLZmdSxfzEiJADV3fxg== 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=1702700364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uyrBcYr1rne00skap+DZ5TCktsJaVhDnEHE8gVd6ujU=; b=ugBQNJY0oBsileBept3a0Wo99jysxSGYvNZOIsNFSb6BpvEGQQ4KhAcqey0WfeMmQ5iw+A 8+Mln5G/7Pomw7XQ2kYihLkfB+OLpfYrljBO1LQkL2rpp+hRVzjXRYU23bVOGB3Z4l29cJ 7iIyR6eockUxre0KDLdhJsN4U6hFjUF+NoJF7fiMpDy3Z0Ma++7ovsm39IVlZ53kDEv5bl 2TbkAK3V6dacmowPtOHP1Km5WLigK79o9S5hdxYPRGBVNcsAansrSYhVwoxp3NEq83Zh1T v/SYmAfV+h/EAClSZJg67w4lgee2Xr/hkCRZb9l+FLMTami2Eb8KJKlt3pCTJg== 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 4SsXsm0R0DzfcW; Sat, 16 Dec 2023 04:19: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 3BG4JNl9059462; Sat, 16 Dec 2023 04:19:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG4JNX7059459; Sat, 16 Dec 2023 04:19:23 GMT (envelope-from git) Date: Sat, 16 Dec 2023 04:19:23 GMT Message-Id: <202312160419.3BG4JNX7059459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: fff086cfeafc - stable/13 - strfmon: style fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: fff086cfeafc110f94a40eb340ddc8b13d8df0cd Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fff086cfeafc110f94a40eb340ddc8b13d8df0cd commit fff086cfeafc110f94a40eb340ddc8b13d8df0cd Author: Jose Luis Duran AuthorDate: 2023-11-30 23:28:21 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-16 04:18:48 +0000 strfmon: style fixes (cherry picked from commit 56a0d5444d6f39302f3476b61c1b81ed39abe589) --- lib/libc/stdlib/strfmon.c | 197 +++++++++++++++++++++++----------------------- 1 file changed, 99 insertions(+), 98 deletions(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index d770b6f32bd1..1c9eb3f45d74 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -34,6 +34,7 @@ #include #include + #include #include #include @@ -58,7 +59,7 @@ /* internal macros */ #define PRINT(CH) do { \ - if (dst >= s + maxsize) \ + if (dst >= s + maxsize) \ goto e2big_error; \ *dst++ = CH; \ } while (0) @@ -69,9 +70,9 @@ PRINT(*tmps++); \ } while (0) -#define GET_NUMBER(VAR, LOC) do { \ +#define GET_NUMBER(VAR, LOC) do { \ VAR = 0; \ - while (isdigit_l((unsigned char)*fmt, LOC)) { \ + while (isdigit_l((unsigned char)*fmt, LOC)) { \ if (VAR > INT_MAX / 10) \ goto e2big_error; \ VAR *= 10; \ @@ -102,22 +103,22 @@ static char *__format_grouped_double(double, int *, int, int, int, struct lconv *, locale_t); static ssize_t -vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, - const char * __restrict format, va_list ap) +vstrfmon_l(char *__restrict s, size_t maxsize, locale_t loc, + const char *__restrict format, va_list ap) { char *dst; /* output destination pointer */ const char *fmt; /* current format poistion pointer */ struct lconv *lc; /* pointer to lconv structure */ char *asciivalue; /* formatted double pointer */ - int flags; /* formatting options */ - int pad_char; /* padding character */ - int pad_size; /* pad size */ - int width; /* field width */ - int left_prec; /* left precision */ - int right_prec; /* right precision */ - double value; /* just value */ - char space_char = ' '; /* space after currency */ + int flags; /* formatting options */ + int pad_char; /* padding character */ + int pad_size; /* pad size */ + int width; /* field width */ + int left_prec; /* left precision */ + int right_prec; /* right precision */ + double value; /* just value */ + char space_char = ' '; /* space after currency */ char cs_precedes, /* values gathered from struct lconv */ sep_by_space, @@ -127,6 +128,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, char *tmpptr; /* temporary vars */ int sverrno; + FIX_LOCALE(loc); lc = localeconv_l(loc); @@ -135,7 +137,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, asciivalue = NULL; currency_symbol = NULL; - while (*fmt) { + while (*fmt != 0) { /* pass nonformating characters AS IS */ if (*fmt != '%') goto literal; @@ -145,13 +147,13 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* "%%" mean just '%' */ if (*(fmt + 1) == '%') { fmt++; - literal: +literal: PRINT(*fmt++); continue; } /* set up initial values */ - flags = (NEED_GROUPING|LOCALE_POSN); + flags = NEED_GROUPING | LOCALE_POSN; pad_char = ' '; /* padding character is "space" */ pad_size = 0; /* no padding initially */ left_prec = -1; /* no left precision specified */ @@ -161,32 +163,32 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* Flags */ while (1) { switch (*++fmt) { - case '=': /* fill character */ - pad_char = *++fmt; - if (pad_char == '\0') - goto format_error; - continue; - case '^': /* not group currency */ - flags &= ~(NEED_GROUPING); - continue; - case '+': /* use locale defined signs */ - if (flags & SIGN_POSN_USED) - goto format_error; - flags |= (SIGN_POSN_USED|LOCALE_POSN); - continue; - case '(': /* enclose negatives with () */ - if (flags & SIGN_POSN_USED) - goto format_error; - flags |= (SIGN_POSN_USED|PARENTH_POSN); - continue; - case '!': /* suppress currency symbol */ - flags |= SUPPRESS_CURR_SYMBOL; - continue; - case '-': /* alignment (left) */ - flags |= LEFT_JUSTIFY; - continue; - default: - break; + case '=': /* fill character */ + pad_char = *++fmt; + if (pad_char == '\0') + goto format_error; + continue; + case '^': /* not group currency */ + flags &= ~(NEED_GROUPING); + continue; + case '+': /* use locale defined signs */ + if (flags & SIGN_POSN_USED) + goto format_error; + flags |= (SIGN_POSN_USED | LOCALE_POSN); + continue; + case '(': /* enclose negatives with () */ + if (flags & SIGN_POSN_USED) + goto format_error; + flags |= (SIGN_POSN_USED | PARENTH_POSN); + continue; + case '!': /* suppress currency symbol */ + flags |= SUPPRESS_CURR_SYMBOL; + continue; + case '-': /* alignment (left) */ + flags |= LEFT_JUSTIFY; + continue; + default: + break; } break; } @@ -194,7 +196,8 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, /* field Width */ if (isdigit_l((unsigned char)*fmt, loc)) { GET_NUMBER(width, loc); - /* Do we have enough space to put number with + /* + * Do we have enough space to put number with * required width ? */ if ((unsigned int)width >= maxsize - (dst - s)) @@ -215,22 +218,24 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, if (!isdigit_l((unsigned char)*++fmt, loc)) goto format_error; GET_NUMBER(right_prec, loc); - if ((unsigned int)right_prec >= maxsize - (dst - s) - - left_prec) + if ((unsigned int)right_prec >= + maxsize - (dst - s) - left_prec) goto e2big_error; } /* Conversion Characters */ switch (*fmt++) { - case 'i': /* use international currency format */ - flags |= USE_INTL_CURRENCY; - break; - case 'n': /* use national currency format */ - flags &= ~(USE_INTL_CURRENCY); - break; - default: /* required character is missing or - premature EOS */ - goto format_error; + case 'i': /* use international currency format */ + flags |= USE_INTL_CURRENCY; + break; + case 'n': /* use national currency format */ + flags &= ~(USE_INTL_CURRENCY); + break; + default: /* + * required character is missing or + * premature EOS + */ + goto format_error; } if (currency_symbol != NULL) @@ -246,7 +251,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, currency_symbol = strdup(lc->currency_symbol); if (currency_symbol == NULL) - goto end_error; /* ENOMEM. */ + goto end_error; /* ENOMEM. */ /* value itself */ value = va_arg(ap, double); @@ -268,15 +273,17 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, if (asciivalue != NULL) free(asciivalue); - asciivalue = __format_grouped_double(value, &flags, - left_prec, right_prec, pad_char, lc, loc); + asciivalue = __format_grouped_double(value, &flags, left_prec, + right_prec, pad_char, lc, loc); if (asciivalue == NULL) - goto end_error; /* errno already set */ - /* to ENOMEM by malloc() */ + goto end_error; /* + * errno already set to ENOMEM by + * malloc() + */ /* set some variables for later use */ - __setup_vars(flags, &cs_precedes, &sep_by_space, - &sign_posn, &signstr, lc); + __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, + &signstr, lc); /* * Description of some LC_MONETARY's values: @@ -307,7 +314,6 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, * $currency_symbol * = 3 - the sign string precedes the $currency_symbol * = 4 - the sign string succeeds the $currency_symbol - * */ tmpptr = dst; @@ -353,12 +359,10 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, } if (!(flags & SUPPRESS_CURR_SYMBOL)) { - if ((sign_posn == 3 && sep_by_space == 2) - || (sep_by_space == 1 - && (sign_posn == 0 - || sign_posn == 1 - || sign_posn == 2 - || sign_posn == 4))) + if ((sign_posn == 3 && sep_by_space == 2) || + (sep_by_space == 1 && + (sign_posn == 0 || sign_posn == 1 || + sign_posn == 2 || sign_posn == 4))) PRINT(space_char); PRINTS(currency_symbol); if (sign_posn == 4) { @@ -399,7 +403,7 @@ vstrfmon_l(char * __restrict s, size_t maxsize, locale_t loc, PRINT('\0'); free(asciivalue); free(currency_symbol); - return (dst - s - 1); /* return size of put data except trailing '\0' */ + return (dst - s - 1); /* size of put data except trailing '\0' */ e2big_error: errno = E2BIG; @@ -419,15 +423,15 @@ end_error: } static void -__setup_vars(int flags, char *cs_precedes, char *sep_by_space, - char *sign_posn, char **signstr, struct lconv *lc) +__setup_vars(int flags, char *cs_precedes, char *sep_by_space, char *sign_posn, + char **signstr, struct lconv *lc) { if ((flags & IS_NEGATIVE) && (flags & USE_INTL_CURRENCY)) { *cs_precedes = lc->int_n_cs_precedes; *sep_by_space = lc->int_n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_n_sign_posn; - *signstr = (lc->negative_sign[0] == '\0') ? "-" - : lc->negative_sign; + *signstr = (lc->negative_sign[0] == '\0') ? "-" : + lc->negative_sign; } else if (flags & USE_INTL_CURRENCY) { *cs_precedes = lc->int_p_cs_precedes; *sep_by_space = lc->int_p_sep_by_space; @@ -437,8 +441,8 @@ __setup_vars(int flags, char *cs_precedes, char *sep_by_space, *cs_precedes = lc->n_cs_precedes; *sep_by_space = lc->n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn; - *signstr = (lc->negative_sign[0] == '\0') ? "-" - : lc->negative_sign; + *signstr = (lc->negative_sign[0] == '\0') ? "-" : + lc->negative_sign; } else { *cs_precedes = lc->p_cs_precedes; *sep_by_space = lc->p_sep_by_space; @@ -461,8 +465,8 @@ __calc_left_pad(int flags, char *cur_symb, struct lconv *lc) char cs_precedes, sep_by_space, sign_posn, *signstr; int left_chars = 0; - __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, - &signstr, lc); + __setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, &signstr, + lc); if (cs_precedes != 0) { left_chars += strlen(cur_symb); @@ -471,17 +475,17 @@ __calc_left_pad(int flags, char *cur_symb, struct lconv *lc) } switch (sign_posn) { - case 0: - if (flags & IS_NEGATIVE) - left_chars++; - break; - case 1: + case 0: + if (flags & IS_NEGATIVE) + left_chars++; + break; + case 1: + left_chars += strlen(signstr); + break; + case 3: + case 4: + if (cs_precedes != 0) left_chars += strlen(signstr); - break; - case 3: - case 4: - if (cs_precedes != 0) - left_chars += strlen(signstr); } return (left_chars); } @@ -511,8 +515,8 @@ get_groups(int size, char *grouping) /* convert double to locale-encoded string */ static char * -__format_grouped_double(double value, int *flags, - int left_prec, int right_prec, int pad_char, struct lconv *lc, locale_t loc) +__format_grouped_double(double value, int *flags, int left_prec, int right_prec, + int pad_char, struct lconv *lc, locale_t loc) { char *rslt; @@ -530,7 +534,7 @@ __format_grouped_double(double value, int *flags, size_t decimal_point_size; size_t thousands_sep_size; - int groups = 0; + int groups = 0; grouping = lc->mon_grouping; decimal_point = lc->mon_decimal_point; @@ -593,10 +597,8 @@ __format_grouped_double(double value, int *flags, avalue_size -= (right_prec + 1); } - if ((*flags & NEED_GROUPING) && - thousands_sep_size > 0 && - *grouping != CHAR_MAX && - *grouping > 0) { + if ((*flags & NEED_GROUPING) && thousands_sep_size > 0 && + *grouping != CHAR_MAX && *grouping > 0) { while (avalue_size > (int)*grouping) { GRPCPY(*grouping); GRPSEP; @@ -639,8 +641,7 @@ __format_grouped_double(double value, int *flags, } ssize_t -strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, - ...) +strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) { ssize_t ret; va_list ap; @@ -653,8 +654,8 @@ strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, } ssize_t -strfmon_l(char * __restrict s, size_t maxsize, locale_t loc, - const char * __restrict format, ...) +strfmon_l(char *__restrict s, size_t maxsize, locale_t loc, + const char *__restrict format, ...) { ssize_t ret; va_list ap; From nobody Sat Dec 16 04:19:25 2023 X-Original-To: dev-commits-src-all@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 4SsXsn3qnSz54WsZ; Sat, 16 Dec 2023 04:19: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 4SsXsn2GBXz3CsQ; Sat, 16 Dec 2023 04:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702700365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0MRxuaTh7PeJ6bY+l6xOHYawA8p0yzUmKOrhZbvudng=; b=LRMSntmGOXx99C1rtJ2wPPP9JjX3VW9+QrLb2FVpmGfgahSaEHFrZQjT8smHY4VNg4m+Ge cZPyMdKdCv0jk+R2Hv9bq9P3TdehPRta/O43jLzDR89+3fdx3b4XAHKhX1imkd3MUt95H5 x8AeQCjnoNbdgqfbawEIqZ1XSBFHZTzMiZ/tJYVUyCI92HuNl1mwANBfprPVgNd7EUbzXg U6Y74pyvddLPftJsTbc9dOGJqCCkdNlzxTaMr8BwSWv1C+T26NSeiAWiD58jls7kFyZt/G t8Qm754x9jFmYtSTIZEyKwZqZqd8txDBSPmWE1iS9CJn7fEqaBOmjs0WV4eYrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702700365; a=rsa-sha256; cv=none; b=s8/vkiPQsAQLADjCVGUzZkoKXwj4dh2I7zll15Jzrrk6yQTpk/So24PaN2F5qlKgNnvTuQ lI2XuOVhmHivdxpmjL3r7/uSuo0LA0f9upLwzrE4ApNEi7VVtso1T2eWHRSKXY/PuTtPo/ uNLCnMw6/BPRvS8Domea52pbjTYEzgGmBy20pCSLFwsza0l9wRsDvhK/+rwDxVCV++B4Z6 x/v6e/JfIHVZj3cI3uSz7P6jLrd/b/PbvF9yP+/COIXrcVOHxiPCGerYoOzkLgVtDYdhd/ hkp6MV6umUvFjvvKvTL/R6We6/1JwqojwOovc7nf+aeckTzSt0UkXPzRXl3gEA== 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=1702700365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0MRxuaTh7PeJ6bY+l6xOHYawA8p0yzUmKOrhZbvudng=; b=cYnTO3ndQpKmWIPr/dNVCVwT7GI2ToOfUDv9nW6XfN3rYHVExAD9bweWaTRXe5nralNdjx jBUrpN69IVJUDG2VwsU3g4AZxtMFA/ExQOjN927Ot55TefDRbyIJQ7d8ojlrzUKpf4jjOr Ce/BSbKdbAz3Unb3BhQKQGgttbH0/p/sbBpZ/gjlgbpJvxpqzt/T4tj4gdLjuUWO/Cud5l Ba8IX/jjPdag//OE54+8rpAXzuY791VyeyRCEf1l/QwHdkqG9BrtDeo6i/yjXeNZLJk72j WTppiRlBpwpzNdm1eAEOLFDTTrdsQQdpaQ9jFf5fEsKsw7UOA4GcNkKN9EKKfg== 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 4SsXsn133zzfcX; Sat, 16 Dec 2023 04:19: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 3BG4JPb8059507; Sat, 16 Dec 2023 04:19:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BG4JPx3059504; Sat, 16 Dec 2023 04:19:25 GMT (envelope-from git) Date: Sat, 16 Dec 2023 04:19:25 GMT Message-Id: <202312160419.3BG4JPx3059504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 47218ed5407a - stable/13 - strfmon.c: Use the restrict keyword directly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 47218ed5407a2edaf29d8ee7f715717d933af2c3 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=47218ed5407a2edaf29d8ee7f715717d933af2c3 commit 47218ed5407a2edaf29d8ee7f715717d933af2c3 Author: Konstantin Belousov AuthorDate: 2023-12-09 01:21:02 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-16 04:18:48 +0000 strfmon.c: Use the restrict keyword directly (cherry picked from commit 86e2bcbf47fb4c8dbd799f2f21c0ed338b2e8f1b) --- lib/libc/stdlib/strfmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index 1c9eb3f45d74..d3efc9080c09 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -641,7 +641,7 @@ __format_grouped_double(double value, int *flags, int left_prec, int right_prec, } ssize_t -strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) +strfmon(char *restrict s, size_t maxsize, const char *restrict format, ...) { ssize_t ret; va_list ap; @@ -654,8 +654,8 @@ strfmon(char *__restrict s, size_t maxsize, const char *__restrict format, ...) } ssize_t -strfmon_l(char *__restrict s, size_t maxsize, locale_t loc, - const char *__restrict format, ...) +strfmon_l(char *restrict s, size_t maxsize, locale_t loc, + const char *restrict format, ...) { ssize_t ret; va_list ap; From nobody Sat Dec 16 10:29:47 2023 X-Original-To: dev-commits-src-all@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 4Ssj575xr7z53jgh; Sat, 16 Dec 2023 10:29:47 +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 4Ssj574Swtz4Fgv; Sat, 16 Dec 2023 10:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702722587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7O19AEHWfiyYYEmMepzv9BNPstNk/e+Tayv6q6FedRo=; b=pj6z2sP9LF6M0jHRaHlSnt9qeWyXo8rDwWR24eUvAJ/SYVQhtP3S6PgooGD/wTL0G6itFb wPiL7NTQZ9Fsa0RN+uc9UaCs43Fynl+V3QR1Mn//BO42G6xYPTAmAcieyHE4GZaWbm3PQ8 T5836b3s8G8fBpgMxKPFUlWcsb7EB4yP8R3T7SonYFRYMtGH7sikQNMF1JzpTABOEUP9jo lbkJtqSCQvtC6Z1BxqtKLJ2AfYOEEfQihqsIKbEtDgjtnJts1Dq6OM+th0x6LyMcA6/wUR uAoqXopS5JRP9QUyedyBMWLMRL3vsgZslpc6E9tzELSp58e3prR6Xa4CWRXnsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702722587; a=rsa-sha256; cv=none; b=oZLrvSA7JLnpA13iH4yJmP2ta+nGgmE92Ejv0zQ9H6/6v6HUOQ1sCE9mNKSYXAvam4/Vs6 uW7O5VT0PG0Bdh/f6tDQYiczrNaP5vnkzF+1G6R5isL5cG9DgcMkgCNgY1FEo6L7CaHiKc Gj9o92Jdbd88taqp9eZgsv+2LPKjtM+4FTQc173Mu0pKZKr9hSduRFnPLnwpN/Z5dhEG3q bmXZDzKRoT/48Aqo1S7IhDuWDkNFC0+tUUyMjAlMOj/IDnsd1unhK2FH9bjjN/v4V9nS4J cvvBan7TIdd6gxBUfduij5/m8YEqkiPK/Tu4TxyYBb2QiMcsQ71DU0VY1VrjKw== 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=1702722587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7O19AEHWfiyYYEmMepzv9BNPstNk/e+Tayv6q6FedRo=; b=qvxO31IFYzjACBNmK1GgK2ap1fwWS6nSJMoG9Z7qDJXoWbkbeMnEHRUeb/afMJtYI1eMzJ MbYI7o7sj+RGuWiZMVDFFdrTjCBxum2naAnO5jcywG54DEAkfrajzwob/6Vk/g+PRtp4qT YqlnGDmReLoKFLAwMLI8Dq2HEmN7WLcSs5HniAWgveiMn7cDQ5qcgBOiiMoGWN5k7ZQF/u 69SfKl0buDJAine/bUfyTs8E1ZeEOuY9Yv+MQU1ZSzO7KUEQGTNp8TDBIGU+YIqT9H8um0 wg2YHnzGvFXNRvdsNGfotjC0mOEjcILb+azlJ8jPxTeo5mK7LZkAG3VVuFhC3w== 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 4Ssj573S07zqH6; Sat, 16 Dec 2023 10:29:47 +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 3BGATlHW077916; Sat, 16 Dec 2023 10:29:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BGATlYU077913; Sat, 16 Dec 2023 10:29:47 GMT (envelope-from git) Date: Sat, 16 Dec 2023 10:29:47 GMT Message-Id: <202312161029.3BGATlYU077913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 544bfa7cea3b - stable/14 - tcp: properly initialize LRD while accepting session in syncache List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 544bfa7cea3bb9e9525d84fad42a406912f42e17 Auto-Submitted: auto-generated The branch stable/14 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=544bfa7cea3bb9e9525d84fad42a406912f42e17 commit 544bfa7cea3bb9e9525d84fad42a406912f42e17 Author: Richard Scheffenegger AuthorDate: 2023-12-02 11:15:37 +0000 Commit: Richard Scheffenegger CommitDate: 2023-12-15 08:23:45 +0000 tcp: properly initialize LRD while accepting session in syncache Inherit the setting from the listener socket in syncache_socket. MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D42874 (cherry picked from commit f071abd92e726fc12e9256662e1f286f364252ee) --- sys/netinet/tcp_syncache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index ffde6a4b88c9..2c381ef600d6 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -952,7 +952,8 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) tp->rcv_adv += tp->rcv_wnd; tp->last_ack_sent = tp->rcv_nxt; - tp->t_flags = sototcpcb(lso)->t_flags & (TF_NOPUSH|TF_NODELAY); + tp->t_flags = sototcpcb(lso)->t_flags & + (TF_LRD|TF_NOPUSH|TF_NODELAY); if (sc->sc_flags & SCF_NOOPT) tp->t_flags |= TF_NOOPT; else { From nobody Sat Dec 16 10:29:48 2023 X-Original-To: dev-commits-src-all@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 4Ssj586yLRz53jtN; Sat, 16 Dec 2023 10:29: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 4Ssj585DJCz4FkT; Sat, 16 Dec 2023 10:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702722588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zngPLfG+louomLH/+kOhPsxHqVlLaXK9dtz3sJ4P9DA=; b=TexEMPQTdCpe8B2quv9mtTPSSbhecYeAdoTYOV5duLCO1UDLLblTdGuAiCTsqhQ01nWJmp tvCpvjsn80XO20vZbt13Esc0kBMj4x36ZIUH2coi0U4+FPwdsgw9c3OcMNylfIWx+YfE0p 8T1j2OHKfJTnsQHeca1SuZBfIdHPP9kT+EIUAGaHhaozkps0+gNn1bQXqs6zhwt3dM1iNN tql3ASEV4u44w7TFqjNqgL3R0zH4lVmRhnwnWEGK1hfFc7jL8UY1dfwgBIFal+ATyfoVOa /LT8iTyi/tNoSgv9roGCE8TXd6BYyBBgyu3mBy1lH6wBZIzpEFz3HhmS+gBF6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702722588; a=rsa-sha256; cv=none; b=cR+jk20I8oeKvCh8obMnk2AqR3SKu3Jlp2evO/7qOh5/lU/GHSsHzLhLAegGzM2Yy4C2AD UwO21Or26vnwND5MEAHGpSh3YSPdnyxArU3thcSE4ucUrXQk3f45JHXpuHrZe5Skv1BWwo y802psns+jH7fWaSoDD33x63WF804G1X7fVXmKjkhidEVmOX+YTcdSpp+5KnY+sJD8lbax 9OpWhWsZBocAy1FZnUU5ECQEVDltp0UZFSQ1mX1z1A+EQk60v/toZgynRbTRu+EIxfaUlv xtjXknkOYRerD2x6ZObQVk5TRGPRhnw3x18EEvAnErBXgdzHx/PWMY3x6dBnpA== 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=1702722588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zngPLfG+louomLH/+kOhPsxHqVlLaXK9dtz3sJ4P9DA=; b=lYS4gkL4oYnTvLVjtGcwtjb4t+34/nKyxJZJPRFDOZw2/vYIvyQgWxeyVUTuu7G9/DJpM/ x53O2GUMR1eQVraNrbY892n2yFbadqoAQWSqaCxpsxR00f4zhLTIWZw5oby0X2SOKGqJXi +dnvdwIcz6l1vF1EySR7+QKpuZwbp2hEOFxAYFY2IEmxhg4LnPLN4fe7deMqhh+U+yCr/u FV+fFVloZq24mUU3//jhwvYIqPl4VKeYAjmSrEdjnX8swXnDnxCACTLOct67eYVZRYZxzq ofndOvI5VcalKxC8BLrWO2XKt8MfQVyZfSPbIgAm3eUrYl26UvdqrU4FiDJjMQ== 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 4Ssj58491mzqcr; Sat, 16 Dec 2023 10:29: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 3BGATmNi077970; Sat, 16 Dec 2023 10:29:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BGATmPS077967; Sat, 16 Dec 2023 10:29:48 GMT (envelope-from git) Date: Sat, 16 Dec 2023 10:29:48 GMT Message-Id: <202312161029.3BGATmPS077967@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 1fdbb16f405f - stable/14 - tcp: add PRR 6937bis heuristic and retire prr_conservative sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1fdbb16f405fb44beb204c06c3c573ff7e402f2a Auto-Submitted: auto-generated The branch stable/14 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=1fdbb16f405fb44beb204c06c3c573ff7e402f2a commit 1fdbb16f405fb44beb204c06c3c573ff7e402f2a Author: Richard Scheffenegger AuthorDate: 2023-11-15 21:37:42 +0000 Commit: Richard Scheffenegger CommitDate: 2023-12-15 08:25:07 +0000 tcp: add PRR 6937bis heuristic and retire prr_conservative sysctl Improve Proportional Rate Reduction (RFC6937) by using a heuristic, which automatically chooses between conservative CRB and more aggressive SSRB modes. Only when snd_una advances (a partial ACK), SSRB may be used. Also, that ACK must not have any indication of ongoing loss - using the addition of new holes into the scoreboard as proxy for such an event. MFC after: 4 weeks Reviewed By: #transport, kbowling, rrs Sponsored By: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28822 (cherry picked from commit 49a6fbe38728173da74d5b497f700178e2a6c830) --- share/man/man4/tcp.4 | 8 +------- sys/netinet/tcp_input.c | 47 +++++++++++++++++++++++++++++++---------------- sys/netinet/tcp_sack.c | 32 ++++++++++++++++++++------------ sys/netinet/tcp_var.h | 13 ++++++++++--- 4 files changed, 62 insertions(+), 38 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 0ee57dcb0594..16c9e0ce84df 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -33,7 +33,7 @@ .\" .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" -.Dd June 29, 2023 +.Dd November 17, 2023 .Dt TCP 4 .Os .Sh NAME @@ -480,12 +480,6 @@ This improves the effectiveness of retransmissions particular in environments with ACK thinning or burst loss events, as chances to run out of the ACK clock are reduced, preventing lengthy and performance reducing RTO based loss recovery (default is true). -.It Va do_prr_conservative -While doing Proportional Rate Reduction, remain strictly in a packet conserving -mode, sending only one new packet for each ACK received. -Helpful when a misconfigured token bucket traffic policer causes persistent -high losses leading to RTO, but reduces PRR effectiveness in more common settings -(default is false). .It Va do_tcpdrain Flush packets in the .Tn TCP diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 15b7311f4605..9f7e42b582c6 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -159,11 +159,6 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(drop_synfin), 0, "Drop TCP packets with SYN+FIN set"); -VNET_DEFINE(int, tcp_do_prr_conservative) = 0; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_prr_conservative, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(tcp_do_prr_conservative), 0, - "Do conservative Proportional Rate Reduction"); - VNET_DEFINE(int, tcp_do_prr) = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_prr, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_prr), 1, @@ -1524,7 +1519,8 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, int drop_hdrlen, int tlen, uint8_t iptos) { uint16_t thflags; - int acked, ourfinisacked, needoutput = 0, sack_changed; + int acked, ourfinisacked, needoutput = 0; + sackstatus_t sack_changed; int rstreason, todrop, win, incforsyn = 0; uint32_t tiwin; uint16_t nsegs; @@ -1539,7 +1535,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, thflags = tcp_get_flags(th); tp->sackhint.last_sack_ack = 0; - sack_changed = 0; + sack_changed = SACK_NOCHANGE; nsegs = max(1, m->m_pkthdr.lro_nsegs); NET_EPOCH_ASSERT(); @@ -2582,7 +2578,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, */ if (th->th_ack != tp->snd_una || (tcp_is_sack_recovery(tp, &to) && - !sack_changed)) + (sack_changed == SACK_NOCHANGE))) break; else if (!tcp_timer_active(tp, TT_REXMT)) tp->t_dupacks = 0; @@ -2591,8 +2587,9 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, cc_ack_received(tp, th, nsegs, CC_DUPACK); if (V_tcp_do_prr && - IN_FASTRECOVERY(tp->t_flags)) { - tcp_do_prr_ack(tp, th, &to); + IN_FASTRECOVERY(tp->t_flags) && + (tp->t_flags & TF_SACK_PERMIT)) { + tcp_do_prr_ack(tp, th, &to, sack_changed); } else if (tcp_is_sack_recovery(tp, &to) && IN_FASTRECOVERY(tp->t_flags)) { int awnd; @@ -2667,8 +2664,12 @@ enter_recovery: * cc_cong_signal. */ if (tcp_is_sack_recovery(tp, &to)) { + /* + * Exclude Limited Transmit + * segments here + */ tp->sackhint.prr_delivered = - tp->sackhint.sacked_bytes; + maxseg; } else { tp->sackhint.prr_delivered = imin(tp->snd_max - tp->snd_una, @@ -2771,7 +2772,7 @@ enter_recovery: * counted as dupacks here. */ if (tcp_is_sack_recovery(tp, &to) && - sack_changed) { + (sack_changed != SACK_NOCHANGE)) { tp->t_dupacks++; /* limit overhead by setting maxseg last */ if (!IN_FASTRECOVERY(tp->t_flags) && @@ -2797,7 +2798,7 @@ resume_partialack: if (V_tcp_do_prr && to.to_flags & TOF_SACK) { tcp_timer_activate(tp, TT_REXMT, 0); tp->t_rtttime = 0; - tcp_do_prr_ack(tp, th, &to); + tcp_do_prr_ack(tp, th, &to, sack_changed); tp->t_flags |= TF_ACKNOW; (void) tcp_output(tp); } else @@ -2811,7 +2812,11 @@ resume_partialack: if (V_tcp_do_prr) { tp->sackhint.delivered_data = BYTES_THIS_ACK(tp, th); tp->snd_fack = th->th_ack; - tcp_do_prr_ack(tp, th, &to); + /* + * During ECN cwnd reduction + * always use PRR-SSRB + */ + tcp_do_prr_ack(tp, th, &to, SACK_CHANGE); (void) tcp_output(tp); } } else @@ -3934,7 +3939,7 @@ tcp_mssopt(struct in_conninfo *inc) } void -tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to) +tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, sackstatus_t sack_changed) { int snd_cnt = 0, limit = 0, del_data = 0, pipe = 0; int maxseg = tcp_maxseg(tp); @@ -3974,7 +3979,17 @@ tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to) tp->snd_ssthresh, tp->sackhint.recover_fs) - tp->sackhint.prr_out + maxseg - 1; } else { - if (V_tcp_do_prr_conservative || (del_data == 0)) + /* + * PRR 6937bis heuristic: + * - A partial ack without SACK block beneath snd_recover + * indicates further loss. + * - An SACK scoreboard update adding a new hole indicates + * further loss, so be conservative and send at most one + * segment. + * - Prevent ACK splitting attacks, by being conservative + * when no new data is acked. + */ + if ((sack_changed == SACK_NEWLOSS) || (del_data == 0)) limit = tp->sackhint.prr_delivered - tp->sackhint.prr_out; else diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index fca4b99ee83b..05aaa0b4a662 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -544,21 +544,23 @@ tcp_sackhole_remove(struct tcpcb *tp, struct sackhole *hole) * Process cumulative ACK and the TCP SACK option to update the scoreboard. * tp->snd_holes is an ordered list of holes (oldest to newest, in terms of * the sequence space). - * Returns 1 if incoming ACK has previously unknown SACK information, - * 0 otherwise. + * Returns SACK_NEWLOSS if incoming ACK indicates ongoing loss (hole split, new hole), + * SACK_CHANGE if incoming ACK has previously unknown SACK information, + * SACK_NOCHANGE otherwise. */ -int +sackstatus_t tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) { struct sackhole *cur, *temp; struct sackblk sack, sack_blocks[TCP_MAX_SACK + 1], *sblkp; - int i, j, num_sack_blks, sack_changed; + int i, j, num_sack_blks; + sackstatus_t sack_changed; int delivered_data, left_edge_delta; INP_WLOCK_ASSERT(tptoinpcb(tp)); num_sack_blks = 0; - sack_changed = 0; + sack_changed = SACK_NOCHANGE; delivered_data = 0; left_edge_delta = 0; /* @@ -577,7 +579,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) if (SEQ_LT(tp->snd_fack, th_ack)) { delivered_data += th_ack - tp->snd_una; tp->snd_fack = th_ack; - sack_changed = 1; + sack_changed = SACK_CHANGE; } } /* @@ -667,7 +669,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) delivered_data += sblkp->end - sblkp->start; tp->snd_fack = sblkp->end; sblkp--; - sack_changed = 1; + sack_changed = SACK_NEWLOSS; } else { /* * Append a new SACK hole at the tail. If the @@ -681,7 +683,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) tp->snd_fack = sblkp->end; /* Go to the previous sack block. */ sblkp--; - sack_changed = 1; + sack_changed = SACK_CHANGE; } else { /* * We failed to add a new hole based on the current @@ -698,7 +700,12 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) SEQ_LT(tp->snd_fack, sblkp->end)) { delivered_data += sblkp->end - tp->snd_fack; tp->snd_fack = sblkp->end; - sack_changed = 1; + /* + * While the Scoreboard didn't change in + * size, we only ended up here because + * some SACK data had to be dismissed. + */ + sack_changed = SACK_NEWLOSS; } } } @@ -706,7 +713,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) /* fack is advanced. */ delivered_data += sblkp->end - tp->snd_fack; tp->snd_fack = sblkp->end; - sack_changed = 1; + sack_changed = SACK_CHANGE; } cur = TAILQ_LAST(&tp->snd_holes, sackhole_head); /* Last SACK hole. */ /* @@ -734,7 +741,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) (SEQ_MIN(cur->rxmit, cur->end) - cur->start); KASSERT(tp->sackhint.sack_bytes_rexmit >= 0, ("sackhint bytes rtx >= 0")); - sack_changed = 1; + sack_changed = SACK_CHANGE; if (SEQ_LEQ(sblkp->start, cur->start)) { /* Data acks at least the beginning of hole. */ if (SEQ_GEQ(sblkp->end, cur->end)) { @@ -771,6 +778,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) */ temp = tcp_sackhole_insert(tp, sblkp->end, cur->end, cur); + sack_changed = SACK_NEWLOSS; if (temp != NULL) { if (SEQ_GT(cur->rxmit, temp->rxmit)) { temp->rxmit = cur->rxmit; @@ -808,7 +816,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) * DupAck for this. Also required * for RFC6675 rescue retransmission. */ - sack_changed = 0; + sack_changed = SACK_NOCHANGE; tp->sackhint.delivered_data = delivered_data; tp->sackhint.sacked_bytes += delivered_data - left_edge_delta; KASSERT((delivered_data >= 0), ("delivered_data < 0")); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index cd5712132522..624de66e3e23 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -502,6 +502,13 @@ struct tcptemp { struct tcphdr tt_t; }; +/* SACK scoreboard update status */ +typedef enum { + SACK_NOCHANGE = 0, + SACK_CHANGE, + SACK_NEWLOSS +} sackstatus_t; + /* Enable TCP/UDP tunneling port */ #define TCP_TUNNELING_PORT_MIN 0 #define TCP_TUNNELING_PORT_MAX 65535 @@ -1301,7 +1308,6 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo); #define V_tcp_do_lrd VNET(tcp_do_lrd) #define V_tcp_do_prr VNET(tcp_do_prr) -#define V_tcp_do_prr_conservative VNET(tcp_do_prr_conservative) #define V_tcp_do_newcwv VNET(tcp_do_newcwv) #define V_drop_synfin VNET(drop_synfin) #define V_path_mtu_discovery VNET(path_mtu_discovery) @@ -1481,7 +1487,8 @@ extern struct protosw tcp6_protosw; /* shared for TOE */ uint32_t tcp_new_ts_offset(struct in_conninfo *); tcp_seq tcp_new_isn(struct in_conninfo *); -int tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); +sackstatus_t + tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); int tcp_dsack_block_exists(struct tcpcb *); void tcp_update_dsack_list(struct tcpcb *, tcp_seq, tcp_seq); void tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_laststart, tcp_seq rcv_lastend); @@ -1489,7 +1496,7 @@ void tcp_clean_dsack_blocks(struct tcpcb *tp); void tcp_clean_sackreport(struct tcpcb *tp); void tcp_sack_adjust(struct tcpcb *tp); struct sackhole *tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt); -void tcp_do_prr_ack(struct tcpcb *, struct tcphdr *, struct tcpopt *); +void tcp_do_prr_ack(struct tcpcb *, struct tcphdr *, struct tcpopt *, sackstatus_t); void tcp_lost_retransmission(struct tcpcb *, struct tcphdr *); void tcp_sack_partialack(struct tcpcb *, struct tcphdr *); void tcp_free_sackholes(struct tcpcb *tp); From nobody Sat Dec 16 13:19:07 2023 X-Original-To: dev-commits-src-all@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 4SsmrW5kLRz53vtH; Sat, 16 Dec 2023 13:19: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 4SsmrW5Hvzz4ZCQ; Sat, 16 Dec 2023 13:19:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702732747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qRFTwzc+64DR1y+RE+5ErRVFcZnsZOoKT+glmXaxGAc=; b=XvNYIgsZ7Gxnvo6VrLxkVQTaQWDg/PPCELe0N6gpGck2VxaSz7SOCZsH1x+dAZJl3AEza7 NFCC8bS3nEW/zXYMsCLHa8gYiaoDe2VFxhvQA/wWenw4FI5iC4O0uv+MXrw6GgbiqpxVX7 Yq/YJAF1QUFwluPrKs2q0touE2elsZSg8EuxeAC0HPx4ModFwZTKYxUFNGr6tEt5Pq5oiI 4RzAlWlX4tZOUXOlyxxvJfWB2QWWRBZDbSQDo0UMiQViyk0AVarvbVsnneakQHsO0oZD3o kjET6IIzWVJqzpyqp0Ww/pk7gdQ2lZN88K2R0R9pjQo/GSUhDa8xdZUTTh1Pgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702732747; a=rsa-sha256; cv=none; b=TcmWrwAeURciV1TjEVrpPnbyE0cGcS2iqD8luC8z7zB8wBDd0JNI68Ozo3TBZm3hUu7l2i wvj25w8zUBXSCyjAs92LCQ3KsX6j37sqnY1hBB/dGzofM4Cdze6zSWa9N74wSI12jsy82D nKM8+LMO9Qbd105L1cZk9OHv5MmS2lXmwd7ClHQtOlXqbFLAEu4PZULU1Endw7x+ijdndT o90O6k+R3809d83vifPIykfH4YL4y0E9YzIZAoJEauPWREePnbNzYX4n21cnqkrOmIs8+U 2r6QlSGUJQ2wadZYj1kQMOllyEVuTj1+VeAUpqTapjPeOobM5bDiQUjte6eAkQ== 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=1702732747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qRFTwzc+64DR1y+RE+5ErRVFcZnsZOoKT+glmXaxGAc=; b=YMq6pLO3YGX7UoVp26US4Kw8DhsNwkFq7R9LhZHB2zoSqMbnYaVsgjQuypzKM1yzQMI4fh n1LYDRrPZKCwgaTnGW8/X5xjsiY0M+p9W+OgB8q5SB/mzG5Z+gTPElwpibZo09JOdhMPbb cbu96U0u3bXcnf0B+XJap9BNNGV7vl3myK17vxV8MEqwG+lHxVrPP2zmk0iM4ad3eqclO5 rsaeNeSlsUJAIAjvzFQjiSq0LhPvjtGBnP5uF/XqXPVJ96TR0TkgOMX0sDcZr4sQwKx0Ou 0/gbNeHcrjT6o7aq80Plf3viFTImcJmwiK4PpWx14oIVOoPoGptAVt9/hC/Esg== 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 4SsmrW4N3lzwHF; Sat, 16 Dec 2023 13:19: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 3BGDJ7Pi063109; Sat, 16 Dec 2023 13:19:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BGDJ7p1063106; Sat, 16 Dec 2023 13:19:07 GMT (envelope-from git) Date: Sat, 16 Dec 2023 13:19:07 GMT Message-Id: <202312161319.3BGDJ7p1063106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: 6f3e9bac4d46 - main - vm: Plug umtx shm object leak. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f3e9bac4d46d789af3e563f47681d0a020582ed Auto-Submitted: auto-generated The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=6f3e9bac4d46d789af3e563f47681d0a020582ed commit 6f3e9bac4d46d789af3e563f47681d0a020582ed Author: Pawel Jakub Dawidek AuthorDate: 2023-12-16 00:33:29 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2023-12-16 13:18:36 +0000 vm: Plug umtx shm object leak. Reviewed by: kib Approved by: oshogbo MFC after: 1 week Sponsored by: Fudo Security Differential Revision: https://reviews.freebsd.org/D43073 --- sys/vm/vm_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index b559c9d2cbab..c141b410edf2 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1995,6 +1995,7 @@ vm_object_collapse(vm_object_t object) backing_object)); vm_object_pip_wakeup(backing_object); (void)refcount_release(&backing_object->ref_count); + umtx_shm_object_terminated(backing_object); vm_object_terminate(backing_object); counter_u64_add(object_collapses, 1); VM_OBJECT_WLOCK(object);