From nobody Mon Jul 6 01:06:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQJ6j4Sz6k7SM for ; Mon, 06 Jul 2026 01:06: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtmQJ5zC7z3RN8 for ; Mon, 06 Jul 2026 01:06:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783299976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WuhRAuu+zl7+5Tf77E0im/C/ukysen3inASXFS+8vRk=; b=owP5pTeuU5wpphg8i7Fv7LxNkSyqKAbES5Wu85t4jtuw2XLR1ma8aAwd6Ud3P5h39rUPLl FulB745Cv4ZHexvlxfJ6QRTlNYdd5ITt2s7RkQSFKJUTYBpKy85kU1RT0UJ7aeAEnYEOdF DoyQwBI48Bcjw9FQM4IpawZHqhMjI9J0/SDlvXbK8FHSIjKEmPqvv8AI/B8U0Rm3w0CEh9 JlvIXBmW26+o+VGEhRxiFz0CT5+zXKFUJyoDmsSd4IcG1akrsLhJ8xwOpn7HZsXCwhIBzx AebAkuGON8GFRejf5d9ALuB4nxaBXkPvIL3AkUonoXvQKkEwqqc6PBFzrZR4tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783299976; a=rsa-sha256; cv=none; b=O2yST9XSMj6dcfBgiMOXBU5NFb+IrdCsfR5g/bQhDv/NWgd2N8xYLenyt9jJeLgj17RRkM 4Sss1TaYZmzYGyb4oOe5V8rc1xhydmUud9E1NcsubHwtaK6gp3gKo/maw6wB45o5xkAOh0 SGbZ89XiGOgv0FF58PG4SQZs0dGRsTym50+Agqy7PzRZ32IrEWImlsM/A1+hNW+vqCYiZy ZvDxMLxqSSzlfOmgM+e7yMBm/D6xbS+4YQPc9cZpbvSr36C+ISWH6Ab96EfFIWPjCZR6Sd hMa6327rqtk9Mc2bjxOFTc+bcpSMCUBCYL23Vh/1f13f1ffIgIIjqYr2rnZRqQ== 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=1783299976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WuhRAuu+zl7+5Tf77E0im/C/ukysen3inASXFS+8vRk=; b=CfLGQPCsP19Rio1vbtaov/A7tFtRDK1C9vBmurZRnGN7DqTNoXPtXM708TTWo8Ih6atRh0 F+2BLv4A5V4BtC6GscTxtHmb7/v4kUSRB3jLgkjbHDXlsGudLxqSkAbb+9Eo4NgRmf54fr u3AMBsZSOiNMUyynJ0GNdc9+K1+y12Nc8/8duFkPETEBIynR3R16tUcf9yr44qzxf+wG2/ irqen/+8a1pb536BrAxio/lG7c1bR68fqKVcErX/jVBLFdVrOxrdGmbAbuMd5lHDEZB9yC SocYbOJJj6S4+MNrx4XTnO5c8WOxvtLlAvSIJB5qlLGq94pF7QuL8DqEbB0XqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQJ4lrrzjyc for ; Mon, 06 Jul 2026 01:06:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 394d2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:06:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e8658b2c5046 - stable/15 - rtld: add spinlock around the crt malloc calls List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: e8658b2c5046fa3dbb00a2c8855d1c6790776a24 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:06:16 +0000 Message-Id: <6a4aff88.394d2.1adbd0b0@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e8658b2c5046fa3dbb00a2c8855d1c6790776a24 commit e8658b2c5046fa3dbb00a2c8855d1c6790776a24 Author: Konstantin Belousov AuthorDate: 2026-06-27 18:50:29 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:05:50 +0000 rtld: add spinlock around the crt malloc calls (cherry picked from commit 559f45638dfa50195c591bb0f7f3d3d8f3bb8dc0) --- libexec/rtld-elf/rtld.c | 25 ---------------- libexec/rtld-elf/xmalloc.c | 72 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 26 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 2a05afe66902..938e4b0b8a6b 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -6878,31 +6878,6 @@ getenv(const char *name) strlen(name)))); } -/* malloc */ -void * -malloc(size_t nbytes) -{ - return (__crt_malloc(nbytes)); -} - -void * -calloc(size_t num, size_t size) -{ - return (__crt_calloc(num, size)); -} - -void -free(void *cp) -{ - __crt_free(cp); -} - -void * -realloc(void *cp, size_t nbytes) -{ - return (__crt_realloc(cp, nbytes)); -} - extern int _rtld_version__FreeBSD_version __exported; int _rtld_version__FreeBSD_version = __FreeBSD_version; diff --git a/libexec/rtld-elf/xmalloc.c b/libexec/rtld-elf/xmalloc.c index 5f7c1b5ba10a..4c67939fc27f 100644 --- a/libexec/rtld-elf/xmalloc.c +++ b/libexec/rtld-elf/xmalloc.c @@ -26,6 +26,8 @@ */ #include +#include +#include #include #include #include @@ -35,12 +37,36 @@ #include "rtld_malloc.h" #include "rtld_libc.h" +static int rtld_malloc_spinlock; + +/* + * Almost always the rtld malloc is called under the write-locked rtld + * bind lock. Due to this, xlock() would need a single CAS to take + * the spinlock. But some places only own read-locked rtld bind lock, + * and then the spinlock protects the malloc structures from the + * parallel updates. + */ +static void +xlock(void) +{ + while (atomic_cmpset_acq_int(&rtld_malloc_spinlock, 0, 1) == 0) + cpu_spinwait(); +} + +static void +xunlock(void) +{ + atomic_store_rel_int(&rtld_malloc_spinlock, 0); +} + void * xcalloc(size_t number, size_t size) { void *p; + xlock(); p = __crt_calloc(number, size); + xunlock(); if (p == NULL) { rtld_fdputstr(STDERR_FILENO, "Out of memory\n"); _exit(1); @@ -51,10 +77,11 @@ xcalloc(size_t number, size_t size) void * xmalloc(size_t size) { - void *p; + xlock(); p = __crt_malloc(size); + xunlock(); if (p == NULL) { rtld_fdputstr(STDERR_FILENO, "Out of memory\n"); _exit(1); @@ -83,10 +110,53 @@ xmalloc_aligned(size_t size, size_t align, size_t offset) if (align < sizeof(void *)) align = sizeof(void *); + xlock(); res = __crt_aligned_alloc_offset(align, size, offset); + xunlock(); if (res == NULL) { rtld_fdputstr(STDERR_FILENO, "Out of memory\n"); _exit(1); } return (res); } + +void * +malloc(size_t size) +{ + void *p; + + xlock(); + p = __crt_malloc(size); + xunlock(); + return (p); +} + +void * +calloc(size_t num, size_t size) +{ + void *p; + + xlock(); + p = __crt_calloc(num, size); + xunlock(); + return (p); +} + +void +free(void *cp) +{ + xlock(); + __crt_free(cp); + xunlock(); +} + +void * +realloc(void *cp, size_t nbytes) +{ + void *p; + + xlock(); + p = __crt_realloc(cp, nbytes); + xunlock(); + return (p); +} From nobody Mon Jul 6 01:06:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQL17Zjz6k7BT for ; Mon, 06 Jul 2026 01:06: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtmQK6Xztz3RJG for ; Mon, 06 Jul 2026 01:06:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783299977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3HGjzNe0SXSA1u3O4yPx/B+prykd68JnNKl/wdf55Cs=; b=NLotGP8FeYpSf8L4znGoEJHOVfc+YcfIe6AeZPUdApnk+zKyWkO+VYKnVzHG7ELQrGgeXW S3nXkoygij6x1bKLhOtbnUPJBe3vfzLwOSiaw+K1d4L6JXTanPGm8HY279jw9iWk7xZZQJ KG6cyTYNH1BAkzso79EQdqEL2tdtrQ9RgMjyyZMla6kZkJWlk7ZNu0FA5fdzMYEqcA8NC+ +Na5fVutsyYWjsPpqjTwnwF5gfuLCvcYea0+huyF6vUOf/Ll8LAI27xNNyQKKEn4Vbw8bI 3/7aITxvCVYhj87KWmBmELHjAxYQId5yKwFMJKmLkQx5N2e546YIsXRGHTp7gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783299977; a=rsa-sha256; cv=none; b=j/1XTNSh59b+eR408f+GQCkQ6PI2fLk2WZdT31MRJHyCDa29RKDyZ23xJK6Vr/lzFynSCe nmiMakSGcXD+uyup8dzd0vn/3J4rgw8rYNsEw3QoHSCikstN6HGwQEb3PzmsV2aOTjfdql fzJMAshmliZkmmfBFrBRWlkpkWXH4WPYfk/JZqS0TBZGXJdYyNxBxVFYIyOdwRk2TOVaZJ p2eRap8onIf8EFCVKlQ0ZhzXtxbshwpFcx9dwPHyKQUXJxFsHKcm+oyFO8q6ISk6DemCuI roO8PRUCJQ7PHIcFW5WfteTLdg3QAE831IWKFx9BRvtOvLs8NzHE7/VBzuvWTw== 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=1783299977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3HGjzNe0SXSA1u3O4yPx/B+prykd68JnNKl/wdf55Cs=; b=yuZzY6tsIIeXIrwRjF5XtYfT5t/Rt9U73iIoXHGuWNeII/umCnh4uNGWgkvIwjRlPbv/+h 8dofj4rH8HQNKkfpm3SS+z6jtb8+EboZNQ/aEzxHjQJtmMc16WQGfAfbSjJ7slpeTHcVbc w4SnrfD0Fkpn/GrD5DV/VicU8hgs9hHDkSRj47LLYNt0vZWy8rsdtAuJyaSJIaMJQWxBjm QBqBSkHwNCGSY6BHcHU5+RTnIlwKZloxVYOnVHhhGeaHhWzrwRD0oxlQ2fLQNFBkR89Fiq 0MZBTola/g4FAXFx/15oTryiAWLMB85n/469NXpcphwHGtwsIndkxO/RAvpqFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQK5ZzxzjfC for ; Mon, 06 Jul 2026 01:06:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a4a0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:06:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 682ebe10032d - stable/15 - rtld: stop using unbound alloca() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 682ebe10032d4e682381eb5f108a8297be7b682c Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:06:17 +0000 Message-Id: <6a4aff89.3a4a0.f4f7824@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=682ebe10032d4e682381eb5f108a8297be7b682c commit 682ebe10032d4e682381eb5f108a8297be7b682c Author: Konstantin Belousov AuthorDate: 2026-06-27 15:11:37 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:05:50 +0000 rtld: stop using unbound alloca() PR: 295991 (cherry picked from commit 1e370f038778e16c4b31f8992dda339d429e5cb8) --- libexec/rtld-elf/map_object.c | 4 ++- libexec/rtld-elf/rtld.c | 82 ++++++++++++++++++++++++++++++------------- libexec/rtld-elf/rtld.h | 2 ++ 3 files changed, 63 insertions(+), 25 deletions(-) diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 6c6f0c9289b9..d769d01d3b24 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -113,7 +113,7 @@ map_object(int fd, const char *path, const struct stat *sb, bool ismain) note_end = 0; note_map = NULL; note_map_len = 0; - segs = alloca(sizeof(segs[0]) * hdr->e_phnum); + segs = xcalloc(hdr->e_phnum, sizeof(segs[0])); stack_flags = PF_X | PF_R | PF_W; text_end = 0; while (phdr < phlimit) { @@ -341,6 +341,7 @@ map_object(int fd, const char *path, const struct stat *sb, bool ismain) if (note_map != NULL) munmap(note_map, note_map_len); munmap(hdr, page_size); + free(segs); return (obj); error1: @@ -351,6 +352,7 @@ error: if (!phdr_in_zero_page(hdr)) munmap(phdr, hdr->e_phnum * sizeof(phdr[0])); munmap(hdr, page_size); + free(segs); return (NULL); } diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 938e4b0b8a6b..864148df99ba 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -342,16 +342,6 @@ const char *ld_env_prefix = LD_; static void (*rtld_exit_ptr)(void); -/* - * Fill in a DoneList with an allocation large enough to hold all of - * the currently-loaded objects. Keep this as a macro since it calls - * alloca and we want that to occur within the scope of the caller. - */ -#define donelist_init(dlp) \ - ((dlp)->objs = alloca(obj_count * sizeof(dlp)->objs[0]), \ - assert((dlp)->objs != NULL), (dlp)->num_alloc = obj_count, \ - (dlp)->num_used = 0) - #define LD_UTRACE(e, h, mb, ms, r, n) \ do { \ if (ld_utrace != NULL) \ @@ -1042,6 +1032,38 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) return ((func_ptr_type)obj_main->entry); } +/* + * Fill in a DoneList with an allocation large enough to hold all of + * the currently-loaded Keep this as a macro since it calls + * alloca and we want that to occur within the scope of the caller. + */ +#define DLP_ALLOCA_LIMIT 100 /* 800 bytes on LP64 */ +#define donelist_init(_DLP, _REQ) do { \ + DoneList *_dlp = _DLP; \ + SymLook *_r = _REQ; \ + _dlp->num_alloc = obj_count, \ + _dlp->req = NULL; \ + if (_dlp->num_alloc > DLP_ALLOCA_LIMIT) { \ + _dlp->objs = xcalloc(_dlp->num_alloc, sizeof(_dlp->objs[0])); \ + if (_r != NULL && _r->donelist_mem == NULL) { \ + _r->donelist_mem = _dlp->objs; \ + _dlp->req = _r; \ + } \ + } else { \ + _dlp->objs = alloca(_dlp->num_alloc * sizeof(_dlp->objs[0])); \ + } \ + _dlp->num_used = 0; \ +} while (0) + +static void +donelist_free(DoneList *dlp) +{ + if (dlp->num_alloc > DLP_ALLOCA_LIMIT) + free(dlp->objs); + if (dlp->req != NULL) + dlp->req->donelist_mem = NULL; +} + void * rtld_resolve_ifunc(const Obj_Entry *obj, const Elf_Sym *def) { @@ -2319,7 +2341,7 @@ init_dag(Obj_Entry *root) if (root->dag_inited) return; - donelist_init(&donelist); + donelist_init(&donelist, NULL); /* Root object belongs to own DAG. */ objlist_push_tail(&root->dldags, root); @@ -2342,6 +2364,7 @@ init_dag(Obj_Entry *root) } } root->dag_inited = true; + donelist_free(&donelist); } static void @@ -4103,8 +4126,11 @@ do_dlsym(void *handle, const char *name, void *retaddr, const Ver_Entry *ve, LD_UTRACE(UTRACE_DLSYM_START, handle, NULL, 0, 0, name); rlock_acquire(rtld_bind_lock, &lockstate); - if (sigsetjmp(lockstate.env, 0) != 0) + if (sigsetjmp(lockstate.env, 0) != 0) { lock_upgrade(rtld_bind_lock, &lockstate); + free(req.donelist_mem); + req.donelist_mem = NULL; + } if (handle == NULL || handle == RTLD_NEXT || handle == RTLD_DEFAULT || handle == RTLD_SELF) { if ((obj = obj_from_addr(retaddr)) == NULL) { @@ -4173,7 +4199,7 @@ do_dlsym(void *handle, const char *name, void *retaddr, const Ver_Entry *ve, return (NULL); } - donelist_init(&donelist); + donelist_init(&donelist, &req); if (obj->mainprog) { /* Handle obtained by dlopen(NULL, ...) implies global * scope. */ @@ -4204,6 +4230,7 @@ do_dlsym(void *handle, const char *name, void *retaddr, const Ver_Entry *ve, defobj = req.defobj_out; } } + donelist_free(&donelist); } if (def != NULL) { @@ -4731,21 +4758,24 @@ get_program_var_addr(const char *name, RtldLockState *lockstate) { SymLook req; DoneList donelist; + const void **res; symlook_init(&req, name); req.lockstate = lockstate; - donelist_init(&donelist); + donelist_init(&donelist, NULL); if (symlook_global(&req, &donelist) != 0) return (NULL); if (ELF_ST_TYPE(req.sym_out->st_info) == STT_FUNC) - return ((const void **)make_function_pointer(req.sym_out, - req.defobj_out)); + res = (const void **)make_function_pointer(req.sym_out, + req.defobj_out); else if (ELF_ST_TYPE(req.sym_out->st_info) == STT_GNU_IFUNC) - return ((const void **)rtld_resolve_ifunc(req.defobj_out, - req.sym_out)); + res = (const void **)rtld_resolve_ifunc(req.defobj_out, + req.sym_out); else - return ((const void **)(req.defobj_out->relocbase + - req.sym_out->st_value)); + res = (const void **)(req.defobj_out->relocbase + + req.sym_out->st_value); + donelist_free(&donelist); + return (res); } /* @@ -4820,7 +4850,7 @@ symlook_default(SymLook *req, const Obj_Entry *refobj) SymLook req1; int res; - donelist_init(&donelist); + donelist_init(&donelist, req); symlook_init_from_req(&req1, req); /* @@ -4873,6 +4903,7 @@ symlook_default(SymLook *req, const Obj_Entry *refobj) } } + donelist_free(&donelist); return (req->sym_out != NULL ? 0 : ESRCH); } @@ -4954,13 +4985,15 @@ symlook_obj_load_filtees(SymLook *req, SymLook *req1, const Obj_Entry *obj, Needed_Entry *needed) { DoneList donelist; - int flags; + int flags, res; flags = (req->flags & SYMLOOK_EARLY) != 0 ? RTLD_LO_EARLY : 0; load_filtees(__DECONST(Obj_Entry *, obj), flags, req->lockstate); - donelist_init(&donelist); + donelist_init(&donelist, NULL); symlook_init_from_req(req1, req); - return (symlook_needed(req1, needed, &donelist)); + res = symlook_needed(req1, needed, &donelist); + donelist_free(&donelist); + return (res); } /* @@ -6305,6 +6338,7 @@ symlook_init_from_req(SymLook *dst, const SymLook *src) dst->defobj_out = NULL; dst->sym_out = NULL; dst->lockstate = src->lockstate; + dst->donelist_mem = NULL; } static int diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 322d1ee94d6f..bdcfc3dc5ded 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -319,6 +319,7 @@ typedef struct Struct_SymCache { */ typedef struct Struct_DoneList { const Obj_Entry **objs; /* Array of object pointers */ + struct Struct_SymLook *req; unsigned int num_alloc; /* Allocated size of the array */ unsigned int num_used; /* Number of array slots used */ } DoneList; @@ -348,6 +349,7 @@ typedef struct Struct_SymLook { const Obj_Entry *defobj_out; const Elf_Sym *sym_out; struct Struct_RtldLockState *lockstate; + void *donelist_mem; } SymLook; enum { From nobody Mon Jul 6 01:06:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQM326Mz6k7QR for ; Mon, 06 Jul 2026 01:06: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtmQM0V0kz3RBm for ; Mon, 06 Jul 2026 01:06:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783299979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G68boGXqWuW4hOQLNZNgy4Xme8rkrWS7AUrW7Rg3BoM=; b=JY7eec5tAsG5OoA7GzgB1/lp+UnvQzXLPtaZWXG15s/pYJ0jUDwpT2OWKqYR6FvgXsq49E qbpNz/7oEjyQFlE/eutzuQ0Mmn+nD/+t5JUjJB2qfeHh5n0ZaGO+g9X0sbY+bzyTVFy/Y0 mTnojWBCr467T4CmZC1/PD3Z1zSTaxhxmBj67Yfi+SNbdaeia3SzmkVuOooMBmtfsu1zqa MgUwRTNHpR4Dee1TnvmuDgdwXHJ3BN8PFjOyZEWLRHDOJK0CwkURw+ftIGqQnWAvaYka68 6zw6h6BsoMmvLSBqYMVBhi2mo1e0iz4+iUp/S+5zTg8x4lwxdioJYwywqC+IIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783299979; a=rsa-sha256; cv=none; b=McSQY9iC2s4exhMDtg2aAnxd+q02kcw1nuv+k7e0PGtNYobvjHbMDXXZRxxwoCgE2+/bto yPkAAWfu6gR8HAa+MMHJLS2G69/Pc+3aH5sm/+GWrhhImDnyeLo1y79BPuQ1SIDskbbr92 XBG5+Au9DG0/SXdiu7HdB5myxz+OEHznnL2nuU4M49XHa/guCkaa5Vjg8zf83o4DBexrKk 1hTXwWZ/x6zb9jhdop2z+kVNMRaSndI94eS2I35lnwAa40jjSIa9WrMulXaNuvFwVbdiEE vGW5XSusNr8fXaXUzlsqGF+7URHkAjULey/E4N3Ohxe6xVNsIAsXMy1qHL7Mug== 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=1783299979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G68boGXqWuW4hOQLNZNgy4Xme8rkrWS7AUrW7Rg3BoM=; b=J+y/Ei9sYhUGqChLH3iey0TXXgQZCDM4HatiocUuCK51k2oDjtdtWJhPL77N1iMYse/Nr6 uu8vuoL9wVs3P3h8ihbQ1HeaQu90ulRY3Q8RgLRuzeGv2NSQa/22/IDXqhNzDqsiVBZafi p93RkLzY3ofm3p9p1VjTxfSZqK9tlXbFcx8+OGWaSksZw/yuGft8nh+hqB5SV6SgygGt/9 UUUPrYvLG31XvEkEcP+1nsa/uHTf+r2/szcFqjeYWJ1ZhRxn2uLRJfX5mWl00uHMYvi4zp CLlh+Rg+HoGFFNMlq3twUtlsxPuAjJUut7bqMWLk762GuKUSnqL8vWAyuvUAHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQL6MpszjDm for ; Mon, 06 Jul 2026 01:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ab07 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:06:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b3ce127cc330 - stable/15 - rtld: unify the return path for map_object() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: b3ce127cc3309f6c3b12bbc876ab347502707f9e Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:06:18 +0000 Message-Id: <6a4aff8a.3ab07.5329b2b8@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b3ce127cc3309f6c3b12bbc876ab347502707f9e commit b3ce127cc3309f6c3b12bbc876ab347502707f9e Author: Konstantin Belousov AuthorDate: 2026-06-29 20:08:31 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:05:50 +0000 rtld: unify the return path for map_object() (cherry picked from commit 70fb92cd56bfe88a12d2a253542320bad7198321) --- libexec/rtld-elf/map_object.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index d769d01d3b24..0b4e847f407e 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -338,7 +338,8 @@ map_object(int fd, const char *path, const struct stat *sb, bool ismain) obj->stack_flags = stack_flags; if (note_start < note_end) digest_notes(obj, note_start, note_end); - if (note_map != NULL) +finish: + if (note_map != NULL && note_map != MAP_FAILED) munmap(note_map, note_map_len); munmap(hdr, page_size); free(segs); @@ -347,13 +348,10 @@ map_object(int fd, const char *path, const struct stat *sb, bool ismain) error1: munmap(mapbase, mapsize); error: - if (note_map != NULL && note_map != MAP_FAILED) - munmap(note_map, note_map_len); if (!phdr_in_zero_page(hdr)) munmap(phdr, hdr->e_phnum * sizeof(phdr[0])); - munmap(hdr, page_size); - free(segs); - return (NULL); + obj = NULL; + goto finish; } bool From nobody Mon Jul 6 01:06:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQP6Yzvz6k7HG for ; Mon, 06 Jul 2026 01:06: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtmQP1YkMz3RT9 for ; Mon, 06 Jul 2026 01:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783299981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N2nr0WYP3q0d8Vs44/HQxcPMJ0ryVwlwQ+WQESEWUjw=; b=pucQOggvaUA0d0O1KHDpUJOwOrvkeqoOmdKiVtUSiCEORb4eQ1aPv8K+Li4KGgHuPXjaAP x1bW5y1OIxZ1Ni/moUoSOYvOnlaEK1IjeaSMSlt1UA25QAJuLXbXRb/j3TSLhEEhEAx1b9 7h20pToygtgU1gxqbWYqLsDGjYrN4U7XtMz3inR7FAvM3nlQXo9uxj0TDaZPzJdH6uUVmq CEdU0MAaJH9KMCIjMSDxvchL1aIDeZKU62FPEEnQNmaFRWu7WAuxj5bqtwEIfqle87wDen jxKIcBN5XU8+kuKYIOatiWqjNrXWztJL7wPk1fmb5R4bM0PGa4RE8obk/uf5qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783299981; a=rsa-sha256; cv=none; b=ppssHQeQLeN+9Rq7Zg8kmP1/bfnEQvVVloqNl+Uhg+XVV23u3k8Akj/H5W4ughjMRlJcdo 26eAI0jqsuZYBP1pdnD1snQUUfwv2RkGtMo6BsCuknWzWC+GgT6LzgL6ixD8hDC/rXOxDq tGKNI1ZQJd8Lxaw6bckPWrbbJxoQVW6LVe+bs9vzITDSccNr+lO0J0/XE4uZFIHq4O06XE WdzbaG/XS/1BlTSLow6+ZqNPDNJ+mtiqAf1APu9L9gw06XyrwRj/Sc2wxR+FOwHKLD2VSV sh/lq2uousafoc5S9lHUCnl6iKvw42Slwpcm0IjNlOAvNem6AjKZjf7PIUS7Kw== 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=1783299981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N2nr0WYP3q0d8Vs44/HQxcPMJ0ryVwlwQ+WQESEWUjw=; b=KYAWJZPpOm3lGvV+TLseblOj9pl6qLidDxYPOyUBuG45zvUYcgTxIFZXQoeKjg3AU4EFW+ YsZBHW68A7ruUI9TuochBvPH8mxZxjdwrMbqex1IPg5XuL1o+kVxWoqTs+RoQhFgim5/6y yStrsqYe9PjbwlGT0xRHyK95JdMxRkRbkZTrMVeqNoQAFxc4PtUSC/LyFLCaJTIdsDJNbH brRCNnjOyxleUQvYXn//4xjU90uwbHTnnbcZ77jFxyaDoCuDkWiOlwkOB/pZagLNWcoI28 uvQiwD5yHiHrkWA0fsNejZNoXbSbRG/ew0LSTGqsexDoOshuOBuYYo/FUeYagg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQP0XRrzjwR for ; Mon, 06 Jul 2026 01:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ab0b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:06:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 10ed74b1b94e - stable/15 - posix_spawn(3): create a guard page below the stack for rfork_thread on x86 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 10ed74b1b94ed81bdd3f7c48f6f2be33ef9a14ac Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:06:21 +0000 Message-Id: <6a4aff8d.3ab0b.83b32e4@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=10ed74b1b94ed81bdd3f7c48f6f2be33ef9a14ac commit 10ed74b1b94ed81bdd3f7c48f6f2be33ef9a14ac Author: Konstantin Belousov AuthorDate: 2026-06-29 22:06:53 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:05:51 +0000 posix_spawn(3): create a guard page below the stack for rfork_thread on x86 (cherry picked from commit 2767a1f3686e5b1657ff4c3d57737c7f21598125) --- lib/libc/gen/posix_spawn.c | 47 ++++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index bde3268eb8e0..0c3a903b5192 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -28,6 +28,7 @@ #include "namespace.h" #include +#include #include #include #include @@ -231,19 +232,7 @@ struct posix_spawn_args { volatile int error; }; -#define PSPAWN_STACK_ALIGNMENT 16 -#define PSPAWN_STACK_ALIGNBYTES (PSPAWN_STACK_ALIGNMENT - 1) -#define PSPAWN_STACK_ALIGN(sz) \ - (((sz) + PSPAWN_STACK_ALIGNBYTES) & ~PSPAWN_STACK_ALIGNBYTES) - -/* - * 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 - * try to allocate space on the stack for argv[]. - */ #define _RFORK_THREAD_STACK_SIZE 4096 -_Static_assert((_RFORK_THREAD_STACK_SIZE % PSPAWN_STACK_ALIGNMENT) == 0, - "Inappropriate stack size alignment"); static int _posix_spawn_thr(void *data) @@ -285,11 +274,13 @@ do_posix_spawn(pid_t *pid, const char *path, pid_t p; int pfd; bool do_pfd; - char *stack; - size_t stacksz; + char *guard, *stack; + size_t stacksz, pagesz; #if defined(__i386__) || defined(__amd64__) stacksz = _RFORK_THREAD_STACK_SIZE; + pagesz = getpagesize(); + if (use_env_path) { size_t cnt; @@ -304,24 +295,21 @@ do_posix_spawn(pid_t *pid, const char *path, for (cnt = 0; argv[cnt] != NULL; ++cnt) ; stacksz += MAX(3, cnt + 2) * sizeof(char *); - stacksz = PSPAWN_STACK_ALIGN(stacksz); } - /* - * aligned_alloc is not safe to use here, because we can't guarantee - * that aligned_alloc and free will be provided by the same - * implementation. We've actively hit at least one application that - * will provide its own malloc/free but not aligned_alloc leading to - * a free by the wrong allocator. - */ - stack = malloc(stacksz); - if (stack == NULL) + stacksz = round_page(stacksz); + guard = mmap(NULL, stacksz + pagesz, 0, MAP_GUARD, -1, 0); + if (guard == MAP_FAILED) return (ENOMEM); - stacksz = (((uintptr_t)stack + stacksz) & ~PSPAWN_STACK_ALIGNBYTES) - - (uintptr_t)stack; + stack = mmap(guard + pagesz, stacksz, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED | MAP_ANON, -1, 0); + if (stack == MAP_FAILED) { + munmap(guard, stacksz + pagesz); + return (ENOMEM); + } #else - stack = NULL; - stacksz = 0; + guard = stack = NULL; + pagesz = stacksz = 0; #endif psa.path = path; psa.fa = fa; @@ -362,7 +350,8 @@ do_posix_spawn(pid_t *pid, const char *path, p = rfork_thread(RFSPAWN, stack + stacksz, _posix_spawn_thr, &psa); } - free(stack); + if (stack != NULL) + munmap(guard, stacksz + pagesz); /* * The above block should leave us in a state where we've either From nobody Mon Jul 6 01:06:19 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQN4697z6k7Kb for ; Mon, 06 Jul 2026 01:06: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtmQN0j9Cz3RT0 for ; Mon, 06 Jul 2026 01:06:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783299980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wZTMSPt2eaTvaFfqFrRdBZc0QLoJjubCxx1PjvW5Syo=; b=wIAPkxHTk1onZT181bm7dPJFjJLr+XiN0/t3lTL3JAj9rdB6bsAeh2+DII6H1JCXfn9Ncb speLtXK3MdvmfLVRck9V2W+41gsaEv8261kWMDg7ZZb2Z82XtBSx0QLmuty2dnHp8vHq9D /LrOS62fC1RVigW3b4hO3nv3cc6bNL4Gj7FIVnzjoNBt5Tl9IuZAbZMujhS7a6AxZaYBxZ H/onDVhJElxr/b694K6dBzQ0qIEse/IQjkIpYlZM6H72qcRqZbuIG+jxE/K3ali5bsJkTN acz7AtXOivtCX+mf+llut9N86NS2DKynHsm5qj/A0WIer0sy336sXk6YzyeZuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783299980; a=rsa-sha256; cv=none; b=FgVUAU3G0UWNdqZpM1UCVDXq//VnBRjvZzGH9XEvAI4Ou7xOEwYZYNmRSHt1Uc7sbdGxn9 6Z2Xe1Wd9thORkVmGRPnFzQtYQFXH+7KuGqq/z0UxlEV1rx/y6lFDcdwVuX7HKc3P2fmhE CCzfJ9CeOvWRE/uNaIKCur1OfBr1jKskxfpjpdzgkm/feN3YyNibGQbh0wdYA0tyfz92lt uJ4kadGBVneme1VqguTJYP3PEWnuWjuPEuVHwR0/Cd6sgy3XdKTRuUHiclKSdT1c9GM179 e47jAdoV3ysXtlSE3oqT8kmcLjsUc28e0Z576L5EwIyh3+sqh1AsPe4dp9QJRQ== 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=1783299980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wZTMSPt2eaTvaFfqFrRdBZc0QLoJjubCxx1PjvW5Syo=; b=YlKszqkyn/sCrkTdtVmhCSLy1WCKui1AILzejTPvzyRGRAtVdpSOj8d38yZocE9YPdX++L jj8H87LwzhHNChYgLBqE2He/ihaSWD8iP3ehbySkF/a/3tQ6YjdkZ2Zd1ZjLWNRr6rdvYo l4MTUP21BD0hLQV5myytVZw8+3Bzy+xB8uLnHH31J+J5hDeC6oE++8Cs1jzf+ggSiYfC0T /GejZIJSFKf1BmK5AhgERHW4ulZY23aQPTaKoCP61HMrgiqyzcM8A2ilmQ2pJ6qZXkJPhg U8nGhr0WuAIQzdMDco0OFoWRoBxaJsZZQoRtIlmUDk8ZK/5lNGRSjLCbqLU1Ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQM6n7dzjl7 for ; Mon, 06 Jul 2026 01:06:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3767a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:06:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b9ff22f3a27c - stable/15 - do_posix_spawn(): use bool List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: b9ff22f3a27c5fb06dd0e241a249a9436079f594 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:06:19 +0000 Message-Id: <6a4aff8b.3767a.121ba92f@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b9ff22f3a27c5fb06dd0e241a249a9436079f594 commit b9ff22f3a27c5fb06dd0e241a249a9436079f594 Author: Konstantin Belousov AuthorDate: 2026-06-26 17:15:12 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:05:51 +0000 do_posix_spawn(): use bool (cherry picked from commit b516c234d0e4ccd69ca1f3d3a8bb80eed3f0a87c) --- lib/libc/gen/posix_spawn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index 11cdb5a29d03..bde3268eb8e0 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -279,7 +279,7 @@ static int do_posix_spawn(pid_t *pid, const char *path, const posix_spawn_file_actions_t *fa, const posix_spawnattr_t *sa, - char * const argv[], char * const envp[], int use_env_path) + char * const argv[], char * const envp[], bool use_env_path) { struct posix_spawn_args psa; pid_t p; @@ -401,7 +401,7 @@ posix_spawn(pid_t *pid, const char *path, const posix_spawnattr_t *sa, char * const argv[], char * const envp[]) { - return (do_posix_spawn(pid, path, fa, sa, argv, envp, 0)); + return (do_posix_spawn(pid, path, fa, sa, argv, envp, false)); } int @@ -410,7 +410,7 @@ posix_spawnp(pid_t *pid, const char *path, const posix_spawnattr_t *sa, char * const argv[], char * const envp[]) { - return (do_posix_spawn(pid, path, fa, sa, argv, envp, 1)); + return (do_posix_spawn(pid, path, fa, sa, argv, envp, true)); } /* From nobody Mon Jul 6 01:06:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQR1D32z6k7Kd for ; Mon, 06 Jul 2026 01:06: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtmQQ2sLVz3Rbp for ; Mon, 06 Jul 2026 01:06:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783299982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XiMwhFzLB7mIMA6wZa4m8BaZVbVY48guYE1yMEifvA8=; b=T1iohc9aFtxknFj5QyNKBtQkehw4bdYX4xl/AR+WBE/POs9v2TTjvmhFDGLeLfYKT7tXYD poU0qk2JO5Mw+0J6ZidaV2legyRaqQN5fqYbr+Ipya8tbYwjEPMDVxrEiObKKF5D+qD4Vj qGyws2BH5hAlXeUN39rsWuGrQ6K86umz2JPBiWMnxcdsV1AYHVI8tugu+D1kDRczeJQ3mU O/CnjJ2mDF48pZjE8CNmyEcbUAA0Vjq62r56OoscW9BBJ7mORdcVLFATw1k0qZi/VbageE 1vjQ/YddiFRKrsCmZDtH0FRth0Ht0/Vlro9kZ6OeGvl6rUkN26u74MVMLillbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783299982; a=rsa-sha256; cv=none; b=tGxAXa0o9YVxV5Gw99oWuaqJtWvTAmC9hePDTDV3qApvbPxMmZZJ8rAd0Tu0yNhwGUIFnq l4b4n7eE4sBL2DLVNW+3zJforQ0iTZ7OFO8Kpsy+Z7H5G1Z1bRUuXqiXyWH+m12DLnQKpq NlUI98vDNTNdP8Gt/Wx43cXLdBu2GE6PyiXyJEfg/sD+xdrszVyZoffIXnO6eFbMUoFEjX k43uQ8rZ0jA4pDuBGwWT94gJfsSTtWOvR+baGWb2cCAVjbn3TxNoMzmvbC9ACbS7cydVH1 XJ22cpkb9Q8f7GFTh/nVfLAuuk7teRoETqAJxON0lE7XIz+XMl23uJg/6CNngQ== 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=1783299982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XiMwhFzLB7mIMA6wZa4m8BaZVbVY48guYE1yMEifvA8=; b=cprxknmSxRzIADdsnl2Z6nzJjUO6QWzrXN4BhtvxE0nJR5shMrg3s9a687tVRSau+oBMMK su+7iSxmqB16o+bXLAnJzGrgHJhhteBIkNHM/FxQNO3yfgPp3mqKRTl3RoK+BIMqBTQqW7 YZSJwRnltHZr+gohNq9FZFxrzeMQo/Y8m//rhex9D7nNoflTsPAJa6lWVFqGxe3/ek+sxo b//KnVLzP11UEhgjq85pcfe5ehDcFDHYgN+WIoD5SiKUad0fkL3KSEuSEiC7+DPtu5Ckb7 BnX3t0x/rMul+QdqXZ/oeBgy4pg4UeIa34tabZg/zw/5oUymzfRDx7en8LR83w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQQ1PqpzjDq for ; Mon, 06 Jul 2026 01:06:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a41b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:06:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5ed7b34469d1 - stable/15 - x86: add CPUID bits for SHA512/SM3/SM4 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 5ed7b34469d1ac8e250b8dfe9b6139f4ea117331 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:06:22 +0000 Message-Id: <6a4aff8e.3a41b.46873cb4@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5ed7b34469d1ac8e250b8dfe9b6139f4ea117331 commit 5ed7b34469d1ac8e250b8dfe9b6139f4ea117331 Author: Konstantin Belousov AuthorDate: 2026-07-01 23:29:04 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:05:52 +0000 x86: add CPUID bits for SHA512/SM3/SM4 (cherry picked from commit cf851111b02fae7425f9642460762d644983fdca) --- sys/x86/include/specialreg.h | 3 +++ sys/x86/x86/identcpu.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 7933291a752e..dbd0e25639f9 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -548,6 +548,9 @@ /* * CPUID instruction 7 Structured Extended Features, leaf 1 eax info */ +#define CPUID_STDEXT4_SHA512 0x00000001 +#define CPUID_STDEXT4_SM3 0x00000002 +#define CPUID_STDEXT4_SM4 0x00000004 #define CPUID_STDEXT4_LASS 0x00000040 #define CPUID_STDEXT4_FRED 0x00020000 #define CPUID_STDEXT4_LKGS 0x00040000 diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index e8ac6d2a812c..51ee58f4de87 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -1051,6 +1051,9 @@ printcpuinfo(void) printf("\n Structured Extended Features4=0x%b", cpu_stdext_feature4, "\020" + "\001SHA512" + "\002SM3" + "\003SM4" "\007LASS" "\022FRED" "\023LKGS" From nobody Mon Jul 6 01:06:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQR5Nmwz6k7HN for ; Mon, 06 Jul 2026 01:06: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtmQR3Bjxz3RQl for ; Mon, 06 Jul 2026 01:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783299983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CN7BWWVsdHAjELNTquTHJWzZHgPuDGvKLqUT55Z0O9Y=; b=xgBcOxe24ANDhXXkT/qsi610RUQkhHuFq7LeHmiHvqdZyOL6n0E44agCqmRDK6P7tcKny/ s7ljSm41t0QeB91qW8/Wt227oF5SAldWwEKWQRu6OhRDCaP8dt6LXN5f3RboNYLNsY3NPc 4/CtfMjXLHJdm/EUOGZs9yxE3JvmRd0r639yqmQUE3+TTmmsELK0XLQFzZgjJnRk5Ch59g 0bB6qhlaQ5t1rS0iK/x8Ub8AGEcHsx2oJ3EZxO4/t7r1PrkYWa6HvnTqnkU9ABpXDU/D83 JKh6QhWUjkD9psa6sF4dqyAKZhLj1reteIFVFeWxnXM/C70Xi6GiRw6LUv2V1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783299983; a=rsa-sha256; cv=none; b=PaaYVeaR4tUNpYi/oLL3MmKXBAv+66MmRQXUnRX1ygVlatAq9YIGYAdE8Km44tibWEGf1F i6lKPna8onHypdAaGCqebDqOqdWmokUNe3RVzwqm6hwrHx47OwlRNxDSqOCLaaglFg77IQ mRZ8COT3dUscVO4J34BP7tkhPlfG3CchHPgbKRX2ERxq/DPERcItOl0Tod4RZ83Pr1qjMj nUiXD2PrwThcJNry+NaN4ZRLEGqIGVDrsoHr/VGUv6/vORIMy56GkcPzgLkShONNdIsKy3 JZMcnqju9XMwdzW0lE5FwDZi1uk8coj4WIwyacYVXSzCnJOP1D0x2ktRk6ZWIg== 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=1783299983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CN7BWWVsdHAjELNTquTHJWzZHgPuDGvKLqUT55Z0O9Y=; b=e1j9PJ/boP6cAi94PjWs+ZBT1z/6CKUm80OWAPBlLv6fBhEIkvrWq0IhOgRs4T3eZt61sq S0CDO5rkSaWzuBgATCLY7rr/njFE+bFIP4dGUjXSOGe6fclH0oJralYqmYd0eEOk9UbHdw FiVMGbOB6cfqP3LIl1gQzgZ3fKFWb5bXByTe9nMxeh52Q4ODlwnJg8+3eHf27pbeOVpTBw iFENbajVGhSdjEDR5vhLx/f4LVHecmfz/pPX2/z45UNxm6D5E1td/L16pAfAYUlSTdDaVk NmAnK45SakP1HZdGyhorzy94p4zJe0daNfkssdKpO4rM15xf049U4mr3Sh/9Qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtmQR28Ldzjl9 for ; Mon, 06 Jul 2026 01:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a50d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:06:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d1f7902fda83 - stable/15 - sys/systm.h: include sys/limits.h for SSIZE_MAX List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: d1f7902fda830b38c6b0ca701b9e310aa3909228 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:06:23 +0000 Message-Id: <6a4aff8f.3a50d.4478eab1@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d1f7902fda830b38c6b0ca701b9e310aa3909228 commit d1f7902fda830b38c6b0ca701b9e310aa3909228 Author: Konstantin Belousov AuthorDate: 2026-07-04 01:24:00 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:05:53 +0000 sys/systm.h: include sys/limits.h for SSIZE_MAX PR: 296489 (cherry picked from commit bcb471cfb499f61d98abdc7bfd48bee0e229b02b) --- sys/sys/systm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index d6488f45acae..13103325595e 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -98,6 +98,7 @@ struct ucred; #include /* MAXCPU */ #include /* curthread */ #include +#include extern bool scheduler_stopped; From nobody Mon Jul 6 01:42:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDg1rd5z6kBPD for ; Mon, 06 Jul 2026 01:42: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDf6Fjlz3Xfk for ; Mon, 06 Jul 2026 01:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302178; 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; bh=Wpn6VHzESCZVV2wHZhAdK4kwxfj+uUlRMXjS5rJ+nJI=; b=NS5XU1fd076o1A8Jb3qbpADoWcBaCk0a6jIsOYw/PWLfx8jcR4QXDJtvf6qZSD97q2uXbJ zgWq7yoyMBVT+3+FNpPGpQcFhUupdfOmA0ra2fRXJPOgou1Hdqzs1vl1Nh/E1RyQVpmirj G+g1BMOI8E3dE54N3ikNfUuR+RwjOeRL5txyRFNK/kaf3nG/z6JUvZUSsvfii/5OGRdxNd jlxnxe++/N0+UpGn1pkQt3brBpUKncsJ9V2rclrtsLR8jK+SU/rMT7hXBZiMNO2OYokR1g Jd3/IalcHcvCb9CIyH9KVGpPxn+Jul5VbvXrNOBMsEVwKTBr8GX6AmOEalBvQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302178; a=rsa-sha256; cv=none; b=gYgHj3mIxAB1ibgwzxq/cEJKQDix0A2kEXRj+CrPZclaLr4AJYeR5nMAMSR+lIUnD2mW2r wmJtxuvep5Uoce2AgJQdKmtHTMdlzIuyhM2al6g2rksvo/4SUEnibfiOsSD2iY3GgV55tA Ynqo0TIz+lQ3mrx26tLAL333iI4Nn6TNT9wz+5sl/+8kqXIfnNLx9Q90tZTkiFlHXN5CAg BDYfnKkzIjm9130YDoNSw9Y12cf4KUFjV80pwSEuH8cU0AeF7+Wmo0y5X94dKj6SEIy89K etp8cQQnhkcUQZCecGuvh4AaJbJsNz3lFzbP6eqDW9vDoeOvoc3d6Ab78XNLVg== 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=1783302178; 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; bh=Wpn6VHzESCZVV2wHZhAdK4kwxfj+uUlRMXjS5rJ+nJI=; b=HUy1PfCiGtmM/y1EWdrKNq7f4oFedSceilmrwBAnswxBATDiRtRo64u79zjYtNorechJHi cUL4CsyJX9B/QUM/2hEgGUbW/CV8pIitc68vyi85/JnnOOgiqc+OFdIdLS9lpW17I/Sntu JB8X0oMV2ccejD5rGfN48nVtswgER2AhY5nZzRAVm7fdKPqcA8bfFDXoFMrNvfBsXR8wk4 XVJhWSvbYwlLBlKCps2qg7OMv1kLbV81aFsBhCH1lKk6ydehyY3NtK46tIf31j7qKPZoWq KFTSj813aoxlmFEgLOrBf0pHmTp8PCadQdHJrFe0ObrmdgcmDv9dxenxWX9big== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDf50y6zkmR for ; Mon, 06 Jul 2026 01:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e46a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:42:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Slava Shwartsman From: Konstantin Belousov Subject: git: 5d044e4b9f33 - stable/15 - RDMA: Fix link active_speed size List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 5d044e4b9f33e2bdc8fa9ce071f3f735e1d531aa Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:42:58 +0000 Message-Id: <6a4b0822.3e46a.187951ba@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5d044e4b9f33e2bdc8fa9ce071f3f735e1d531aa commit 5d044e4b9f33e2bdc8fa9ce071f3f735e1d531aa Author: Slava Shwartsman AuthorDate: 2026-05-13 14:54:51 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:49 +0000 RDMA: Fix link active_speed size (cherry picked from commit e5d8b775bbf6f378a591211e373859ec44f74149) --- sys/dev/bnxt/bnxt_re/ib_verbs.c | 5 +++-- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 6 +++--- sys/dev/qlnx/qlnxr/qlnxr_verbs.c | 2 +- sys/ofed/drivers/infiniband/core/ib_uverbs_std_types_device.c | 3 ++- sys/ofed/include/rdma/ib_verbs.h | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.c b/sys/dev/bnxt/bnxt_re/ib_verbs.c index 32899abab9ff..9e6887a7c6e1 100644 --- a/sys/dev/bnxt/bnxt_re/ib_verbs.c +++ b/sys/dev/bnxt/bnxt_re/ib_verbs.c @@ -241,7 +241,7 @@ int bnxt_re_modify_device(struct ib_device *ibdev, return 0; } -static void __to_ib_speed_width(u32 espeed, u8 lanes, u8 *speed, u8 *width) +static void __to_ib_speed_width(u32 espeed, u8 lanes, u16 *speed, u8 *width) { if (!lanes) { switch (espeed) { @@ -342,7 +342,8 @@ int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num, { struct bnxt_re_dev *rdev = to_bnxt_re_dev(ibdev, ibdev); struct bnxt_qplib_dev_attr *dev_attr = rdev->dev_attr; - u8 active_speed = 0, active_width = 0; + u16 active_speed = 0; + u8 active_width = 0; dev_dbg(rdev_to_dev(rdev), "QUERY PORT with port_num 0x%x\n", port_num); memset(port_attr, 0, sizeof(*port_attr)); diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index 5825cee87d9b..6ff4e55630d7 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -155,7 +155,7 @@ static if_t mlx5_ib_get_netdev(struct ib_device *device, return ndev; } -static int translate_eth_proto_oper(u32 eth_proto_oper, u8 *active_speed, +static int translate_eth_proto_oper(u32 eth_proto_oper, u16 *active_speed, u8 *active_width) { switch (eth_proto_oper) { @@ -216,7 +216,7 @@ static int translate_eth_proto_oper(u32 eth_proto_oper, u8 *active_speed, return 0; } -static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u8 *active_speed, +static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed, u8 *active_width) { switch (eth_proto_oper) { @@ -969,7 +969,7 @@ static int mlx5_query_hca_port(struct ib_device *ibdev, u8 port, if (err) goto out; - props->active_speed = (u8)ptys->ib_proto_oper; + props->active_speed = (u16)ptys->ib_proto_oper; pmtu->local_port = port; err = mlx5_core_access_pmtu(mdev, pmtu, 0); diff --git a/sys/dev/qlnx/qlnxr/qlnxr_verbs.c b/sys/dev/qlnx/qlnxr/qlnxr_verbs.c index d74f51831da7..f3a054c707c3 100644 --- a/sys/dev/qlnx/qlnxr/qlnxr_verbs.c +++ b/sys/dev/qlnx/qlnxr/qlnxr_verbs.c @@ -546,7 +546,7 @@ qlnxr_query_device(struct ib_device *ibdev, struct ib_device_attr *attr, } static inline void -get_link_speed_and_width(int speed, uint8_t *ib_speed, uint8_t *ib_width) +get_link_speed_and_width(int speed, uint16_t *ib_speed, uint8_t *ib_width) { switch (speed) { case 1000: diff --git a/sys/ofed/drivers/infiniband/core/ib_uverbs_std_types_device.c b/sys/ofed/drivers/infiniband/core/ib_uverbs_std_types_device.c index 5d45a22eb9fe..a245cbdd440e 100644 --- a/sys/ofed/drivers/infiniband/core/ib_uverbs_std_types_device.c +++ b/sys/ofed/drivers/infiniband/core/ib_uverbs_std_types_device.c @@ -153,7 +153,8 @@ void copy_port_attr_to_resp(struct ib_port_attr *attr, resp->subnet_timeout = attr->subnet_timeout; resp->init_type_reply = attr->init_type_reply; resp->active_width = attr->active_width; - resp->active_speed = attr->active_speed; + /* This ABI needs to be extended to provide any speed more than IB_SPEED_NDR */ + resp->active_speed = min_t(u16, attr->active_speed, IB_SPEED_NDR); resp->phys_state = attr->phys_state; resp->link_layer = rdma_port_get_link_layer(ib_dev, port_num); } diff --git a/sys/ofed/include/rdma/ib_verbs.h b/sys/ofed/include/rdma/ib_verbs.h index 0c40a6f18f7c..0908c106f513 100644 --- a/sys/ofed/include/rdma/ib_verbs.h +++ b/sys/ofed/include/rdma/ib_verbs.h @@ -609,7 +609,7 @@ struct ib_port_attr { u8 subnet_timeout; u8 init_type_reply; u8 active_width; - u8 active_speed; + u16 active_speed; u8 phys_state; bool grh_required; }; From nobody Mon Jul 6 01:42:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDh2Kntz6kBHY for ; Mon, 06 Jul 2026 01:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDg6xYHz3Xfl for ; Mon, 06 Jul 2026 01:42:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302180; 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; bh=NW1X5zXL3Vdf7EQJsHbGDaOcToogIOW+FRalz76y/wo=; b=PwSjz9Ku0il+gsDDVjbctWGD7OjSWdQTnTgSQnISQrwTT1gAQfe6A5kUq/MMk4yj2yYnug WIHqNblD5su6kZ2lrV9H7sgOe70GmU5F1rANpilcMsd39QoqZ7o9BVeTv9Xr5h9BT7KtH8 K7pqSvk+baL665l0BPHoZzyuW93MLcFKqKnXszEx9c+Nipkyc/YbK+HhRpbQxPKTxg2ZYS nO86WmFXnz3CV8ETNSBzGhVwRNDP7aEKN8ky6F1w3Qld9KhiRPmSGKQFBvVFVgAV6I4+j3 gkAPnndXzEd48wnbRTefedkKLamzwKSuVQvELml38bogBoBIT4NyOro2wIlxxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302180; a=rsa-sha256; cv=none; b=KMaEAN98VJLXtTu8+xBJ1P1sVYBMQS31/rexgrclrBsUweujyPCqmSG5i3PfTfubYgE3XY GqUqac2wuCm3QZeDnIr6faIppnxSUDSguysS27jiiDrqsWFKkgN+07c8euUijnzv2zhKqM 9ilV1bKg0XY9X0JAbNq70os71I30wgjswK5nyBB+AvkPrwdk5hwTyptPN1zR+WZIlE/xAc WsVxxHNToIrBA+J6NYAE52Sw4hWChYcorQLUCwgUqQURZgo3JdQCESALGiWFA95XwUY/+Y J1uvY+VBzLUgOfmVrvZpeLXgGqlfu/vsN3qDaiC9kmrqH+Bj+gqGO5eNXCfL4Q== 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=1783302180; 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; bh=NW1X5zXL3Vdf7EQJsHbGDaOcToogIOW+FRalz76y/wo=; b=XHPT3Eo6/bjsTc8Q7bqccSAAimyuJC6RDtctOICpbtPJplsXvIFwK+wbFvvI6VQLIb1VMP drFxz7SyUw0EXLeZ/eLHrx1WY2iSNAUg3rEIY9mA+O3wC4L/V4P96uKwxFHkSnUC+4QUUQ 4Cqxnhk8HuSdQD9VYSM1GBrG0D2gAdYlUCIgKMVfPy2tzyrJRPAUbXkoj5gBry2ZWeYari IpDUxjcg+h2vSXkSaV/3xISlkRO56lxI5OmPGtY0h2C9v+C8hOzAleaKvkX30ke4uaYXML O5d+W4mxRPuACtQkB/nqL77mYJ/VAbUeq2nePM4d9GkvDRnJC2ZptQyy/Y1Gzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDg5qwbzl1S for ; Mon, 06 Jul 2026 01:42:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c1e6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:42:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Slava Shwartsman From: Konstantin Belousov Subject: git: 05bd1cecc7e9 - stable/15 - ibcore: Add support for XDR link speed. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 05bd1cecc7e9aaa6e7e722274dd9e81e35249485 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:42:59 +0000 Message-Id: <6a4b0823.3c1e6.7fae009b@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=05bd1cecc7e9aaa6e7e722274dd9e81e35249485 commit 05bd1cecc7e9aaa6e7e722274dd9e81e35249485 Author: Slava Shwartsman AuthorDate: 2026-05-13 14:20:35 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:49 +0000 ibcore: Add support for XDR link speed. (cherry picked from commit b3c09af215ee4803fa67ca94301f662d5eca03a0) --- sys/ofed/drivers/infiniband/core/ib_sysfs.c | 4 ++++ sys/ofed/include/rdma/ib_verbs.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/ofed/drivers/infiniband/core/ib_sysfs.c b/sys/ofed/drivers/infiniband/core/ib_sysfs.c index 35451857d16d..e28cd48085a8 100644 --- a/sys/ofed/drivers/infiniband/core/ib_sysfs.c +++ b/sys/ofed/drivers/infiniband/core/ib_sysfs.c @@ -279,6 +279,10 @@ static ssize_t rate_show(struct ib_port *p, struct port_attribute *unused, speed = " NDR"; rate = 1000; break; + case IB_SPEED_XDR: + speed = " XDR"; + rate = 2000; + break; case IB_SPEED_SDR: default: /* default to SDR for invalid rates */ speed = " SDR"; diff --git a/sys/ofed/include/rdma/ib_verbs.h b/sys/ofed/include/rdma/ib_verbs.h index 0908c106f513..086251183a55 100644 --- a/sys/ofed/include/rdma/ib_verbs.h +++ b/sys/ofed/include/rdma/ib_verbs.h @@ -488,7 +488,8 @@ enum ib_port_speed { IB_SPEED_FDR = 16, IB_SPEED_EDR = 32, IB_SPEED_HDR = 64, - IB_SPEED_NDR = 128 + IB_SPEED_NDR = 128, + IB_SPEED_XDR = 256, }; /** From nobody Mon Jul 6 01:43:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDj3lX5z6kBRv for ; Mon, 06 Jul 2026 01:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDj0YRtz3XcC for ; Mon, 06 Jul 2026 01:43:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302181; 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; bh=agMCJH3s/Kww7843YgyNtrZZd5HTt2N3LzDs5YHSphk=; b=uiPXIKWqcYSamoDLWgNVwm/+rUwPsmML/OJnpyet2WzpweMrVzO/drqazXsVgS5LBAalhH yXQnkfEvQ0gaTmbWc609tV//JEV9TT89XKPfIxLtP95Xu3ghNhG3QfuXM7gJuOS3EUWPJO HAIELX6iE7FwmsnXbitAOjHihegt9W4hnWU3ZE8zRSc+gYnPXNbW6yySFai4lEFdkOkDSg 8wcj+6yTLPMlcXjKlArmjPOX9vw5rTX1/WuqM0WklHRXWqYlhLHyNuRtTqTs2+wf+aJL3D Wt5Jxk/1hI0s1smvJdHT/wOAP5QN08KJ0Q8uJsbT7sFtN7UCQhIHiohXHDK/8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302181; a=rsa-sha256; cv=none; b=IpYky0RuhEXTjUI795JU9t+CcG4BXJnVt2knW7+rHssuCHKqWECAW7JJ5GiI0CPtlo8Fn8 pQM2nIuWiJTC30/a4VHkJd+QTXFB95oGNdtfbyic1v9LX2iuWkxtzKHLxUYa7no7ShNbEV AKsxD1WNBynfSHhEzQocnRH3rgRW0Y9uxVL05kHKCdUYcHjLnR1jxtWKBFi6SzmXYe2AE0 nR0fxKAOvhUoryNZ2aQc6dynrCW4+P6x+In8RQSQ/U5gN5qb4Go0UulrJ4fmk4VQlBclBi fXx//oQ5+PN0gBhZTn5Z17Y62Ep/9J6ygFRUXpN9eYbBxHwO9xBKFQiwYktVJg== 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=1783302181; 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; bh=agMCJH3s/Kww7843YgyNtrZZd5HTt2N3LzDs5YHSphk=; b=VsBHKoAOdw2k8rnsGtmUGVNx+s2z/oZfa9G0Esds+kYaPRJ2ZAcF0Hlx/XVzuBbHelz7f5 DKPXzgffkV6M4AViypxoiAhrOsYCWCkhdG+i+Z93GyyTrkAr4p3sffT4H4Uywem3yCcU2Q QeNnlN+QIxdCRR1LuwcQFNJ2NljBatt/Fw6rGtIxTdrSMyqwWZTG5a3/X97rKqvpUBPapi nH9QibDMGZbFVLi+xp9xpVtSyJeejCaXU8OpXYZXGTNd7FUacp7rPu2NNR5W+wP1yOlu/s v82wIOUwfOs/ff1qxt+ycPJYa4qqqPSgjIk6pdUbwgLn1Yl38SjhgwDnXowgfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDh6jN4zkmW for ; Mon, 06 Jul 2026 01:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ecb4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:43:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Slava Shwartsman From: Konstantin Belousov Subject: git: 3ab9e202117b - stable/15 - mlx5: Add support for 800Gbit/s and 400Gbit/s with 2 lanes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 3ab9e202117be3e93195fdf6ad71d3c5a484b629 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:43:00 +0000 Message-Id: <6a4b0824.3ecb4.3e2615a1@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3ab9e202117be3e93195fdf6ad71d3c5a484b629 commit 3ab9e202117be3e93195fdf6ad71d3c5a484b629 Author: Slava Shwartsman AuthorDate: 2026-05-13 14:22:48 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:50 +0000 mlx5: Add support for 800Gbit/s and 400Gbit/s with 2 lanes (cherry picked from commit 3e4cbdebfc9bcb2f2c64acc8ee8f67c3383cd676) --- sys/dev/mlx5/mlx5_core/mlx5_port.c | 4 ++++ sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 44 +++++++++++++++++++++++++++++++++++++ sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 12 ++++++++++ sys/dev/mlx5/port.h | 3 +++ 4 files changed, 63 insertions(+) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_port.c b/sys/dev/mlx5/mlx5_core/mlx5_port.c index af01bfae1b4e..fc192ec6a23b 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_port.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_port.c @@ -1331,6 +1331,10 @@ static const u32 mlx5e_ext_link_speed[/*MLX5E_EXT_LINK_MODES_NUMBER*/] = { [MLX5E_CAUI_4_100GBASE_CR4_KR4] = 100000, [MLX5E_200GAUI_4_200GBASE_CR4_KR4] = 200000, [MLX5E_400GAUI_8] = 400000, + [MLX5E_400GAUI_4_400GBASE_CR4_KR4] = 400000, + [MLX5E_400GAUI_2_400GBASE_CR2_KR2] = 400000, + [MLX5E_800GAUI_8_800GBASE_CR8_KR8] = 800000, + [MLX5E_800GAUI_4_800GBASE_CR4_KR4] = 800000, }; static void mlx5e_port_get_speed_arr(struct mlx5_core_dev *mdev, diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 78663e75e2b9..f5d4c4d23cbe 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -352,6 +352,48 @@ static const struct media mlx5e_ext_mode_table[MLX5E_EXT_LINK_SPEEDS_NUMBER][MLX .subtype = IFM_400G_LR8, /* XXX */ .baudrate = IF_Gbps(400ULL), }, + + /**/ + [MLX5E_400GAUI_2_400GBASE_CR2_KR2][MLX5E_PORT_UNKNOWN] = { + .subtype = IFM_400G_KR2_PAM4, + .baudrate = IF_Gbps(400ULL), + }, + [MLX5E_400GAUI_2_400GBASE_CR2_KR2][MLX5E_PORT_DA] = { + .subtype = IFM_400G_CR2, + .baudrate = IF_Gbps(400ULL), + }, + [MLX5E_400GAUI_2_400GBASE_CR2_KR2][MLX5E_PORT_FIBRE] = { + .subtype = IFM_400G_SR2, + .baudrate = IF_Gbps(400ULL), + }, + + /**/ + [MLX5E_800GAUI_8_800GBASE_CR8_KR8][MLX5E_PORT_UNKNOWN] = { + .subtype = IFM_800G_KR8, /* 800GAUI-8 / KR8a */ + .baudrate = IF_Gbps(800ULL), + }, + [MLX5E_800GAUI_8_800GBASE_CR8_KR8][MLX5E_PORT_DA] = { + .subtype = IFM_800G_CR8, /* 800GBASE-CR8 */ + .baudrate = IF_Gbps(800ULL), + }, + [MLX5E_800GAUI_8_800GBASE_CR8_KR8][MLX5E_PORT_FIBRE] = { + .subtype = IFM_800G_SR8, + .baudrate = IF_Gbps(800ULL), + }, + + /**/ + [MLX5E_800GAUI_4_800GBASE_CR4_KR4][MLX5E_PORT_UNKNOWN] = { + .subtype = IFM_800G_KR4_PAM4, /* 800GAUI-4 / KR4 */ + .baudrate = IF_Gbps(800ULL), + }, + [MLX5E_800GAUI_4_800GBASE_CR4_KR4][MLX5E_PORT_DA] = { + .subtype = IFM_800G_CR4, /* 800GBASE-CR4 */ + .baudrate = IF_Gbps(800ULL), + }, + [MLX5E_800GAUI_4_800GBASE_CR4_KR4][MLX5E_PORT_FIBRE] = { + .subtype = IFM_800G_SR4, + .baudrate = IF_Gbps(800ULL), + }, }; static const struct if_snd_tag_sw mlx5e_ul_snd_tag_sw = { @@ -404,6 +446,8 @@ mlx5e_update_carrier(struct mlx5e_priv *priv) eth_proto_oper = MLX5_GET_ETH_PROTO(ptys_reg, out, ext, eth_proto_oper); connector_type = MLX5_GET(ptys_reg, out, connector_type); + if (connector_type >= MLX5E_CONNECTOR_TYPE_NUMBER) + connector_type = MLX5E_PORT_UNKNOWN; i = ilog2(eth_proto_oper); if (ext) { diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index 6ff4e55630d7..cf1e5f4324d8 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -273,6 +273,18 @@ static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed, *active_width = IB_WIDTH_4X; *active_speed = IB_SPEED_NDR; break; + case MLX5E_PROT_MASK(MLX5E_400GAUI_2_400GBASE_CR2_KR2): + *active_width = IB_WIDTH_2X; + *active_speed = IB_SPEED_XDR; + break; + case MLX5E_PROT_MASK(MLX5E_800GAUI_8_800GBASE_CR8_KR8): + *active_width = IB_WIDTH_8X; + *active_speed = IB_SPEED_NDR; + break; + case MLX5E_PROT_MASK(MLX5E_800GAUI_4_800GBASE_CR4_KR4): + *active_width = IB_WIDTH_4X; + *active_speed = IB_SPEED_XDR; + break; default: *active_width = IB_WIDTH_4X; *active_speed = IB_SPEED_QDR; diff --git a/sys/dev/mlx5/port.h b/sys/dev/mlx5/port.h index a35265852ae4..6c1e6e629856 100644 --- a/sys/dev/mlx5/port.h +++ b/sys/dev/mlx5/port.h @@ -125,6 +125,9 @@ enum mlx5e_ext_link_speed { MLX5E_200GAUI_2_200GBASE_CR2_KR2 = 13, MLX5E_400GAUI_8 = 15, MLX5E_400GAUI_4_400GBASE_CR4_KR4 = 16, + MLX5E_400GAUI_2_400GBASE_CR2_KR2 = 17, + MLX5E_800GAUI_8_800GBASE_CR8_KR8 = 19, + MLX5E_800GAUI_4_800GBASE_CR4_KR4 = 20, MLX5E_EXT_LINK_SPEEDS_NUMBER = 32, }; From nobody Mon Jul 6 01:42:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDl1v7Lz6kBKV for ; Mon, 06 Jul 2026 01:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDk6PSZz3XnL for ; Mon, 06 Jul 2026 01:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302182; 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; bh=eDAnUvZ9a6X9oIgZlDLR0MwctqBrtL19BI/N3jLW72U=; b=Cqkc91wh6W0iMrfXvoB/h8tmfNl+TvVS92uslcbSBw/ePqm4UR13udJclXK7znQpgWBxBS niUVOwly7JsdBwQulKfgElfI2gQ7uVW1YYrl+Ac+/5PsI9DqoRGOTCW3/9sCjEqPHrZ/CD G3fZ4Pj1CUFvKzjjV/1/1lG8dQa0SxWbhR+K9S5gtDgzQRfG85W4QVN+0yeNJ+HWwE9pK3 F18HyEa7bYZnEsiB73nRE6JtNSDpuhOmls6D24qK14dfkmous+WggEIX4+SQ79lUA4wYb7 IunvLmLhSDkVdUus2raV266Gl1XqsqotqEveyFtaD4xndNYBDja5fKoAAvX7wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302182; a=rsa-sha256; cv=none; b=vf2/DfedW8iSOOoywI+pZVOmtFjachnOQ4ftht/pPEKhOtBt9JyQYhbQR13Micb1JulS0E +FhN6dumHlIriK9X+HmkHzz5YR1BwR8vGLB58cakONXSQEa4db63CqbD9kdHV/42nrBw+L WgY0BSM6+bjeWjrutaqULEusrQEDuuyYgNQi03SEIAWqAOQeqp6V9nykCUn3g8xZzmL5M9 wtO58yv5jRmFjbGXusuIdkfXOrzR9yk2V+eOaoaKxEMKprN+jZVZh9C42ce6lKQMVuayOO DxLhMe2RX+XMe6c6E7JCmTakGfq898njcWAWfmERH4z3Ee/p/KA8fPArKhstig== 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=1783302182; 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; bh=eDAnUvZ9a6X9oIgZlDLR0MwctqBrtL19BI/N3jLW72U=; b=weOYQlKAC4LvPiH+bj47voAR+NAFGQNHLo8tBmC+7AvScIF9UEJYWl6hEYdS60kTDwBpX+ XnghShPq/EISnoqjuuPWcX6NQ3oOkYvZXfJX6+oygndjVl1kaFJUP4iA3s7yQSVBrgAY0R zIIbfo2zeQ/gdhS3kVFz9jaNsHqbM729pZIr5yfxvvCaYCb4j9RsJS43ISSxvy8Bryb8oo c3tJ3OTq3OoOxmor6XL2mnIC3llbuA0xYtO3Vqr1RBrD+r9ghArR3GTO2qVR0EHpI3ZOzV GVLhFTtrlqjb2V58wkeLWTlQmBBix1AY4M3o8TIA2UkwELT3m3CIyZNGerFY7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDk5HPtzkmX for ; Mon, 06 Jul 2026 01:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e469 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:42:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Slava Shwartsman From: Konstantin Belousov Subject: git: f71aaa2b10ce - stable/15 - net/if_media.h: Add 800GBase-X and 200Gbit/s per lane support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: f71aaa2b10ceeb73dbded21e380516855db1d6a5 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:42:57 +0000 Message-Id: <6a4b0821.3e469.68e1033c@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f71aaa2b10ceeb73dbded21e380516855db1d6a5 commit f71aaa2b10ceeb73dbded21e380516855db1d6a5 Author: Slava Shwartsman AuthorDate: 2026-05-13 10:10:50 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:48 +0000 net/if_media.h: Add 800GBase-X and 200Gbit/s per lane support (cherry picked from commit 51f313dbc7a28a7bd2013c205261f29f115eb0a7) --- sys/net/ieee8023ad_lacp.c | 3 +++ sys/net/if_media.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c index 77b5a5d53a67..72c49997f475 100644 --- a/sys/net/ieee8023ad_lacp.c +++ b/sys/net/ieee8023ad_lacp.c @@ -1268,6 +1268,9 @@ lacp_compose_key(struct lacp_port *lp) case IFM_400G_CR8: key = IFM_400G_FR8; break; + case IF_Gbps(800): + key = 15; + break; default: key = subtype; break; diff --git a/sys/net/if_media.h b/sys/net/if_media.h index 5cc8714219c8..5e2548d844c9 100644 --- a/sys/net/if_media.h +++ b/sys/net/if_media.h @@ -264,6 +264,20 @@ uint64_t ifmedia_baudrate(int); #define IFM_400G_CR8 IFM_X(123) /* 400GBase-CR8 */ #define IFM_10_T1S IFM_X(124) /* 10BASE-T1S */ #define IFM_10_T1L IFM_X(125) /* 10BASE-T1L */ +#define IFM_400G_KR2_PAM4 IFM_X(126) /* 400GBase-KR2 PAM4 */ +#define IFM_400G_CR2 IFM_X(127) /* 400GBase-CR2 */ +#define IFM_400G_SR2 IFM_X(128) /* 400GBase-SR2 */ +#define IFM_800G_FR8 IFM_X(129) /* 800GBase-FR8 */ +#define IFM_800G_LR8 IFM_X(130) /* 800GBase-LR8 */ +#define IFM_800G_DR8 IFM_X(131) /* 800GBase-DR8 */ +#define IFM_800G_AUI8_AC IFM_X(132) /* 800G-AUI8 active copper/optical */ +#define IFM_800G_AUI8 IFM_X(133) /* 800G-AUI8 */ +#define IFM_800G_SR8 IFM_X(134) /* 800GBase-SR8 */ +#define IFM_800G_CR8 IFM_X(135) /* 800GBase-CR8 */ +#define IFM_800G_KR8 IFM_X(136) /* 800GBase-KR8 (KR8) */ +#define IFM_800G_CR4 IFM_X(137) /* 800GBase-CR4 */ +#define IFM_800G_SR4 IFM_X(138) /* 800GBase-SR4 */ +#define IFM_800G_KR4_PAM4 IFM_X(139) /* 800GBase-KR4 PAM4 */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -558,6 +572,20 @@ struct ifmedia_description { { IFM_400G_CR8, "400GBase-CR8" }, \ { IFM_10_T1S, "10BASE-T1S" }, \ { IFM_10_T1L, "10BASE-T1L" }, \ + { IFM_400G_KR2_PAM4, "400GBase-KR2-PAM4" }, \ + { IFM_400G_CR2, "400GBase-CR2" }, \ + { IFM_400G_SR2, "400GBase-SR2" }, \ + { IFM_800G_FR8, "800GBase-FR8" }, \ + { IFM_800G_LR8, "800GBase-LR8" }, \ + { IFM_800G_DR8, "800GBase-DR8" }, \ + { IFM_800G_AUI8_AC, "800G-AUI8-AC" }, \ + { IFM_800G_AUI8, "800G-AUI8" }, \ + { IFM_800G_SR8, "800GBase-SR8" }, \ + { IFM_800G_KR8, "800GBase-KR8" }, \ + { IFM_800G_CR8, "800GBase-CR8" }, \ + { IFM_800G_CR4, "800GBase-CR4" }, \ + { IFM_800G_SR4, "800GBase-SR4" }, \ + { IFM_800G_KR4_PAM4, "800GBase-KR4-PAM4" }, \ { 0, NULL }, \ } @@ -909,6 +937,20 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_400G_CR8, IF_Gbps(400ULL) }, \ { IFM_ETHER | IFM_10_T1S, IF_Mbps(10) }, \ { IFM_ETHER | IFM_10_T1L, IF_Mbps(10) }, \ + { IFM_ETHER | IFM_400G_KR2_PAM4, IF_Gbps(400ULL) }, \ + { IFM_ETHER | IFM_400G_CR2, IF_Gbps(400ULL) }, \ + { IFM_ETHER | IFM_400G_SR2, IF_Gbps(400ULL) }, \ + { IFM_ETHER | IFM_800G_FR8, IF_Gbps(800ULL) }, \ + { IFM_ETHER | IFM_800G_LR8, IF_Gbps(800ULL) }, \ + { IFM_ETHER | IFM_800G_DR8, IF_Gbps(800ULL) }, \ + { IFM_ETHER | IFM_800G_AUI8_AC, IF_Gbps(800ULL) }, \ + { IFM_ETHER | IFM_800G_AUI8, IF_Gbps(800ULL) }, \ + { IFM_ETHER | IFM_800G_SR8, IF_Gbps(800ULL) }, \ + { IFM_ETHER | IFM_800G_CR8, IF_Gbps(800ULL) }, \ + { IFM_ETHER | IFM_800G_KR8, IF_Gbps(800ULL) }, \ + { IFM_ETHER | IFM_800G_CR4, IF_Gbps(800ULL) }, \ + { IFM_ETHER | IFM_800G_SR4, IF_Gbps(800ULL) }, \ + { IFM_ETHER | IFM_800G_KR4_PAM4, IF_Gbps(800ULL) }, \ \ { IFM_IEEE80211 | IFM_IEEE80211_FH1, IF_Mbps(1) }, \ { IFM_IEEE80211 | IFM_IEEE80211_FH2, IF_Mbps(2) }, \ From nobody Mon Jul 6 01:43:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDk4Jznz6kB6R for ; Mon, 06 Jul 2026 01:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDk1LZVz3XcF for ; Mon, 06 Jul 2026 01:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302182; 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; bh=rSbBVOfH5xkd9Ow5TwcFnR0pbIIL2R4HVIRiKnhSOv0=; b=BZ7hsUAX+XYjFXwdgHwsGf38q4EvNZrdLefKleYiA8ZHTJ1X5z7lEvV9BdyK81zlSIcfVL kueLc/ETbv4Co1ayKjovhgxW6SmVE0x6ew7bNC/wYdZ+79k03ms1JRfWya9ZkrWuK8Hqmt P2l1XXxHCsSuZtDc385pmVs2QKG2zjor5XKmoBWA2Nr/5NihBlAIOBsoQYGDd/QRgV6Eq2 PUQJR5yRIuA/K6zkvycLdQXnu10GTtaB+eeIk12yq5QE2b+jD+UlFo63RgBRI2AkQ2D8vn f+t6kOybLQoPeyys/23eeeHmteQULAweyxZ2AK2/YrowQl0i2CQ3iUdIYdFF9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302182; a=rsa-sha256; cv=none; b=MmoFm448NbPH9WJUHVnB4J6+Pf25AaOC+wuZaavARr+nhDRZnfj875QjGiIcS1f13OBx18 Nf0g+PujD3BgdFndcQoX56Qpx8r1sYk/WF0gODAFgU0M12I/zuB7mK+lKFQRsPSOv0V9aL 9TkLCImvqi8FIYdqXJW9kXyB4sb7CxjsSaYw1aPcKRZlBZ3NSo9h5wsW8UnOhmoAms+YN0 ojjuuLAoeo29fYhqUpkirJaevxzjvWlNpijLjuNhHPcod5VTQShSy46+z8/qWcIYan5CmD tYdXcO3y4Cwplac7+R5IPJIpcFE9X0E3vjcfhH8cyVxh2ufqHhSvcTxLNT6mTQ== 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=1783302182; 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; bh=rSbBVOfH5xkd9Ow5TwcFnR0pbIIL2R4HVIRiKnhSOv0=; b=shQJae5HKUPu6ARnWycIzdapm/3XucjGXAnP9g/LCJVDqtmAe+yQG9HE1IuBU14CbJGzpR bixXRVkihBGr8X5zbW/+bHHGPcGT2NH+QdBAs6dXxPFZCve6vYzQPdwVarXUnuSiiIdacu ZdEppkOCCGtEq/LRZ2yVKgN2CXYB4YF9a2hJqiz6ETsSbFbglR0e5HQLPTLBbjvJaTqiPE y9AbRcuLUuoQnfJnXybsZf8cUi5tIRwhEJaiZL4VYFDwaY+72krM+MJM9lFAVTb/c88gM5 88Z2XhsAh21ez399kxTI9/gl9ODaT31dz6M62owI0cpY8UWsNmQdyv5jVtKEVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDk0MFCzl1V for ; Mon, 06 Jul 2026 01:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c1eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:43:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Slava Shwartsman From: Konstantin Belousov Subject: git: 69a8bf9e58bc - stable/15 - mlx5: Add PCI IDs for ConnectX-9. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 69a8bf9e58bc2a7a65bbdd69e04c452e2746451c Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:43:02 +0000 Message-Id: <6a4b0826.3c1eb.200f3235@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=69a8bf9e58bc2a7a65bbdd69e04c452e2746451c commit 69a8bf9e58bc2a7a65bbdd69e04c452e2746451c Author: Slava Shwartsman AuthorDate: 2026-05-04 07:29:18 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:51 +0000 mlx5: Add PCI IDs for ConnectX-9. (cherry picked from commit 741f489ed09ab1d9172d1f61aa341004b5c3e968) --- contrib/ofed/libmlx5/mlx5.c | 1 + sys/dev/mlx5/mlx5_core/mlx5_main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/ofed/libmlx5/mlx5.c b/contrib/ofed/libmlx5/mlx5.c index f55be7dae45e..6b1cb770ddd8 100644 --- a/contrib/ofed/libmlx5/mlx5.c +++ b/contrib/ofed/libmlx5/mlx5.c @@ -84,6 +84,7 @@ static struct { HCA(MELLANOX, 4127), /* ConnectX-6 LX */ HCA(MELLANOX, 4129), /* ConnectX-7 */ HCA(MELLANOX, 4131), /* ConnectX-8 */ + HCA(MELLANOX, 4133), /* ConnectX-9 */ HCA(MELLANOX, 41682), /* BlueField integrated ConnectX-5 network controller */ HCA(MELLANOX, 41683), /* BlueField integrated ConnectX-5 network controller VF */ HCA(MELLANOX, 41686), /* BlueField-2 integrated ConnectX-6 Dx network controller */ diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 221781327b51..058085348a3f 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -2126,7 +2126,7 @@ static const struct pci_device_id mlx5_core_pci_table[] = { { PCI_VDEVICE(MELLANOX, 4130) }, { PCI_VDEVICE(MELLANOX, 4131) }, /* ConnectX-8 */ { PCI_VDEVICE(MELLANOX, 4132) }, - { PCI_VDEVICE(MELLANOX, 4133) }, + { PCI_VDEVICE(MELLANOX, 4133) }, /* ConnectX-9 */ { PCI_VDEVICE(MELLANOX, 4134) }, { PCI_VDEVICE(MELLANOX, 4135) }, { PCI_VDEVICE(MELLANOX, 4136) }, From nobody Mon Jul 6 01:43:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDm6gn1z6kBPS for ; Mon, 06 Jul 2026 01:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDm3WmXz3XlT for ; Mon, 06 Jul 2026 01:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302184; 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; bh=vEzY8zsKtd7vOJCHlQnXeVuN7m32wNLEOaTLHBbr1yQ=; b=l71ttDfhbHTrPpgauxPU7F34sXDjMOGcEwDwbHHBck96knY9G7E4c4QSUQe1IHUPhVpjPN Y47g2+jrL2Qwv0HtJ9DGtQQ7kJoO3pOn7UIKJ3JGnuHbJ8Tq64gZUvEd3bqQivsxHR2nJY pn/StJsAfjYbWNM6xSkfdXAqiNJJDZ09F/f7qS5wIxX8Hme1yUK0W4h0DvAILmPPBgthUE jRUY6OpVLTX9iDKZ5R9uVE2OwkLQrBN/iqoVnvuV5b5xqk0j5LDL15FijLjCYmxN272tHB mvW+AfGe1PA9ZQfBKksM4gbp6h9/raSdZKmrLX1y8gaG4zig+9aY/8XXxLiAiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302184; a=rsa-sha256; cv=none; b=YU8pXKMkzDCO4M1ajLfh6UnjgbN53t8VqkJac8bnR0p5B95kQzQ6AZ8zte2JBrIZk4KfZ4 aekH00N+0pm/YxY3OcOPsZNAb/1zrvaDsQ01GMOswOjW2Lw7CyzlLOKB27KfHOF6vo+Df0 L+ibzWxct5yD8DGOcCBDTBIuyEK9p8iojpF1WmRVdyvWHJcxZgSzBC/MPukPBSGBaS2pcn YPsymfr4HLmPITPqJQrtPyIoAJHOuuoVeDTXcWR5hFLzGrJT8vko84AOk4H5nfTDUu8x4Q pFqNr4MkvqoK92Zh5GvxQcWhXbLgnhwjMP2xlbKPI/kIsFKKd4LQfZx9eF84DA== 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=1783302184; 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; bh=vEzY8zsKtd7vOJCHlQnXeVuN7m32wNLEOaTLHBbr1yQ=; b=Ox/A/UbI0oS30gM/5fOChyVu+Daf6MzKei3eqAijhK8LO5lEEENKR6jU0xcRRmWaKQShpG DMdNM1yxwdSPec/rAxJcCLT1dFa7H/qSNOMgrnUfBgUSemD03+jgqp7nfLOZpM9RPcBO18 s3Wo1IJICTVi0hXrq4zzO+50kSbglnE7CSii/6h0JxEzHeM5px+HRysiYdRIG2M0MGhkw6 pLbioqzJQmN/lOuYbENiSdoyKsqm1M1kgFwRkrIFefuF7Uahq1J6SlmQil++5O6b8pmeRp ZnzW28uuQTFIFLfKqOYJ/a6B7hRfGdQ97OXF7KRLBaOAERSfpmGXQKXBHxPn0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDm20wpzl1Z for ; Mon, 06 Jul 2026 01:43:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d641 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:43:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Slava Shwartsman From: Konstantin Belousov Subject: git: d4793552bded - stable/15 - mlx5: Add missing speeds translation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: d4793552bded3da5cef9e4378292d10415f51cce Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:43:04 +0000 Message-Id: <6a4b0828.3d641.3d1bb3dc@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d4793552bded3da5cef9e4378292d10415f51cce commit d4793552bded3da5cef9e4378292d10415f51cce Author: Slava Shwartsman AuthorDate: 2026-05-18 11:22:43 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:51 +0000 mlx5: Add missing speeds translation (cherry picked from commit 49b78368c5ed9cf41dedfc1c02a597fd49468537) --- sys/dev/mlx5/mlx5_core/mlx5_port.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_port.c b/sys/dev/mlx5/mlx5_core/mlx5_port.c index fc192ec6a23b..4a76b70d6199 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_port.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_port.c @@ -1329,7 +1329,10 @@ static const u32 mlx5e_ext_link_speed[/*MLX5E_EXT_LINK_MODES_NUMBER*/] = { [MLX5E_50GAUI_2_LAUI_2_50GBASE_CR2_KR2] = 50000, [MLX5E_50GAUI_1_LAUI_1_50GBASE_CR_KR] = 50000, [MLX5E_CAUI_4_100GBASE_CR4_KR4] = 100000, + [MLX5E_100GAUI_2_100GBASE_CR2_KR2] = 100000, + [MLX5E_100GAUI_1_100GBASE_CR_KR] = 100000, [MLX5E_200GAUI_4_200GBASE_CR4_KR4] = 200000, + [MLX5E_200GAUI_2_200GBASE_CR2_KR2] = 200000, [MLX5E_400GAUI_8] = 400000, [MLX5E_400GAUI_4_400GBASE_CR4_KR4] = 400000, [MLX5E_400GAUI_2_400GBASE_CR2_KR2] = 400000, From nobody Mon Jul 6 01:43:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDl4ws5z6kB6X for ; Mon, 06 Jul 2026 01:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDl2PzYz3Xg7 for ; Mon, 06 Jul 2026 01:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302183; 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; bh=c3CTxHGY7Di9Jg3qXwwJ0vnMPFRRTx55W0l5RO+2RiQ=; b=Je0RfzxGvCw3EBurSS1CBscE5K1cTHsMLl/uakR54KJUVCsv4pGBW46ZEMkxtEqQlcVuVY jYinCRQQYTekFNMamgMVNoDRDpPsqiYYv6n4pvqFFN7tBNwFrsN45O0KDoqilgJW5rNC6z QAeBjJreBazkaTnTwc1nfotX8pIG4xehjdIjNCWj+TNR9vQJHVawQraHbvT0kAKV50A/sz Waq0LevRLMDf4OImGs7uGjadmZmW+FLUG0iH2BT5EnYR9x7hH9UGCIhSYg7a9DSG5Y19J0 zndJ/2+Qp7jC+LstzeSAeHRkkF3iW2n9PfBQQmsDLpdm2xvrBnKHllGHZNgNzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302183; a=rsa-sha256; cv=none; b=c3q1G0d08JUNO0zvwoBX77PmY5Bx9hagDpSjhlOuyuQHdFlhsBT1f9nHfJAZyh2u9dEDgz I5O7mUYR5v6AWEcsin8bl5W+IPhTji16y9E4++QNWHOv0E3DMxCUtLYC7X4/0jBIqR9bAs rzCPf9fiztOxTJNeNADdz+y51D04UyfPUw9Wf7c/+FY7mVCqNogVZm8yzMHMh9tKcr71ax sa2EkJ4bzFhKtKo2S5Elf+wh2Xan5EKYKP21DbPtSu0nGK43SOtGwew/auYIQZzBUxISU3 LydDMR4iQiAqjVSWqSL61VNh2jUmNIwaEbvUyOEQ7p6PeNhdFskb0223KTAYlA== 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=1783302183; 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; bh=c3CTxHGY7Di9Jg3qXwwJ0vnMPFRRTx55W0l5RO+2RiQ=; b=pxHxY2P0ZRjSDtfLCKfDwsqqYJZreHGAo7G1ktQkMW00zZqG2P/6wZyxWAHSHWx88MhQlV zjaZD0dfLB/yMIurKHZpiKFPE5t6AQdDk+zE1eN907VgKY/fxfpmACTZVIRaM0nNY/bSiR MnH3eTNufFlPb3+PGlR2LxG4LORmtNyttsZa7s7svbWTn6hLYLF69eXbv8Sa7cV9kkiH+Z MYUuXqZGIM/ghAcPMvoCVyjU0txowXIlLV67C6/A3pOGtEQrn+alOKP6mquUoD86l/jo2M czFTbeVp+2B3z5fkOBKt4si1WWQsk0EFChVM9qa6Y+u0RdcxB4fnb8jcMoUtGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDl1BTHzkgs for ; Mon, 06 Jul 2026 01:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d7be by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:43:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Slava Shwartsman From: Konstantin Belousov Subject: git: 2bdcf05c89dd - stable/15 - libmlx5: sync PCI device allowlist with mlx5_core_pci_table List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 2bdcf05c89dd12a80fe4d2fcb0875993c71d3729 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:43:03 +0000 Message-Id: <6a4b0827.3d7be.2d9e69b1@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2bdcf05c89dd12a80fe4d2fcb0875993c71d3729 commit 2bdcf05c89dd12a80fe4d2fcb0875993c71d3729 Author: Slava Shwartsman AuthorDate: 2026-05-04 11:19:36 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:51 +0000 libmlx5: sync PCI device allowlist with mlx5_core_pci_table (cherry picked from commit 0e2175cef5027728c0ca1ff98366cf6ecfbe2db3) --- contrib/ofed/libmlx5/mlx5.c | 19 +++++++++++++++++++ sys/dev/mlx5/mlx5_core/mlx5_main.c | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/contrib/ofed/libmlx5/mlx5.c b/contrib/ofed/libmlx5/mlx5.c index 6b1cb770ddd8..6fe6cf594c3b 100644 --- a/contrib/ofed/libmlx5/mlx5.c +++ b/contrib/ofed/libmlx5/mlx5.c @@ -67,6 +67,11 @@ static struct { unsigned vendor; unsigned device; } hca_table[] = { + /* + * PCI IDs must match mlx5_core_pci_table in + * sys/dev/mlx5/mlx5_core/mlx5_main.c so userspace loads for every + * mlx5 device the kernel probes. + */ HCA(MELLANOX, 4113), /* MT4113 Connect-IB */ HCA(MELLANOX, 4114), /* Connect-IB Virtual Function */ HCA(MELLANOX, 4115), /* ConnectX-4 */ @@ -82,9 +87,23 @@ static struct { HCA(MELLANOX, 4125), /* ConnectX-6 DX */ HCA(MELLANOX, 4126), /* ConnectX family mlx5Gen Virtual Function */ HCA(MELLANOX, 4127), /* ConnectX-6 LX */ + HCA(MELLANOX, 4128), HCA(MELLANOX, 4129), /* ConnectX-7 */ + HCA(MELLANOX, 4130), HCA(MELLANOX, 4131), /* ConnectX-8 */ + HCA(MELLANOX, 4132), HCA(MELLANOX, 4133), /* ConnectX-9 */ + HCA(MELLANOX, 4134), + HCA(MELLANOX, 4135), + HCA(MELLANOX, 4136), + HCA(MELLANOX, 4137), + HCA(MELLANOX, 4138), + HCA(MELLANOX, 4139), + HCA(MELLANOX, 4140), + HCA(MELLANOX, 4141), + HCA(MELLANOX, 4142), + HCA(MELLANOX, 4143), + HCA(MELLANOX, 4144), HCA(MELLANOX, 41682), /* BlueField integrated ConnectX-5 network controller */ HCA(MELLANOX, 41683), /* BlueField integrated ConnectX-5 network controller VF */ HCA(MELLANOX, 41686), /* BlueField-2 integrated ConnectX-6 Dx network controller */ diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 058085348a3f..184457b7d0b5 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -2105,6 +2105,10 @@ static void shutdown_one(struct pci_dev *pdev) mlx5_pci_disable_device(dev); } +/* + * When adding device IDs, also update hca_table in + * contrib/ofed/libmlx5/mlx5.c or libibverbs will reject the device. + */ static const struct pci_device_id mlx5_core_pci_table[] = { { PCI_VDEVICE(MELLANOX, 4113) }, /* Connect-IB */ { PCI_VDEVICE(MELLANOX, 4114) }, /* Connect-IB VF */ From nobody Mon Jul 6 01:43:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDn5qxFz6kBl6 for ; Mon, 06 Jul 2026 01:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDn3h9Wz3Y9b for ; Mon, 06 Jul 2026 01:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302185; 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; bh=rRYMTeS3822oJlSsaz2tW8E8l6ZQdHKUWJyK5Aqv2Fg=; b=wWxoGuL7kmVHZCbH7SR2CRlY/kM5xiJ2xGs87KsMuKUc/zjky1/jwoTcMJm01oc1ccVxg6 Eva9FKb0PFWuNNoFick0V2gqBQ7GLCz22wN+YrbJwdxQ47B1VWWzeG8JLTag3+Q+qXgHTu he7u/x48QDkrrxXqDcS3czrrGOIHWL48PUcxMg67u4CHo79XK4sS8aXz4YournzEg07D0l GfcPsFnmZcufHl+s49pWYVRJCXBw0hCzH0zziAt5CJYYObO5swgMT+NTKB6Vli1kXw85wC aXsu8B2YWcnk4GgeJsx0gqewWbDI1WssE6fDmAnITRsD013poQWYF/tEqrH3rA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302185; a=rsa-sha256; cv=none; b=BuaS86lICD6bjxf99MHb3cgwPCd9tXh6Ss/ffj+t6AG+xiRK81gxEC1AS9TFO1IYGWDGXu A0WWHvZiMa9d3Qu3OQNxoBfb7EJ02FGqdZrb0UX81l5CErundnYAl/o1osbOq8E8omVQoJ Hxjru05ECzk9UL7noS44spAsAMh+PAupOInl64D8ZhwtFREVQhDOrxar8534DkTybIUUzZ DZ8bIuHaIJ50x8y5cYAouM2/xxxq/D7hhg32IsPjgjKaGPKzz29bKYGm6In+nG6T5v6NkE rKyX1U0s5vRFxvRnN+ecdLsga3bkcpCLlTyIzQv8yNMkD1mQOkPR1sPLyrLlRA== 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=1783302185; 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; bh=rRYMTeS3822oJlSsaz2tW8E8l6ZQdHKUWJyK5Aqv2Fg=; b=q3PsAzh00DagKODBJgc7bhq4atSASBnnhQRHNX3NzVKyHNV3Oyd3WXTih0DS02f1RFief4 6aMIOzB+pAfSgEIN99Ju/7RO1/JJZecYIcLtdpTifJpBq9MYWbrVNCdq7hpdOjm5HVs3C5 KjZsWRxjigRm1DOc+oJfUfmv3Rhu/MD2ToRCpQgAoemcdMCosWMDkSWRR++66HMWgH7YKk k1796cYtPvZOdl3iXWFRC59ZxlvFthlBiZol9THLNacRcpNzS7xtuArIHDdjHoHD+ipbZk vnXcjgKmLXpI7mePRJfD7370o1I7VB7j5uv0uDz+KAk5nsnYEtW9UIG/DXQkbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDn2WSGzkyG for ; Mon, 06 Jul 2026 01:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3db19 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:43:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Slava Shwartsman From: Konstantin Belousov Subject: git: 60bb6c368e3c - stable/15 - mlx5en: guard against empty eth_proto_oper mask List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 60bb6c368e3cc03e9377f2af320d182c985bdb11 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:43:05 +0000 Message-Id: <6a4b0829.3db19.4a6c5514@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=60bb6c368e3cc03e9377f2af320d182c985bdb11 commit 60bb6c368e3cc03e9377f2af320d182c985bdb11 Author: Slava Shwartsman AuthorDate: 2026-06-10 16:43:08 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:52 +0000 mlx5en: guard against empty eth_proto_oper mask (cherry picked from commit 17cf7760a98a87c33d0415e2d2e1d4b24dd69e4d) --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index f5d4c4d23cbe..7cfbeb106952 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -445,9 +445,16 @@ mlx5e_update_carrier(struct mlx5e_priv *priv) ext = MLX5_CAP_PCAM_FEATURE(mdev, ptys_extended_ethernet); eth_proto_oper = MLX5_GET_ETH_PROTO(ptys_reg, out, ext, eth_proto_oper); + if (eth_proto_oper == 0) { + priv->media_active_last = IFM_ETHER; + if_setbaudrate(priv->ifp, 1); + mlx5_en_err(priv->ifp, "eth_proto_oper is 0\n"); + return; + } connector_type = MLX5_GET(ptys_reg, out, connector_type); if (connector_type >= MLX5E_CONNECTOR_TYPE_NUMBER) connector_type = MLX5E_PORT_UNKNOWN; + i = ilog2(eth_proto_oper); if (ext) { From nobody Mon Jul 6 01:43:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDp6Rwpz6kBlD for ; Mon, 06 Jul 2026 01:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDp3xTnz3Xlq for ; Mon, 06 Jul 2026 01:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302186; 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; bh=PSFV/E7wKLFkXaaizxudDPml3P8bn/fDSh82S0QPwlc=; b=Ub4OK5b06omYO5cYgLB+20AnaEL90fWbvPAtQzU/3F8+8deeCbaMvH+dxlSLStiTzcX4OG uYEgRmUZ3CvRwRjOV8gyqbG1cFwlwG5G2jtTz49DKlAf1bJLxyLrQvp50cpRXqqs0ULwd0 pLdp5UPcyOukRFug/4jXorFC0yDuqNAMErMZt8aP8nmFpCcKhNKodIEOjNs8PV33nUiNxy 8hn7yUugBLdTDouz0QdHN7gFRnK/O0NufGkwwB1+zBkDbXWPeeN6WXMqVQo2OrCVTsW56y scefFB2U34+bik/ryHsAH4SZhYrFr4gjmuxEITCu0w4kNiU79mEO7lifh1pavg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302186; a=rsa-sha256; cv=none; b=icwZreLXk8NdPrmCMikWUXIELXWpZskYD9mtpZ4kScYNmv2RHrq9NIr4akFRwjGeo3aapT TsfFd994jVb5l8V7KKiZGYrY8ZdxpiW7InKWip5kz9TMX4YjIpWtKbAz9MphMgiEGFoWOt mRYg3k1xbqoeEFavz0bhScwh8OSCW2UViKraoF6hrt03sPFhmglgLPH6z3wxp6WRm8K2VV EkP4qi/5aptES8cMjZ7lo5QS8nkeJBBV6r2H+ENjRJP6QNKq3iWEny/LOACSmcdqWH8r3/ 5wUCBWP/3CGC7N2cY0qKEm/g0lK5Kl3h3LLbHLyBACBsl3i2UbNuqxXd5WdiSw== 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=1783302186; 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; bh=PSFV/E7wKLFkXaaizxudDPml3P8bn/fDSh82S0QPwlc=; b=NxJWcDRSRu/XCVlaYw/pPvICS1HIcIZoTTCQlfatWqVMs5h314tpfmfPNcZPeLlpvAMuSF Y0WYdjC0fX8/Nwb/mGrH9Bkm5p9rDnhoGThMpRIbT4HNV6qOBbsbG2PpdQqHYM5yik3rzn wuKEJUsdV9B5tbUBd3xMG0xurjQDlzrelXBBItGYGOIu+Cq5i8VUBQdfOORD8AHwxDeAzA eWlVAyQWPiWVzdpfXJSIvDXDYbqh2aVFFcktzFLZ/8gBMc/o9A5xH2e5HXQZ8wkyQJ+QJe 4e2CsgVSNe+faUzd2sTG7xFRwTfMITclVJs0KywgFOtmqunZaZ0K1BKkI4E3qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDp2xdYzkbp for ; Mon, 06 Jul 2026 01:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f195 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:43:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Andrew Gallatin From: Konstantin Belousov Subject: git: b86eb36f28db - stable/15 - lacp: Sort port map by interface index List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: b86eb36f28dbcf3abcd256dcad8b36ab19843162 Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:43:06 +0000 Message-Id: <6a4b082a.3f195.20006628@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b86eb36f28dbcf3abcd256dcad8b36ab19843162 commit b86eb36f28dbcf3abcd256dcad8b36ab19843162 Author: Andrew Gallatin AuthorDate: 2025-12-15 16:52:48 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:53 +0000 lacp: Sort port map by interface index (cherry picked from commit 7ff3b13f12d97b7f67f09ecb9141e6dbaa1ad007) --- sys/net/ieee8023ad_lacp.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c index 72c49997f475..02aa1aaa0eee 100644 --- a/sys/net/ieee8023ad_lacp.c +++ b/sys/net/ieee8023ad_lacp.c @@ -1036,6 +1036,18 @@ lacp_select_active_aggregator(struct lacp_softc *lsc) } } +static int +lacp_pm_compare(const void *p1, const void *p2) +{ + struct lacp_port *const *a = p1; + struct lacp_port *const *b = p2; + int left, right; + + left = (*a)->lp_ifp->if_index; + right = (*b)->lp_ifp->if_index; + return ((left > right) - (left < right)); +} + /* * Updated the inactive portmap array with the new list of ports and * make it live. @@ -1079,12 +1091,24 @@ lacp_update_portmap(struct lacp_softc *lsc) #ifdef NUMA for (i = 0; i < MAXMEMDOM; i++) { - if (p->pm_numa[i].count != 0) + if (p->pm_numa[i].count != 0) { p->pm_num_dom++; + if (p->pm_numa[i].count > 1) { + qsort(&p->pm_numa[i].map[0], + p->pm_numa[i].count, + sizeof(p->pm_numa[i].map[0]), + lacp_pm_compare); + } + } } #endif speed = lacp_aggregator_bandwidth(la); } + + if (p->pm_count > 1) { + qsort(&p->pm_map[0], p->pm_count, + sizeof(p->pm_map[0]), lacp_pm_compare); + } sc->sc_ifp->if_baudrate = speed; EVENTHANDLER_INVOKE(ifnet_event, sc->sc_ifp, IFNET_EVENT_UPDATE_BAUDRATE); From nobody Mon Jul 6 01:43:08 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDs0HwHz6kBmp for ; Mon, 06 Jul 2026 01:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDr60Ryz3Y5Q for ; Mon, 06 Jul 2026 01:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302188; 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; bh=18g+4+g1hWbBgLgFP6RyD3Cre+UBCyNmGl4/5yDlYzI=; b=Lvr43VW950D8Ox9SYA2kPsPou+stu0phppWM2Sfkvx7s1yX0m7ouD6yeOi+nxBmD/rpIdh swUCGXUzP+kltSu5KhrFjJxu09DMOiepas3ppojYx1emclnPcB8DhXGb2/UUJhOgEF5b5j Nr0jNafAj5DvqWgoDKEJLBQ2wTqAWvOakJ5ExKZanGjEWxH2G5brf6yXre+ry9iyscqmaR qLfy+8C4iwGjA65aocnUrKuXFhJeT8Amf2mxFhF6GmBK52Du85tpS61FwE/Te9Qvv35WwG SCsH/PZZDgBMYKK18hS3r6QMZO7Gua9awd52u06idTn5ojH2XGJTap90dHnPuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302188; a=rsa-sha256; cv=none; b=QsbH4WUCf2qzujXBClw5Oj39sW/1UDpqtFdbCqpOZPkx3IzKnwHYbYFnDjZuvS0oYGzMVq rP7LYhrpAbuOTS53fq6Q+q1UQzF2MFjduBzLJ+wPfm0l1EQFWQBEh2Xavc+fsXMUP6Al/w R45qWiQWbZo4i6406aG9IThcf4N6SH84WbXd7LMzy1js2DV377nomwSF9ZFRLmT4fDgIEI jwTZhGrua3/2Sd0eq0FddVWWnk+a1/8AW4D5Q2CStEgv9PtPRQWSVEAESADF1HnrtyF+Th mJ9ntYQo/a8TOQzp6hPM30aNQZxYoHcSdxnfb3EIXxaRsmSWXG1rSyFejzDIoQ== 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=1783302188; 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; bh=18g+4+g1hWbBgLgFP6RyD3Cre+UBCyNmGl4/5yDlYzI=; b=yAiv9WpfEQsbecogSG1semMLmXH34f551LU6xFZYjqFE9pQiiW9k0I6Z9KP1bF2qHjt0yL hZKtNJR2I0WWWCZkEuwaSDCooobKxdrAkEfxOFzlRPaAI2HH1GKSPuP/f6z8iyuXQTQQYv RJjMAH5SELqyU0dn/3Fv8/rfKFp+8bscMMfKjRwao7/sIfqolR8vMWdm7LWIYMp1djoGPd 8Z693Qy1PqLJavqVPOGyZFw34N+IQkrLxo8nJeXAE9y197fYm9kqZYda3dAxkNHEn6WBT4 +zyxwz/RtnW54wkMAFzW0bHiUnfRmDuxrtylT+7Bro1tFHIzTFHqXJge86+BIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDr4686zkyH for ; Mon, 06 Jul 2026 01:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ecb9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:43:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Andrew Gallatin From: Konstantin Belousov Subject: git: 0dc46fba9359 - stable/15 - lacp: Simplify lacp_compose_key() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 0dc46fba93595abba43dd21680d023bfa419e49b Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:43:08 +0000 Message-Id: <6a4b082c.3ecb9.11db4951@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0dc46fba93595abba43dd21680d023bfa419e49b commit 0dc46fba93595abba43dd21680d023bfa419e49b Author: Andrew Gallatin AuthorDate: 2026-06-02 16:18:03 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:55 +0000 lacp: Simplify lacp_compose_key() (cherry picked from commit e98ed8d99fd41873dc52cf78e70e9f12e3e93042) --- sys/net/ieee8023ad_lacp.c | 173 +++++++++++----------------------------------- 1 file changed, 40 insertions(+), 133 deletions(-) diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c index 9726b4c4dff8..5d5fc88f205f 100644 --- a/sys/net/ieee8023ad_lacp.c +++ b/sys/net/ieee8023ad_lacp.c @@ -1129,8 +1129,10 @@ lacp_compose_key(struct lacp_port *lp) { struct lagg_port *lgp = lp->lp_lagg; struct lagg_softc *sc = lgp->lp_softc; + uint64_t baudrate; u_int media = lp->lp_media; uint16_t key; + static bool warned; if ((lp->lp_state & LACP_STATE_AGGREGATION) == 0) { /* @@ -1149,158 +1151,63 @@ lacp_compose_key(struct lacp_port *lp) KASSERT(IFM_TYPE(media) == IFM_ETHER, ("invalid media type")); KASSERT((media & IFM_FDX) != 0, ("aggregating HDX interface")); - /* bit 0..4: IFM_SUBTYPE modulo speed */ - switch (subtype) { - case IFM_10_T: - case IFM_10_2: - case IFM_10_5: - case IFM_10_STP: - case IFM_10_FL: - key = IFM_10_T; + baudrate = lp->lp_ifp->if_baudrate; + if (baudrate == 0) + baudrate = ifmedia_baudrate(media); + /* bit 0..4: encoded speed */ + switch (baudrate) { + case IF_Mbps(10): + key = 1; break; - case IFM_100_TX: - case IFM_100_FX: - case IFM_100_T4: - case IFM_100_VG: - case IFM_100_T2: - case IFM_100_T: - case IFM_100_SGMII: - case IFM_100_BX: - key = IFM_100_TX; + case IF_Mbps(100): + key = 2; break; - case IFM_1000_SX: - case IFM_1000_LX: - case IFM_1000_CX: - case IFM_1000_T: - case IFM_1000_KX: - case IFM_1000_SGMII: - case IFM_1000_CX_SGMII: - case IFM_1000_BX: - key = IFM_1000_SX; + case IF_Gbps(1): + key = 3; break; - case IFM_10G_LR: - case IFM_10G_SR: - case IFM_10G_CX4: - case IFM_10G_TWINAX: - case IFM_10G_TWINAX_LONG: - case IFM_10G_LRM: - case IFM_10G_T: - case IFM_10G_KX4: - case IFM_10G_KR: - case IFM_10G_CR1: - case IFM_10G_ER: - case IFM_10G_SFI: - case IFM_10G_AOC: - key = IFM_10G_LR; + case IF_Mbps(2500): + key = 4; break; - case IFM_20G_KR2: - key = IFM_20G_KR2; + case IF_Gbps(5): + key = 5; break; - case IFM_2500_KX: - case IFM_2500_T: - case IFM_2500_X: - key = IFM_2500_KX; + case IF_Gbps(10): + key = 6; break; - case IFM_5000_T: - case IFM_5000_KR: - case IFM_5000_KR_S: - case IFM_5000_KR1: - key = IFM_5000_T; + case IF_Gbps(20): + key = 7; break; - case IFM_50G_PCIE: - case IFM_50G_CR2: - case IFM_50G_KR2: - case IFM_50G_KR4: - case IFM_50G_SR2: - case IFM_50G_LR2: - case IFM_50G_LAUI2_AC: - case IFM_50G_LAUI2: - case IFM_50G_AUI2_AC: - case IFM_50G_AUI2: - case IFM_50G_CP: - case IFM_50G_SR: - case IFM_50G_LR: - case IFM_50G_FR: - case IFM_50G_KR_PAM4: - case IFM_50G_AUI1_AC: - case IFM_50G_AUI1: - key = IFM_50G_PCIE; + case IF_Gbps(25): + key = 8; break; - case IFM_56G_R4: - key = IFM_56G_R4; + case IF_Gbps(40): + key = 9; break; - case IFM_25G_PCIE: - case IFM_25G_CR: - case IFM_25G_KR: - case IFM_25G_SR: - case IFM_25G_LR: - case IFM_25G_ACC: - case IFM_25G_AOC: - case IFM_25G_T: - case IFM_25G_CR_S: - case IFM_25G_CR1: - case IFM_25G_KR_S: - case IFM_25G_AUI: - case IFM_25G_KR1: - key = IFM_25G_PCIE; + case IF_Gbps(50): + key = 10; break; - case IFM_40G_CR4: - case IFM_40G_SR4: - case IFM_40G_LR4: - case IFM_40G_LM4: - case IFM_40G_XLPPI: - case IFM_40G_KR4: - case IFM_40G_XLAUI: - case IFM_40G_XLAUI_AC: - case IFM_40G_ER4: - key = IFM_40G_CR4; + case IF_Gbps(56): + key = 11; break; - case IFM_100G_CR4: - case IFM_100G_SR4: - case IFM_100G_KR4: - case IFM_100G_LR4: - case IFM_100G_CAUI4_AC: - case IFM_100G_CAUI4: - case IFM_100G_AUI4_AC: - case IFM_100G_AUI4: - case IFM_100G_CR_PAM4: - case IFM_100G_KR_PAM4: - case IFM_100G_CP2: - case IFM_100G_SR2: - case IFM_100G_DR: - case IFM_100G_KR2_PAM4: - case IFM_100G_CAUI2_AC: - case IFM_100G_CAUI2: - case IFM_100G_AUI2_AC: - case IFM_100G_AUI2: - key = IFM_100G_CR4; + case IF_Gbps(100): + key = 12; break; - case IFM_200G_CR4_PAM4: - case IFM_200G_SR4: - case IFM_200G_FR4: - case IFM_200G_LR4: - case IFM_200G_DR4: - case IFM_200G_KR4_PAM4: - case IFM_200G_AUI4_AC: - case IFM_200G_AUI4: - case IFM_200G_AUI8_AC: - case IFM_200G_AUI8: - key = IFM_200G_CR4_PAM4; + case IF_Gbps(200): + key = 13; break; - case IFM_400G_FR8: - case IFM_400G_LR8: - case IFM_400G_DR4: - case IFM_400G_AUI8_AC: - case IFM_400G_AUI8: - case IFM_400G_SR8: - case IFM_400G_CR8: - key = IFM_400G_FR8; + case IF_Gbps(400): + key = 14; break; case IF_Gbps(800): key = 15; break; default: key = subtype; + if (!warned) { + printf("%s LACP: support %ju baudrate!\n", + lp->lp_ifp->if_xname, baudrate); + warned = true; + } break; } /* bit 5..14: (some bits of) if_index of lagg device */ From nobody Mon Jul 6 01:43:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDr0PKwz6kBPg for ; Mon, 06 Jul 2026 01:43:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDq4ZyVz3Y7k for ; Mon, 06 Jul 2026 01:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302187; 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; bh=3DjrOYnXamHUCPAt3G8cox8GaZsFH1EW1RSC2HGDopo=; b=qloJHEy9Y5pjg2A9rbSSeWeWs2Z+TUQIxIEaQrA3Sk0GTOlbxVB01AxSRE/H+RtO8ZBddd LchTWAdDpKOONT2zJUYyf4ex0xBFKPUH7oukD2tf8SQqMIfCvBidDSrROLRxrFd3hFvP6g kJEmiU89H/Bc6/0UsPuA4TgpjCoIbGHTe1mHTatcN8e7Jmc3SwCwgvhqa5yqK8nelG4YmN MXnzr7BKFxcqveeo6vu+2HWkWrj3ejXOFyLUXEaNKm+GsW7AKeVIrTtQqRr0tjAGvqt4QC vmX3kWE6BEzYhqvgSQUa07VJHZg4HVD4klPK9wMotfMWw+ZC8uf4nSLYyFXLNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302187; a=rsa-sha256; cv=none; b=qA4ouM9sT5/lWIKrKSK7/Pl4EsiPRx2sPTw75D90MQOIBYBTqghOompJKnLYLPSZ84kuvm he+JX7rRQ9/n3afk7TTUDQfppN40H75f6e4ittUHIs9DgOXsJRprBpUGHeLJ9P5UL24Aec l5kopvMkcaA8iA5/GjSvwa+323a+vWerXLpENxGZOfMQRgSvBgrjjuyi1rHLiyb1jS7HaX od+XsuOBqI7xCAFKFJHVMjX6O3ywVRqNI5URYWi/+NW7pmodKtfkpiI5no7m+Ib3POBZQ+ a1J7VYVrM0epFPQhBBMLdE32DOADzwghXGLeDnGcWYibYIcgrz7AyDbarRsUTw== 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=1783302187; 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; bh=3DjrOYnXamHUCPAt3G8cox8GaZsFH1EW1RSC2HGDopo=; b=OdiejSxTTD00LH0yNeqgbMfLFBS6AEAPELTYtUJzd/fFbmBhqb+WqXzBbDbkWWzBazpyx/ eaS3R0I5moRiXQs1cDVaGDIf6F/2Lq8VYuWQGjbkAFFyh37GX3rqN/xQQgn53+P825uWyD GvVk+i6YYjjGSk8Nt317SUElaJj4nx5Ay/W+VNUnk3ezixRORLlUybJ6XXvx7qSAJV723t 01jtzYKm6nYkH9xjv4egwp6F+a72lRv48qR38u7NDf6brtUWY9T9zcM0eVDlyAQGq5mch6 klkGcuN12qE+miNwwroijbDZXH4RTZWVYPUmoZE5HEAgIiDPqV1pTawuwF8p0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDq3Z1qzkrR for ; Mon, 06 Jul 2026 01:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3da59 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:43:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Andrew Gallatin From: Konstantin Belousov Subject: git: 020f7f6cf1ff - stable/15 - lacp: fix link state with multiple aggregators List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 020f7f6cf1ff2ace74c84dbb1caaf8cd5e71209d Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:43:07 +0000 Message-Id: <6a4b082b.3da59.4a08b651@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=020f7f6cf1ff2ace74c84dbb1caaf8cd5e71209d commit 020f7f6cf1ff2ace74c84dbb1caaf8cd5e71209d Author: Andrew Gallatin AuthorDate: 2026-05-12 12:52:24 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:35:54 +0000 lacp: fix link state with multiple aggregators (cherry picked from commit 9f69446d45484c16d2b9b9bf71bbb2fca86cb6e5) --- sys/net/ieee8023ad_lacp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c index 02aa1aaa0eee..9726b4c4dff8 100644 --- a/sys/net/ieee8023ad_lacp.c +++ b/sys/net/ieee8023ad_lacp.c @@ -682,6 +682,7 @@ static void lacp_disable_distributing(struct lacp_port *lp) { struct lacp_aggregator *la = lp->lp_aggregator; + struct lacp_aggregator *la_active; struct lacp_softc *lsc = lp->lp_lsc; struct lagg_softc *sc = lsc->lsc_softc; char buf[LACP_LAGIDSTR_MAX+1]; @@ -703,7 +704,6 @@ lacp_disable_distributing(struct lacp_port *lp) TAILQ_REMOVE(&la->la_ports, lp, lp_dist_q); la->la_nports--; - sc->sc_active = la->la_nports; if (lsc->lsc_active_aggregator == la) { lacp_suppress_distributing(lsc, la); @@ -713,6 +713,8 @@ lacp_disable_distributing(struct lacp_port *lp) } lp->lp_state &= ~LACP_STATE_DISTRIBUTING; + la_active = lsc->lsc_active_aggregator; + sc->sc_active = la_active != NULL ? la_active->la_nports : 0; if_link_state_change(sc->sc_ifp, sc->sc_active ? LINK_STATE_UP : LINK_STATE_DOWN); } @@ -721,6 +723,7 @@ static void lacp_enable_distributing(struct lacp_port *lp) { struct lacp_aggregator *la = lp->lp_aggregator; + struct lacp_aggregator *la_active; struct lacp_softc *lsc = lp->lp_lsc; struct lagg_softc *sc = lsc->lsc_softc; char buf[LACP_LAGIDSTR_MAX+1]; @@ -739,7 +742,6 @@ lacp_enable_distributing(struct lacp_port *lp) KASSERT(la->la_refcnt > la->la_nports, ("aggregator refcnt invalid")); TAILQ_INSERT_HEAD(&la->la_ports, lp, lp_dist_q); la->la_nports++; - sc->sc_active = la->la_nports; lp->lp_state |= LACP_STATE_DISTRIBUTING; @@ -750,6 +752,8 @@ lacp_enable_distributing(struct lacp_port *lp) /* try to become the active aggregator */ lacp_select_active_aggregator(lsc); + la_active = lsc->lsc_active_aggregator; + sc->sc_active = la_active != NULL ? la_active->la_nports : 0; if_link_state_change(sc->sc_ifp, sc->sc_active ? LINK_STATE_UP : LINK_STATE_DOWN); } From nobody Mon Jul 6 01:43:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDt2zCrz6kBmr for ; Mon, 06 Jul 2026 01:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gtnDs5vmmz3YGw for ; Mon, 06 Jul 2026 01:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783302189; 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; bh=2PxAeEH67H1V0uCLJkqY1BJ4q38oMG8UAuWBZEOGSns=; b=bM3CSe0TxEijOztCELI4vto5UAG2AYKqjWLVzfZ8iaQ1bN2/wm4TYAWagOtBZUT2c87YeO ZRS2kjBjQRicMyDOXgY6rht865YeGXQWblRVprfnZO2z2o9C7JkjHp3jF/+ZsAoFUa6H7i BXoeBn17yi6Y+OUkhBaNZKwKjaIlKH7q+ryKNVM60cRRTyaczU9cHYpYvv4EMP7wHPCEx5 mXPd9lnG2uzUr3G+ubFnxdMzBxXxJXs4HccYc52NkTTdLZtItXSAXZti7IV8meg1V284jH BjbUN0vNH5LJCM6XWa8cZnFvy+lc7CkXOHN2XR+58iw4ccvo4yIjG6UmweXsuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783302189; a=rsa-sha256; cv=none; b=Gz+OuSbzwhko3XcNzBnQvOLOt6Y/8SvACdn8j9cUJQchc5+bjsg0ArdNjuJ0YsCQak7idA wKxjiAQL0haksfevJniC7qJeYEvGIfhRd8dc32oyyehXdfCWOGpWc9Uy76K3DTqvD5bfFY hh+7to/E6mCD5FVl85475UUHZgEHLvQPsN3KlEzsJRGnkhvDvdv5e6wY3415XcFegMyrCt pnZuuGQUQ6IPXqZIj0FAJ+sA2ohs7TdbPoJT7bLJQx/BEpVnFBlFKP1Trgb4DPDwc3EK/u Jqb2VKrEv+ymXcXQ6iC1+cYdrn32A0R4Mzfvr3G+yu65hgEYZWLdjYxu/ZXyaQ== 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=1783302189; 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; bh=2PxAeEH67H1V0uCLJkqY1BJ4q38oMG8UAuWBZEOGSns=; b=osi0WY8BP6OpWjTO0IAM30hYdshSg3jJxejjh2iV/Tud/o95UMRm+11/j4Noup3uQ8Y4y8 RbIDnRNHGy3gNwNm8LdPucGHEA/QFGrKlo7w+OSC9Ad0HdP+nI2AC8TQ5GMY+DU4Ta+cYS +R+Byx2VGym+bkpJQaDGhF0ugOc53qh6sLtYqZa8TsVlfKw5CxF4T+/xfjJGPo8Iva/ePV IpbCsXTxXDPzQ+aF+iL+yq6kkP6UtSA7pnxL3kJinM4s2e8orQInDbHGjh0eSX2q67zs/i wa1AzBJjNJRhTEaEXDEwYoPQCJVy5nJnZ3nJrMzBBhiS9L+105JVdc0Iotp2+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gtnDs4jv2zkmg for ; Mon, 06 Jul 2026 01:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c1f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 06 Jul 2026 01:43:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Andrew Gallatin From: Konstantin Belousov Subject: git: 806f0b4b8a9a - stable/15 - bnxt: Report actual link speed, rather than hard-coded 100Gbs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 806f0b4b8a9a03cd47d13ecb9d6aebcc70ebe70d Auto-Submitted: auto-generated Date: Mon, 06 Jul 2026 01:43:09 +0000 Message-Id: <6a4b082d.3c1f0.65ff3fb@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=806f0b4b8a9a03cd47d13ecb9d6aebcc70ebe70d commit 806f0b4b8a9a03cd47d13ecb9d6aebcc70ebe70d Author: Andrew Gallatin AuthorDate: 2026-06-23 16:13:40 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-06 01:36:00 +0000 bnxt: Report actual link speed, rather than hard-coded 100Gbs (cherry picked from commit fdca6b70aa7ebbc95b544cec6e155ea5b1041899) --- sys/dev/bnxt/bnxt_en/if_bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index dea6fd68181e..9988088b3178 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -4852,7 +4852,7 @@ bnxt_report_link(struct bnxt_softc *softc) } iflib_link_state_change(softc->ctx, LINK_STATE_UP, - IF_Gbps(100)); + bnxt_get_baudrate(&softc->link_info)); device_printf(softc->dev, "Link is UP %s %s, %s - %d Mbps \n", duplex, signal_mode, flow_ctrl, (link_info->link_speed * 100)); } else { From nobody Tue Jul 7 01:26:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvNqW0G7hz6kb1K for ; Tue, 07 Jul 2026 01:26: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvNqV4yPgz3QSQ for ; Tue, 07 Jul 2026 01:26:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783387606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9I/R5n23H3xXb/6wkpavu8pMy//JU9ZXLzGg8yzqhOA=; b=jKOnYyXCBBSRA2frMK/BtrEdWrcbwlkelmJbJrU1XyoD/tGblEqpj2ModgnmYxbuz7E/92 JQQlU6PVerXlkWv6bEII8bw+BxiphPJCqsa+vcZ0NjAMAUdGApQQFM+3m/MBgYTstfc0ou g68lr9EqRrWDK3T1Efmxb1aemg3jsoNIow3PqzJEIn+fZCag9YwGZdhWpaGx7lHWcJ/qzh NfdiFD+7ndB1Kb8wzHMlf0bjAl6OkPjgxyRdAUPIrrNXYHlfRLqygwv7tGhq0HnjeLdnZa 1Yo63lmzyKB6iZD6KPPxR+22ubMPvEjhpZBRLZ+5haG0RDGXV2/xAAhVBw8jLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783387606; a=rsa-sha256; cv=none; b=NaWPwHS0niwdpXI+joY0WnsNY2pTC2Oe/2H+OTIEBSuZpLI1coQzo30h8yQFJXKCKeMj6P racXC6omnXQwcwweUbOYU9WXC6BrelpxOgZQusyosqZ+2fFSWY3JGfj+Bi8gsDrIRsDT4F HN0tw45wIZX4EBocSmAHk7Zd/Kuia1IO+YW0Pafl2CekbU07+YeDF0LWFtMBm1HeTaHAUQ cQg/CqwiKc9GzePUzm6Ltn2SSKj01HZk60i9i9MiyiU3CWX0+dte/PGFYkn9kxTz7tqvdP 9GbxgwDGogQxQCgCy86F/OJzcAm7hYbqYqWYsmSW3jdggksdZQ9OErUicuNYTQ== 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=1783387606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9I/R5n23H3xXb/6wkpavu8pMy//JU9ZXLzGg8yzqhOA=; b=m6Uvp0DdastEkD95tDZ2YXsrVRMzhfudmKXV5Wx9w2dYmikxq8H2lE/if2Hp7gUeGnT2Tj qchmisl8QC22VmYPvIhnr65muXwZVY376L9PDyDXI/otgIwwfTg7oLYTgj0NOJl4dtcEMM XKY/PdKtaa9r08ULQjYcHbQtLHPFX7ZeyScNFDL6avPssy0kUvIhK+BtzobFslenI/NnTb dIYbad03tIj0zZ6yiG9Hqh4ZBMTpSC1bOhdVG2A/lQ5aQjJJs9wQW7Ivrj3cz1cytRDfdL MlcNAESDeYK4iaWxreH1sWwo2bDEhOiqCQv1JOC7JT4XLDYGizS+BKsRiehAOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvNqV41gcz1S5Q for ; Tue, 07 Jul 2026 01:26:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c5ba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 01:26:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: bdbad7b41b45 - stable/15 - contrib/openresolv: MFV openresolv 3.17.4 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bdbad7b41b45fe1fa05242fa6cba08107fdafc68 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 01:26:46 +0000 Message-Id: <6a4c55d6.3c5ba.3d049520@gitrepo.freebsd.org> The branch stable/15 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=bdbad7b41b45fe1fa05242fa6cba08107fdafc68 commit bdbad7b41b45fe1fa05242fa6cba08107fdafc68 Author: Siva Mahadevan AuthorDate: 2026-04-28 19:25:49 +0000 Commit: Siva Mahadevan CommitDate: 2026-07-07 00:57:52 +0000 contrib/openresolv: MFV openresolv 3.17.4 Reviewed by: pfg Approved by: lwhsu (mentor) Differential Revision: https://reviews.freebsd.org/D56269 (cherry picked from commit cb0e3a5fba5fe48607db8c1042bfe6a1164e0db7) --- contrib/openresolv/LICENSE | 2 +- contrib/openresolv/Makefile | 54 +- contrib/openresolv/README.md | 9 +- contrib/openresolv/avahi-daemon.in | 32 ++ contrib/openresolv/configure | 4 +- contrib/openresolv/dnsmasq.in | 8 +- contrib/openresolv/libc.in | 82 ++- contrib/openresolv/mdnsd.in | 32 ++ contrib/openresolv/named.in | 4 +- contrib/openresolv/pdns_recursor.in | 4 +- contrib/openresolv/pdnsd.in | 10 +- contrib/openresolv/resolvconf.8.in | 226 +++++--- contrib/openresolv/resolvconf.conf.5.in | 182 ++++-- contrib/openresolv/resolvconf.in | 947 +++++++++++++++++++++++++------- contrib/openresolv/resolvectl.in | 159 ++++++ contrib/openresolv/systemd-resolved.in | 96 ++++ contrib/openresolv/unbound.in | 30 +- 17 files changed, 1484 insertions(+), 397 deletions(-) diff --git a/contrib/openresolv/LICENSE b/contrib/openresolv/LICENSE index 758aec338057..19785ddb1e0f 100644 --- a/contrib/openresolv/LICENSE +++ b/contrib/openresolv/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2007-2019 Roy Marples +Copyright (c) 2007-2020 Roy Marples All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/contrib/openresolv/Makefile b/contrib/openresolv/Makefile index 6cfa6e4ea072..ba9a75d35f22 100644 --- a/contrib/openresolv/Makefile +++ b/contrib/openresolv/Makefile @@ -5,6 +5,9 @@ _CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk CONFIG_MK?= ${_CONFIG_MK} include ${CONFIG_MK} +DIST!= if test -d .git; then echo "dist-git"; \ + else echo "dist-inst"; fi + SBINDIR?= /sbin SYSCONFDIR?= /etc LIBEXECDIR?= /libexec/resolvconf @@ -20,9 +23,11 @@ BINMODE?= 0755 DOCMODE?= 0644 MANMODE?= 0444 -RESOLVCONF= resolvconf resolvconf.8 resolvconf.conf.5 -SUBSCRIBERS= libc dnsmasq named pdnsd pdns_recursor unbound -TARGET= ${RESOLVCONF} ${SUBSCRIBERS} +RESOLVCONF= resolvconf resolvconf.8 resolvconf.conf.5 +SUBSCRIBERS= libc dnsmasq named pdnsd pdns_recursor unbound +SUBSCRIBERS+= systemd-resolved resolvectl +LIBC_SUBSCRIBERS= avahi-daemon mdnsd +TARGET= ${RESOLVCONF} ${SUBSCRIBERS} ${LIBC_SUBSCRIBERS} SRCS= ${TARGET:C,$,.in,} # pmake SRCS:= ${TARGET:=.in} # gmake @@ -36,12 +41,12 @@ SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g' SED_STATUSARG= -e 's:@STATUSARG@:${STATUSARG}:g' DISTPREFIX?= ${PKG}-${VERSION} -DISTFILEGZ?= ${DISTPREFIX}.tar.gz DISTFILE?= ${DISTPREFIX}.tar.xz DISTINFO= ${DISTFILE}.distinfo -DISTINFOSIGN= ${DISTINFO}.asc -CKSUM?= cksum -a SHA256 -PGP?= netpgp +DISTINFOMD= ${DISTINFO}.md +DISTSIGN= ${DISTFILE}.asc +SHA256?= sha256 +PGP?= gpg2 GITREF?= HEAD @@ -59,7 +64,7 @@ clean: rm -f ${TARGET} distclean: clean - rm -f config.mk ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} + rm -f config.mk ${DISTFILE} ${DISTINFO} ${DISTINFOMD} ${DISTSIGN} installdirs: @@ -71,6 +76,9 @@ proginstall: ${TARGET} ${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR} ${INSTALL} -d ${DESTDIR}${LIBEXECDIR} ${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR} + ${INSTALL} -d ${DESTDIR}${LIBEXECDIR}/libc.d + ${INSTALL} -m ${DOCMODE} ${LIBC_SUBSCRIBERS} \ + ${DESTDIR}${LIBEXECDIR}/libc.d maninstall: ${INSTALL} -d ${DESTDIR}${MANDIR}/man8 @@ -87,18 +95,30 @@ dist-inst: mkdir /tmp/${DISTPREFIX} cp -RPp * /tmp/${DISTPREFIX} (cd /tmp/${DISTPREFIX}; make clean) - tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX} + tar -cvJpf ${DISTFILE} -C /tmp ${DISTPREFIX} rm -rf /tmp/${DISTPREFIX} -dist: dist-git +dist: ${DIST} distinfo: dist - rm -f ${DISTINFO} ${DISTINFOSIGN} - ${CKSUM} ${DISTFILE} >${DISTINFO} - #printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO} - ${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO} - chmod 644 ${DISTINFOSIGN} - ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} + rm -f ${DISTINFO} ${DISTSIGN} + ${SHA256} ${DISTFILE} >${DISTINFO} + wc -c <${DISTFILE} \ + | xargs printf 'Size (${DISTFILE}) = %s\n' >>${DISTINFO} + ${PGP} --sign --armour --detach ${DISTFILE} + chmod 644 ${DISTSIGN} + ls -l ${DISTFILE} ${DISTINFO} ${DISTSIGN} + +${DISTINFOMD}: ${DISTINFO} + echo '```' >${DISTINFOMD} + cat ${DISTINFO} >>${DISTINFOMD} + echo '```' >>${DISTINFOMD} + +release: distinfo ${DISTINFOMD} + gh release create v${VERSION} \ + --title "openresolv ${VERSION}" --draft --generate-notes \ + --notes-file ${DISTINFOMD} \ + ${DISTFILE} ${DISTSIGN} import: dist rm -rf /tmp/${DISTPREFIX} @@ -115,4 +135,4 @@ _import-src: @${ECHO} "openresolv-${VERSION} imported to ${DESTDIR}" import-src: - ${MAKE} _import-src DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else echo /tmp/${DISTPREFIX}; fi` + ${MAKE} _import-src DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else echo /tmp/${DISTPREFIX}; fi` diff --git a/contrib/openresolv/README.md b/contrib/openresolv/README.md index 739cc73356cb..50e54ced93ef 100644 --- a/contrib/openresolv/README.md +++ b/contrib/openresolv/README.md @@ -37,7 +37,7 @@ Here's some reasons: The last point is quite important, especially when running VPN systems. Take the following resolv.conf files which have been generated by a -[DHCP client](../dhcpcd) and sent to resolvconf: +[DHCP client](https://github.com/NetworkConfiguration/dhcpcd) and sent to resolvconf: ``` # resolv.conf from bge0 @@ -58,7 +58,12 @@ openresolv ships with helpers for: * [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html) * [ISC BIND](http://www.isc.org/software/bind) * [PowerDNS Recursor](http://wiki.powerdns.com/trac) + * [systemd-resolved](https://www.freedesktop.org/software/systemd/man/latest/systemd-resolved.service.html) See the -[configuration section](https://roy.marples.name/projects/openresolv/config) +[configuration section](https://roy.marples.name/projects/openresolv/configuration) for more details. + +If openresolv updates `/etc/resolv.conf` it can notify the following of this: + * [Bonjour (mdnsd)](https://developer.apple.com/bonjour/) + * [avahi](http://www.avahi.org/) diff --git a/contrib/openresolv/avahi-daemon.in b/contrib/openresolv/avahi-daemon.in new file mode 100644 index 000000000000..cdac44fe8234 --- /dev/null +++ b/contrib/openresolv/avahi-daemon.in @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright (c) 2007-2023 Roy Marples +# All rights reserved + +# avahi-daemon notifier for resolvconf libc subscriber + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +: ${avahi_daemon_pidfile:=/var/run/avahi-daemon/pid} +if [ -s "$avahi_daemon_pidfile" ]; then + kill -HUP $(cat "$avahi_daemon_pidfile") +fi diff --git a/contrib/openresolv/configure b/contrib/openresolv/configure old mode 100644 new mode 100755 index c9422b74b69c..50fe74da8baa --- a/contrib/openresolv/configure +++ b/contrib/openresolv/configure @@ -39,7 +39,7 @@ for x do --includedir) eval INCLUDEDIR="$INCLUDEDIR${INCLUDEDIR:+ }$var";; --datadir|--infodir) ;; # ignore autotools --disable-maintainer-mode|--disable-dependency-tracking) ;; - --help) echo "See the README file for available options"; exit 0;; + --help) echo "See the source for available options"; exit 0;; *) echo "$0: WARNING: unknown option $opt" >&2;; esac done @@ -92,7 +92,7 @@ dragonfly*) : ${LIBEXECDIR:=${PREFIX:-/usr}/libexec/resolvconf} ;; linux*) - # cksum does't support -a and netpgp is rare + # cksum doesn't support -a and netpgp is rare echo "CKSUM= sha256sum --tag" >>$CONFIG_MK echo "PGP= gpg2" >>$CONFIG_MK ;; diff --git a/contrib/openresolv/dnsmasq.in b/contrib/openresolv/dnsmasq.in index 8b51866dca25..ae33f094b649 100644 --- a/contrib/openresolv/dnsmasq.in +++ b/contrib/openresolv/dnsmasq.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2019 Roy Marples +# Copyright (c) 2007-2023 Roy Marples # All rights reserved # dnsmasq subscriber for resolvconf @@ -105,7 +105,7 @@ for d in $DOMAINS; do empty=true continue fi - i=$(($i + 1)) + i=$((i + 1)) while [ ${#addr} -lt 4 ]; do addr="0${addr}" done @@ -118,7 +118,7 @@ for d in $DOMAINS; do fi done while [ $i != 8 ]; do - i=$(($i + 1)) + i=$((i + 1)) front="$front byte:0 byte:0" done front="${front}$back" @@ -151,7 +151,7 @@ else fi # Try to ensure that config dirs exist -if type config_mkdirs >/dev/null 2>&1; then +if command -v config_mkdirs >/dev/null 2>&1; then config_mkdirs "$dnsmasq_conf" "$dnsmasq_resolv" else @SBINDIR@/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv" diff --git a/contrib/openresolv/libc.in b/contrib/openresolv/libc.in index 3651d2acba40..78fe86ce00cd 100644 --- a/contrib/openresolv/libc.in +++ b/contrib/openresolv/libc.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2019 Roy Marples +# Copyright (c) 2007-2025 Roy Marples # All rights reserved # libc subscriber for resolvconf @@ -29,10 +29,23 @@ SYSCONFDIR=@SYSCONFDIR@ LIBEXECDIR=@LIBEXECDIR@ VARDIR=@VARDIR@ -IFACEDIR="$VARDIR/interfaces" +KEYDIR="$VARDIR/keys" +# Compat +if [ ! -d "$KEYDIR" ] && [ -d "$VARDIR/interfaces" ]; then + KEYDIR="$VARDIR/interfaces" +fi + +CMD="$1" +KEY="$2" + NL=" " +warn() +{ + echo "${0##*/}: $*" >&2 +} + # sed may not be available, and this is faster on small files key_get_value() { @@ -94,8 +107,12 @@ elif [ -d "$SYSCONFDIR"/resolvconf ]; then fi fi : ${resolv_conf:=/etc/resolv.conf} +if [ "$resolv_conf" = "/dev/null" ]; then + exit 0 +fi +: ${resolv_conf_tmp:="$resolv_conf.$$.openresolv"} : ${libc_service:=nscd} -: ${list_resolv:=@SBINDIR@/resolvconf -l} +: ${list_resolv:=@SBINDIR@/resolvconf -L} if [ "${resolv_conf_head-x}" = x ] && [ -f "$SYSCONFDIR"/resolv.conf.head ] then resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.head)" @@ -105,9 +122,8 @@ then resolv_conf_tail="$(cat "$SYSCONFDIR"/resolv.conf.tail)" fi -backup=true signature="# Generated by resolvconf" - + uniqify() { result= @@ -123,15 +139,14 @@ uniqify() case "${resolv_conf_passthrough:-NO}" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - backup=false newest= - for conf in "$IFACEDIR"/*; do + for conf in "$KEYDIR"/*; do if [ -z "$newest" ] || [ "$conf" -nt "$newest" ]; then newest="$conf" fi done [ -z "$newest" ] && exit 0 - newconf="$(cat "$newest")$NL" + newconf="$signature$NL$(cat "$newest")$NL" ;; /dev/null|[Nn][Uu][Ll][Ll]) : ${resolv_conf_local_only:=NO} @@ -207,27 +222,44 @@ esac # Check if the file has actually changed or not if [ -e "$resolv_conf" ]; then - [ "$(cat "$resolv_conf")" = "$(printf %s "$newconf")" ] && exit 0 -fi - -# Change is good. -# If the old file does not have our signature, back it up. -# If the new file just has our signature, restore the backup. -if $backup; then - if [ "$newconf" = "$signature$NL" ]; then - if [ -e "$resolv_conf.bak" ]; then - newconf="$(cat "$resolv_conf.bak")$NL" - fi - elif [ -e "$resolv_conf" ]; then - read line <"$resolv_conf" - if [ "$line" != "$signature" ]; then - cp "$resolv_conf" "$resolv_conf.bak" + if [ "$CMD" != u ] && \ + [ "$(cat "$resolv_conf")" = "$(printf %s "$newconf")" ] + then + exit 0 + fi + read line <"$resolv_conf" + if [ "$line" != "$signature" ]; then + if [ "$CMD" != u ]; then + warn "signature mismatch: $resolv_conf" + warn "run \`resolvconf -u\` to update" + exit 1 fi + cp "$resolv_conf" "$resolv_conf.bak" fi fi -# Create our resolv.conf now -(umask 022; echo "$newconf" >"$resolv_conf") +# There are pros and cons for writing directly to resolv.conf +# instead of a temporary file and then moving it over. +# The default is to write to resolv.conf as it has the least +# issues and has been the long standing default behaviour. +# resolv.conf could also be bind mounted for network namespaces +# so we cannot move in this instance. +case "${resolv_conf_mv:-NO}" in +[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + # Protect against symlink attack, ensure new file does not exist + rm -f "$resolv_conf_tmp" + # Keep original file owner, group and mode + [ -r "$resolv_conf" ] && cp -p "$resolv_conf" "$resolv_conf_tmp" + # Create our resolv.conf now + if (umask 022; printf %s "$newconf" >"$resolv_conf_tmp"); then + mv "$resolv_conf_tmp" "$resolv_conf" + fi + ;; +*) + (umask 022; printf %s "$newconf" >"$resolv_conf") + ;; +esac + if [ -n "$libc_restart" ]; then eval $libc_restart elif [ -n "$RESTARTCMD" ]; then diff --git a/contrib/openresolv/mdnsd.in b/contrib/openresolv/mdnsd.in new file mode 100644 index 000000000000..3b01cd459f16 --- /dev/null +++ b/contrib/openresolv/mdnsd.in @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright (c) 2007-2023 Roy Marples +# All rights reserved + +# mdnsd notifier for resolvconf libc subscriber + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +: ${mdnsd_pidfile:=/var/run/mdnsd/mdnsd.pid} +if [ -s "$mdnsd_pidfile" ]; then + kill -HUP $(cat "$mdnsd_pidfile") +fi diff --git a/contrib/openresolv/named.in b/contrib/openresolv/named.in index e5b5a91ee77a..978eb98eafa4 100644 --- a/contrib/openresolv/named.in +++ b/contrib/openresolv/named.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2016 Roy Marples +# Copyright (c) 2007-2023 Roy Marples # All rights reserved # named subscriber for resolvconf @@ -79,7 +79,7 @@ for d in $DOMAINS; do done # Try to ensure that config dirs exist -if type config_mkdirs >/dev/null 2>&1; then +if command -v config_mkdirs >/dev/null 2>&1; then config_mkdirs "$named_options" "$named_zones" else @SBINDIR@/resolvconf -D "$named_options" "$named_zones" diff --git a/contrib/openresolv/pdns_recursor.in b/contrib/openresolv/pdns_recursor.in index f3632e000385..710456894652 100644 --- a/contrib/openresolv/pdns_recursor.in +++ b/contrib/openresolv/pdns_recursor.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2009-2019 Roy Marples +# Copyright (c) 2009-2023 Roy Marples # All rights reserved # PowerDNS Recursor subscriber for resolvconf @@ -54,7 +54,7 @@ for d in $DOMAINS; do done # Try to ensure that config dirs exist -if type config_mkdirs >/dev/null 2>&1; then +if command -v config_mkdirs >/dev/null 2>&1; then config_mkdirs "$pdnsd_zones" else @SBINDIR@/resolvconf -D "$pdnsd_zones" diff --git a/contrib/openresolv/pdnsd.in b/contrib/openresolv/pdnsd.in index 971d90d26a1a..149808c09668 100644 --- a/contrib/openresolv/pdnsd.in +++ b/contrib/openresolv/pdnsd.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2010-2018 Roy Marples +# Copyright (c) 2010-2023 Roy Marples # All rights reserved # pdnsd subscriber for resolvconf @@ -46,7 +46,7 @@ remove_markers() in_marker=0 shift; shift - if type sed >/dev/null 2>&1; then + if command -v sed >/dev/null 2>&1; then sed "/^$m1/,/^$m2/d" $@ else for x do @@ -66,9 +66,9 @@ remove_markers() change_file() { if [ -e "$1" ]; then - if type cmp >/dev/null 2>&1; then + if command -v cmp >/dev/null 2>&1; then cmp -s "$1" "$2" - elif type diff >/dev/null 2>&1; then + elif command -v diff >/dev/null 2>&1; then diff -q "$1" "$2" >/dev/null else # Hopefully we're only working on small text files ... @@ -88,7 +88,7 @@ newresolv="# Generated by resolvconf$NL" changed=false # Try to ensure that config dirs exist -if type config_mkdirs >/dev/null 2>&1; then +if command -v config_mkdirs >/dev/null 2>&1; then config_mkdirs "$pdnsd_resolv" "$pdnsd_conf" else @SBINDIR@/resolvconf -D "$pdnsd_resolv" "$pdnsd_conf" diff --git a/contrib/openresolv/resolvconf.8.in b/contrib/openresolv/resolvconf.8.in index fa00582976d8..f29d272d71e6 100644 --- a/contrib/openresolv/resolvconf.8.in +++ b/contrib/openresolv/resolvconf.8.in @@ -1,4 +1,4 @@ -.\" Copyright (c) 2007-2016 Roy Marples +.\" Copyright (c) 2007-2025 Roy Marples .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 29, 2016 +.Dd June 26, 2025 .Dt RESOLVCONF 8 .Os .Sh NAME @@ -35,14 +35,18 @@ .Op Fl m Ar metric .Op Fl p .Op Fl x -.Fl a Ar interface Ns Op Ar .protocol +.Fl a Ar key .No < Ns Pa file .Nm +.Fl C Ar pattern +.Nm +.Fl c Ar pattern +.Nm .Op Fl f -.Fl d Ar interface Ns Op Ar .protocol +.Fl d Ar key .Nm .Op Fl x -.Fl il Ar pattern +.Fl iLlp Ar pattern .Nm .Fl u .Nm @@ -68,12 +72,20 @@ file to via .Xr stdin 4 with the argument -.Fl a Ar interface Ns Op Ar .protocol +.Fl a Ar key instead of the filesystem. .Nm then updates .Pa /etc/resolv.conf as it thinks best. +If +.Pa /etc/resolv.conf +already exists and the top line does not match the expected signature, +then +.Nm +will refuse to update it unless the +.Fl u +update command is given. When a local resolver other than libc is installed, such as .Xr dnsmasq 8 or @@ -82,27 +94,40 @@ then .Nm will supply files that the resolver should be configured to include. .Pp +At it's heart, .Nm -assumes it has a job to do. -In some situations -.Nm -needs to act as a deterrent to writing to -.Pa /etc/resolv.conf . -Where this file cannot be made immutable or you just need to toggle this -behaviour, +is a key/value store for +.Pa resolv.conf +files. +Each entry must have a unique +.Ar key +and should be expressed as +.Sy interface.protocol +so that it's easy to tell from where the +.Pa resolv.conf +file came from. +This also allows using pattern matching such as +.Sy interface.* +to match all protocols running on the interface. +For example, a modern system will likely run DHCP, RA and DHCPv6 +which could be from separate programs or one program running +many protocols. +However, this is not a fixed requirement, .Nm -can be disabled by adding -.Sy resolvconf Ns = Ns NO -to -.Xr resolvconf.conf 5 . +will work with any key name and it should be treated as an opaque value +outside of +.Nm . .Pp .Nm -can mark an interfaces +can mark a .Pa resolv.conf -as private. +as private and optionally non-searchable. This means that the name servers listed in that .Pa resolv.conf -are only used for queries against the domain/search listed in the same file. +are only used for queries against the domain/search listed in the same file +and if non-searchable then the domain/search listed are +excluded from the global search list defined in +.Pa /etc/resolv.conf . This only works when a local resolver other than libc is installed. See .Xr resolvconf.conf 5 @@ -111,57 +136,97 @@ for how to configure to use a local name server and how to remove the private marking. .Pp .Nm -can mark an interfaces +can mark a .Pa resolv.conf as exclusive. -Only the latest exclusive interface is used for processing, otherwise all are. +Only the latest exclusive key is used for processing, otherwise all are. .Pp -When an interface goes down, it should then call +When a configuration source goes away, +such as an interface going down or a VPN stopping, +it should then call +.Nm +with +.Fl d Ar key +arguments to clean up the +.Pa resolv.conf +it added previously. +For systems that support the concept of persisting configuration when +the source is suspended, +such as the carrier going down, +then it should instead call .Nm with -.Fl d Ar interface.* -arguments to delete the +.Fl C Ar key +arguments to deprecate the entry +.Fl c Ar key +to activate the entry when it comes back again. +This only affects the order in which the .Pa resolv.conf -file(s) for all the -.Ar protocols -on the -.Ar interface . +entries are processed. .Pp -Here are some options for the above commands:- +Here are some options for the above commands: .Bl -tag -width pattern_opt .It Fl f -Ignore non existent interfaces. -Only really useful for deleting interfaces. +Ignore non existent +.Pa resolv.conf +entries. +Only really useful for deleting. .It Fl m Ar metric -Set the metric of the interface when adding it, default of 0. +Set the metric of the +.Pa resolv.conf +entry when adding it, default of 0. Lower metrics take precedence. -This affects the default order of interfaces when listed. -.It Fl p -Marks the interface +This affects the default order of entires when listed. +.It Fl p Op Ar pattern +Marks the .Pa resolv.conf -as private. +as private if the +.Fl a +command is given, otherwise +.Pa resolv.conf +entries having their key matching +.Ar pattern +are listed. +If an extra +.Fl p +is given then the +.Pa resolv.conf +is marked as non-searchable as well. .It Fl x -Mark the interface +Mark the .Pa resolv.conf -as exclusive when adding, otherwise only use the latest exclusive interface. +as exclusive when adding, otherwise only use the latest exclusive key. .El .Pp .Nm -has some more commands for general usage:- +has some more commands for general usage: .Bl -tag -width pattern_opt -.It Fl i Ar pattern -List the interfaces and protocols, optionally matching +.It Fl i Op Ar pattern +List the keys stored, optionally matching .Ar pattern , we have .Pa resolv.conf files for. -.It Fl l Ar pattern +If the +.Fl L +option is given first, then the keys will be list post-processed. +.It Fl L Op Ar pattern +List the +.Pa resolv.conf +files we have, +post-processed by the +.Xr resolvconf.conf 5 +configuration. +If +.Ar pattern +is specified then we list the files for the keys which match it. +.It Fl l Op Ar pattern List the .Pa resolv.conf files we have. If .Ar pattern -is specified then we list the files for the interfaces and protocols +is specified then we list the files for the keys which match it. that match it. .It Fl u Force @@ -169,27 +234,23 @@ Force to update all its subscribers. .Nm does not update the subscribers when adding a resolv.conf that matches -what it already has for that interface. +what it already has for that key. .It Fl Fl version Echo the resolvconf version to .Em stdout . .El .Pp .Nm -also has some commands designed to be used by it's subscribers and -system startup:- +also has some commands designed to be used by its subscribers and +system startup: .Bl -tag -width pattern_opt .It Fl I Initialise the state directory .Pa @VARDIR@ . -This only needs to be called if the initial system boot sequence does not -automatically clean it out; for example the state directory is moved -somewhere other than -.Pa /var/run . -If used, it should only be called once as early in the system boot sequence -as possible and before -.Nm -is used to add interfaces. +This should be called after the base state directory has either been +cleaned out or mounted as a memory backed filesystem during the +initial boot sequence before any daemon has the chance to call +.Nm . .It Fl R Echo the command used to restart a service. .It Fl r Ar service @@ -208,17 +269,18 @@ except that only the information configured in .Xr resolvconf.conf 5 is set. .El -.Sh INTERFACE ORDERING +.Sh RESOLV.CONF ORDERING For .Nm -to work effectively, it has to process the resolv.confs for the interfaces -in the correct order. +to work effectively, it has to process the +.Pa resolv.conf +entries in the correct order. .Nm -first processes interfaces from the -.Sy interface_order -list, then interfaces without a metic and that match the +first processes keys from the +.Sy key_order +list, then entries without a metric and that match the .Sy dynamic_order -list, then interfaces with a metric in order and finally the rest in +list, then entries with a metric in order and finally the rest in the operating systems lexical order. See .Xr resolvconf.conf 5 @@ -226,19 +288,9 @@ for details on these lists. .Sh PROTOCOLS Here are some suggested protocol tags to use for each .Pa resolv.conf -file registered on an -.Ar interface Ns No :- .Bl -tag -width pattern_opt .It dhcp Dynamic Host Configuration Protocol. -Initial versions of -.Nm -did not recommend a -.Ar protocol -tag be appended to the -.Ar interface -name. -When the protocol is absent, it is assumed to be the DHCP protocol. .It ppp Point-to-Point Protocol. .It ra @@ -270,11 +322,15 @@ option is not present then we use .Va IF_METRIC for the metric. .It Va IF_PRIVATE -Marks the interface +Marks the .Pa resolv.conf as private. +.It Va IF_NOSEARCH +Marks the +.Pa resolv.conf +as non-searchable. .It Va IF_EXCLUSIVE -Marks the interface +Marks the .Pa resolv.conf as exclusive. .El @@ -295,6 +351,17 @@ Directory of subscribers which are run after the libc subscriber is run. State directory for .Nm . .El +.Sh NOTES +Domain labels are assumed to be in ASCII and are converted to lower case +to avoid duplicate zones when given differing case from different sources. +.Pp +When running a local resolver other than libc, you will need to configure it +to include files that +.Nm +will generate. +You should consult +.Xr resolvconf.conf 5 +for instructions on how to configure your resolver. .Sh SEE ALSO .Xr resolver 3 , .Xr stdin 4 , @@ -310,14 +377,3 @@ resolvconf, as written by Thomas Hood. .Sh BUGS Please report them to .Lk http://roy.marples.name/projects/openresolv -.Pp -.Nm -does not validate any of the files given to it. -.Pp -When running a local resolver other than libc, you will need to configure it -to include files that -.Nm -will generate. -You should consult -.Xr resolvconf.conf 5 -for instructions on how to configure your resolver. diff --git a/contrib/openresolv/resolvconf.conf.5.in b/contrib/openresolv/resolvconf.conf.5.in index 1b0c47160845..4501221be84b 100644 --- a/contrib/openresolv/resolvconf.conf.5.in +++ b/contrib/openresolv/resolvconf.conf.5.in @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009-2016 Roy Marples +.\" Copyright (c) 2009-2025 Roy Marples .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 8, 2019 +.Dd May 15, 2025 .Dt RESOLVCONF.CONF 5 .Os .Sh NAME @@ -61,26 +61,44 @@ Set to NO to disable .Nm resolvconf from running any subscribers. Defaults to YES. -.It Sy interface_order -These interfaces will always be processed first. -If unset, defaults to the following:- -.Bd -compact -literal -offset indent +.It Sy allow_keys +If set, only these keys will be processed. +.It Sy deny_keys +If set, these keys will not be processed. +.It Sy exclude +Is a space separated list of key/value pairs to match. +If all key/value pairs in one element can be found in the file, +then the whole file will be excluded from processing. +The syntax is this: +.Va $keyword Ns / Ns Va $match Ns Op / Ns Va $keyword Ns / Ns Va $match +.Pp +For example given this configuration: +.Bd -literal -compact -offset indent +exclude="search/foo*/nameserver/1.2.3.4 search/bar.org" +.Ed +.Pp +Then any resolv.conf with both a search option starting with foo with a nameserver of 1.2.3.4 +OR a search option of bar.org would be excluded. +.It Sy key_order +These keys will always be processed first. +If unset, defaults to the following: +.Bd -literal -compact -offset indent lo lo[0-9]* .Ed .It Sy dynamic_order -These interfaces will be processed next, unless they have a metric. -If unset, defaults to the following:- -.Bd -compact -literal -offset indent -tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]* +These keys will be processed next, unless they have a metric. +If unset, defaults to the following: +.Bd -literal -compact -offset indent +tap[0-9]* tun[0-9]* vpn vpn[0-9]* wg[0-9]* ppp[0-9]* ippp[0-9]* .Ed -.It Sy inclusive_interfaces -Ignore any exclusive marking for these interfaces. +.It Sy inclusive_keys +Ignore any exclusive marking for these keys. This is handy when 3rd party integrations force the .Nm resolvconf -x option and you want to disable it easily. .It Sy local_nameservers -If unset, defaults to the following:- -.Bd -compact -literal -offset indent *** 2036 LINES SKIPPED *** From nobody Tue Jul 7 01:34:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvP0348Zjz6kbTK for ; Tue, 07 Jul 2026 01:34: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvP032RCHz3Rg7 for ; Tue, 07 Jul 2026 01:34:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783388051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9GSNEyH9JbiSl5slP6/OEVXBm0c9gdxOQHZQQmmW6nM=; b=sdTRQajG3GHgkhIUQWzdGUoeWwjGJ0f3nFZI8UBV/BbbdQsh21Z65R4lCZMRgAYFEjBxvR lMtnu1eM0LtHtjuJI1JQGXsWFrtRyrA+s4RU+//2zb0HQvAKz9hUejyWBygZAe+SrBnWzW 1Fw8W/stWKPzt1lxhCtv4Bh/XZclrv4sKDTdDLvXJ70ClVI3MQkJGJ2gGb3Mz9vsKrvd8P jxQ5aFqqMvYzMMXL+NEhUfIthcXqTW2XJvEvwYQoxMKnE7cub+QdzyNUISaa4Otzq26DHh ZQJfZOx7R17ZWjiWXEpZ0REuqxKLTDDWampTODKrV7hq+/pmrloyMTrA3DpNOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783388051; a=rsa-sha256; cv=none; b=xGD+nAl/27eERC+HoYTPSEZprr5VH762LodkaSBsdCO77vhrDNLeT64rmHQTmwK9ZPTLfl 7aTSY/nv1glBtuRni1JNsMULrBLfUldXUfZCdEm/pkjlWy1FRXw6HJZTN9rOcNCMqdbq1p +91OBoTgm94+GhFDIGVWLJ0hUdM91HZ/nJowd1lKvPjfKIJ6h2yCFcvTrtWwIAs7S8yJdi MMXAmyPudmjVcWuj3cvTFkGnw8Epyi5fQgAS06DRO28OxzBLuWGfMPzzpJLB5VL/L9eO3q tQ+MyXWF6QaVjFKJ57a0glzQlLICNe5j/NvNQ/zlpNHqtaoaMeLg7TMsQo7Alw== 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=1783388051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9GSNEyH9JbiSl5slP6/OEVXBm0c9gdxOQHZQQmmW6nM=; b=T3q10nF3k+fZpVuIoI2qGzqh9wrdUvBX/hRiKwPVN0kUQVuHUBM06bEFDlycoCKd4akg7z jZs7t2UJw8WbUQpkmfHq8OsbetW6/9TxJM3q8UaMB/qCfppcxkIHCZoMH42Pkgi32OhhzJ 4hoqprbJIEkLDMwNOCZInIMelru/wK4M2IRF5OW2/z5FLPLf0WfxhPccA+Ogu6IUfxgSR6 EYwzpnS1tx0wwcBSY7SJm7NYkX6a/eXAbhI+1wTtA7XHhQ6oN0ixY6qCqmrGgfXj5xJrsN 5D0ll10DmGFpGfnlLs5/Z1oWk8TK1C0qMZXIujzLGKQsuO4n7ZSfJYzsrJc2tA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvP031XBSz1S6Q for ; Tue, 07 Jul 2026 01:34:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e755 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 01:34:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: 266022bf0b60 - stable/14 - contrib/openresolv: MFV openresolv 3.17.4 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 266022bf0b6092a0d052c3faa10130755be21ad5 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 01:34:11 +0000 Message-Id: <6a4c5793.3e755.11d3fd7d@gitrepo.freebsd.org> The branch stable/14 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=266022bf0b6092a0d052c3faa10130755be21ad5 commit 266022bf0b6092a0d052c3faa10130755be21ad5 Author: Siva Mahadevan AuthorDate: 2026-04-28 19:25:49 +0000 Commit: Siva Mahadevan CommitDate: 2026-07-07 01:29:01 +0000 contrib/openresolv: MFV openresolv 3.17.4 Reviewed by: pfg Approved by: lwhsu (mentor) Differential Revision: https://reviews.freebsd.org/D56269 (cherry picked from commit cb0e3a5fba5fe48607db8c1042bfe6a1164e0db7) --- contrib/openresolv/LICENSE | 2 +- contrib/openresolv/Makefile | 54 +- contrib/openresolv/README.md | 9 +- contrib/openresolv/avahi-daemon.in | 32 ++ contrib/openresolv/configure | 4 +- contrib/openresolv/dnsmasq.in | 8 +- contrib/openresolv/libc.in | 82 ++- contrib/openresolv/mdnsd.in | 32 ++ contrib/openresolv/named.in | 4 +- contrib/openresolv/pdns_recursor.in | 4 +- contrib/openresolv/pdnsd.in | 10 +- contrib/openresolv/resolvconf.8.in | 226 +++++--- contrib/openresolv/resolvconf.conf.5.in | 182 ++++-- contrib/openresolv/resolvconf.in | 947 +++++++++++++++++++++++++------- contrib/openresolv/resolvectl.in | 159 ++++++ contrib/openresolv/systemd-resolved.in | 96 ++++ contrib/openresolv/unbound.in | 30 +- 17 files changed, 1484 insertions(+), 397 deletions(-) diff --git a/contrib/openresolv/LICENSE b/contrib/openresolv/LICENSE index 758aec338057..19785ddb1e0f 100644 --- a/contrib/openresolv/LICENSE +++ b/contrib/openresolv/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2007-2019 Roy Marples +Copyright (c) 2007-2020 Roy Marples All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/contrib/openresolv/Makefile b/contrib/openresolv/Makefile index 6cfa6e4ea072..ba9a75d35f22 100644 --- a/contrib/openresolv/Makefile +++ b/contrib/openresolv/Makefile @@ -5,6 +5,9 @@ _CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk CONFIG_MK?= ${_CONFIG_MK} include ${CONFIG_MK} +DIST!= if test -d .git; then echo "dist-git"; \ + else echo "dist-inst"; fi + SBINDIR?= /sbin SYSCONFDIR?= /etc LIBEXECDIR?= /libexec/resolvconf @@ -20,9 +23,11 @@ BINMODE?= 0755 DOCMODE?= 0644 MANMODE?= 0444 -RESOLVCONF= resolvconf resolvconf.8 resolvconf.conf.5 -SUBSCRIBERS= libc dnsmasq named pdnsd pdns_recursor unbound -TARGET= ${RESOLVCONF} ${SUBSCRIBERS} +RESOLVCONF= resolvconf resolvconf.8 resolvconf.conf.5 +SUBSCRIBERS= libc dnsmasq named pdnsd pdns_recursor unbound +SUBSCRIBERS+= systemd-resolved resolvectl +LIBC_SUBSCRIBERS= avahi-daemon mdnsd +TARGET= ${RESOLVCONF} ${SUBSCRIBERS} ${LIBC_SUBSCRIBERS} SRCS= ${TARGET:C,$,.in,} # pmake SRCS:= ${TARGET:=.in} # gmake @@ -36,12 +41,12 @@ SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g' SED_STATUSARG= -e 's:@STATUSARG@:${STATUSARG}:g' DISTPREFIX?= ${PKG}-${VERSION} -DISTFILEGZ?= ${DISTPREFIX}.tar.gz DISTFILE?= ${DISTPREFIX}.tar.xz DISTINFO= ${DISTFILE}.distinfo -DISTINFOSIGN= ${DISTINFO}.asc -CKSUM?= cksum -a SHA256 -PGP?= netpgp +DISTINFOMD= ${DISTINFO}.md +DISTSIGN= ${DISTFILE}.asc +SHA256?= sha256 +PGP?= gpg2 GITREF?= HEAD @@ -59,7 +64,7 @@ clean: rm -f ${TARGET} distclean: clean - rm -f config.mk ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} + rm -f config.mk ${DISTFILE} ${DISTINFO} ${DISTINFOMD} ${DISTSIGN} installdirs: @@ -71,6 +76,9 @@ proginstall: ${TARGET} ${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR} ${INSTALL} -d ${DESTDIR}${LIBEXECDIR} ${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR} + ${INSTALL} -d ${DESTDIR}${LIBEXECDIR}/libc.d + ${INSTALL} -m ${DOCMODE} ${LIBC_SUBSCRIBERS} \ + ${DESTDIR}${LIBEXECDIR}/libc.d maninstall: ${INSTALL} -d ${DESTDIR}${MANDIR}/man8 @@ -87,18 +95,30 @@ dist-inst: mkdir /tmp/${DISTPREFIX} cp -RPp * /tmp/${DISTPREFIX} (cd /tmp/${DISTPREFIX}; make clean) - tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX} + tar -cvJpf ${DISTFILE} -C /tmp ${DISTPREFIX} rm -rf /tmp/${DISTPREFIX} -dist: dist-git +dist: ${DIST} distinfo: dist - rm -f ${DISTINFO} ${DISTINFOSIGN} - ${CKSUM} ${DISTFILE} >${DISTINFO} - #printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO} - ${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO} - chmod 644 ${DISTINFOSIGN} - ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} + rm -f ${DISTINFO} ${DISTSIGN} + ${SHA256} ${DISTFILE} >${DISTINFO} + wc -c <${DISTFILE} \ + | xargs printf 'Size (${DISTFILE}) = %s\n' >>${DISTINFO} + ${PGP} --sign --armour --detach ${DISTFILE} + chmod 644 ${DISTSIGN} + ls -l ${DISTFILE} ${DISTINFO} ${DISTSIGN} + +${DISTINFOMD}: ${DISTINFO} + echo '```' >${DISTINFOMD} + cat ${DISTINFO} >>${DISTINFOMD} + echo '```' >>${DISTINFOMD} + +release: distinfo ${DISTINFOMD} + gh release create v${VERSION} \ + --title "openresolv ${VERSION}" --draft --generate-notes \ + --notes-file ${DISTINFOMD} \ + ${DISTFILE} ${DISTSIGN} import: dist rm -rf /tmp/${DISTPREFIX} @@ -115,4 +135,4 @@ _import-src: @${ECHO} "openresolv-${VERSION} imported to ${DESTDIR}" import-src: - ${MAKE} _import-src DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else echo /tmp/${DISTPREFIX}; fi` + ${MAKE} _import-src DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else echo /tmp/${DISTPREFIX}; fi` diff --git a/contrib/openresolv/README.md b/contrib/openresolv/README.md index 739cc73356cb..50e54ced93ef 100644 --- a/contrib/openresolv/README.md +++ b/contrib/openresolv/README.md @@ -37,7 +37,7 @@ Here's some reasons: The last point is quite important, especially when running VPN systems. Take the following resolv.conf files which have been generated by a -[DHCP client](../dhcpcd) and sent to resolvconf: +[DHCP client](https://github.com/NetworkConfiguration/dhcpcd) and sent to resolvconf: ``` # resolv.conf from bge0 @@ -58,7 +58,12 @@ openresolv ships with helpers for: * [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html) * [ISC BIND](http://www.isc.org/software/bind) * [PowerDNS Recursor](http://wiki.powerdns.com/trac) + * [systemd-resolved](https://www.freedesktop.org/software/systemd/man/latest/systemd-resolved.service.html) See the -[configuration section](https://roy.marples.name/projects/openresolv/config) +[configuration section](https://roy.marples.name/projects/openresolv/configuration) for more details. + +If openresolv updates `/etc/resolv.conf` it can notify the following of this: + * [Bonjour (mdnsd)](https://developer.apple.com/bonjour/) + * [avahi](http://www.avahi.org/) diff --git a/contrib/openresolv/avahi-daemon.in b/contrib/openresolv/avahi-daemon.in new file mode 100644 index 000000000000..cdac44fe8234 --- /dev/null +++ b/contrib/openresolv/avahi-daemon.in @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright (c) 2007-2023 Roy Marples +# All rights reserved + +# avahi-daemon notifier for resolvconf libc subscriber + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +: ${avahi_daemon_pidfile:=/var/run/avahi-daemon/pid} +if [ -s "$avahi_daemon_pidfile" ]; then + kill -HUP $(cat "$avahi_daemon_pidfile") +fi diff --git a/contrib/openresolv/configure b/contrib/openresolv/configure old mode 100644 new mode 100755 index c9422b74b69c..50fe74da8baa --- a/contrib/openresolv/configure +++ b/contrib/openresolv/configure @@ -39,7 +39,7 @@ for x do --includedir) eval INCLUDEDIR="$INCLUDEDIR${INCLUDEDIR:+ }$var";; --datadir|--infodir) ;; # ignore autotools --disable-maintainer-mode|--disable-dependency-tracking) ;; - --help) echo "See the README file for available options"; exit 0;; + --help) echo "See the source for available options"; exit 0;; *) echo "$0: WARNING: unknown option $opt" >&2;; esac done @@ -92,7 +92,7 @@ dragonfly*) : ${LIBEXECDIR:=${PREFIX:-/usr}/libexec/resolvconf} ;; linux*) - # cksum does't support -a and netpgp is rare + # cksum doesn't support -a and netpgp is rare echo "CKSUM= sha256sum --tag" >>$CONFIG_MK echo "PGP= gpg2" >>$CONFIG_MK ;; diff --git a/contrib/openresolv/dnsmasq.in b/contrib/openresolv/dnsmasq.in index 8b51866dca25..ae33f094b649 100644 --- a/contrib/openresolv/dnsmasq.in +++ b/contrib/openresolv/dnsmasq.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2019 Roy Marples +# Copyright (c) 2007-2023 Roy Marples # All rights reserved # dnsmasq subscriber for resolvconf @@ -105,7 +105,7 @@ for d in $DOMAINS; do empty=true continue fi - i=$(($i + 1)) + i=$((i + 1)) while [ ${#addr} -lt 4 ]; do addr="0${addr}" done @@ -118,7 +118,7 @@ for d in $DOMAINS; do fi done while [ $i != 8 ]; do - i=$(($i + 1)) + i=$((i + 1)) front="$front byte:0 byte:0" done front="${front}$back" @@ -151,7 +151,7 @@ else fi # Try to ensure that config dirs exist -if type config_mkdirs >/dev/null 2>&1; then +if command -v config_mkdirs >/dev/null 2>&1; then config_mkdirs "$dnsmasq_conf" "$dnsmasq_resolv" else @SBINDIR@/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv" diff --git a/contrib/openresolv/libc.in b/contrib/openresolv/libc.in index 3651d2acba40..78fe86ce00cd 100644 --- a/contrib/openresolv/libc.in +++ b/contrib/openresolv/libc.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2019 Roy Marples +# Copyright (c) 2007-2025 Roy Marples # All rights reserved # libc subscriber for resolvconf @@ -29,10 +29,23 @@ SYSCONFDIR=@SYSCONFDIR@ LIBEXECDIR=@LIBEXECDIR@ VARDIR=@VARDIR@ -IFACEDIR="$VARDIR/interfaces" +KEYDIR="$VARDIR/keys" +# Compat +if [ ! -d "$KEYDIR" ] && [ -d "$VARDIR/interfaces" ]; then + KEYDIR="$VARDIR/interfaces" +fi + +CMD="$1" +KEY="$2" + NL=" " +warn() +{ + echo "${0##*/}: $*" >&2 +} + # sed may not be available, and this is faster on small files key_get_value() { @@ -94,8 +107,12 @@ elif [ -d "$SYSCONFDIR"/resolvconf ]; then fi fi : ${resolv_conf:=/etc/resolv.conf} +if [ "$resolv_conf" = "/dev/null" ]; then + exit 0 +fi +: ${resolv_conf_tmp:="$resolv_conf.$$.openresolv"} : ${libc_service:=nscd} -: ${list_resolv:=@SBINDIR@/resolvconf -l} +: ${list_resolv:=@SBINDIR@/resolvconf -L} if [ "${resolv_conf_head-x}" = x ] && [ -f "$SYSCONFDIR"/resolv.conf.head ] then resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.head)" @@ -105,9 +122,8 @@ then resolv_conf_tail="$(cat "$SYSCONFDIR"/resolv.conf.tail)" fi -backup=true signature="# Generated by resolvconf" - + uniqify() { result= @@ -123,15 +139,14 @@ uniqify() case "${resolv_conf_passthrough:-NO}" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - backup=false newest= - for conf in "$IFACEDIR"/*; do + for conf in "$KEYDIR"/*; do if [ -z "$newest" ] || [ "$conf" -nt "$newest" ]; then newest="$conf" fi done [ -z "$newest" ] && exit 0 - newconf="$(cat "$newest")$NL" + newconf="$signature$NL$(cat "$newest")$NL" ;; /dev/null|[Nn][Uu][Ll][Ll]) : ${resolv_conf_local_only:=NO} @@ -207,27 +222,44 @@ esac # Check if the file has actually changed or not if [ -e "$resolv_conf" ]; then - [ "$(cat "$resolv_conf")" = "$(printf %s "$newconf")" ] && exit 0 -fi - -# Change is good. -# If the old file does not have our signature, back it up. -# If the new file just has our signature, restore the backup. -if $backup; then - if [ "$newconf" = "$signature$NL" ]; then - if [ -e "$resolv_conf.bak" ]; then - newconf="$(cat "$resolv_conf.bak")$NL" - fi - elif [ -e "$resolv_conf" ]; then - read line <"$resolv_conf" - if [ "$line" != "$signature" ]; then - cp "$resolv_conf" "$resolv_conf.bak" + if [ "$CMD" != u ] && \ + [ "$(cat "$resolv_conf")" = "$(printf %s "$newconf")" ] + then + exit 0 + fi + read line <"$resolv_conf" + if [ "$line" != "$signature" ]; then + if [ "$CMD" != u ]; then + warn "signature mismatch: $resolv_conf" + warn "run \`resolvconf -u\` to update" + exit 1 fi + cp "$resolv_conf" "$resolv_conf.bak" fi fi -# Create our resolv.conf now -(umask 022; echo "$newconf" >"$resolv_conf") +# There are pros and cons for writing directly to resolv.conf +# instead of a temporary file and then moving it over. +# The default is to write to resolv.conf as it has the least +# issues and has been the long standing default behaviour. +# resolv.conf could also be bind mounted for network namespaces +# so we cannot move in this instance. +case "${resolv_conf_mv:-NO}" in +[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + # Protect against symlink attack, ensure new file does not exist + rm -f "$resolv_conf_tmp" + # Keep original file owner, group and mode + [ -r "$resolv_conf" ] && cp -p "$resolv_conf" "$resolv_conf_tmp" + # Create our resolv.conf now + if (umask 022; printf %s "$newconf" >"$resolv_conf_tmp"); then + mv "$resolv_conf_tmp" "$resolv_conf" + fi + ;; +*) + (umask 022; printf %s "$newconf" >"$resolv_conf") + ;; +esac + if [ -n "$libc_restart" ]; then eval $libc_restart elif [ -n "$RESTARTCMD" ]; then diff --git a/contrib/openresolv/mdnsd.in b/contrib/openresolv/mdnsd.in new file mode 100644 index 000000000000..3b01cd459f16 --- /dev/null +++ b/contrib/openresolv/mdnsd.in @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright (c) 2007-2023 Roy Marples +# All rights reserved + +# mdnsd notifier for resolvconf libc subscriber + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +: ${mdnsd_pidfile:=/var/run/mdnsd/mdnsd.pid} +if [ -s "$mdnsd_pidfile" ]; then + kill -HUP $(cat "$mdnsd_pidfile") +fi diff --git a/contrib/openresolv/named.in b/contrib/openresolv/named.in index e5b5a91ee77a..978eb98eafa4 100644 --- a/contrib/openresolv/named.in +++ b/contrib/openresolv/named.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2016 Roy Marples +# Copyright (c) 2007-2023 Roy Marples # All rights reserved # named subscriber for resolvconf @@ -79,7 +79,7 @@ for d in $DOMAINS; do done # Try to ensure that config dirs exist -if type config_mkdirs >/dev/null 2>&1; then +if command -v config_mkdirs >/dev/null 2>&1; then config_mkdirs "$named_options" "$named_zones" else @SBINDIR@/resolvconf -D "$named_options" "$named_zones" diff --git a/contrib/openresolv/pdns_recursor.in b/contrib/openresolv/pdns_recursor.in index f3632e000385..710456894652 100644 --- a/contrib/openresolv/pdns_recursor.in +++ b/contrib/openresolv/pdns_recursor.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2009-2019 Roy Marples +# Copyright (c) 2009-2023 Roy Marples # All rights reserved # PowerDNS Recursor subscriber for resolvconf @@ -54,7 +54,7 @@ for d in $DOMAINS; do done # Try to ensure that config dirs exist -if type config_mkdirs >/dev/null 2>&1; then +if command -v config_mkdirs >/dev/null 2>&1; then config_mkdirs "$pdnsd_zones" else @SBINDIR@/resolvconf -D "$pdnsd_zones" diff --git a/contrib/openresolv/pdnsd.in b/contrib/openresolv/pdnsd.in index 971d90d26a1a..149808c09668 100644 --- a/contrib/openresolv/pdnsd.in +++ b/contrib/openresolv/pdnsd.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2010-2018 Roy Marples +# Copyright (c) 2010-2023 Roy Marples # All rights reserved # pdnsd subscriber for resolvconf @@ -46,7 +46,7 @@ remove_markers() in_marker=0 shift; shift - if type sed >/dev/null 2>&1; then + if command -v sed >/dev/null 2>&1; then sed "/^$m1/,/^$m2/d" $@ else for x do @@ -66,9 +66,9 @@ remove_markers() change_file() { if [ -e "$1" ]; then - if type cmp >/dev/null 2>&1; then + if command -v cmp >/dev/null 2>&1; then cmp -s "$1" "$2" - elif type diff >/dev/null 2>&1; then + elif command -v diff >/dev/null 2>&1; then diff -q "$1" "$2" >/dev/null else # Hopefully we're only working on small text files ... @@ -88,7 +88,7 @@ newresolv="# Generated by resolvconf$NL" changed=false # Try to ensure that config dirs exist -if type config_mkdirs >/dev/null 2>&1; then +if command -v config_mkdirs >/dev/null 2>&1; then config_mkdirs "$pdnsd_resolv" "$pdnsd_conf" else @SBINDIR@/resolvconf -D "$pdnsd_resolv" "$pdnsd_conf" diff --git a/contrib/openresolv/resolvconf.8.in b/contrib/openresolv/resolvconf.8.in index fa00582976d8..f29d272d71e6 100644 --- a/contrib/openresolv/resolvconf.8.in +++ b/contrib/openresolv/resolvconf.8.in @@ -1,4 +1,4 @@ -.\" Copyright (c) 2007-2016 Roy Marples +.\" Copyright (c) 2007-2025 Roy Marples .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 29, 2016 +.Dd June 26, 2025 .Dt RESOLVCONF 8 .Os .Sh NAME @@ -35,14 +35,18 @@ .Op Fl m Ar metric .Op Fl p .Op Fl x -.Fl a Ar interface Ns Op Ar .protocol +.Fl a Ar key .No < Ns Pa file .Nm +.Fl C Ar pattern +.Nm +.Fl c Ar pattern +.Nm .Op Fl f -.Fl d Ar interface Ns Op Ar .protocol +.Fl d Ar key .Nm .Op Fl x -.Fl il Ar pattern +.Fl iLlp Ar pattern .Nm .Fl u .Nm @@ -68,12 +72,20 @@ file to via .Xr stdin 4 with the argument -.Fl a Ar interface Ns Op Ar .protocol +.Fl a Ar key instead of the filesystem. .Nm then updates .Pa /etc/resolv.conf as it thinks best. +If +.Pa /etc/resolv.conf +already exists and the top line does not match the expected signature, +then +.Nm +will refuse to update it unless the +.Fl u +update command is given. When a local resolver other than libc is installed, such as .Xr dnsmasq 8 or @@ -82,27 +94,40 @@ then .Nm will supply files that the resolver should be configured to include. .Pp +At it's heart, .Nm -assumes it has a job to do. -In some situations -.Nm -needs to act as a deterrent to writing to -.Pa /etc/resolv.conf . -Where this file cannot be made immutable or you just need to toggle this -behaviour, +is a key/value store for +.Pa resolv.conf +files. +Each entry must have a unique +.Ar key +and should be expressed as +.Sy interface.protocol +so that it's easy to tell from where the +.Pa resolv.conf +file came from. +This also allows using pattern matching such as +.Sy interface.* +to match all protocols running on the interface. +For example, a modern system will likely run DHCP, RA and DHCPv6 +which could be from separate programs or one program running +many protocols. +However, this is not a fixed requirement, .Nm -can be disabled by adding -.Sy resolvconf Ns = Ns NO -to -.Xr resolvconf.conf 5 . +will work with any key name and it should be treated as an opaque value +outside of +.Nm . .Pp .Nm -can mark an interfaces +can mark a .Pa resolv.conf -as private. +as private and optionally non-searchable. This means that the name servers listed in that .Pa resolv.conf -are only used for queries against the domain/search listed in the same file. +are only used for queries against the domain/search listed in the same file +and if non-searchable then the domain/search listed are +excluded from the global search list defined in +.Pa /etc/resolv.conf . This only works when a local resolver other than libc is installed. See .Xr resolvconf.conf 5 @@ -111,57 +136,97 @@ for how to configure to use a local name server and how to remove the private marking. .Pp .Nm -can mark an interfaces +can mark a .Pa resolv.conf as exclusive. -Only the latest exclusive interface is used for processing, otherwise all are. +Only the latest exclusive key is used for processing, otherwise all are. .Pp -When an interface goes down, it should then call +When a configuration source goes away, +such as an interface going down or a VPN stopping, +it should then call +.Nm +with +.Fl d Ar key +arguments to clean up the +.Pa resolv.conf +it added previously. +For systems that support the concept of persisting configuration when +the source is suspended, +such as the carrier going down, +then it should instead call .Nm with -.Fl d Ar interface.* -arguments to delete the +.Fl C Ar key +arguments to deprecate the entry +.Fl c Ar key +to activate the entry when it comes back again. +This only affects the order in which the .Pa resolv.conf -file(s) for all the -.Ar protocols -on the -.Ar interface . +entries are processed. .Pp -Here are some options for the above commands:- +Here are some options for the above commands: .Bl -tag -width pattern_opt .It Fl f -Ignore non existent interfaces. -Only really useful for deleting interfaces. +Ignore non existent +.Pa resolv.conf +entries. +Only really useful for deleting. .It Fl m Ar metric -Set the metric of the interface when adding it, default of 0. +Set the metric of the +.Pa resolv.conf +entry when adding it, default of 0. Lower metrics take precedence. -This affects the default order of interfaces when listed. -.It Fl p -Marks the interface +This affects the default order of entires when listed. +.It Fl p Op Ar pattern +Marks the .Pa resolv.conf -as private. +as private if the +.Fl a +command is given, otherwise +.Pa resolv.conf +entries having their key matching +.Ar pattern +are listed. +If an extra +.Fl p +is given then the +.Pa resolv.conf +is marked as non-searchable as well. .It Fl x -Mark the interface +Mark the .Pa resolv.conf -as exclusive when adding, otherwise only use the latest exclusive interface. +as exclusive when adding, otherwise only use the latest exclusive key. .El .Pp .Nm -has some more commands for general usage:- +has some more commands for general usage: .Bl -tag -width pattern_opt -.It Fl i Ar pattern -List the interfaces and protocols, optionally matching +.It Fl i Op Ar pattern +List the keys stored, optionally matching .Ar pattern , we have .Pa resolv.conf files for. -.It Fl l Ar pattern +If the +.Fl L +option is given first, then the keys will be list post-processed. +.It Fl L Op Ar pattern +List the +.Pa resolv.conf +files we have, +post-processed by the +.Xr resolvconf.conf 5 +configuration. +If +.Ar pattern +is specified then we list the files for the keys which match it. +.It Fl l Op Ar pattern List the .Pa resolv.conf files we have. If .Ar pattern -is specified then we list the files for the interfaces and protocols +is specified then we list the files for the keys which match it. that match it. .It Fl u Force @@ -169,27 +234,23 @@ Force to update all its subscribers. .Nm does not update the subscribers when adding a resolv.conf that matches -what it already has for that interface. +what it already has for that key. .It Fl Fl version Echo the resolvconf version to .Em stdout . .El .Pp .Nm -also has some commands designed to be used by it's subscribers and -system startup:- +also has some commands designed to be used by its subscribers and +system startup: .Bl -tag -width pattern_opt .It Fl I Initialise the state directory .Pa @VARDIR@ . -This only needs to be called if the initial system boot sequence does not -automatically clean it out; for example the state directory is moved -somewhere other than -.Pa /var/run . -If used, it should only be called once as early in the system boot sequence -as possible and before -.Nm -is used to add interfaces. +This should be called after the base state directory has either been +cleaned out or mounted as a memory backed filesystem during the +initial boot sequence before any daemon has the chance to call +.Nm . .It Fl R Echo the command used to restart a service. .It Fl r Ar service @@ -208,17 +269,18 @@ except that only the information configured in .Xr resolvconf.conf 5 is set. .El -.Sh INTERFACE ORDERING +.Sh RESOLV.CONF ORDERING For .Nm -to work effectively, it has to process the resolv.confs for the interfaces -in the correct order. +to work effectively, it has to process the +.Pa resolv.conf +entries in the correct order. .Nm -first processes interfaces from the -.Sy interface_order -list, then interfaces without a metic and that match the +first processes keys from the +.Sy key_order +list, then entries without a metric and that match the .Sy dynamic_order -list, then interfaces with a metric in order and finally the rest in +list, then entries with a metric in order and finally the rest in the operating systems lexical order. See .Xr resolvconf.conf 5 @@ -226,19 +288,9 @@ for details on these lists. .Sh PROTOCOLS Here are some suggested protocol tags to use for each .Pa resolv.conf -file registered on an -.Ar interface Ns No :- .Bl -tag -width pattern_opt .It dhcp Dynamic Host Configuration Protocol. -Initial versions of -.Nm -did not recommend a -.Ar protocol -tag be appended to the -.Ar interface -name. -When the protocol is absent, it is assumed to be the DHCP protocol. .It ppp Point-to-Point Protocol. .It ra @@ -270,11 +322,15 @@ option is not present then we use .Va IF_METRIC for the metric. .It Va IF_PRIVATE -Marks the interface +Marks the .Pa resolv.conf as private. +.It Va IF_NOSEARCH +Marks the +.Pa resolv.conf +as non-searchable. .It Va IF_EXCLUSIVE -Marks the interface +Marks the .Pa resolv.conf as exclusive. .El @@ -295,6 +351,17 @@ Directory of subscribers which are run after the libc subscriber is run. State directory for .Nm . .El +.Sh NOTES +Domain labels are assumed to be in ASCII and are converted to lower case +to avoid duplicate zones when given differing case from different sources. +.Pp +When running a local resolver other than libc, you will need to configure it +to include files that +.Nm +will generate. +You should consult +.Xr resolvconf.conf 5 +for instructions on how to configure your resolver. .Sh SEE ALSO .Xr resolver 3 , .Xr stdin 4 , @@ -310,14 +377,3 @@ resolvconf, as written by Thomas Hood. .Sh BUGS Please report them to .Lk http://roy.marples.name/projects/openresolv -.Pp -.Nm -does not validate any of the files given to it. -.Pp -When running a local resolver other than libc, you will need to configure it -to include files that -.Nm -will generate. -You should consult -.Xr resolvconf.conf 5 -for instructions on how to configure your resolver. diff --git a/contrib/openresolv/resolvconf.conf.5.in b/contrib/openresolv/resolvconf.conf.5.in index 1b0c47160845..4501221be84b 100644 --- a/contrib/openresolv/resolvconf.conf.5.in +++ b/contrib/openresolv/resolvconf.conf.5.in @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009-2016 Roy Marples +.\" Copyright (c) 2009-2025 Roy Marples .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 8, 2019 +.Dd May 15, 2025 .Dt RESOLVCONF.CONF 5 .Os .Sh NAME @@ -61,26 +61,44 @@ Set to NO to disable .Nm resolvconf from running any subscribers. Defaults to YES. -.It Sy interface_order -These interfaces will always be processed first. -If unset, defaults to the following:- -.Bd -compact -literal -offset indent +.It Sy allow_keys +If set, only these keys will be processed. +.It Sy deny_keys +If set, these keys will not be processed. +.It Sy exclude +Is a space separated list of key/value pairs to match. +If all key/value pairs in one element can be found in the file, +then the whole file will be excluded from processing. +The syntax is this: +.Va $keyword Ns / Ns Va $match Ns Op / Ns Va $keyword Ns / Ns Va $match +.Pp +For example given this configuration: +.Bd -literal -compact -offset indent +exclude="search/foo*/nameserver/1.2.3.4 search/bar.org" +.Ed +.Pp +Then any resolv.conf with both a search option starting with foo with a nameserver of 1.2.3.4 +OR a search option of bar.org would be excluded. +.It Sy key_order +These keys will always be processed first. +If unset, defaults to the following: +.Bd -literal -compact -offset indent lo lo[0-9]* .Ed .It Sy dynamic_order -These interfaces will be processed next, unless they have a metric. -If unset, defaults to the following:- -.Bd -compact -literal -offset indent -tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]* +These keys will be processed next, unless they have a metric. +If unset, defaults to the following: +.Bd -literal -compact -offset indent +tap[0-9]* tun[0-9]* vpn vpn[0-9]* wg[0-9]* ppp[0-9]* ippp[0-9]* .Ed -.It Sy inclusive_interfaces -Ignore any exclusive marking for these interfaces. +.It Sy inclusive_keys +Ignore any exclusive marking for these keys. This is handy when 3rd party integrations force the .Nm resolvconf -x option and you want to disable it easily. .It Sy local_nameservers -If unset, defaults to the following:- -.Bd -compact -literal -offset indent *** 2036 LINES SKIPPED *** From nobody Tue Jul 7 06:38:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlS525Xz6l171 for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlS4Yzsz420q for ; Tue, 07 Jul 2026 06:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AInggk40JWXdWWQfcIV48g+ZwN04prCkBvEThuEMZLA=; b=hNxhOdiBxkNwDhLtdBmmg7uEBxOzgFH9yCIWdJohfBJoRg1ugvPrCacxnS//YPq3yMuFaf Bu1gj+okZmoW6nrrhz59pbYI713ujsy/6kToeOxBqpazMmjY+6megQEnv6wFlFlbinghEZ WZjXPPMkYW2kwFsLshzCHmz+uq+YUq/6pP5Gp+EcGOWDjRHNPOpOYL7xTIYlkpWNcBXfY7 LfiwZf0JDTfF7opwv0BS8aN8cm8Jq0w+o95ytpwdymGaw27sWnNkvdxsf87EHD1qVpYQKD zK2zLQZfabHXg/+A6Adk9YtPvaEDK/HBhQvpM+1bJm7wSZY9uIbvsWStRRDhXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406324; a=rsa-sha256; cv=none; b=gXPWxwJyOo76mV/qF00XkyX5V4UpxpBlclGxSrdcSm53RIEs1sdY668KR8y8Yac6m0tm+F dRx5Yua/4XuIMiSrqoK4FFtzydsW8cnS0fwBdTvQmrus8wwWEpB9jdt+xrspJmf4eHkIHV 8bfFIHSxFzWUDyI7HT4nu9I90p5QXNSTpmOyw43Aar0KJ+lagryUU4WBtFJrUUVTpmtJEk 2NaNQJ+aT1HeeFHJxPR2VRl/0r6owH+W+qfUazJAlTIhWvKb4o9NiIueumkf3RiWcnyXKa F+26lLAkdacbAAIv/GukJJt0tgNbuwEO9OkOBIex3NxvslMI2ZvJPKJoeScexg== 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=1783406324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AInggk40JWXdWWQfcIV48g+ZwN04prCkBvEThuEMZLA=; b=FKK0jVtoLy8/qziE5hP0ohsfja3U2trS3Sy3jz8H3/8CVTYcbJoNvKvsbytXttKSyRAqIR oZNLLT8SALKPP2JTXlpHvkH03Pody03gusE58BGfL1Ysu6D7HKi8PEXmLRWbJMvEY2hFLT vjqyhjz47sLRQ3EQOtB6esrFd59gpb4Vn3gGYnh91iy5C9tjE2PKDS7p5/h+dC5kl0O42M ZlLEimDuTvRX0woWSDLZ4HkTifO+d90Fx9k5Z3N4iCUsnno44wXcWw30AsXVotj2RLDimc 0szPle4JIY899+uuNYKDjjFm83lvgaTGNrhpsWTSxyGBvelAD7IAINpnTqkF0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlS2xwqz833 for ; Tue, 07 Jul 2026 06:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3681f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 90244a31a076 - stable/15 - rc.firewall: Use checkyesno for boolean variables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 90244a31a076459722c26cecc5be6d50556d4e5d Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:44 +0000 Message-Id: <6a4c9ef4.3681f.3a691fc7@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=90244a31a076459722c26cecc5be6d50556d4e5d commit 90244a31a076459722c26cecc5be6d50556d4e5d Author: Dag-Erling Smørgrav AuthorDate: 2026-06-26 14:38:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:10 +0000 rc.firewall: Use checkyesno for boolean variables Use the checkyesno function from rc.subr instead of hardcoded checks for boolean variables. Also drop an incorrect comment about the default logamount value; the actual default is zero (unlimited). MFC after: 1 week Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D57678 (cherry picked from commit a3c077c1ccbe57ffad6317879bc1e49291892414) --- libexec/rc/rc.firewall | 53 ++++++++++++++++++-------------------------------- 1 file changed, 19 insertions(+), 34 deletions(-) diff --git a/libexec/rc/rc.firewall b/libexec/rc/rc.firewall index e4fc8cc3db78..65bf1cc54f85 100644 --- a/libexec/rc/rc.firewall +++ b/libexec/rc/rc.firewall @@ -131,14 +131,11 @@ ipv6_available=$? ############ # Set quiet mode if requested # -case ${firewall_quiet} in -[Yy][Ee][Ss]) +if checkyesno firewall_quiet; then fwcmd="/sbin/ipfw -q" - ;; -*) +else fwcmd="/sbin/ipfw" - ;; -esac +fi ############ # Flush out the list before we begin. @@ -159,27 +156,19 @@ setup_ipv6_mandatory # case ${firewall_type} in [Oo][Pp][Ee][Nn]|[Cc][Ll][Ii][Ee][Nn][Tt]) - case ${natd_enable} in - [Yy][Ee][Ss]) - if [ -n "${natd_interface}" ]; then - ${fwcmd} add 50 divert natd ip4 from any to any via ${natd_interface} - fi - ;; - esac - case ${firewall_nat_enable} in - [Yy][Ee][Ss]) - if [ -n "${firewall_nat_interface}" ]; then - if echo "${firewall_nat_interface}" | \ + if [ -n "${natd_interface}" ] && checkyesno natd_enable; then + ${fwcmd} add 50 divert natd ip4 from any to any via ${natd_interface} + fi + if [ -n "${firewall_nat_interface}" ] && checkyesno firewall_nat_enable ; then + if echo "${firewall_nat_interface}" | \ grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then - firewall_nat_flags="ip ${firewall_nat_interface} ${firewall_nat_flags}" - else - firewall_nat_flags="if ${firewall_nat_interface} ${firewall_nat_flags}" - fi - ${fwcmd} nat 123 config log ${firewall_nat_flags} - ${fwcmd} add 50 nat 123 ip4 from any to any via ${firewall_nat_interface} + firewall_nat_flags="ip ${firewall_nat_interface} ${firewall_nat_flags}" + else + firewall_nat_flags="if ${firewall_nat_interface} ${firewall_nat_flags}" fi - ;; - esac + ${fwcmd} nat 123 config log ${firewall_nat_flags} + ${fwcmd} add 50 nat 123 ip4 from any to any via ${firewall_nat_interface} + fi esac ############ @@ -320,13 +309,9 @@ case ${firewall_type} in # translated by natd(8) would match the `deny' rule above. Similarly # an outgoing packet originated from it before being translated would # match the `deny' rule below. - case ${natd_enable} in - [Yy][Ee][Ss]) - if [ -n "${natd_interface}" ]; then - ${fwcmd} add divert natd ip4 from any to any via ${natd_interface} - fi - ;; - esac + if [ -n "${natd_interface}" ] && checkyesno natd_enable; then + ${fwcmd} add divert natd ip4 from any to any via ${natd_interface} + fi ${fwcmd} add deny all from "table($BAD_ADDR_TBL)" to any via ${oif} if [ -n "$inet6" ]; then @@ -533,8 +518,8 @@ case ${firewall_type} in # Deny and (if wanted) log the rest unconditionally. log="" - if [ ${firewall_logdeny:-x} = "YES" -o ${firewall_logdeny:-x} = "yes" ] ; then - log="log logamount 500" # The default of 100 is too low. + if checkyesno firewall_logdeny; then + log="log logamount 500" sysctl net.inet.ip.fw.verbose=1 >/dev/null fi ${fwcmd} add deny $log ip from any to any From nobody Tue Jul 7 06:38:45 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlT6Tkkz6l0jf for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlT5S5sz41mM for ; Tue, 07 Jul 2026 06:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=whgOpJVcbO36ZbUZEGjog4DjTF2LfTN9mbrW2oPRo7s=; b=i04djPG4q4xi9nGLofcAlOYbLlSH8oP5n5I0Mi03uCROqDKBoxoKi3U4P2x8p6S9d7u/8y jW6ekRz1UjBa1UdtlG/DGD3Ifg0n/sIfbYBRD/072FbrKKMTn83fc9aL+OY0IKmhJRvgfH ZlcRPfiP7JvqQUIp2EY9gLJWUDsOt1e0F82UOGZrB1peloZdCKsZfdwcpiYCUfuLb5xh2J 9+Ru97+bDOt4uHQ0p/MssYTCBj8yYZRO5V/ZpN34bOsoQLExHl6K9AUo68AsSXPaaEXAfa 7H470TJ8QrUO65eW4AfL7InewKm2lmVTzDbZztIksm7qq/njGXzh0XvfLTkBKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406325; a=rsa-sha256; cv=none; b=iOly/grOv9wz3+4a4JOPx/myB9najr6atimQ0LogH+GOiN/XnGn/xSKRp2bxNE9JZFzOSV W8Imj+Gn7zfpLokDJrnJPzUNl5Sz8VCT0bBU+LQ7GnlkDLZxThFdIEnhEnB03S5m7sbm+K On56dh/2WNdHOslzKluDql1X5dgOfbhqPNBD4/sw4dGB5zLkckvIbzaBdlVQc6Fbe1KUnV bH9xqOfGWXHTxWepbAmv/jxZkRqIi8kAlWMkFrlzH41cwcEB9mjgOaOXhVckmkYqHoJ26Z TKpyy4U5SAMqB4J7QBcvyjbct+fLoUHO5M5jyUnxSLb8cy65+DPFCkpphEvZTQ== 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=1783406325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=whgOpJVcbO36ZbUZEGjog4DjTF2LfTN9mbrW2oPRo7s=; b=b8BcxF1MUAaKv34vumhNAF1N8+BkeRZHzsZeqwlyPm4l+LFagjyDZ3NpJLDJUz/i1B2kly 47MsBD4LWqzrXKGptOXXJm1NTemsWL1WdwLdxenk47ltPL5XQ0F0lnAf8LMAclvuGrF82R e/iagT1p7sYKh16THijEEFsrL7SqSkB6Lm3SioG1NcXom9COYIfr38nHF7ZmXMVGOoO+3b 6gqBxCV3S8H5PqZIb5xQ7WAZQZx/Wvzer1H8Ztea6azX2Ui9Cjis1qO3G4fjzGlkk0acON kPg80TQKCdTFEVvAT61l+AT8OVhEnJ/N3lJmJsiQrjRMzHHUvtqfsxyLXF+ypA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlT30l6z7rF for ; Tue, 07 Jul 2026 06:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3664a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 3aec74070b0d - stable/15 - rc.firewall: Support on-disk lists List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 3aec74070b0db7cb4d7f3277037531918074175d Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:45 +0000 Message-Id: <6a4c9ef5.3664a.1c6fa784@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3aec74070b0db7cb4d7f3277037531918074175d commit 3aec74070b0db7cb4d7f3277037531918074175d Author: Dag-Erling Smørgrav AuthorDate: 2026-06-26 14:38:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:10 +0000 rc.firewall: Support on-disk lists For firewall_allowservices and firewall_trusted, if an element of the list looks like an absolute path, read the file, skipping comments and blank lines, and treat the first word on each line as an address or subnet to be added to the list. We should probably be using tables instead, but this is still an improvement over the status quo ante. MFC after: 1 week Relnotes: yes Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D57679 (cherry picked from commit a71abf38e2b46c02965f3224c62bb6ef1971996e) --- libexec/rc/rc.conf | 11 +++++++---- libexec/rc/rc.firewall | 43 ++++++++++++++++++++++++++++++++----------- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index fdf6a24db119..7fe5ffcd96cf 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -183,11 +183,14 @@ firewall_simple_onet="192.0.2.0/28" # Outside network address for "simple" # for "simple" firewall. firewall_myservices="" # List of ports/protocols on which this host # offers services for "workstation" firewall. -firewall_allowservices="" # List of IPs which have access to +firewall_allowservices="" # List of IPs or subnets which have access to # $firewall_myservices for "workstation" - # firewall. -firewall_trusted="" # List of IPs which have full access to this - # host for "workstation" firewall. + # firewall, or of files containing lists of + # IPs or subnets, one per line. +firewall_trusted="" # List of IPs or subnets which have full access + # to this host for "workstation" firewall, or + # of files containing lists of IPs or subnets, + # one per line. firewall_logdeny="NO" # Set to YES to log default denied incoming # packets for "workstation" firewall. firewall_nologports="135-139,445 1026,1027 1433,1434" # List of TCP/UDP ports diff --git a/libexec/rc/rc.firewall b/libexec/rc/rc.firewall index 65bf1cc54f85..f3e1ea116522 100644 --- a/libexec/rc/rc.firewall +++ b/libexec/rc/rc.firewall @@ -406,10 +406,14 @@ case ${firewall_type} in # firewall_myservices: List of ports/protocols on which this # host offers services. # firewall_allowservices: List of IPv4 and/or IPv6 addresses - # that have access to - # $firewall_myservices. + # or subnets that have access to + # $firewall_myservices, or files + # containing such address or subnets, + # one per line. # firewall_trusted: List of IPv4 and/or IPv6 addresses - # that have full access to this host. + # or subnets that have full access to + # this host, or files containing such + # addresses or subnets, one per line. # Be very careful when setting this. # This option can seriously degrade # the level of protection provided by @@ -467,25 +471,33 @@ case ${firewall_type} in # workstation won't be a problem. # for i in ${firewall_allowservices} ; do + case $i in + /*) + grep '^[^#]' "$i" + ;; + *) + echo "$i" + ;; + esac + done | while read i _; do for j in ${firewall_myservices} ; do case $j in [0-9A-Za-z]*/[Pp][Rr][Oo][Tt][Oo]) ${fwcmd} add pass ${j%/[Pp][Rr][Oo][Tt][Oo]} from $i to me - ;; + ;; [0-9A-Za-z]*/[Tt][Cc][Pp]) ${fwcmd} add pass tcp from $i to me ${j%/[Tt][Cc][Pp]} - ;; + ;; [0-9A-Za-z]*/[Uu][Dd][Pp]) ${fwcmd} add pass udp from $i to me ${j%/[Uu][Dd][Pp]} - ;; + ;; *[0-9A-Za-z]) - echo "Consider using ${j}/tcp in firewall_myservices." \ - > /dev/stderr + echo "Consider using ${j}/tcp in firewall_myservices." >&2 ${fwcmd} add pass tcp from $i to me $j - ;; + ;; *) - echo "Invalid port in firewall_myservices: $j" > /dev/stderr - ;; + echo "Invalid port in firewall_myservices: $j" >&2 + ;; esac done done @@ -494,6 +506,15 @@ case ${firewall_type} in # Playing with the content of firewall_trusted could seriously # degrade the level of protection provided by the firewall. for i in ${firewall_trusted} ; do + case $i in + /*) + grep '^[^#]' "$i" + ;; + *) + echo "$i" + ;; + esac + done | while read i _ ; do ${fwcmd} add pass ip from $i to me done From nobody Tue Jul 7 06:38:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlW0lHNz6l0tv for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlV57TPz41k6 for ; Tue, 07 Jul 2026 06:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MfSCXDdgLVbfg1pEPI9JDhYZJqQDLZJKDGLWcpsEFGk=; b=gawKrSOCO+35MWllZjawdtXSNPsJtabWOmbFtQNpVUkmivlpY+tM8XejfDKVy2RbvNiOTD n6bJze2ct1qQ4o6GZzFX+1kCIDgGZDfE4dslpoi0LrzUdMTE1amfWwOdTHv43wg6vKIs9A OFDjS3+WH0Z7sPFavrq8Xi/vZBx0YG71rc0JeD3QMVNRk5aw+vVpXOXWZaQG/UrBJ3ZsoD nUu8I4Ovrg9MyYAD9ZNPbSya7gEpLMo8SttCZxZ2cDRCsSlCPm2dQm+eO/9yKJ3OtYLQ2P lfh+WIPnhu3Lu0reZWfZrkWa+1BbD85B7zhOUOKd74RhwCgxLVRoerM5S+YTaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406326; a=rsa-sha256; cv=none; b=F9S2Kc9p5tm3DKFxt3GF6B1ICIEhuP2I6hwvorUIfrW0/S6026oIgwjd0GMt2ykGUva3fT y6ZENbDPcMU//8oxPZB9mQ9mAI8yHNLbIoDQZcIDSK/RGujqyX0w+2ypD+wn8vzVfOYJOl kQcxOOo/9BTE4rYaINtoX2SrCXaT9ecYeNXU+xwfF1L8jbHK2YQFScH0N2oSVrl4geaMPt aW0+GMR5s5drS1qds/S5nXp7d+4SkQL+nWpJUwIiBxpSoBp19JCDFIOcQ6lU110ZOcgl6o tpMYKzr5oUZEOa9UOI3UmaFOlch3+0RVEN4DSCT9nnj6wJga8UhjeSMmt3+A7A== 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=1783406326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MfSCXDdgLVbfg1pEPI9JDhYZJqQDLZJKDGLWcpsEFGk=; b=Ic0V1ycXnzt+NJMqQT1yWpUxAeEUUVilQWe9ceYnd20NNEhxhj3WVBYSvDpPRrbI43Zod2 QQsH90FN1Ov2oo9td+Z//zr8wZm3nybmxtBGFTnLLmt4ZjzhE1fDMbXS2JZqBwXmLoK6ro LDeSQuSEurU2cM/G5jdaSKyaoKX0tc49Cso8ET8NZz1of+XlmoCM/aUfvBywaBhhjGNmg5 1EJ358OSGKuGReDLKp7X33/aRDgQYuk0AK21PB3LzriYtW0y2UoCOSFLszCzmpM5k7QA4x Fc5HexIU+A2oJ90kQczW3v/4elQ5hGyXnjcit86wLRmrEbXhC9d03vbeM2csww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlV3qP2z88m for ; Tue, 07 Jul 2026 06:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32bc6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: fcbe16d24fec - stable/15 - rc.d/ddb: Really silently exit List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: fcbe16d24fec5a35b409a25421b1d397f3b1f2f0 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:46 +0000 Message-Id: <6a4c9ef6.32bc6.1b868670@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=fcbe16d24fec5a35b409a25421b1d397f3b1f2f0 commit fcbe16d24fec5a35b409a25421b1d397f3b1f2f0 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-26 14:38:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:11 +0000 rc.d/ddb: Really silently exit The comment says “silently exit if ddb is not enabled”, but we'd exit with an error message. Note that I switched the sysctl variable used to test for the presence of ddb from debug.ddb.scripting.scripts to d.d.s.script, which has a smaller value if set. While here, drop a pointless fork-exec, and use ${SYSCTL_N} for consistency. PR: 177217 MFC after: 1 week Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57686 (cherry picked from commit b0d3a2889a1b8e4b73ad1f396884224e1442b214) --- libexec/rc/rc.d/ddb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/ddb b/libexec/rc/rc.d/ddb index 08a7d345c326..a30df2dc1c5e 100755 --- a/libexec/rc/rc.d/ddb +++ b/libexec/rc/rc.d/ddb @@ -20,8 +20,8 @@ stop_cmd=":" ddb_prestart() { # Silently exit if ddb is not enabled - if [ -z "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then - return 1 + if ! ${SYSCTL_N} -q debug.ddb.scripting.script >/dev/null; then + exit 1 fi } From nobody Tue Jul 7 06:38:47 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlX2Bbzz6l0xS for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlW5s1nz4212 for ; Tue, 07 Jul 2026 06:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fxNPO0QVN0VXcfEWVIBTnFjeXraFvOyPl1tfq19GTwA=; b=ihq9szwxYZUXtEDbz2NF3PD3CZ6I5+M5hWIhE2QfB7opLIkVZ6iNL6KhxrjlBRcrLg/ugn RDBC7p+IKY0JJKqAHiWSZxUmHZnN/3n/RPOR5K+SwufifuTzMFQAxHJLeflrATExXj34Se 6o5QoK5UjypAQWZaOc7P8qPOvZ1dZN98PN0GPxoM+TFqiAvaq7vuSGPP9hTKviachWSzP9 h+a4JMAkMAd8MgIatkzOLDe7lLT1VSLKKxgMLrf31IWq9mrK5KWo9p4aINki/h4PvO7dru WcglQLvM5oDeTrQLcQnq3LQvYY7zDsas8iqkl4Pl0vz74A79jcPrqGaEf9CPCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406327; a=rsa-sha256; cv=none; b=MOrCgomNonb+2Krjo9+p5IBog7dD45i7PtnR8Y3i3qa6pKuJfeOGZD2x7zZmQ7hOxzmmMv qJ1KoReAX40nRzVMycw5bNDVF8j90ZCE52Dvrv00bunUNYd5TYbyFPppxbeMdkdC/VYnAq AeUlO8E4hQ/CqgwVR9eW99PFLh1iNUKxKLwI6Buh+0x+vFmvrZHWiQD6iWy7qAh0+fLqku tnszc9UR9mkKmHhALWhOFDJ/00nVT5oJWgVFimPuN+u/QOsN3lj9fHdnKuFdi61YlX5jqc 8uMJnknFGqMS9+t8ALU+kyYdd8YLj6zUUzQkYtfsfBgCnESm0A6GuAEOtaaDhA== 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=1783406327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fxNPO0QVN0VXcfEWVIBTnFjeXraFvOyPl1tfq19GTwA=; b=TKaJZv9K0HWDZ3H2sCfLu4tA2+segj+QNwIQmckkdZ6uCSqC7NoeW2qLICvyzFP4Iv/0vb pRXMBHKPKfkvN/VV13fQ8fCw/ArtU9eHwDWvbIZr8fK10RDTbaGTYuTcOQCf3WyvjxcCRh kwXrx8qJ4gHhW8dxMta5fce7cJKXESpzpnVWapNqV31bUt9+VLjPBHofcOWuf7QW/PW3rj 9h1RrBxw1/wzxa4PB0BBGRTYjStyatZ45C36BXg/1eW/gHYPfZTG2wFRdsiod2+d7Jerfp aeRYR7IeVqo/3WRNEt64bCQvyD8bTmGppFj0OLsFY4hZx05wwZFIOrB93PhlPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlW4fFWz86X for ; Tue, 07 Jul 2026 06:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35efb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 7d350f5fd5d8 - stable/15 - rc.d/tmp: Fix dupe mount check List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 7d350f5fd5d8d0abfc177d00a0c8c78cdef99fb9 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:47 +0000 Message-Id: <6a4c9ef7.35efb.3ca9beb0@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7d350f5fd5d8d0abfc177d00a0c8c78cdef99fb9 commit 7d350f5fd5d8d0abfc177d00a0c8c78cdef99fb9 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-26 14:39:03 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:11 +0000 rc.d/tmp: Fix dupe mount check Before mounting a new mfs on /tmp, we check if there already is one. However, the dupe check only takes /dev/md[0-9]* into account, while the default mfs type these days is tmpfs. Rewrite it to look for tmpfs as well. Note that the dupe check is redundant in the tmpmfs=auto case, but we leave moving it for later. PR: 182035 MFC after: 1 week Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D57682 (cherry picked from commit 45efa4e61623e3eeee7fd0a3f4436616e24c8e98) --- libexec/rc/rc.d/tmp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp index cc970816e45c..76baaa672c6a 100755 --- a/libexec/rc/rc.d/tmp +++ b/libexec/rc/rc.d/tmp @@ -42,10 +42,15 @@ tmp_svcj="NO" mount_tmpmfs() { - while read line; do - case $line in - /dev/md[0-9]*\ /tmp) - return;; + while read _dev _ _ _ _ _mp; do + case ${_mp} in + /tmp) + case ${_dev} in + tmpfs|/dev/md[0-9]*) + return 0 + ;; + esac + ;; esac done <<*EOF $(df /tmp) From nobody Tue Jul 7 06:38:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlY3LcBz6l0jl for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlX6g8gz41xs for ; Tue, 07 Jul 2026 06:38:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=im2Yc/6PrLkZlZlGAY3y8fQotuaGrBk7qW6oiT6o6dE=; b=TiiXA7An0fqEvSX2LZ4wjAkrpS3YcjKcnmb6c9lDaQt5MRuJL3Cn2CuO0z4IRQgf9HVL1H +Jql0QhPsO2eqFc7aS5GWDkhHJuAc2RAzXWwjlaSL7MSHSCw3DVheg3l1GbkUwRz9s1DYu i813pNFR6jke9xPU2cRKLI0tfwPfcxtPOQbijfud6lZcxURqVcmpG2Zwx4rBtk9Z6E2h84 uppuT9Z0D+dxkZnYsTNk73ujLPGbiK1gqUEyLefmNryZMcob7ZfK6gvEZszizEEMsybvAn t92VgG6Bp3yD1OP+sij7FQUwMpG2CtQVcKbW30C1pv13/AD8C4l38prgXl9+rA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406328; a=rsa-sha256; cv=none; b=lQI6NLZhwN5jSJHVtJIGaYyjvwY678CrriYKLu5nfENH/3P2MGi+y0N0bbNnu4xCDYE4PD 6q08urxW24phxd6//oO2pJ+dsglKSQPlWEYmb4KyAib3QWNoL3hCQ3FH6pzI+d5yWR5qk3 GUv4LJCi3aBOUAqqTm26MdnYNQyyNu7CUr0idkEArxbsXvBy7w+errfYF2yjti5esgDpUP Y4shmeN4zM64Sm7rttEyIUVSQg73yOmDc9Q2qYkQ6Wxk7wXxUM+xw52/L3hAuMs9S7YF47 4zIloDYCdAXqV6/WxY5k1XtOD7WyVyl6SCMP7vC9/SNaDUtvnaS9+OpmoV2l0Q== 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=1783406328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=im2Yc/6PrLkZlZlGAY3y8fQotuaGrBk7qW6oiT6o6dE=; b=G1w2SH5JlBXxLZ8d0tdMmhLzDWz1MwsKhCCyODeyShdsYpXk+nM3i4GQiupPikZenGhuqH Rh9jJn6ariljkwMJTNYi9jO786qJNYqHLwJ/cRLNLvaAP1NNEVXtFGaVTUsoPxGlpS/Daa bzdS2GqWjwCOPnynrCHURViJ7lC6bsJIBxPNVn+EFWUcck/vUyJxFX3UNghxFr0vl9u2Sf tcLFamqCydXpTWf4eEaecvjUKkbsIHp7Wv36//fWxGolTP6zkPfZmGZi9CxohRf2rPkAhw YWxIcTQ7EeHMOgZcICp/Arob/RemrvD5ZiETD2kl0BMWXZ3ijosJAaCWZd+Htg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlX5XZXz836 for ; Tue, 07 Jul 2026 06:38:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 376e0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: ba4033104a89 - stable/15 - local-unbound-setup: Support IPv6-only systems List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: ba4033104a89c9a0e0ebe6bed5f029cc1cf95755 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:48 +0000 Message-Id: <6a4c9ef8.376e0.205857a8@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ba4033104a89c9a0e0ebe6bed5f029cc1cf95755 commit ba4033104a89c9a0e0ebe6bed5f029cc1cf95755 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-26 14:43:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:11 +0000 local-unbound-setup: Support IPv6-only systems * In the server configuration, disable protocols not supported by the kernel. * In resolv.conf, instead of only using 127.0.0.1, use either 127.0.0.1, ::1, or both depending on which protocols the kernel supports. MFC after: 1 week Reviewed by: jlduran Differential Revision: https://reviews.freebsd.org/D57840 (cherry picked from commit f0a861efbafeb81428d5e8c23dac9da73fe14007) --- usr.sbin/unbound/setup/local-unbound-setup.sh | 50 +++++++++++++++++++++------ 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh index ec3aeb673ecc..6b217ec574cd 100755 --- a/usr.sbin/unbound/setup/local-unbound-setup.sh +++ b/usr.sbin/unbound/setup/local-unbound-setup.sh @@ -72,6 +72,19 @@ RE_forward_addr="((${RE_ipv4}|${RE_ipv6})(@${RE_port})?)" RE_forward_name="(${RE_dnsname}(@${RE_port})?)" RE_forward_tls="(${RE_forward_addr}(#${RE_dnsname})?)" +# +# Check if a kernel feature is available +# +has_feature() { + local name=$1 v + eval "v=\$kern_features_${name}" + if [ -z "$v" ] ; then + v="$(sysctl -qn "kern.features.${name}")" + eval "kern_features_${name}=$((v))" + fi + return $((!v)) +} + # # Set default values for unset configuration variables. # @@ -136,13 +149,12 @@ get_nameservers() { # # Scan through /etc/resolv.conf looking for uncommented nameserver -# lines. Comment out any that don't point to localhost. Finally, -# append a nameserver line that points to localhost, if there wasn't -# one already, and enable the edns0 option. +# lines and comment out any that don't point to localhost. Finally, +# append the correct nameserver lines and enable the edns0 option. # gen_resolv_conf() { - local localhost=no - local edns0=no + local localhost4=false localhost6=false + local edns0=false while read line ; do local bareline=${line%%\#*} local key=${bareline%%[[:space:]]*} @@ -150,8 +162,17 @@ gen_resolv_conf() { case ${key} in nameserver) case ${value} in - 127.0.0.1|::1|localhost|localhost.*) - localhost=yes + 127.0.0.1) + localhost4=true + if ! has_feature inet ; then + continue + fi + ;; + ::1) + localhost6=true + if ! has_feature inet6 ; then + continue + fi ;; *) echo -n "# " @@ -161,17 +182,20 @@ gen_resolv_conf() { options) case ${value} in *edns0*) - edns0=yes + edns0=true ;; esac ;; esac echo "${line}" done - if [ "${localhost}" = "no" ] ; then + if ! $localhost4 && has_feature inet ; then echo "nameserver 127.0.0.1" fi - if [ "${edns0}" = "no" ] ; then + if ! $localhost6 && has_feature inet6 ; then + echo "nameserver ::1" + fi + if ! $edns0 ; then echo "options edns0" fi } @@ -261,6 +285,12 @@ gen_unbound_conf() { if [ "${use_tls}" = "yes" ] ; then echo " tls-cert-bundle: /etc/ssl/cert.pem" fi + if ! has_feature inet ; then + echo " do-ip4: no" + fi + if ! has_feature inet6 ; then + echo " do-ip6: no" + fi echo " so-sndbuf: 0" echo "" if [ -f "${forward_conf}" ] ; then From nobody Tue Jul 7 06:38:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlZ2spCz6l0xW for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlZ0Fvbz41xy for ; Tue, 07 Jul 2026 06:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7sVnxbsmI2cQSGazuiyCqRRPLTnTfBNFt4LMoyPLxxs=; b=hYX80HV04cUZbpLkyegwtaoV/mWxJoh9BqSwdeONmPQYS9HgLBpU0rJM+3eMmbCAZy6EM+ Sud5+Zw2shdr2EX6/j/3U8vFZo0krrh4YQFWdSdoTyW9GzGJmxNfsMCOLPTVeaNX9hebpf 8iP0crEE7PBzCWX3nZBSESAf5/1kyAMUYso0x3mGlR5HfUdZ/46UNYmUE8MitRJuSJZrDo hCVv72aIQVybDV3za46yFWx+abRtVehAwATUtGzW2s8xs8yT+lZ4UuBB1NJOJCGOMKDM7i /rJ2BgSH+YFvq1pD6TbtgjrD0ksrmNOwYi61qqH/dSERjahuPRX6Dnps5YgKvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406330; a=rsa-sha256; cv=none; b=H1BGCbIC6AgOy0NlZQlLJwNQ/kR0Uo5Mo2/qt4zVonqMjfbZV99XOIKEvpifGFCQ/dg4T+ PsMxwjc8Xnwc+l5DYzjrjN8Ry0spYKQMeIzSAYY1VzaDTJJ3c/8hKGgf3xV5l38qH5IWlF HBmzHk3e8wt1ttdh9jIq+hbktvP9Oejhc6ClZ7poQG/vzLOn0XhsVIH5gD6APgUI8g9uvp AfQ41zYfSqqU+Rc75sW9YQ39M2Lo3T8CNfK6fTuTnhC+vArzj31E6MI3fYJ36pv6Pwv30J QdJBCtJZhg0nq4JcJ9pGCIzfnT8wxEb493zAph7YSz4KwIvwJ+lO1v6LCuO5lg== 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=1783406330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7sVnxbsmI2cQSGazuiyCqRRPLTnTfBNFt4LMoyPLxxs=; b=xPHH0rKAp2YYrMjsQzxusPe8oIfrqzHjMqpWmthFogugZGchVwO+pIEdoXrEOSZkmBthTT uluXp6uNssY2jCfln5hCYET3RcnD/blmnBeUJuqgJx0EzPypeI5cdhDJPaIVWcCDPBOi3e caRAfWWdqBM9McOMPr0eKem7GajYqs38VfVR39iKSsv1OUUx81FIQnRuIfvSrZgmNpdYhw Js/05nYjbNqV9RW8PyL9OlkuWLIwJlDbtflqdroXIotkU1pJco+FRnogiJ2TeI6Gj1QrKi 49DYjjjWy7xMXmEgMXBCEd5PF3r+888kqGuS0utN8wcoRHJmtPijW4UL4db9Aw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlY6PWNz838 for ; Tue, 07 Jul 2026 06:38:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3741a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 4fff1e9f1076 - stable/15 - openresolv: Trim leading dot from domain name List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 4fff1e9f10766268a65aa9ba657bc070fc8dcf30 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:49 +0000 Message-Id: <6a4c9ef9.3741a.6fe8c40e@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4fff1e9f10766268a65aa9ba657bc070fc8dcf30 commit 4fff1e9f10766268a65aa9ba657bc070fc8dcf30 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-27 21:15:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:11 +0000 openresolv: Trim leading dot from domain name Merge upstream change d9f6b1a2d292 PR: 296305 MFC after: 1 week (cherry picked from commit 4b26ea54713941243b3a0d4263bebbf192ee68c7) --- contrib/openresolv/resolvconf.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/openresolv/resolvconf.in b/contrib/openresolv/resolvconf.in index 2f55a9de0eda..f6975cbec928 100644 --- a/contrib/openresolv/resolvconf.in +++ b/contrib/openresolv/resolvconf.in @@ -922,11 +922,14 @@ tolower() { # Strip any trailing dot from each name as a FQDN does not belong # in resolv.conf(5). +# Likewise, strip any leading dot from poorly configured routers +# as some sunscribers don't work with that. # While DNS is not case sensitive, our labels for building the zones # are, so ensure it's lower case. process_domain() { for word in $(tolower "$@"); do + word="${word#.}" printf "%s " "${word%.}" done printf "\n" From nobody Tue Jul 7 06:38:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlc5nb1z6l1D1 for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlc3fGgz421b for ; Tue, 07 Jul 2026 06:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Al16qh/obXzs+9JRcXLW2M5ZGLfV/QMAhto//JAH6hE=; b=r9IlMcoP4++bd+5t1+5YPJQCdprJltsBexqLz7yRG0iCJNz86hV8s/QadkwM7W7FJTcrhX 2rWpGGXK4URlbB7kgxsVXILZj/ZPt1RNqZ8sSKQaB+Tiy1bxJUlKPelHxIpnVZ1qD3L9hd d5EfUOHUsPFN6cL9Wc+yCq/yN2qAmzKhAIeTlag4p2EZH7nn3wHe6SZ3mZdOu9ZH+x5Tp7 sAGpFOK+6KSG+9zl9CPx4/08QR2CUKLOWHssJvMBYR0GSmyHUA3rQxNKec5znZNBLfdr0B 7NBvPwD9CF9Co9gpkgMauAyFqQ+RCwAR0rHrM/514N8d5RTrBONyYFv3bw2JjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406332; a=rsa-sha256; cv=none; b=i26htNfThwU8K0jA92ytPKjB58OV8GQf3/h3I075ixrSgnl7tGs8dU1vaw00I6VTPlZc1f ZiPyl0w5CYDuMg7tAAaW4TeicUED7Q80iZ36SDiGH6Bzwi7CVV6xshJQmCLsCIozxm+pEY l3fZNNdHRQkFbgYQhWRr0o8Bzu+6ccTc2bNE5drOXWuy/k+ceA8ehMeCy7XKItqEPpTSU2 bO0knIK9t/xdusjvSo+G2sV8+2jQ0MlItKzb/Id1LZ5OkdFEpoolQFeoHc6q5laMRGydWS HRmfH8rEoN6Dnt/RVGViG/MvMPff5cs6JO2PBIvWZxuGopkR2p20QCOg/CSqWg== 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=1783406332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Al16qh/obXzs+9JRcXLW2M5ZGLfV/QMAhto//JAH6hE=; b=sZi+1sX59lmnPa51DrqhM3xjdzB4SbYQKiaTXy9/zKqKjeTDemQ4niRMnMhdXLa0ITg6jI afjyeoADxF4nMGLFqY8qmSQHcZTTgzdEM8JvrhFcMcsOgRz9gscvz3QN5+tlqW/hisb2gT JOdUrWvNYnoW6pmPP4rypjtUart4f44guY43yVs7rgb4vnbAdzyFjJjz0oYk4fNF5Mc7KH X11rMdeBajhreYrhsGlFZjN1ib48Zc1fyMUFdQVbUqILx91KzVOiQcyXTVkHJXrQHjLz8i viDClSMEhUFU47KiisyZBx4AKX+RrF48M9oOeuLTv2YQjw5UUgGgFxO9xrsj/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlc11Lkz88p for ; Tue, 07 Jul 2026 06:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34938 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: ec02e4a80fc1 - stable/14 - rc.firewall: Use checkyesno for boolean variables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: ec02e4a80fc14c1bb69a5e71a004bbab87301991 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:52 +0000 Message-Id: <6a4c9efc.34938.48ee2c17@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ec02e4a80fc14c1bb69a5e71a004bbab87301991 commit ec02e4a80fc14c1bb69a5e71a004bbab87301991 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-26 14:38:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:16 +0000 rc.firewall: Use checkyesno for boolean variables Use the checkyesno function from rc.subr instead of hardcoded checks for boolean variables. Also drop an incorrect comment about the default logamount value; the actual default is zero (unlimited). MFC after: 1 week Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D57678 (cherry picked from commit a3c077c1ccbe57ffad6317879bc1e49291892414) --- libexec/rc/rc.firewall | 53 ++++++++++++++++++-------------------------------- 1 file changed, 19 insertions(+), 34 deletions(-) diff --git a/libexec/rc/rc.firewall b/libexec/rc/rc.firewall index e4fc8cc3db78..65bf1cc54f85 100644 --- a/libexec/rc/rc.firewall +++ b/libexec/rc/rc.firewall @@ -131,14 +131,11 @@ ipv6_available=$? ############ # Set quiet mode if requested # -case ${firewall_quiet} in -[Yy][Ee][Ss]) +if checkyesno firewall_quiet; then fwcmd="/sbin/ipfw -q" - ;; -*) +else fwcmd="/sbin/ipfw" - ;; -esac +fi ############ # Flush out the list before we begin. @@ -159,27 +156,19 @@ setup_ipv6_mandatory # case ${firewall_type} in [Oo][Pp][Ee][Nn]|[Cc][Ll][Ii][Ee][Nn][Tt]) - case ${natd_enable} in - [Yy][Ee][Ss]) - if [ -n "${natd_interface}" ]; then - ${fwcmd} add 50 divert natd ip4 from any to any via ${natd_interface} - fi - ;; - esac - case ${firewall_nat_enable} in - [Yy][Ee][Ss]) - if [ -n "${firewall_nat_interface}" ]; then - if echo "${firewall_nat_interface}" | \ + if [ -n "${natd_interface}" ] && checkyesno natd_enable; then + ${fwcmd} add 50 divert natd ip4 from any to any via ${natd_interface} + fi + if [ -n "${firewall_nat_interface}" ] && checkyesno firewall_nat_enable ; then + if echo "${firewall_nat_interface}" | \ grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then - firewall_nat_flags="ip ${firewall_nat_interface} ${firewall_nat_flags}" - else - firewall_nat_flags="if ${firewall_nat_interface} ${firewall_nat_flags}" - fi - ${fwcmd} nat 123 config log ${firewall_nat_flags} - ${fwcmd} add 50 nat 123 ip4 from any to any via ${firewall_nat_interface} + firewall_nat_flags="ip ${firewall_nat_interface} ${firewall_nat_flags}" + else + firewall_nat_flags="if ${firewall_nat_interface} ${firewall_nat_flags}" fi - ;; - esac + ${fwcmd} nat 123 config log ${firewall_nat_flags} + ${fwcmd} add 50 nat 123 ip4 from any to any via ${firewall_nat_interface} + fi esac ############ @@ -320,13 +309,9 @@ case ${firewall_type} in # translated by natd(8) would match the `deny' rule above. Similarly # an outgoing packet originated from it before being translated would # match the `deny' rule below. - case ${natd_enable} in - [Yy][Ee][Ss]) - if [ -n "${natd_interface}" ]; then - ${fwcmd} add divert natd ip4 from any to any via ${natd_interface} - fi - ;; - esac + if [ -n "${natd_interface}" ] && checkyesno natd_enable; then + ${fwcmd} add divert natd ip4 from any to any via ${natd_interface} + fi ${fwcmd} add deny all from "table($BAD_ADDR_TBL)" to any via ${oif} if [ -n "$inet6" ]; then @@ -533,8 +518,8 @@ case ${firewall_type} in # Deny and (if wanted) log the rest unconditionally. log="" - if [ ${firewall_logdeny:-x} = "YES" -o ${firewall_logdeny:-x} = "yes" ] ; then - log="log logamount 500" # The default of 100 is too low. + if checkyesno firewall_logdeny; then + log="log logamount 500" sysctl net.inet.ip.fw.verbose=1 >/dev/null fi ${fwcmd} add deny $log ip from any to any From nobody Tue Jul 7 06:38:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWld6gqyz6l19d for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWld2sPqz42Db for ; Tue, 07 Jul 2026 06:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LKuTVMZsfT8+j8sh2NMLPs0eAKKbtPV/HC+fue8hNFE=; b=jhKwcWqklPl8zRAELh1sMysP6JhQhNrdizZ60TpJv4Y8Q+pmEqpyLeEvncIEMGASkRB8Jo sIwsbc+Ao0C063bk34FLluBiMGbTBHam8nCWgTChD5KADbwnJenXI/GxFN1S3GEmg3bZ2+ w1eUMgrHawATjK75qdGY9k1/xcYuRqRthTbzyPehdRUbkAJkvyOOCBQVWY8rG5AMt1bHul IzR7UJp4wMRpMDzuvAcVOaltKrzNibPfsAbxX8xtY/A6D1faEO0i2Xm6pvy1OgoOnlbq/N qEOIuaOpGp+xtkRA2ftfqgp224gkc/LXSRaxuOeMZ6q1igtXCQkkebzD4205nA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406333; a=rsa-sha256; cv=none; b=hq71nc7g0VdI+swlkdCg0m5r98xj2AIzGfYufFH1uJC8xrwlfl/5aHH732BYkioMJhT4XQ wKe7kddJ7GEn36Z/Ov27kMXQc5T8BjG0w/1vO3MJpd83HyLQWKGAOI3wqVDFh32ffHD/WU 9zFHnyDwcaGO5/lxYWvf5KUqCeROdVG1XjtMxd67xIcMlATJQb9VVFNKnGd1+DaFy2sqIp EmS4iPaIRQP5iPLUI5tFSIKgE7bOi+GUTmhWWxpLRWvOVXkB1cryUpGdiJf/nhosKlFPfY /TybVWKtP4JzN+AVizSuzgleR/rLJcPifBjH+160oINT9kHLMhDmnNsXi60QLA== 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=1783406333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LKuTVMZsfT8+j8sh2NMLPs0eAKKbtPV/HC+fue8hNFE=; b=iTZ/j0dgZEobKu1aNhT9i6ziC3TIlPwisAG0CloH9HZ0O09pIljxlgjQ4pOQE+erwLPcaP KKt65N8jp6I9SZiVckI77qKr4AAlX6bd+7Rt1pvE1WDnaLIlQzdX8jtIrjjYyswFWLLFX2 jNPfpXVHrsp9q75FDBkUEHpSuPJfwm0zL1GMc0c6+N6ixdYDPkAWtJnh4qaiBufidDIZxa f/V8cJ0Tvqe22srJ09hUKYeW5LkQ4uvK4xQTX3/zCINhurygBrXMftpnYqSWHpF6F3qrPO obh9GCWwZjpLK1RPIi40LMgSuFKMYmU5X829+NYNews/ok3IxWcDZ5n0imVUtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWld1tvxz85d for ; Tue, 07 Jul 2026 06:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37701 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 10075baae2c1 - stable/14 - rc.firewall: Support on-disk lists List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 10075baae2c1151945bc13a478560e4d4a1aacf1 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:53 +0000 Message-Id: <6a4c9efd.37701.21a18b3@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=10075baae2c1151945bc13a478560e4d4a1aacf1 commit 10075baae2c1151945bc13a478560e4d4a1aacf1 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-26 14:38:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:16 +0000 rc.firewall: Support on-disk lists For firewall_allowservices and firewall_trusted, if an element of the list looks like an absolute path, read the file, skipping comments and blank lines, and treat the first word on each line as an address or subnet to be added to the list. We should probably be using tables instead, but this is still an improvement over the status quo ante. MFC after: 1 week Relnotes: yes Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D57679 (cherry picked from commit a71abf38e2b46c02965f3224c62bb6ef1971996e) --- libexec/rc/rc.conf | 11 +++++++---- libexec/rc/rc.firewall | 43 ++++++++++++++++++++++++++++++++----------- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 2fbd0c4280de..7797df17be81 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -189,11 +189,14 @@ firewall_simple_onet="192.0.2.0/28" # Outside network address for "simple" # for "simple" firewall. firewall_myservices="" # List of ports/protocols on which this host # offers services for "workstation" firewall. -firewall_allowservices="" # List of IPs which have access to +firewall_allowservices="" # List of IPs or subnets which have access to # $firewall_myservices for "workstation" - # firewall. -firewall_trusted="" # List of IPs which have full access to this - # host for "workstation" firewall. + # firewall, or of files containing lists of + # IPs or subnets, one per line. +firewall_trusted="" # List of IPs or subnets which have full access + # to this host for "workstation" firewall, or + # of files containing lists of IPs or subnets, + # one per line. firewall_logdeny="NO" # Set to YES to log default denied incoming # packets for "workstation" firewall. firewall_nologports="135-139,445 1026,1027 1433,1434" # List of TCP/UDP ports diff --git a/libexec/rc/rc.firewall b/libexec/rc/rc.firewall index 65bf1cc54f85..f3e1ea116522 100644 --- a/libexec/rc/rc.firewall +++ b/libexec/rc/rc.firewall @@ -406,10 +406,14 @@ case ${firewall_type} in # firewall_myservices: List of ports/protocols on which this # host offers services. # firewall_allowservices: List of IPv4 and/or IPv6 addresses - # that have access to - # $firewall_myservices. + # or subnets that have access to + # $firewall_myservices, or files + # containing such address or subnets, + # one per line. # firewall_trusted: List of IPv4 and/or IPv6 addresses - # that have full access to this host. + # or subnets that have full access to + # this host, or files containing such + # addresses or subnets, one per line. # Be very careful when setting this. # This option can seriously degrade # the level of protection provided by @@ -467,25 +471,33 @@ case ${firewall_type} in # workstation won't be a problem. # for i in ${firewall_allowservices} ; do + case $i in + /*) + grep '^[^#]' "$i" + ;; + *) + echo "$i" + ;; + esac + done | while read i _; do for j in ${firewall_myservices} ; do case $j in [0-9A-Za-z]*/[Pp][Rr][Oo][Tt][Oo]) ${fwcmd} add pass ${j%/[Pp][Rr][Oo][Tt][Oo]} from $i to me - ;; + ;; [0-9A-Za-z]*/[Tt][Cc][Pp]) ${fwcmd} add pass tcp from $i to me ${j%/[Tt][Cc][Pp]} - ;; + ;; [0-9A-Za-z]*/[Uu][Dd][Pp]) ${fwcmd} add pass udp from $i to me ${j%/[Uu][Dd][Pp]} - ;; + ;; *[0-9A-Za-z]) - echo "Consider using ${j}/tcp in firewall_myservices." \ - > /dev/stderr + echo "Consider using ${j}/tcp in firewall_myservices." >&2 ${fwcmd} add pass tcp from $i to me $j - ;; + ;; *) - echo "Invalid port in firewall_myservices: $j" > /dev/stderr - ;; + echo "Invalid port in firewall_myservices: $j" >&2 + ;; esac done done @@ -494,6 +506,15 @@ case ${firewall_type} in # Playing with the content of firewall_trusted could seriously # degrade the level of protection provided by the firewall. for i in ${firewall_trusted} ; do + case $i in + /*) + grep '^[^#]' "$i" + ;; + *) + echo "$i" + ;; + esac + done | while read i _ ; do ${fwcmd} add pass ip from $i to me done From nobody Tue Jul 7 06:38:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlf6J3lz6l0xg for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlf418Dz41w1 for ; Tue, 07 Jul 2026 06:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oze6MFeqtzDpesDJOAmQC/OivHORFcCqxcBjaHFLJGI=; b=bN9iCieHkN3oPL/JNRZSzQKptYzJ4mDD/bkdWIDqU+nSouN2/So3PIP66Ko8qzAUB/mJTo iGQ9Ff+HFprgB6VBH+wBfIAWIriUxkSSq8gmQbQFfS18tIVijAW5evAm4c7F9V4fCpEcgj 3Bx5WXWf3VO25z2N2Dah2FnttEK5KLWz6gAfl9/1p4xlEzBr5kGBQ+tghPsAS3UjeQSXvz Pdda5QevAjVSRLL1mxAwd3Da2w3IHhq1ufIjVT4nqPVyLCGZnUW7cFwda+ufMaBD3y0enc KSZSRxr3HTFqkF6PAyGCR+19EL7yxuu+ALa2BDlim++0VE4GHRDreHUKwJfLdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406334; a=rsa-sha256; cv=none; b=efPVhBM1VDjfnWS4v5j9dlA8DNjgb3xt4z4+m3FYfU9Ra+4KMXOoQyNmvlkwXqnZtlHW5i C0Z3bM9A5AKNA5qq2gumL+zDE4HYzuiEfO3URxLPJC2oVeLP6ywBRgMir3Csim98Xt+YKm MLSQFMYahPlP5qB955ij0ZQqmfLZ11PSABfwNzkI/j84SDtxL21eSdwF2WluAMZVpSwhqd lzyHQh/NGBvlfj7CWp1XhdclTyE4A1PoP7Lv/TN5rz1lSDD2pNHslyzObrjtW2w9Yz/aK+ lkFQiO14C9lEKVxf5dvYCVMdW7o5bq8xs05sY+INp0SNNIfMFPG1zwx8Un3XDQ== 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=1783406334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oze6MFeqtzDpesDJOAmQC/OivHORFcCqxcBjaHFLJGI=; b=m2vbRKrYsUKF/GKRFN5Ss644E7bvb45G+o7KT7n3s8C6UiVdLczizvsRfP8f9NIsdkMtav piyNHGkr6TEvVYA+O+X0EMXsTEV8R/H0IT9bL0KmvrcVXpAkv7TLW3xni5E17q2mUbeQ3F czkxmjoFdFVDrsR7ZKUYYISyJXbc619FhyIhLu3Fu5rS3mdv/Ehjx2F54uaTLzp+CKsGau RbUKWEB+8eAnhhZbjjl2qo1LZaazoiwloo0X+mKqnfvLwPVYV4UYEtMibCfHddQmt7FtkL 2z+fK5/I5W1bX7o34VibQfopDSooB+VmpIKAeND/CC38tX58QXmQrwHnNuyiPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlf2lRTz86Y for ; Tue, 07 Jul 2026 06:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36c14 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 25a3e5046ebd - stable/14 - rc.d/ddb: Really silently exit List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 25a3e5046ebd82c5d0857f73b35ab720be6290a0 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:54 +0000 Message-Id: <6a4c9efe.36c14.16cc8805@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=25a3e5046ebd82c5d0857f73b35ab720be6290a0 commit 25a3e5046ebd82c5d0857f73b35ab720be6290a0 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-26 14:38:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:16 +0000 rc.d/ddb: Really silently exit The comment says “silently exit if ddb is not enabled”, but we'd exit with an error message. Note that I switched the sysctl variable used to test for the presence of ddb from debug.ddb.scripting.scripts to d.d.s.script, which has a smaller value if set. While here, drop a pointless fork-exec, and use ${SYSCTL_N} for consistency. PR: 177217 MFC after: 1 week Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D57686 (cherry picked from commit b0d3a2889a1b8e4b73ad1f396884224e1442b214) --- libexec/rc/rc.d/ddb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/ddb b/libexec/rc/rc.d/ddb index 40235bebf90e..cbd821fa522f 100755 --- a/libexec/rc/rc.d/ddb +++ b/libexec/rc/rc.d/ddb @@ -20,8 +20,8 @@ stop_cmd=":" ddb_prestart() { # Silently exit if ddb is not enabled - if [ -z "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then - return 1 + if ! ${SYSCTL_N} -q debug.ddb.scripting.script >/dev/null; then + exit 1 fi } From nobody Tue Jul 7 06:38:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlh2HsJz6l117 for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlg4RjGz42F1 for ; Tue, 07 Jul 2026 06:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PHvqpFlj9k4LsFYjE9vDK7leRK14xdgDoHlxh2wNQO0=; b=o2FIygj/AKCNiUNrGEYZkf49qwO+dqbstIqTwqqThrboAw4VuxwpYjLXLJaIzn9d9dSvn/ IgC27c4cwHlsh5bsyptl52NenLjp+S4B7j2d/UqviX8fAxB8XKjyHPQkJvVtrUMb0lQDCG BO/IE2A8DNzv1iTiMm7zlITkQuaFWEtqggzRg/imsj9LpFbuFj1PVROddWhGfWelbEI1l7 GiT65mZkRGI86n6RUDotmrtKny7L2bJ63kwRm0zm88ZrAnjh51FMyrVxi90qpKD+eb8lZ2 xnqxrv7H5DdMNlsOH/IVI7YYtdU1tQ9h1zqw9lOePvB7M+osXxgtg2Hv3vfg2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406335; a=rsa-sha256; cv=none; b=XNF0D/cITl+EvnO2cc5lK6Ec/lCCGfqnKGyRqyTc7dP05pXxTHExpoV4JVZeJkcBkfs6TU fn3R8uS49OpqSza8na6rVA/NXlOsLWL+HcKVzJjRYC0OXNy4Ve+JLEge52Ep65dD2XrTdt 3Py0CFSqgl/DQwhkVg8Ng9rl9Zo/5A2+Hkomora26ZfBb7B8kPwA/0nnR+oi6uMucikcXZ X5tfaPU1p2MXdMMq01+XymIqczPKoYV8sbsdtdk2vZvLZIFSDyCfXEJFmaABIH63hVT5Cb Tpuyebt+lBws1SAZCabDH4+WqNC5MUDprD9LHtDWPBitEd+6OBNRsEQeh3FneA== 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=1783406335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PHvqpFlj9k4LsFYjE9vDK7leRK14xdgDoHlxh2wNQO0=; b=f0OgzHWFKOhymlFIaOFsx2k2MjtPqP1E0lc6XFv8D/2tMI7u4FJdoVjel+2X+J//7fDVvW lxmZwGe+7QHiS9mmh6xWrOdYZBklB8P9J09FxR2oYdfz4yFLllkfBSJT11QReWPgeAmBju 0sDnfU7f7v11cZnoS8NLkx+qyy+kUcybyvvpXjKvqjqY6iJkVBOQRahSyeSMfT/tJba2Y3 WLs7oGPQCWHuiPh6onhS9Xf5vqnk3z9j+AlSTZN2zkELY19CK/Hj74qY0/iG8AWI4TuESn 57frsPAvk9SaVQuswNcgF8SUefabnz1WKKXAEp8zriUaN7dQyiLkYu49TIZCPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlg3L1Qz7vg for ; Tue, 07 Jul 2026 06:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32afb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 546b45645237 - stable/14 - rc.d/tmp: Fix dupe mount check List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 546b456452375dd27f10e6f7a3b39f6bc7254409 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:55 +0000 Message-Id: <6a4c9eff.32afb.66c2a23b@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=546b456452375dd27f10e6f7a3b39f6bc7254409 commit 546b456452375dd27f10e6f7a3b39f6bc7254409 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-26 14:39:03 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:16 +0000 rc.d/tmp: Fix dupe mount check Before mounting a new mfs on /tmp, we check if there already is one. However, the dupe check only takes /dev/md[0-9]* into account, while the default mfs type these days is tmpfs. Rewrite it to look for tmpfs as well. Note that the dupe check is redundant in the tmpmfs=auto case, but we leave moving it for later. PR: 182035 MFC after: 1 week Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D57682 (cherry picked from commit 45efa4e61623e3eeee7fd0a3f4436616e24c8e98) --- libexec/rc/rc.d/tmp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp index bde1ba257c2c..5b46f96314a2 100755 --- a/libexec/rc/rc.d/tmp +++ b/libexec/rc/rc.d/tmp @@ -39,10 +39,15 @@ load_rc_config $name mount_tmpmfs() { - while read line; do - case $line in - /dev/md[0-9]*\ /tmp) - return;; + while read _dev _ _ _ _ _mp; do + case ${_mp} in + /tmp) + case ${_dev} in + tmpfs|/dev/md[0-9]*) + return 0 + ;; + esac + ;; esac done <<*EOF $(df /tmp) From nobody Tue Jul 7 06:38:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlj0KMyz6l13d for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlh5lYBz42F8 for ; Tue, 07 Jul 2026 06:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ydHGA6gwmAA/aSFASSEjrctI2Fe9td3qY7X3/wLi8JE=; b=DmfEgPKPG3mNmuh5i1n6UGhG8VBZZ5tIa/wkzOX+qNlwHbI98xDJ98EMWeBuOh7FCMhy0L Z+WGdEYEos+rBBtmhc2v2+C3HSQXzCBAqymn74fNRQrIr+JCTdkq4fOuhVad5CiJgdalLK LbUgLmMAD91Ca7HqvdPAHBi5coBvOeWOjDktPlt3tsc117D6pcnlqP5ylbRMT5qi7WMX4E 7L+bJx7ZE6OXuXxRzDmzC3Myn6RD3lg+29qez88uaywMhr8I1v++yfcCdqtShMRUE3tdKC aqRxC6k9u3+1QMfVC7mozzStM4YH0lEJvQpf485Lk8ozOTn4+ya8bRIZcQN32A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406336; a=rsa-sha256; cv=none; b=Bbw2WvgW/AW0EW8y2tV3+L6DGd7xBt1vxIS6G1SzZwD02bSnxbHQHhYZX7tSWUl5avJYYb 2iX/npcrOjFx6XL+YH9/G6hg0b6hfdaOqthEuE3QkTVs7df6U0lZVWHjgjlw1kKcU2z7Nt mWp34mDUdLL/Xoi6UhPjvuQs9imUS0mOvtBuqNpqb7x6oX+1bfO4Gx6qLW9bOp7LHyPtSs +8m8dBji61MSdzidmeJQm0KhfRNRiTscX2hHQ4owIqk6hexbqefB+TMkcX3GlpLjke7Lzr L4PfpFb2Ke168U10eKLQidO+6rjcc8EDN3xzhyl2KdpJNQoxVWdm3iC2nG8TEg== 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=1783406336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ydHGA6gwmAA/aSFASSEjrctI2Fe9td3qY7X3/wLi8JE=; b=dm6fXSIFrmi2HWk/KgAggmtGTSsHRSzjit9Sbf+WSPRCnUJ/suCqTPtoaqmC/NMHHEqQ+6 KrZMnXYXBnvEFYH17+KcuLhmujbHuAvzTA/BnX0Geg0eh3pn5aEDFLNjQNq13AFFysq5Gg daE5SzFZv7ORQzFvJLfjN6Wa6cuBhHrUKl4frbXinpNtvMYe9HkR3xCjKOrVttgMtXkMET 03oR3C4dTj1DxsIZepKQwZJ0PXWTUxKf84Q9T/6z++M8nnk3fe/j+KM5u5TIWMg0FDPeby hAbpD+GoFpIJSalIqGRa6t7Zaxlf18uj6tZjku0TwYIAjJjjiPaveW8h/1WSBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlh4Dlgz85g for ; Tue, 07 Jul 2026 06:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 370fd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 973d1f2b12ab - stable/14 - local-unbound-setup: Support IPv6-only systems List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 973d1f2b12aba78d153095640820e865c1d112e1 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:56 +0000 Message-Id: <6a4c9f00.370fd.61510526@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=973d1f2b12aba78d153095640820e865c1d112e1 commit 973d1f2b12aba78d153095640820e865c1d112e1 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-26 14:43:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:16 +0000 local-unbound-setup: Support IPv6-only systems * In the server configuration, disable protocols not supported by the kernel. * In resolv.conf, instead of only using 127.0.0.1, use either 127.0.0.1, ::1, or both depending on which protocols the kernel supports. MFC after: 1 week Reviewed by: jlduran Differential Revision: https://reviews.freebsd.org/D57840 (cherry picked from commit f0a861efbafeb81428d5e8c23dac9da73fe14007) --- usr.sbin/unbound/setup/local-unbound-setup.sh | 50 +++++++++++++++++++++------ 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh index c15ce96e1cfe..e7c35db44141 100755 --- a/usr.sbin/unbound/setup/local-unbound-setup.sh +++ b/usr.sbin/unbound/setup/local-unbound-setup.sh @@ -72,6 +72,19 @@ RE_forward_addr="((${RE_ipv4}|${RE_ipv6})(@${RE_port})?)" RE_forward_name="(${RE_dnsname}(@${RE_port})?)" RE_forward_tls="(${RE_forward_addr}(#${RE_dnsname})?)" +# +# Check if a kernel feature is available +# +has_feature() { + local name=$1 v + eval "v=\$kern_features_${name}" + if [ -z "$v" ] ; then + v="$(sysctl -qn "kern.features.${name}")" + eval "kern_features_${name}=$((v))" + fi + return $((!v)) +} + # # Set default values for unset configuration variables. # @@ -136,13 +149,12 @@ get_nameservers() { # # Scan through /etc/resolv.conf looking for uncommented nameserver -# lines. Comment out any that don't point to localhost. Finally, -# append a nameserver line that points to localhost, if there wasn't -# one already, and enable the edns0 option. +# lines and comment out any that don't point to localhost. Finally, +# append the correct nameserver lines and enable the edns0 option. # gen_resolv_conf() { - local localhost=no - local edns0=no + local localhost4=false localhost6=false + local edns0=false while read line ; do local bareline=${line%%\#*} local key=${bareline%%[[:space:]]*} @@ -150,8 +162,17 @@ gen_resolv_conf() { case ${key} in nameserver) case ${value} in - 127.0.0.1|::1|localhost|localhost.*) - localhost=yes + 127.0.0.1) + localhost4=true + if ! has_feature inet ; then + continue + fi + ;; + ::1) + localhost6=true + if ! has_feature inet6 ; then + continue + fi ;; *) echo -n "# " @@ -161,17 +182,20 @@ gen_resolv_conf() { options) case ${value} in *edns0*) - edns0=yes + edns0=true ;; esac ;; esac echo "${line}" done - if [ "${localhost}" = "no" ] ; then + if ! $localhost4 && has_feature inet ; then echo "nameserver 127.0.0.1" fi - if [ "${edns0}" = "no" ] ; then + if ! $localhost6 && has_feature inet6 ; then + echo "nameserver ::1" + fi + if ! $edns0 ; then echo "options edns0" fi } @@ -261,6 +285,12 @@ gen_unbound_conf() { if [ "${use_tls}" = "yes" ] ; then echo " tls-system-cert: yes" fi + if ! has_feature inet ; then + echo " do-ip4: no" + fi + if ! has_feature inet6 ; then + echo " do-ip6: no" + fi echo " so-sndbuf: 0" echo "" if [ -f "${forward_conf}" ] ; then From nobody Tue Jul 7 06:38:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlk15Gpz6l17P for ; Tue, 07 Jul 2026 06:38: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvWlj5wyTz428w for ; Tue, 07 Jul 2026 06:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783406337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JZLVCo5Ml86HD4YgAbXbNa1BL6sjdaxtEiEZyt33r4A=; b=nHCFQB4gzGOfw2e7QUrmJMrEMXPRxLPVH3i5rMTrowSbnlTe7/f6/o+Z73DHqDK1SG3smX qkKtCm3PY7h6naWG5M7vh5q2UKpcVPvFzaNae54cpjZdOO8qY/TM4AYX1sTgdSGXrGVkNs vVrJguJlMDD8g5CYzwBjJ9aVJLReI1tl9HM+z6QyI/Hfto6f6zUzj08ZPZI3g2JXpEiPHK njUnJXZqfUcUVMPCCzb5RzumKIMC2mpm6WDXlnyuCrUv5FE2sa4Prm4EaWLZCOsmqdcwNr 8PauXwPl9xKXpJl2eH9871ISXPN3EgcQmuEVuv+1y6fV3X4mKh9hMf3UcFDzKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783406337; a=rsa-sha256; cv=none; b=mrSk3uorLDCDrEoZ8t4EH6auqMnsgaz//w/rKhxmyN4m5sZoO4DPJtnFaaMqirRpiYdsnt UsRj2Qox1SW8bYUKb/YYSd+tuLoZzfClLd4cnoEEGVBuCEjG2avQDyt1iL1m7tCxgXNnUD YXCofORjlOkCc8O9RlV6gs8Eg+/QTAHeIHus71KRkBncXIiQX4wtgJ7zfyw2sKkCZOyW21 zt+xCnmQlGFx+0Um6A0kxt178g4gzh5TZA+lYLXyuSejk/ySWHwoDE5T/+UHzW1TIcXFr9 k+JcKHIKAX19iwngyIe+I2EqesH4REP6ro8dfqERqpVbAkOITJrCUtxoG1QFDA== 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=1783406337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JZLVCo5Ml86HD4YgAbXbNa1BL6sjdaxtEiEZyt33r4A=; b=eSpAVYt4SpKybEAsGjIQK4aANa6S/CsJtwMycJ1fe0X/wv4T+qnrzGBXtpmELxkYvl+2Zc ZN3DhWo0j3XgLUFj+8A0kChXZ3SNgmzBiOL9EF9ATY6sOH6YI//E4v81EG0m+gU0CUNGqH ZvilNYoSbSbpdNu+PXbjCW63pxx87H0/X6LTi8naiQ1BCw4l41TZfwP0TeECrFEoYtNnFz YXdVD0FlM6yNR8LFayN/+3OdXf/u1mr0VGWLYNqBr8h85uwhUYybJv1XLNNNIYETQXbmet SWOBPRef8GOTUmi1fLbhK+/+iL/nlH+H6lCqcWWCFwGt2leY/3GPE1MISBgtEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvWlj4zRzz88r for ; Tue, 07 Jul 2026 06:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37800 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 06:38:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: aad298c8f9ca - stable/14 - openresolv: Trim leading dot from domain name List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: aad298c8f9cabe53379bea59ce075f2eb0c93898 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 06:38:57 +0000 Message-Id: <6a4c9f01.37800.6e68d77d@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=aad298c8f9cabe53379bea59ce075f2eb0c93898 commit aad298c8f9cabe53379bea59ce075f2eb0c93898 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-27 21:15:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 06:38:17 +0000 openresolv: Trim leading dot from domain name Merge upstream change d9f6b1a2d292 PR: 296305 MFC after: 1 week (cherry picked from commit 4b26ea54713941243b3a0d4263bebbf192ee68c7) --- contrib/openresolv/resolvconf.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/openresolv/resolvconf.in b/contrib/openresolv/resolvconf.in index 2f55a9de0eda..f6975cbec928 100644 --- a/contrib/openresolv/resolvconf.in +++ b/contrib/openresolv/resolvconf.in @@ -922,11 +922,14 @@ tolower() { # Strip any trailing dot from each name as a FQDN does not belong # in resolv.conf(5). +# Likewise, strip any leading dot from poorly configured routers +# as some sunscribers don't work with that. # While DNS is not case sensitive, our labels for building the zones # are, so ensure it's lower case. process_domain() { for word in $(tolower "$@"); do + word="${word#.}" printf "%s " "${word%.}" done printf "\n" From nobody Tue Jul 7 20:57:47 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvtph0w92z6kShT for ; Tue, 07 Jul 2026 20:57: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvtph0SHfz3lts for ; Tue, 07 Jul 2026 20:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783457868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1YBtaFHC6gAihc9misiTB23cteNiWJMJ7E1l25blyOk=; b=Rw6z8E7NwdESsLyT+3E2UoCRWsYY6BRPbl9/rVyaXnieJ4y7RkyLDcz5AgQHZHztNoZRVy 64vw0+Cgovu11zQx/xsQg4SND0tspW7Xw636ZgCi5n+2Ox/xJwGv9QXyrWuzCIQLEYiRKl DkN6FYEGUam7OyL7l9Arsz6nJTqZt6yurZGmm2JoAlU6I7l+TMyWyfe/SSgq8wKernflmY 0kim9TqFtm9jqhlTddeUvo2nAbtCGaxSwVHsCKfG+pF4NOTEbzUlY3zTrKR1DFLPUoKHO/ 153Z1k3ipwowtcnjSDnfb3wg12PjXlstqEIMLY+juSe+IZ4L6DKC/IXdTQFtjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783457868; a=rsa-sha256; cv=none; b=av9PA6M+SX8zd0OMlDW5aSIi1z4gcDmfjzGy1c11BPdTl8XPTlerHsJ4ZNLHfIUZY/XIrx qgLbzLuoQxd1ZfQNWVPIFsUpIiAv7zKQl0Zyh3AlxAveWZLDrhVlnIX1PmJN7Mc8wdtmit ZxAFJTqSitGaXglGyZWxQFPCGdwPR3CLrDhS2H6MoWGy0qfnuNZIb8/88BVjJK7h/oNcgS Ten2OV2/OonztfC6HLo6BEtHKsqNb5oHjmucR8X+U3ce+Nq6Xr7ilzRDpfSf9iBiCAeVSQ xcfKcqUgPrccfrIVegpXSpEbCX5HyLeehFGHk0FtLN670A1pQvRsHKzIkt8YTQ== 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=1783457868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1YBtaFHC6gAihc9misiTB23cteNiWJMJ7E1l25blyOk=; b=Rtz3o8mF1w+NPDl6QDZmRElcmsAbSSwx6TuEOQyJErEhN+LZ+6WmL3Lh9J1KZSEe+isCag K16QXcHao3lhz+N6eR+Im8ePw8h9svYAqgbjJVsMKIcGVSJJaeUY2oa1h+/euNgkM1ZuzQ CfuqUUg5f0RazIL9USKWP3LWreSqy8N7OyxIZeooOqAJxJd7Ru+H4ExlvUorEqf0UUFaWL FH94cEEe9GPkTA8d7jj4iHOkseNwXggJEdt4x1BnrxN+hay9z1+x5e/MBYHncWVzagwxRa fuFr02bhbrOr+GbQF723DHoJAJhRGHEOxhNEhcOeksQsM5jMpvXf0Oy9AKZcmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpg6JP6zrsJ for ; Tue, 07 Jul 2026 20:57:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 472f4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 20:57:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 8adf49dac1a9 - stable/15 - tests: Fix race condition in aslr_setuid List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 8adf49dac1a937c9a8dc6937d6d23af14df7597a Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 20:57:47 +0000 Message-Id: <6a4d684b.472f4.78c6cda6@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8adf49dac1a937c9a8dc6937d6d23af14df7597a commit 8adf49dac1a937c9a8dc6937d6d23af14df7597a Author: Dag-Erling Smørgrav AuthorDate: 2026-06-22 13:23:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 07:06:55 +0000 tests: Fix race condition in aslr_setuid Use a cloexec pipe to block the parent until the child is ready. While here, redirect the output from ping to /dev/null, and mark the test as requiring the inet feature since we ping the IPv4 loopback. PR: 296116 MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57734 (cherry picked from commit 080a4087014e1d19136cc77028019d98b5c69e1e) tests: Fix race condition in aslr_setuid, take 2 Instead of a cloexec pipe, ingest ping's stdout and block until it has printed its initial summary, then close the pipe and return to the main test loop. Run ping in quiet mode so it won't mind that stdout is gone. PR: 296116 MFC after: 1 week Fixes: 080a4087014e ("tests: Fix race condition in aslr_setuid") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57763 (cherry picked from commit 86950cf9ffe89b7978fca019019692b3ea492044) --- tests/sys/kern/Makefile | 1 + tests/sys/kern/aslr.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 03aca4f19a56..ab68fbf11a6e 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -94,6 +94,7 @@ PROGS+= coredump_phnum_helper PROGS+= pdeathsig_helper PROGS+= sendfile_helper +CFLAGS.aslr+= -I${SRCTOP}/tests LIBADD.aslr+= util LIBADD.copy_file_range+= md LIBADD.jail_lookup_root+= jail util diff --git a/tests/sys/kern/aslr.c b/tests/sys/kern/aslr.c index 13038054603c..966ea5c3b83a 100644 --- a/tests/sys/kern/aslr.c +++ b/tests/sys/kern/aslr.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -19,6 +20,7 @@ #include #include +#include "freebsd_test_suite/macros.h" /* * Spawn an unprivileged child with ASLR force-disabled, which then execs @@ -27,19 +29,22 @@ static pid_t spawn_ping(const atf_tc_t *tc) { + char line[64]; const char *user; struct passwd *passwd; pid_t child; - int arg, error; + int arg, error, io[2]; user = atf_tc_get_config_var(tc, "unprivileged_user"); passwd = getpwnam(user); ATF_REQUIRE(passwd != NULL); + ATF_REQUIRE(pipe2(io, O_CLOEXEC) == 0); child = fork(); ATF_REQUIRE(child >= 0); if (child == 0) { - if (seteuid(passwd->pw_uid) != 0) + if (dup2(io[1], STDOUT_FILENO) != STDOUT_FILENO || + seteuid(passwd->pw_uid) != 0) _exit(1); arg = PROC_ASLR_FORCE_DISABLE; @@ -47,10 +52,12 @@ spawn_ping(const atf_tc_t *tc) if (error != 0) _exit(2); - execl("/sbin/ping", "ping", "127.0.0.1", NULL); + execl("/sbin/ping", "ping", "-q", "127.0.0.1", NULL); _exit(127); } - usleep(500000); /* XXX-MJ */ + ATF_REQUIRE(close(io[1]) == 0); + ATF_REQUIRE(read(io[0], line, sizeof(line)) > 0); + ATF_REQUIRE(close(io[0]) == 0); return (child); } @@ -98,6 +105,7 @@ ATF_TC_BODY(aslr_setuid, tc) pid_t child, pid; int arg, error, st; + ATF_REQUIRE_FEATURE("inet"); if (!atf_tc_has_config_var(tc, "unprivileged_user")) atf_tc_skip("unprivileged_user not set"); From nobody Tue Jul 7 20:57:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpj6QGwz6kShY for ; Tue, 07 Jul 2026 20:57: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvtpj3HYPz3m0h for ; Tue, 07 Jul 2026 20:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783457869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OEZxlBH+ULycAWYprJgScE67GmgoX6N5C0V3SeZJaCo=; b=DXePKpyFUCfEz3ENZy3opju1GzVa90JMmXDCSbCVQwQnL4yvZBLjYb11tzeCv2wzZQ7UyH IbBnjZQULyorNVUMpqy7DzTiUa7jV/aJHjERXlc0tdCutEMGZbV17M1fIfV5fHBkozObgK Nj///4ub1XlM6fapH/7M7h0USZC6jrkc4BgcvS7kCcomTr6iJWQx0KW1UR6mo5AfOh4lnW HDVTNAUk8FrnUWzUtdT69Ij5+lXC2fzDJlwMj+ArFXjEoH73fZbCOWawTnMs2d37zq9P6e jKQTV8ki5wQgt+G0oMKODy+Emq8NpPIniyZ/KY2r/eWO3gSd9q5DluNmPy/4pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783457869; a=rsa-sha256; cv=none; b=PxldrZc8BxkiDHxN/om3Thl/jAx+x4SIKwaoB97zjlOJHAZS7e440MiLmbzUkfScck36mx jG7qVHm+Vdb/irkBllFroW1BT7Rw1Jmg5F8RJa/gHU3vuKCv+az2aDVgqrwkwr+kCPyTxE wZ5hpGOvl/dCa1mDm68d3hOwiMBa5AIj9dbyo9WRJjjiDdUW+/UcceVfaQ5CSpi/nS4OoG I3iTQgBmfQ0oJx4zVnidFYyiX/yT7hwQZRo/jJXfuJbq0pB94sR/uYRSFW74oBNo+zmwqZ HN1Mj+DO+r267HqxEiYOFOEikdvJ/f9qJeSVZG5qCXS1rFn87FwlPCWs78t45w== 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=1783457869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OEZxlBH+ULycAWYprJgScE67GmgoX6N5C0V3SeZJaCo=; b=AEKoKaMP/kwD4wJAWqAzKDTxBys+eJVvRiu/KuRalDcc3POYK5diKZDAkjW0kGG0aQp4/H AzFuS9PD5XLol0BrKmQwGXt8bLAVLDg3GAzkrRYXSEyZZ4FgpwsLkZGkbW0q8kGflwCINq TnMISNh3QHaac7kVN44Q/twaBB92Tc3IWLMkAsqsG4w9L0cSAx91Ov27RT55OKWjAh5SbZ MQhHPInwfGgH4qP8oWAz3vgQdeGBWVh+QrmS2yGZaNsIjbMC/9DvDHCd+L0997XY1bE4TS OLV/yt3ZGFW+WGcS66OrxI7E0FpN+KO/6T8pCNjjsclMhvs31mi64KTf9Sm5Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpj03rfzrPY for ; Tue, 07 Jul 2026 20:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47ab4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 20:57:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: dcb2c375221a - stable/15 - ping: Flush stdout after printing initial status List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: dcb2c375221a8d15543c8caa93634c403939e8db Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 20:57:49 +0000 Message-Id: <6a4d684d.47ab4.5fea0698@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dcb2c375221a8d15543c8caa93634c403939e8db commit dcb2c375221a8d15543c8caa93634c403939e8db Author: Dag-Erling Smørgrav AuthorDate: 2026-06-23 15:20:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 07:07:01 +0000 ping: Flush stdout after printing initial status MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57765 (cherry picked from commit 141bb8579882f9d1f7e95351573e30f10689f4bf) ping: Don't mix stdio and direct writes POSIX does not allow mixing direct writes to STDOUT_FILENO with stdio operations on stdout like we do here. More importantly, it causes tests to fail randomly (or not-so-randomly after I added an fflush in a previous commit). MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57884 (cherry picked from commit 8bda488114f330d758e6741ff44882bb12b76c0d) --- sbin/ping/ping.c | 27 +++++++++++++++++---------- sbin/ping/ping6.c | 28 ++++++++++++++++++---------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index d10e3c85c9bd..3fa21760447f 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -829,7 +829,6 @@ ping(int argc, char *const *argv) sweepmin, sweepmax); else (void)printf(": %d data bytes\n", datalen); - } else { if (sweepmax) (void)printf("PING %s: (%d ... %d) data bytes\n", @@ -837,6 +836,7 @@ ping(int argc, char *const *argv) else (void)printf("PING %s: %d data bytes\n", hostname, datalen); } + (void)fflush(stdout); /* * Use sigaction() instead of signal() to get unambiguous semantics, @@ -982,8 +982,10 @@ ping(int argc, char *const *argv) (void)clock_gettime(CLOCK_MONOTONIC, &last); if (ntransmitted - nreceived - 1 > nmissedmax) { nmissedmax = ntransmitted - nreceived - 1; - if (options & F_MISSED) - (void)write(STDOUT_FILENO, &BBELL, 1); + if (options & F_MISSED) { + (void)putc(BBELL, stdout); + (void)fflush(stdout); + } } } } @@ -1077,8 +1079,10 @@ pinger(void) } ntransmitted++; sntransmitted++; - if (!(options & F_QUIET) && options & F_DOT) - (void)write(STDOUT_FILENO, &DOT[DOTidx++ % DOTlen], 1); + if (!(options & F_QUIET) && options & F_DOT) { + (void)putc(DOT[DOTidx++ % DOTlen], stdout); + (void)fflush(stdout); + } } /* @@ -1200,9 +1204,10 @@ pr_pack(char *buf, ssize_t cc, struct sockaddr_in *from, struct timespec *tv) return; } - if (options & F_DOT) - (void)write(STDOUT_FILENO, &BSPACE, 1); - else { + if (options & F_DOT) { + (void)putc(BSPACE, stdout); + (void)fflush(stdout); + } else { (void)printf("%zd bytes from %s: icmp_seq=%u", cc, pr_addr(from->sin_addr), seq); (void)printf(" ttl=%d", ip.ip_ttl); @@ -1210,8 +1215,10 @@ pr_pack(char *buf, ssize_t cc, struct sockaddr_in *from, struct timespec *tv) (void)printf(" time=%.3f ms", triptime); if (dupflag) (void)printf(" (DUP!)"); - if (options & F_AUDIBLE) - (void)write(STDOUT_FILENO, &BBELL, 1); + if (options & F_AUDIBLE) { + (void)putc(BBELL, stdout); + (void)fflush(stdout); + } if (options & F_MASK) { /* Just prentend this cast isn't ugly */ (void)printf(" mask=%s", diff --git a/sbin/ping/ping6.c b/sbin/ping/ping6.c index f81de062e59a..1cebcee8cc36 100644 --- a/sbin/ping/ping6.c +++ b/sbin/ping/ping6.c @@ -1111,6 +1111,7 @@ ping6(int argc, char *argv[]) (unsigned long)(pingerlen() - 8)); printf("%s --> ", pr_addr((struct sockaddr *)&src, sizeof(src))); printf("%s\n", pr_addr((struct sockaddr *)&dst, sizeof(dst))); + fflush(stdout); if (preload == 0) pinger(); @@ -1237,8 +1238,10 @@ ping6(int argc, char *argv[]) clock_gettime(CLOCK_MONOTONIC, &last); if (ntransmitted - nreceived - 1 > nmissedmax) { nmissedmax = ntransmitted - nreceived - 1; - if (options & F_MISSED) - (void)write(STDOUT_FILENO, &BBELL, 1); + if (options & F_MISSED) { + (void)putc(BBELL, stdout); + (void)fflush(stdout); + } } } } @@ -1414,8 +1417,10 @@ pinger(void) (void)printf("ping: wrote %s %d chars, ret=%d\n", hostname, cc, i); } - if (!(options & F_QUIET) && options & F_DOT) - (void)write(STDOUT_FILENO, &DOT[DOTidx++ % DOTlen], 1); + if (!(options & F_QUIET) && options & F_DOT) { + (void)putc(DOT[DOTidx++ % DOTlen], stdout); + (void)fflush(stdout); + } return(0); } @@ -1612,11 +1617,14 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) return; } - if (options & F_DOT) - (void)write(STDOUT_FILENO, &BSPACE, 1); - else { - if (options & F_AUDIBLE) - (void)write(STDOUT_FILENO, &BBELL, 1); + if (options & F_DOT) { + (void)putc(BSPACE, stdout); + (void)fflush(stdout); + } else { + if (options & F_AUDIBLE) { + (void)putc(BBELL, stdout); + (void)fflush(stdout); + } (void)printf("%d bytes from %s, icmp_seq=%u", cc, pr_addr(from, fromlen), seq); (void)printf(" hlim=%d", hoplim); @@ -1805,7 +1813,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) } if (!(options & F_DOT)) { - (void)putchar('\n'); + (void)putc('\n', stdout); if (options & F_VERBOSE) pr_exthdrs(mhdr); (void)fflush(stdout); From nobody Tue Jul 7 20:57:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpk4Q05z6kTD7 for ; Tue, 07 Jul 2026 20:57: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvtpk1V4Wz3lmg for ; Tue, 07 Jul 2026 20:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783457870; 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; bh=ndz6XJ9BIhiQX5rfGGWhgbceukHJ0WM02xqyOpLJ4YU=; b=CwlMYt1FbDydIYQ5QANb2uRxf+MectXzM2Ul041KLST0lmC58DnjqqlQZQoZjoX3x3ToE0 PUdMBoKO/NVNRlMwGPDX2PsyMScqVTsDvOYqr7dAA6fzgN1hebjRNLIBMPC/kZ42kl4DaT fCPXxFtEgrRVE7bF6qOuf3ljb5eXZ0oq7kBjeCHnP51wocwgJ0rMI3wFpqTghJWTuUQjx6 64eYyuXwmj4tO61+VPjHjwEPrUz/+U+OGTkoDlKe6cs9cOr4isZNfbfu0N1k+5PiKwY8s5 y0wpw4oaz3Ri1R14cseLvBqtFtFBPqUsMYiOewQrZCOxXUzAHlKal/DngVtpFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783457870; a=rsa-sha256; cv=none; b=G0lurJXqvOJxe/6PLC8/JJ16N2Q06Wk+8frO8f8QM3ZPOB4ymMIn1EIJqCZt70nh4oc0qX LojG4GqUhikzNxzJVPm8cS5e7a5OZ2ipL6s0lZTHuAl2PsYwza9q/zZAp9GnBcABoeLoSG 35xvoS0BMSiLV9PJ2rBMLl/CEkhyIWTZdWMJxmYR6A8c5fh+el1MpxZi520XLZjtqdH6mK t4CZ74m3WK6F8KNtFTfSYVuKmIkjR1CjFOh2aOefjee1RoWT+CCFhAkJhsfMTbvc5ic9PE Iz1vn7YBAkaVQ96lsNG+UA0N9hXNZgCVvQbHTIOenJvYs9a4+2oLE7O+S/ZS5Q== 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=1783457870; 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; bh=ndz6XJ9BIhiQX5rfGGWhgbceukHJ0WM02xqyOpLJ4YU=; b=SB59swJ5nh2qE9Y4tvtYdyZEQ1gyyTum27BrKO0MbrPsO5gQJIAhU/hrUXXsSZkG4YAjR4 g4sg0UizfW9pfe/awoH3S3QM2HUCzob6XXEU+Ln3PmJ7TF5mVozMSeDvOszYOoRTxKm8+a r5k+zxy5m5KyCBNv8UTuk1AEXQso1D8LDIk7EzagbSAotFbmKIaCT7g+reflian/D/iNZD xGbF2hbdmY4hyfBjGRocgcP/gc3g3NSr5xzz3lNmvxYuEX3Db2bsGs8wLcLm2VFP976rUo HwIuyxFL3Z+XuB/HSLM6ZaH/r14yLKiRy/v9dZ6h3W+i5NNzAVsUhLa8bSYewQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpk0XMhzrsK for ; Tue, 07 Jul 2026 20:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18e9b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 20:57:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Siva Mahadevan From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: c6ed84f27bec - stable/15 - ping: Fix bell char ordering in -A test cases List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: c6ed84f27bec74b54bfc1548f8225687bfd9646c Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 20:57:50 +0000 Message-Id: <6a4d684e.18e9b.ef09848@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c6ed84f27bec74b54bfc1548f8225687bfd9646c commit c6ed84f27bec74b54bfc1548f8225687bfd9646c Author: Siva Mahadevan AuthorDate: 2026-06-26 12:22:57 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 07:07:04 +0000 ping: Fix bell char ordering in -A test cases Previously, these tests expected the bell chars to arrive before the initial status line. This appeared to be ok because ping(8) incorrectly mixed unbuffered and buffered writes by using printf(3) calls for the initial status, but direct write(2) calls for the bell chars. 141bb85798 revealed that the test's assertions only passed because the buffered writes did not get flushed before the direct writes in the test runs. 8bda488114f3 fixed ping(8) to use POSIX stdio buffered writes in all cases and guarantee a deterministic output ordering to stdout observers. This patch fixes the test to match the correct ordering. Reviewed by: des Sponsored by: The FreeBSD Foundation (cherry picked from commit 7ac9995a062ff9f78b634fe403e6a313f5637945) (cherry picked from commit 5b8c28adb829b50fb8ac065637fa99f717858bab) (cherry picked from commit f7f916d755fe5b48a2a68a937beea770b7bafa95) --- sbin/ping/tests/test_ping.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index fdf9c875329c..88164c2ab816 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -431,8 +431,8 @@ round-trip min/avg/max/stddev = /// ms "args": "ping -A -c3 192.0.2.2", "returncode": 2, "stdout": """\ -\x07\x07PING 192.0.2.2 (192.0.2.2): 56 data bytes - +PING 192.0.2.2 (192.0.2.2): 56 data bytes +\x07\x07 --- 192.0.2.2 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss """, @@ -463,8 +463,8 @@ round-trip min/avg/max/stddev = /// ms "args": "ping -A -c3 2001:db8::2", "returncode": 2, "stdout": """\ -\x07\x07PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 - +PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 +\x07\x07 --- 2001:db8::2 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss """, From nobody Tue Jul 7 20:57:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpm0wgBz6kT2K for ; Tue, 07 Jul 2026 20:57: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvtpl52HHz3lqF for ; Tue, 07 Jul 2026 20:57:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783457871; 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; bh=jqTLQ9CH3PIFOXbiGDt3rqAaUoUcP7WPfhltFc6qcS8=; b=vpdVaPSprcy2pkB32Kz5MJEp9hbeUY5jl7k639C/9faddL8iXWH0tGvF6ImNaQDxeAr5Tu +9HXx+ol9PRtO2cWWpy2+gZicNMfEBvvzfCGFmpEiROuRRXXRM0flk9I212Aq3eQlM8ncy 9OVJPIYwaHPNcpfAyDHiMWVYJGr+w7UxDeUIEXiLd1HsAgpkNmwiOaIcLncB1PdClNzcsO DEK0p8JcimLSly2BkEDsqnGwl8/asOW7e+8sX3t8QG9ivIWWoQF+yuNT7+Cnklgn0istkW KklhQbLObiapNVXU9ajrk23tkWJ/O3C3228hlef7JfdgI+H6kv4QSRZaDCeYSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783457871; a=rsa-sha256; cv=none; b=iy6kKNn4874GVuLFaX8qBWx50alkvEN1lfz5hwxw1ASE9e7l1W9mS8ZyyrwBBSv2rHSXJm 8H+ckg5ZvtoUgbwo0rYaw2Bye78bE73r9Lj3ssBylsymhlrfX/pVoZH9vc3iBYhLewCEcY FqIPwkUgyT1gxbQNax2gvW4nHAbiegRNVJZLcJ5rLTVLKbL7UnmQxnXDsbt/IWfJv3MUT2 rALPwpsHoMrP31LzViBhoiftu5SUf+iMNu8VP8Gdf8gyHyXrhoblYzqfYuvmXfsfJLBxjL sBX8FTSSOcATWHvofVV1j93vNIt6yDTJsqYFPxns/A+0Mp09SztetLU4uGMNww== 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=1783457871; 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; bh=jqTLQ9CH3PIFOXbiGDt3rqAaUoUcP7WPfhltFc6qcS8=; b=vWJXDUKrY4r77Z8kavJBWSqXlI/mNor9EkgvQesr9THUPXSj4lncfP6u9aJlLUCYoTrVGw BcpnFLvnQrjK6hoMXUaeKRC6jr0FionS1IiGYc8WT2PnrdNvSULnQpjv395fZ9GXiGIaKY JmVXtQxJLy6llxK970BIOJWkQD2gtCp3XT6HA14O6hNawnTDfwWkGJ6QEN3by57TF2RFew ubWH7OuK3PkQjk7ZVivIlyeqYez25EI6z8nXJoR4ai0sJwYlkkpbte/68wJr5Gr/kd+k8t AcINJpjFKnz4osJ6ub4fsPRAPa9coolnloYpjze1cl/LBeP3tNd8Aa2Y8vMwNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpl1JbwzrRf for ; Tue, 07 Jul 2026 20:57:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18c11 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 20:57:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 4336554f94cf - stable/15 - tests/aslr: Fix spurious test failures List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 4336554f94cf11c106a3fb5d2b77fdcfb9ab571e Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 20:57:51 +0000 Message-Id: <6a4d684f.18c11.5954b57f@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4336554f94cf11c106a3fb5d2b77fdcfb9ab571e commit 4336554f94cf11c106a3fb5d2b77fdcfb9ab571e Author: Mark Johnston AuthorDate: 2026-07-03 19:28:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 07:07:16 +0000 tests/aslr: Fix spurious test failures /sbin/ping and /sbin/ping6 are hard-linked, and the vmmap sysctl handler doesn't know which name was used to launch the process. PR: 296116 MFC after: 3 days Fixes: 080a4087014e ("tests: Fix race condition in aslr_setuid") (cherry picked from commit 81cf9a0ca765b48a430da61c221be17c4d0f753a) --- tests/sys/kern/aslr.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/sys/kern/aslr.c b/tests/sys/kern/aslr.c index 966ea5c3b83a..e0b696c5130a 100644 --- a/tests/sys/kern/aslr.c +++ b/tests/sys/kern/aslr.c @@ -88,6 +88,18 @@ text_base(pid_t pid, const char *path) return (base); } +static uint64_t +ping_text_base(pid_t pid) +{ + uint64_t base; + + base = text_base(pid, "/sbin/ping"); + if (base == 0) + /* Work around name cache inconsistency. */ + base = text_base(pid, "/sbin/ping6"); + return (base); +} + /* * Make sure that ASLR can't be disabled for a setuid executable by an * unprivileged user. @@ -115,9 +127,9 @@ ATF_TC_BODY(aslr_setuid, tc) "/sbin/ping is not setuid root"); child = spawn_ping(tc); - bases[0] = text_base(child, "/sbin/ping"); + bases[0] = ping_text_base(child); ATF_REQUIRE_MSG(bases[0] != 0, - "failed to find /sbin/ping text segment"); + "failed to find ping text segment"); arg = 0; error = procctl(P_PID, child, PROC_ASLR_STATUS, &arg); @@ -137,9 +149,9 @@ ATF_TC_BODY(aslr_setuid, tc) for (size_t i = 1; i < nitems(bases); i++) { child = spawn_ping(tc); - bases[i] = text_base(child, "/sbin/ping"); + bases[i] = ping_text_base(child); ATF_REQUIRE_MSG(bases[i] != 0, - "failed to find /sbin/ping text segment"); + "failed to find ping text segment"); error = kill(child, SIGTERM); ATF_REQUIRE(error == 0); pid = waitpid(child, &st, 0); From nobody Tue Jul 7 20:57:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpr4jjhz6kT71 for ; Tue, 07 Jul 2026 20:57: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvtpr3CF8z3mBV for ; Tue, 07 Jul 2026 20:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783457876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4zS21c8vpB78A7PFahhcnoPEzt7iPUaQPB3Akk1Jlg8=; b=CbVSzVTLIc/rWF1vCQH2Ud0BVaLFWv6zHj7QZTZPVHJhg8G9C5aCHfPkN88edE4mOcxnK+ T96ReVdL+1X9/ZIbHC2HI/e947uuUxioMFo0lzt9FxGqvk9OWnafvUbW9AIH0dUBzSoa+5 5f/cvfVtSHm/AO4eS0U5NSt+sqlnUzilCHCwSQZG+PB8uRAA8Jefo++hIG4dwquglzHv4q 2Q6wUL8b+9qf3HWEuBHUDM22xW1eiN1IZuEuVPxKUIKcn76ad5hUAPJAk5ybF1ImznU+mS 1BSkt1O7Mj/os32SVdTvBi/duuCE2B+ijoEnkDgzv7bOqu1LBtSHkf+cKDL/Qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783457876; a=rsa-sha256; cv=none; b=wVbS6M3q6m0UimFQBDPHs5BG39Kfcbu0p6wDAxPPfOO7gjKOkK0WMPje7IwHVn785cLDJA p6rEl6QciweF71JUmrwTwqGqbzzSR/Kl54xjE1+YdSMOmPOda7EeNnHKUnPtgyhUjCrXom mPnFIFu99so0t0DcLhFk4cp6jsXHrTzncrCgkUZX6D19XAzLsRXROIoX3sRHjlFzyl9/pZ a1o8cHxB14XEM9hmoPsJGNj9lXUydOuVy69gJEQusnWFHLW/uSjYR6vfDY/x4wnT6NjW8o ZOb9IIySw2/9nPuJjriI1lkRddX8F8PVSgw/CJjaVF3mrb8ykxljBeLsQXmMZg== 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=1783457876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4zS21c8vpB78A7PFahhcnoPEzt7iPUaQPB3Akk1Jlg8=; b=S1woA7Toqll+TkrDu/24DXjxvqIL1/F3iob/jag71P6Qxgl5vXhk/eb+TzC0Y7U77tJ1WG j2RARmR/sf3esZ9UV5lvZh1yxLJF3SNdMF4fWax0Bt8N3z3daOf2sGOwQdqH4ROw5dFCU4 eCQlyQuqJokvX8mDSqMnmFgn4e/yIl4DuAip5D6w2B3XKCv+xVA2yqGUyYRlKLPqvPGgGP 6h1bqeLmBj+/MRFd2aAk/0Pq5pPQa8h6anAbp20AVCFBZG3aAZWW+t1jcE4f6Z53QpVVPP I8RJMQW6zbeC6DWIJyg4KAXgXRLxAQRCs9d4K4SFSFupMu02WA/ecckgUQIWoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpr2G11zrn9 for ; Tue, 07 Jul 2026 20:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47a67 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 20:57:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 19a496794685 - stable/14 - tests: Fix race condition in aslr_setuid List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 19a4967946855bb3941382a1a1ccf3c7c1d5a1f3 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 20:57:56 +0000 Message-Id: <6a4d6854.47a67.4a2813bb@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=19a4967946855bb3941382a1a1ccf3c7c1d5a1f3 commit 19a4967946855bb3941382a1a1ccf3c7c1d5a1f3 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-22 13:23:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 07:07:55 +0000 tests: Fix race condition in aslr_setuid Use a cloexec pipe to block the parent until the child is ready. While here, redirect the output from ping to /dev/null, and mark the test as requiring the inet feature since we ping the IPv4 loopback. PR: 296116 MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57734 (cherry picked from commit 080a4087014e1d19136cc77028019d98b5c69e1e) tests: Fix race condition in aslr_setuid, take 2 Instead of a cloexec pipe, ingest ping's stdout and block until it has printed its initial summary, then close the pipe and return to the main test loop. Run ping in quiet mode so it won't mind that stdout is gone. PR: 296116 MFC after: 1 week Fixes: 080a4087014e ("tests: Fix race condition in aslr_setuid") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57763 (cherry picked from commit 86950cf9ffe89b7978fca019019692b3ea492044) --- tests/sys/kern/Makefile | 1 + tests/sys/kern/aslr.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index d28b6e850636..f9199440903b 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -81,6 +81,7 @@ PROGS+= coredump_phnum_helper PROGS+= pdeathsig_helper PROGS+= sendfile_helper +CFLAGS.aslr+= -I${SRCTOP}/tests LIBADD.aslr+= util LIBADD.copy_file_range+= md LIBADD.jail_lookup_root+= jail util diff --git a/tests/sys/kern/aslr.c b/tests/sys/kern/aslr.c index 13038054603c..966ea5c3b83a 100644 --- a/tests/sys/kern/aslr.c +++ b/tests/sys/kern/aslr.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -19,6 +20,7 @@ #include #include +#include "freebsd_test_suite/macros.h" /* * Spawn an unprivileged child with ASLR force-disabled, which then execs @@ -27,19 +29,22 @@ static pid_t spawn_ping(const atf_tc_t *tc) { + char line[64]; const char *user; struct passwd *passwd; pid_t child; - int arg, error; + int arg, error, io[2]; user = atf_tc_get_config_var(tc, "unprivileged_user"); passwd = getpwnam(user); ATF_REQUIRE(passwd != NULL); + ATF_REQUIRE(pipe2(io, O_CLOEXEC) == 0); child = fork(); ATF_REQUIRE(child >= 0); if (child == 0) { - if (seteuid(passwd->pw_uid) != 0) + if (dup2(io[1], STDOUT_FILENO) != STDOUT_FILENO || + seteuid(passwd->pw_uid) != 0) _exit(1); arg = PROC_ASLR_FORCE_DISABLE; @@ -47,10 +52,12 @@ spawn_ping(const atf_tc_t *tc) if (error != 0) _exit(2); - execl("/sbin/ping", "ping", "127.0.0.1", NULL); + execl("/sbin/ping", "ping", "-q", "127.0.0.1", NULL); _exit(127); } - usleep(500000); /* XXX-MJ */ + ATF_REQUIRE(close(io[1]) == 0); + ATF_REQUIRE(read(io[0], line, sizeof(line)) > 0); + ATF_REQUIRE(close(io[0]) == 0); return (child); } @@ -98,6 +105,7 @@ ATF_TC_BODY(aslr_setuid, tc) pid_t child, pid; int arg, error, st; + ATF_REQUIRE_FEATURE("inet"); if (!atf_tc_has_config_var(tc, "unprivileged_user")) atf_tc_skip("unprivileged_user not set"); From nobody Tue Jul 7 20:57:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvtps60rLz6kT9f for ; Tue, 07 Jul 2026 20:57: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvtps48shz3lwg for ; Tue, 07 Jul 2026 20:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783457877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i1GxrZPNUdpbspcsnx3aJzFXNieSKbepI3MApc1K2HQ=; b=RfXpmIoaQv7Q05RaFiSFp4pL9hA4qEmvqWeb3QaOy0UZaVOxOcJDdEEmI3NSM3dy/gioAw ZxJUcnT6z3XmPe2Ww+aLIBae9w38dWtZT8GuILoWxtPIEOv1nhYwzRrrRD+Lrr+Lw++qJ7 EZF3lzTo/guaBAtYdce7QoH8X4BaQvsnrQgYPjdFOHQ8gqxEHdOhqboHK0B7dPUgVCrDg0 KIyO6iNMVlq5CvRGX7VbIDsdJM64kKxE28yxISy/GW3Ao5qWFvYa813jXsGKw1JIaKxrLD dJyE64JL0BeJcNT1Ae3FRAnlzwcYjxiYeZ1JIxOcA4OK3iw0Y+YeaVTYHCVdsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783457877; a=rsa-sha256; cv=none; b=UxYoXe64lSUnPqO+/nvj5E9NtuoqexyGinnZFI7PscegeU+Ulq0NCvPkpwO79bJ94bIpmT FD/w7+LT8yChpEyRp+1NXVOf9aH8P4X3YBmjQ7/cnoTjk+746W14hyjm4WMdvgKOScmOlp RSIS+9ghFGWG0WlRmBwwIrP+9ZuGZEP5FXuu99EMRKgsJOHGjmGK0Mmt9KxrczfsxHtPgY mR4sASdNJ6RV8Wj1iny/LPGZmm5gruGGkbUiRsvgVgHAdj0uerwdQ/SL9kM4tXm/fXW7bZ t4yBihQC8DjYV0GgNBJctudggAYTt4JrNBakHUGLs8IRTSqVTB3ReMLYZV723Q== 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=1783457877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i1GxrZPNUdpbspcsnx3aJzFXNieSKbepI3MApc1K2HQ=; b=imbYsIimLy7EjBlY5JiPXF40utHD/91q68jwbzB2KmkwcdeBXS+OiV2IB5fmpammv/cevh xt6wwXSJ95QfAluSusTMApWGD99VNwmYEogdGciVW5oMoJ7WErXe0mUqFE6kuYhwHh6KVI 0OL0MN9YWBEKpARp8Q7jFqdUh23xShHwjOhCw+JDj/M4R/twmXjCwe7TaQGWkWvm/Dqnjc PI1rbQ9e2JICQkYDxd+vNpp2Et1PiFkk5esRfBtbVOwhjEDIebDsRZoNY8jF0e0vmUHeEU Y72cJWCIb9ZJWQBuulc5S6Gnb3X+U7TA3oOaMcRnpmkPgmazivQpYqLDshlqDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvtps38ybzrRm for ; Tue, 07 Jul 2026 20:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18b22 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 20:57:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: b38b0be29bfd - stable/14 - ping: Flush stdout after printing initial status List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: b38b0be29bfdc4b7bf17a4e4ef952fe170fa7567 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 20:57:57 +0000 Message-Id: <6a4d6855.18b22.7122cd47@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b38b0be29bfdc4b7bf17a4e4ef952fe170fa7567 commit b38b0be29bfdc4b7bf17a4e4ef952fe170fa7567 Author: Dag-Erling Smørgrav AuthorDate: 2026-06-23 15:20:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 07:07:56 +0000 ping: Flush stdout after printing initial status MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57765 (cherry picked from commit 141bb8579882f9d1f7e95351573e30f10689f4bf) ping: Don't mix stdio and direct writes POSIX does not allow mixing direct writes to STDOUT_FILENO with stdio operations on stdout like we do here. More importantly, it causes tests to fail randomly (or not-so-randomly after I added an fflush in a previous commit). MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57884 (cherry picked from commit 8bda488114f330d758e6741ff44882bb12b76c0d) --- sbin/ping/ping.c | 27 +++++++++++++++++---------- sbin/ping/ping6.c | 28 ++++++++++++++++++---------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 3b8663772e87..d3cef7c20470 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -841,7 +841,6 @@ ping(int argc, char *const *argv) sweepmin, sweepmax); else (void)printf(": %d data bytes\n", datalen); - } else { if (sweepmax) (void)printf("PING %s: (%d ... %d) data bytes\n", @@ -849,6 +848,7 @@ ping(int argc, char *const *argv) else (void)printf("PING %s: %d data bytes\n", hostname, datalen); } + (void)fflush(stdout); /* * Use sigaction() instead of signal() to get unambiguous semantics, @@ -994,8 +994,10 @@ ping(int argc, char *const *argv) (void)clock_gettime(CLOCK_MONOTONIC, &last); if (ntransmitted - nreceived - 1 > nmissedmax) { nmissedmax = ntransmitted - nreceived - 1; - if (options & F_MISSED) - (void)write(STDOUT_FILENO, &BBELL, 1); + if (options & F_MISSED) { + (void)putc(BBELL, stdout); + (void)fflush(stdout); + } } } } @@ -1089,8 +1091,10 @@ pinger(void) } ntransmitted++; sntransmitted++; - if (!(options & F_QUIET) && options & F_DOT) - (void)write(STDOUT_FILENO, &DOT[DOTidx++ % DOTlen], 1); + if (!(options & F_QUIET) && options & F_DOT) { + (void)putc(DOT[DOTidx++ % DOTlen], stdout); + (void)fflush(stdout); + } } /* @@ -1212,9 +1216,10 @@ pr_pack(char *buf, ssize_t cc, struct sockaddr_in *from, struct timespec *tv) return; } - if (options & F_DOT) - (void)write(STDOUT_FILENO, &BSPACE, 1); - else { + if (options & F_DOT) { + (void)putc(BSPACE, stdout); + (void)fflush(stdout); + } else { (void)printf("%zd bytes from %s: icmp_seq=%u", cc, pr_addr(from->sin_addr), seq); (void)printf(" ttl=%d", ip.ip_ttl); @@ -1222,8 +1227,10 @@ pr_pack(char *buf, ssize_t cc, struct sockaddr_in *from, struct timespec *tv) (void)printf(" time=%.3f ms", triptime); if (dupflag) (void)printf(" (DUP!)"); - if (options & F_AUDIBLE) - (void)write(STDOUT_FILENO, &BBELL, 1); + if (options & F_AUDIBLE) { + (void)putc(BBELL, stdout); + (void)fflush(stdout); + } if (options & F_MASK) { /* Just prentend this cast isn't ugly */ (void)printf(" mask=%s", diff --git a/sbin/ping/ping6.c b/sbin/ping/ping6.c index de2f34dd78db..406ea1875b9c 100644 --- a/sbin/ping/ping6.c +++ b/sbin/ping/ping6.c @@ -1124,6 +1124,7 @@ ping6(int argc, char *argv[]) (unsigned long)(pingerlen() - 8)); printf("%s --> ", pr_addr((struct sockaddr *)&src, sizeof(src))); printf("%s\n", pr_addr((struct sockaddr *)&dst, sizeof(dst))); + fflush(stdout); if (preload == 0) pinger(); @@ -1250,8 +1251,10 @@ ping6(int argc, char *argv[]) clock_gettime(CLOCK_MONOTONIC, &last); if (ntransmitted - nreceived - 1 > nmissedmax) { nmissedmax = ntransmitted - nreceived - 1; - if (options & F_MISSED) - (void)write(STDOUT_FILENO, &BBELL, 1); + if (options & F_MISSED) { + (void)putc(BBELL, stdout); + (void)fflush(stdout); + } } } } @@ -1427,8 +1430,10 @@ pinger(void) (void)printf("ping: wrote %s %d chars, ret=%d\n", hostname, cc, i); } - if (!(options & F_QUIET) && options & F_DOT) - (void)write(STDOUT_FILENO, &DOT[DOTidx++ % DOTlen], 1); + if (!(options & F_QUIET) && options & F_DOT) { + (void)putc(DOT[DOTidx++ % DOTlen], stdout); + (void)fflush(stdout); + } return(0); } @@ -1625,11 +1630,14 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) return; } - if (options & F_DOT) - (void)write(STDOUT_FILENO, &BSPACE, 1); - else { - if (options & F_AUDIBLE) - (void)write(STDOUT_FILENO, &BBELL, 1); + if (options & F_DOT) { + (void)putc(BSPACE, stdout); + (void)fflush(stdout); + } else { + if (options & F_AUDIBLE) { + (void)putc(BBELL, stdout); + (void)fflush(stdout); + } (void)printf("%d bytes from %s, icmp_seq=%u", cc, pr_addr(from, fromlen), seq); (void)printf(" hlim=%d", hoplim); @@ -1818,7 +1826,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) } if (!(options & F_DOT)) { - (void)putchar('\n'); + (void)putc('\n', stdout); if (options & F_VERBOSE) pr_exthdrs(mhdr); (void)fflush(stdout); From nobody Tue Jul 7 20:57:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpv1Hm8z6kT2Z for ; Tue, 07 Jul 2026 20:57: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvtpt5g9Vz3m8P for ; Tue, 07 Jul 2026 20:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783457878; 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; bh=sIpl36ts4s0E3mnOI9B/AFHcx2D49/88PI828BuEZhE=; b=Byy99omhIFfK5TJxidpE9QpUCHSM1QzRZChA0YEzlILoI0/rykoo587hVbRhzoMuNPqvmi mQxGr1GVLvybEMmSYudQ6QY+BDqL50wvSx5BnJ8IqiS+Roo5d2laNo8UpuG58QGvS9z5NQ 98c+3FNE/mPyWinulyCJ2nK7WFwa02mDhBBO9n7BJHV76cabBhJbOOh8JTOEtJRvu2DFv8 ku3PARaoTBCeyrfpN8OI0USnXj20/jUO2cM+zkDdKlYfug2mJSsa7ys8A7sAqJw/yjqKPT KQ031gtjW5lkm+1WVYBtmxRGZwMKbFZlL2Sq3HlvJP2PCV9AiDLzRiJ5Z12r8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783457878; a=rsa-sha256; cv=none; b=WBTTdGHnfnwUziq2hrx7OEFtuAbASgAgpiDuQ6Db5X5BTWsIhzKRRAWE4LzSy2svSCfZNM vO4V79Vet+SeH/1PkAUJ5Y+8138Ck+YdMCFTttagkZroYvN67oAm9Dimoh3LTg+vOfskAv 9dPrutitEKLijxW4Xy5fnevfKBA9Qb2MqVma9xqhnxC8j9PI7KG0ZZ70FpvdM+8W63crH3 DC9dDPUCYiGPlqx7VpI2eDMJWLKkp2AF7upIrvzImMPkW9KmS1LyOBxjjbl3Hbefs0vvwI D/onItqA+Q1Iw2csqKiOifzS/3Z4m/txcKDELuSNZaSd2rZrn5AQITqGIW2ivw== 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=1783457878; 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; bh=sIpl36ts4s0E3mnOI9B/AFHcx2D49/88PI828BuEZhE=; b=bcOB7IRY3AXx8muCpkXd2TioO1pI3jsavkX6TBAUY3CEV+F16YhpkJULdq1U+1jnfFvEpn 8mBDnaUBdZWg8L8hgo+X0tLn0LY5gT3IXxFISfi0wxRHqKTnTSUnfXYx254Nc3s8Jg3QsO Qc4Oz5HxnGvSHGX2H2qNPmICzxYw5edJnGxmWjW3ik81iLh5SHz6te2OFRL9Rds90nO1iq 1p92Qoye0CRr+9r0eRPqVnbnrICz3sJF7h8aUilz8UWeTIt9jQWqX40hg9JQnpkeKshqeG jr5eJwujEdemXfGnNiUMlImn4fz5SpvS7D/OapdO++ia8kY9dUT2/85warQ+HQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpt3yYzzrsR for ; Tue, 07 Jul 2026 20:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 183e1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 20:57:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Siva Mahadevan From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: f9f7b3aefab2 - stable/14 - ping: Fix bell char ordering in -A test cases List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: f9f7b3aefab21b77811ac84043adae1cb9f3cb61 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 20:57:58 +0000 Message-Id: <6a4d6856.183e1.1b0abab9@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f9f7b3aefab21b77811ac84043adae1cb9f3cb61 commit f9f7b3aefab21b77811ac84043adae1cb9f3cb61 Author: Siva Mahadevan AuthorDate: 2026-06-26 12:22:57 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 07:07:56 +0000 ping: Fix bell char ordering in -A test cases Previously, these tests expected the bell chars to arrive before the initial status line. This appeared to be ok because ping(8) incorrectly mixed unbuffered and buffered writes by using printf(3) calls for the initial status, but direct write(2) calls for the bell chars. 141bb85798 revealed that the test's assertions only passed because the buffered writes did not get flushed before the direct writes in the test runs. 8bda488114f3 fixed ping(8) to use POSIX stdio buffered writes in all cases and guarantee a deterministic output ordering to stdout observers. This patch fixes the test to match the correct ordering. Reviewed by: des Sponsored by: The FreeBSD Foundation (cherry picked from commit 7ac9995a062ff9f78b634fe403e6a313f5637945) (cherry picked from commit 5b8c28adb829b50fb8ac065637fa99f717858bab) (cherry picked from commit f7f916d755fe5b48a2a68a937beea770b7bafa95) --- sbin/ping/tests/test_ping.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 3f9a3aecf924..60ddd3d751bf 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -407,8 +407,8 @@ round-trip min/avg/max/stddev = /// ms "args": "ping -A -c3 192.0.2.2", "returncode": 2, "stdout": """\ -\x07\x07PING 192.0.2.2 (192.0.2.2): 56 data bytes - +PING 192.0.2.2 (192.0.2.2): 56 data bytes +\x07\x07 --- 192.0.2.2 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss """, @@ -439,8 +439,8 @@ round-trip min/avg/max/stddev = /// ms "args": "ping -A -c3 2001:db8::2", "returncode": 2, "stdout": """\ -\x07\x07PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 - +PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 +\x07\x07 --- 2001:db8::2 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss """, From nobody Tue Jul 7 20:57:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpw2841z6kT4s for ; Tue, 07 Jul 2026 20:58: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvtpv6lg6z3lt5 for ; Tue, 07 Jul 2026 20:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783457880; 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; bh=ayOPojuYwuPyvcUMabGQClnzjndkqENw86EPYm86mFI=; b=Y5px2F5xCV5QqniaHr1OQt7kVbsfi885ir3iqi9Yju0ydyhIPH/uCHnEGyoPOnTrslRocx jJSVkeojOUvmTUvOGolcAoFZaYsv9er/5vZMajRzAYoB9sASl2pl0pDhsOpdV3DJMk9KR6 v08fGzMdZuqsgS6JM46BPtbvzwq8p/4D3Mtjz/iiQNsowA4S3aVZeyLZjbXr1CUOJZNbm1 xHbXFrFJIo+0UvJd/b0LDP4Gjz9p3d8X1pgmgsH8wHBj9kn/JHvIJTgG2GlOEfLuEUCSgw n17kOD4xRgAE+itt3leDPTTJxnBH0j23EX8kHyz0uBao9TBBpXg3RcuC24qdNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783457880; a=rsa-sha256; cv=none; b=bFV0wwjXRCRunnDZwW4uUYpNlWo2ZqwnI+K3/DtKi+IH1bDUxdzitEE5ldthlzrya4B8Wq sf2Ic6d5A5nCGWzJ9dZilpo9JZz69zvZmtMAL/PFCRJLr1B+2eVDOYR0vhorO1UEzIIpE0 zM+qlGygZ4qzf+98lQXGLHvk188RpsyAm2PccFXxQE4yJI5TG8IGIIrzc+YhX2kzhlPm1f O9GrwgauOfuSQNZtf+pnFv1AsfQcOWT8zWdK3QsRrfqptlbxJUHlLoPzySC5kFY68U6Rak SAjfocAQHZAo/JxmcwV/jhVsz6BlKLjufAceuHJ6f4lcUHs3/RvUA1BX5407HQ== 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=1783457880; 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; bh=ayOPojuYwuPyvcUMabGQClnzjndkqENw86EPYm86mFI=; b=eXnko/iakoVUFBeMjJpqur5J/tS24O3YDrn4MpvA0FqcLFycoPGf4nEV7gVrgi0EEmeqPe DJNyMw6woRr0kyPw0ynf0lTsU8leAjmGZSCg64cpt+YIYmtXCmavU1mBPLW7MEzI6GN2ra GXVXni6YX2v4qu+ZTBLnoaNZg3nS3AyShCvi7kreNqz+nFIoGuoRO0/Z8z2nfM2oYumAVv 4bFkd2XvlAdDNOp5wFN9gRvJfYkYmmdZxTaYfi9bbhsTEPgzqEZ1DN9MsWCLLpU7GI4UFR ZDsZslLV9tQp4PjI74rEZ47Upog5klJOpK7hctuihJL7crE1BwHuCTuc8P2rlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpv4mcBzrsS for ; Tue, 07 Jul 2026 20:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47ab8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 20:57:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 478d81e72eaa - stable/14 - tests/aslr: Fix spurious test failures List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 478d81e72eaae3276c4670e0054385b5e4e1f031 Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 20:57:59 +0000 Message-Id: <6a4d6857.47ab8.536cebcb@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=478d81e72eaae3276c4670e0054385b5e4e1f031 commit 478d81e72eaae3276c4670e0054385b5e4e1f031 Author: Mark Johnston AuthorDate: 2026-07-03 19:28:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 07:08:03 +0000 tests/aslr: Fix spurious test failures /sbin/ping and /sbin/ping6 are hard-linked, and the vmmap sysctl handler doesn't know which name was used to launch the process. PR: 296116 MFC after: 3 days Fixes: 080a4087014e ("tests: Fix race condition in aslr_setuid") (cherry picked from commit 81cf9a0ca765b48a430da61c221be17c4d0f753a) --- tests/sys/kern/aslr.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/sys/kern/aslr.c b/tests/sys/kern/aslr.c index 966ea5c3b83a..e0b696c5130a 100644 --- a/tests/sys/kern/aslr.c +++ b/tests/sys/kern/aslr.c @@ -88,6 +88,18 @@ text_base(pid_t pid, const char *path) return (base); } +static uint64_t +ping_text_base(pid_t pid) +{ + uint64_t base; + + base = text_base(pid, "/sbin/ping"); + if (base == 0) + /* Work around name cache inconsistency. */ + base = text_base(pid, "/sbin/ping6"); + return (base); +} + /* * Make sure that ASLR can't be disabled for a setuid executable by an * unprivileged user. @@ -115,9 +127,9 @@ ATF_TC_BODY(aslr_setuid, tc) "/sbin/ping is not setuid root"); child = spawn_ping(tc); - bases[0] = text_base(child, "/sbin/ping"); + bases[0] = ping_text_base(child); ATF_REQUIRE_MSG(bases[0] != 0, - "failed to find /sbin/ping text segment"); + "failed to find ping text segment"); arg = 0; error = procctl(P_PID, child, PROC_ASLR_STATUS, &arg); @@ -137,9 +149,9 @@ ATF_TC_BODY(aslr_setuid, tc) for (size_t i = 1; i < nitems(bases); i++) { child = spawn_ping(tc); - bases[i] = text_base(child, "/sbin/ping"); + bases[i] = ping_text_base(child); ATF_REQUIRE_MSG(bases[i] != 0, - "failed to find /sbin/ping text segment"); + "failed to find ping text segment"); error = kill(child, SIGTERM); ATF_REQUIRE(error == 0); pid = waitpid(child, &st, 0); From nobody Wed Jul 8 17:57:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwQmD31Vkz6kbsY for ; Wed, 08 Jul 2026 17:57: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwQmD1Fnxz47X6 for ; Wed, 08 Jul 2026 17: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=1783533452; 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; bh=NhXRiWiixUuouC/ozOcjy5aaYIEws8jAw0Hz9O3SZLo=; b=ZWqGoEXkT7wN7Be59nthNl0g1iaDKraID6kEY83fFQliMolXGoYwnPGkRpzxceIuRZt9rp ahDG9whk6OuH49rQY7UcjAuMV8w1FoH9QEkdVx03KzD6eA+wPJGs43ODknpzVF//7/d5Fj T+iSJ0kVjKsW9vQIuEzkLvHk/lhu+bFkrriNpdulX+ivZR5umlFaOwvdJywFgHWyW2hJAJ YIV1xFtCOF0DJ9k/BbPtOEwghyyz/ckJuKO++F9j7q2ZwyN8ma12xnAlRUtkE0RALFtqhs zSL17tpmkHIHPEJ58vQNhemA9m/4A/2wFpY80fN1QQVPEoQyQytCRMaZwQiOjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783533452; a=rsa-sha256; cv=none; b=UHVpFCtawQ/6XmvCa6HAo0ljyLwJmFtVwgHpHwI8ldK+MaIlvBiprjqMRbslSUGSx5Iex7 zuuYK/+G0bNmOZRFqK8X/x/eYRuXO7E+KQXos35BmlE8cmMGB+puF7DJ7Hv/b6eVq046gu dP/ecyGYkdz4h4NohGB4id4IuZZl6H5waAzmcm8OHbAzI8RuVbr4oLOmlM8HpPdFYFdoVl vAAiL1ZLBzeBAQPl2b8xEM0UyuNtOdTrHl8/qe9Bkn3xeqKNJHh3aNkGQpef3cdyrwzepS ExnUpBTxqgF6wYpeB+Xnx7q4wJbMNl410yP7hZ5DyG/TbC5Yagr5meGe8as0yg== 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=1783533452; 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; bh=NhXRiWiixUuouC/ozOcjy5aaYIEws8jAw0Hz9O3SZLo=; b=glQwhO4IGRwT6QbSNmuBpNJMfcAXPlOqWXfk7sYYPXH7QNXbrhNYIJdeD1jgqht0vTOaAp NaYWVWTni1PYNL0yPx4IblFnY1HPVLmyz9HCVfDubID/hsjmZAvdLLAOZTKrdXqlgYJfKz K5z45iWpPOjTBg8JIwqWbg5hSfFGmzmxB7DsZ52M73FIOisjOOHkhZD2eQr6Z8UMCgF8oP T1gqzfONBusF0jbH3IiPT9tnGfG8t+jw2djBhBpU9wXlravY/cNtHTi7jJYEtpLm8XqB2c At5kVnVfDsf8uS2bk+L9wmwHvPNxgEhFN+sirKZaREIqGXd2qVlwHfAj3dKl8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwQmC66VKzYgP for ; Wed, 08 Jul 2026 17:57:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 390ec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 17:57:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: CismonX From: Alan Somers Subject: git: ed15ec6695f3 - stable/15 - fusefs: only search for FREAD fufh in readdir List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ed15ec6695f3f6330ee1f9a0c64d22e669eb21ed Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 17:57:31 +0000 Message-Id: <6a4e8f8b.390ec.4b2da2af@gitrepo.freebsd.org> The branch stable/15 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=ed15ec6695f3f6330ee1f9a0c64d22e669eb21ed commit ed15ec6695f3f6330ee1f9a0c64d22e669eb21ed Author: CismonX AuthorDate: 2025-06-20 09:41:46 +0000 Commit: Alan Somers CommitDate: 2026-07-08 17:56:50 +0000 fusefs: only search for FREAD fufh in readdir The extra search for an FEXEC fufh shall be removed, since readdir is only supposed to be called on a directory opened with FREAD. The sole exception is NFS, which will call VOP_READDIR with directories that aren't open at all. fuse already has special code to handle that. Also remove the fuse_filehandle_get_dir() function, since it's not used anywhere else. Signed-off-by: CismonX Reviewed by: asomers Pull Request: https://github.com/freebsd/freebsd-src/pull/1729 (cherry picked from commit 4179f1d9deed83977f159c8afea204293ef4c7d7) --- sys/fs/fuse/fuse_vnops.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 1923325bba19..d5404a8b9805 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -265,16 +265,6 @@ fuse_extattr_check_cred(struct vnode *vp, int ns, struct ucred *cred, } } -/* Get a filehandle for a directory */ -static int -fuse_filehandle_get_dir(struct vnode *vp, struct fuse_filehandle **fufhp, - struct ucred *cred, pid_t pid) -{ - if (fuse_filehandle_get(vp, FREAD, fufhp, cred, pid) == 0) - return 0; - return fuse_filehandle_get(vp, FEXEC, fufhp, cred, pid); -} - /* Send FUSE_FLUSH for this vnode */ static int fuse_flush(struct vnode *vp, struct ucred *cred, pid_t pid, int fflag) @@ -1980,7 +1970,7 @@ fuse_vnop_readdir(struct vop_readdir_args *ap) return (EXTERROR(EINVAL, "Buffer is too small")); tresid = uio->uio_resid; - err = fuse_filehandle_get_dir(vp, &fufh, cred, pid); + err = fuse_filehandle_get(vp, FREAD, &fufh, cred, pid); if (err == EBADF && mp->mnt_flag & MNT_EXPORTED) { KASSERT(!fsess_is_impl(mp, FUSE_OPENDIR), ("FUSE file systems that implement " From nobody Wed Jul 8 17:57:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwQmF16wRz6kc6M for ; Wed, 08 Jul 2026 17: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwQmF0JyWz47mb for ; Wed, 08 Jul 2026 17:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783533453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUBmNWLv2z4NKKsPXdws4QqgUmLH1jPNqYKvKhL7GRY=; b=gfC/XzMJKUYK1kUIOYVxj/TDaY7+EqjMxsK7IRVm+hgmYcPPlxp3oEQ45nxM7mWItUrrFR i6UuTxZ0aTC9TQFqnhooOKCbZSUsIlylpyv3sf0i2gDkQL7RiZSLO0CBUuynITJxEAOQhE K/QH6j6oGtW0mIlQTBKz/ZwGtD/tgevGh4oh3yHP68CJ9f8bHJ90B6QYVAeuoVQqE9mW3x iUcQKMKaDe0AUz5APf7NBUNThDqkbcqLPw7pH1vS3EFuhyEBrJZOlTOP/u0byIUobm1WFP A4GACnPE3zi6d6f4ol5csApaZq9U/0r/pnHCpvVpOpEYbmOT01LuYhmf1PAXVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783533453; a=rsa-sha256; cv=none; b=O9QhsUUmdQm4rnJ/Ocdlo3spWeO+oVwfYkHlfXYOTxQKq+9yJA1Tz78tpuNfADnGPkpPz2 1GXtHAIn283EqyfE8B7374OFjc6yi8CC32e0CSPWXd2ZdvhC0iyyKjKHmWReqKWNGbgM4m /ike8s097YrJUNhusHqjdh4wK3A9UbAdsXiGai+0Xm7USrvMT415T5alayY1Gw4IRLtHkX CVguJU4ZfkcvG7TBeEgGayeKx0J2RWz/TaJFZJUD4T7wJuPweAutXAMdMut/lviqPcyZpr XKSrZCMfqa9eB+maDYDCAU1P86kpmpu9/sA9t5/Y+CAT18NPAMy91e2pRP/XqQ== 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=1783533453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUBmNWLv2z4NKKsPXdws4QqgUmLH1jPNqYKvKhL7GRY=; b=xG6DPUHiS5KvgY88iTHYMlC2MHNv5QuSX2iseHUxLJ7BtGW7bOR5J+2jlp4DDQJnFKyvFF sqJJVwNqj/1J/fJEsLuUruo5G/jaFmDYIznJ9ULIUzA7Z6JlCgJBi++L0NYxzLzeEQjcnm euv4/vtIrzhgoqFH4SJk5/LVXihWzt9F6M5Yin0bZc2IjmnKxzPd3bBnjGgvcUQksDNKia ZexZwotMjIo3FsawIy+fprBfcVSzwgqj6qXh2YtU33vyCVEnWNrHBRQedZA80/EGyv1GcI AMuGoEn/P9i00y0Ok46B7/yEeL8rC1N87u5EkKsxKYFp35hL15aaPq3FoQgZgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwQmD6ChMzYvP for ; Wed, 08 Jul 2026 17:57:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38d08 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 17:57:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 2da045abb9f0 - stable/15 - fusefs: fix error handling when reading a directory's sticky bit List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2da045abb9f0e36531910f5c80c7293be1d0771c Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 17:57:32 +0000 Message-Id: <6a4e8f8c.38d08.163c098e@gitrepo.freebsd.org> The branch stable/15 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=2da045abb9f0e36531910f5c80c7293be1d0771c commit 2da045abb9f0e36531910f5c80c7293be1d0771c Author: Alan Somers AuthorDate: 2026-06-14 17:37:15 +0000 Commit: Alan Somers CommitDate: 2026-07-08 17:56:50 +0000 fusefs: fix error handling when reading a directory's sticky bit When trying to delete or rename a file, fuse_vnop_lookup must check whether its parent directory's sticky bit is set. Realistically, the parent directory's attributes will almost always be cached. But it's possible that they won't be, and in that case we must send a new FUSE_GETATTR request to the server. If that request fails for some reason, then we must fail the lookup. Prior to this change fusefs would ignore failure of that request. Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu of Tsinghua University Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57588 (cherry picked from commit b4af6a4cccc3b4b0ea461463196c258eb92ad2e5) --- sys/fs/fuse/fuse_vnops.c | 10 +++--- tests/sys/fs/fusefs/default_permissions.cc | 53 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index d5404a8b9805..b5f65decc399 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -1660,14 +1660,16 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) * Need to figure out the vnode locking to make * this work. */ - fuse_internal_getattr(dvp, &dvattr, cred, td); - if ((dvattr.va_mode & S_ISTXT) && + err = fuse_internal_getattr(dvp, &dvattr, cred, + td); + if (err == 0 && + (dvattr.va_mode & S_ISTXT) && fuse_internal_access(dvp, VADMIN, td, cred) && fuse_internal_access(*vpp, VADMIN, td, - cred)) { + cred)) + { err = EPERM; - goto out; } } } diff --git a/tests/sys/fs/fusefs/default_permissions.cc b/tests/sys/fs/fusefs/default_permissions.cc index 4b04297d97ac..f9a37f904d30 100644 --- a/tests/sys/fs/fusefs/default_permissions.cc +++ b/tests/sys/fs/fusefs/default_permissions.cc @@ -1562,6 +1562,59 @@ TEST_F(Unlink, sticky_directory) ASSERT_EQ(EPERM, errno); } +/* + * When trying to delete or rename a file, we must check its parent directory's + * sticky bit. That may entail a FUSE_GETATTR. If that operation fails, then + * we must fail the rename or delete. + */ +TEST_F(Unlink, sticky_directory_io_during_getattr) +{ + const char FULLPATH[] = "mountpoint/some_file.txt"; + const char RELPATH[] = "some_file.txt"; + Sequence seq; + uint64_t ino = 42; + + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_GETATTR && + in.header.nodeid == FUSE_ROOT_ID); + }, Eq(true)), + _) + ).Times(2) + .InSequence(seq) + .WillRepeatedly(Invoke(ReturnImmediate([=](auto i __unused, auto& out) { + SET_OUT_HEADER_LEN(out, attr); + out.body.attr.attr.ino = FUSE_ROOT_ID; + out.body.attr.attr.mode = S_IFDIR | 0177; + /* + * Realistically, the parent directory's attributes will almost + * always be cached when we try to lookup the sticky bit. For + * this test case, set attr_valid to 0 so that won't be the + * case. + */ + out.body.attr.attr_valid = 0; + }))); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_GETATTR && + in.header.nodeid == FUSE_ROOT_ID); + }, Eq(true)), + _) + ).Times(1) + .InSequence(seq) + .WillOnce(Invoke(ReturnErrno(EIO))); + expect_lookup(RELPATH, ino, S_IFREG | 0644, UINT64_MAX, 0); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_UNLINK); + }, Eq(true)), + _) + ).Times(0); + + ASSERT_EQ(-1, unlink(FULLPATH)); + ASSERT_EQ(EIO, errno); +} + /* A write by a non-owner should clear a file's SUID bit */ TEST_F(Write, clear_suid) { From nobody Wed Jul 8 17:57:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwQmG3z4Tz6kc1Z for ; Wed, 08 Jul 2026 17: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwQmG0gmrz47XD for ; Wed, 08 Jul 2026 17: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=1783533454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QkWubyhp73EjFOj4m18C0itnJAYbybb6JAML8ZsVkJE=; b=vDN4eMfBfONVeEK/TNk5fi9PKqAdpvdBI+fU+mmK44CfkSNlYJA9U7SqZRMIyk+u+cQhCM uKGOXSKHsK2vnLtJdn3LDaiFjPZk4zbZuxLAIDltsywEXbAICpuRfjkqpbGfCG/auK7ccg zOFZrSt+MxL4wix5QZuxOHl9NJqm2XP4N+kjMTJ90OuG+wDiqspg03vq9bkzAUOuiswY4T a0XTeOjtNNVD9JEBpxkelLoZ7PFbPBu7E71CttkR6N0yeFWjE37jwTC0gErOYhWFDLIHL8 o9azRmcvUcgTh0yeeV0uOYd+GKISmLmfXSkCgPlD2pv5Vn2vuE4NjpAoMlLfog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783533454; a=rsa-sha256; cv=none; b=oZRN/sPwp3RRpWz69kR21eHTIj9EQMVGdA992bKxqtWuL/UybTUL9JrhjetCy/Bp690uV6 UBIqVgGJoDA9oO50yDKDNqYjRSN89FCV0FfYcmCQC5DH9kGfPr/t88uLxDe6H0DFOg+LvO aSgYcaUhVgUpnZQReUCYNQO836NKjGFoJBa5Kvhk+2qs+QUIQgF2jnfqZkSsPv5Mrl/moY 59dUoABHqva+KRBocbRwH2rDpc6nV6yyeii904BDFZLUOMzGSsfa17z+si/5jwg6/IR4MF zCvP7W27S+P9ll+5u5MY3Ot3ZEhxwnL2jT+BxklN3qk+OtlT6SnZyr091/NURw== 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=1783533454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QkWubyhp73EjFOj4m18C0itnJAYbybb6JAML8ZsVkJE=; b=xFl6GoZKTZECfyKAXCkdPe09VgDGwBZpXHceeXGgjLACPc1pk7DgMFu4Sm+lcRMhk2R5Gs zoPCn8da4vvNhprNf8C7l1MfYZCPKAhNRLTJ9hhgqJeyA8cUOT77uko/YwqsQ7NfVFaBFt Yr6/wrQMXKuS2e1Jn0hIoqkZQJ3YnX/t4LG9t2DzxhhG+KJ7pGzzzoFEqav8ifCRXRNlwS EtFwkXjsoo/H4VDgIznLNPxeTMoaXyt/2upDvICIOri5oxxWnl3KXiwSct+9vyA8J4ODhb hvlJlB4Ao9mIrn0ew9TjrAKRYDo48++xfF04Oa9UwLi3yqTcr4Nwo5YynEyWAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwQmF6l5WzZ63 for ; Wed, 08 Jul 2026 17:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38a33 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 17:57:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: c57b054c9e7d - stable/15 - fusefs: fix a race in the pre-init tests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c57b054c9e7d11fcc2fcb3036a73995a758c095e Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 17:57:33 +0000 Message-Id: <6a4e8f8d.38a33.179d169a@gitrepo.freebsd.org> The branch stable/15 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c57b054c9e7d11fcc2fcb3036a73995a758c095e commit c57b054c9e7d11fcc2fcb3036a73995a758c095e Author: Alan Somers AuthorDate: 2026-06-23 17:12:04 +0000 Commit: Alan Somers CommitDate: 2026-07-08 17:56:50 +0000 fusefs: fix a race in the pre-init tests These tests allow the user to customize the INIT response. But it's necessary to block the daemon's service loop from running until those expectations have been set. This race has never caused failures before simply due to luck. But now it's failing on slower platforms. PR: 296236 Reported by: siva Sponsored by: ConnectWise Reviewed by: siva Differential Revision: https://reviews.freebsd.org/D57781 (cherry picked from commit 2c1482e305368af182a7bde0e53d0d180b319326) --- tests/sys/fs/fusefs/mockfs.cc | 11 ++++++++--- tests/sys/fs/fusefs/mockfs.hh | 3 +++ tests/sys/fs/fusefs/pre-init.cc | 6 ++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index a377ba832ef5..fc9a80639283 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -539,9 +539,8 @@ MockFS::MockFS(int max_read, int max_readahead, bool allow_other, if (0 != sigaction(SIGUSR1, &sa, NULL)) throw(std::system_error(errno, std::system_category(), "Couldn't handle SIGUSR1")); - if (pthread_create(&m_daemon_id, NULL, service, (void*)this)) - throw(std::system_error(errno, std::system_category(), - "Couldn't Couldn't start fuse thread")); + if (!no_auto_init) + start_service(); } MockFS::~MockFS() { @@ -997,6 +996,12 @@ void MockFS::read_request(mockfs_buf_in &in, ssize_t &res) { ASSERT_TRUE(res == static_cast(in.header.len) || m_quit); } +void MockFS::start_service() { + if (pthread_create(&m_daemon_id, NULL, service, (void*)this)) + throw(std::system_error(errno, std::system_category(), + "Couldn't Couldn't start fuse thread")); +} + void MockFS::write_response(const mockfs_buf_out &out) { fd_set writefds; pollfd fds[1]; diff --git a/tests/sys/fs/fusefs/mockfs.hh b/tests/sys/fs/fusefs/mockfs.hh index f98a5337c9d1..3090701c815e 100644 --- a/tests/sys/fs/fusefs/mockfs.hh +++ b/tests/sys/fs/fusefs/mockfs.hh @@ -383,6 +383,9 @@ class MockFS { /* Process FUSE requests endlessly */ void loop(); + /* Begin processing requests from the kernel */ + void start_service(); + /* * Send an asynchronous notification to invalidate a directory entry. * Similar to libfuse's fuse_lowlevel_notify_inval_entry diff --git a/tests/sys/fs/fusefs/pre-init.cc b/tests/sys/fs/fusefs/pre-init.cc index 2d3257500304..70d7ddcdb0f4 100644 --- a/tests/sys/fs/fusefs/pre-init.cc +++ b/tests/sys/fs/fusefs/pre-init.cc @@ -102,6 +102,8 @@ TEST_F(PreInit, unmount_before_init) }))); expect_destroy(0); + m_mock->start_service(); + ASSERT_EQ(0, pthread_create(&th1, NULL, unmount1, NULL)); nap(); /* Wait for th1 to block in unmount() */ sem_post(&sem0); @@ -147,6 +149,8 @@ TEST_F(PreInit, signal_during_unmount_before_init) sem_wait(&sem0); }))); + m_mock->start_service(); + if ((child = ::fork()) == 0) { /* * In child. This will block waiting for FUSE_INIT to complete @@ -219,6 +223,8 @@ TEST_P(PreInitP, getattr_before_init) out.body.attr.attr_valid = UINT64_MAX; }))); + m_mock->start_service(); + EXPECT_EQ(0, stat("mountpoint", &sb)); EXPECT_EQ(nlink, sb.st_nlink); } From nobody Wed Jul 8 17:57:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwQmH4D3mz6kbyX for ; Wed, 08 Jul 2026 17: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwQmH1vVRz4811 for ; Wed, 08 Jul 2026 17: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=1783533455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MK4xN7a7acBQGJUT8qgEO6QOuijphGli1iOeQCJKsAU=; b=N/hzwMkNO0Q1doA5in8wF6FX8Kugasf/F9vuUdSfY0abudiL2BB7/Yi9RFZmc+U6Uf3bJJ dk1rbPP9e+nJeCXoN0ZLXL1CmAwP5GkKHEnRqGhFiRhiAm7y+qhzk8thBdlk3ry1psNVXb Xz7IeRp3qeHGNxbFrLPDtixodsvaB+9vaP3B18EZVafkaZisCEYqkH2o8mKQ1xscCL6GyW sKkm2voxOQCt8/R3vyb2N4EVYIeRDq/9olaX32lbLfg3FeNqEROi1XD8kCl16lltWPDBQX V+Ks3So4DMt5qUJkr4BiE/tw6qVpufcmxg7/Vnt+Bi26QdIBwWSxwSk61h817w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783533455; a=rsa-sha256; cv=none; b=KWvgIIGbnJuyw0BTf7dWaSV/xATDDw99/wHU3wFjJO52Gr+Np05lDEMOl4rqG85x9815hO DoltdqWimDw7tkVjY2mLxbSc9U+C+6gomZLhKZjXVN9QZQ7JZJfYt1DX/IJ81D3FVRiuQI qGUTHMsEAD3ZtB3re16145g5KTQolNbtGrn8IdwJQjtPQw59oLu0tHC1hi48TMq110I3/X eBuf0+lRTAhM2wI0ei4v/yvxklIxOP8Y6YOl8+KH+i9OTi/UpH00ihWV/p+XFD4uxkuos+ ld0HwZiaYeAjut+5qSYd93gYCZaLYzmeadwtyGZu9MVbwPvdpi6gG/rbVXyhpw== 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=1783533455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MK4xN7a7acBQGJUT8qgEO6QOuijphGli1iOeQCJKsAU=; b=JbIxWE3eP/2m2Dz4s5aj1dAa5fiM1xIqVKItr+akG0FpQk+csin4/vO7k2hwx/BfS3QLzU 24eIi7B/sDjGEHyUnZEl3Zd9wU0T1d4pAJT50foijV8/4GNPEDG2LYJRm1wAAkY9Ad2kx5 5+IGH6dwdZW6avu3AiZYuZgBphGMChTdtZIdWlqxOYzxVJggY5jTTGs46sEb9NCccqOZUu 1M4HR1s5nMxasly2DBkrNuZvXParJW0CHHVuz5AlS25OgfIRspn8+wcufVCQX0vjMoKuc+ 27ns7QtAgJeyQX1Rg76sVlgJBI0oD4cY99mJaTU32ASpS83N0EUCnco/Dqt0vA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwQmH0QHyzYNP for ; Wed, 08 Jul 2026 17:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39525 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 17:57:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 1d02c2536c7b - stable/15 - fusefs: proofread an error message in the tests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1d02c2536c7b7204e184a3f5e011d0f30fd5f97e Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 17:57:35 +0000 Message-Id: <6a4e8f8f.39525.24fe97a@gitrepo.freebsd.org> The branch stable/15 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=1d02c2536c7b7204e184a3f5e011d0f30fd5f97e commit 1d02c2536c7b7204e184a3f5e011d0f30fd5f97e Author: Alan Somers AuthorDate: 2026-06-23 20:48:06 +0000 Commit: Alan Somers CommitDate: 2026-07-08 17:56:51 +0000 fusefs: proofread an error message in the tests Reported by: otis Fixes: 2c1482e3053 ("fusefs: fix a race in the pre-init tests") Sponsored by: ConnectWise (cherry picked from commit 381ebe25f0b9fae5b3470e9c6e0767909e0fa85a) --- tests/sys/fs/fusefs/mockfs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index fc9a80639283..046d95de3859 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -999,7 +999,7 @@ void MockFS::read_request(mockfs_buf_in &in, ssize_t &res) { void MockFS::start_service() { if (pthread_create(&m_daemon_id, NULL, service, (void*)this)) throw(std::system_error(errno, std::system_category(), - "Couldn't Couldn't start fuse thread")); + "Couldn't start fuse thread")); } void MockFS::write_response(const mockfs_buf_out &out) { From nobody Wed Jul 8 18:09:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2S4TBHz6kcpK for ; Wed, 08 Jul 2026 18:09: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwR2S3xGCz4Cnf for ; Wed, 08 Jul 2026 18:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783534192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H5MWdVFwG9n/J8Ay2DjPHai1mS3/IMxhLOps8FZljNo=; b=oCm7v/TCerx33XJyvONsCb1Bmr9HlRvB6TogolxEneqrM3BXYf74wtgobJVZ73tCIJWzLY +/PajwY4ut5krcGUxvwY/xGUWeGEjLjK8bHt6YJRFTxZda1PvTssx8bRCkPQUoVmVSrfWN 7UzisAEMKO2kGCZghaC0jbBGz1JQUwNshhWDf2gLCJc3nkytZ8YA6Ns6i2TrUqdUedjxjn zZC1EBBC0rIDg8ly+VeN/Gs5wO6VP6j+Qwkx89fnWUrR8mYE10rOZi+ixWhu57AzurnmGs MwOORF7iN7T5fsq92Q9rswSCDRLvI7w7WUkuT1opXctcJ1X9sraZEdRiPBC3/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783534192; a=rsa-sha256; cv=none; b=xkRdp4o4YobutySmB4RashbX/FFEtDYFUUyc/kA5OnHVRsMpYN1DipNAiNmrkraqkc+DWY TmDUrm6PS4109QMejfHZm7qOSW0SzQFDt6wEBp55ELG9tr9pj4PaL74W6x7ifp+Lx9mLv9 NCdlNbQr9JSMSmaoq84og262eRB+ZzQlh3vA9NQK8ooyJSyLQsHJNOGhZbJYMM4h8dRDbS dm6AmHbPiZ+I4ONZSBGKiiMoPqfnT3UtSPHyo3gLs1v0R8bkhGnIWgvgQBZVOD0XQy1KM5 HvaFEqFhHxpArIVJjTj4BYIo8PWASe96hJAMyZLDpsF/eL5nR3GpdAB+P1kFCA== 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=1783534192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H5MWdVFwG9n/J8Ay2DjPHai1mS3/IMxhLOps8FZljNo=; b=k6uzBm00sMSne9q83Yi1uuffZCmQwJJB5VClyQR+1RJzbm39aEa4PbPcQPUQkFPGg8WW4Q MjOdMWyBbKJeIo5ip4SjWS3JgTQmI3yP3ue2Vy/97xpHAdstcTfYIMg3CigTflj+VxDMgp dIMsmn+nPEJSrx8TqpgnlhqOKSlG//BBjoOQI8xGEw8anTDD/1gXGmQcP9eXwfidC0XvGW QLQv3BnAbrdfN+Ucn/AQkIorOBDsz9sRTzS+xVtKdYw9TbZVzt4zYIi0JZnTnlYOTND5aV OTCAwzcxRZayKwKK5yOV67oxRKGY9ypNAbAZPZ7OFbb1FxpRS+ClHBVr+2TRwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2S2jv6zZ6Z for ; Wed, 08 Jul 2026 18:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39aa7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 18:09:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 29264fa5f750 - stable/15 - udp: Wrap a long line in udp_send() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 29264fa5f750069f0799705c79be043d0dcf30d2 Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 18:09:52 +0000 Message-Id: <6a4e9270.39aa7.ac76113@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=29264fa5f750069f0799705c79be043d0dcf30d2 commit 29264fa5f750069f0799705c79be043d0dcf30d2 Author: Mark Johnston AuthorDate: 2026-06-15 15:57:01 +0000 Commit: Mark Johnston CommitDate: 2026-07-08 18:09:34 +0000 udp: Wrap a long line in udp_send() No functional change intended. MFC after: 1 week (cherry picked from commit 3b69c7201fd06b368090f2ee3840d384a949cba8) --- sys/netinet/udp_usrreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index f1d952037d5a..b586790c028e 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1166,7 +1166,8 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, * We will need network epoch in either case, to safely lookup into * pcb hash. */ - use_cached_route = sin == NULL || (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0); + use_cached_route = sin == NULL || + (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0); if (use_cached_route || (flags & PRUS_IPV6) != 0) INP_WLOCK(inp); else From nobody Wed Jul 8 18:09:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2V0bbRz6kctD for ; Wed, 08 Jul 2026 18:09: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwR2T4Xybz4Cnh for ; Wed, 08 Jul 2026 18:09:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783534193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=38dvOeg1n8wzb5PuNdV09W5JPflY0cEMifuqi4bhD18=; b=qsYLtv5WNBPN4cVJyhU+Tvx07qgOCVcMEB8Uhz2ZqVUfJHGzhiWxbe9rgIkFnDuSEWjhyH s8sxL3+Hy2pWqybRgzNzQ7q6J4mLjQoS4vByCCfptx3rogti3fAcOlkZJqLiz7YEdizRk3 T74L39IFNwiqltXLhPT+bKruEV4r5q+53aQd59VIehfsM/DleHmSCwxSvkPitGE4Gt/TvU 3gVvszbuMR9wHdEhL0KWQ/REvEYOlwoba3p70PrPASg3Gk3VX07r/LXGyGueakN4hokXvE UBGl46ZHoe1eObR8RSfSLph2TfNn74kAxI3oLBf7j3JX88ADMB+20v2RIyrKdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783534193; a=rsa-sha256; cv=none; b=GaW2siRMovWRAdq024xYw0CiQgiLf1aIllETpkfaAcTFKmFbSIon9pYSkwJjgoWfCgUCYY O/pqs/Ozk/443+l+vzW+vTR6B+1D48UfbaCLi8QMniq7sdMCaCpi6mHo7MMkP2vGixeB1E Q6itw2Nyfkko+6EZzqrWUDu2nzUOWP7jGSldUivKYm+GL+IgBmPm/vszpC8BGOyl1KFqsA M1FMNvm1uUbEavUYxEJpL06dhjaZ7+RZFu8tP7UGRLolKU8olwGzVHf+dbBRBFeXMxk2by 3g7AnGf6LMKf/wPgqJ+WfQGGZs0kGFcHCzMRBpKPk1/db+YJXMIDuSUB5nKGDQ== 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=1783534193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=38dvOeg1n8wzb5PuNdV09W5JPflY0cEMifuqi4bhD18=; b=bVtyL8Se0nHbhJx6w9xjp3NOb0SNVl1Twkw0SnW0yxv2iZ9CRmjYSHY9stRnw5Aeg1WdPU da66ILeDaKV7d8mDP/2OhQREmtQ7TOY1fGsSXw01FyoY9pSjQCY9A3zhrbMJVF36EPHUuY HysIBrt5K9YDifEXDB4V9SEwndZhuMfnzHh6GdQOQbOd0aNbIb4us8THIhz5iWaTe2GSYH 7JF5sS1DtBlG6Zl8Nz2TQURcs5rhoXDLqoKvUuZz5hz7B7rdH922MuTUHS1bA7Rm3Nwqxo XeP886VKgjftsKfqssYEL7LNopIor6EEI1DbPXH8ORmQaU811T3rC2mxRKjY5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2T2yHlzZ6b for ; Wed, 08 Jul 2026 18:09:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37b5b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 18:09:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8a641f97130f - stable/15 - if_ovpn: Fix a lock leak in an error path List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 8a641f97130fd397c1aeffdb5addacfe5d05b0e8 Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 18:09:53 +0000 Message-Id: <6a4e9271.37b5b.7b7a3663@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8a641f97130fd397c1aeffdb5addacfe5d05b0e8 commit 8a641f97130fd397c1aeffdb5addacfe5d05b0e8 Author: Mark Johnston AuthorDate: 2026-06-20 14:12:19 +0000 Commit: Mark Johnston CommitDate: 2026-07-08 18:09:34 +0000 if_ovpn: Fix a lock leak in an error path Reviewed by: kp MFC after: 1 week Fixes: 04a7134c1e92 ("if_ovpn: fix use-after-free of mbuf") Differential Revision: https://reviews.freebsd.org/D57696 (cherry picked from commit f7b71f832c990da0bf203095f02405df665529d0) --- sys/net/if_ovpn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 7c416055e939..b4796fb95589 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -2517,6 +2517,7 @@ ovpn_udp_input(struct mbuf *m, int off, struct inpcb *inp, m = m_unshare(m, M_NOWAIT); if (m == NULL) { + OVPN_RUNLOCK(sc); OVPN_COUNTER_ADD(sc, nomem_data_pkts_in, 1); if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1); return (true); From nobody Wed Jul 8 18:09:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2W0yhkz6kcqn for ; Wed, 08 Jul 2026 18:09: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwR2V68dsz4CWR for ; Wed, 08 Jul 2026 18:09:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783534194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Rn9XpJlDqDp5yer7/f6r1103pId8RcGHkFCH6CuqOA=; b=ZTj0f0ztYrXlhk/AsybAneKrBXpjI2MgBwMfqqRpXlvFyC+f9LnQQKiYG5sE41oc+rkDGx gVv5Qu2hsEijTc4DGbDz+xATkvv1I5ISFMbbqGuY7sK+tqPzNouTqZitiEnR1HH6hZ+gCn TtH2PzGBbwOz+BEX91W+8RuaMKVbWCRuf39WXHTm2xzf2oE+C1lWvtaxP4nLW/BpwqtbNZ JZ7gon4FpElhRhy1SVpZwceIG/iGCw2ruTECVRuBukkKD5BrsUxrEBCVNzw+wwcA8ogktz M15P/7I2kNjDdGMgFX/YrusJECeSDI8QX68U2vJqXc1HbtFaa1OlYAReWusVjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783534194; a=rsa-sha256; cv=none; b=CbFL5EOgfTvYZl/0XUEZrKz9EACLWcdrrYfQ2r849UT/o71sxqGT+Dx4Sc2A0Z8hmUAmgq oo6VdOgS0jlTrNKQ+Mju2gY2T4jLaR3rANjM0fBuOiF+gc+Aq145IP+mB7zUrGmTSozGnZ 5CoiZX51szFRXsWI5UM4aPqeKa+KsZH3DoW5cTeH3+y07NbES73hgJCjgVNTDl9LOnNs6c qJ3iKx2n3qQCyFrgU5R/L14GkvsNwZ2igD8uy4I5YUEcMub7S5+uEZBlWk2dY2/JhDpars mXTVvoSGBEZi7PNaVj6fEPxuceqik1estI9Z9RIZ06MS44aANZd7Z+NUo0YCUg== 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=1783534194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Rn9XpJlDqDp5yer7/f6r1103pId8RcGHkFCH6CuqOA=; b=a8MxjXpIJKAscVlJkNzcOBXOYP9xRbWA1vsg79eDWv/qzn9JJ0H30SuKSnuu3OVOBcBB4z r6Zgp9OwDvx4gIYH23kAw21NwjdjG4JuPGZdV3cRbN61qAUj5EMQsTEOgBePT4VGCJYE3e uEqO78P6Z9mND6y433b99mJZu0cJRhSxWXd0Wq+ISvT7eG8zcCc+O5ijo61NZEC3edj1C0 BXNSLFQwfiqGo8LKHQyrvNXow8wcmXScslVmcjTh1hXYI1Fr8vvzJ1ZB4DZZxpzMgMsYj9 THtQbZlVOkfdOY+WTqo7CWseQPEz1mvfhzTbxI/5tnI+QGZ7IhpIvNai2qabjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2V3pLKzYvy for ; Wed, 08 Jul 2026 18:09:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37cdf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 18:09:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e19e2017f7aa - stable/15 - install: Explicitly include sys/param.h for MAXPATHLEN List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: e19e2017f7aa1e36f508c028378cf90cdcdb9811 Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 18:09:54 +0000 Message-Id: <6a4e9272.37cdf.656ed717@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e19e2017f7aa1e36f508c028378cf90cdcdb9811 commit e19e2017f7aa1e36f508c028378cf90cdcdb9811 Author: Mark Johnston AuthorDate: 2026-06-22 20:19:29 +0000 Commit: Mark Johnston CommitDate: 2026-07-08 18:09:34 +0000 install: Explicitly include sys/param.h for MAXPATHLEN MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit ca89b0fa1a93744a5bbf7a5c949826bbee4e2559) --- usr.bin/xinstall/xinstall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index c5acd536ef64..188812bbf7dd 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -30,6 +30,7 @@ * SUCH DAMAGE. */ +#include #include #include #include From nobody Wed Jul 8 18:09:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2X1L9Dz6kcjb for ; Wed, 08 Jul 2026 18:09: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwR2W5hPJz4CcF for ; Wed, 08 Jul 2026 18:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783534195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mACW/iVeHbllCHc/0RFjkexoQFOYKFLM8Dr9V/JN9LI=; b=kDIwFH8+u18QSFjO7Rs3h4lwKrMJGGhzbw3ZBJpUrEnLfytgZeh3aLyoAO7OJAD+MwZZJq PCK4YC4Xt3FpaTW1nVM9whsioc/WByp1qIfIiPPauRFkOSoj/NjT2WzUb9q4/P3t4xwpHE XVL8G4Ucrhlh+/bqkPRB32VANdk0Nu/RLR9jumAtPx2xZ16GoJZ3S6JMF3d0PeoEv47Beg EaNFTgB2Ja9UW8CgXUK+St2jIGKOVjPvcDK5X7GehA6Rwb1mlibXf8osDTjpPFQIwhf9IT xSBM3AM0DxxYCveu7Ur9qvBHXSqX0+qvdZN3Lp7gngkfzSaTcpIFxThPsY+9oA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783534195; a=rsa-sha256; cv=none; b=ZeayQhe05k4TeossW/RO2QiZfgJsHlbiAfrdzw3pWcRtZ97BJoVVd+qxWVMSLeyNGT2XRH 35XiyKW6ff7xE+nzhy6ikr5XK2kasnzXfPR2f2Mf+dDPq8US4PSU41HbZ+Hx7hTB1+AYC8 9aWnt2sCLM5snThQi96x07mhKVeBXOBcaorxfYjuFc2jYKTAyFpSMJy0aqPdvxzMoUF863 t1KBUFdicYSYZs9wxE5ME4AqnpRah0NQgb1E/fm+ACiYPJQGAPXG248lO+WyQTBP9Nm6JT 2Ora8XWOWn+Tw1a9DLrgRpIAy9o6VHvg3pySXT6YzEE1LdEV82OMNcHxdrjpbQ== 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=1783534195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mACW/iVeHbllCHc/0RFjkexoQFOYKFLM8Dr9V/JN9LI=; b=rSofXH6exu0nviPZP1jrXEjTiLQUl4t5uZsyjD6Ii5UezXHgpXiwE0BFp7edFVMCqG/VSS zHM/SZiaM48q8TRmo6PV43sMSHXIE2rjaJwXrXfKaBui6l+LI5zjzKf45b9jX0DQnwOCOd LtZf0Afp7GBD1+PIQB/vYszVuxbojZwNIAiu/8cKBBNoYkZACnbNahNrROKZZZXydk5VMV 239sKt+7x/eY3RYn4A5TtsQByP3cpXbxUBR7A2gD9ilSjj2eTznTUQT0ilw8ga0m9T9ZrB kWMz+g/yrdfsPaj4OkmEheB3rgTd7Kqt2ry5Srs2T9V2tB6S66U7c/7roGCQTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2W4ck4zZKK for ; Wed, 08 Jul 2026 18:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3955b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 18:09:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b365fc1ad2cc - stable/15 - makefs/zfs: Explicitly include sys/param.h for nitems() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: b365fc1ad2cc35c037e7b409e713374dce94f7ef Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 18:09:55 +0000 Message-Id: <6a4e9273.3955b.2e770137@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b365fc1ad2cc35c037e7b409e713374dce94f7ef commit b365fc1ad2cc35c037e7b409e713374dce94f7ef Author: Mark Johnston AuthorDate: 2026-06-22 20:19:32 +0000 Commit: Mark Johnston CommitDate: 2026-07-08 18:09:35 +0000 makefs/zfs: Explicitly include sys/param.h for nitems() MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 88deb1cff92cb3620c248f32fa6e7bdbc5301213) --- usr.sbin/makefs/zfs/dsl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/makefs/zfs/dsl.c b/usr.sbin/makefs/zfs/dsl.c index 1977521d7f92..7a634272b7d4 100644 --- a/usr.sbin/makefs/zfs/dsl.c +++ b/usr.sbin/makefs/zfs/dsl.c @@ -28,6 +28,7 @@ * SUCH DAMAGE. */ +#include #include #include #include From nobody Wed Jul 8 18:09:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2Y3sCvz6kcT4 for ; Wed, 08 Jul 2026 18:09: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwR2X6Hzcz4CYm for ; Wed, 08 Jul 2026 18:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783534196; 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; bh=Z6jqpgynSnK1jlF6AGyjotVcH7lOGs45rnHmYHHYA0g=; b=vp92Lnh3jzB17DWnWVbt+S8lwwytQW9N4RpLbKLHLkOCObegJOB5/ncxYE8yNKOsQyTSjJ MLJC4sWoZH+AAhAMr5LOXMZOk8Icxewl0glNCurAOFQ04s8xhcL3R6nuSDGr8SjgIzLcbO SMIoaFkRn5UaoPOkd/hv6GDVBMf7e2ZysRv0XiSUpj1bcWP3QDsj9yi9MfpJCNAku5jnCm 0icEZA2fL8nkGYlgmnvU84AobK/oXyxFLNc3r40tQ5r0y7YrEtJ/Ix9rPe6xSkX8bPkbY/ lQsjSLA4d4V/ulA7rBIra52wAWnw+NsAMCwHZ9CmntTX1nCTgslduuy50aHxXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783534196; a=rsa-sha256; cv=none; b=oAw3weD59JJMQP/MmuVFJ2hwCFwEcpt4vCR8HHRPp2IJIziyLoEcfzT9cstVODdSh3bO61 5bzQGcKFLR3TggYdbhfOUt0Li3yLmsrSfXX1B7p7Bj2AEmv9SnRNhWyEivz7oyUbfWE4PX xroOBX8AoxfJuYec7/cYHv/gzRurxP8r5gKDosndi09Ns9W3Fx9l0XPSGbGqnnPOvvB+cY i8DocvVAwD4bQdbw3da8cVll/gcopOS7ANE+FoGrJeFiQKy3MiAPpvBczFiAoU7KimGFKB oISuk38nCe0kwanMBdB1QBuuLdcnwap+tQAil5rL2gPWLSEz4x2oWxUs1ZH53g== 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=1783534196; 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; bh=Z6jqpgynSnK1jlF6AGyjotVcH7lOGs45rnHmYHHYA0g=; b=dqaunpll0hqrxvFRMaK8UqbltCS1i4RlZhloh+a7SI+VtKJqJG5oUZU0KFVM0WMd1YQiSR lkBsIW9TLz6x3N/oBZ9EYUB6grccBseioipgtTmrLH43a6/mHnSgGBhhmvk1R2mhgP//RY 25//t3KZ4ESBuznNSmOszP4Ome/PH+K4zFHhtgjeyZb6/JEdK5ar9DjrhrBkxYvpZV1Huh ca4EX0sM61pMhoBS0mzRa26K5gRO72xlMHRvqDOr6zB4OiOikfH6gFtWIiTH0HfX43SBM4 DQVfzfys90zKzuIEOUKB8RQJeY1/hTjpsw2nKB0z/5fzPGsMYC0FKzq5t/gwSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2X58SVzYw0 for ; Wed, 08 Jul 2026 18:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38a66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 18:09:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jane Smith From: Mark Johnston Subject: git: fae2b85dfee6 - stable/15 - librpcsec_gss: Fix an off-by-one in rpc_gss_get_principal_name() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: fae2b85dfee628637cd645ffa98d411e2ec0e420 Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 18:09:56 +0000 Message-Id: <6a4e9274.38a66.198e5196@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fae2b85dfee628637cd645ffa98d411e2ec0e420 commit fae2b85dfee628637cd645ffa98d411e2ec0e420 Author: Jane Smith AuthorDate: 2026-06-22 21:40:53 +0000 Commit: Mark Johnston CommitDate: 2026-07-08 18:09:35 +0000 librpcsec_gss: Fix an off-by-one in rpc_gss_get_principal_name() Include an extra byte for the nul-terminator, otherwise we may end up with an out-of-bounds write. The corresponding bug in the kernel implementation was fixed by commit e3081f7e3e2d ("kgssapi(4): Fix string overrun in Kerberos principal construction"). Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57738 (cherry picked from commit 635ad6f2ec97e9c6b1f15620cd5ee84eb632082f) --- lib/librpcsec_gss/svc_rpcsec_gss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librpcsec_gss/svc_rpcsec_gss.c b/lib/librpcsec_gss/svc_rpcsec_gss.c index 73b92371e6d0..a15542330697 100644 --- a/lib/librpcsec_gss/svc_rpcsec_gss.c +++ b/lib/librpcsec_gss/svc_rpcsec_gss.c @@ -247,7 +247,7 @@ rpc_gss_get_principal_name(rpc_gss_principal_t *principal, * Construct a gss_buffer containing the full name formatted * as "name/node@domain" where node and domain are optional. */ - namelen = strlen(name); + namelen = strlen(name) + 1; if (node) { namelen += strlen(node) + 1; } From nobody Wed Jul 8 18:09:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2Z3zbzz6kcqw for ; Wed, 08 Jul 2026 18:09: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwR2Z01Gmz4CmL for ; Wed, 08 Jul 2026 18:09:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783534198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xzFrtczXyWYdVIzQPKfxvAQJWtW70H1W08f+DNQX+yE=; b=eeEHiD9G68NJ6aD3auQTfEYc9dFO5EKc7Mk2VONXy/niE8m73Zan39LMYYaGg8z7nVAv3T VlaGgoCl3CViac3oKAf3mL9O8Mb56pnHs7A2WFa8gx0aryhvYymCDNLyr2H1p880lYJgCC 7bngULVyO/Gy7cqXla3Haa/+MshaRGlXNFqH490EtQjRYuYw65X2izjmSoqv6TaZobVU1W 9HCYmai3vQIVVkM1g4VywkbRYo2uIUuYAL2sV74q0xIhhCnTEMTJBk0Iy7j2Vw26IDNQN3 HZrYujzequ/Fd5znldnOGM6w7l9FamW08NLdhCABbFGeDwtjNZgn+otLUofRRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783534198; a=rsa-sha256; cv=none; b=kK51iQFA/WBna6cGq3VISsbokp8SQa02hvdYqrlFblK6zXrarl5g9vqL4+iZ2FVKJPg97h i/NHRBxPkEE9tSHlJObxlrvxVb/Jtyxap2A7DRQ3FN9Hw+UqFJZPFmBKlsRZorMkVU6Vx8 lsc/GpuLMpi7ECu7GdUWVmh5zfnBr8dvzFW/gsgt4m6NsM3uV50R58ht65cOgpMSz7kZvC Q4IrRJKIdVHOXBlIF8xZSDC6kFwh2C/f6xWIJSpAe5vUBEJDmbm0qbPNxYuFX0JniKn2Y7 6ORAXO0EO00//NNa2JiHsltRjOW5mzIxgzLLWt6GPHSBLt0jpGIkKUIQuecUrw== 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=1783534198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xzFrtczXyWYdVIzQPKfxvAQJWtW70H1W08f+DNQX+yE=; b=FZS5IpjlZOUsBP4GwFB1TdiBPbarbDwOuO3NuaO7IjVfX4G249sge7U+Z9lZWGgi5rj+7i c6rVILmSwiP1MxPWgxu1XMZbOYuCPtFqWp3wzZD37MPrkwGz+7cbrV1TV5h8H/pBAKapuC +UmghQTW4f1aJ1RpBWWsGXea7nLC9JZTTqaa2IjVrZKoNH5yL6ieGdC7qIQq+/KbEgMUOg 4cP4d0IKO+0X3U05IGEu15hoKInbX/UnAVD6cnfey1v0f1JGQceqBcEdgrIRc3Am2YewSq 8VUs4E9wsE0CFE8cJXPY4TjTE0W+7xw4BV12aLjEiPPfEo0eBABkjwUCkfV6uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2Y5WHQzYkt for ; Wed, 08 Jul 2026 18:09:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38ac8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 18:09:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: bfcac89d989a - stable/15 - p9fs: Remove the "cancel" transport method List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: bfcac89d989a9153637da3899849f9237a346c2d Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 18:09:57 +0000 Message-Id: <6a4e9275.38ac8.455d4da3@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bfcac89d989a9153637da3899849f9237a346c2d commit bfcac89d989a9153637da3899849f9237a346c2d Author: Mark Johnston AuthorDate: 2026-06-24 16:54:20 +0000 Commit: Mark Johnston CommitDate: 2026-07-08 18:09:35 +0000 p9fs: Remove the "cancel" transport method Nothing calls it, and the existing virtio transport doesn't implement it. No functional change intended. MFC after: 1 week (cherry picked from commit 94989248641a17f5c2afc367df4845e4113779a1) --- sys/dev/virtio/p9fs/virtio_p9fs.c | 8 -------- sys/fs/p9fs/p9_transport.h | 2 -- 2 files changed, 10 deletions(-) diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index 2b276a60aa9a..f612a36b66aa 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -86,13 +86,6 @@ static struct virtio_feature_desc virtio_9p_feature_desc[] = { VIRTIO_SIMPLE_PNPINFO(virtio_p9fs, VIRTIO_ID_9P, "VirtIO 9P Transport"); -/* We don't currently allow canceling of virtio requests */ -static int -vt9p_cancel(void *handle, struct p9_req_t *req) -{ - return (1); -} - SYSCTL_NODE(_vfs, OID_AUTO, 9p, CTLFLAG_RW, 0, "9P File System Protocol"); /* @@ -443,7 +436,6 @@ static struct p9_trans_module vt9p_trans = { .create = vt9p_create, .close = vt9p_close, .request = vt9p_request, - .cancel = vt9p_cancel, }; static device_method_t vt9p_mthds[] = { diff --git a/sys/fs/p9fs/p9_transport.h b/sys/fs/p9fs/p9_transport.h index 143c29f2382e..f217f4f76cfd 100644 --- a/sys/fs/p9fs/p9_transport.h +++ b/sys/fs/p9fs/p9_transport.h @@ -42,8 +42,6 @@ struct p9_trans_module { void (*close) (void *handle); /* member function to issue a request to the transport*/ int (*request) (void *handle, struct p9_req_t *req); - /* member function to cancel a request if it has been sent */ - int (*cancel) (void *handle, struct p9_req_t *req); }; void p9_register_trans(struct p9_trans_module *m); From nobody Wed Jul 8 18:09:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2b512rz6kcmN for ; Wed, 08 Jul 2026 18:09: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwR2b02l2z4CyW for ; Wed, 08 Jul 2026 18:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783534199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tcmJwXy1fXE7BTUwHY8JHLHTlDLsnbawjXbBK9sQZVk=; b=YMoB3DjG95pdnFTwoQEZtKjS6XHioAouJrDjlCDs5j3zU8KwYbzVJyNCkq9ZRjC9A5AI1a Um+S2c7h8Mj8ALnQYw51sw387WjIp3DgSrKzbSDxZe0B6C4GwJjWAyuz9SqskoXZxNmC6H WfBTn9Cqz/agwKSqtrOdVMu2zNOSjqr0iiVxOKBUCT2NRig341cxTm32LtN9VrO7xHm+xG vi+St/cesHCmaM3MWp0Nbgf41oF40IoIWz+6qygE0LV/8Vzqlp5xFifqtg21WsVcbXE8WQ Slmj82eSy9xH+qijmbGoEMPj4oR7gk/1IPPxEBenxH+qlH57cnS/JD9slt4Nig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783534199; a=rsa-sha256; cv=none; b=XMEBrlWewELdjJGI/rF1SClARAwX7my3BUGk3IVN4eGROyAoMRwTU9py4LfYwqtnslJ69Z yH0o/G+XV0ji2KwORPUaaChxgx98+6qIzUL4smPG30xrvYTBYfgX7Xh3jmNScGo6TaDYEP gIi9NsO2QDxc4wQTJ2U342zqrCXorsPhwYxdNNm+OCxAdlScJmrVg1E2gAzawMesCWdrt1 suEnXW5DO5T/b69hduOrjcYryrmwcc0Iy3m+vio3a9WhLftbjaFJP1TeLJKz11jSPAeT7b goa6Sk5CUBVMEGoHnXIw/dg316oNgP8FpDU7FXaBxOtnxxKsm9ZEF+gOMKgVJg== 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=1783534199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tcmJwXy1fXE7BTUwHY8JHLHTlDLsnbawjXbBK9sQZVk=; b=SrPq+GESEfnJTCvc1LuNba026ivM91RuBEJ4VWX7kHrvqTVErQ0IMjGSxeUFFsJGSj+kJS gf8GGy6SPd55ctHnBSeTsDl/PvKDgSow/GF/33z0W0ej3wPZYKbBsQpfTExUrO1I1jECFB rbGMB430FB8BJqkCMxRwp4pvSMBP6kB6Y21PQJxHklwQ2nkTNkzTBcMZghlJbH+UKWXmkZ W5t9MaKKn9InYYD5TWmO4IkfbM4zyx/mDxdByupf42SC+6J4AQ7o6KH5hRJnnAufsCr/8v QTEc6ZPVS+5S0f47aBK3PXZgwF3cqX+ABWH32vMq6K05aexqVlJgFPrvRXdR8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2Z5wf5zYhT for ; Wed, 08 Jul 2026 18:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a1fa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 18:09:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2e1226c3b2aa - stable/15 - libnetbsd: Avoid bringing in all of sys/param.h in sys/types.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 2e1226c3b2aa5960374fe8cf4aa150ebc1a5b3e2 Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 18:09:58 +0000 Message-Id: <6a4e9276.3a1fa.31e09fa4@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2e1226c3b2aa5960374fe8cf4aa150ebc1a5b3e2 commit 2e1226c3b2aa5960374fe8cf4aa150ebc1a5b3e2 Author: Mark Johnston AuthorDate: 2026-06-24 13:16:45 +0000 Commit: Mark Johnston CommitDate: 2026-07-08 18:09:35 +0000 libnetbsd: Avoid bringing in all of sys/param.h in sys/types.h It's okay to hard-code NBBY, as the value is somewhat unlikely to change. The pollution from sys/param.h makes it harder to import test code from NetBSD since it can introduce conflicting definitions, e.g., MIN()/MAX(). Reviewed by: ngie MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57754 (cherry picked from commit 0976744085bcd7ebda9779b02d78a85254b3e352) --- lib/libnetbsd/sys/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libnetbsd/sys/types.h b/lib/libnetbsd/sys/types.h index 97040b5cdec2..5176371d898f 100644 --- a/lib/libnetbsd/sys/types.h +++ b/lib/libnetbsd/sys/types.h @@ -31,6 +31,6 @@ #include_next -#include /* For NBBY */ +#define NBBY 8 #endif From nobody Wed Jul 8 18:09:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2c4sp3z6kcpd for ; Wed, 08 Jul 2026 18:10: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwR2c1Qdrz4Cyk for ; Wed, 08 Jul 2026 18:10:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783534200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HoEU9Pflnzghqekxz2A9Ug0OqBJVMlMuGXEYaQ5bbu4=; b=jK0s6qm5CbYl8ssjfiLhuAcJ+mJ+bbKnjvqGJpeUvubbU4njiCbzBTMdDuN5v7Ha0gZixI SKxLVQsaVWHpZeVzF5YyBe0D2l8ZY84mnrk+FXM9wWn5ss8MMgISsNTxZIkSH6nl63Mq6q wolJyiCvTkRyH3KmlxeeWECz5tf2H5cUJ15UOToQCsudJCD6yTYldEpzMTXjJtp76fqzDY voPC6q+9PWraNaqiHpZhcMgc8yuOXoVAb1BrmqthwjrOWdAa91TviH0rbEVe9dFr/XfNNm rfrUXO1MB0WiKmnyMIfbm4GnSWvzY8eOYNoPWkuZzK5OywsP+jiV14vuFi8qjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783534200; a=rsa-sha256; cv=none; b=tAZC58V1tcNgdRprfjoHXllROJqBKyDmqp+5Fpx8vUwjg63zYz5QgLiuvZE9KPsNDvnCB7 ZOh2MkQ61GZ0rRduHM8EDNHThrqYBXQzI1YVQrrizSFRy983EVrunp7+y3SK6z8KTGyFyZ k6eczDhbDppcseldMbwiOzztW0+u00XVVVl7bNWCu8Y16IBvWShHSKmUXGkKB8pNhdt0ZL Ums4zuIDr8NRw5bB2w0cEhqoxCylIb/wnKtBH2iAbRGzSQPpSqrliXNTrhuOPJ5hGGqHFD kdTfy61MqR94O2FpjH0lip8p5+r17l/Vplg54djTlelEV0CY6/FaKwNdzrdYfQ== 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=1783534200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HoEU9Pflnzghqekxz2A9Ug0OqBJVMlMuGXEYaQ5bbu4=; b=FHkrQ5lMoj4BIoBetvPDwt4SFvTX1+ZtAOXjD1AQ7Sl415xZxCfopEICAScueC7WqMm9mT voBnXXIEtTxDVFQrnPpJFAIr375+2zNCi4gx9yN4xWff54Hab3fd5Cw3d3oqnFUBPX7vFV sR0HO9sWCK+5H79k6Mk+jlc31AO5487avOTTsDyd29oU+ronvTeFJ0fPYUkBzYFvrhAm05 ShL5UqOhkSf5IB75EzgSmqe64LhZQxgGEEQ/1d4cNvfKuM79dOBmZDaOlI6C6268Vwp3oW ipfdEbcU9XDGoAk3PHBKSuAsr4onaBVCxgLfHeLw1KxvWnGWjX+aFbNmt+lrjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2c06vSzYP0 for ; Wed, 08 Jul 2026 18:09:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37af6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 18:09:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1a715cbba276 - stable/15 - virtio/p9fs: Define the channel list mutex as static List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 1a715cbba276d422cf015d921c39df1933b3ee05 Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 18:09:59 +0000 Message-Id: <6a4e9277.37af6.5a2463dc@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1a715cbba276d422cf015d921c39df1933b3ee05 commit 1a715cbba276d422cf015d921c39df1933b3ee05 Author: Mark Johnston AuthorDate: 2026-06-24 16:54:10 +0000 Commit: Mark Johnston CommitDate: 2026-07-08 18:09:35 +0000 virtio/p9fs: Define the channel list mutex as static No functional change intended. MFC after: 1 week (cherry picked from commit 2586f9f459adc6610957ba0d74a167b85fe24ac7) --- sys/dev/virtio/p9fs/virtio_p9fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index f612a36b66aa..3f06a90ca981 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -76,7 +76,7 @@ struct vt9p_softc { /* Global channel list, Each channel will correspond to a mount point */ static STAILQ_HEAD( ,vt9p_softc) global_chan_list = STAILQ_HEAD_INITIALIZER(global_chan_list); -struct mtx global_chan_list_mtx; +static struct mtx global_chan_list_mtx; MTX_SYSINIT(global_chan_list_mtx, &global_chan_list_mtx, "9pglobal", MTX_DEF); static struct virtio_feature_desc virtio_9p_feature_desc[] = { From nobody Wed Jul 8 18:10:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2f3cBKz6kcmX for ; Wed, 08 Jul 2026 18:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwR2f1kPbz4Cwp for ; Wed, 08 Jul 2026 18:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783534202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CosdIAHnXvcSAoEE1AcleEEv3TQ7CJWr30Nr3LUFdOM=; b=vTqnAvMrA8tuFTAjptG/v4v5sC5M0K5IX4oLqqkHbN3/1bNj+gspbuy9SxrVWv/D0dHIyN 0FQSVOM7nikEoFE7jRsBn6Ep01YfaFsTWwd2FjKn2+vt5jgTkdmIaVSDhDtVVDs1T3QJLB xxFfMoRf1dXYz9e1T9+HTK0ts8fc6jAgomz7trvatkQcLOan5pQqsacPp9AF4D+fwFpN2N un8bQvTtTkNPZFZhBlhxvZeq1A0NGaMy1Ucrofyay+iZW4LwO7Bv0lZZWY3DAX1bNSShTJ 1qaucsVd+54L+8BC1AJyJYxJLhjYsOF1Mk0Ag1rFXkBBqtebPngFV2+cT5wiig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783534202; a=rsa-sha256; cv=none; b=w7lKcR+TtB0V9F7fv3/NEjEWX9CzcpfX/YB9Mj9GKpkTlORgzKwzJONXjMypIQWui8/LkB KXREz8faZD86aWkDWwa0n08KCs034jeEaRf+/6ra6IZzVhzp0XUCP4O+e/0hIIOF8slpWh lysG9U5wMxpHD2q6Ksa3pMfhbxN79e4Ovsi6F1ehM5Zaal8TwbagoRVLeptzqGwflfDHF0 A0W4nSAcELNb5hQJURSJ+mvsc3D5aT/OguiSJiRwrC0OC4rqTfHh5vB3Vi/nOWd0PAo2bA NqdPav/TgSGF+aZswP4Eh3Xvt9ri9F2ns9hthBtm7aSmWt2dK8ghfOn1tjx6QQ== 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=1783534202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CosdIAHnXvcSAoEE1AcleEEv3TQ7CJWr30Nr3LUFdOM=; b=hWyPomtFWLYF4oCXKoapCPf9W8BsvOI9IpdtIvQE0hA18l7Kb79Z8Ux5M7LLMQn9ho6qxx r5eoqJpS9etAupSZxfam3OKc5DAfKAXZoNwYt1xh6ljN6NCW1h8+IVwvUshm/E2t7uzPMp 5aoYOt7ER2mf0fm7r/CtamqUM7GlWSlQJ4DzjRgtTsW+Q4tpqVESlBcZ0046q5gEPddfWC hoEGykFdYVn1I1lBO9ppBwVZW0YRONR8FMttaDzstahjwEHp/4jt+28ZF+9J3VdPHukqis RaGFfOT4TMnm3gb2aNe6zSSmFwb7Z+LHhY3QjvMsVTe7ytsEHY8Q2kPdh6hiTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2f0P85zYw2 for ; Wed, 08 Jul 2026 18:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3907d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 18:10:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c8cc44270404 - stable/15 - unix: Fix a socket refcount leak in uipc_sendfile_wait() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: c8cc4427040443512411090b4bc75459c13b1ae6 Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 18:10:02 +0000 Message-Id: <6a4e927a.3907d.fd3efe4@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c8cc4427040443512411090b4bc75459c13b1ae6 commit c8cc4427040443512411090b4bc75459c13b1ae6 Author: Mark Johnston AuthorDate: 2026-07-01 15:35:10 +0000 Commit: Mark Johnston CommitDate: 2026-07-08 18:09:35 +0000 unix: Fix a socket refcount leak in uipc_sendfile_wait() Fixes: d15792780760 ("unix: new implementation of unix/stream & unix/seqpacket") Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57967 (cherry picked from commit 2a4b8fd1dc070e71fbaab6f12c1c9e4452652aa7) --- sys/kern/uipc_usrreq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 87d7aa411b4d..bbea5ef3914c 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2430,8 +2430,10 @@ uipc_sendfile_wait(struct socket *so, off_t need, int *space) SOCK_RECVBUF_UNLOCK(so2); return (EAGAIN); } - if (!sockref) + if (!sockref) { soref(so2); + sockref = true; + } error = uipc_stream_sbwait(so2, so->so_snd.sb_timeo); if (error == 0 && __predict_false(sb->sb_state & SBS_CANTRCVMORE)) From nobody Wed Jul 8 18:10:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2d5GB2z6kctR for ; Wed, 08 Jul 2026 18:10: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwR2d1cp3z4CZH for ; Wed, 08 Jul 2026 18:10:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783534201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFkSFASAk6RKh95EZ4UhsZ46Y5jrKJNdzgSOVu8dsjw=; b=AvkVyEPJIUEqZah2qvcgzacImyhVwPXFnOIOXRxTKhUSCrarcN3jTpiGAYIgL8rripFVhg LoArxwmPxDc7BASMP2yYeqMhM5NQtw4DH5mahkSLPLcbdAbMkFhmaJqSyr66iUM6H0Ljbb PLvr4Xho245kytdvtQhl08pqq6T8yEmzlWRhh1MndLmJcoN50p1ZePwxFifUQr5emhPQ2T ynq4oK1pDT4EgN7kSaLBzVncJ+MZN6Jmw5T1iBp5vlT6KGELtryvk4RUg02bDoK9qBPhu+ b9IttSNr1I6WxpQKc4QidgCkFsruz8btakSkSvK6vBAMuvohEcIchxCxCw0qKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783534201; a=rsa-sha256; cv=none; b=XuKxLxf5WjgoFFYsx7+WaPq8LVs6nnX8qBa0gAf/xOfCq5FRZTkN0Jt+JXhaufe+5nSXco 9FnlfeqgqKa1vxU7r29ik5h24uB2CAa/BNb06YateqAJ+aRdDVmBkdjYezwhFQVwPuLXtK CYzYPj0YaUkUbGLBz96Qo0hUOWuamUIJQOw5NYxcIct/A93dT1SpPQmUX4cR/TQ81DyVnY Jif+K1g2ne8KiLuWFEXPWdrYxLiXzFvKFA9aFRlubVEoPzCSdyggxA5RtWpoZB/w+2J1O5 HIiaW2wFS2wqVuBVf4TSUCJ0/MJ/GkAAHfHbp1Y/aelHsRia65V34bWNkiqIpA== 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=1783534201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFkSFASAk6RKh95EZ4UhsZ46Y5jrKJNdzgSOVu8dsjw=; b=Te2bCvkgRT78mJg9E746wIg+XnAAcMZERB2U9sgcAaMBJKT3lS+RrZV9N+8Rg11rHsJ5ap 6EzFOlEY5js9kJpjoFNjNsgjJMZ8mfS1Zvgbsj8N+6HlMjYpKNcD8V0bMGCYpTn0jVyd0d xFyvLTApQ8BS9fKmIgiajudb+YL/ZBE4AHXq6+sUU1Pw6QR9E0zZwwX4d8FDGmrwIEltt4 oaQIdhCnXASa+0FpxznWvW6ySFW5gFWXClmmZC2Ay/jKlk/NS8spn30vpgKAqQBu6AjSpd sBorh+vXLT1VlfKF0tcZ1Uj5eA5bxiA6K8rnavwX29z3GCvjR+i26sRIm+N5HQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwR2d001mzYhV for ; Wed, 08 Jul 2026 18:10:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39ab5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 18:10:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c0dc283b1a58 - stable/15 - tests: Add pjdfstest integration List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: c0dc283b1a589d2505b3cca303f0ff6a73af3aaf Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 18:10:00 +0000 Message-Id: <6a4e9278.39ab5.77688c13@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c0dc283b1a589d2505b3cca303f0ff6a73af3aaf commit c0dc283b1a589d2505b3cca303f0ff6a73af3aaf Author: Mark Johnston AuthorDate: 2026-06-19 13:27:04 +0000 Commit: Mark Johnston CommitDate: 2026-07-08 18:09:35 +0000 tests: Add pjdfstest integration Use ATF to wrap the new reimplementation of pjdfstest that came out of GSOC 2022, now available in the ports tree as filesystems/pjdfstest. So far I added tests for UFS (with several different option combinations), tmpfs and ZFS, plus ZFS+nullfs. All of these create a memory disk, initialize the filesystem, and point the pjdfstest executable at it. In the future it would be good to add tests for at least NFS and p9fs. Reviewed by: asomers MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56605 (cherry picked from commit 8fd4d1c0fff8441b42dbab767810db7aeaf796c3) --- etc/mtree/BSD.tests.dist | 2 + tests/sys/fs/Makefile | 1 + tests/sys/fs/pjdfstest/Makefile | 12 ++++ tests/sys/fs/pjdfstest/tmpfs.sh | 60 +++++++++++++++++++ tests/sys/fs/pjdfstest/ufs.sh | 130 ++++++++++++++++++++++++++++++++++++++++ tests/sys/fs/pjdfstest/zfs.sh | 96 +++++++++++++++++++++++++++++ 6 files changed, 301 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 1266aa5b330d..ac233fafe50c 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -826,6 +826,8 @@ fs fusefs .. + pjdfstest + .. tarfs .. tmpfs diff --git a/tests/sys/fs/Makefile b/tests/sys/fs/Makefile index 254394f43714..823a31a4dbbe 100644 --- a/tests/sys/fs/Makefile +++ b/tests/sys/fs/Makefile @@ -12,6 +12,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/fs .if ${COMPILER_FEATURES:Mc++14} && ${MK_GOOGLETEST} != "no" TESTS_SUBDIRS+= fusefs .endif +TESTS_SUBDIRS+= pjdfstest TESTS_SUBDIRS+= tarfs TESTS_SUBDIRS+= tmpfs TESTS_SUBDIRS+= unionfs diff --git a/tests/sys/fs/pjdfstest/Makefile b/tests/sys/fs/pjdfstest/Makefile new file mode 100644 index 000000000000..62e937198e34 --- /dev/null +++ b/tests/sys/fs/pjdfstest/Makefile @@ -0,0 +1,12 @@ +TESTSDIR= ${TESTSBASE}/sys/fs/pjdfstest + +PACKAGE= tests + +ATF_TESTS_SH+= tmpfs \ + ufs \ + zfs + +# Tests use an external resource. +TEST_METADATA.p9fs+= is_exclusive=true + +.include diff --git a/tests/sys/fs/pjdfstest/tmpfs.sh b/tests/sys/fs/pjdfstest/tmpfs.sh new file mode 100644 index 000000000000..cd56acbd04c6 --- /dev/null +++ b/tests/sys/fs/pjdfstest/tmpfs.sh @@ -0,0 +1,60 @@ +# +# Copyright (c) 2026 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +setup() +{ + cat <<__EOF__ > pjdfstest.toml +[features] +chflags = {} +posix_fallocate = {} +rename_ctime = {} +stat_st_birthtime = {} +utimensat = {} +utime_now = {} + +[settings] +naptime = 0.001 +__EOF__ + + atf_check mkdir mnt + atf_check mount -t tmpfs none mnt +} + +doit() +{ + atf_check -o ignore pjdfstest -c pjdfstest.toml -p mnt + atf_check umount mnt + atf_check rmdir mnt +} + +cleanup() +{ + if [ -d ./mnt ]; then + umount ./mnt + fi +} + +atf_test_case tmpfs cleanup +tmpfs_head() +{ + atf_set descr "Checks that pjdfstest passes on tmpfs" + atf_set require.progs pjdfstest + atf_set require.user root +} +tmpfs_body() +{ + setup + doit +} +tmpfs_cleanup() +{ + cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case tmpfs +} diff --git a/tests/sys/fs/pjdfstest/ufs.sh b/tests/sys/fs/pjdfstest/ufs.sh new file mode 100644 index 000000000000..4bba5698df00 --- /dev/null +++ b/tests/sys/fs/pjdfstest/ufs.sh @@ -0,0 +1,130 @@ +# +# Copyright (c) 2026 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +setup() +{ + local md + + atf_check -o save:md mdconfig -a -t swap -s 1g + md=/dev/$(cat md) + atf_check -o ignore -e ignore newfs -t $@ $md + + cat <<__EOF__ > pjdfstest.toml +[features] +chflags = {} +posix_fallocate = {} +rename_ctime = {} +stat_st_birthtime = {} +utimensat = {} +utime_now = {} + +[settings] +naptime = 0.001 +__EOF__ + + atf_check mkdir mnt + atf_check mount $md ./mnt +} + +doit() +{ + atf_check -o ignore pjdfstest -c pjdfstest.toml -p mnt + atf_check umount ./mnt + atf_check rmdir ./mnt +} + +cleanup() +{ + if [ -d ./mnt ]; then + umount ./mnt + fi + if [ -s md ]; then + mdconfig -d -u $(cat md) + fi +} + +atf_test_case ufs1 cleanup +ufs1_head() +{ + atf_set descr "Run pjdfstest on a UFS1 filesystem" + atf_set require.user root + atf_set require.progs pjdfstest +} +ufs1_body() +{ + setup -O 1 + # UFS1 doesn't have 64-bit timestamps or a birthtime field in the inode. + cat >> pjdfstest.toml <<__EOF__ +expected_failures = [ +"utimensat::birthtime", +"utimensat::y2038" +] +__EOF__ + doit +} +ufs1_cleanup() +{ + cleanup +} + +atf_test_case ufs2_nosu cleanup +ufs2_nosu_head() +{ + atf_set descr "Run pjdfstest on a UFS2 filesystem without soft updates" + atf_set require.user root + atf_set require.progs pjdfstest +} +ufs2_nosu_body() +{ + setup -O 2 -u + doit +} +ufs2_nosu_cleanup() +{ + cleanup +} + +atf_test_case ufs2_su cleanup +ufs2_su_head() +{ + atf_set descr "Run pjdfstest on a UFS2 filesystem with soft updates" + atf_set require.user root + atf_set require.progs pjdfstest +} +ufs2_su_body() +{ + setup -O 2 -U + doit +} +ufs2_su_cleanup() +{ + cleanup +} + +atf_test_case ufs2_suj cleanup +ufs2_suj_head() +{ + atf_set descr "Run pjdfstest on a UFS2 filesystem with soft updates journaling" + atf_set require.user root + atf_set require.progs pjdfstest +} +ufs2_suj_body() +{ + setup -O 2 -U -j + doit +} +ufs2_suj_cleanup() +{ + cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case ufs1 + atf_add_test_case ufs2_nosu + atf_add_test_case ufs2_su + atf_add_test_case ufs2_suj +} diff --git a/tests/sys/fs/pjdfstest/zfs.sh b/tests/sys/fs/pjdfstest/zfs.sh new file mode 100644 index 000000000000..44e539b7abd2 --- /dev/null +++ b/tests/sys/fs/pjdfstest/zfs.sh @@ -0,0 +1,96 @@ +# +# Copyright (c) 2026 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +setup() +{ + local disk pool + + truncate -s 1g disk + + cat <<__EOF__ > pjdfstest.toml +[features] +chflags = {} +rename_ctime = {} +stat_st_birthtime = {} +utimensat = {} +utime_now = {} + +[settings] +naptime = 0.001 +__EOF__ + + atf_check mkdir mnt + pool=pjdfstest$$ + atf_check zpool create -m $(pwd)/mnt $pool $(pwd)/disk + echo $pool > pool +} + +doit() +{ + local mp + + mp=${1:-mnt} + atf_check -o ignore pjdfstest -c pjdfstest.toml -p $mp + if [ "$mp" != "mnt" ]; then + atf_check umount $mp + atf_check rmdir $mp + fi + atf_check zpool destroy $(cat pool) + atf_check rm -f pool +} + +cleanup() +{ + if [ -s pool ]; then + zpool destroy $(cat pool) + fi +} + +atf_test_case zfs cleanup +zfs_head() +{ + atf_set descr "Checks that pjdfstest passes on zfs" + atf_set require.user root + atf_set require.progs pjdfstest +} +zfs_body() +{ + setup + doit +} +zfs_cleanup() +{ + cleanup +} + +atf_test_case zfs_nullfs cleanup +zfs_nullfs_head() +{ + atf_set descr "Checks that pjdfstest passes on zfs mounted via nullfs" + atf_set require.user root + atf_set require.progs pjdfstest +} +zfs_nullfs_body() +{ + setup + atf_check mkdir mnt2 + atf_check mount -t nullfs mnt mnt2 + doit mnt2 +} +zfs_nullfs_cleanup() +{ + if [ -d mnt2 ]; then + umount mnt2 + rmdir mnt2 + fi + cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case zfs + atf_add_test_case zfs_nullfs +} From nobody Wed Jul 8 21:59:41 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwX7f3rw0z6kx69 for ; Wed, 08 Jul 2026 21:59:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwX7f0lXdz3Sp8 for ; Wed, 08 Jul 2026 21:59:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783547982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JifCXEVdS2587ViTYGY+Blcf3ZTILUbZalZk9Y+WII8=; b=ZOgvNLGcJHlzD1MDlAxJ1vSaotOKeUG8Q60qcEyqKgyZyDmg31zsy6bBEmIpA9KegYDyzU +VvShmwLTXtfUeEkH8eDMD9lgYn8WbAXeddHaKr+56U3GFSCE3Gx9p2r/SRHLs37GV5fhR zoCgSM866C/8vDDho91PqgZsXlbvlRNgmXvcN+De6CnATmhWfHkIPjn2ZrRu0t8TJfk1Hh sTtNr1JmlyvFC+Pm1Rbtg54m7bJRMUuk0R1hqyftsyYp0zDv5DqQQqDPNZPQtR0bXp+Z88 pQU7BmDnSH7R7mwaUGJD+97iUl4xUo/QGVjqtbGJiDbuSwkBUC1JGGrKj+LN4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783547982; a=rsa-sha256; cv=none; b=ZIIQs/3uH9hryuix79q+Dc3mflux5nZU0cBf2IikhskEBAQ23fDZfeTRE20Km9lPFe4z1R qHvQLw8YlOPKcXA7AVwGf1pdEV2hoFJ/HtS0gkhoJ2UmbRP/6ygTpuQbpYu5B4gPdoUnZ9 3ZNdgYbz4Y23TnX9kbVakpSz0u8+lmlUWbtyT89f+D2ejjL+z4LqWt1cQJ87nOtt1t76ra Hj9gKoBlgj7lWSKgYLwP5uEGJ8q7/Fe2jHZg+uvadsjDOi/DONf0BUueKuArEmIeApi76L v51LRV5X6OhJ2b82EyuLFZ5UKt59Jw09vKUtrAhV+yfJ8fuWf0lEAJHgQ0fkVQ== 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=1783547982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JifCXEVdS2587ViTYGY+Blcf3ZTILUbZalZk9Y+WII8=; b=oUeC8rf8bzvOREqTqMhTpmDUdfWn91rMshVlszN7OYMmosrZbLpLViTS4zY8dFFWKDbO1S 9jp/KopR7hoUMEvRA7unYtHqex/AExnJC/ZEsZ2kuYTC3K7psvC8R11Hz3uJ6IyAq7Ax5l Zz9RJwYzkbGn61PeV7v548V1w4swR0R5MXKT9nAVzTWD/Z0W9q3WOaK00eQsHD89rlo9eY COUimtlymm8+XXIaiUb/aZh+iRORl8l46/f2w3SkshTk6jjvdF1M3Vp7IM5oLcNNX2hJAe IMV3KQ9Q3uGVa0CWN2igxwo5hAoaAHJ97PJGMf5vFhz/XxCRTlmZXToGB1XjIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwX7d6xLgzh8x for ; Wed, 08 Jul 2026 21:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31b4e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 21:59:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Chuck Tuffli Subject: git: fa65155b3fa4 - stable/15 - linux: Fix sockopt copyout List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chuck X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fa65155b3fa44111e9b8217973714055bf721838 Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 21:59:41 +0000 Message-Id: <6a4ec84d.31b4e.32bc0668@gitrepo.freebsd.org> The branch stable/15 has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=fa65155b3fa44111e9b8217973714055bf721838 commit fa65155b3fa44111e9b8217973714055bf721838 Author: Chuck Tuffli AuthorDate: 2026-06-08 21:19:34 +0000 Commit: Chuck Tuffli CommitDate: 2026-07-08 21:43:31 +0000 linux: Fix sockopt copyout The Linux getsockopt did not check the size of the provided buffer when copying out the value, leading to buffer overflows (e.g., for TCP_INFO). Fix is to use the smaller of the option value size and the provided buffer. (cherry picked from commit 471fdd91d9156aeab026dc420fb97d97be872d65) --- sys/compat/linux/linux_socket.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 0e07b0a60ced..615ef12ec201 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -2168,10 +2168,21 @@ linux_sockopt_copyout(struct thread *td, void *val, socklen_t len, struct linux_getsockopt_args *args) { int error; + l_int loptlen; + socklen_t optlen; - error = copyout(val, PTRIN(args->optval), len); - if (error == 0) - error = copyout(&len, PTRIN(args->optlen), sizeof(len)); + error = copyin(PTRIN(args->optlen), &loptlen, sizeof(loptlen)); + if (error != 0) + return (error); + if (loptlen < 0) + return (EINVAL); + + optlen = (socklen_t)loptlen; + error = copyout(val, PTRIN(args->optval), min(len, optlen)); + if (error == 0) { + loptlen = (l_int)len; + error = copyout(&loptlen, PTRIN(args->optlen), sizeof(loptlen)); + } return (error); } From nobody Wed Jul 8 21:59:40 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwX7k2WG4z6kx8c for ; Wed, 08 Jul 2026 21: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwX7k0Smjz3T1F for ; Wed, 08 Jul 2026 21: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=1783547986; 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; bh=+6c709PEU+X/xL+zRpqCWIxrgqYZeic0940uygvJjTg=; b=Y4R2gjoGuLQgnqJx4FMqhZDDsptb83ygMjm5CtO+TXh4iClvvC/F22MwC+AZfcYYVSgTdv lYvxwcy2FDkxOIk2uEn5Vif+zFpSQfvyftos0qQqzkoz9SZwRq83EwTuMwVk2lzjoI31dU WRXHWrHiRXsMWKXOFyINAupMObYeljBg1VhsawymNGXnJTwcufIczaAoKbVlniUifwbpx9 jh2GvQhRPdum4BRmptUcBN6eDCRbapwvmbnSg7UkT/RaGkcfn8oZYc1tKnpsZrADuGFoE1 NO87g7FWLDJ+VxwSr7G5vCRLCTJB1tfOwW7Nc4w3wjTfl00AfriqvQ5cGl8rGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783547986; a=rsa-sha256; cv=none; b=tUU8zX4SeU5MoUQ/plZNuCW2CVIi8hpKYSA14p4QzhoWMISsJ7Z57baZQIO12ng6P/FFTd 9aAwLTxt3E65rshyis+47NxDyk70aWqoboIjBtSQJdKxxnX8Xgpfs/puXRTZl8F/LLYoic dkEM1rWwRo8Y57xRjpi1LVkbQ/XBN8Mj3P44FqLKtXo3t5ZBUDP1rSxxcqXCj9akH8Y6Da ka9g+V8KAnJTQHymJdQD2zXA6C83WGtq0BdhwG5eSCuwB2c6e9ffcGdr8Em/3B30YMTJrA UYe1Iks8QUbdqbiaZWz+5BR6okoqJGLYo4qGpo3R91Q00YnQc+OY+0gHsoBJjQ== 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=1783547986; 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; bh=+6c709PEU+X/xL+zRpqCWIxrgqYZeic0940uygvJjTg=; b=yi51LqDlcUMUYqib+iKZ0/cQau9j30DPsYbwNvTeP33V5hnJAsCW0BY+0NMj+PsC5AHDIP 8i5BhFPOVhCFjWyvUyLBv0HWNhFqigaGJWrIP+CO487tG6ILFY9hIpph/l/lRz7ec8eiEg EUkW+8DdfiaGbRZVVa9wyEuLS591NQ7TLka+b8MqWHH+Viu4HlLaHlv+8OBVeOhgYXTF3K ljgEqD9hFk0pkde9sVTV3NLhrYpvW8Ut43rdADKwavP8yTA+PJGln7HEzl0X+oBlO5YYcm Mga17ForVXcXsXTk/2iQTxPhcb8XGzRM5G5tVCcPgI9m4Ek2DCgyCNDsjlHZAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwX7j6VT7zgnj for ; Wed, 08 Jul 2026 21:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31d63 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Jul 2026 21:59:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Pawel Biernacki From: Chuck Tuffli Subject: git: 687f618e8ca3 - stable/15 - linux: Add support for PR_SET_VMA to prctl(2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chuck X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 687f618e8ca329b98b33e8a40e81a0869436e7ed Auto-Submitted: auto-generated Date: Wed, 08 Jul 2026 21:59:40 +0000 Message-Id: <6a4ec84c.31d63.5fdaae17@gitrepo.freebsd.org> The branch stable/15 has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=687f618e8ca329b98b33e8a40e81a0869436e7ed commit 687f618e8ca329b98b33e8a40e81a0869436e7ed Author: Pawel Biernacki AuthorDate: 2026-05-30 12:15:21 +0000 Commit: Chuck Tuffli CommitDate: 2026-07-08 21:27:06 +0000 linux: Add support for PR_SET_VMA to prctl(2) Implement dummy support for PR_SET_VMA with PR_SET_VMA_ANON_NAME in prctl(2). This prevents applications from receiving EINVAL when attempting to name anonymous memory regions. (cherry picked from commit a64148e21bb4ac976345cbedbd32942f97f07cc1) --- sys/compat/linux/linux_misc.c | 7 +++++++ sys/compat/linux/linux_misc.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 1a4eba5f9d39..de40449e6f15 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1814,6 +1814,13 @@ linux_prctl(struct thread *td, struct linux_prctl_args *args) linux_msg(td, "unsupported prctl PR_SET_PTRACER"); error = EINVAL; break; + case LINUX_PR_SET_VMA: + if (args->arg2 != LINUX_PR_SET_VMA_ANON_NAME) { + linux_msg(td, "unsupported prctl PR_SET_VMA attr %ju", + (uintmax_t)args->arg2); + error = EINVAL; + } + break; default: linux_msg(td, "unsupported prctl option %d", args->option); error = EINVAL; diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h index 63ed914afc63..1beab540a0bc 100644 --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -60,6 +60,8 @@ #define LINUX_PR_SET_CHILD_SUBREAPER 36 #define LINUX_PR_SET_NO_NEW_PRIVS 38 #define LINUX_PR_SET_PTRACER 1499557217 +#define LINUX_PR_SET_VMA 1398164801 +#define LINUX_PR_SET_VMA_ANON_NAME 0 #define LINUX_MAX_COMM_LEN 16 /* Maximum length of the process name. */ From nobody Thu Jul 9 06:51:43 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwlxX05Wwz6kgnw for ; Thu, 09 Jul 2026 06:51: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwlxW6c6mz3PTW for ; Thu, 09 Jul 2026 06:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783579903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/bzj/razVNfeyfoqZCf2vY9PQbVxM4wgc9yxgq7vMNM=; b=Y5LjWKZonDTXeMqkt1zUxLfa5WvFEsH3JP1KdbrkD9cGXETrrL3SPcN30Xo0KTDZY7j6MI erHO8xrTQKKxOTXfArGD4fketJm6KS04It4NciDkXiNj3vo6yWr9RsNq+0LfT6GBXHHXfQ TDvNlkNM53rrxCQbwZg99pbTb/1OFoF9ST59ikJtNcZjjJLdTXg4C1ea44hC6BlMOZpTfy Yq2+n2LgHJDVRzA2wq8WaSlPOEAZPtSImQadgTTh81Hf78U9A0oSv3TKLvGQpyTN6VImS7 v0H3VqHroSOIQDP8Wb2onAuCzis90I6V2TsjnxBqCTAzFZwtlipXjbicUdLorA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783579903; a=rsa-sha256; cv=none; b=GxBLIPunb1jplrqr1Tsw8OrWa0gd7BTRrg3GHYDY5lJXbiUURhlddN0WsTqPv7vNfqPq0F YDqTyhBbBY0Eka54yzp0g7LRF/E+LkNzZ4mNxDDrsdCxKwqXVcDIBVrLT6iBX8OFWMxU9L aTFwvmzmC9v7kP2nMc7X9JZSxrhobS+F2xBg5vQ46TNR/p58vU2W0GV4Kqn78vVewQpG25 eHCgLHYXKIlAtS1Wei/K0KlStuGWHtChF59ZGijGYSgghHOshFqNfLsO8L8MKzkP1Nl1Ar xP6c91O0SsNG7h022pjB1K+ABup3l0QuM55Xng9TuFIxpILZUY5RFHA6xxQhtA== 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=1783579903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/bzj/razVNfeyfoqZCf2vY9PQbVxM4wgc9yxgq7vMNM=; b=L/acnIvaZC8GVRMhEK40eQVUCg+WcUeftxZMiRf5ffdi+Hbev9hYJEgt9CaUw1qtV77ZAD J155hVof0Xbm9IwCuzC+iCN9mK+DS/pXSPoy0IenMA0NzmPzRwjyjHPAiLc6MUOS/3+dUu Ub5kuuKDq+3tP9OSEzBTHUk4EzRKFQxHFxllZ2XLlxe4JLhyxG6ZRfcVe/sa1vCkHrvrZV kV+XE+5kHOHa/AOQEB3BYvQCdFH7LzABRsI3Fhge+jWB8NEuXDNTwAtEJLX1VpXbIKnPcd +RyjIcXBM05agJyMsKh4j9MCyWXaNxtwoeOaPx6AtW3CyPdUELy3s+7veHNunw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwlxW58KDzxrK for ; Thu, 09 Jul 2026 06:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 425ab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 06:51:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 3d4f9656f01d - stable/15 - libsysdecode: Fix shutdownhow table List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 3d4f9656f01db403ad6adfe59113de5d85e1df23 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 06:51:43 +0000 Message-Id: <6a4f44ff.425ab.2cb2664a@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3d4f9656f01db403ad6adfe59113de5d85e1df23 commit 3d4f9656f01db403ad6adfe59113de5d85e1df23 Author: Dag-Erling Smørgrav AuthorDate: 2026-07-01 10:06:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-09 06:51:39 +0000 libsysdecode: Fix shutdownhow table MFC after: 1 week Fixes: c3276e02beab ("sockets: make shutdown(2) how argument a enum") Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D57915 (cherry picked from commit 402a6574886a90b8025777b3b2c960c88677462d) --- lib/libsysdecode/mktables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libsysdecode/mktables b/lib/libsysdecode/mktables index 6b4f79402660..ad5d82dcdb42 100644 --- a/lib/libsysdecode/mktables +++ b/lib/libsysdecode/mktables @@ -127,7 +127,7 @@ gen_table "rusage" "RUSAGE_[A-Z]+[[:space:]]+[-0-9]+" "sys/ gen_table "schedpolicy" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sys/sched.h" gen_table "sendfileflags" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}" "sys/shm.h" -gen_table "shutdownhow" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" +gen_table "shutdownhow" "SHUT_[A-Z]+[[:space:]]+SHUT_[A-Z]+" "sys/socket.h" gen_table "sigbuscode" "BUS_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" gen_table "sigchldcode" "CLD_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" gen_table "sigfpecode" "FPE_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" From nobody Thu Jul 9 06:51:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwlxY1zqBz6kgrh for ; Thu, 09 Jul 2026 06:51: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwlxY0M3kz3PZQ for ; Thu, 09 Jul 2026 06:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783579905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0lCim75KUA1Ole+5k8SZy2wu9Ucae98AXAHC/cGQj0w=; b=SLKESo1eyuelxXDjPmSdX0ZIgNNDHjDQ3XidgpRzf2z0c6Pn6iU5dPSzjWXpRVK8ki3hsy 367EZaCKbLBjavcGairQ29jpnA93Uy9JVGwREWVjAl9/LsTAwrqz41Wy99/eENVgtT9lhd CcENF0m1TnUwXRnAj9Qxit7c3yTntr89syuvcblDE3aT9RDCVqCrYS/WJbfz/YLwQ0sdUp TIpsAB/4BaZtPeeWBUBGISqtBYmUEgsDXv4y8RhCgIWbTkk+AVcinukaU/UYBANR64/a4c 21xWUcoIERE0Fw/0BNPAMv4nqvIkJ+hfZMv1pz7Msf4I3NpK6p5jUZgXUHql0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783579905; a=rsa-sha256; cv=none; b=XakXUW04WYF7fc0JA5KHL3Sb1tQXqT5A6LGluO8s5Uos27Mqjl2JvMWLsMrKa1A8SErjf/ 7KD38v9YIrpaBnYPEG8fnrlTDuA54bwrob/QrkkMLS0tAhvQelgjXWm7jy5MDSh3HafTcF MN8x2xGdHzOEaLkAzhPwstZbgA+7HVVYliZY3C8uwceTqZrt5XNfjpGgerOUsxyxgBfCuS qofLVMoUCYuDlbPQwIyb99Wf9neooA4Zrg/979+B4Kvuo4ZHj8uICCfQti/LTBFMZAlri2 izV9SuNBaDcb2ZNADjpY03olbtkPpQzF7s7VTnvmYyZ+VWejky11nVrPIYxHPQ== 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=1783579905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0lCim75KUA1Ole+5k8SZy2wu9Ucae98AXAHC/cGQj0w=; b=oEqzHxTWfWHnzDx/OB3voZZ+Dn1wrntSb2VM1m3SOXcqDMK9J33pFKJpG53hnoovd04ou4 sS1aDB3WJPSyHBRZYCkZlUNMc9Mw3OhS25jFfLdIs1O9jAxbiT3HMRqrZ9h5rHuJ1t32JT w6f+KayMfYHvUTlIx8JIJun7ICuoC7WHjQNrqbFg2L0ArSr68Nm0jlWwVlIRgJoBVo8Idm 7O2jbzkyPLkxTB1y3fX3ji474TqO34wHysBOH0zPBCkJ2A2hfujqznREwxpz4oaZ2dIYmc RbZPJaxG8PMHm9ojwTDr2Yk/A2jQ5mZQoy0hvO1jIai/ABJbrdNa8D0QVRhhYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwlxX63vxzxrL for ; Thu, 09 Jul 2026 06:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44101 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 06:51:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: ff22dcccc089 - stable/15 - libsysdecode: Teach mktables to handle enums List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: ff22dcccc08985fa6ce0643bf701b9f031aa8cd5 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 06:51:44 +0000 Message-Id: <6a4f4500.44101.3f88a0f9@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ff22dcccc08985fa6ce0643bf701b9f031aa8cd5 commit ff22dcccc08985fa6ce0643bf701b9f031aa8cd5 Author: Dag-Erling Smørgrav AuthorDate: 2026-07-06 19:41:15 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-09 06:51:40 +0000 libsysdecode: Teach mktables to handle enums While here, clean up and simplify the existing code. MFC after: 1 week Reviewed by: glebius, jhb Differential Revision: https://reviews.freebsd.org/D57993 (cherry picked from commit 8b197806dcdff5673dd4f77a97bf46035d14db2a) --- lib/libsysdecode/mktables | 59 +++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/lib/libsysdecode/mktables b/lib/libsysdecode/mktables index ad5d82dcdb42..2b428fc8063b 100644 --- a/lib/libsysdecode/mktables +++ b/lib/libsysdecode/mktables @@ -48,35 +48,54 @@ fi all_headers= # -# Generate a table C #definitions. The including file can define the -# TABLE_NAME(n), TABLE_ENTRY(x), and TABLE_END macros to define what -# the tables map to. +# Generate a table from C preprocessor symbol definitions. The +# including file can define the TABLE_START(n), TABLE_ENTRY(x), and +# TABLE_END macros to define what the tables map to. # gen_table() { - local name grep file excl filter - name=$1 - grep=$2 - file=$3 - excl=$4 + local name=$1 grep=$2 file=$3 excl=$4 - if [ -z "$excl" ]; then - filter="cat" - else - filter="egrep -v" + cat <<_EOF_ +TABLE_START(${name}) +_EOF_ + if [ -e "${include_dir}/${file}" ]; then + all_headers="${all_headers:+${all_headers} }${file}" + sed -nE ${excl:+-e "/${excl}/d"} \ + -e "/^#[[:space:]]*define[[:space:]]+${grep}/p" \ + "${include_dir}/${file}" | \ + sed -Ee 's/.*define[[:space:]]+([^[:space:]]+)\>.*/TABLE_ENTRY(\1)/' fi +cat <<_EOF_ +TABLE_END + +_EOF_ +} + +# +# Generate a table from C enum definitions. The including file can +# define the TABLE_START(n), TABLE_ENTRY(x), and TABLE_END macros to +# define what the tables map to. Works with most enum definitions as +# long as each constant is on a line by itself. +# +gen_table_enum() +{ + local name=$1 grep=$2 file=$3 excl=$4 + cat <<_EOF_ TABLE_START(${name}) _EOF_ if [ -e "${include_dir}/${file}" ]; then all_headers="${all_headers:+${all_headers} }${file}" - egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ - $include_dir/$file | ${filter} ${excl} | \ - awk '{ for (i = 1; i <= NF; i++) \ - if ($i ~ /define/) \ - break; \ - ++i; \ - printf "TABLE_ENTRY(%s)\n", $i }' + # preprocess the header + ${CPP:-${CC:-cc} -E} "${include_dir}/${file}" | + # filter out directives and apply exclusion + sed -Ee '/^#/d' ${excl:+-e "/${excl}/d"} | + # extract all enum definitions + awk '/^(typedef[[:space:]]*)?enum([[:space:]].*)?\{/, + /^\}([[:space:]].*)?;/' | + # pick out the constants we want + sed -Ene 's/^[[:space:]]*('"${grep}"')\>.*/TABLE_ENTRY(\1)/p' fi cat <<_EOF_ TABLE_END @@ -127,7 +146,7 @@ gen_table "rusage" "RUSAGE_[A-Z]+[[:space:]]+[-0-9]+" "sys/ gen_table "schedpolicy" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sys/sched.h" gen_table "sendfileflags" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}" "sys/shm.h" -gen_table "shutdownhow" "SHUT_[A-Z]+[[:space:]]+SHUT_[A-Z]+" "sys/socket.h" +gen_table_enum "shutdownhow" "SHUT_[A-Z]+" "sys/socket.h" gen_table "sigbuscode" "BUS_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" gen_table "sigchldcode" "CLD_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" gen_table "sigfpecode" "FPE_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" From nobody Thu Jul 9 15:18:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwzBZ5wjvz6kMsb for ; Thu, 09 Jul 2026 15:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwzBZ5NXzz3N0d for ; Thu, 09 Jul 2026 15:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783610326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gKtgWqEhVxOpaC2tb+cOwTAHmlUbTjS6u8S0dlB7bFc=; b=K+gZhlylDNelQmsKxIm+ida2ImzI7g6yiI1Cl74IH821kAp1QsS6L4ZUeqIuHEdcBhTYSe oVOSZ65bmZza2YcUAM7ytZueCYmIdTF0G8TW1yEwxHEtDd5i++ssZy18jrA4gP1/z3YPYn 4KViAQ8TX5G9nHghQw3tL2BY1ee5B/kyIe0Tu1iRrUG9C2eMYuH2NUqoIjXOgbpqjsz6pG jKcdf+2W760831EzP3LhE3VshKDLuCmlieOCSUdH40MHwrIQlE3SYf4WLCe2S9tXyvQu/a aPxt1gbz2j5oDaORj3naE1vZXuYNz56EoUl9Jv0yWWN//ue4UwJ/guUHSLW9dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783610326; a=rsa-sha256; cv=none; b=xcw9PTOK5XVxBgMiOCA/VBtYjLVc6LJYhUvihVHGl0YBf7Ce958Ge5QJ7j0Tp4Gl7HIIe8 mieq6jALcuyAn4T8zAzD8EF/mPfR9D5ip4Qb+rgsIi76NYteMkCYKHc6D9pHO+UdSWNI/R Ne4nXNeefBLtcPVgaPlfIuddOZL308GoYF9frD/7XJre8J1bZUXwvhNdX2CNdte2KEFxRN +cXIgeQ3FcNA1WpZUDO3b0qYlv+8ItHQEir2ScDjqiXX5H2vWFHgcqH/8r540GpG5fMV0K 3zKbo4FV6T0IPeG/2unwj24sfvZbzvufVlJO3r7+7QHtVD8O3o7WKwLJRPmZXg== 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=1783610326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gKtgWqEhVxOpaC2tb+cOwTAHmlUbTjS6u8S0dlB7bFc=; b=E1TLHCkwqJelI2Xxfmxaaw2UnYL71ANNNu19SkDG2HZq3zMM/3vXdnYH0XfLWC2wC7YfIG gy6FmJaqlbOce1s+WH8jnJyrSxHNfLZVZjLr1ps3v+15MzG4yFXDyH1fBkr8p3v/yzn/4U 5rxCUrWnxG92F/CwVtNiEwzKDeFdC4vINOwYFtsAjmFK09kL3tA1hyvXJkGqxGDNB2Ad2+ wvFs4hjwR7b+gKSTz/BYNJeiDEhxhjvGoJLJVzttkXmF4oJOGhWR85HhV43GJuWMTwtCeq fPXHSuOqWQY1gtuNVCy6ZfgaCQWG8ltz8IyQZ5tMBdWahj/fKpw2Utr36ZXtDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwzBZ3YHtz1CRy for ; Thu, 09 Jul 2026 15:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31a79 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 15:18:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 45da2c1e1d20 - stable/15 - newvers.sh: Avoid spurious -dirty in git revision List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 45da2c1e1d202ab190f156dd63403be79fb11e94 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 15:18:46 +0000 Message-Id: <6a4fbbd6.31a79.21eb34a9@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=45da2c1e1d202ab190f156dd63403be79fb11e94 commit 45da2c1e1d202ab190f156dd63403be79fb11e94 Author: Ed Maste AuthorDate: 2026-07-01 14:35:10 +0000 Commit: Ed Maste CommitDate: 2026-07-09 15:18:31 +0000 newvers.sh: Avoid spurious -dirty in git revision If git is installed and .git exists but git rev-parse failed to report a hash we previously produced just "-dirty" as the git revision. Gate the git commit count and -dirty check on the rev-parse passing. Reviewed by: jlduran Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57995 (cherry picked from commit 465a3b7adc008c068741594f6c922ede98924f39) --- sys/conf/newvers.sh | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 7ce82a1af9f8..afd7e8c35d2b 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -260,21 +260,23 @@ fi if [ -n "$git_cmd" ] ; then git=$($git_cmd rev-parse --verify --short=12 HEAD 2>/dev/null) - if [ "$($git_cmd rev-parse --is-shallow-repository)" = false ] ; then - git_cnt=$($git_cmd rev-list --first-parent --count HEAD 2>/dev/null) - if [ -n "$git_cnt" ] ; then - git="n${git_cnt}-${git}" + if [ $? -eq 0 ]; then + if [ "$($git_cmd rev-parse --is-shallow-repository)" = false ] ; then + git_cnt=$($git_cmd rev-list --first-parent --count HEAD 2>/dev/null) + if [ -n "$git_cnt" ] ; then + git="n${git_cnt}-${git}" + fi fi + git_b=$($git_cmd rev-parse --abbrev-ref HEAD) + if [ -n "$git_b" -a "$git_b" != "HEAD" ] ; then + git="${git_b}-${git}" + fi + if git_tree_modified; then + git="${git}-dirty" + modified=yes + fi + git=" ${git}" fi - git_b=$($git_cmd rev-parse --abbrev-ref HEAD) - if [ -n "$git_b" -a "$git_b" != "HEAD" ] ; then - git="${git_b}-${git}" - fi - if git_tree_modified; then - git="${git}-dirty" - modified=yes - fi - git=" ${git}" fi if [ -n "$gituprevision" ] ; then From nobody Thu Jul 9 15:19:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwzCs2tCvz6kMtr for ; Thu, 09 Jul 2026 15:19: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwzCs21wmz3NWf for ; Thu, 09 Jul 2026 15:19:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783610393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=igquKw5mLNG/9cyp1Qy2xBwzU/uE2AagttcahomPZ0g=; b=VuuKw/2czWFncCoP8+/y57nDPtgmSJXKRHQ5E45xfT8BKAemMukT4gf3eHc5b+cu61e6pS srcECyb6if7ajGJFALtRVZS3u/RNhFHBSI2N+tRK2lvmyc/LY1LqQHuUg7I+0jxIfAwsuU h1Ygz2RqOSO9XvVmYux0qTWzmxdSqSSR9sMj6g4v6wl5ZvhFyruPmXVZQozMQq++blPqBw 3svKPUj4UPijyRDdHfSV09ZNv5ggbtYiP5dA19gJB30Ql5htBRYQDDkahm0U3UxfAIFyqQ uWv9jVpTg0hTr5dhDVzl/BOHQAt352bF2Cfa0PxfWTRIugblzgXTAgfkz9Vc0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783610393; a=rsa-sha256; cv=none; b=wAsWnB37WuldaJvbuhNyaf9kUu4ybjAt28LhXD8r+ndpW+TX2HhBPW0/LcgAecLAJD8gYE 7S7qg8c9XLvWUQ6r5HLAMcuP8QIiCMJj9caXKmAcvSfGMPEdbIs77IsIgKn9JpXai1D4kp RLhpYGNzB9omSVph3ZTqTmaxKTl8j4/PahmvuW6+RHB4LM930lM/btDlTcPDsGboLQHxXy hEON9LApDTlR+RrDkWYSt2+ssUxqItkyv0zVrwn1rkRd3vqtrDoSkBwod2uMZCCkkHkeRB 2HPlSpr0gFvEmRe3TvW5SOad8iYZCk7kqnoOrs5x91qizdmn36DSiO+tL7zgKA== 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=1783610393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=igquKw5mLNG/9cyp1Qy2xBwzU/uE2AagttcahomPZ0g=; b=gZI2Wlgkvi69p6Hs3cIkg/48bZAlI8kRUQOLm5VSBc0KaZ9Ko/hJ3Isq0krKiQDUL87EfO 4VRY6OwcwRySBet9jOXM3qW103Bjv2XDJNzx5WwzPTdAA6yOamDLFl4r7TKZkeKP1UJsai LmtgbolRgcpOdkbZb+ubnawcHFuP+gK2qBqZx+NZiS7y+/khaeK4no+uh3LZQCn2JGYEqf 3q2yn6rUK75v3V3HZS/hMtQCF+M00/O6rMSV0JAVw3/YUv93pCuaj8rJpM1JjH7eYRgkNx g+nKz6sFlLmI5z/oE4f/FtKUTlXGeAzgKwiYpQdhuIcykgB6At0AcJNzSwLrQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwzCs126kz1Cy4 for ; Thu, 09 Jul 2026 15:19:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26bb1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 15:19:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6756f09d73de - stable/14 - newvers.sh: Avoid spurious -dirty in git revision List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 6756f09d73de7d876501a7f24f07fb362aec35f3 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 15:19:53 +0000 Message-Id: <6a4fbc19.26bb1.600eb035@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6756f09d73de7d876501a7f24f07fb362aec35f3 commit 6756f09d73de7d876501a7f24f07fb362aec35f3 Author: Ed Maste AuthorDate: 2026-07-01 14:35:10 +0000 Commit: Ed Maste CommitDate: 2026-07-09 15:19:35 +0000 newvers.sh: Avoid spurious -dirty in git revision If git is installed and .git exists but git rev-parse failed to report a hash we previously produced just "-dirty" as the git revision. Gate the git commit count and -dirty check on the rev-parse passing. Reviewed by: jlduran Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57995 (cherry picked from commit 465a3b7adc008c068741594f6c922ede98924f39) (cherry picked from commit 45da2c1e1d202ab190f156dd63403be79fb11e94) --- sys/conf/newvers.sh | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index e90e1ef79902..5b5e390228f7 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -262,21 +262,23 @@ fi if [ -n "$git_cmd" ] ; then git=$($git_cmd rev-parse --verify --short=12 HEAD 2>/dev/null) - if [ "$($git_cmd rev-parse --is-shallow-repository)" = false ] ; then - git_cnt=$($git_cmd rev-list --first-parent --count HEAD 2>/dev/null) - if [ -n "$git_cnt" ] ; then - git="n${git_cnt}-${git}" + if [ $? -eq 0 ]; then + if [ "$($git_cmd rev-parse --is-shallow-repository)" = false ] ; then + git_cnt=$($git_cmd rev-list --first-parent --count HEAD 2>/dev/null) + if [ -n "$git_cnt" ] ; then + git="n${git_cnt}-${git}" + fi fi + git_b=$($git_cmd rev-parse --abbrev-ref HEAD) + if [ -n "$git_b" -a "$git_b" != "HEAD" ] ; then + git="${git_b}-${git}" + fi + if git_tree_modified; then + git="${git}-dirty" + modified=yes + fi + git=" ${git}" fi - git_b=$($git_cmd rev-parse --abbrev-ref HEAD) - if [ -n "$git_b" -a "$git_b" != "HEAD" ] ; then - git="${git_b}-${git}" - fi - if git_tree_modified; then - git="${git}-dirty" - modified=yes - fi - git=" ${git}" fi if [ -n "$gituprevision" ] ; then From nobody Thu Jul 9 15:40:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gwzh742bJz6kPfc for ; Thu, 09 Jul 2026 15:40: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gwzh71Zywz3RKH for ; Thu, 09 Jul 2026 15:40:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783611655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y4aoiggw5SE+MeLiqlAXdh1MJFKZuB68K7kXI+8fWPQ=; b=QbagggMCMbpQjwNWT5NX/UR+IKeOZTrGalz5XIPGgJSPNVIQ/+eq58NguH9g3Fuf0l10VO kiNRE64WhxW5FpkI4yAHI9dqA/FrGJt3v/nV29WE3e0fmNccKEVd3ncFp3VPmpnoXK2qDv 9eAHKqgoCwnfUSFCsHIQAahrhevGeHBxoaGmbJUQwTaONuMTg6WTKXd7F2AuPvVc5+59lQ 2keKb2IXRaH1lTZOuZOdLK3Xlgv0EBzcN3rHC/BFq1ZArW89UOezpj/zgpHvDalbgb0dqv W+F3znBfRmOsuiU/bQqSRZxITRj1ydyJWstQygcz0U20d4zecBWYrvIQAY4vqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783611655; a=rsa-sha256; cv=none; b=nY6RwPMAKIoxbhrrbKpqtiqbQkrguC5Kqk6cPq+C6dh+obWUhashOYqVUkjg06XBH2tJHE udGxaM4IL1v+RBIy9Kcqm6UJWPOm1r11RwBzznYbTxoog4d87aMb7J95Mc442qqbh4qPx1 UM0lVXCK4qyA86azDAS09IRuytSTEGe0QFzj/00EpGI1CgECIdbLR53VBHNt7gkp5fWii3 SAtr0qvrFDzmnPhOByYhWPbnIpl8nqQ2b0PyRb7oqNfu9+veWfPEfNM50xLcEopi09Z0qY JXo8pn4KVP2Ns/thDnlFvb+qOuvRrcjKRORKECx4Hfmg6MkX6CzzerGR+XXGPA== 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=1783611655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y4aoiggw5SE+MeLiqlAXdh1MJFKZuB68K7kXI+8fWPQ=; b=spUXS3iTN+nb+ijjwSFUQim7tcJHcqHreyVF/U2C62CCkvHRyh1xrbustlwVcbj7zFBJDn tSDUcuNoGpopp5ZrKuw2gg7jSSbXODWlXwmjcUOcT+pFrMUGgMkHS6z0k/0oAnmEiyIptC 1Bt9NwikWZMb7of+5kycI3oD+x0zTuyZ+nM+ugft7JJtoMHTNVbC3Rxn/zYjiTYIIaYpV8 58r4BwiYhhiuiqfpey4exZKGkJnGRhy0WfUIoxBRLwUXR/GAJGrJ2SBstYjlNPuBiIn7DP 1ZBfd+mOV22zn6yTPihDpcsL3GoduCp32/aqfUmBgL3aIAU5t/bjtAWTNs3pNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gwzh70NMszZq for ; Thu, 09 Jul 2026 15:40:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f83 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 15:40:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a00f80731213 - stable/15 - vtfontcvt: Return error from write_fnt_source List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: a00f80731213e03bf3d0b9028a93d0be4c0df756 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 15:40:55 +0000 Message-Id: <6a4fc107.35f83.5defb4f7@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a00f80731213e03bf3d0b9028a93d0be4c0df756 commit a00f80731213e03bf3d0b9028a93d0be4c0df756 Author: Ed Maste AuthorDate: 2026-05-22 18:37:51 +0000 Commit: Ed Maste CommitDate: 2026-07-09 15:40:20 +0000 vtfontcvt: Return error from write_fnt_source Previously write_fnt_source always returned 0, silently discarding errors. Return rv so that errors set vtfontcvt's shell exit appropriately. Sponsored by: The FreeBSD Foundation (cherry picked from commit f05fb5157ba1291ee5019bacece8d1e98ea95b35) --- usr.bin/vtfontcvt/vtfontcvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/vtfontcvt/vtfontcvt.c b/usr.bin/vtfontcvt/vtfontcvt.c index 1e388ef36276..f39076b09be6 100644 --- a/usr.bin/vtfontcvt/vtfontcvt.c +++ b/usr.bin/vtfontcvt/vtfontcvt.c @@ -987,7 +987,7 @@ done: if (rv != 0) perror(filename); fclose(fp); - return (0); + return (rv); } static void From nobody Thu Jul 9 15:59:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx05W2Xwdz6kQd6 for ; Thu, 09 Jul 2026 15: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx05W1zCNz3Swr for ; Thu, 09 Jul 2026 15: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=1783612767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Wu7NyfHsEJWSg1qhFesz3vmf9JkEP6KCJkCCi3xs6I=; b=HZmaZQ4KWplCiGWLy4B8Ip0Hnq7LfhEPCLZMpXlRYplrUYXGSii4Aj+Sj2mhqpDJhpPcgb /hRZt8E9EzIU4m5/WroWgCJi8Z37ag1EjGNATNsloMMpXhsDE8Rmb7+eTR+Ep2y/TH2+w3 SdBpuhBNNYhSAt5hI5U8MHMMq04qKaNJU/rkCqz0aPKP+ccyotqBOYkyI8B432fxGsa+/G 2jYnlH+BawaI8zzx0HwH17wbSz3t8u2gQz8S6S1t3wjkwNuXPyKY4FjT/+e7+6yauEayd2 MB1hbx2w7ultvzC5mTsC3qLFjCwnpToHB7M8OH4bQZ91xga2j6IlRSpu+hZYZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783612767; a=rsa-sha256; cv=none; b=vWOSMTxhX9O4T8EylEL7stSrKDy06JWFFdrMrkBYTkhPDVsSX9W+IwGAtj7JnA2jhRZPhc sjj3qKumEsLrQv+su4aHWHPsVQonByoScRtxuHAX+p/kqwWXMCOUpILyXyYtNYXnO8FtDH M9YqqkFrsnRSh0Wl5z0fPplCmZHSFMaR055GUsjULuL5eq67CL9HH37LBPRMZw6v24Yse1 0IAA25w2WxSg1pbLhu89WU0pwmtyG3OYKRd0ONJ7nDv+j5YDeyIo5LvrJhXceuwNBJN54Q w/YOjH/iAFJ9PGWBa8rV28S2jUUy8fCTrOBSBUY0PqKKNz/L6BlABQx7UP5a9A== 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=1783612767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Wu7NyfHsEJWSg1qhFesz3vmf9JkEP6KCJkCCi3xs6I=; b=Wf4mF4GS9gtdvaR9aMjHY1HRJzBvXUaB5A5JtbkVx8CFbUVig68NYlQJZNxKUg1LmsL5lp hzZ6TqB/6YoG3S4xrUkFDR1omQvvO1C8sqWvhHnTMOLjcYG1VwJAyYJDBB2lry1adJ/ckJ xKbWKUvtItMReaghK6NrliJXOQBgWjWUnIs4FaDGi4CDdNAnRXyQFuqiAI53ixntvakP4Q /68xuM3aqWSw3tdm3OROkHSdbyePYweUaXBR6QB6kElud1zeHe0vnqUaE8suAo6CSFPanq cRNVo+X3kbfBzBVon/HTxvAYYgbOgS9Q2rZYqRUaK3xCPD4yPJMPLuMtBPaHAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx05W0j1szrx for ; Thu, 09 Jul 2026 15:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 340c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 15:59:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 242c9c86c8ca - stable/15 - inotify: Unconditionally generate IN_IGNORED events for files/dirs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 242c9c86c8cad6aa29bc1af9161d4f0eec45f29b Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 15:59:27 +0000 Message-Id: <6a4fc55f.340c8.10b0e24b@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=242c9c86c8cad6aa29bc1af9161d4f0eec45f29b commit 242c9c86c8cad6aa29bc1af9161d4f0eec45f29b Author: Mark Johnston AuthorDate: 2026-07-06 12:50:37 +0000 Commit: Mark Johnston CommitDate: 2026-07-09 15:59:19 +0000 inotify: Unconditionally generate IN_IGNORED events for files/dirs The implementation previously only generated an IN_IGNORED event for a deleted watched file if the watch explicitly requested IN_DELETE_SELF. This is not correct, IN_IGNORED should always be raised when the watched subject is deleted. Adjust the implementation of inotify_log_one() accordingly. This also fixes a problem where a deleted watched file's watch would not be removed if IN_DELETE_SELF was not in the watch's event mask, in which case the unlinked vnode would linger until the inotify descriptor itself is closed. Add a regression test. Reported by: jrtc27 Reviewed by: jrtc27 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D58050 (cherry picked from commit b70997c8c75adc3ab343c47d5ba7d01c9c774d9e) --- sys/kern/vfs_inotify.c | 35 +++++++++++++++++++++++------------ tests/sys/kern/inotify_test.c | 24 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/sys/kern/vfs_inotify.c b/sys/kern/vfs_inotify.c index 94e65973a36b..9269dc0723af 100644 --- a/sys/kern/vfs_inotify.c +++ b/sys/kern/vfs_inotify.c @@ -614,25 +614,37 @@ inotify_log_one(struct inotify_watch *watch, const char *name, size_t namelen, struct inotify_watch key; struct inotify_softc *sc; struct inotify_record *rec; - bool allocfail; + bool allocfail, delete, notify, oneshot, unmount; mtx_assert(&watch->vp->v_pollinfo->vpi_lock, MA_OWNED); sc = watch->sc; - rec = inotify_alloc_record(watch->wd, name, namelen, event, cookie, - M_NOWAIT); - if (rec == NULL) { - rec = &sc->overflow; - allocfail = true; + + delete = (event & IN_DELETE_SELF) != 0; + notify = (watch->mask & event) != 0; + oneshot = (watch->mask & IN_ONESHOT) != 0; + unmount = (event & IN_UNMOUNT) != 0; + if (!notify && !delete && !unmount) + return; + + if (notify || unmount) { + rec = inotify_alloc_record(watch->wd, name, namelen, event, + cookie, M_NOWAIT); + if (rec == NULL) { + rec = &sc->overflow; + allocfail = true; + } else { + allocfail = false; + } } else { - allocfail = false; + rec = NULL; } mtx_lock(&sc->lock); - if (!inotify_queue_record(sc, rec) && rec != &sc->overflow) + if (rec != NULL && !inotify_queue_record(sc, rec) && + rec != &sc->overflow) free(rec, M_INOTIFY); - if ((watch->mask & IN_ONESHOT) != 0 || - (event & (IN_DELETE_SELF | IN_UNMOUNT)) != 0) { + if (oneshot || delete || unmount) { if (!allocfail) { rec = inotify_alloc_record(watch->wd, NULL, 0, IN_IGNORED, 0, M_NOWAIT); @@ -676,8 +688,7 @@ inotify_log(struct vnode *vp, const char *name, size_t namelen, int event, TAILQ_FOREACH_SAFE(watch, &vp->v_pollinfo->vpi_inotify, vlink, tmp) { KASSERT(watch->vp == vp, ("inotify_log: watch %p vp != vp", watch)); - if ((watch->mask & event) != 0 || event == IN_UNMOUNT) - inotify_log_one(watch, name, namelen, event, cookie); + inotify_log_one(watch, name, namelen, event, cookie); } mtx_unlock(&vp->v_pollinfo->vpi_lock); } diff --git a/tests/sys/kern/inotify_test.c b/tests/sys/kern/inotify_test.c index d3799b12ce20..9d5265e71f95 100644 --- a/tests/sys/kern/inotify_test.c +++ b/tests/sys/kern/inotify_test.c @@ -54,6 +54,8 @@ ev2name(int event) return ("IN_MOVED_TO"); case IN_OPEN: return ("IN_OPEN"); + case IN_IGNORED: + return ("IN_IGNORED"); default: return (NULL); } @@ -832,6 +834,27 @@ ATF_TC_BODY(inotify_event_delete, tc) close_inotify(ifd); } +ATF_TC_WITHOUT_HEAD(inotify_event_delete_ignored); +ATF_TC_BODY(inotify_event_delete_ignored, tc) +{ + char path[PATH_MAX]; + int error, ifd, wd; + + ifd = inotify(IN_NONBLOCK); + + wd = watch_dir(ifd, IN_DELETE, path); + + /* + * IN_IGNORED should be generated when a watched directory is removed, + * even if the watch was not configured to raise IN_DELETE_SELF. + */ + error = rmdir(path); + ATF_REQUIRE(error == 0); + consume_event(ifd, wd, 0, IN_IGNORED, NULL); + + close_inotify(ifd); +} + ATF_TC_WITHOUT_HEAD(inotify_event_move); ATF_TC_BODY(inotify_event_move, tc) { @@ -999,6 +1022,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, inotify_event_close_write); ATF_TP_ADD_TC(tp, inotify_event_create); ATF_TP_ADD_TC(tp, inotify_event_delete); + ATF_TP_ADD_TC(tp, inotify_event_delete_ignored); ATF_TP_ADD_TC(tp, inotify_event_move); ATF_TP_ADD_TC(tp, inotify_event_move_dir); ATF_TP_ADD_TC(tp, inotify_event_open); From nobody Thu Jul 9 15:59:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx05X644nz6kQrs for ; Thu, 09 Jul 2026 15:59: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx05X2cdBz3T54 for ; Thu, 09 Jul 2026 15:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783612768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=94tG66WHjd/rB2cyB71of5tbq0MmkN7r0Jt5Dc1gmtY=; b=LLzLeYFA3XUckknocFq2OyVLOPJFvb5J+CrlvPs8cjSr2yWcg30z+niZLVnzbK16D/66e9 Bj9Ua9yCyVirrezDKa4cOZvo47s0oVi1vGdi8QAHf/e+7PUXWYyW/2REdkWNn8U7zdOak0 71+CCoStbkvfI4NZaOp/1FVKhb4lXjBl+51yWxnzUrcxTGf9ouD4BCVY7eoEbTsQCsTECz 4SAM797R8FAdbi8c6aDaUek3Cxtc2QZCbBpNqDchWpL3ckv5oh9rcO6+z6k1Hg4nOGziHk SmbjHWTw8dJ2N3k+61uwgmTWx6QpLHPl4f98kYv9lOb6XJZC92x6N1MsK+lpTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783612768; a=rsa-sha256; cv=none; b=Jv9s0djAlOqQU9mRTXeukQd0IV1oMnQsQMW0OGhwu1Zu3esyDgSjik19vfLJb07EWSB59e 6/5fOdhhp48rBkFN5fF9s6uDq4DJGG+Fou/p8J9et4YepIuiHmmr0u6sTqb+ojQKZtnoxp GNzJph/cMZcLCkRaAF27e7vn/5lLjAOtwW4ZRnM2+F6w706EwuxHMR6ghbW6NpPGK60NHG ETqwGiD0iOC35dWhCizYZnsP98TrhYhSozH9Mz/dvgsAOhyyRpWtuY/5jI9NtmZCVncMIV +do+7Sd/5RPzNqSgVcl8dJ8aO+ACMMz9LodCrq1gnsz3eOYGipXOjIN/rOAM1Q== 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=1783612768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=94tG66WHjd/rB2cyB71of5tbq0MmkN7r0Jt5Dc1gmtY=; b=v7bn1hnjc4YgInhtU+cKBbHPAPmklEol/YVi/i+y6oJpnrJGtKGfDihL58bHWljKcsSr8t oXcxdED+siBM8ZglZ5I0CypNbNUEdXMY8Do0h1s4ldL2M3moi/pTWSRmMIOunZ+2tPNW6T XFMezzxKCBnVS2GSAZbuC/AQI39tnUbxPJTR8e5NvRxk/RqKAgZWvRF47Lq341ow536NtY Vvahx8IzuiTyVinT97ARC4OCtxDwHc1CDft4VRR+aSHAPwv5/9mYu8ifS2r6XVCeCHkhUx wt7YCpCwxUPcQ/of0BrClcf4M0S4eTlWgi15zDy5PwUnQhs4pczowlnG8XeM3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx05X150rzVL for ; Thu, 09 Jul 2026 15:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3629a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 15:59:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1ad156fc1439 - stable/15 - inotify: Ensure that "allocfail" is initialized in inotify_log_one() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 1ad156fc14391fbca3c60012c4aaae6d3ad43c73 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 15:59:28 +0000 Message-Id: <6a4fc560.3629a.563fbab6@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1ad156fc14391fbca3c60012c4aaae6d3ad43c73 commit 1ad156fc14391fbca3c60012c4aaae6d3ad43c73 Author: Mark Johnston AuthorDate: 2026-07-08 19:28:43 +0000 Commit: Mark Johnston CommitDate: 2026-07-09 15:59:19 +0000 inotify: Ensure that "allocfail" is initialized in inotify_log_one() Fixes: b70997c8c75a ("inotify: Unconditionally generate IN_IGNORED events for files/dirs") (cherry picked from commit f370bf9fafce82851bedb2b88bc21ec6ca0182df) --- sys/kern/vfs_inotify.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/vfs_inotify.c b/sys/kern/vfs_inotify.c index 9269dc0723af..f69a14780107 100644 --- a/sys/kern/vfs_inotify.c +++ b/sys/kern/vfs_inotify.c @@ -627,14 +627,13 @@ inotify_log_one(struct inotify_watch *watch, const char *name, size_t namelen, if (!notify && !delete && !unmount) return; + allocfail = false; if (notify || unmount) { rec = inotify_alloc_record(watch->wd, name, namelen, event, cookie, M_NOWAIT); if (rec == NULL) { rec = &sc->overflow; allocfail = true; - } else { - allocfail = false; } } else { rec = NULL; From nobody Thu Jul 9 16:10:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx0Km00Xmz6kRWc for ; Thu, 09 Jul 2026 16:10: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx0Kl6RT9z3TcB for ; Thu, 09 Jul 2026 16:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783613403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kgZ95cO+lgzQbqRSWcpPY8Re7EfAqPlDNm2/3FBoF2E=; b=e9sERfro5BeFmu+bxhBpawbE+FFiWrFOGV6aO2L+Mq132JbEQLxWsGatm0PrQkJ0ljEAzQ 7R5GtneYO6hkATK0cNSjjMKx3o8DAM0uAV0dqRYrrzlgt83L9ZQAw01FZZ6A3bP9TZ6j7Q NtEAGGwqQJY3nzKNHUQz5fkAq1DR20Yb7lnRlocXKZnuKNfIN+q6P2eJZsFtgrPyfi/v/h yaN2ur4AcWJs/TSp+mNOayK76Q6onfwegyUpdNVygAO5AeZt9Ti9O6QBSOI6rC8nbTQF7i I6Vq73VEw6zJPkDSvgjWwVEYiJH3qD0VA9vCwQk8CaZ0XCJiKvd5uFopcTL7hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783613403; a=rsa-sha256; cv=none; b=HZQDMyENrQIAj4ywsIbkEq1PnqQlmWiwNcoj/vhK3KCIIG6fwaAw8wAQLe4WOTXSsRKvD1 NoPLNpXZ8crpKHNhWf8rYyeNgPIIhFCJY0AUf3AN11dWGtycEi5BgCtCDxWOarKHsru3if ewj7Yp6po2M/UMVlhLiY4vrTdmS2c9mTLZ+FFBFNmg8uy22twfPT4uvJhhxvRMjbd588Vf lj2LhKjH8WxBvQSDuIe2vLiZ+8RVCV3imRq18ihC0lBCrmR877yEoclWyI/o8pLc0uXAys vtjDhRKICICFzO6j/o8CO7n8XBedNDU0mau9DEwfjnr6a5sqB9mmYjDWNU6Mbw== 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=1783613403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kgZ95cO+lgzQbqRSWcpPY8Re7EfAqPlDNm2/3FBoF2E=; b=i2VDA6tzftHpmEyfQdiC1TpKx+PUtZ+RtVgmqGy9uhpdxlNCWI9BKJBewaaYNg/R85dIpP BKtNEEhiJdOEhKBFyOfu4O1zuHL0BaTP9GSMf4eI/iNcvlz5rcBi6OgigEkfjh7ka9pXqR jb+k9OfUEh3vpKyJMDQr7vYitEKhJcdZzYKAb4+ALqvMazpZMgHVI2P1tfLZcSOvWUo2vn cMAoXbO8Lt2Tjy+Sj9e6FllSMclpX5N7pI1wi3c+JMNzaezWywBmqI/5Mz7Cp00aV8aqqj GDy5CPkInjd5he7PDF351Ugu3O6/g+bkT6lpWk4fJ7PziI5bWH7XwSHxiesZmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx0Kl595Sz1Q3 for ; Thu, 09 Jul 2026 16:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3723a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 16:10:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 32d229d22fcb - stable/15 - if_tsec: Free entire mbuf chain on failure List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 32d229d22fcbf8b9d143b8c81150f8867b82ddb2 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 16:10:03 +0000 Message-Id: <6a4fc7db.3723a.9966b31@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=32d229d22fcbf8b9d143b8c81150f8867b82ddb2 commit 32d229d22fcbf8b9d143b8c81150f8867b82ddb2 Author: Ed Maste AuthorDate: 2026-06-05 21:05:34 +0000 Commit: Ed Maste CommitDate: 2026-07-09 16:09:35 +0000 if_tsec: Free entire mbuf chain on failure Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57478 (cherry picked from commit 39e2fe23238f4d49cd6f2c3ce9d0d9c1c3bcbedd) --- sys/dev/tsec/if_tsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c index 80e42116ed9f..b35f04500436 100644 --- a/sys/dev/tsec/if_tsec.c +++ b/sys/dev/tsec/if_tsec.c @@ -1321,7 +1321,7 @@ tsec_receive_intr_locked(struct tsec_softc *sc, int count) ~TSEC_RXBD_ZEROONINIT) | TSEC_RXBD_E | TSEC_RXBD_I; if (sc->frame != NULL) { - m_free(sc->frame); + m_freem(sc->frame); sc->frame = NULL; } From nobody Thu Jul 9 16:10:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx0Kn0l6gz6kRWd for ; Thu, 09 Jul 2026 16:10:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx0Km6c5Pz3Tfw for ; Thu, 09 Jul 2026 16:10:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783613405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ckikI9ODvpX/p4A+72NFhnWL4GZdU45/QxddTZSyInQ=; b=JsGzb+jtLytnOXWZ/78Enk6pjLZw5qBaOAMi9MuIC0/jddFxxSFH5Rdy4NGnpTkyWvClpO HiUNJ0fSHV0Db8qS+pb2cb3nUN30XeQI1ZWd7Qmqzmbt8c9Odvv7y2i990OoM+zSgGAqKx ALxakEfvXSQ/31UlvMX73qPxO9UG77UAlNwomhKGqKZC1MDV1yclSY0Z31elkESGLupCU+ jKcYlvfNHZXl2HGRdgLdw2C9P4aF+gN7XBzvumNy6JjTe+LVWPzLtkma9q1NFfcnvayxEb OgrA/h8CeezY4YEYjSKQsdnYMA1Ff+gxTfsl9V70zv/kUXiihYfY9I2sRaUxXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783613405; a=rsa-sha256; cv=none; b=Dk7GrDdbitH8X+mbzv7pg9RTRjXCOJsC8D0qvr8mkYx1ACt7CrQ0IhWM2OIy+A8lud96bE KyPgi7ZQE3HVZZMZ0xjA/tI5vDtPNzSbMyjo7nOjtD+OF6Mgocl9rK83xS9pTEO6C6ZQLC 8Utq5+5rNZgZhy32DOHlc98+os4/AkcDcQW03OO/SaObfTe6M794u+PLa3MmUzgFShq9Be KITcP9WG8KJdi9y/VPm3HEdhux/wiJS3xd1UNz5l52tvDZ7FX0H4QJy8L+UzGqc1w1lZ0A MR8DcUohmsbbdQL11cgbM94YxJt2ImrpZRZ3PC1NO6cp5LvPaM5YPY3Zq/9gUQ== 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=1783613405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ckikI9ODvpX/p4A+72NFhnWL4GZdU45/QxddTZSyInQ=; b=n/yJokDph50fsCWJLLTaGfGqEmQIWLcXIHz+mU2Luza2YNaYMdjHHj94sQxOJOD3WG4DBs BRBl0W74uZWaGGLRYDz/ptvMmyhoOwieatjIIavUtsyGeErfyjp2OfNNQKkvbTxWZPx9t9 VP9gdqdw7RVhoVe75/zarGFXcEbG5NQgAhq5cUChJ8gh0UlWGUcpIX9sJykyn2d7R39tfN tUWZ0mPVylCcm7Tc5NltJdNnbMTsjG9o/AkMdfo9L1ZdrAzoq5sJsKvK9W0UZpewMwce6+ EuVOzLuxO1DoI/zBFpwdq0lA1+XDrghU2Br8sq0lql/RUXk1jlkqM013xsH5eA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx0Km5Dl9z1Q4 for ; Thu, 09 Jul 2026 16:10:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3811d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 16:10:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: de8a68da8cee - stable/15 - ipsec: Free entire mbuf chain on failure List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: de8a68da8ceea284c9b6f07690d285b0931f98a3 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 16:10:04 +0000 Message-Id: <6a4fc7dc.3811d.7eda3ec8@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=de8a68da8ceea284c9b6f07690d285b0931f98a3 commit de8a68da8ceea284c9b6f07690d285b0931f98a3 Author: Ed Maste AuthorDate: 2026-06-05 20:51:48 +0000 Commit: Ed Maste CommitDate: 2026-07-09 16:09:35 +0000 ipsec: Free entire mbuf chain on failure Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57475 (cherry picked from commit 85195c0c7f8a2926f0ba131178d9231bc33c81b5) --- sys/netipsec/ipsec_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index b394ff81d9c6..18a25c0feeff 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -462,7 +462,7 @@ ipsec4_common_output(struct ifnet *ifp, struct mbuf *m, struct inpcb *inp, if (((m->m_flags & M_PKTHDR) != 0 && m->m_pkthdr.len < sizeof(*ip)) || ((m->m_flags & M_PKTHDR) == 0 && m->m_len < sizeof(*ip))) { - m_free(m); + m_freem(m); return (EACCES); } if (ip1 != NULL) { From nobody Thu Jul 9 16:10:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx0Kp2LpVz6kRmX for ; Thu, 09 Jul 2026 16:10: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx0Kn6wDyz3TcM for ; Thu, 09 Jul 2026 16:10:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783613406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n947yS1DoHA4C5JtwVILARKn/wDFeA3p9mj+E9jNQHc=; b=yh+899ZRtYQEHyXA8wSoinnxRJ56hhbxBQv9FsxEncNmCDK9Rnwh6MbuN99yNAIs54IAa5 SgDknP73m/o3kBCcgi7DbEARO0DFjPgiC1YKcwvS/5R88RyoIQoTVPZWNSMuBbe/5mWC5S Nr5/DNPt5oXcrun+VVSjR5wfTOmEBvdbIMvDvg7UHbYsJWcjDJloOWq/DwMmFw1nhfLyCb 457edvX2M3Xxvw9KsiT22zZ4IcOKKxZZng8JwEs55UedsxWZe7Clq4KFYl1Uy4ktxnFsPe ZwH62GOIluKdflO5+iTvz0s4d30g62F2/2Hh6wru2DjuUq0uvJQwLIeuOJZ/ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783613406; a=rsa-sha256; cv=none; b=pXBFy2wwJ7wTxbJOvsfqSxwXKWS+1dH50oaqEA6PnspdgTZGojkA7tx0FuGgYZ9BjUFA20 cNATn1Zx+OKuYbiAb7b2BE07Lb3ad1AYsX6TZwo7fY7F4/ym+RgR8wDvnEPQY7pa+oKDdz NSbZ8TeKVkkwyctXGZbUvKazbehq7DKbwNfMQYO3Bddd0kCaP8RYQsm5bvp0urmutws2Ss loKVxBVyOVc5AyRYnwC62rkBTzHokKtwp8kP8sMhhXwSVNF539ZmNdjdgY17nUTMMmUvaX si2YHRGLRlHPuSOGUwr0bPXCANywjM/hQiGLGBMGP5nL0ya/Y2JnVXMkyPMoAQ== 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=1783613406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n947yS1DoHA4C5JtwVILARKn/wDFeA3p9mj+E9jNQHc=; b=llgthsh7CBWwEsrB4i1TEmVsBr9l/46N7bm//ewqPpw8vbcdrx9YqtPBprjojrnHJVlmK9 wWWDguh9nLiNeJy0GmhIlD23nbUmEdmpBMXsekMexjW+pMXPKaJg1ka2YHmByPtKs2D0XM lqUKg0q9PR6ureeWJMthyHy5MCvXiKkcX6llDWzHKRwKPnoO5wH9JMVNdw3WrtZMgfF9/u ZBE172kfroBiIasNSCGEcDAuVGfkZAvMCuGkTA4pc8fZ9ya/L4bZK41Z67FYJB5PDg73MD 6wQPjFVF2ABtOzij5Kl9qKAV3WuuQVMxWT7PSwTDX6neAX3FvtlYefXEfd9ibg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx0Kn5dVXztY for ; Thu, 09 Jul 2026 16:10:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36653 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 16:10:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 554cf9dcb680 - stable/15 - linuxkpi 802.11: Free entire mbuf chain on failure List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 554cf9dcb680f9451efeb3fdb653fb9516a34381 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 16:10:05 +0000 Message-Id: <6a4fc7dd.36653.6ecdae95@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=554cf9dcb680f9451efeb3fdb653fb9516a34381 commit 554cf9dcb680f9451efeb3fdb653fb9516a34381 Author: Ed Maste AuthorDate: 2026-06-05 21:01:39 +0000 Commit: Ed Maste CommitDate: 2026-07-09 16:09:36 +0000 linuxkpi 802.11: Free entire mbuf chain on failure Reviewed by: bz Sponsored by: The FreeBSD Foundation Fixes: 0936c648ad0ee ("LinuxKPI: 802.11: update the ni/lsta reference cycle") Fixes: c816f64e66a0d ("LinuxKPI: 802.11: plug mbuf leak") Differential Revision: https://reviews.freebsd.org/D57477 (cherry picked from commit 232021fd093c6e65beee5c0b4281091902022d08) --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 4ed05d32ceed..5a2355ca5f97 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -5756,7 +5756,7 @@ lkpi_xmit(struct ieee80211_node *ni, struct mbuf *m, #endif LKPI_80211_LSTA_TXQ_UNLOCK(lsta); if (freem) - m_free(m); + m_freem(m); return (ENETDOWN); } @@ -5765,7 +5765,7 @@ lkpi_xmit(struct ieee80211_node *ni, struct mbuf *m, if (error != 0) { LKPI_80211_LSTA_TXQ_UNLOCK(lsta); if (freem) - m_free(m); + m_freem(m); #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE_TX) ic_printf(ni->ni_ic, "%s: mbufq_enqueue failed: %d\n", From nobody Thu Jul 9 16:10:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx0Kq3PHFz6kRmg for ; Thu, 09 Jul 2026 16:10: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx0Kq029xz3V3C for ; Thu, 09 Jul 2026 16:10:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783613407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W2xBQbMERwod3gLqm6F7LfI8TedUsCcFCxUhrbDsOYo=; b=cp+kJEeToSmAwCzELLFPjRziF9PubzJMBWUdVXjRaKn6i3H8rCoPq4pDyVclRMfUB1bap9 n86v8CcyI+zMuN3jmitEvwc+eFcSqM+E+Q0E8SjWHwWU1vbLVcUdLeIJmEysYEW6Y/ByIi hi3Ik4bCZwdmORaOoB1islJfX7s0D1ehVonxLKPIeWh2muWV1qswL28lA3iCoAaPeVfSVI e66PfYcZ+efv0xVDepEfd3rPg/VpF8N2IYFVUQqTHWFSDhPu0Sh5O8Ej+4YBeobISL0M0y A5gPxyES5duWdyFIUZ7zonLuE/1gJpNT5KBwYEWh8iajJd9dkkOjN02crRbw0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783613407; a=rsa-sha256; cv=none; b=Ib42VJ8ZLuw+LaPM7XeOEwmEbQQaM0mXj/oq+T6oT9P95BKexWKaWkXbL2gUCzPimf4ljh ueT82QCO0/ffwb6fPpVxvpE1P2j91sECwEHAQiAKUvD4nN6/+aYm+ZZPr19DqRYvWMrJTV manNwmNcgWcrfDN4piRS/mipQTKbRF+avu+/5ArRoJGNZEREI9KqmYPsfkTCKqKu1Or+NG 6x3ya7IafSVVU7sh7oeQlZURfGt8SstLB21kXuu6loic29yAMaFP+eCcwcXUPDdrUAZXz4 eWdHdjpZX/EDTWC9ktlXmfR3hKUcWNhegI9zg7/gWT9vQCnQ6r0tR+lP9FLHDA== 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=1783613407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W2xBQbMERwod3gLqm6F7LfI8TedUsCcFCxUhrbDsOYo=; b=s8v1XwZL/eu4NY6efDWBC/Dy98y0dXUpzxlYUASsIna7YDzvQgPT9bhdEBmSCYmclXL6aJ ljN7r5G81uc2lU9X95+2JSnFWKpRfOeW0mjegZSc3iyKRUiu5N0dr2AwBCu4Fv5Yp7BgsA UqXs4uAZDY/XYUrdrOUo8b+auAJVEzzqK3NH3ZBKYDbSMHABljHqynOFzlc5JvPKvVbVoo e6rRa+Um8BXfHShWL/4E6WmB1MExQK9Ph/wq8nZ2Y0bdU0mii+bAAADCDU+t82CZjjUoMW raar+4hu0x+lNAba8Zq8pxMDsGsDLu+62Xa38+qTDri7iTGXEEISWwnncerJqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx0Kp5zJTz1Dd for ; Thu, 09 Jul 2026 16:10:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37ac3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 16:10:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f8e499fb0fc8 - stable/15 - ipfw nat: Add assertion that mbuf is not a chain List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: f8e499fb0fc80f1e74a6a5b474beff9250c2fe43 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 16:10:06 +0000 Message-Id: <6a4fc7de.37ac3.50297c50@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f8e499fb0fc80f1e74a6a5b474beff9250c2fe43 commit f8e499fb0fc80f1e74a6a5b474beff9250c2fe43 Author: Ed Maste AuthorDate: 2026-06-05 21:00:07 +0000 Commit: Ed Maste CommitDate: 2026-07-09 16:09:36 +0000 ipfw nat: Add assertion that mbuf is not a chain Discarding m_free's return value will result in an mbuf leak if the mbuf was in a chain. In general we should use m_freem if the mbuf may be in a chain, or assert that the return was NULL. There will not be a chain here due to m_megapullup, so add an assert. Reviewed by: ae Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57479 (cherry picked from commit b16c731b0191d6c47de46a3c6057b0c5ec0dd420) --- sys/netpfil/ipfw/ip_fw_nat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 34e60edfc4a5..05100d581424 100644 --- a/sys/netpfil/ipfw/ip_fw_nat.c +++ b/sys/netpfil/ipfw/ip_fw_nat.c @@ -291,7 +291,7 @@ free_nat_instance(struct cfg_nat *ptr) static int ipfw_nat(struct ip_fw_args *args, struct cfg_nat *t, struct mbuf *m) { - struct mbuf *mcl; + struct mbuf *mcl, *mfree __diagused; struct ip *ip; /* XXX - libalias duct tape */ int ldt, retval, found; @@ -396,7 +396,8 @@ ipfw_nat(struct ip_fw_args *args, struct cfg_nat *t, struct mbuf *m) (retval == PKT_ALIAS_IGNORED && (t->mode & PKT_ALIAS_DENY_INCOMING) != 0)))) { /* XXX - should i add some logging? */ - m_free(mcl); + mfree = m_free(mcl); + MPASS(mfree == NULL); args->m = NULL; return (IP_FW_DENY); } From nobody Thu Jul 9 17:49:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx2XW1HYDz6kZc2 for ; Thu, 09 Jul 2026 17:49: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx2XW0jKxz3h6q for ; Thu, 09 Jul 2026 17: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=1783619371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5VYyz1ovJERlFWqiEkPcp95E8gQ0bSxW0s/4F7sFjF8=; b=kcg0GZ7UQr4bg1qCGsCyVw6LQHwP73pSVx1f4J4NwVFBsglxUsUurK5TAF37cSqtFlCpWA qsJp+Xv0FyKB663hlv/t6PENgaui2Q11oMsgIaLpR0IfdYXPrDNbirlNBL+QAiO7yPJRt/ Ck2E09a4KbYnipg+8tNt9z/Iwi6lgJKIDPsQCh9zLDzV3E0W1mJOpoa8bGarsDAbgK6W35 99FSATgYLslBI5VEsaMp8xPOGR0R4oTb0gz1OX7yTiJW61gEKCDfA3ARj2WVFBPzHFyml0 pZ89kAQSpniuNO2vIiTi9h0z5NzXmX/VTk7UEdflFLRz79KvS1RrxffwACSnFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783619371; a=rsa-sha256; cv=none; b=DnSzet7YT7X8vq2+az+oK9T3dgFUfIgstJpQBgKjJe9yLiNTzcNHA0pX5lJmPM1rU1DbuP hj7Taf02X2yzsPUQnjmD3apkd5pcDi0e/dkvYL59cYI/bRTW3bEhf0SXkyigyDChPAiiSU 2w2lo+LaOUWPgzU5RozzaUOU4b/YRN7cxM2gLfL7+0HeduLeHDN0HlPdNEgDu/oVXFZYFU ewhfU9eiy8T3QTrE5n3IyZvWaEQTg99CFWSOyhYK6Ej3SzOKRIOkcfl30rRrtxginujHzC oiBeMNKzJ52D5g9jdhycknbi7nYCrFQEovR86yYBUFBx51Iy7MqgyLJNFwCLRQ== 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=1783619371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5VYyz1ovJERlFWqiEkPcp95E8gQ0bSxW0s/4F7sFjF8=; b=EzA3gnI2FJkO/IQDXobG4Zf2Ui/p/IIO2650lZmnk/WGS4rtHmtiTAT2hTiXXdKEE23bRQ IQrwXwrZ7UapjLa5nwrfCUKDfYOfVXN1/EZ9vSPrvqeE8VZHLveB4D9GXMlvw3NVQRCxJK cjRmUW0iXG32lSQuMfD9BT47LX5JHAlZSQrTZdn9rloyRTZJdQup4ZyLLM7wyv0ZBYy8xm LntGhC8l3Eoq+LlO7z2NAVXkX3r4dAMcGB9rVMTp1UJx/Eq3DV7K94tI1HCJUTZazLoCKr mwb9YdB8+mrMIB1s49cb2CQWSNm38vlq8e+VsAIZLrSP96DT0pAhkQCw4B2igg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx2XV6kr1z3mv for ; Thu, 09 Jul 2026 17:49:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fecd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 17:49:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 64f6ab4a39f9 - stable/15 - ofw: bool-ify OF_hasprop() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 64f6ab4a39f93b426ae54937ce36d08afd83841c Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 17:49:30 +0000 Message-Id: <6a4fdf2a.3fecd.65bae182@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=64f6ab4a39f93b426ae54937ce36d08afd83841c commit 64f6ab4a39f93b426ae54937ce36d08afd83841c Author: Mitchell Horne AuthorDate: 2026-04-16 14:12:41 +0000 Commit: Mitchell Horne CommitDate: 2026-07-09 17:48:06 +0000 ofw: bool-ify OF_hasprop() Adjust the function signature and the few callers that don't treat it this way already. This is style only; no functional change intended. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56203 (cherry picked from commit b60cd486a652f0427e525b4482ac598be5460459) --- sys/dev/clk/clk_fixed.c | 2 +- sys/dev/dwc/if_dwc.c | 8 ++++---- sys/dev/ofw/openfirm.c | 4 ++-- sys/dev/ofw/openfirm.h | 2 +- sys/dev/usb/net/if_smsc.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/dev/clk/clk_fixed.c b/sys/dev/clk/clk_fixed.c index f8dcfb8378cd..f18b8f8904c6 100644 --- a/sys/dev/clk/clk_fixed.c +++ b/sys/dev/clk/clk_fixed.c @@ -157,7 +157,7 @@ clk_fixed_probe(device_t dev) clk_type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; switch (clk_type) { case CLK_TYPE_FIXED: - if (OF_hasprop(ofw_bus_get_node(dev), "clock-frequency") == 0) { + if (!OF_hasprop(ofw_bus_get_node(dev), "clock-frequency")) { device_printf(dev, "clock-fixed has no clock-frequency\n"); return (ENXIO); diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 21a520db8b89..cd8651cc99ff 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -527,13 +527,13 @@ dwc_attach(device_t dev) sc->txpbl = pbl; if (OF_getencprop(sc->node, "snps,rxpbl", &sc->rxpbl, sizeof(uint32_t)) <= 0) sc->rxpbl = pbl; - if (OF_hasprop(sc->node, "snps,no-pbl-x8") == 1) + if (OF_hasprop(sc->node, "snps,no-pbl-x8")) sc->nopblx8 = true; - if (OF_hasprop(sc->node, "snps,fixed-burst") == 1) + if (OF_hasprop(sc->node, "snps,fixed-burst")) sc->fixed_burst = true; - if (OF_hasprop(sc->node, "snps,mixed-burst") == 1) + if (OF_hasprop(sc->node, "snps,mixed-burst")) sc->mixed_burst = true; - if (OF_hasprop(sc->node, "snps,aal") == 1) + if (OF_hasprop(sc->node, "snps,aal")) sc->aal = true; error = clk_set_assigned(dev, ofw_bus_get_node(dev)); diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c index b5f58b86a9c3..a8d3786ed152 100644 --- a/sys/dev/ofw/openfirm.c +++ b/sys/dev/ofw/openfirm.c @@ -381,11 +381,11 @@ OF_getproplen(phandle_t package, const char *propname) } /* Check existence of a property of a package. */ -int +bool OF_hasprop(phandle_t package, const char *propname) { - return (OF_getproplen(package, propname) >= 0 ? 1 : 0); + return (OF_getproplen(package, propname) >= 0); } /* Get the value of a property of a package. */ diff --git a/sys/dev/ofw/openfirm.h b/sys/dev/ofw/openfirm.h index 4e2b035827cb..fd13f4abd29e 100644 --- a/sys/dev/ofw/openfirm.h +++ b/sys/dev/ofw/openfirm.h @@ -108,7 +108,7 @@ ssize_t OF_getprop(phandle_t node, const char *propname, void *buf, size_t len); ssize_t OF_getencprop(phandle_t node, const char *prop, pcell_t *buf, size_t len); /* Same as getprop, but maintains endianness */ -int OF_hasprop(phandle_t node, const char *propname); +bool OF_hasprop(phandle_t node, const char *propname); ssize_t OF_searchprop(phandle_t node, const char *propname, void *buf, size_t len); ssize_t OF_searchencprop(phandle_t node, const char *propname, diff --git a/sys/dev/usb/net/if_smsc.c b/sys/dev/usb/net/if_smsc.c index 498a9ee3f926..c3c21fd22472 100644 --- a/sys/dev/usb/net/if_smsc.c +++ b/sys/dev/usb/net/if_smsc.c @@ -1585,7 +1585,7 @@ smsc_bootargs_get_mac_addr(device_t dev, struct usb_ether *ue) node = OF_finddevice("/chosen"); if (node == -1) return (false); - if (OF_hasprop(node, "bootargs") == 0) { + if (!OF_hasprop(node, "bootargs")) { smsc_dbg_printf((struct smsc_softc *)ue->ue_sc, "bootargs not found"); return (false); From nobody Thu Jul 9 17:49:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx2XX3mR4z6kZp6 for ; Thu, 09 Jul 2026 17: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx2XX1pLLz3h4l for ; Thu, 09 Jul 2026 17:49:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783619372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fv8iwQa5yhL87Zc4fR3QMevilEzEt3vdY3KPTbwThqg=; b=DZE8ivcxkZD1sWBq6lagZEMu+1ry9SGUp5ZsONnZw/tcODdSp6KVGwLWB1uLA/aS7Jk2H+ rHaPttmFttdhCJ/BAkWy7uYXG73aOV7z3Rg0TTWajx8U4DhwYn4g3pdtGbmP9OHrhPX2RP AGdSUrvfWvGT09K38KrjSEzh66frqdc2vcG7+t+b6w5M8UTTHnJd/Hmyl0plMOEgv8Yck0 yxQad6H4h4K0YKkcG+db9bYJkI+vBeeqqN9KTuTlbRURjj8PJuMXnjStyXNwzC6zUWSAoN wsPCBSPUAk3mMi9L/V09XtWxLjLi4QoSj0wFWkkdG8mAPNJMoepgmI6T2QGa/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783619372; a=rsa-sha256; cv=none; b=OLgNMqPvUFlvfMuRgnNO2aGQdxf9lA6506+OBKfib+UM8LYrL5SDj7PVAbVRe/uuxor7FR EeyDnuSeO90RDW1e5KLqkmW/SMEfw+l3TjYqrj0KTyVHBz9HhvOff27zQLcwy3wwz9I9T4 Dy+2uGpeHKu2Bdv0m7pKkvmIOaIaEug3v2vVNN5FP0gsuDY7rf07LHQqdvQLnKwrRDvRxd 9HWhPemNqHdcpCQfQBcZ9qUs11ZrOP/GbeI0/2CDL/Z2bnSc856UShsxyVxKeiMBoJKB5v 2jgR6HpLk2OqtEOaOjidomHe7/ri8HQlqa5k6n9UwJyH5XWHfEgkrkmjDO+pTA== 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=1783619372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fv8iwQa5yhL87Zc4fR3QMevilEzEt3vdY3KPTbwThqg=; b=hvDcsxGSnYBf7f0wHroUWDvsU9JXdpQG6mHFZaoMUz+2+4n86S1isuZokl9CEkXuCNkhTT /wB3KVFZ2srQiyCJ6BwtPH/w5elRvVbDwXcmIdUZYhDGZvvfGTN2xaS7QLcCVR+lqqztY6 ew1ALz8P2CHJ/6hlCaGgs7Hkt6r48WtnYTS+dIgHtTxLyoxWJqHfuUaT7C4v2PzGcGPmXx 5r4WYd5qoIKm/ris8o7JwNXOJ3koIxQktPkioTjsIOZJy7MAZ+LdEypThRVyEegecEAcyF vUAC6ViTivumbd2GCN9Ki4ViRVgTvQ5/AmigYF4L+u7w6mC4UCaEAhgGiHhwjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx2XW75Qkz2yY for ; Thu, 09 Jul 2026 17:49:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40de8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 17:49:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 2e56e447ca70 - stable/15 - clk_fixed: quiet a warning message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2e56e447ca70b6fca3ccf5d1b0fb9d19885746b1 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 17:49:31 +0000 Message-Id: <6a4fdf2b.40de8.28fbb1af@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2e56e447ca70b6fca3ccf5d1b0fb9d19885746b1 commit 2e56e447ca70b6fca3ccf5d1b0fb9d19885746b1 Author: Mitchell Horne AuthorDate: 2026-04-16 14:13:04 +0000 Commit: Mitchell Horne CommitDate: 2026-07-09 17:48:52 +0000 clk_fixed: quiet a warning message Frequently there are some unused/unspecified fixed clocks present in a device tree. Each one emits a warning before it fails to attach, which results in (sometimes many) repeated messages which are not user-actionable. Put this warning behind the bootverbose flag. MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56204 (cherry picked from commit 8728e21bd694dbb813c149206c5c89290f9c32f5) --- sys/dev/clk/clk_fixed.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/clk/clk_fixed.c b/sys/dev/clk/clk_fixed.c index f18b8f8904c6..6656aeec473e 100644 --- a/sys/dev/clk/clk_fixed.c +++ b/sys/dev/clk/clk_fixed.c @@ -158,8 +158,10 @@ clk_fixed_probe(device_t dev) switch (clk_type) { case CLK_TYPE_FIXED: if (!OF_hasprop(ofw_bus_get_node(dev), "clock-frequency")) { - device_printf(dev, - "clock-fixed has no clock-frequency\n"); + if (bootverbose) { + device_printf(dev, + "clock-fixed has no clock-frequency\n"); + } return (ENXIO); } device_set_desc(dev, "Fixed clock"); From nobody Thu Jul 9 17:49:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx2XY3bZ3z6kZqg for ; Thu, 09 Jul 2026 17:49: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx2XY1hjLz3h4m for ; Thu, 09 Jul 2026 17:49:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783619373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fwMugdr6gp6J2p7wQdL+SSL8KkTfmCeFKudOgyTRP+8=; b=p3iqPJ43T44YBHAhEA8MqfyX4QwKHA+M8MwbiuEes8B9/ozvwTNozsHJuicM9wRDZf3eqg 60NmWccBppZoydZthqgWMNUGMb2SRR018HGXfXN6HvXzTbzCMdOW0Iy37Mnciy2a6gidcF 0dr2aCurbL8BIWiJOzMU4gQsVNeHA+6ZyeqfZYVM/eu0UD+8GF3KdW72YCumWnsOZIzTWI cHt7Z/g6l88/32I/KC49RnqpZjkeWejK+53yunkBWKpyAkPU3NKIHJIAq5Z/1J4MTlww+H l510YyeDKxsdI/+MWHVU6UGruNt0fDPv+rF2W0RuOd3eFaoPR4vJQS2VaT6fwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783619373; a=rsa-sha256; cv=none; b=xPIdSYDLRM+VfWYFQHWhEmqRE0CweTwBI4FTGb6Pvvz6nXjuJvLPY3SlHTm3Jbrsi+b5KT qICLIq9cDtVOtsTy2wFX6uHX4KSt2WunMaNTQSjsPavgj2G6vg3N4TmbawCXaXW3b15wD+ 3W7kT0mZAnqnn7W7FaJB/mRO89E+ivFz4CWG39p7q3dWfEhk/S+mTAA1lXpGzVQaAi5zHf +mdGobUEsdfudFN77MoYXyMxds6MZ93bwSu2PDn5CAzIc1Zr3lVd/T6sDIqAdnUvQTeeor 4cF8PLXB3AyZZjbuEiy+63PiapLNWsIUXoAnVjA717iwBXxb3dgVaHDSXu/q6A== 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=1783619373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fwMugdr6gp6J2p7wQdL+SSL8KkTfmCeFKudOgyTRP+8=; b=PTccfrzg54CI3NKHuKBnsNXh9K+c9Dhb2CI6kxgZP4TiCniQCjt7bfjCnO4XVMIPZGtWcp X+CDJpz46+QGw9BAktiJx5xsd8YlCi3V1punzUSA6dq2AN31r76AyJy/15D4MWPC+ATUJU Xgg3ASIefZ0Ue013/sMwiA/t/XZqreGcd9xl1BHHsw++yG+wNNFMahYSMBkYRQIrLOyFbl z0GbAj8dukzN1tbq1WCpfbN+okK/864/CzrXBkULGgibv3uNYdvoA+ZLFgSpYA826y+ylp XawkSwKWZHb1AoRX2cPy/b49GuMfW9+ftOEUSb0I3YRCZ3piiWng8zPBJndt/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx2XY0YC6z3h5 for ; Thu, 09 Jul 2026 17:49:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f85f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 17:49:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 7411d0167174 - stable/15 - OF_getprop.9: update OF_hasprop() signature List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7411d0167174f9c2a3f6f6d02d5fe036f6297328 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 17:49:33 +0000 Message-Id: <6a4fdf2d.3f85f.6da78d9@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7411d0167174f9c2a3f6f6d02d5fe036f6297328 commit 7411d0167174f9c2a3f6f6d02d5fe036f6297328 Author: Mitchell Horne AuthorDate: 2026-04-16 15:57:48 +0000 Commit: Mitchell Horne CommitDate: 2026-07-09 17:48:52 +0000 OF_getprop.9: update OF_hasprop() signature The return type has been converted to a bool. Reported by: manu Sponsored by: The FreeBSD Foundation Fixes: b60cd486a652 ("ofw: bool-ify OF_hasprop()") (cherry picked from commit 47b0ac1cadc91eee5e98813169b590c443135fbc) --- share/man/man9/OF_getprop.9 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/share/man/man9/OF_getprop.9 b/share/man/man9/OF_getprop.9 index 3bb0068e3dc2..8c93d92bf73b 100644 --- a/share/man/man9/OF_getprop.9 +++ b/share/man/man9/OF_getprop.9 @@ -23,7 +23,7 @@ .\" (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 June 23, 2018 +.Dd April 16, 2026 .Dt OF_GETPROP 9 .Os .Sh NAME @@ -52,7 +52,7 @@ .Ft ssize_t .Fn OF_getencprop "phandle_t node" "const char *prop" \ "pcell_t *buf" "size_t len" -.Ft int +.Ft bool .Fn OF_hasprop "phandle_t node" "const char *propname" .Ft ssize_t .Fn OF_searchprop "phandle_t node" "const char *propname" \ @@ -138,11 +138,15 @@ if the property does not exist. must be a multiple of 4. .Pp .Fn OF_hasprop -returns 1 if the device node +returns +.Dv true +if the device node .Fa node has a property specified by .Fa propname , -and zero if the property does not exist. +and +.Dv false +if the property does not exist. .Pp .Fn OF_searchprop recursively looks for the property specified by From nobody Thu Jul 9 17:49:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx2XZ5j04z6kZst for ; Thu, 09 Jul 2026 17:49: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx2XZ38p0z3h9F for ; Thu, 09 Jul 2026 17:49:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783619374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XSvZXzkMaGQYv0J/71yP2t2c2JQhM8oNqAUpCKIDGWA=; b=yLr7HQxc2aW6V5kjpH94AvgXgimcmltGW1BogZVmH5kObCawAXuFqv1ZQWYasRthpfLLI8 dqUic0X8fakGSxMcxTGFxcfCGUg3JV0DFzXA0ukJRWJcxz4mS2ijciYFlCdZAFSC80A+9x f1JW/U658onZhDxt+6jT931XlD6Us29QhJUHuep5CJ33CQT1zm/i0qjX3AjjiWhLLtRPW3 Ky5G7nqOzqR10fmAIlojSSrLqt7uGUHYv04+DKR2zwfpDXuZeZ9TuQh25MI2Kv6ls7r+Gi W/yivsKwDAO0PfbwgpgyWUMbSksMyekFV6OGTRQUvqGH9+RX2LRIqEZ+5h0zxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783619374; a=rsa-sha256; cv=none; b=CwpaYfwpCBMWngtKTtAUd0wrbTNbKSD53MOpXBb5Q+LCfOmV/JQt/gQLZ7LRm15fejoi8J E/LfEfrtyPc0yxuYJRi3dWZq2BNKLhzWdWkP3UWC5+yGypT/LIBsGg4fUNbV3sIR3cDX0o k37UUvQd7zS28FlNvdF54L/1IMlma+zXEFr8pQ8pOCxx+MBRBH92tCl+KN6NME/4Ob6wGA d5wdeB1ktZAMUsYtrImNv7dtN1UnpRHTrRuPKtxyjYVDQhz0ayAxqHGaD5qKOm94JBXlhx resJnUIxlenofKYkpZz5s3mI0e7B0SAPfVguf76I0E7S1Ol9iFFN50/x2bqnrA== 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=1783619374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XSvZXzkMaGQYv0J/71yP2t2c2JQhM8oNqAUpCKIDGWA=; b=xsjJlwB4Qu5Qby/A/yc+6EugZr67WEuMqEbrXUEy+KlMNdFMW8mZffq14mGESHj5wb5nfA O3K58xMP0ZpTR6e35Zz4ndid0InWshaKy+iRoVLwgwo0QoilbAMjQd0xYPTpAbuh9ABqoV T9HuYKi0ToFftNqPSvntNBJ1wf380l5Rmlrr736emvQTCUKI/pq6Vn+lE1mGXEZeynKXY+ rC+P6vB/f2MBEAL1jtulpGmZnyxqadLgELyE2IdYDlal9JtV/iLuT6yKXiPCSsU1R669uq uZvHHYyME8R7iHfumN+x8g9yHKQ3BOi1j4DEdRd3H2B37oj9Q8J3ZZiHgmvgdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx2XZ1MRdz3mx for ; Thu, 09 Jul 2026 17:49:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4043f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 17:49:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: b17f8fdcc51b - stable/15 - raspberry_virtgpio: fix OF_hasprop() usage List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b17f8fdcc51b5f15b2a5bb13b524e479e5632f00 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 17:49:34 +0000 Message-Id: <6a4fdf2e.4043f.6ca2a4ac@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b17f8fdcc51b5f15b2a5bb13b524e479e5632f00 commit b17f8fdcc51b5f15b2a5bb13b524e479e5632f00 Author: Mitchell Horne AuthorDate: 2026-04-16 16:05:25 +0000 Commit: Mitchell Horne CommitDate: 2026-07-09 17:48:52 +0000 raspberry_virtgpio: fix OF_hasprop() usage The function returns a bool. This driver was merged recently (by me) and I missed this instance. While here, adjust the ofw_bus_status_okay() call similarly. This function still returns an int, but this usage is more widely used in our drivers. No functional change intended. MFC after: 3 days Sponsored by: The FreeBSD Foundation Fixes: b60cd486a652 ("ofw: bool-ify OF_hasprop()") (cherry picked from commit ce6b4973ba8c6503d3b6dc12d9e6b42ce274d912) --- sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c b/sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c index 64ce6fda6306..797896a7f22b 100644 --- a/sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c +++ b/sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c @@ -206,14 +206,14 @@ rpi_virt_gpio_probe(device_t dev) union msg_gpiovirtbuf cfg; int rv; - if (ofw_bus_status_okay(dev) == 0) + if (!ofw_bus_status_okay(dev)) return (ENXIO); if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); gpio = ofw_bus_get_node(dev); - if (OF_hasprop(gpio, "gpio-controller") == 0) + if (!OF_hasprop(gpio, "gpio-controller")) return (ENXIO); /* Check whether the firmware is ready. */ From nobody Thu Jul 9 17:49:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx2Xc6Lkxz6kYvc for ; Thu, 09 Jul 2026 17:49: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx2Xc4ptKz3h5j for ; Thu, 09 Jul 2026 17:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783619376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jjGNN03ukMo991VxRiuZmjH62c8sew57LrrPZAFMCVU=; b=g+MgFd2lojLXh/zqn6cxqBKl1Jp6e/AQB+/KmoiYsrENZqJKez52yLVGzimwgPjGs+Y1Q6 /89azu0AqQpL9Of5pHXZbpQbUT4v5rAr9tQLqo2V6M1gKaS6wB8A+erl/kpVww1jRBTJmY jdBLPCrHsbplgCYZu6/wiYg+yfiY9c1WK6fsprtz/N1jvy17fgzWe20qltkSaD7UlEFCCi OIz3KOWeYWHYUEVCqQK0GFCSqXkhZCnSZl1oPe2frmeLSVAzZ9onDpzTuAEbrct+ulJf0z hJltX0DIOtQ8JlVzqEP1aBieDcRliHAwlKvphjNfVAv612c2amKflcso1cvrKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783619376; a=rsa-sha256; cv=none; b=Nxy/KDT4GO6Mu/+rmWYuC0KQDdhnkaUJoIAOb6h599tJArA/SDOurhNOnSd5f5L+P+RIlC 9uogtNeiU7S7HgFwBeNe0jl9b3Z2HdakLUxFAuMLXOSrxNG9t6YOtczK3QkfempC7r895Q A5gXQ6oIWc/H82SM4C9BKvdEmKyx8ex4tmrA35Tf+m+VfiJ/xTRrKOtIqAz9ht971rM9ZI NioVJFgLg2BjwFMrmmbr5JKvZsMmbfHThufy9daWnxVtKtxzrdDU4XNTZw8N6x2OgzG1xJ y4+D2DPOarVFI5zkHUTpqE4Nd7JCd34V/y1IWDMvN7BFlUnB8HTUrJxM2e/TyQ== 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=1783619376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jjGNN03ukMo991VxRiuZmjH62c8sew57LrrPZAFMCVU=; b=v+V5IuG8oExN3Yhe7z6hRpK0plrGbzm6OFYoidUeUk1XcXjFivkn4do2E4c7sICq2oYm5w DBKS1PLHp3nkqcPOmjJJEJF9wwrBLzxdSkfjXr+PfU3oa8miQgWp7HDsX3hw5oEhqyDqqs EJsscGyKHaENTHP7ICqw/hdPZzqxX41ammE4i3tv1agKNMReex6qOtL997SE56AZjdCexZ 02qcC+42guV0xQomXyrY6ggqB0pSm0ROdZ4w2EZjgWEc5xB1+3/FI+ieN2FHI4Kc2y88SL Vg3M8u7bU/t9rs7gtm3ecwuHsOPKo3rm8hXRGwa+AlIMgim1EF+n6pPE5FsIpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx2Xc2sR2z34L for ; Thu, 09 Jul 2026 17:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41591 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 17:49:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 712623ab14b9 - stable/15 - generic_ehci_fdt: fix driver softc size List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 712623ab14b940cf2fcd86cf61e7e70469e414a2 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 17:49:36 +0000 Message-Id: <6a4fdf30.41591.7f7031e4@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=712623ab14b940cf2fcd86cf61e7e70469e414a2 commit 712623ab14b940cf2fcd86cf61e7e70469e414a2 Author: Mitchell Horne AuthorDate: 2026-06-30 14:58:11 +0000 Commit: Mitchell Horne CommitDate: 2026-07-09 17:49:13 +0000 generic_ehci_fdt: fix driver softc size This subclass declares its own softc structure adding necessary members after the embedded ehci_softc_t. The full size of the struct must be included in the driver declaration, otherwise the allocation backing the softc is not guaranteed to be large enough. Reported by: KASAN Reviewed by: jrtc27, manu Fixes: 7a58744fd0f1 ("Split out the attachment from the generic-ehci driver") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57951 (cherry picked from commit d5332d3a904242cb82e7dbf35e4aeec7c2df4402) --- sys/dev/usb/controller/generic_ehci_fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/controller/generic_ehci_fdt.c b/sys/dev/usb/controller/generic_ehci_fdt.c index df2dc7fba4b9..8271061d274d 100644 --- a/sys/dev/usb/controller/generic_ehci_fdt.c +++ b/sys/dev/usb/controller/generic_ehci_fdt.c @@ -232,7 +232,7 @@ static device_method_t ehci_fdt_methods[] = { }; DEFINE_CLASS_1(ehci, ehci_fdt_driver, ehci_fdt_methods, - sizeof(ehci_softc_t), generic_ehci_driver); + sizeof(struct generic_ehci_fdt_softc), generic_ehci_driver); DRIVER_MODULE(generic_ehci, simplebus, ehci_fdt_driver, 0, 0); MODULE_DEPEND(generic_ehci, usb, 1, 1, 1); From nobody Thu Jul 9 17:49:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gx2Xc0crLz6kZxW for ; Thu, 09 Jul 2026 17:49: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gx2Xb3Kq2z3h5G for ; Thu, 09 Jul 2026 17:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783619375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBGypYxmM+PSLet6elB70oAXIi7hj8NjKrFVDUeUs3c=; b=Hwb2v5pCin9WNiYO9ulWXCVxfolsjQ9w2HG540kJhgH9iTrOiSvrjqt6Rwv8R1metCp0Cp uqgPBmr+wYTyKll3BaMtB4bXiAZe/J6AKaDCEjWwPm87JGDqt+Y/2Z5FW2aT24aisDR8xN eMD1LTzLIGPWTTNjdJAlQON8e+EanUXuylnlSqNS6h3QI7vD9DAeZNDutxWJ+or+SYuyT0 ZJbDwnTdJuyJY5GzUjzBTJ6yF70sIT7fboi2mUxBjTw6G5Rl60zva5Znf+ZGmg1C54N9IG B+2IgEJiN2dpIqeMHyJ7qs8WH7AkgTgwzk45xnW06nBsEEex2FRzwG0zBPt40g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783619375; a=rsa-sha256; cv=none; b=kFFN5Ufg+xtFDUjj5Q4lhEauYgpmxmdjzBn5g60uwFewS56f9H9qdwPLBHk7vSybvIpXCq fN1YbDLeV6EfpWqLFfu4tPBWpDK3Fla7VFthXIoSUd3CItFlbn0yK8hLiK/qJdDo3qS3Ec hkoRMNHlyPaRIg2veCISPlrx7mLfyhRWgSdYNj8pVT6XrK9kxrOIWIORYN9wsLx3496tDc 0Me6mxb4FbCG96OKPLQpjCdnTTPilc0eRXJcQ9EdWrvfpEWV10Ydoc6/W53dlqr38V3UIT DXBnRLtQc6eOpAP6MvPUl0AChnyE96WqguIxHeG7UvNuEzNqqdDaMvCF2y8iqw== 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=1783619375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBGypYxmM+PSLet6elB70oAXIi7hj8NjKrFVDUeUs3c=; b=GhK8ADQlYjKNzs+ZqfHbx6Ubf4nkt4DhPWBtzrTvnTm/k6GbJ3XXMePk+8x6d46DvU3kM0 wiM13eF8uh7rfn5KQmnhQ+xcYsv1NTvbJY2j2jrO4lZb4/B/K2vp+hsydDByBwSDCJIGii yk9tJ3w41E0mosoe1Mq+fTjhrEN7lRmCkDrb+DXh70bO1DL41M/UwP57zyv+gpG24ik9hf ElyLE6tXia68JwdD/mFEVMi1MsjhsfHFMxZU2JvSddnf3BMfLlkTSyQ5DivFkC/66hyRxb sNtcyBvFWncE2KUoPf/S2ZMQwonYVlaDj4B1EOGvA8HKG6Z1pAEcrpuoGLlV5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gx2Xb24Yxz3my for ; Thu, 09 Jul 2026 17:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40f2c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 09 Jul 2026 17:49:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 745c0ea79057 - stable/15 - stand/libofw: make OF_hasprop() part of the library List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 745c0ea7905789ab0ca1e3f143b7550ce5f7ea91 Auto-Submitted: auto-generated Date: Thu, 09 Jul 2026 17:49:35 +0000 Message-Id: <6a4fdf2f.40f2c.1adfc212@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=745c0ea7905789ab0ca1e3f143b7550ce5f7ea91 commit 745c0ea7905789ab0ca1e3f143b7550ce5f7ea91 Author: Mitchell Horne AuthorDate: 2026-04-16 17:48:46 +0000 Commit: Mitchell Horne CommitDate: 2026-07-09 17:49:12 +0000 stand/libofw: make OF_hasprop() part of the library Currently it is only needed by powerpc ofwfdt.c, and defined statically there. Make it available as part of libofw, mirroring what we have in the kernel. Two small tweaks are made to the implementation: 1. Return type is changed to bool 2. Return 'true' when OF_getproplen() == 0. This matches the expected semantics of the kernel version, described in OF_hasprop(9). Reviewed by: manu, imp, adrian MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56429 (cherry picked from commit 48a05f833c7d0c089d37522cc234039ec823edf4) --- stand/libofw/openfirm.c | 7 +++++++ stand/libofw/openfirm.h | 1 + stand/powerpc/ofw/ofwfdt.c | 6 ------ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/stand/libofw/openfirm.c b/stand/libofw/openfirm.c index 1df65784e47a..ce4444262f6d 100644 --- a/stand/libofw/openfirm.c +++ b/stand/libofw/openfirm.c @@ -288,6 +288,13 @@ OF_getencprop(phandle_t package, const char *propname, cell_t *buf, int buflen) return (retval); } +/* Check existence of a property of a package. */ +bool +OF_hasprop(phandle_t node, const char *prop) +{ + return (OF_getproplen(node, prop) >= 0); +} + /* Get the next property of a package. */ int OF_nextprop(phandle_t package, const char *previous, char *buf) diff --git a/stand/libofw/openfirm.h b/stand/libofw/openfirm.h index 35d10c320b57..b4890762b0f9 100644 --- a/stand/libofw/openfirm.h +++ b/stand/libofw/openfirm.h @@ -89,6 +89,7 @@ phandle_t OF_instance_to_package(ihandle_t); int OF_getproplen(phandle_t, const char *); int OF_getprop(phandle_t, const char *, void *, int); int OF_getencprop(phandle_t, const char *, cell_t *, int); +bool OF_hasprop(phandle_t, const char *); int OF_nextprop(phandle_t, const char *, char *); int OF_setprop(phandle_t, const char *, void *, int); int OF_canon(const char *, char *, int); diff --git a/stand/powerpc/ofw/ofwfdt.c b/stand/powerpc/ofw/ofwfdt.c index eeb5f132a3f2..5422924a3b4c 100644 --- a/stand/powerpc/ofw/ofwfdt.c +++ b/stand/powerpc/ofw/ofwfdt.c @@ -32,12 +32,6 @@ extern int command_fdt_internal(int argc, char *argv[]); -static int -OF_hasprop(phandle_t node, const char *prop) -{ - return (OF_getproplen(node, (char *)prop) > 0); -} - static void add_node_to_fdt(void *buffer, phandle_t node, int fdt_offset) { From nobody Fri Jul 10 02:01:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxFS472sYz6lF2J for ; Fri, 10 Jul 2026 02:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxFS46bMVz3Msf for ; Fri, 10 Jul 2026 02:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783648884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dk4IbnqLrWIVDvPsf1MzDJDXGkukSMx75dPlu/Bti9U=; b=Z+CLilPGYKPcJde5zkMfo8OozBrNzXwF+dB+LNnahAeINJ6L7DPLVX+mPt3EMLbLPmvYep MgNKSMyizsXA25tLEnPM/P4M9Rx+SxQnswh3Zg5Nx8SkP1dQLQpN/JLmkilaoNYusS6/9m 6u/3eRGOOxvkV6SFJzi1Bktn1Ujf+R5nvEmsaJH1IxRqogkwkh5KQtWx+3Q0Cnb9FMIiTz VYbTiqw2aF3z29xMPUFsGIzUdC5faxH6q7qY61gJkGnrPRPz249HbQnYU6WQLp1gGOTniV IQidXN9FdMgSysnSsOyIlcoPHv1/QecvDl4xpuGhwtABWe4DpuT4EMAKTbV5Lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783648884; a=rsa-sha256; cv=none; b=jDhSB+/J/EvjrrwR/dedLly+4brObFZbE/IVZ3Z0r6IdCnF/8nd4e+OWhArlnIYxZIsiKA gLRbbLHMIPBM4qaeNdE2DgQAjBVMn6vZOXo5MpbI9sh9HO9q871c3anpx3Z6rfVB2KjRd+ nr7qzg8/q+EMMaScDemLwrHkML1f90cZR1J5Nxu2qetau3AmamWB/psi8ill5JyY5jVLOT 0b9KKv8+ZIL80p2Lu64CAACOUoP0He3WmZMle4vEq5bRb9fyUs4cA9VhQ6DNrZnA4RJsMU O3Wsl14TXr+Z8oM79hmHbDHKKLUmL0HN3UJQy8BvrvJF4zSiQUPhC+3wPBjb2Q== 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=1783648884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dk4IbnqLrWIVDvPsf1MzDJDXGkukSMx75dPlu/Bti9U=; b=wquWoM4Ve6tO87I1/MVkJypUS+vwQ8fEQsXxLXlkWvXXfB74aAXXnxR4q2bQPLLSqSuSWD 7aIfX3N6o4M+efRNsqeBUl9jKOMvVLD6A6HokfnWq9A8+uEpqst89jl9bsW+km/v2HwbQ8 eg3ajB7CG1XjB+VcXKvqHhtsM6RN9YxwVbF6TioyJToh7ZduMvQ6Mv+zLq9vwoEQi1Fh2T cMAui1FBUFHzY2XHJZp3b0H35H43YDD7KFffrmnWgAZKFF/q30uOCesWZn7MFytTI55hRd WhUYiQvkQFfQDNWVKn9WIheW4w0iDb2s64/slwMArbEqpZonGzzl4xerL+GIGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxFS45N7QzbSB for ; Fri, 10 Jul 2026 02:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e68b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 02:01:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ab1af7bd2f42 - stable/15 - libcxxrt: Fix diagnostics for derived classes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: ab1af7bd2f425147e658a32f128a56176b1de059 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 02:01:24 +0000 Message-Id: <6a505274.1e68b.1c537979@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ab1af7bd2f425147e658a32f128a56176b1de059 commit ab1af7bd2f425147e658a32f128a56176b1de059 Author: Ed Maste AuthorDate: 2026-06-24 15:06:51 +0000 Commit: Ed Maste CommitDate: 2026-07-10 02:01:12 +0000 libcxxrt: Fix diagnostics for derived classes In terminate_with_diagnostics the cast_to arguments were swapped, so it always failed. The diagnostic handler produced output like "Terminating due to uncaught exception 0x24891e08000 of type std::runtime_error". Now, e->what() will actually be included in the output, e.g. "Terminating due to uncaught exception 0x2bba49208000 'Model file doesn't exist' of type std::runtime_error". Reviewed by: dim Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57822 (cherry picked from commit 3a5c2899fc7bd0865b5aacccc3465e46e9bc6df3) --- contrib/libcxxrt/exception.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 5034809a1380..883361bff084 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -344,7 +344,7 @@ static void terminate_with_diagnostics() { if (throw_ti) { std::exception *e = - static_cast(e_ti->cast_to(static_cast(ex+1), throw_ti)); + static_cast(throw_ti->cast_to(static_cast(ex+1), e_ti)); if (e) { fprintf(stderr, " '%s'", e->what()); From nobody Fri Jul 10 02:03:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxFVK3Ly9z6lFdL for ; Fri, 10 Jul 2026 02:03: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxFVK2lkNz3NLM for ; Fri, 10 Jul 2026 02:03:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783649001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gp44gpy+lfu5JTFQXCgAvTH0XaN9pHMJ9DLQWq3N4QU=; b=pEsgmiLUPBRRbDOhnBvVY/9vc2VsXFvlKrxXVkWtAER0hIfr9y80c7OyBi8mlW2aL8qan0 qJmdod7EcF09Wd9RJ2qr79dlc/wKeE7ytNNw8mJ5zo2O1BUUNTpIUtgQSDiD33oDdlR7Wm VJR7mWo6B1eeO8snZI4KEIvqXzgS2aZBFKqqiMP1aA/SBbLOe0Gg1W9KsDY0eCtIjl36En 3WP9XymocFtTHT0TKks+fyrF3Kztrt8Qpg3fMRmmrD4CrsKLIvwBdOgwyvF/8r7UKWdUE6 A1SwpxYyIbwIyzdBr6oTL4nda2NzaXfgppgCyV5IgmbxDr1CSwV21p+AhP8thA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783649001; a=rsa-sha256; cv=none; b=pIlQMLM1jbDMXgKaYWhIeWsJxfksAYKxQrYGmWGtntWNqC3kp+TOpeTu+oEMborQPMcme7 FtHjddRkvnHAU8/UzkIOcGg+mNwWbUpnbrF57piUkUNvts4iyNbK14A/2/nn7GY9pvqynm PP+0uTBl37yoziYWRIYgxrCrlJdPr3+VxCaBCLmjdI0EuxKxFCZb1KcKlMUoikcYcfWbiZ 3qoqTbaH/ug3NOPLPYxj1zCMdte2LY4UOd08PbNQIwv3eN87qiQLJiRRiLSLLxUHXT+r8B HhxCTPqMGOtuc7tk2BnddabDomb9KT/ymbos+rCEb4XPWz87+35Z1kZluvy6uw== 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=1783649001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gp44gpy+lfu5JTFQXCgAvTH0XaN9pHMJ9DLQWq3N4QU=; b=SuNrEiJ+7shk2tzN32F3npKZQNwS3sQkDnQ+Sddqe2my5d+af7VdwiVa0fJTazbpW1gxng 8oi4lnKsBtj6a7/noBzZTijkigRb4lrW7zlne4rsIQL3NCn3U1dQldLudpq0yKo8UHep37 BPJ96H9uajnCeBSRwkBUj5NvZ1WuAvQP482PlOBWR+bM0nP3LpiqgC10SBkIhCjhse/iX9 ZhITrbpEkvU/8eiGsHxJGNIXyEylbnMp8l4WW79ThbFLp5wBTI1qDp6FUsF0HCu89KGZGU pfL2OyeDX8PJkEf0p3F/MUu4y2wZwqzENiQfcYLQqTkDyMUApbWnaVi8syYoQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxFVK15kzzZq9 for ; Fri, 10 Jul 2026 02:03:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c85c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 02:03:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: db1b75d03587 - stable/14 - vtfontcvt: Return error from write_fnt_source List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: db1b75d0358761fee916e10c8b11a557b47ae1b2 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 02:03:21 +0000 Message-Id: <6a5052e9.1c85c.2294b229@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=db1b75d0358761fee916e10c8b11a557b47ae1b2 commit db1b75d0358761fee916e10c8b11a557b47ae1b2 Author: Ed Maste AuthorDate: 2026-05-22 18:37:51 +0000 Commit: Ed Maste CommitDate: 2026-07-10 02:03:06 +0000 vtfontcvt: Return error from write_fnt_source Previously write_fnt_source always returned 0, silently discarding errors. Return rv so that errors set vtfontcvt's shell exit appropriately. Sponsored by: The FreeBSD Foundation (cherry picked from commit f05fb5157ba1291ee5019bacece8d1e98ea95b35) (cherry picked from commit a00f80731213e03bf3d0b9028a93d0be4c0df756) --- usr.bin/vtfontcvt/vtfontcvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/vtfontcvt/vtfontcvt.c b/usr.bin/vtfontcvt/vtfontcvt.c index 508e298257a4..d9638edcbe29 100644 --- a/usr.bin/vtfontcvt/vtfontcvt.c +++ b/usr.bin/vtfontcvt/vtfontcvt.c @@ -986,7 +986,7 @@ done: if (rv != 0) perror(filename); fclose(fp); - return (0); + return (rv); } static void From nobody Fri Jul 10 02:03:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxFVL5ppWz6lFdQ for ; Fri, 10 Jul 2026 02:03: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxFVL2wNMz3Nf8 for ; Fri, 10 Jul 2026 02:03:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783649002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NLNoJa5TnJ/+tYZFw9YjSdq7SU5psIpudr8EROszHEw=; b=jjFca2fi8Qd/NkSGkHV9SOM9JTuIlp5CK6LZQoQGUSRe4ySU+et796i1OlnGSH+R0w4Kcl 6u2AAMXAy79od+6bj49fv8uX2QAv7WyU1zQ22hbf4peBtI1wQwqCfeeug7Hl41i1+PKuBi Ete6CH0dh605oFtiZQ2va0bnrq/j25q9J8yqjH7VSf09WxjLw+HRhQmXcymkMRAcGeFAt5 kL9MYRoc4OGz7rTnSPfOe58Z8nMi8O0gNgPIWYxqY6ufExtVWDqc6blgT5A7n1vDYsZIAq Kqh4mmjKkw2wav1XCpdxH4eVoRbwPX+VfwNCEJjJQO3zJqyEWrv1CBrbXPCGTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783649002; a=rsa-sha256; cv=none; b=x39WReIuJa2AeU3IYB9PCMnX4n2SrXKmSmjw6Kjr9V1k0w7Dy+08Uu9GUR45StJ0aLn5EI Vfpq1efw29oLfncinfkHnfK5+MKA5Bg4n4/gp0YMwaF6npYbIYVDtZx3oT8MJOxJXXguZq p89I5rpNXNFLsSp0sZHXGimqy5q05/jZxzxcBQPE++OToAsZHb3HQMKu5bkAr4/NCD00Ps iH/0g9hvhai4j9MsTJ/bDHE65OD6+3qULNqkB0RcaMYCbST5P1s79uuHI/YX0PxryU7DGL yOxclcEyRolKCfbhZ+i1HU3ekbBaeEUl9CUZfR5xUj/Wn9bFn/5iACxXD0dgIA== 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=1783649002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NLNoJa5TnJ/+tYZFw9YjSdq7SU5psIpudr8EROszHEw=; b=yIegCt6+4zJxuwlhIsBTP2g91NJNlhBV12jlosF+hky7AXje0ES69U8Ig9wNZzQD1X90PJ pnp5MeAMxLAj1njiNqZVV/NKO6GmcAuCgElnr/N14nTUU+HBLStPyoifeg/oO8IK1M/bZ3 8FV4GCk+oaFIQeBUg6tN442RU4Suo83Lp1n6zqDh+6sQ2JmhHb321aWaRSnIQpaTocYGJX QqzcQK7qPfCz4ScHZb5It/q7UNYVjRG+OwSaXUOsAur3X21KSiJFW/e1L2GBftwfKPDewE J3NVMTwH0LjN/ZByRo1HfjcG3WpdORw/w27kY+x2TB666elsHY+28QTkhVMDWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxFVL1tZ9zZqB for ; Fri, 10 Jul 2026 02:03:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1cb72 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 02:03:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: fe0d7d6ba549 - stable/14 - libcxxrt: Fix diagnostics for derived classes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: fe0d7d6ba549673b58d5ef3bb2bc89dd52e8a9c0 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 02:03:22 +0000 Message-Id: <6a5052ea.1cb72.1b46bcc8@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fe0d7d6ba549673b58d5ef3bb2bc89dd52e8a9c0 commit fe0d7d6ba549673b58d5ef3bb2bc89dd52e8a9c0 Author: Ed Maste AuthorDate: 2026-06-24 15:06:51 +0000 Commit: Ed Maste CommitDate: 2026-07-10 02:03:06 +0000 libcxxrt: Fix diagnostics for derived classes In terminate_with_diagnostics the cast_to arguments were swapped, so it always failed. The diagnostic handler produced output like "Terminating due to uncaught exception 0x24891e08000 of type std::runtime_error". Now, e->what() will actually be included in the output, e.g. "Terminating due to uncaught exception 0x2bba49208000 'Model file doesn't exist' of type std::runtime_error". Reviewed by: dim Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57822 (cherry picked from commit 3a5c2899fc7bd0865b5aacccc3465e46e9bc6df3) (cherry picked from commit ab1af7bd2f425147e658a32f128a56176b1de059) --- contrib/libcxxrt/exception.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 5034809a1380..883361bff084 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -344,7 +344,7 @@ static void terminate_with_diagnostics() { if (throw_ti) { std::exception *e = - static_cast(e_ti->cast_to(static_cast(ex+1), throw_ti)); + static_cast(throw_ti->cast_to(static_cast(ex+1), e_ti)); if (e) { fprintf(stderr, " '%s'", e->what()); From nobody Fri Jul 10 02:29:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxG4w4DcTz6lHGW for ; Fri, 10 Jul 2026 02: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxG4w3gytz3QZL for ; Fri, 10 Jul 2026 02: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=1783650592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=90wZXwfUDRNA8pG1Xwzg+gKER5FewLSpbOKxTSE0t6Q=; b=agugmI7ZpUky9D4EmXyQz3UfCB7aE+4U+roYoqnifV8gve1oa7wqTtIkcN7uzoPNGH4izl 9J+ZmgpyjiAWw8Jy/U+PgQDn6P3G6jyoK31++mB0SQmaIonMNT4uS/dzsB8C1XI5Qm1VV+ 2M512KZGjVlmmnMtok8hH+kCA0okJyc6BnpfQKBNBgioCzQrI4s/bMCiFs37NZaXFq6BiG cAHfTQmhsgEr1xRBSacpdypDFKSLlydEdObeevFJ4FKxFOzji6Yu/iQLcLr8+5a5jyIFMC otYNfzfJDmE9z13istbOUKLCzPMs2SWS2SkYyYe5zVqkQEXZd2I0j8wTw2ZKrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783650592; a=rsa-sha256; cv=none; b=vOBoYQC7HZvO6wUvUn9P1P1JStnaO1ajm9gj8smMQcNPLf06XRK3DnPKUhe9BTVShOp2GL KCH8ksyCwYHxE8jK8WSHXhiD2bfHYRO6KTLQsE1cML8GYJf7szbS2piJPOFqITC3ByNt0M l0vw35r4+6GoGiCL0+BARVFOmOynL4Yk7igu/+FgWXR6db3wgmQ++EwxHQMlIBnOsQVFBi ibAMHqN4GRl7RjfYs1uNKKvDXDylIKUyXwRSFLtnNSnQQT6BIepjjK/3PB4ndTrJ+npVtL DJX0QW5CDSVcIH59DJh0m+giV+3uDl/zlFk62MDTGQBwHCPbdCaBLh4xdyuOtQ== 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=1783650592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=90wZXwfUDRNA8pG1Xwzg+gKER5FewLSpbOKxTSE0t6Q=; b=hlFsMF8YmJsbJ0hb6n3wK/ugbUkChdjlZWLxxn8BV7+RK+oltyzzVGdDLfGKmTFyyoLMkY ElUVoXCf7zu1TPt5JsbaJc6y6JPM9f06BEvhdPWO9dWSNFa+hkDf6nSjEGztFmCUEnuBOC GuN491dvuvnfaT7ZUBwZPfYdsY55Lz3vaO2dcu6Lm0VBWiFfz1wDnQTEOPbHUSSOrn2EA1 J7XFDX14MXte+Yqo9IwduQSOMFCmXmIrzuxvVUs50Ac5acZKNPI19+K+Yu18DkwpQSuBgT WAx674FvVEMW/Zs/zGsBC10l4PiNivCR5vhh12dYCcWDTYDJ8v0dr7K56ZJ6Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxG4w2T66zcB0 for ; Fri, 10 Jul 2026 02:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 202b0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 02:29:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 28abe46c4b0f - stable/15 - ffs: do not return ESTALE on attempt to ffs_unotovp() on unlinked inode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 28abe46c4b0fa9c19839370ce8e903b001f01191 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 02:29:52 +0000 Message-Id: <6a505920.202b0.6cd4c60@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=28abe46c4b0fa9c19839370ce8e903b001f01191 commit 28abe46c4b0fa9c19839370ce8e903b001f01191 Author: Konstantin Belousov AuthorDate: 2026-07-01 01:14:45 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-10 02:26:53 +0000 ffs: do not return ESTALE on attempt to ffs_unotovp() on unlinked inode (cherry picked from commit c041b82c59e885d106f45454302bad3d9dcc58a7) --- sys/ufs/ffs/ffs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index e3f9270c2f49..76007d448536 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1962,7 +1962,7 @@ ffs_inotovp(struct mount *mp, return (ESTALE); ip = VTOI(nvp); - if (ip->i_mode == 0 || ip->i_gen != gen || ip->i_effnlink <= 0) { + if (ip->i_mode == 0 || ip->i_gen != gen) { if (ip->i_mode == 0) vgone(nvp); vput(nvp); From nobody Fri Jul 10 14:17:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxYnX1m6Jz6lCRl for ; Fri, 10 Jul 2026 14: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxYnX0sxMz3r79 for ; Fri, 10 Jul 2026 14: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=1783693056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kvbgpTecTKh8XaqFCHU+tM1pkYI5+VtAQTFI7v3j2/s=; b=rpUXUjsHQg9V+G7j/Pmk/PBqfjmUGv42BOlxUgb7aPW83ZJTuBwM+to0Na/yl+fqYcR9/9 ZG0OsoWFRcZTIAjltv6E3M6GYeGFWT9yGAvBFGddRzQKbfNX0ItS9BbxMFl1oXLCKZoo4r Y1zhg9U5Cb0pM7UqAtuMyHyfp0XnsQlP5QPlLUhCp6v8rnLl1/lfPwlhg8kXMX0S7ZtGZO DkYZJ9jqhuw04cEHoIwhaZ533soXLq5jciwDIuaruGtXDfZpljAR/P/fOU3WCmjCRVXTJp 1jAeeFmVL0mNaKR2k+qY4Jm+Usm4uUPSZ1TA7aUNIhzk/LIkgPLGg0BAPUwSzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783693056; a=rsa-sha256; cv=none; b=FKA7rOUJStnmeFTCORFh7UOYprOc+xWAjWsntyrL+UWM+j16E4dzwaadRVOUztE6pG9yFB 7MLX8pVANbG37l5Rpcdu1B1MhHNn+Oi1YUGHtwkIr2Usxo6qr3FO0JDg4eHAK9i1ZoKkyU rMGU6fA4+07x4Pu6gB4KWeT4Yl0FwBpAaWF3YKd/tvtyXHgIGO/++x9kmshfGGK7nN4xsQ kHmSaMecDMQ9I6Ys4LlHzfD/4RcwHz42VqD4n2bL0jogjC5hilqFymK+VHTz1Lf70ailjR W9DZ0LZG9MeDw7UHtK+nthJF0NmPIXxibuIfrfYZyUxM+pH8ZwPr2TBWKaG6Xw== 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=1783693056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kvbgpTecTKh8XaqFCHU+tM1pkYI5+VtAQTFI7v3j2/s=; b=UNIo22A34gwaMg5a4RYGP10mD+BB1HX5wXr4eh0PrypCrC+In5WxVsVLKp5h25ggwnjl7I bD7zpp7Zkya7oRUgdO7H4MxD/WeoIORspgRyV2anXgyIIqVqkLvtCJniWG8AZrkrLYDrwM jMTjXJgCYiZLUDIzdDP3CGvIjs8udvIWJB2ZK4z+YKFtnlOrSE7uQDBZlUDfeEYTxXYQyp 5+tIJKZA0u5/Pavjp7dcCl4T8N5GMt8zBZPqdYRPbm6PZnueOtxWb3fTZqbgIvfPQUM7L0 WIchXN+nJxWJqKGhz8lo96uhdAv1ZWDTa1HcJFHxbTtxI+u0Mb4q0SvEKUuk6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxYnW6KcLzyZm for ; Fri, 10 Jul 2026 14:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 248a4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 14:17:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 1c9c1a64b240 - stable/15 - vmimage.subr: Add ability to install src in VM image List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1c9c1a64b240453eb6ecb9073780f7153d604355 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 14:17:35 +0000 Message-Id: <6a50feff.248a4.2a55322@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=1c9c1a64b240453eb6ecb9073780f7153d604355 commit 1c9c1a64b240453eb6ecb9073780f7153d604355 Author: Krzysztof Galazka AuthorDate: 2026-06-12 18:21:14 +0000 Commit: Krzysztof Galazka CommitDate: 2026-07-10 14:16:42 +0000 vmimage.subr: Add ability to install src in VM image In some cases having a src tree in a VM image is convenient for development or debugging. Add a WITH_SRC variable, which, when set, will cause the vm-release target to include FreeBSD-set-src in the list of packages installed in an image. Signed-off-by: Krzysztof Galazka Sponsored by: Intel Corporation Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D57143 (cherry picked from commit 4ea4116f8d2069194563c8692c1f28d88c319ca8) --- release/tools/vmimage.subr | 1 + 1 file changed, 1 insertion(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 56acbc359936..462f0653f8a4 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -81,6 +81,7 @@ vm_base_packages_list() { echo FreeBSD-set-lib32 [ -z "${WITHOUT_DEBUG_FILES}" ] && echo FreeBSD-set-lib32-dbg esac + [ -n "${WITH_SRC}" ] && echo FreeBSD-set-src echo FreeBSD-set-tests # Also install pkg, since systems with a packaged base system should # have the tools to upgrade themselves. From nobody Fri Jul 10 14:18:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxYpx0C3Hz6lCpW for ; Fri, 10 Jul 2026 14:18: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxYpw6hp1z3rc7 for ; Fri, 10 Jul 2026 14:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783693128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGCG3FXpB4g8KtQTEdE6RfO0j0R/RpYvCu3whB3cYqk=; b=RcjlNMxRNZ9M7RlvhonzeYsExq5mMtvxpbNj6GKL3kReEjzgXmUpJGf0ry6otW8DTmWJ5g 5pW6X1iStJ+NWrSe4waYQwHyXNsHPpTM5AsRV04pVuaJhzpc9bu67Qoic9Qxn0MGqRw5xp xsVEH6YpBD1yLO6rCZYP14/AlR8DIT3ssuXrcHD5Ge2l7WH9s96AWWdOg0c8SJydWUHOjM JeYfjLwiRWAwK+oR6cSL2528C2h58ZxdyolQOahmEZWzdo2LG8kh8917Lp8xS5VJoz/rM4 OFMbke0SFuiE9rsJdaDjj+DPDv0uvXqhO+1XLD9Fj5NLFTGyohGcTN/LzSoMtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783693128; a=rsa-sha256; cv=none; b=vj1V+qDdosS1zr2ax7M5LVdRila1AR7UzhV+9tvOV35fLqn4QHq8nVBBDyQclJBChyQtQH AxiaPzEPiKfNVANEa6008HrrkCFb8PxAO9IfZ1o3VXX7gFVnNDb5HkBt4tlbnlFhMXVW5b 9G4OO9Jo57p5C0lSny+wZ0+zOnLmLIIKn6SooLEb1lCkmls7jDMnLtSvFfc87sw1HtIZps Bu0aoJjYBdx53aO7Z8ueQDAebo5Drlx7kaFVFHhasnH5ZjOzuwc9snRfKncM7WeTwS6Dd6 fn1+cMlpRlssIBjO/2oyOSlUQk9UqdJRPH0x+wjE1TvsGXU27ZMR0M5eR6ayvQ== 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=1783693128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGCG3FXpB4g8KtQTEdE6RfO0j0R/RpYvCu3whB3cYqk=; b=ZNMYSTSoGiN+d7dIqJL+44XXJwjXhnVPuwcrjNEDeIBdVm8U3ZF1mcuK6ZdMMWJj6cAwpy fbu2PNSgr1cHff98QexREoN22jHAN0E4uBo5+FsmNGvsfHUlawX0YDn9ivIIDBA5iC3lhF ynSn/0SR0yH47A5KOPyBC+7Iz1zjr+GLTn2l0AZWgaytGLzJleMbOKjSPlJPEZqHmRcqoW KiHuHAzgewAOVL4hO0U/k2rgsw+ghrPQSL1tXFXCTKZaiDj012wuNN6W4KHg2MxaEf6gwX 4VqRYeMVNhPSr9Cw2c13I/jgO/Bz4EX8riUB0Q2IKUeGGz33UFW/fK/OeUtKDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxYpw5Q13zygH for ; Fri, 10 Jul 2026 14:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 241fe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 14:18:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: f7a0e893cf15 - stable/15 - ice(4): Add support for new E810-XXV-2 adapters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f7a0e893cf15d3701cb545114131135d2ca82256 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 14:18:48 +0000 Message-Id: <6a50ff48.241fe.5815a7fb@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=f7a0e893cf15d3701cb545114131135d2ca82256 commit f7a0e893cf15d3701cb545114131135d2ca82256 Author: Krzysztof Galazka AuthorDate: 2026-06-12 11:37:01 +0000 Commit: Krzysztof Galazka CommitDate: 2026-07-10 14:18:24 +0000 ice(4): Add support for new E810-XXV-2 adapters Add two new subdevice IDs for E810-XXV-2 and E810-XXV-2 for OCP 3.0. Signed-off-by: Krzysztof Galazka Reviewed by: kbowling, erj, mateusz.moga_intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D54069 (cherry picked from commit bea6f7d02dfbef8f8209f0ca5f1d76877d549f46) --- sys/dev/ice/ice_drv_info.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/ice/ice_drv_info.h b/sys/dev/ice/ice_drv_info.h index abb11bdb5fd9..572886b4c7ab 100644 --- a/sys/dev/ice/ice_drv_info.h +++ b/sys/dev/ice/ice_drv_info.h @@ -129,6 +129,12 @@ static const pci_vendor_info_t ice_vendor_info_array[] = { PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, ICE_INTEL_VENDOR_ID, 0x0007, 0, "Intel(R) Ethernet Network Adapter E810-XXV-4"), + PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, + ICE_INTEL_VENDOR_ID, 0x0008, 0, + "Intel(R) Ethernet Network Adapter E810-XXV-2"), + PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, + ICE_INTEL_VENDOR_ID, 0x000B, 0, + "Intel(R) Ethernet Network Adapter E810-XXV-2 for OCP 3.0"), PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, ICE_INTEL_VENDOR_ID, 0x000C, 0, "Intel(R) Ethernet Network Adapter E810-XXV-4 for OCP 3.0"), From nobody Fri Jul 10 14:19:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxYr063cpz6lCpb for ; Fri, 10 Jul 2026 14:19: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxYr03nvzz3s7K for ; Fri, 10 Jul 2026 14:19:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783693184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pko7GNzLFgvsMM90gaIij++CloIgVC/QcWU0iIcKSuw=; b=Ja+wtWCbm72HIK45yjmcz1fXPibXExx+rBG6l1Tp8XHUBphtUinaaDNWqH4lu/mEGfe0BP OY81f9Z1HvcfbC4angBVBfIz7bkXQ+Ijd4j9kmlfek2csvGD+09722sNfayQkD66Okn0Lg Zw0luEX711WOjHgj3OxbbDJtMvdPWNii/i8VQXiAX/JpS8RiJvi7qBL+tsVQPXVDH667Su zfk2uEvmFz/wIk75Kx2lNHMkE6WuBy+4RHgQKvRJPi9J+N2BbwbwOOr+/jdzeqC/Z8rpil YxX1jnBQkARBnWCjHf3cmfEu1CUMnKl47qtPzMegaLVOnwncJW8vnl+iB0LBQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783693184; a=rsa-sha256; cv=none; b=rQ5yZKUxxU0oo9FTCtPWy7rYohaLZ1tRa9vTInmxSxQg+lXtiCzB5hCSW28S0VvtQn8MnQ 9JVV3tsS5J0JWYZu0/JPu0wNlaX9WCLY4O/BS/B3VUN1CYdFRDOSuJwRJQ0Iq6wmpOvyba OpbzEJ+nG6Gc41jccfhpNU+wLlJbI38kzkfdaYsMyjGhhkl84NiV2gnKbo5W6P8DwJVvOU c5UCuSTHseXqNTPEP/KB2tLmIVyeWnuDuF4V9c4Znudl/ZKA9UvQMe7Qei+jrgtkp507Gu FJnofLU/+YfYRrJ7gS6ExvlrVrtIfxTMMF7Q1KT2wmYcnQbI1795WbFlKsTQOQ== 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=1783693184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pko7GNzLFgvsMM90gaIij++CloIgVC/QcWU0iIcKSuw=; b=bjnt9m4z2zj7rxjsN+BT6PQHxQpinYlEyv53ID/gKr+2HdDkm9Eu6endbwZTCc4uVJ3jP5 0jQG0RdsvR53Dhm98aIGTqhR780c8Te7Rtb+45Wm7+ztopyKKiY3FRK58ZCkF2x7DTkvEX G6eIz9KpVxsVftTRNf0UCiNx6mtAC/ShPjefkWItKHIteTkMaWMkOiCrTklRp8gpXuQFC9 A34CkcCwDsrNNvToiPqNOrDQj/MLt+qhoIW1226mIjz+sk9uGqjywgjHBgvp4ZR0wsc4vw 5vRe2W7kLyIq1K8pCoMmhbw8U/ITUzZwSwNE4jLrLFoPRTo4+yaGJm6H4h6OZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxYr02MmNzyXS for ; Fri, 10 Jul 2026 14:19:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24b66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 14:19:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 9e1571c3a127 - stable/15 - ice(4): Fix link speed after changing cable type List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9e1571c3a12758a7bf0defbb52c35b0444b63cb4 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 14:19:44 +0000 Message-Id: <6a50ff80.24b66.6f9d23ea@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=9e1571c3a12758a7bf0defbb52c35b0444b63cb4 commit 9e1571c3a12758a7bf0defbb52c35b0444b63cb4 Author: Krzysztof Galazka AuthorDate: 2026-06-12 11:56:15 +0000 Commit: Krzysztof Galazka CommitDate: 2026-07-10 14:19:23 +0000 ice(4): Fix link speed after changing cable type When interface was connected to a link partner with a cable type limitting maximum supported speed, e.g. SFP+ cable in 25G port, driver incorrectly saved a supported speed as the user configured speed. This prevented interface from using all supported speeds after switching cable to SFP28. Link was established at 10G as supported by previously used SFP+ cable. Don't set user requested speed unless actually configured by an user, to allow automatic selection of highest available speed. Only when user sets custom config using advertise_speed sysctl save it and try to apply after cable is changed. Also don't save initial supported speeds if FW supports reporting default PHY config. Signed-off-by: Krzysztof Galazka Reviewed by: kbowling, erj, mateusz.moga_intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53611 (cherry picked from commit 310145642312e1c5fb3d8efa8321cf905d0354c4) --- sys/dev/ice/ice_lib.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 442111e5ffaf..cfaa54bc0306 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -9680,8 +9680,7 @@ ice_apply_saved_phy_req_to_cfg(struct ice_softc *sc, finalize_link_speed: - /* Cache new user settings for speeds */ - pi->phy.curr_user_speed_req = phy_data.user_speeds_intr; + /* Update phy types in config */ cfg->phy_type_low = htole64(phy_low); cfg->phy_type_high = htole64(phy_high); @@ -9987,16 +9986,21 @@ ice_init_saved_phy_cfg(struct ice_softc *sc) device_t dev = sc->dev; int status; u64 phy_low, phy_high; - u8 report_mode = ICE_AQC_REPORT_TOPO_CAP_MEDIA; + /* + * If the FW supports Link Management V2 we don't need + * to save initial PHY configuration as it can be always + * read from FW. + */ if (ice_is_bit_set(sc->feat_en, ICE_FEATURE_LINK_MGMT_VER_2)) - report_mode = ICE_AQC_REPORT_DFLT_CFG; - status = ice_aq_get_phy_caps(pi, false, report_mode, &pcaps, NULL); + return; + + status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP_MEDIA, + &pcaps, NULL); if (status) { device_printf(dev, - "%s: ice_aq_get_phy_caps (%s) failed; status %s, aq_err %s\n", + "%s: ice_aq_get_phy_caps failed; status %s, aq_err %s\n", __func__, - report_mode == ICE_AQC_REPORT_DFLT_CFG ? "DFLT" : "w/MEDIA", ice_status_str(status), ice_aq_str(hw->adminq.sq_last_status)); return; From nobody Fri Jul 10 14:20:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxYsF5pj3z6lCxP for ; Fri, 10 Jul 2026 14:20: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxYsF5Hvsz3sSJ for ; Fri, 10 Jul 2026 14:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783693249; 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; bh=1skaHHlVn1JykNymVC197fux35gADx8ezT2OVeyMfsY=; b=ymF2kKynv0q98f8VggPYB2bt7jGDp6pZEigDcYNar7ZhcMcElVyieY3mk9cZ0xIfbebFkU Lt89py4gghZvl/XY78mjSImIFzjK5oKz1GrEf4VXaP324RQbORjUzaEDW++93hsKrLDFY+ 63ByjknVBu2Q2mjGUhyUoFyj6cWdD5xOng66B0Vba492FPg3QA4F7+5DhMr5xCdBcg1EoC t3x6sOPNV0vOxoWKOeS3U1hMGGuqNfBK00gBx1aTCm5S+sE3WwYv/cKegQq1ukzuLnhpCg opiFclkF3U6EmORQoJ7rzq4baq23I09lYlBoOrt/TavN6hAp4Vq+8Ql+NH9Spg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783693249; a=rsa-sha256; cv=none; b=SXoWGOJZj6e2tp2EtQm0FSnByZWDPGRUwb40Lszcl2DgL/NS34VO/HZM/NYb8x3LBHEFMh rUppW0iw4H11UIMKZiVMClYxDwgoGL0crHmd2dyx5ANrUUKXMWhhzXhh6d3rTcNR+QdJRs GfdjSqKwREv/kj0XimQm4jnoQH+gOEiIr/fjhTrHmgGgVFFOGAgG7CCiE8SOI7omRxFwuQ OkorrzvHFd/GefoQryhek5uOOMSHrTXG1FDjlJYALgwxtKNUwJ4Wx//IeLY+K20BAGrDMS wn8+wNW0CoO3qWe+DHd2CN3dYmh6RiTfkSd9DjUjJFQZWvRNi/Hww6XpudQedg== 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=1783693249; 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; bh=1skaHHlVn1JykNymVC197fux35gADx8ezT2OVeyMfsY=; b=mkXU6zGYggDJzhe7Ls5pf6u/xVtf+2goA9xx4LJ5IqabGGxH28ka3ecf/TC3JdYKfdEJjb zY5yquQPipKjC/iaU5D1ad7uW2O4lB++uLN6dnJRhKlmUdJwPS3Swkc3PXBHtPAzLRRjhi uqwvK4xKwQIfa+fa795dHJIhqy13HZRivJQmElZhvxauDk/ribkX5xN7vN5Y+mBKcUqg/p z4YKnLsbZdR85es5IXPy0uBrckhFBw+Cmf1v/hauq60tae1vj42anLF+Cj6j/g6e1suhOC htxvuXwbymCljbTct4Cc8pZpD0qHs91jVXNDCHlVWpD487KHvTN+7ouoqKQ/Kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxYsF3cTWzyPN for ; Fri, 10 Jul 2026 14:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 243cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 14:20:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Minsoo Choo From: Ed Maste Subject: git: b9945203c454 - stable/15 - conf: remove trailing whitespace List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: b9945203c454d41d148fcefc191d692c33832aab Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 14:20:49 +0000 Message-Id: <6a50ffc1.243cb.4d8266ee@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b9945203c454d41d148fcefc191d692c33832aab commit b9945203c454d41d148fcefc191d692c33832aab Author: Minsoo Choo AuthorDate: 2026-04-20 03:08:01 +0000 Commit: Ed Maste CommitDate: 2026-07-10 14:20:32 +0000 conf: remove trailing whitespace This prevents unwanted change when saving files on IDEs (e.g. VSCode, Zed) Signed-off-by: Minsoo Choo Sponsored by: The FreeBSD Foundation Pull request: https://github.com/freebsd/freebsd-src/pull/2152 (cherry picked from commit a338f5a0e7b1b5c22595aacbac44582ed5e0fe86) --- sys/conf/files | 2 +- sys/conf/files.powerpc | 10 +++++----- sys/conf/options | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 670ae0c7f469..fd28ad8e093a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1260,7 +1260,7 @@ dev/bhnd/cores/chipc/bhnd_chipc_if.m optional bhnd dev/bhnd/cores/chipc/bhnd_sprom_chipc.c optional bhnd dev/bhnd/cores/chipc/bhnd_pmu_chipc.c optional bhnd dev/bhnd/cores/chipc/chipc.c optional bhnd -dev/bhnd/cores/chipc/chipc_cfi.c optional bhnd cfi +dev/bhnd/cores/chipc/chipc_cfi.c optional bhnd cfi dev/bhnd/cores/chipc/chipc_gpio.c optional bhnd gpio dev/bhnd/cores/chipc/chipc_slicer.c optional bhnd cfi | bhnd spibus dev/bhnd/cores/chipc/chipc_spi.c optional bhnd spibus diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index b1aa54c9aa64..96665e258b91 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -231,7 +231,7 @@ dev/sound/macio/snapper.c optional snd_ai2s iicbus powermac dev/sound/macio/tumbler.c optional snd_ai2s iicbus powermac dev/syscons/scgfbrndr.c optional sc dev/tsec/if_tsec.c optional tsec -dev/tsec/if_tsec_fdt.c optional tsec +dev/tsec/if_tsec_fdt.c optional tsec dev/uart/uart_cpu_powerpc.c optional uart dev/usb/controller/ehci_fsl.c optional ehci mpc85xx dev/vt/hw/ofwfb/ofwfb.c optional vt aim @@ -328,19 +328,19 @@ powerpc/powermac/fcu.c optional powermac fcu powerpc/powermac/grackle.c optional powermac pci powerpc/powermac/hrowpic.c optional powermac pci powerpc/powermac/kiic.c optional powermac kiic -powerpc/powermac/macgpio.c optional powermac pci +powerpc/powermac/macgpio.c optional powermac pci powerpc/powermac/macio.c optional powermac pci powerpc/powermac/nvbl.c optional powermac nvbl powerpc/powermac/platform_powermac.c optional powermac powerpc/powermac/powermac_thermal.c optional powermac powerpc/powermac/pswitch.c optional powermac pswitch -powerpc/powermac/pmu.c optional powermac pmu -powerpc/powermac/smu.c optional powermac smu +powerpc/powermac/pmu.c optional powermac pmu +powerpc/powermac/smu.c optional powermac smu powerpc/powermac/smusat.c optional powermac smu powerpc/powermac/tbgpio.c optional powermac pci smp powerpc/powermac/uninorth.c optional powermac powerpc/powermac/uninorthpci.c optional powermac pci -powerpc/powermac/vcoregpio.c optional powermac +powerpc/powermac/vcoregpio.c optional powermac powerpc/powernv/opal.c optional powernv powerpc/powernv/opal_async.c optional powernv powerpc/powernv/opal_console.c optional powernv diff --git a/sys/conf/options b/sys/conf/options index c09727c8b6af..c881798a6de1 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -39,7 +39,7 @@ AHC_DEBUG_OPTS opt_aic7xxx.h AHC_REG_PRETTY_PRINT opt_aic7xxx.h AHD_DEBUG opt_aic79xx.h AHD_DEBUG_OPTS opt_aic79xx.h -AHD_TMODE_ENABLE opt_aic79xx.h +AHD_TMODE_ENABLE opt_aic79xx.h AHD_REG_PRETTY_PRINT opt_aic79xx.h # Debugging options. @@ -871,7 +871,7 @@ IWN_DEBUG opt_iwn.h # Options for the Intel 3945ABG wireless driver WPI_DEBUG opt_wpi.h -# dcons options +# dcons options DCONS_BUF_SIZE opt_dcons.h DCONS_POLL_HZ opt_dcons.h DCONS_FORCE_CONSOLE opt_dcons.h From nobody Fri Jul 10 14:31:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxZ5y4Hllz6lDtK for ; Fri, 10 Jul 2026 14:31: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxZ5y3kp9z3t7F for ; Fri, 10 Jul 2026 14:31:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783693910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w+sgCzpz3U95ce9YVHRNhfNRnSKRl3n3kkRoplUXWgM=; b=e8fkK9TopJCrVnMPiJmj7VMruUWALB4QUI9KsnG8znnKg50yuUMnFuZj0nqPO9PxA5M8hi 7MBM6nv3qNeF9V4kLj9xCNzSRex7EaR2jtuRTAfa/via8oJD/bJaJa6E9t1XMV5v3LJHMb uCIDRTZof3nOelTyFaW+qb0H6Yalz9XJgM/X3CRTgToqkGDzeMvfEBjsuD/VAdbxhtU5H0 zezCPd1sT+698D51syKaU9mov5iBGW893SB+n7ZX+iIPGwbZ0vd/KYUUNZV3LXxB7tHwKr P1QwWbNwZDtGO3+vlhMdPsvjUw+Ue5tKz/NT3IfhJ0pCBbzxvpvX7Ox4OFhQUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783693910; a=rsa-sha256; cv=none; b=rddXuntkgVL+Kahct5ORz+aXM5QtaiP9ewTz7W9TWOLZc8OdemyCAY3yQoCUiuALqs+DMb QsQit/ouN0t/QS/CItjdDmbD78H2NhUYLOsoHf3PBszJQYb8HpayVB54xABymph1w2mSjf sCUs9TKSAHdY1Gsq9qvjI1CWRX6P240HK+CTMQOF9hNCVqYKjy3whCEb6BcMRSONon/2QR tetmFbPxn7872e8iCpBit2BLgyGKdRMZNEkLruRYY+QXr6tEs8wVCOF300GHSLeD6EG/qR 4vcO9Dqmt/TtWkuETDrfhFK1e1ms9+ep2A759e8lyukadH1CixyjoaWf1jChSg== 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=1783693910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w+sgCzpz3U95ce9YVHRNhfNRnSKRl3n3kkRoplUXWgM=; b=GDpBIT+hnhPUs3A29sP9w1HgePRD7rpmoO+g11Yu+HOf+8Xm3tDg+kAfQar75dbliDDWuG g+2yJX0DKkLiZPzaEP58cY7PzDXNM1leP9Cgqz1A4ab2bo7QxkLOs/i3lUno+aPofesSTf lLUx3mJdxC9Wn0/EGd+I4XKsvLBpO40KVLU7j3ioXZk65uSUJC8DIwtRD4k3FzBnI5X7n0 MeNuuFQ+ko3O9OUFPF2b+Bf3dW0Q69Q+LLcwYl53ZPBjcZ5LBC7OEAFbXIhALKCTpC9M2D aHl3UPMV870j324uF+JOWlaVbWHkU9ts7nmfUk5r1cUQpX7A1jzBB/4kq14qPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxZ5y2dplzy1S for ; Fri, 10 Jul 2026 14:31:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24676 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 14:31:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 76597c000c7c - stable/14 - ix(4): Add EEE support for E610 adapters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 76597c000c7c43462792ac51afa5a8adc8f67d63 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 14:31:50 +0000 Message-Id: <6a510256.24676.b631e70@gitrepo.freebsd.org> The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=76597c000c7c43462792ac51afa5a8adc8f67d63 commit 76597c000c7c43462792ac51afa5a8adc8f67d63 Author: Krzysztof Galazka AuthorDate: 2026-03-13 11:48:12 +0000 Commit: Krzysztof Galazka CommitDate: 2026-07-10 14:29:40 +0000 ix(4): Add EEE support for E610 adapters The ix driver now supports Energy Efficient Ethernet (EEE) on Intel E610 devices. EEE allows the network interface to enter low-power states during periods of low link utilization, reducing power consumption while maintaining full performance when needed. E610 adapters provide EEE support through BASE-T PHY functionality. Due to this PHY-based implementation, EEE is supported only on 2.5Gb speeds and above. Signed-off-by: Yogesh Bhosale Signed-off-by: Krzysztof Galazka Authored-by: Yogesh Bhosale Approved by: kbowling (mentor) Tested by: Mateusz Moga Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D55304 (cherry picked from commit 13ee84c591f8df7553fc8e3dac7e92409046f4d2) --- sys/dev/ixgbe/if_ix.c | 34 ++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_e610.c | 48 ++++++++++++++++++++++++---------- sys/dev/ixgbe/ixgbe_type_e610.h | 57 +++++++++++++++++++++++++++++++---------- 3 files changed, 112 insertions(+), 27 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 1f41eca6ffcd..adc3458cedd6 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1066,6 +1066,10 @@ ixgbe_if_attach_pre(if_ctx_t ctx) /* Ensure SW/FW semaphore is free */ ixgbe_init_swfw_semaphore(hw); + /* Enable EEE power saving */ + if (sc->feat_en & IXGBE_FEATURE_EEE) + hw->mac.ops.setup_eee(hw, true); + /* Set an initial default flow control value */ hw->fc.requested_mode = ixgbe_flow_control; @@ -4591,6 +4595,20 @@ ixgbe_if_update_admin_status(if_ctx_t ctx) "Link is up %s Full Duplex\n", ixgbe_link_speed_to_str(sc->link_speed)); sc->link_active = true; + + /* If link speed is <= 1Gbps and EEE is enabled, + * log info. + */ + if (sc->hw.mac.type == ixgbe_mac_E610 && + (sc->feat_en & IXGBE_FEATURE_EEE) && + sc->link_speed <= IXGBE_LINK_SPEED_1GB_FULL) { + device_printf(sc->dev, + "Energy Efficient Ethernet (EEE) feature " + "is not supported on link speeds equal to " + "or below 1Gbps. EEE is supported on " + "speeds above 1Gbps.\n"); + } + /* Update any Flow Control changes */ ixgbe_fc_enable(&sc->hw); /* Update DMA coalescing config */ @@ -5584,6 +5602,17 @@ ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS) if ((new_eee < 0) || (new_eee > 1)) return (EINVAL); + /* If link speed is <= 1Gbps and EEE is being enabled, log info */ + if (sc->hw.mac.type == ixgbe_mac_E610 && + new_eee && + sc->link_speed <= IXGBE_LINK_SPEED_1GB_FULL) { + device_printf(dev, + "Energy Efficient Ethernet (EEE) feature is not " + "supported on link speeds equal to or below 1Gbps. " + "EEE is supported on speeds above 1Gbps.\n"); + return (EINVAL); + } + retval = ixgbe_setup_eee(&sc->hw, new_eee); if (retval) { device_printf(dev, "Error in EEE setup: 0x%08X\n", retval); @@ -5647,6 +5676,8 @@ ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) static void ixgbe_init_device_features(struct ixgbe_softc *sc) { + s32 error; + sc->feat_cap = IXGBE_FEATURE_NETMAP | IXGBE_FEATURE_RSS | IXGBE_FEATURE_MSI | @@ -5702,6 +5733,9 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) case ixgbe_mac_E610: sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; sc->feat_cap |= IXGBE_FEATURE_DBG_DUMP; + error = ixgbe_get_caps(&sc->hw); + if (error == 0 && sc->hw.func_caps.common_cap.eee_support != 0) + sc->feat_cap |= IXGBE_FEATURE_EEE; break; default: break; diff --git a/sys/dev/ixgbe/ixgbe_e610.c b/sys/dev/ixgbe/ixgbe_e610.c index 18c4612446e0..b76d96814933 100644 --- a/sys/dev/ixgbe/ixgbe_e610.c +++ b/sys/dev/ixgbe/ixgbe_e610.c @@ -776,6 +776,10 @@ ixgbe_parse_common_caps(struct ixgbe_hw *hw, struct ixgbe_hw_common_caps *caps, DEBUGOUT2("%s: next_cluster_id_support = %d\n", prefix, caps->next_cluster_id_support); break; + case IXGBE_ACI_CAPS_EEE: + caps->eee_support = (u8)number; + DEBUGOUT2("%s: eee_support = %x\n", prefix, caps->eee_support); + break; default: /* Not one of the recognized common capabilities */ found = false; @@ -1332,6 +1336,7 @@ void ixgbe_copy_phy_caps_to_cfg(struct ixgbe_aci_cmd_get_phy_caps_data *caps, cfg->link_fec_opt = caps->link_fec_options; cfg->module_compliance_enforcement = caps->module_compliance_enforcement; + cfg->eee_entry_delay = caps->eee_entry_delay; } /** @@ -1351,10 +1356,12 @@ s32 ixgbe_aci_set_phy_cfg(struct ixgbe_hw *hw, struct ixgbe_aci_cmd_set_phy_cfg_data *cfg) { struct ixgbe_aci_desc desc; + bool use_1p40_buff; s32 status; if (!cfg) return IXGBE_ERR_PARAM; + use_1p40_buff = hw->func_caps.common_cap.eee_support != 0; /* Ensure that only valid bits of cfg->caps can be turned on. */ if (cfg->caps & ~IXGBE_ACI_PHY_ENA_VALID_MASK) { @@ -1364,8 +1371,18 @@ s32 ixgbe_aci_set_phy_cfg(struct ixgbe_hw *hw, ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_set_phy_cfg); desc.flags |= IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD); - status = ixgbe_aci_send_cmd(hw, &desc, cfg, sizeof(*cfg)); + if (use_1p40_buff) { + status = ixgbe_aci_send_cmd(hw, &desc, cfg, sizeof(*cfg)); + } else { + struct ixgbe_aci_cmd_set_phy_cfg_data_pre_1_40 cfg_obsolete; + + memcpy(&cfg_obsolete, cfg, sizeof(cfg_obsolete)); + + status = ixgbe_aci_send_cmd(hw, &desc, &cfg_obsolete, + sizeof(cfg_obsolete)); + } + /* even if the old buffer is used no need to worry about conversion */ if (!status) hw->phy.curr_user_phy_cfg = *cfg; @@ -1599,6 +1616,7 @@ s32 ixgbe_aci_get_link_info(struct ixgbe_hw *hw, bool ena_lse, li->topo_media_conflict = link_data.topo_media_conflict; li->pacing = link_data.cfg & (IXGBE_ACI_CFG_PACING_M | IXGBE_ACI_CFG_PACING_TYPE_M); + li->eee_status = link_data.eee_status; /* update fc info */ tx_pause = !!(link_data.an_info & IXGBE_ACI_LINK_PAUSE_TX); @@ -3883,9 +3901,14 @@ s32 ixgbe_init_ops_E610(struct ixgbe_hw *hw) /* PHY */ phy->ops.init = ixgbe_init_phy_ops_E610; phy->ops.identify = ixgbe_identify_phy_E610; - phy->eee_speeds_supported = IXGBE_LINK_SPEED_10_FULL | - IXGBE_LINK_SPEED_100_FULL | - IXGBE_LINK_SPEED_1GB_FULL; + + if (hw->device_id == IXGBE_DEV_ID_E610_2_5G_T) + phy->eee_speeds_supported = IXGBE_LINK_SPEED_2_5GB_FULL; + else + phy->eee_speeds_supported = IXGBE_LINK_SPEED_2_5GB_FULL | + IXGBE_LINK_SPEED_5GB_FULL | + IXGBE_LINK_SPEED_10GB_FULL; + phy->eee_speeds_advertised = phy->eee_speeds_supported; /* Additional ops overrides for e610 to go here */ @@ -4513,19 +4536,18 @@ s32 ixgbe_setup_eee_E610(struct ixgbe_hw *hw, bool enable_eee) phy_cfg.caps |= IXGBE_ACI_PHY_ENA_LINK; phy_cfg.caps |= IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT; + /* setup only speeds which are defined for [0x0601/0x0600].eee_cap */ if (enable_eee) { - if (phy_caps.phy_type_low & IXGBE_PHY_TYPE_LOW_100BASE_TX) + if (hw->phy.eee_speeds_advertised & IXGBE_LINK_SPEED_100_FULL) eee_cap |= IXGBE_ACI_PHY_EEE_EN_100BASE_TX; - if (phy_caps.phy_type_low & IXGBE_PHY_TYPE_LOW_1000BASE_T) + if (hw->phy.eee_speeds_advertised & IXGBE_LINK_SPEED_1GB_FULL) eee_cap |= IXGBE_ACI_PHY_EEE_EN_1000BASE_T; - if (phy_caps.phy_type_low & IXGBE_PHY_TYPE_LOW_1000BASE_KX) - eee_cap |= IXGBE_ACI_PHY_EEE_EN_1000BASE_KX; - if (phy_caps.phy_type_low & IXGBE_PHY_TYPE_LOW_10GBASE_T) + if (hw->phy.eee_speeds_advertised & IXGBE_LINK_SPEED_2_5GB_FULL) + eee_cap |= IXGBE_ACI_PHY_EEE_EN_2_5GBASE_T; + if (hw->phy.eee_speeds_advertised & IXGBE_LINK_SPEED_5GB_FULL) + eee_cap |= IXGBE_ACI_PHY_EEE_EN_5GBASE_T; + if (hw->phy.eee_speeds_advertised & IXGBE_LINK_SPEED_10GB_FULL) eee_cap |= IXGBE_ACI_PHY_EEE_EN_10GBASE_T; - if (phy_caps.phy_type_low & IXGBE_PHY_TYPE_LOW_10GBASE_KR_CR1) - eee_cap |= IXGBE_ACI_PHY_EEE_EN_10GBASE_KR; - if (phy_caps.phy_type_high & IXGBE_PHY_TYPE_HIGH_10BASE_T) - eee_cap |= IXGBE_ACI_PHY_EEE_EN_10BASE_T; } /* Set EEE capability for particular PHY types */ diff --git a/sys/dev/ixgbe/ixgbe_type_e610.h b/sys/dev/ixgbe/ixgbe_type_e610.h index e300030c3ba4..da46e503f660 100644 --- a/sys/dev/ixgbe/ixgbe_type_e610.h +++ b/sys/dev/ixgbe/ixgbe_type_e610.h @@ -721,6 +721,7 @@ struct ixgbe_aci_cmd_list_caps_elem { #define IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG3 0x0084 #define IXGBE_ACI_CAPS_OROM_RECOVERY_UPDATE 0x0090 #define IXGBE_ACI_CAPS_NEXT_CLUSTER_ID 0x0096 +#define IXGBE_ACI_CAPS_EEE 0x009B u8 major_ver; u8 minor_ver; /* Number of resources described by this capability */ @@ -836,10 +837,8 @@ struct ixgbe_aci_cmd_get_phy_caps_data { #define IXGBE_ACI_PHY_EEE_EN_100BASE_TX BIT(0) #define IXGBE_ACI_PHY_EEE_EN_1000BASE_T BIT(1) #define IXGBE_ACI_PHY_EEE_EN_10GBASE_T BIT(2) -#define IXGBE_ACI_PHY_EEE_EN_1000BASE_KX BIT(3) -#define IXGBE_ACI_PHY_EEE_EN_10GBASE_KR BIT(4) -#define IXGBE_ACI_PHY_EEE_EN_25GBASE_KR BIT(5) -#define IXGBE_ACI_PHY_EEE_EN_10BASE_T BIT(11) +#define IXGBE_ACI_PHY_EEE_EN_5GBASE_T BIT(11) +#define IXGBE_ACI_PHY_EEE_EN_2_5GBASE_T BIT(12) __le16 eeer_value; u8 phy_id_oui[4]; /* PHY/Module ID connected on the port */ u8 phy_fw_ver[8]; @@ -869,7 +868,9 @@ struct ixgbe_aci_cmd_get_phy_caps_data { #define IXGBE_ACI_MOD_TYPE_BYTE2_SFP_PLUS 0xA0 #define IXGBE_ACI_MOD_TYPE_BYTE2_QSFP_PLUS 0x86 u8 qualified_module_count; - u8 rsvd2[7]; /* Bytes 47:41 reserved */ + u8 rsvd2; + __le16 eee_entry_delay; + u8 rsvd3[4]; #define IXGBE_ACI_QUAL_MOD_COUNT_MAX 16 struct { u8 v_oui[3]; @@ -893,11 +894,38 @@ struct ixgbe_aci_cmd_set_phy_cfg { IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_set_phy_cfg); +/* Set PHY config obsolete command data structure (; Fri, 10 Jul 2026 14:32:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxZ6x72Wwz3tfy for ; Fri, 10 Jul 2026 14:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783693962; 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; bh=0bfJV+Py9PU75eS6QCjYU+Zy/37qNgfqaBQAZB3R+Zk=; b=k6jY25EGuvHXP+G73ia61pbCqL9OMp9x9+d39stKYwkPUvwOFPFswoX3zzhxZmxwZIH0Mr lxl6+WDoE7DRbc0g76J5iKmp27P9uS1FAeowq6paOpn1cxKiqtyS3OpTPWabYyLOZ3zBKB mUPjYnnr3gj7clVowzDAC3iVVzCdSt/ZTP3KZB41bslIPkpLxaCopnKkK2xAU/he/C7MZL q/tKwb/pPm0NI7b8KRT8Q9ib2HgUHEbzEguc89CK6z/G+FAGCXri+2S/apzXewAO5QOW9q MyDiOHqM1oUvHIEbL763C7Sf4T7NjQ+kltIz4Ujs4AWLwJhEGRrhHnf6aUw3Rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783693962; a=rsa-sha256; cv=none; b=c+RPY0uvRBJ6hbOxzmg44TtJzqoJsgeohaCWfeoR5eg3K/7JcKDgIyUJnMn2o3nLBi+6mG lr0Z41qOwsYrd9gLgZuL+LbafdANyRnZbx02RcjgBbD+Sx+vVOM7Axt+gGP+w8qElpjVvG 2wA9NWX3tEhrmJFiE6Ecpdt6wknJBjODBw5wgzE6VLyHPA+pe9CciAdIt6xc1QMNbcamHY qTWUfbUd0cZlZWFaGf1VBigvAg9IpTBKtD0njCnf94aNo8UnRulhNrd1WEwTyNiO9Nw7uG hdgkBnlu8S571NrNsBtTEXo+AgsYP8tnLsNbpaiwVfb5bU2bA8kLviPF4qkW2g== 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=1783693962; 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; bh=0bfJV+Py9PU75eS6QCjYU+Zy/37qNgfqaBQAZB3R+Zk=; b=w/1QPy1Gt0nWkK6fKMjmL0IN64odkNTKAvMQ+XFSzNmOsQCf3Cgk2EAjtQE08E02CAGt+y xyCI2jVES3okYLFWdGlYL9m26Xe6vXdvl3gRkBWfP3GtU8Qa0NiZFJDB1Q+Z3wMme6nCUk W/QxqFAIjRuDoDr1vnL8nowFHjnVBh2zep/fO6CssoxOYx5Rc8EjOzXnGoyz04jc3ijd12 CKovPI/E4X9TcyUtRVghha418fRHekqnUJGsi2mVv5O8q69NXqqUDtgnt0+EyhtD3X/Q/I DS2nGHpvYr0r38BCWgzpcbldHyDhbL51Q3hGzpmyiPSVl1XwBHCdY5pbxEzG4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxZ6x5zqpzyn4 for ; Fri, 10 Jul 2026 14:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24564 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 14:32:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Bhosale, Yogesh From: Krzysztof Galazka Subject: git: c27a27f45d86 - stable/14 - ix(4): Add support for firmware logging for E610 adapters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c27a27f45d86febae569735ead7f7ebb768a94da Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 14:32:36 +0000 Message-Id: <6a510284.24564.5ab586bb@gitrepo.freebsd.org> The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=c27a27f45d86febae569735ead7f7ebb768a94da commit c27a27f45d86febae569735ead7f7ebb768a94da Author: Bhosale, Yogesh AuthorDate: 2026-04-09 18:05:29 +0000 Commit: Krzysztof Galazka CommitDate: 2026-07-10 14:31:56 +0000 ix(4): Add support for firmware logging for E610 adapters This is part 3 of the support for the new Intel Ethernet E610 family of devices The ix driver now enables firmware logging on Intel E610 devices for debugging with Customer Support. Logs are enabled by default and generated in binary format that requires decoding by support teams. The collected data is firmware and hardware related for debugging purposes only. When the driver loads, it creates a fw_log sysctl node under the debug section. Events are organized into categories (modules) for targeted logging, and users can adjust verbosity levels as needed. This adds sysctl support for the firmware logging feature and updates the ix(4) manual page with documentation. Signed-off-by: Yogesh Bhosale Co-developed-by: Krzysztof Galazka Reviewed by: ziaee, kbowling Tested by: Mateusz Moga Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53973 (cherry picked from commit 6b58d10fc6d51ddcf5ee81628ead74d3dadb9bf6) --- share/man/man4/ix.4 | 34 ++- sys/conf/files | 2 + sys/dev/ixgbe/if_ix.c | 22 +- sys/dev/ixgbe/ixgbe.h | 5 + sys/dev/ixgbe/ixgbe_e610.c | 486 +++++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_e610.h | 13 ++ sys/dev/ixgbe/ixgbe_features.h | 1 + sys/dev/ixgbe/ixgbe_fw_logging.c | 467 +++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_osdep.c | 36 +++ sys/dev/ixgbe/ixgbe_osdep.h | 3 + sys/modules/ix/Makefile | 1 + sys/modules/ixv/Makefile | 1 + 12 files changed, 1066 insertions(+), 5 deletions(-) diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4 index 09af85f5c4a7..39ed49aa8dfc 100644 --- a/share/man/man4/ix.4 +++ b/share/man/man4/ix.4 @@ -138,7 +138,7 @@ The driver supports the following .Xr sysctl 8 variables: -.Bl -tag -width "dev.ix.?.debug.dump.clusters" +.Bl -tag -width "dev.ix.?.debug.fw_log.severity." .It Va dev.ix.?.debug.dump.clusters Specify a bitmask to select firmware event clusters to be included in the debug dump. @@ -160,6 +160,38 @@ Output must be redirected to a file and decoded by Intel Customer Support. .Pp This feature is only supported on E610. +.It Va dev.ix.?.debug.fw_log.severity. +Specify firmware logging verbosity level for the specified module. +Available levels include: +.Pp +.Bl -tag -compact +.It 0 +none +.It 1 +error +.It 2 +warning +.It 3 +normal +.It 4 +verbose +.El +.Pp +Supported modules: general, ctrl, link, link_topo, dnl, i2c, sdp, mdio, +adminq, hdma, lldp, dcbx, dcb, xlr, nvm, auth, vpd, iosf, parser, sw, +scheduler, txq, acl, post, watchdog, task_dispatch, mng, synce, health, +tsdrv, pfreg, mdlver. +.Pp +This feature is only supported on E610 devices. +.It Va dev.ix.?.debug.fw_log.register +Specify 1 to apply per-device firmware logging configuration. +.Pp +This feature is only supported on E610 devices. +.It Va dev.ix.?.debug.fw_log.on_load +Enable firmware logging during driver initialization when set via +.Xr kenv 1 . +.Pp +This feature is only supported on E610 devices. .El .Sh DIAGNOSTICS .Bl -diag diff --git a/sys/conf/files b/sys/conf/files index 0ef8c0d3b062..d3affcf0a24d 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2270,6 +2270,8 @@ dev/ixgbe/ixgbe_api.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_common.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_fw_logging.c optional ix inet | ixv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_mbx.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_vf.c optional ix inet | ixv inet \ diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index adc3458cedd6..05448da71604 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1122,10 +1122,13 @@ ixgbe_if_attach_pre(if_ctx_t ctx) break; } - /* Check the FW API version */ - if (hw->mac.type == ixgbe_mac_E610 && ixgbe_check_fw_api_version(sc)) { - error = EIO; - goto err_pci; + /* Check the FW API version and enable FW logging support for E610 */ + if (hw->mac.type == ixgbe_mac_E610) { + if (ixgbe_check_fw_api_version(sc)) { + error = EIO; + goto err_pci; + } + ixgbe_fwlog_set_support_ena(hw); } /* Most of the iflib initialization... */ @@ -3401,6 +3404,9 @@ ixgbe_add_debug_sysctls(struct ixgbe_softc *sc) if (sc->feat_en & IXGBE_FEATURE_DBG_DUMP) ixgbe_add_debug_dump_sysctls(sc); + + if (sc->feat_en & IXGBE_FEATURE_FW_LOGGING) + ixgbe_add_fw_logging_tunables(sc, sc->debug_sysctls); } /* ixgbe_add_debug_sysctls */ /************************************************************************ @@ -4497,6 +4503,10 @@ ixgbe_handle_fw_event(void *context) sc->task_requests |= IXGBE_REQUEST_TASK_LSC; break; + case ixgbe_aci_opc_fw_logs_event: + ixgbe_fwlog_event_dump(&sc->hw, &event.desc, event.msg_buf); + break; + case ixgbe_aci_opc_temp_tca_event: if (hw->adapter_stopped == FALSE) ixgbe_if_stop(ctx); @@ -5733,6 +5743,7 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) case ixgbe_mac_E610: sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; sc->feat_cap |= IXGBE_FEATURE_DBG_DUMP; + sc->feat_cap |= IXGBE_FEATURE_FW_LOGGING; error = ixgbe_get_caps(&sc->hw); if (error == 0 && sc->hw.func_caps.common_cap.eee_support != 0) sc->feat_cap |= IXGBE_FEATURE_EEE; @@ -5760,6 +5771,9 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) /* FW Debug Dump */ if (sc->feat_cap & IXGBE_FEATURE_DBG_DUMP) sc->feat_en |= IXGBE_FEATURE_DBG_DUMP; + /* FW Logging */ + if (sc->feat_cap & IXGBE_FEATURE_FW_LOGGING) + sc->feat_en |= IXGBE_FEATURE_FW_LOGGING; /* Enabled via global sysctl... */ /* Flow Director */ diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 624b71acabea..9120ca5a37ff 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -607,6 +607,11 @@ int ixgbe_setup_receive_structures(struct ixgbe_softc *); void ixgbe_free_receive_structures(struct ixgbe_softc *); int ixgbe_get_regs(SYSCTL_HANDLER_ARGS); +void ixgbe_add_fw_logging_tunables(struct ixgbe_softc *sc, + struct sysctl_oid *parent); + +#define IXGBE_STR_BUF_LEN 32 + #include "ixgbe_bypass.h" #include "ixgbe_fdir.h" #include "ixgbe_rss.h" diff --git a/sys/dev/ixgbe/ixgbe_e610.c b/sys/dev/ixgbe/ixgbe_e610.c index b76d96814933..21066f95a16e 100644 --- a/sys/dev/ixgbe/ixgbe_e610.c +++ b/sys/dev/ixgbe/ixgbe_e610.c @@ -3829,6 +3829,492 @@ s32 ixgbe_handle_nvm_access(struct ixgbe_hw *hw, } } +/** + * ixgbe_fwlog_cache_cfg - Cache FW logging config + * @hw: pointer to the HW structure + * @cfg: config to cache + * + * Cache FW logging config. + */ +static void ixgbe_fwlog_cache_cfg(struct ixgbe_hw *hw, + struct ixgbe_fwlog_cfg *cfg) +{ + hw->fwlog_cfg = *cfg; +} + +/** + * ixgbe_fwlog_valid_module_entries - validate all the module entry IDs and + * log levels + * @hw: pointer to the HW structure + * @entries: entries to validate + * @num_entries: number of entries to validate + * + * Checks if all the module entry IDs and log levels are valid. + * + * Return: true if all the module entry IDs and log levels are valid, + * otherwise false. + */ +static bool ixgbe_fwlog_valid_module_entries(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries) +{ + u16 i; + + UNREFERENCED_1PARAMETER(hw); + + if (!entries) { + return false; + } + + if (!num_entries) { + return false; + } + + for (i = 0; i < num_entries; i++) { + struct ixgbe_fwlog_module_entry *entry = &entries[i]; + + if (entry->module_id >= IXGBE_ACI_FW_LOG_ID_MAX) { + return false; + } + + if (entry->log_level >= IXGBE_FWLOG_LEVEL_INVALID) { + return false; + } + } + + return true; +} + +/** + * ixgbe_fwlog_valid_cfg - validate configuration + * @hw: pointer to the HW structure + * @cfg: config to validate + * + * Validate the entire configuration. + * + * Return: true if the entire configuration is valid, otherwise false. + */ +static bool ixgbe_fwlog_valid_cfg(struct ixgbe_hw *hw, + struct ixgbe_fwlog_cfg *cfg) +{ + if (!cfg) { + return false; + } + + if (cfg->log_resolution < IXGBE_ACI_FW_LOG_MIN_RESOLUTION || + cfg->log_resolution > IXGBE_ACI_FW_LOG_MAX_RESOLUTION) { + return false; + } + + if (!ixgbe_fwlog_valid_module_entries(hw, cfg->module_entries, + IXGBE_ACI_FW_LOG_ID_MAX)) + return false; + + return true; +} + +/** + * ixgbe_fwlog_init - Initialize cached structures for tracking FW logging + * @hw: pointer to the HW structure + * @cfg: config used to initialize the cached structures + * + * Initialize cached structures for tracking FW logging + * Called on driver initialization and before calling + * ixgbe_init_hw(). Firmware logging will be configured based on these settings + * and also the PF will be registered on init. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_init(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + if (!ixgbe_fwlog_valid_cfg(hw, cfg)) + return IXGBE_ERR_PARAM; + + ixgbe_fwlog_cache_cfg(hw, cfg); + + return IXGBE_SUCCESS; +} + +/** + * ixgbe_aci_fwlog_set - Set FW logging configuration + * @hw: pointer to the HW structure + * @entries: entries to configure + * @num_entries: number of @entries + * @options: options from ixgbe_fwlog_cfg->options structure + * @log_resolution: logging resolution + * + * Set FW logging configuration using ACI command (0xFF30). + * + * Return: the exit code of the operation. + */ +static s32 ixgbe_aci_fwlog_set(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries, u16 options, u16 log_resolution) +{ + struct ixgbe_aci_cmd_fw_log_cfg_resp fw_modules[IXGBE_ACI_FW_LOG_ID_MAX]; + struct ixgbe_aci_cmd_fw_log *cmd; + struct ixgbe_aci_desc desc; + s32 status; + u16 i; + + if (num_entries > IXGBE_ACI_FW_LOG_ID_MAX) + return IXGBE_ERR_PARAM; + + for (i = 0; i < num_entries; i++) { + fw_modules[i].module_identifier = + IXGBE_CPU_TO_LE16(entries[i].module_id); + fw_modules[i].log_level = entries[i].log_level; + } + + ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_fw_logs_config); + desc.flags |= IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD); + + cmd = &desc.params.fw_log; + + cmd->cmd_flags = IXGBE_ACI_FW_LOG_CONF_SET_VALID; + cmd->ops.cfg.log_resolution = IXGBE_CPU_TO_LE16(log_resolution); + cmd->ops.cfg.mdl_cnt = IXGBE_CPU_TO_LE16(num_entries); + + if (options & IXGBE_FWLOG_OPTION_ARQ_ENA) + cmd->cmd_flags |= IXGBE_ACI_FW_LOG_CONF_AQ_EN; + if (options & IXGBE_FWLOG_OPTION_UART_ENA) + cmd->cmd_flags |= IXGBE_ACI_FW_LOG_CONF_UART_EN; + + status = ixgbe_aci_send_cmd(hw, &desc, fw_modules, + sizeof(*fw_modules) * num_entries); + + return status; +} + +/** + * ixgbe_fwlog_supported - Cached for whether FW supports FW logging or not + * @hw: pointer to the HW structure + * + * This will always return false if called before ixgbe_init_hw(), so it must be + * called after ixgbe_init_hw(). + * + * Return: true if FW supports FW logging. + * If this function is called before ixgbe_init_hw(), return false. + */ +bool ixgbe_fwlog_supported(struct ixgbe_hw *hw) +{ + return hw->fwlog_support_ena; +} + +/** + * ixgbe_fwlog_set - Set the firmware logging settings + * @hw: pointer to the HW structure + * @cfg: config used to set firmware logging + * + * Call this function whenever the driver needs to set the firmware + * logging configuration. It can be called on initialization, reset, or during + * runtime. + * + * If the PF wishes to receive FW logging then it must register via + * ixgbe_fwlog_register. Note, that ixgbe_fwlog_register does not need to + * be called for init. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_set(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + if (!ixgbe_fwlog_valid_cfg(hw, cfg)) + return IXGBE_ERR_PARAM; + + status = ixgbe_aci_fwlog_set(hw, cfg->module_entries, + IXGBE_ACI_FW_LOG_ID_MAX, cfg->options, + cfg->log_resolution); + if (!status) + ixgbe_fwlog_cache_cfg(hw, cfg); + + return status; +} + +/** + * ixgbe_fwlog_update_cached_entries - Update module entries in cached + * FW logging config + * @hw: pointer to the HW structure + * @entries: entries to cache + * @num_entries: number of @entries + * + * Update module entries in cached FW logging config. + */ +static void ixgbe_fwlog_update_cached_entries(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries) +{ + u16 i; + + for (i = 0; i < num_entries; i++) { + struct ixgbe_fwlog_module_entry *updated = &entries[i]; + u16 j; + + for (j = 0; j < IXGBE_ACI_FW_LOG_ID_MAX; j++) { + struct ixgbe_fwlog_module_entry *cached = + &hw->fwlog_cfg.module_entries[j]; + + if (cached->module_id == updated->module_id) { + cached->log_level = updated->log_level; + break; + } + } + } +} + +/** + * ixgbe_fwlog_update_modules - Update the log level 1 or more + * FW logging modules + * @hw: pointer to the HW structure + * @entries: array of ixgbe_fwlog_module_entry(s) + * @num_entries: number of entries + * + * Update the log level of 1 or more FW logging modules via module ID. + * + * Only the entries passed in will be affected. All other firmware logging + * settings will be unaffected. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_update_modules(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries) +{ + struct ixgbe_fwlog_cfg cfg; + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + if (num_entries > IXGBE_ACI_FW_LOG_ID_MAX) + return IXGBE_ERR_PARAM; + + if (!ixgbe_fwlog_valid_module_entries(hw, entries, num_entries)) + return IXGBE_ERR_PARAM; + + status = ixgbe_fwlog_get(hw, &cfg); + if (status) + goto status_out; + + status = ixgbe_aci_fwlog_set(hw, entries, num_entries, cfg.options, + cfg.log_resolution); + if (!status) + ixgbe_fwlog_update_cached_entries(hw, entries, num_entries); + +status_out: + return status; +} + +/** + * ixgbe_aci_fwlog_register - Register PF for firmware logging events. + * @hw: pointer to the HW structure + * @reg: true to register and false to unregister + * + * Register a PF for firmware logging events using ACI command (0xFF31). + * + * Return: the exit code of the operation. + */ +static s32 ixgbe_aci_fwlog_register(struct ixgbe_hw *hw, bool reg) +{ + struct ixgbe_aci_desc desc; + + ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_fw_logs_register); + + if (reg) + desc.params.fw_log.cmd_flags = IXGBE_ACI_FW_LOG_AQ_REGISTER; + + return ixgbe_aci_send_cmd(hw, &desc, NULL, 0); +} + +/** + * ixgbe_fwlog_register - Register the PF for firmware logging + * @hw: pointer to the HW structure + * + * After this call the PF will start to receive firmware logging based on the + * configuration set in ixgbe_fwlog_set. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_register(struct ixgbe_hw *hw) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + status = ixgbe_aci_fwlog_register(hw, true); + + if (!status) + hw->fwlog_cfg.options |= IXGBE_FWLOG_OPTION_IS_REGISTERED; + + return status; +} + +/** + * ixgbe_fwlog_unregister - Unregister the PF from firmware logging + * @hw: pointer to the HW structure + * + * Make an attempt to unregister the PF from firmware logging. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_unregister(struct ixgbe_hw *hw) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + status = ixgbe_aci_fwlog_register(hw, false); + if (!status) + hw->fwlog_cfg.options &= ~IXGBE_FWLOG_OPTION_IS_REGISTERED; + + return status; +} + +/** + * ixgbe_aci_fwlog_get - Get the current firmware logging configuration + * @hw: pointer to the HW structure + * @cfg: firmware logging configuration to populate + * + * Make an attempt to get the current firmware logging + * configuration using ACI command (0xFF32). + * + * Return: the exit code of the operation. + */ +static s32 ixgbe_aci_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + struct ixgbe_aci_cmd_fw_log_cfg_resp *fw_modules; + struct ixgbe_aci_cmd_fw_log *cmd; + struct ixgbe_aci_desc desc; + u16 i, module_id_cnt; + u8 *buf = NULL; + s32 status; + + memset(cfg, 0, sizeof(*cfg)); + + ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_fw_logs_query); + cmd = &desc.params.fw_log; + + cmd->cmd_flags = IXGBE_ACI_FW_LOG_AQ_QUERY; + + buf = (u8 *)ixgbe_malloc(hw, IXGBE_ACI_MAX_BUFFER_SIZE); + if (!buf) + return IXGBE_ERR_OUT_OF_MEM; + + status = ixgbe_aci_send_cmd(hw, &desc, buf, IXGBE_ACI_MAX_BUFFER_SIZE); + if (status) { + goto status_out; + } + + module_id_cnt = IXGBE_LE16_TO_CPU(cmd->ops.cfg.mdl_cnt); + if (module_id_cnt > IXGBE_ACI_FW_LOG_ID_MAX) { + module_id_cnt = IXGBE_ACI_FW_LOG_ID_MAX; + } + + cfg->log_resolution = (u8)IXGBE_LE16_TO_CPU(cmd->ops.cfg.log_resolution); + if (cmd->cmd_flags & IXGBE_ACI_FW_LOG_CONF_AQ_EN) + cfg->options |= IXGBE_FWLOG_OPTION_ARQ_ENA; + if (cmd->cmd_flags & IXGBE_ACI_FW_LOG_CONF_UART_EN) + cfg->options |= IXGBE_FWLOG_OPTION_UART_ENA; + if (cmd->cmd_flags & IXGBE_ACI_FW_LOG_QUERY_REGISTERED) + cfg->options |= IXGBE_FWLOG_OPTION_IS_REGISTERED; + + fw_modules = (struct ixgbe_aci_cmd_fw_log_cfg_resp *)buf; + + for (i = 0; i < module_id_cnt; i++) { + struct ixgbe_aci_cmd_fw_log_cfg_resp *fw_module = &fw_modules[i]; + + cfg->module_entries[i].module_id = + IXGBE_LE16_TO_CPU(fw_module->module_identifier); + cfg->module_entries[i].log_level = fw_module->log_level; + } + +status_out: + if (buf) + ixgbe_free(hw, buf); + return status; +} + +/** + * ixgbe_fwlog_set_support_ena - Set if FW logging is supported by FW + * @hw: pointer to the HW struct + * + * If FW returns success to the ixgbe_aci_fwlog_get call then it supports FW + * logging, else it doesn't. Set the fwlog_support_ena flag accordingly. + * + * This function is only meant to be called during driver init to determine if + * the FW support FW logging. + * + * Return: the exit code of the operation. + */ +void ixgbe_fwlog_set_support_ena(struct ixgbe_hw *hw) +{ + struct ixgbe_fwlog_cfg cfg; + s32 status; + + hw->fwlog_support_ena = false; + + /* don't call ixgbe_fwlog_get() because that would overwrite the cached + * configuration from the call to ixgbe_fwlog_init(), which is expected + * to be called prior to this function + */ + status = ixgbe_aci_fwlog_get(hw, &cfg); + if (!status) + hw->fwlog_support_ena = true; +} + +/** + * ixgbe_fwlog_get - Get the firmware logging settings + * @hw: pointer to the HW structure + * @cfg: config to populate based on current firmware logging settings + * + * Get the current firmware logging settings. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + if (!cfg) + return IXGBE_ERR_PARAM; + + status = ixgbe_aci_fwlog_get(hw, cfg); + if (status) + return status; + + ixgbe_fwlog_cache_cfg(hw, cfg); + + return IXGBE_SUCCESS; +} + +/** + * ixgbe_fwlog_event_dump - Dump the event received over the Admin Receive Queue + * @hw: pointer to the HW structure + * @desc: Admin Receive Queue descriptor + * @buf: buffer that contains the FW log event data + * + * If the driver receives the ixgbe_aci_opc_fw_logs_event on the Admin Receive + * Queue, then it should call this function to dump the FW log data. + */ +void ixgbe_fwlog_event_dump(struct ixgbe_hw *hw, + struct ixgbe_aci_desc *desc, void *buf) +{ + if (!ixgbe_fwlog_supported(hw)) + return; + + ixgbe_info_fwlog(hw, 32, 1, (u8 *)buf, + IXGBE_LE16_TO_CPU(desc->datalen)); +} + /** * ixgbe_aci_set_health_status_config - Configure FW health events * @hw: pointer to the HW struct diff --git a/sys/dev/ixgbe/ixgbe_e610.h b/sys/dev/ixgbe/ixgbe_e610.h index 94e600139499..7af5506d85e8 100644 --- a/sys/dev/ixgbe/ixgbe_e610.h +++ b/sys/dev/ixgbe/ixgbe_e610.h @@ -169,6 +169,19 @@ s32 ixgbe_handle_nvm_access(struct ixgbe_hw *hw, s32 ixgbe_aci_set_health_status_config(struct ixgbe_hw *hw, u8 event_source); +s32 ixgbe_fwlog_init(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg); +bool ixgbe_fwlog_supported(struct ixgbe_hw *hw); +s32 ixgbe_fwlog_set(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg); +s32 ixgbe_fwlog_update_modules(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries); +s32 ixgbe_fwlog_register(struct ixgbe_hw *hw); +s32 ixgbe_fwlog_unregister(struct ixgbe_hw *hw); +void ixgbe_fwlog_set_support_ena(struct ixgbe_hw *hw); +s32 ixgbe_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg); +void ixgbe_fwlog_event_dump(struct ixgbe_hw *hw, + struct ixgbe_aci_desc *desc, void *buf); + /* E610 operations */ s32 ixgbe_init_ops_E610(struct ixgbe_hw *hw); s32 ixgbe_reset_hw_E610(struct ixgbe_hw *hw); diff --git a/sys/dev/ixgbe/ixgbe_features.h b/sys/dev/ixgbe/ixgbe_features.h index bee9040319d8..bbc7507b29ac 100644 --- a/sys/dev/ixgbe/ixgbe_features.h +++ b/sys/dev/ixgbe/ixgbe_features.h @@ -58,6 +58,7 @@ #define IXGBE_FEATURE_NEEDS_CTXD (u32)(1 << 13) #define IXGBE_FEATURE_RECOVERY_MODE (u32)(1 << 15) #define IXGBE_FEATURE_DBG_DUMP (u32)(1 << 16) +#define IXGBE_FEATURE_FW_LOGGING (u32)(1 << 17) /* Check for OS support. Undefine features if not included in the OS */ #ifndef PCI_IOV diff --git a/sys/dev/ixgbe/ixgbe_fw_logging.c b/sys/dev/ixgbe/ixgbe_fw_logging.c new file mode 100644 index 000000000000..6202d504423f --- /dev/null +++ b/sys/dev/ixgbe/ixgbe_fw_logging.c @@ -0,0 +1,467 @@ +/** + * @file ixgbe_fw_logging.c + * @brief firmware logging sysctls + * + * Contains sysctls to enable and configure firmware logging debug support. + */ + + #include "ixgbe.h" + + /** + * ixgbe_reconfig_fw_log - Re-program firmware logging configuration + * @sc: private softc structure + * @cfg: firmware log configuration to latch + * + * If the adminq is currently active, ask firmware to update the logging + * configuration. If the adminq is currently down, then do nothing. In this + * case, ixgbe_init_hw() will re-configure firmware logging as soon as it brings + * up the adminq. + */ + static int + ixgbe_reconfig_fw_log(struct ixgbe_softc *sc, struct ixgbe_fwlog_cfg *cfg) + { + int status; + + ixgbe_fwlog_init(&sc->hw, cfg); + + if (!ixgbe_fwlog_supported(&sc->hw)) + return (0); + + status = ixgbe_fwlog_set(&sc->hw, cfg); + if (status != IXGBE_SUCCESS) { + DEBUGOUT1("Failed to reconfigure firmware logging, status %d\n", + status); + return (ENODEV); + } + + return (0); + } + + /** + * ixgbe_sysctl_fwlog_set_cfg_options - Sysctl for setting fwlog cfg options + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: option to adjust + * @req: sysctl request pointer + * + * On read: displays whether firmware logging was reported during attachment + * On write: enables/disables firmware logging during attach phase + * + * This has no effect on the legacy (V1) version of firmware logging. + */ + static int + ixgbe_sysctl_fwlog_set_cfg_options(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + int error; + u16 option = (u16)arg2; + bool enabled; + + enabled = !!(cfg->options & option); + + error = sysctl_handle_bool(oidp, &enabled, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (enabled) + cfg->options |= option; + else + cfg->options &= ~option; + + return ixgbe_reconfig_fw_log(sc, cfg); + } + + /** + * ixgbe_sysctl_fwlog_log_resolution - Sysctl for setting log message resolution + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: __unused__ + * @req: sysctl request pointer + * + * On read: displays message queue limit before posting + * On write: sets message queue limit before posting + * + * This has no effect on the legacy (V1) version of firmware logging. + */ + static int + ixgbe_sysctl_fwlog_log_resolution(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + int error; + u8 resolution; + + UNREFERENCED_PARAMETER(arg2); + + resolution = cfg->log_resolution; + + error = sysctl_handle_8(oidp, &resolution, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + if ((resolution < IXGBE_ACI_FW_LOG_MIN_RESOLUTION) || + (resolution > IXGBE_ACI_FW_LOG_MAX_RESOLUTION)) { + DEBUGOUT("Log resolution out-of-bounds\n"); + return (EINVAL); + } + + cfg->log_resolution = resolution; + + return ixgbe_reconfig_fw_log(sc, cfg); + } + + /** + * ixgbe_sysctl_fwlog_register - Sysctl for (de)registering firmware logs + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: __unused__ + * @req: sysctl request pointer + * + * On read: displays whether firmware logging is registered + * On write: (de)registers firmware logging. + */ + static int + ixgbe_sysctl_fwlog_register(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + int status; + int error; + u8 enabled; + + UNREFERENCED_PARAMETER(arg2); + + if (cfg->options & IXGBE_FWLOG_OPTION_IS_REGISTERED) + enabled = true; + else + enabled = false; + + error = sysctl_handle_bool(oidp, &enabled, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (enabled) { + status = ixgbe_fwlog_register(&sc->hw); + if (status == IXGBE_SUCCESS) + sc->feat_en |= IXGBE_FEATURE_FW_LOGGING; + } else { + status = ixgbe_fwlog_unregister(&sc->hw); + if (status == IXGBE_SUCCESS) + sc->feat_en &= ~IXGBE_FEATURE_FW_LOGGING; + } + + if (status != IXGBE_SUCCESS) + return (EIO); + + return (0); + } + + /** + * ixgbe_log_sev_str - Convert log level to a string + * @log_level: the log level to convert + * + * Convert the u8 log level of a FW logging module into a readable + * string for outputting in a sysctl. + */ + struct ixgbe_str_buf { + char str[IXGBE_STR_BUF_LEN]; + }; + + static struct ixgbe_str_buf + _ixgbe_log_sev_str(u8 log_level) + { + struct ixgbe_str_buf buf = { .str = "" }; + const char *str = NULL; + + switch (log_level) { + case IXGBE_FWLOG_LEVEL_NONE: + str = "none"; + break; + case IXGBE_FWLOG_LEVEL_ERROR: + str = "error"; + break; + case IXGBE_FWLOG_LEVEL_WARNING: + str = "warning"; + break; + case IXGBE_FWLOG_LEVEL_NORMAL: + str = "normal"; + break; + case IXGBE_FWLOG_LEVEL_VERBOSE: + str = "verbose"; + break; + default: + break; + } + + if (str) + snprintf(buf.str, IXGBE_STR_BUF_LEN, "%s", str); + else + snprintf(buf.str, IXGBE_STR_BUF_LEN, "%u", log_level); + + return buf; + } + + #define ixgbe_log_sev_str(log_level) _ixgbe_log_sev_str(log_level).str + + /** + * ixgbe_sysctl_fwlog_module_log_severity - Add tunables for a FW logging module + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: index to logging module + * @req: sysctl request pointer + */ + static int + ixgbe_sysctl_fwlog_module_log_severity(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + struct sbuf *sbuf; + char *sev_str_end; + enum ixgbe_aci_fw_logging_mod module = (enum ixgbe_aci_fw_logging_mod)arg2; + int error, ll_num; + u8 log_level; + char sev_str[16]; + bool sev_set = false; + + log_level = cfg->module_entries[module].log_level; + sbuf = sbuf_new(NULL, sev_str, sizeof(sev_str), SBUF_FIXEDLEN); + sbuf_printf(sbuf, "%d<%s>", log_level, ixgbe_log_sev_str(log_level)); + sbuf_finish(sbuf); + sbuf_delete(sbuf); + + error = sysctl_handle_string(oidp, sev_str, sizeof(sev_str), req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_VERBOSE), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_VERBOSE; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_NORMAL), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_NORMAL; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_WARNING), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_WARNING; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_ERROR), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_ERROR; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_NONE), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_NONE; + sev_set = true; + } + *** 295 LINES SKIPPED *** From nobody Fri Jul 10 15:28:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMF59Kqz6lJ63 for ; Fri, 10 Jul 2026 15:28:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbMF4kb2z443x for ; Fri, 10 Jul 2026 15:28:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783697305; 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; bh=Ki2AnjNWEwUf/ObqgVb47VQLnXM5h4SySm8saD2wJfE=; b=C4srRnupun0XjGMkrTVyM3GDbzXpnukZNb1ff4nvb3BZ50oTETba6rjdRTazh/Evmqf8Ye 5Jerr+zRmU+uCRDyrCb9zX4y9uyncN8hdwedllCDx3NzqiZwmcibT62hkfKBA3OrT5ap/K CljI49cwN3jLDDpiwfvEmlhDPzfdI1Sy2GppPozzENhnRhcZjHe0/IYaNokxmwiZf2fSqa DUS3PUXeLXQdMQ6jwgHG6x//qWlBcEjeCPO2ZuXG7cQDmdWPLkH5Ncio8MIKYMuyWcxJaa c1uNQFymP6TcRNkovcZQp1o5Qgf4rx6XFiX8tNPaE3SRifachhzdPvCioQBu/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783697305; a=rsa-sha256; cv=none; b=bbP0pytIAaoYoFXp0AntM/9UzFO8sqt2iE8ew1TFe3tPSrDz1Cz4+4SE4EAIqTJfFmXJqj /RKUJh7rhHqQzc2nTrXrvwrta4hWnmHz7b81KqPu/fzYrBlgBq8fsgXJinuCsm3ZyruVcS 7CdLv8CMZmU0m8xE+YvIrWhntmwuRxIMp7UNAMZ48GoIR31VyhXCAJt9E+asHcAXjfBu76 j+BXamH00OoXg2IC8vyQ3/SeXQz94LJnpkrNrACEy2hO8pwYpc+Qi2GkcyxvNiAbJoEpvz QXp9Gao02mNhmJcWtB6b4ywU09/x03KJj2mGA4UAucEQ19egfVPJnEwxvtJsBg== 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=1783697305; 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; bh=Ki2AnjNWEwUf/ObqgVb47VQLnXM5h4SySm8saD2wJfE=; b=DhATV2+O+dJ7vLHeGVzJQfQ2d5oRW1wsWFYG/+jkt1ks4aexlLn9/bBVnlhDeyI0kQ0IVA 9yPZZ50V9jmVk/AWWPAfRF8103a8ULTJ7FuUf1XCGTGdBN+80Ahh9QYoR2hXI8G0rrwNK1 IxxbsJTg0wIe2U/c5rNadPmB+mKzAW8AT6LOpoYQy1CzWs069xeO9JkrXOmnEE77IL4E8Y X4brI4W7x3ZaeS0YmlT5qMvf0zLnULRSyl8tNfSgkYH8lI9M959VzEkXU2dP2ltNIGLAyW 2ny5zuHMW7FIWgT9nzTSBdICG0SHPMDP/fjrvoleRVMo062fdJSjMa7/pOGRVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMF3Vd0z11FB for ; Fri, 10 Jul 2026 15:28:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:28:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ali Mashtizadeh From: Mitchell Horne Subject: git: 57b8e38a231d - stable/15 - hwpmc: Fix PMC flags for AMD Zen cores List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 57b8e38a231d8e98ee1b9d717d32e0ba59660435 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:28:25 +0000 Message-Id: <6a510f99.30a66.543268ca@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=57b8e38a231d8e98ee1b9d717d32e0ba59660435 commit 57b8e38a231d8e98ee1b9d717d32e0ba59660435 Author: Ali Mashtizadeh AuthorDate: 2026-02-21 19:07:26 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:28:08 +0000 hwpmc: Fix PMC flags for AMD Zen cores The PMC flags available for DF and L3 counters were not all implemented. More importantly, the field encodings for the L3 counters changed in an incompatible way between Family 17h and Family 19h. Similarly, the field encodings for the DF coutners changed between Family 19h and 1Ah. I also added the precise retire flag for the 3rd core counter. Lastly, I added a warning in the jevent parser because ignoring the unknown fields results in counters incorrectly programmed. We should not just ignore that. Sponsored by: Netflix Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2040 (cherry picked from commit 00c0a1f0bf6c07e63384a389060dfc10924c0ed6) --- lib/libpmc/libpmc_pmu_util.c | 71 ++++++++++++++++++++++++++++--- lib/libpmc/pmu-events/jevents.c | 40 +++++++++++++++++- lib/libpmc/pmu-events/json.c | 14 +++++++ lib/libpmc/pmu-events/json.h | 1 + sys/dev/hwpmc/hwpmc_amd.c | 19 ++++++++- sys/dev/hwpmc/hwpmc_amd.h | 93 +++++++++++++++++++++++++++++------------ 6 files changed, 204 insertions(+), 34 deletions(-) diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index de642aa71a18..0832ab32e2f1 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -121,6 +121,24 @@ pmu_events_mfr(void) return (mfr); } +static int +pmu_events_x86_family(void) +{ + char buf[PMC_CPUID_LEN]; + size_t s = sizeof(buf); + char *cpuid, *family; + + if (sysctlbyname("kern.hwpmc.cpuid", buf, &s, + (void *)NULL, 0) == -1) + return (-1); + cpuid = &buf[0]; + + strsep(&cpuid, "-"); + family = strsep(&cpuid, "-"); + + return (strtol(family, NULL, 10)); +} + /* * The Intel fixed mode counters are: * "inst_retired.any", @@ -208,6 +226,10 @@ struct pmu_event_desc { uint64_t ped_offcore_rsp; uint64_t ped_l3_thread; uint64_t ped_l3_slice; + uint32_t ped_sourceid; + uint32_t ped_coreid; + uint32_t ped_allsources; + uint32_t ped_allcores; uint32_t ped_event; uint32_t ped_frontend; uint32_t ped_ldlat; @@ -347,6 +369,14 @@ pmu_parse_event(struct pmu_event_desc *ped, const char *eventin) ped->ped_l3_thread = strtol(value, NULL, 16); else if (strcmp(key, "l3_slice_mask") == 0) ped->ped_l3_slice = strtol(value, NULL, 16); + else if (strcmp(key, "sourceid") == 0) + ped->ped_sourceid = strtol(value, NULL, 16); + else if (strcmp(key, "coreid") == 0) + ped->ped_coreid = strtol(value, NULL, 16); + else if (strcmp(key, "allcores") == 0) + ped->ped_allcores = strtol(value, NULL, 10); + else if (strcmp(key, "allsources") == 0) + ped->ped_allsources = strtol(value, NULL, 10); else { debug = getenv("PMUDEBUG"); if (debug != NULL && strcmp(debug, "true") == 0 && value != NULL) @@ -486,20 +516,23 @@ static int pmc_pmu_amd_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm, struct pmu_event_desc *ped) { + int cpu_family; struct pmc_md_amd_op_pmcallocate *amd; const struct pmu_event *pe; int idx = -1; + cpu_family = pmu_events_x86_family(); + amd = &pm->pm_md.pm_amd; if (ped->ped_umask > 0) { pm->pm_caps |= PMC_CAP_QUALIFIER; - amd->pm_amd_config |= AMD_PMC_TO_UNITMASK(ped->ped_umask); } pm->pm_class = PMC_CLASS_K8; pe = pmu_event_get(NULL, event_name, &idx); if (pe->pmu == NULL) { amd->pm_amd_config |= AMD_PMC_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_config |= AMD_PMC_TO_UNITMASK(ped->ped_umask); amd->pm_amd_sub_class = PMC_AMD_SUB_CLASS_CORE; if ((pm->pm_caps & (PMC_CAP_USER|PMC_CAP_SYSTEM)) == 0 || (pm->pm_caps & (PMC_CAP_USER|PMC_CAP_SYSTEM)) == @@ -515,14 +548,42 @@ pmc_pmu_amd_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm, amd->pm_amd_config |= AMD_PMC_INVERT; if (pm->pm_caps & PMC_CAP_INTERRUPT) amd->pm_amd_config |= AMD_PMC_INT; + if (pm->pm_caps & PMC_CAP_PRECISE) + amd->pm_amd_config |= AMD_PMC_PRECISERETIRE; } else if (strcmp("amd_l3", pe->pmu) == 0) { - amd->pm_amd_config |= AMD_PMC_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_config |= AMD_PMC_L3_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_config |= AMD_PMC_L3_TO_UNITMASK(ped->ped_umask); amd->pm_amd_sub_class = PMC_AMD_SUB_CLASS_L3_CACHE; - amd->pm_amd_config |= AMD_PMC_TO_L3SLICE(ped->ped_l3_slice); - amd->pm_amd_config |= AMD_PMC_TO_L3CORE(ped->ped_l3_thread); + if (cpu_family <= 0x17) { + amd->pm_amd_config |= + AMD_PMC_L31_TO_SLICE(ped->ped_l3_slice); + amd->pm_amd_config |= + AMD_PMC_L31_TO_CORE(ped->ped_l3_thread); + } else { + amd->pm_amd_config |= + AMD_PMC_L32_TO_THREAD(ped->ped_l3_thread); + amd->pm_amd_config |= + AMD_PMC_L32_TO_SOURCEID(ped->ped_sourceid); + amd->pm_amd_config |= + AMD_PMC_L32_TO_COREID(ped->ped_coreid); + if (ped->ped_allcores) + amd->pm_amd_config |= AMD_PMC_L32_ALLCORES; + if (ped->ped_allsources) + amd->pm_amd_config |= AMD_PMC_L32_ALLSOURCES; + } } else if (strcmp("amd_df", pe->pmu) == 0) { - amd->pm_amd_config |= AMD_PMC_TO_EVENTMASK_DF(ped->ped_event); amd->pm_amd_sub_class = PMC_AMD_SUB_CLASS_DATA_FABRIC; + if (cpu_family <= 19) { + amd->pm_amd_config |= + AMD_PMC_DF1_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_config |= + AMD_PMC_DF1_TO_UNITMASK(ped->ped_umask); + } else { + amd->pm_amd_config |= + AMD_PMC_DF2_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_config |= + AMD_PMC_DF2_TO_UNITMASK(ped->ped_umask); + } } else { printf("PMC pmu '%s' is not supported!\n", pe->pmu); return (EOPNOTSUPP); diff --git a/lib/libpmc/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c index 628ed26c6f9d..4e4f53a0c0d0 100644 --- a/lib/libpmc/pmu-events/jevents.c +++ b/lib/libpmc/pmu-events/jevents.c @@ -560,6 +560,10 @@ static int json_events(const char *fn, jsmntok_t *obj = tok++; bool configcode_present = false; char *umask = NULL; + char *allcores = NULL; + char *allslices = NULL; + char *sliceid = NULL; + char *threadmask = NULL; char *cmask = NULL; char *inv = NULL; char *any = NULL; @@ -585,6 +589,22 @@ static int json_events(const char *fn, /* match_field */ if (json_streq(map, field, "UMask") && nz) { addfield(map, &umask, "", "umask=", val); + } else if (json_streq(map, field, "EnAllCores") && nz) { + addfield(map, &allcores, "", "allcores=", val); + } else if (json_streq(map, field, "EnAllSlices") && nz) { + addfield(map, &allslices, "", "allslices=", val); + } else if (json_streq(map, field, "SliceId") && nz) { + /* + * We use sourceid because there's a + * descripency where the JSON from linux calls + * it a SliceId, which is not the name used by + * AMD in the PPRs. The field name from Family + * 19h and below that calls it slicemask see + * the references in hwpmc_amd.h. + */ + addfield(map, &sliceid, "", "sourceid=", val); + } else if (json_streq(map, field, "ThreadMask") && nz) { + addfield(map, &threadmask, "", "l3_thread_mask=", val); } else if (json_streq(map, field, "CounterMask") && nz) { addfield(map, &cmask, "", "cmask=", val); } else if (json_streq(map, field, "Invert") && nz) { @@ -675,8 +695,14 @@ static int json_events(const char *fn, addfield(map, &arch_std, "", "", val); for (s = arch_std; *s; s++) *s = tolower(*s); + } else { + /* + * We shouldn't ignore unknown fields that + * makes the counter invalid! + */ + json_copystr(map, field, buf, sizeof(buf)); + fprintf(stderr, "Unknown field '%s'!\n", buf); } - /* ignore unknown fields */ } if (precise && je.desc && !strstr(je.desc, "(Precise Event)")) { if (json_streq(map, precise, "2")) @@ -707,6 +733,14 @@ static int json_events(const char *fn, addfield(map, &event, ",", period, NULL); if (umask) addfield(map, &event, ",", umask, NULL); + if (allcores) + addfield(map, &event, ",", allcores, NULL); + if (allslices) + addfield(map, &event, ",", allslices, NULL); + if (sliceid) + addfield(map, &event, ",", sliceid, NULL); + if (threadmask) + addfield(map, &event, ",", threadmask, NULL); if (je.desc && extra_desc) addfield(map, &je.desc, " ", extra_desc, NULL); @@ -737,6 +771,10 @@ static int json_events(const char *fn, err = func(data, &je); free_strings: free(umask); + free(allcores); + free(allslices); + free(sliceid); + free(threadmask); free(cmask); free(inv); free(any); diff --git a/lib/libpmc/pmu-events/json.c b/lib/libpmc/pmu-events/json.c index 89cafbc04fb6..66eaf0a74ba6 100644 --- a/lib/libpmc/pmu-events/json.c +++ b/lib/libpmc/pmu-events/json.c @@ -160,3 +160,17 @@ int json_streq(char *map, jsmntok_t *t, const char *s) unsigned len = json_len(t); return len == strlen(s) && !strncasecmp(map + t->start, s, len); } + +int json_copystr(char *map, jsmntok_t *t, char *s, int len) +{ + int jlen; + + jlen = json_len(t); + if (jlen > len) + jlen = len - 1; + + memcpy(s, map + t->start, jlen); + s[jlen] = '\0'; + + return (jlen); +} diff --git a/lib/libpmc/pmu-events/json.h b/lib/libpmc/pmu-events/json.h index 278ebd32cfb6..89b9c2fba617 100644 --- a/lib/libpmc/pmu-events/json.h +++ b/lib/libpmc/pmu-events/json.h @@ -9,6 +9,7 @@ int json_line(char *map, jsmntok_t *t); const char *json_name(jsmntok_t *t); int json_streq(char *map, jsmntok_t *t, const char *s); int json_len(jsmntok_t *t); +int json_copystr(char *map, jsmntok_t *t, char *s, int len); extern int verbose; diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index 801b75b39595..b34cbffcffa8 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -347,6 +347,10 @@ amd_allocate_pmc(int cpu __unused, int ri, struct pmc *pm, caps = pm->pm_caps; + if (((caps & PMC_CAP_PRECISE) != 0) && + ((pd->pd_caps & PMC_CAP_PRECISE) == 0)) + return (EINVAL); + PMCDBG2(MDP, ALL, 1,"amd-allocate ri=%d caps=0x%x", ri, caps); /* Validate sub-class. */ @@ -360,6 +364,9 @@ amd_allocate_pmc(int cpu __unused, int ri, struct pmc *pm, return (0); } + /* + * Everything below this is for supporting older processors. + */ pe = a->pm_ev; /* map ev to the correct event mask code */ @@ -817,6 +824,14 @@ pmc_amd_initialize(void) "K8-%d", i); d->pm_descr.pd_class = PMC_CLASS_K8; d->pm_descr.pd_caps = AMD_PMC_CAPS; + /* + * Zen 5 can precisely count retire events. + * + * Refer to PPR Vol 1 for AMD Family 1Ah Model 02h C1 57238 + * Rev. 0.24 September 29, 2024. + */ + if ((family >= 0x1a) && (i == 2)) + d->pm_descr.pd_caps |= PMC_CAP_PRECISE; d->pm_descr.pd_width = 48; if ((amd_feature2 & AMDID2_PCXC) != 0) { d->pm_evsel = AMD_PMC_CORE_BASE + 2 * i; @@ -836,7 +851,7 @@ pmc_amd_initialize(void) snprintf(d->pm_descr.pd_name, PMC_NAME_MAX, "K8-L3-%d", i); d->pm_descr.pd_class = PMC_CLASS_K8; - d->pm_descr.pd_caps = AMD_PMC_CAPS; + d->pm_descr.pd_caps = AMD_PMC_L3_CAPS; d->pm_descr.pd_width = 48; d->pm_evsel = AMD_PMC_L3_BASE + 2 * i; d->pm_perfctr = AMD_PMC_L3_BASE + 2 * i + 1; @@ -852,7 +867,7 @@ pmc_amd_initialize(void) snprintf(d->pm_descr.pd_name, PMC_NAME_MAX, "K8-DF-%d", i); d->pm_descr.pd_class = PMC_CLASS_K8; - d->pm_descr.pd_caps = AMD_PMC_CAPS; + d->pm_descr.pd_caps = AMD_PMC_DF_CAPS; d->pm_descr.pd_width = 48; d->pm_evsel = AMD_PMC_DF_BASE + 2 * i; d->pm_perfctr = AMD_PMC_DF_BASE + 2 * i + 1; diff --git a/sys/dev/hwpmc/hwpmc_amd.h b/sys/dev/hwpmc/hwpmc_amd.h index be484a1111a2..6d8ab8203942 100644 --- a/sys/dev/hwpmc/hwpmc_amd.h +++ b/sys/dev/hwpmc/hwpmc_amd.h @@ -62,21 +62,10 @@ #define AMD_PMC_CORE_DEFAULT 6 #define AMD_PMC_CORE_MAX 16 -/* L3 */ -#define AMD_PMC_L3_BASE 0xC0010230 -#define AMD_PMC_L3_DEFAULT 6 -#define AMD_PMC_L3_MAX 6 - -/* DF */ -#define AMD_PMC_DF_BASE 0xC0010240 -#define AMD_PMC_DF_DEFAULT 4 -#define AMD_PMC_DF_MAX 64 - -#define AMD_NPMCS_K8 4 -#define AMD_NPMCS_MAX (AMD_PMC_CORE_MAX + AMD_PMC_L3_MAX + \ - AMD_PMC_DF_MAX) - #define AMD_PMC_COUNTERMASK 0xFF000000 +#define AMD_PMC_PRECISERETIRE (1ULL << 43) /* Only valid for PERF_CTL2 */ +#define AMD_PMC_HOST (1ULL << 41) +#define AMD_PMC_GUEST (1ULL << 40) #define AMD_PMC_TO_COUNTER(x) (((x) << 24) & AMD_PMC_COUNTERMASK) #define AMD_PMC_INVERT (1 << 23) #define AMD_PMC_ENABLE (1 << 22) @@ -85,24 +74,13 @@ #define AMD_PMC_EDGE (1 << 18) #define AMD_PMC_OS (1 << 17) #define AMD_PMC_USR (1 << 16) -#define AMD_PMC_L3SLICEMASK (0x000F000000000000) -#define AMD_PMC_L3COREMASK (0xFF00000000000000) -#define AMD_PMC_TO_L3SLICE(x) (((x) << 48) & AMD_PMC_L3SLICEMASK) -#define AMD_PMC_TO_L3CORE(x) (((x) << 56) & AMD_PMC_L3COREMASK) - -#define AMD_PMC_UNITMASK_M 0x10 -#define AMD_PMC_UNITMASK_O 0x08 -#define AMD_PMC_UNITMASK_E 0x04 -#define AMD_PMC_UNITMASK_S 0x02 -#define AMD_PMC_UNITMASK_I 0x01 -#define AMD_PMC_UNITMASK_MOESI 0x1F #define AMD_PMC_UNITMASK 0xFF00 #define AMD_PMC_EVENTMASK 0xF000000FF #define AMD_PMC_TO_UNITMASK(x) (((x) << 8) & AMD_PMC_UNITMASK) #define AMD_PMC_TO_EVENTMASK(x) (((x) & 0xFF) | (((uint64_t)(x) & 0xF00) << 24)) -#define AMD_PMC_TO_EVENTMASK_DF(x) (((x) & 0xFF) | (((uint64_t)(x) & 0x0F00) << 24)) | (((uint64_t)(x) & 0x3000) << 47) + #define AMD_VALID_BITS (AMD_PMC_COUNTERMASK | AMD_PMC_INVERT | \ AMD_PMC_ENABLE | AMD_PMC_INT | AMD_PMC_PC | AMD_PMC_EDGE | \ AMD_PMC_OS | AMD_PMC_USR | AMD_PMC_UNITMASK | AMD_PMC_EVENTMASK) @@ -111,6 +89,69 @@ PMC_CAP_SYSTEM | PMC_CAP_EDGE | PMC_CAP_THRESHOLD | \ PMC_CAP_READ | PMC_CAP_WRITE | PMC_CAP_INVERT | PMC_CAP_QUALIFIER) +/* L3 */ +#define AMD_PMC_L3_BASE 0xC0010230 +#define AMD_PMC_L3_DEFAULT 6 +#define AMD_PMC_L3_MAX 6 + +/* + * L3 counters change their encoding slightly between Family 17h and Family 19h + * processors. + * + * Refer to the following documents for the L3 fields: + * PPR for AMD Family 17h Model 20h A1 55772-A1 Rev. 3.08 April 14, 2021 + * PPR for AMD Family 19h Model 51h A1 56569-A1 Rev. 3.03 September 21, 2021 + * PPR for AMD Family 1Ah Model 02h C1 57238 Rev. 0.24 September 29, 2024 + */ +#define AMD_PMC_L31_SLICEMASK (0x000F000000000000ULL) +#define AMD_PMC_L31_COREMASK (0xFF00000000000000ULL) + +#define AMD_PMC_L31_TO_SLICE(x) (((uint64_t)(x) << 48) & AMD_PMC_L31_SLICEMASK) +#define AMD_PMC_L31_TO_CORE(x) (((uint64_t)(x) << 56) & AMD_PMC_L31_COREMASK) + +#define AMD_PMC_L32_THREADMASK (0x0F00000000000000ULL) +#define AMD_PMC_L32_SOURCEMASK (0x0007000000000000ULL) +#define AMD_PMC_L32_ALLCORES (1ULL << 47) +#define AMD_PMC_L32_ALLSOURCES (1ULL << 46) +#define AMD_PMC_L32_COREMASK (0x00001C0000000000ULL) + +#define AMD_PMC_L32_TO_THREAD(x) (((uint64_t)(x) << 56) & AMD_PMC_L32_THREADMASK) +#define AMD_PMC_L32_TO_SOURCEID(x) (((uint64_t)(x) << 48) & AMD_PMC_L32_SOURCEMASK) +#define AMD_PMC_L32_TO_COREID(x) (((uint64_t)(x) << 42) & AMD_PMC_L32_COREMASK) + +#define AMD_PMC_L3_TO_UNITMASK(x) (((x) << 8) & AMD_PMC_UNITMASK) +#define AMD_PMC_L3_TO_EVENTMASK(x) ((x) & 0xFF) + +#define AMD_PMC_L3_CAPS (PMC_CAP_READ | PMC_CAP_WRITE | \ + PMC_CAP_QUALIFIER | PMC_CAP_DOMWIDE) + +/* DF */ +#define AMD_PMC_DF_BASE 0xC0010240 +#define AMD_PMC_DF_DEFAULT 4 +#define AMD_PMC_DF_MAX 64 + +#define AMD_PMC_DF_CAPS (PMC_CAP_READ | PMC_CAP_WRITE | \ + PMC_CAP_QUALIFIER | PMC_CAP_DOMWIDE) + +/* + * DF counters change their encoding between Family 19h and Family 1Ah + * processors. + * + * Refer to the same documents as the L3 counters. + */ +#define AMD_PMC_DF1_TO_EVENTMASK(x) (((x) & 0xFF) | \ + (((uint64_t)(x) & 0x0F00) << 24) | (((uint64_t)(x) & 0x3000) << 47)) +#define AMD_PMC_DF1_TO_UNITMASK(x) (((x) & 0xFF) << 8) + +#define AMD_PMC_DF2_TO_EVENTMASK(x) (((x) & 0xFF) | \ + (((uint64_t)(x) & 0x7F00) << 24)) +#define AMD_PMC_DF2_TO_UNITMASK(x) ((((x) & 0xFF) << 8) | \ + (((uint64_t)(x) & 0x0F00) << 16)) + +#define AMD_NPMCS_K8 4 +#define AMD_NPMCS_MAX (AMD_PMC_CORE_MAX + AMD_PMC_L3_MAX + \ + AMD_PMC_DF_MAX) + #define AMD_PMC_IS_STOPPED(evsel) ((rdmsr((evsel)) & AMD_PMC_ENABLE) == 0) #define AMD_PMC_HAS_OVERFLOWED(pmc) ((rdpmc(pmc) & (1ULL << 47)) == 0) From nobody Fri Jul 10 15:28:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMH0Zlcz6lJ6D for ; Fri, 10 Jul 2026 15:28: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbMG58DCz442H for ; Fri, 10 Jul 2026 15:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783697306; 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; bh=WWWk3yYOhHsjpZnhvYEWKSrjqvToQdz3/+l8+fbyn3g=; b=vpnqktpuj4tX2ULAx2yvqzhJ6YlcVGrJ9HEqxTPaUgFnOdsgf0h8sriy9/5ANklTEk5Dnz Y59SSnvDASU6bMHt8XkoVzHK/SP03ZTmna5J4mDsO+90xxljhhHss0qUJqAX8UBXkXvIu4 xMV9ALSzyVXDICaJqpOn4VfH3SlMDEeTzKldtcDuILLGFoGSWhjq914tEGMEgSgt2GwfyU KudPq8TvYudBIy9tJyDfWaglwi6mlEaVLIiepTmlQC7kKE380bYIKVS3v0AJZalqc0QH/l hNJNNOenN9BGgiYUQticw2f2IWoC8BxSarzYn9x9MrlRzmgTjwcc6znKWMbi6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783697306; a=rsa-sha256; cv=none; b=UyjL9J/G/YWumpJ86qdr4a4Ko+cqPbOB9WU1NZrUlnPRzOgt6xKD1IJCaEYmfo5ZotBudW r87CX8cRTxKFjPQFY5+7TLSOfk7RZdGvuxRcQzeAih59FFOV0ceC+YsBUfc9ZYZTEADXr9 +mtl2TfSsxWvRI3ucyt3cKM3ftFL0+FF6gUu+RXhl68NuUNim58MXnSpsGNi4f6/6v0axN e+Xu7z1CwG/OkuZTebq7Ym01zCZ2uR1YV+R2IUqH2Pn1WjubYY+bf2rA4UKi/A9V+gqCia LE/LUSIKA8u0P0tUybb+AzS6a/43qZOKgKKcnclzfzWGakxyLo84ObgI9g0r4Q== 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=1783697306; 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; bh=WWWk3yYOhHsjpZnhvYEWKSrjqvToQdz3/+l8+fbyn3g=; b=s1CluquwMBlyzc1ESSRfno/g0LxbdaCFYZXBU+sZwxW979VfAMpE7U+Um7ERSsHft2iHKe sqBhhFK4nGok7MEbeQPu8Q5a09XRzYqk+/R6FxAUJXffVhpBcPD2oSSN0QfnhHRY6lqWR9 Kb7A5rMfcEnCA81tlW16SyhRGV6JgpHXdRktq+mHiszPVXFEDJEHLW3zSLaWOvbJW+3+em Mbm/TSj6ROMQi6hRUivDELCriWkYBLjRUOPyEHOMYoL7wptqfqa3xMKaBJEQp3nFmwEuLI R7idQfyYJEU9mbuIw7dUkI83ctI/5nOt4koH4nGXRtiz6PlY4Wq8ynU/kPFY5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMG3yYnz10Tp for ; Fri, 10 Jul 2026 15:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 324ad by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:28:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Paulo Fragoso From: Mitchell Horne Subject: git: 067755c74a3d - stable/15 - hwpmc_amd: fix amd_get_msr() MSR offset for newer counter bases List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 067755c74a3dafd669b92963d4ad3ee1fcaa790e Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:28:26 +0000 Message-Id: <6a510f9a.324ad.4b0031d8@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=067755c74a3dafd669b92963d4ad3ee1fcaa790e commit 067755c74a3dafd669b92963d4ad3ee1fcaa790e Author: Paulo Fragoso AuthorDate: 2026-03-12 15:21:33 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:28:08 +0000 hwpmc_amd: fix amd_get_msr() MSR offset for newer counter bases The previous code subtracted AMD_PMC_PERFCTR_0 (0xC0010004) from all perfctr MSR addresses to compute a relative offset. This is incorrect for counters using AMD_PMC_CORE_BASE (0xC0010200), AMD_PMC_L3_BASE (0xC0010230), and AMD_PMC_DF_BASE (0xC0010240), producing wrong offsets. Fix by promoting amd_core_npmcs, amd_l3_npmcs, and amd_df_npmcs to static module-level variables and computing the correct flat RDPMC index per AMD BKDG 24594 page 440: ECX 0-5: Core counters 0-5 ECX 6-9: DF counters 0-3 ECX 10-15: L3 Cache counters 0-5 ECX 16-27: DF counters 4-15 ECX > 27: Reserved, returns EINVAL Reviewed by: Ali Mashtizadeh , mhorne Sponsored by: NLINK (https://nlink.com.br), Recife, Brazil Fixes: 37bba2ad92d8 ("hwpmc_amd: Add support for additional counters") Differential Revision: https://reviews.freebsd.org/D55607 (cherry picked from commit ce9aff829e02c9a21c04eae77a45f2193d1ed5a1) --- sys/dev/hwpmc/hwpmc_amd.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index b34cbffcffa8..c174502caefb 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -60,8 +60,8 @@ struct amd_descr { }; static int amd_npmcs; +static int amd_core_npmcs, amd_l3_npmcs, amd_df_npmcs; static struct amd_descr amd_pmcdesc[AMD_NPMCS_MAX]; - struct amd_event_code_map { enum pmc_event pe_ev; /* enum value */ uint16_t pe_code; /* encoded event mask */ @@ -659,10 +659,41 @@ amd_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) static int amd_get_msr(int ri, uint32_t *msr) { + int df_idx; + KASSERT(ri >= 0 && ri < amd_npmcs, ("[amd,%d] ri %d out of range", __LINE__, ri)); - *msr = amd_pmcdesc[ri].pm_perfctr - AMD_PMC_PERFCTR_0; + /* + * Map counter row index to RDPMC ECX value. + * + * AMD BKDG 24594 rev 3.37, page 440, + * "RDPMC Read Performance-Monitoring Counter": + * ECX 0-5: Core counters 0-5 + * ECX 6-9: DF/Northbridge counters 0-3 + * ECX 10-15: L3 Cache counters 0-5 + * ECX 16-27: DF/Northbridge counters 4-15 + * + * AMD PPR 57930-A0 section 2.1.9, + * "Register Sharing" for DF counter details. + */ + if (ri < amd_core_npmcs) { + /* ECX 0-5: Core counters */ + *msr = ri; + } else if (ri < amd_core_npmcs + amd_l3_npmcs) { + /* ECX 10-15: L3 Cache counters */ + *msr = 10 + (ri - amd_core_npmcs); + } else { + /* ECX 6-9: DF counters 0-3 + * ECX 16-27: DF counters 4-15 */ + df_idx = ri - amd_core_npmcs - amd_l3_npmcs; + if (df_idx < 4) + *msr = 6 + df_idx; + else if (df_idx < 16) + *msr = 16 + (df_idx - 4); + else + return (EINVAL); + } return (0); } @@ -762,7 +793,6 @@ pmc_amd_initialize(void) enum pmc_cputype cputype; int error, i, ncpus; int family, model, stepping; - int amd_core_npmcs, amd_l3_npmcs, amd_df_npmcs; struct amd_descr *d; /* From nobody Fri Jul 10 15:28:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMJ1ZN2z6lJ6H for ; Fri, 10 Jul 2026 15:28: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbMH5tD8z43yj for ; Fri, 10 Jul 2026 15:28:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783697307; 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; bh=QNfUp8GjtU90ZJ1/znM8rJNZx6ICMoVdTcFufdo8o4A=; b=APi3VW51aYBiti+pXkrXD1Z//lNhir6g8Wg/5IIOQo7rdPw5IW0+kamEGPrxtC8SPi0Hau NLJZuRY0GZblDlACiWj+hWUC/lzbMZljxBpCNGOn05sl/ZJgNvvMk6pkcdiPvexKw0UONS 3g2UZZwVa6qFLzQZIkysW4ekDTnB/qcObxuTut+7y2jNbEMAnNjAT+rwsy9xefNLGi5Amk wWlcCZ/E/ZZYA5YxI2JgPL3LxMJh29WNqvlbCPcWrQQWtDMlhu1fkUeoLuzCntQ7KkQPHX VMWHBf/KcJtPZRpO8hZRzHILtr8z3q3ef0xnTd45WH6cOzdX7ORQU2tbOex3pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783697307; a=rsa-sha256; cv=none; b=sMZLmT0ixu9azYbYLd3utC4sZ78u/lMCPwRhDL6T1G2VZZ7wCAKMZDLlHH9ZvtE9q6LfqT RKEKnF4qdjC8RG+jmOWkABfQhO2aAne35MYukbnFJ5rLBhScy4UV8Mk2JHvk0sXe/VkYcu jdFDL7js/LKAtYwnc7XINKesxcbnUPZFjVebrS3LrQXo3VslsNB3B7P3808dayTQIAL9ny 008nnEOqiFDgNavKl/kBAqy6koDI1UojM4u6MZ1peryWdEvPUgnHkHZIyu0IEK2FPHyOOj h670BDGBSvlot/nTRCIW396VpvT0GvRL825saRhEH3T0k0iY5mh+jjeNYboqsA== 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=1783697307; 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; bh=QNfUp8GjtU90ZJ1/znM8rJNZx6ICMoVdTcFufdo8o4A=; b=uXynndqlXmK1Zb84RlVZxNYIHIxtQdD5kTrdbXEEWFzYqNC+u57W87MDU6pjxb/Y7E5rI5 FJhUwFz2qFthF3GnfhV1o7M4znEgI0/K/IzOPkU03Y2FcTHULynXV58roLKdlkKZ+5Q9mx Otey5bkH2y+sjOeJZGWM37Of01Ph9dJ6qIpG8K7gcCvVHsBN+xrm1CiT+qhaktIW2uUOK/ pEXTYFgIObn+kyPMKUN0O1BzZbRfOHgU7TCj73pRBS2EdUpR9UgPifrAWi6J+62pMsTdCr 2DwFRW03OdYHeUv3ETgyeVjh9Nr5OYrlk5BKShdp1JRN6F5ac8y8ezhzjIMvJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMH4ZCQz112D for ; Fri, 10 Jul 2026 15:28:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33696 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:28:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ali Mashtizadeh From: Mitchell Horne Subject: git: 620bca5338ab - stable/15 - hwpmc: Disable AMD PMCs if in an unsupported VM List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 620bca5338abdb599e304e3437446f7731cb78db Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:28:27 +0000 Message-Id: <6a510f9b.33696.51ad5500@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=620bca5338abdb599e304e3437446f7731cb78db commit 620bca5338abdb599e304e3437446f7731cb78db Author: Ali Mashtizadeh AuthorDate: 2026-06-05 23:48:53 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:28:08 +0000 hwpmc: Disable AMD PMCs if in an unsupported VM AMD does not have a CPUID bit to indicate the lack of K8 PMCs. If all other PMC features are not present we should test an event selector to see if it stores and returns a value. If the VM is implemented correctly, this should result in a #GP on the initial wrmsr_safe. Bhyve and a few other VMs ignore writes, so I got one step further and test that it retains the OS and USR bits. Tested on Zen 5 native and a Zen 5 Bhyve virtual machine. This code should not run on any recent hardware, except in a VM, as it checks that the core counter extension is missing. PR: 268943 Reported by: Sandipan Das, John F. Carr Reviewed by: mhorne, imp Sponsored by: Netflix MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2272/changes (cherry picked from commit dded0ab415cc09eed506968366e383d406834823) --- sys/dev/hwpmc/hwpmc_amd.c | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index c174502caefb..e950ee3c84af 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -788,12 +788,14 @@ amd_pcpu_fini(struct pmc_mdep *md, int cpu) struct pmc_mdep * pmc_amd_initialize(void) { + struct amd_descr *d; struct pmc_classdep *pcd; struct pmc_mdep *pmc_mdep; + uint64_t reg; enum pmc_cputype cputype; - int error, i, ncpus; + int ncpus, i; int family, model, stepping; - struct amd_descr *d; + int error; /* * The presence of hardware performance counters on the AMD @@ -824,6 +826,37 @@ pmc_amd_initialize(void) return (NULL); } + /* + * Unforunately, there is no way to communicate that the original four + * core counters are disabled through CPUIDs alone. We attempt to + * write and read back the MSR to validate that it is working. + * + * Referenced the BIOS and Kernel Developer Guide for AMD Athlon 64 and + * AMD Opteron Processors 26094 Rev. 3.24 January, 2005 to ensure these + * fields are valid. + */ + if ((amd_feature2 & AMDID2_PCXC) == 0) { + error = wrmsr_safe(AMD_PMC_EVSEL_0, AMD_PMC_OS | AMD_PMC_USR); + if (error != 0) { + printf("hwpmc: AMD evsel 0 wrmsr failed!\n"); + return (NULL); + } + + error = rdmsr_safe(AMD_PMC_EVSEL_0, ®); + if (error != 0) { + printf("hwpmc: AMD evsel 0 rdmsr failed!\n"); + return (NULL); + } + + if (reg == 0) { + printf("hwpmc: AMD evsel returned invalid value! " + "You may be in a VM without PMC support.\n"); + return (NULL); + } + + wrmsr(AMD_PMC_EVSEL_0, 0); + } + /* * From PPR for AMD Family 1Ah, a new cpuid leaf specifies the maximum * number of PMCs of each type. If we do not have that leaf, we use From nobody Fri Jul 10 15:28:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMK0096z6lJ6J for ; Fri, 10 Jul 2026 15:28: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbMJ66cyz4449 for ; Fri, 10 Jul 2026 15:28:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783697308; 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; bh=2XJZ3XcgDtUNu25RZmPp6/mShP/0ml94SZyEKgFl5E8=; b=g4bLsfsOyzz1pmB+tUhlNB2isnH9txqBsXdjirNGXoQ1z79pf2nuIUr5FUFbBS5s6yJ4yt CWVmTcuIj7Mfo1CujdffHaDOTUMbji8iJ5MPBXEvbHn0/AlyVcR/0oIX8Lb/75MtQDYCrR 5pPDhPmSIvaxmpmJZ0Ni0QUG3VrazL0onTMTT4EIxrDiDEdStgq5Tr2xFfnXtQrOGElOO5 2K+u+rRGk5EyTPHdt1CijY78CT4UHsc/NoPcer1PlhaG3rpJA0SJvv6F8AEv2YLe7qNPkA y10uo2SFlylJLHIIINruIWyGIC1lVvWlvS35BiIakgt3Ss3dsf38xyVESFItLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783697308; a=rsa-sha256; cv=none; b=XitZ22am5ku9He711FXi9rKQv5Ee6AU6KehrHEpoTm+USYbFuqjQx1I80KAibDwzAy/Zxl QGkmIJEAW8EtXkMGZ//4dJSJ3SZqYlWCvqbIBPGHrPToCs0mpjlRl84k7fluxpVzy1heWb Teej3y2NvngjJpbiug3jJObP9sBZ1lrhI/5e4INmwXo8WOb1llKeMEtiv46iYAP87egU+I V00ETiRUPOAwjaSwsAaXT2eA8gJlkkeF35AzsP1BwfmV11vbENQFw/E9ZpwWaXWs4F5zHY 553dRBy24S2eQkPvHnhdz5QfLDgXjYWuSj80RFhXsd4I8RrguYdvhSdLgQSo0w== 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=1783697308; 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; bh=2XJZ3XcgDtUNu25RZmPp6/mShP/0ml94SZyEKgFl5E8=; b=MeqYaVEhjarA5PEStEmkdPCWmvF90tSOr3etu3vgTmwhqE3zahZE7PPJfKhVb04SBHAOaO 2dzae9T7UuiyE82gNweeeMTTh3xsrjh56u4RRzhGJ3a7XgBnHRiTPFKR8ybSeeCa1N4fV+ hvEFuxqgYUlKROPywd26MkGpqdVe594BrgSoSLrEbBv1Gf3wUqGL1+X4RFyCIH7Yh9LW3X YmOaYEPTpt6D7Q1z9xKS+kIjWeoprCs4IO22pnZw75/0w6ZCb8EO8VOpzm4WSBHIRltljr 9pwl9nhiuKpxMs+cl1Oql8+zHRMYEMEg1X0doM3+tdxv8VlmfGKPTrMtD+BCuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMJ5357z11G6 for ; Fri, 10 Jul 2026 15:28:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33c2d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:28:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ali Mashtizadeh From: Mitchell Horne Subject: git: a854d977c39a - stable/15 - hwpmc_amd: Avoid using PMCs if in use by firmware List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a854d977c39a09dfbe3d9b4b5c84a8008ef0710a Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:28:28 +0000 Message-Id: <6a510f9c.33c2d.1d56f4f5@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a854d977c39a09dfbe3d9b4b5c84a8008ef0710a commit a854d977c39a09dfbe3d9b4b5c84a8008ef0710a Author: Ali Mashtizadeh AuthorDate: 2026-06-10 23:20:16 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:28:09 +0000 hwpmc_amd: Avoid using PMCs if in use by firmware Some firmwares use the PMCs to monitor OS performance. We can't be certain that the BIOS would detect any change to the counters if we reprogram them. In cases where the firmware is using the PMCs to control power management this could have dangerous side effects or unexpected performance effects. During initialization, detect if any of the counters are enabled and fail if so. Reported by: Sandipan Das Reviewed by: mhorne MFC after: 1 week Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/2277 (cherry picked from commit cf469ab83012ee47d06bc89874b6c109f49446e0) --- sys/dev/hwpmc/hwpmc_amd.c | 110 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 33 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index e950ee3c84af..792411ec2033 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -782,16 +782,84 @@ amd_pcpu_fini(struct pmc_mdep *md, int cpu) return (0); } +/* + * Check that the PMC hardware is safe to use. First, we check that the PMCs + * are not in use by firmware or another module. Second, if none of the PMC + * feature flags are set, we check that the event selector is working, because + * virtual machines have no way to communicate the absence of PMCs. + */ +static int +amd_hwcheck(void) +{ + uint64_t reg; + int error, i; + + /* + * Some PC vendors enable the core counters in firmware to track + * performance. The best guess is that this is being used to control + * power management from within the SMM mode. We shouldn't just take + * over the PMCs in this case. The user should try disabling any + * performance monitoring or power management functions in the BIOS to + * safely make use of the counters. + */ + for (i = 0; i < amd_core_npmcs; i++) { + error = rdmsr_safe(amd_pmcdesc[i].pm_evsel, ®); + if (error != 0) { + printf("hwpmc: AMD evsel %d rdmsr failed!\n", i); + return (-1); + } + + if ((reg & AMD_PMC_ENABLE) != 0) { + printf("hwpmc: PMCs maybe in use by firmware!\n"); + printf("hwpmc: Disable the PMC use in the BIOS before loading\n"); + return (-1); + } + } + + /* + * Unfortunately, there is no way to communicate that the original four + * core counters are disabled through CPUIDs alone. We attempt to + * write and read back the MSR to validate that it is working. + * + * Referenced the BIOS and Kernel Developer Guide for AMD Athlon 64 and + * AMD Opteron Processors 26094 Rev. 3.24 January, 2005 to ensure these + * fields are valid. + */ + if ((amd_feature2 & AMDID2_PCXC) == 0) { + error = wrmsr_safe(AMD_PMC_EVSEL_0, AMD_PMC_OS | AMD_PMC_USR); + if (error != 0) { + printf("hwpmc: AMD evsel 0 wrmsr failed!\n"); + return (-1); + } + + error = rdmsr_safe(AMD_PMC_EVSEL_0, ®); + if (error != 0) { + printf("hwpmc: AMD evsel 0 rdmsr failed!\n"); + return (-1); + } + + if (reg == 0) { + printf("hwpmc: AMD evsel returned invalid value! " + "You may be in a VM without PMC support.\n"); + return (-1); + } + + wrmsr(AMD_PMC_EVSEL_0, 0); + } + + return (0); +} + /* * Initialize ourselves. */ struct pmc_mdep * pmc_amd_initialize(void) { + u_int regs[4]; struct amd_descr *d; struct pmc_classdep *pcd; struct pmc_mdep *pmc_mdep; - uint64_t reg; enum pmc_cputype cputype; int ncpus, i; int family, model, stepping; @@ -826,37 +894,6 @@ pmc_amd_initialize(void) return (NULL); } - /* - * Unforunately, there is no way to communicate that the original four - * core counters are disabled through CPUIDs alone. We attempt to - * write and read back the MSR to validate that it is working. - * - * Referenced the BIOS and Kernel Developer Guide for AMD Athlon 64 and - * AMD Opteron Processors 26094 Rev. 3.24 January, 2005 to ensure these - * fields are valid. - */ - if ((amd_feature2 & AMDID2_PCXC) == 0) { - error = wrmsr_safe(AMD_PMC_EVSEL_0, AMD_PMC_OS | AMD_PMC_USR); - if (error != 0) { - printf("hwpmc: AMD evsel 0 wrmsr failed!\n"); - return (NULL); - } - - error = rdmsr_safe(AMD_PMC_EVSEL_0, ®); - if (error != 0) { - printf("hwpmc: AMD evsel 0 rdmsr failed!\n"); - return (NULL); - } - - if (reg == 0) { - printf("hwpmc: AMD evsel returned invalid value! " - "You may be in a VM without PMC support.\n"); - return (NULL); - } - - wrmsr(AMD_PMC_EVSEL_0, 0); - } - /* * From PPR for AMD Family 1Ah, a new cpuid leaf specifies the maximum * number of PMCs of each type. If we do not have that leaf, we use @@ -872,7 +909,6 @@ pmc_amd_initialize(void) amd_df_npmcs = AMD_PMC_DF_DEFAULT; if (cpu_exthigh >= CPUID_EXTPERFMON) { - u_int regs[4]; do_cpuid(CPUID_EXTPERFMON, regs); if (regs[1] != 0) { amd_core_npmcs = EXTPERFMON_CORE_PMCS(regs[1]); @@ -939,6 +975,14 @@ pmc_amd_initialize(void) amd_npmcs += amd_df_npmcs; } + /* + * Sanity check that the hardware is safe to use. Do not read or write + * any of the PMC MSRs until after this check passes. + */ + if (amd_hwcheck() < 0) { + return (NULL); + } + /* * Allocate space for pointers to PMC HW descriptors and for * the MDEP structure used by MI code. From nobody Fri Jul 10 15:28:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbML065Zz6lJCK for ; Fri, 10 Jul 2026 15:28: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbMK5dq5z446s for ; Fri, 10 Jul 2026 15:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783697309; 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; bh=t7Gz+r7Z8DA+qQUVVbGO5iItMs9pQM250USumV0o//k=; b=m2T31mMODP31Ug/wGwx1DV9sO0HB/9EdP4/bZC40XAB2pIMjahC18LgVTjeLNL2Cyk98NP liYOiUkEJ1ONoMNOrislt6DlITfrV4NcT24y1bazdTzDlRV2xp3P54VhoAUQ6k63EGjea9 qRgyMBmXxsgu5PlngphW2jLbkVE5LoO22mPW+Z319Q5JriWT17mgSsvyt9QXj6TQ53GJPc nPMwLR4iISLHCX+YDwmZH90AI7RFPk4qroL/uLhD8P25et9vWeVOWrtmH69sVdT08kb4FE Rwn6Gv+8kdu6C1hrG+B9HMCkubCOYZ/qHFjiq19876W1KAfpubrc8k7AOhqnLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783697309; a=rsa-sha256; cv=none; b=Kh/aygQLrH9JQoR2Sq+8EfXl6rArmSJTLWPrZHSjMMjury6M9tds385z2VaOfUgocg/C3m I/3IH1fmUQiACmzBhfiEGm1F14lUORSoXB+FeQTzk5xzQsKFHJXhjWOOQU7wmiEDBCKZQr CThnCZp+LuNFrhWNqPBjIhL35dXhkLa4Cc1lzMeXw0ZcPXWug9QRgaaYxBhKvb94zVRNad s9B2zUjxashp7uLMJ192BPyap+Bcz9gL3/FVWjew8dAMghDiaY18VeXhXlCE1IWODCbn7F 4MiYHYOpWCpI4kBmHcIetD3mdcfV1R35xS49ta36FBns1yQhLd6OBFHp4jhUNA== 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=1783697309; 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; bh=t7Gz+r7Z8DA+qQUVVbGO5iItMs9pQM250USumV0o//k=; b=i+v5opw4VwLKoqnEgtYBOK8d99EJ9kjrkDPKQw09JIQlmS4Rc5R2wvL6Ju1tu18DcRXauD 62m3LbefhMHrGwZoHqXmNA1eKssxYW4CVxWiLkrdDQCHFruImKydLSCxFOVds00HFX7dqH vozLHILo0yZj3hfXZ1RqoksBt38wxOB9L/NaJSgIeO4DdKZWxjPpchV5FrbA5bKAntadQO c30FhWP15/fBj3bH2sRX5ZFrUyeThhnjndKeXTIJrw8k3vKMmccihbBxybRxRBynMmLEq+ OvGDDlT1hNlZrQ0uHuAy/TxuzV6YqtKo18LwCRkzfvR2Gfly/q07rF3jSDpc8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMK4kTkz11B1 for ; Fri, 10 Jul 2026 15:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3233b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:28:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ali Mashtizadeh From: Mitchell Horne Subject: git: d74dae909b26 - stable/15 - hwpmc_amd: Add support for additional counters. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d74dae909b2690fe597888c263125c86917720bb Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:28:24 +0000 Message-Id: <6a510f98.3233b.34d1d7af@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d74dae909b2690fe597888c263125c86917720bb commit d74dae909b2690fe597888c263125c86917720bb Author: Ali Mashtizadeh AuthorDate: 2026-01-23 05:34:44 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:28:08 +0000 hwpmc_amd: Add support for additional counters. Rather than provide a static table of counters, this change computes the number of counters that are available by checking several CPUID leafs and falling back to defaults on older processors. The limits are set to support the maximum number of counters of each type. Sponsored by: Netflix Reviewed by: imp, mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/1983 (cherry picked from commit 37bba2ad92d8fa81d70f7a8243b2f42981f44454) --- sys/dev/hwpmc/hwpmc_amd.c | 182 +++++++++++++++++++++++++++------------------- sys/dev/hwpmc/hwpmc_amd.h | 61 ++++++++-------- 2 files changed, 137 insertions(+), 106 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index d2fb17549990..801b75b39595 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -53,43 +53,14 @@ DPCPU_DEFINE_STATIC(uint32_t, nmi_counter); /* AMD K8 PMCs */ struct amd_descr { - struct pmc_descr pm_descr; /* "base class" */ - uint32_t pm_evsel; /* address of EVSEL register */ - uint32_t pm_perfctr; /* address of PERFCTR register */ + struct pmc_descr pm_descr; /* "base class" */ + uint32_t pm_evsel; /* address of EVSEL register */ + uint32_t pm_perfctr; /* address of PERFCTR register */ + enum sub_class pm_subclass; /* register subclass */ }; -/* Counter hardware. */ -#define PMCDESC(evsel, perfctr) \ - { \ - .pm_descr = { \ - .pd_name = "", \ - .pd_class = PMC_CLASS_K8, \ - .pd_caps = AMD_PMC_CAPS, \ - .pd_width = 48 \ - }, \ - .pm_evsel = (evsel), \ - .pm_perfctr = (perfctr) \ - } - -static struct amd_descr amd_pmcdesc[AMD_NPMCS] = -{ - PMCDESC(AMD_PMC_EVSEL_0, AMD_PMC_PERFCTR_0), - PMCDESC(AMD_PMC_EVSEL_1, AMD_PMC_PERFCTR_1), - PMCDESC(AMD_PMC_EVSEL_2, AMD_PMC_PERFCTR_2), - PMCDESC(AMD_PMC_EVSEL_3, AMD_PMC_PERFCTR_3), - PMCDESC(AMD_PMC_EVSEL_4, AMD_PMC_PERFCTR_4), - PMCDESC(AMD_PMC_EVSEL_5, AMD_PMC_PERFCTR_5), - PMCDESC(AMD_PMC_EVSEL_EP_L3_0, AMD_PMC_PERFCTR_EP_L3_0), - PMCDESC(AMD_PMC_EVSEL_EP_L3_1, AMD_PMC_PERFCTR_EP_L3_1), - PMCDESC(AMD_PMC_EVSEL_EP_L3_2, AMD_PMC_PERFCTR_EP_L3_2), - PMCDESC(AMD_PMC_EVSEL_EP_L3_3, AMD_PMC_PERFCTR_EP_L3_3), - PMCDESC(AMD_PMC_EVSEL_EP_L3_4, AMD_PMC_PERFCTR_EP_L3_4), - PMCDESC(AMD_PMC_EVSEL_EP_L3_5, AMD_PMC_PERFCTR_EP_L3_5), - PMCDESC(AMD_PMC_EVSEL_EP_DF_0, AMD_PMC_PERFCTR_EP_DF_0), - PMCDESC(AMD_PMC_EVSEL_EP_DF_1, AMD_PMC_PERFCTR_EP_DF_1), - PMCDESC(AMD_PMC_EVSEL_EP_DF_2, AMD_PMC_PERFCTR_EP_DF_2), - PMCDESC(AMD_PMC_EVSEL_EP_DF_3, AMD_PMC_PERFCTR_EP_DF_3) -}; +static int amd_npmcs; +static struct amd_descr amd_pmcdesc[AMD_NPMCS_MAX]; struct amd_event_code_map { enum pmc_event pe_ev; /* enum value */ @@ -203,7 +174,7 @@ const int amd_event_codes_size = nitems(amd_event_codes); * Per-processor information */ struct amd_cpu { - struct pmc_hw pc_amdpmcs[AMD_NPMCS]; + struct pmc_hw pc_amdpmcs[AMD_NPMCS_MAX]; }; static struct amd_cpu **amd_pcpu; @@ -219,7 +190,7 @@ amd_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < amd_npmcs, ("[amd,%d] illegal row-index %d", __LINE__, ri)); KASSERT(amd_pcpu[cpu], ("[amd,%d] null per-cpu, cpu %d", __LINE__, cpu)); @@ -264,7 +235,7 @@ amd_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < amd_npmcs, ("[amd,%d] illegal row-index %d", __LINE__, ri)); pd = &amd_pmcdesc[ri]; @@ -293,7 +264,7 @@ amd_config_pmc(int cpu, int ri, struct pmc *pm) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < amd_npmcs, ("[amd,%d] illegal row-index %d", __LINE__, ri)); phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; @@ -362,7 +333,7 @@ amd_allocate_pmc(int cpu __unused, int ri, struct pmc *pm, enum pmc_event pe; int i; - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < amd_npmcs, ("[amd,%d] illegal row index %d", __LINE__, ri)); pd = &amd_pmcdesc[ri].pm_descr; @@ -379,14 +350,7 @@ amd_allocate_pmc(int cpu __unused, int ri, struct pmc *pm, PMCDBG2(MDP, ALL, 1,"amd-allocate ri=%d caps=0x%x", ri, caps); /* Validate sub-class. */ - if ((ri >= 0 && ri < 6) && a->pm_md.pm_amd.pm_amd_sub_class != - PMC_AMD_SUB_CLASS_CORE) - return (EINVAL); - if ((ri >= 6 && ri < 12) && a->pm_md.pm_amd.pm_amd_sub_class != - PMC_AMD_SUB_CLASS_L3_CACHE) - return (EINVAL); - if ((ri >= 12 && ri < 16) && a->pm_md.pm_amd.pm_amd_sub_class != - PMC_AMD_SUB_CLASS_DATA_FABRIC) + if (amd_pmcdesc[ri].pm_subclass != a->pm_md.pm_amd.pm_amd_sub_class) return (EINVAL); if (strlen(pmc_cpuid) != 0) { @@ -455,7 +419,7 @@ amd_release_pmc(int cpu, int ri, struct pmc *pmc __unused) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < amd_npmcs, ("[amd,%d] illegal row-index %d", __LINE__, ri)); phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; @@ -477,13 +441,18 @@ amd_start_pmc(int cpu __diagused, int ri, struct pmc *pm) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < amd_npmcs, ("[amd,%d] illegal row-index %d", __LINE__, ri)); pd = &amd_pmcdesc[ri]; PMCDBG2(MDP, STA, 1, "amd-start cpu=%d ri=%d", cpu, ri); + /* + * Triggered by DF counters because all DF MSRs are shared. We need to + * change the code to honor the per-package flag in the JSON event + * definitions. + */ KASSERT(AMD_PMC_IS_STOPPED(pd->pm_evsel), ("[amd,%d] pmc%d,cpu%d: Starting active PMC \"%s\"", __LINE__, ri, cpu, pd->pm_descr.pd_name)); @@ -509,7 +478,7 @@ amd_stop_pmc(int cpu __diagused, int ri, struct pmc *pm) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < amd_npmcs, ("[amd,%d] illegal row-index %d", __LINE__, ri)); pd = &amd_pmcdesc[ri]; @@ -578,7 +547,10 @@ amd_intr(struct trapframe *tf) * a single interrupt. Check all the valid pmcs for * overflow. */ - for (i = 0; i < AMD_CORE_NPMCS; i++) { + for (i = 0; i < amd_npmcs; i++) { + if (amd_pmcdesc[i].pm_subclass != PMC_AMD_SUB_CLASS_CORE) + break; + if ((pm = pac->pc_amdpmcs[i].phw_pmc) == NULL || !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { continue; @@ -654,7 +626,7 @@ amd_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < amd_npmcs, ("[amd,%d] row-index %d out of range", __LINE__, ri)); phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; @@ -680,7 +652,7 @@ amd_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) static int amd_get_msr(int ri, uint32_t *msr) { - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < amd_npmcs, ("[amd,%d] ri %d out of range", __LINE__, ri)); *msr = amd_pmcdesc[ri].pm_perfctr - AMD_PMC_PERFCTR_0; @@ -715,7 +687,7 @@ amd_pcpu_init(struct pmc_mdep *md, int cpu) KASSERT(pc != NULL, ("[amd,%d] NULL per-cpu pointer", __LINE__)); - for (n = 0, phw = pac->pc_amdpmcs; n < AMD_NPMCS; n++, phw++) { + for (n = 0, phw = pac->pc_amdpmcs; n < amd_npmcs; n++, phw++) { phw->phw_state = PMC_PHW_FLAG_IS_ENABLED | PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(n); phw->phw_pmc = NULL; @@ -733,7 +705,6 @@ amd_pcpu_fini(struct pmc_mdep *md, int cpu) { struct amd_cpu *pac; struct pmc_cpu *pc; - uint32_t evsel; int first_ri, i; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -741,15 +712,6 @@ amd_pcpu_fini(struct pmc_mdep *md, int cpu) PMCDBG1(MDP, INI, 1, "amd-cleanup cpu=%d", cpu); - /* - * First, turn off all PMCs on this CPU. - */ - for (i = 0; i < 4; i++) { /* XXX this loop is now not needed */ - evsel = rdmsr(AMD_PMC_EVSEL_0 + i); - evsel &= ~AMD_PMC_ENABLE; - wrmsr(AMD_PMC_EVSEL_0 + i, evsel); - } - /* * Next, free up allocated space. */ @@ -759,7 +721,7 @@ amd_pcpu_fini(struct pmc_mdep *md, int cpu) amd_pcpu[cpu] = NULL; #ifdef HWPMC_DEBUG - for (i = 0; i < AMD_NPMCS; i++) { + for (i = 0; i < AMD_NPMCS_K8; i++) { KASSERT(pac->pc_amdpmcs[i].phw_pmc == NULL, ("[amd,%d] CPU%d/PMC%d in use", __LINE__, cpu, i)); KASSERT(AMD_PMC_IS_STOPPED(AMD_PMC_EVSEL_0 + i), @@ -775,7 +737,7 @@ amd_pcpu_fini(struct pmc_mdep *md, int cpu) /* * Reset pointers in the MI 'per-cpu' state. */ - for (i = 0; i < AMD_NPMCS; i++) + for (i = 0; i < amd_npmcs; i++) pc->pc_hwpmcs[i + first_ri] = NULL; free(pac, M_PMC); @@ -793,6 +755,8 @@ pmc_amd_initialize(void) enum pmc_cputype cputype; int error, i, ncpus; int family, model, stepping; + int amd_core_npmcs, amd_l3_npmcs, amd_df_npmcs; + struct amd_descr *d; /* * The presence of hardware performance counters on the AMD @@ -823,6 +787,80 @@ pmc_amd_initialize(void) return (NULL); } + /* + * From PPR for AMD Family 1Ah, a new cpuid leaf specifies the maximum + * number of PMCs of each type. If we do not have that leaf, we use + * the prior default values that are only valid if we have the feature + * bit enabled in CPU. + */ + if ((amd_feature2 & AMDID2_PCXC) != 0) { + amd_core_npmcs = AMD_PMC_CORE_DEFAULT; + } else { + amd_core_npmcs = AMD_NPMCS_K8; + } + amd_l3_npmcs = AMD_PMC_L3_DEFAULT; + amd_df_npmcs = AMD_PMC_DF_DEFAULT; + + if (cpu_exthigh >= CPUID_EXTPERFMON) { + u_int regs[4]; + do_cpuid(CPUID_EXTPERFMON, regs); + if (regs[1] != 0) { + amd_core_npmcs = EXTPERFMON_CORE_PMCS(regs[1]); + amd_df_npmcs = EXTPERFMON_DF_PMCS(regs[1]); + } + } + + /* Enable the newer core counters */ + for (i = 0; i < amd_core_npmcs; i++) { + d = &amd_pmcdesc[i]; + snprintf(d->pm_descr.pd_name, PMC_NAME_MAX, + "K8-%d", i); + d->pm_descr.pd_class = PMC_CLASS_K8; + d->pm_descr.pd_caps = AMD_PMC_CAPS; + d->pm_descr.pd_width = 48; + if ((amd_feature2 & AMDID2_PCXC) != 0) { + d->pm_evsel = AMD_PMC_CORE_BASE + 2 * i; + d->pm_perfctr = AMD_PMC_CORE_BASE + 2 * i + 1; + } else { + d->pm_evsel = AMD_PMC_EVSEL_0 + i; + d->pm_perfctr = AMD_PMC_PERFCTR_0 + i; + } + d->pm_subclass = PMC_AMD_SUB_CLASS_CORE; + } + amd_npmcs = amd_core_npmcs; + + if ((amd_feature2 & AMDID2_PTSCEL2I) != 0) { + /* Enable the LLC/L3 counters */ + for (i = 0; i < amd_l3_npmcs; i++) { + d = &amd_pmcdesc[amd_npmcs + i]; + snprintf(d->pm_descr.pd_name, PMC_NAME_MAX, + "K8-L3-%d", i); + d->pm_descr.pd_class = PMC_CLASS_K8; + d->pm_descr.pd_caps = AMD_PMC_CAPS; + d->pm_descr.pd_width = 48; + d->pm_evsel = AMD_PMC_L3_BASE + 2 * i; + d->pm_perfctr = AMD_PMC_L3_BASE + 2 * i + 1; + d->pm_subclass = PMC_AMD_SUB_CLASS_L3_CACHE; + } + amd_npmcs += amd_l3_npmcs; + } + + if ((amd_feature2 & AMDID2_PNXC) != 0) { + /* Enable the data fabric counters */ + for (i = 0; i < amd_df_npmcs; i++) { + d = &amd_pmcdesc[amd_npmcs + i]; + snprintf(d->pm_descr.pd_name, PMC_NAME_MAX, + "K8-DF-%d", i); + d->pm_descr.pd_class = PMC_CLASS_K8; + d->pm_descr.pd_caps = AMD_PMC_CAPS; + d->pm_descr.pd_width = 48; + d->pm_evsel = AMD_PMC_DF_BASE + 2 * i; + d->pm_perfctr = AMD_PMC_DF_BASE + 2 * i + 1; + d->pm_subclass = PMC_AMD_SUB_CLASS_DATA_FABRIC; + } + amd_npmcs += amd_df_npmcs; + } + /* * Allocate space for pointers to PMC HW descriptors and for * the MDEP structure used by MI code. @@ -848,16 +886,10 @@ pmc_amd_initialize(void) pcd->pcd_caps = AMD_PMC_CAPS; pcd->pcd_class = PMC_CLASS_K8; - pcd->pcd_num = AMD_NPMCS; + pcd->pcd_num = amd_npmcs; pcd->pcd_ri = pmc_mdep->pmd_npmc; pcd->pcd_width = 48; - /* fill in the correct pmc name and class */ - for (i = 0; i < AMD_NPMCS; i++) { - snprintf(amd_pmcdesc[i].pm_descr.pd_name, PMC_NAME_MAX, "K8-%d", - i); - } - pcd->pcd_allocate_pmc = amd_allocate_pmc; pcd->pcd_config_pmc = amd_config_pmc; pcd->pcd_describe = amd_describe; @@ -876,7 +908,7 @@ pmc_amd_initialize(void) pmc_mdep->pmd_switch_in = amd_switch_in; pmc_mdep->pmd_switch_out = amd_switch_out; - pmc_mdep->pmd_npmc += AMD_NPMCS; + pmc_mdep->pmd_npmc += amd_npmcs; PMCDBG0(MDP, INI, 0, "amd-initialize"); diff --git a/sys/dev/hwpmc/hwpmc_amd.h b/sys/dev/hwpmc/hwpmc_amd.h index d72fbc4878b6..be484a1111a2 100644 --- a/sys/dev/hwpmc/hwpmc_amd.h +++ b/sys/dev/hwpmc/hwpmc_amd.h @@ -31,8 +31,12 @@ #ifndef _DEV_HWPMC_AMD_H_ #define _DEV_HWPMC_AMD_H_ 1 -/* AMD K8 PMCs */ +/* CPUIDs */ +#define CPUID_EXTPERFMON 0x80000022 +#define EXTPERFMON_CORE_PMCS(x) ((x) & 0x0F) +#define EXTPERFMON_DF_PMCS(x) (((x) >> 10) & 0x3F) +/* AMD K8 PMCs */ #define AMD_PMC_EVSEL_0 0xC0010000 #define AMD_PMC_EVSEL_1 0xC0010001 #define AMD_PMC_EVSEL_2 0xC0010002 @@ -42,40 +46,35 @@ #define AMD_PMC_PERFCTR_1 0xC0010005 #define AMD_PMC_PERFCTR_2 0xC0010006 #define AMD_PMC_PERFCTR_3 0xC0010007 + +/* + * For older AMD processors we have hard coded the original four core counters. + * For newer processors we use the cpuid bits to setup the counter table. The + * counts below are the default number of registers assuming that you do not + * have CPUID leaf 0x80000022. The maximum number of counters is computed + * based on the available bits in the CPUID leaf and reserved MSR space. + * + * Refer to the PPRs for AMD Family 1Ah. + */ + /* CORE */ -#define AMD_PMC_EVSEL_4 0xC0010208 -#define AMD_PMC_EVSEL_5 0xC001020A +#define AMD_PMC_CORE_BASE 0xC0010200 +#define AMD_PMC_CORE_DEFAULT 6 +#define AMD_PMC_CORE_MAX 16 -#define AMD_PMC_PERFCTR_4 0xC0010209 -#define AMD_PMC_PERFCTR_5 0xC001020B /* L3 */ -#define AMD_PMC_EVSEL_EP_L3_0 0xC0010230 -#define AMD_PMC_EVSEL_EP_L3_1 0xC0010232 -#define AMD_PMC_EVSEL_EP_L3_2 0xC0010234 -#define AMD_PMC_EVSEL_EP_L3_3 0xC0010236 -#define AMD_PMC_EVSEL_EP_L3_4 0xC0010238 -#define AMD_PMC_EVSEL_EP_L3_5 0xC001023A - -#define AMD_PMC_PERFCTR_EP_L3_0 0xC0010231 -#define AMD_PMC_PERFCTR_EP_L3_1 0xC0010233 -#define AMD_PMC_PERFCTR_EP_L3_2 0xC0010235 -#define AMD_PMC_PERFCTR_EP_L3_3 0xC0010237 -#define AMD_PMC_PERFCTR_EP_L3_4 0xC0010239 -#define AMD_PMC_PERFCTR_EP_L3_5 0xC001023B -/* DF */ -#define AMD_PMC_EVSEL_EP_DF_0 0xC0010240 -#define AMD_PMC_EVSEL_EP_DF_1 0xC0010242 -#define AMD_PMC_EVSEL_EP_DF_2 0xC0010244 -#define AMD_PMC_EVSEL_EP_DF_3 0xC0010246 +#define AMD_PMC_L3_BASE 0xC0010230 +#define AMD_PMC_L3_DEFAULT 6 +#define AMD_PMC_L3_MAX 6 -#define AMD_PMC_PERFCTR_EP_DF_0 0xC0010241 -#define AMD_PMC_PERFCTR_EP_DF_1 0xC0010243 -#define AMD_PMC_PERFCTR_EP_DF_2 0xC0010245 -#define AMD_PMC_PERFCTR_EP_DF_3 0xC0010247 - -#define AMD_NPMCS 16 -#define AMD_CORE_NPMCS 6 +/* DF */ +#define AMD_PMC_DF_BASE 0xC0010240 +#define AMD_PMC_DF_DEFAULT 4 +#define AMD_PMC_DF_MAX 64 +#define AMD_NPMCS_K8 4 +#define AMD_NPMCS_MAX (AMD_PMC_CORE_MAX + AMD_PMC_L3_MAX + \ + AMD_PMC_DF_MAX) #define AMD_PMC_COUNTERMASK 0xFF000000 #define AMD_PMC_TO_COUNTER(x) (((x) << 24) & AMD_PMC_COUNTERMASK) @@ -118,7 +117,7 @@ #define AMD_RELOAD_COUNT_TO_PERFCTR_VALUE(V) (-(V)) #define AMD_PERFCTR_VALUE_TO_RELOAD_COUNT(P) (-(P)) -enum sub_class{ +enum sub_class { PMC_AMD_SUB_CLASS_CORE, PMC_AMD_SUB_CLASS_L3_CACHE, PMC_AMD_SUB_CLASS_DATA_FABRIC From nobody Fri Jul 10 15:28:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbML72Lmz6lJ4T for ; Fri, 10 Jul 2026 15:28: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbML12Tjz44CM for ; Fri, 10 Jul 2026 15:28:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783697310; 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; bh=MtTTfaqcgAsp0LCNOUL2AO7+1cWAeURcuXw9Chn4Luw=; b=FKaFY38FeIPrkwMbtKKVQ9K+Ve1w1FaFjd2FYOlW33M4q7vC8Ya03bFnEkUAVnyhVjC9P2 pO6hmBLjM8f6X0Q06vslr91aVgHcYNuL3w5BmC0adfJ56TsHhFJ0M9AFNIG+abm8ahpd7N 3u+kdGaKnhyt00fsZqAzAnYdB71Ce/ELQgj3a5xTYN+ijV3r4sckescufI7cKOdVE7tQhQ uBWfzgzL0AEB3/ctZ8FvD0LP2D96AAlWVaS/rXhAbj258zlOEU3q33N7zli0XhiYGwVCIp CAA193zlHzDIbbFE8Y8BlpQ5aN/U3RUqtrlfvY/RYdQEDjbwFCia+po+fZZlyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783697310; a=rsa-sha256; cv=none; b=EVgM4zVRldQ6Z3ilTLL3unUCKxgChBrCfaDLd16e7FJpFKjoIf8nI1lJHxN7sF+U3sa6FJ Y3deepo/aSX0qb3op1ZCiArYC/9M+CB3+RwIrRyuCwVyTh3LEnE7e6b4HRA32uC1IvqI1V QXyPnziN3wjO0hRW+reV01tabo/Ccf8CTL4X3SxdnzDNeniHWUwdPCIoIQG0tGYC2zC04M YAU1roOdO1VzEEAPKcskTTCqyau2BO3ahCK804wTIbo5RYkYLJElMl1wyGPH5cX0E2TW1O kN0h7P0fEGk0doza9HU+/RdAJcaZHhNDlbapEhppTKT9jSDQVrba2ybFdPuQKw== 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=1783697310; 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; bh=MtTTfaqcgAsp0LCNOUL2AO7+1cWAeURcuXw9Chn4Luw=; b=PR2qo1Tf24zbWtgZQaMtKlDz64vF1vKGN9gFO+yOwkyAeuIWvB9c6glFshhVLobkVRDOVl DGrzjeotvPObrpO3p2B6LyV2g21JHWpR0CyQSio1lMxKw7n8Ni24vVhsSmtbnTJHp9Hu0R D182vkf0VoxGnU9aHqFW8SOHNCf5U7Kf9dejqGrJ2Dtd9XdDZJeVFMi/JbDCX1NlRJW12a oLfl1f3ozwblj0moahiqhwb1+LpFI48d35ur9yeoklxZLHWlOoXaD8R/xLOBzpiyNnjSDH yjeYC1hOvx9vzWIF73wRhsiRFTGPX+EqXsGaxtHV+seN2MCEZoh5U4s93Av8Ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMK5qCnz11B2 for ; Fri, 10 Jul 2026 15:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31569 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:28:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ricardo Branco From: Mitchell Horne Subject: git: c794fe2a9462 - stable/15 - crashinfo: Create core.txt.last symlink List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c794fe2a9462e706d0aa47a819de6957e6c1d677 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:28:29 +0000 Message-Id: <6a510f9d.31569.526f87b0@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c794fe2a9462e706d0aa47a819de6957e6c1d677 commit c794fe2a9462e706d0aa47a819de6957e6c1d677 Author: Ricardo Branco AuthorDate: 2026-05-15 14:58:41 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:28:09 +0000 crashinfo: Create core.txt.last symlink When saving a coredump, savecore(8) maintains .last symlinks for the info and vmcore artifacts, but not for the crashinfo text report. Make crashinfo(8) create the link, pointing at the current core.txt. file. This makes /var/crash/core.txt.last track the same core dump as info.last and vmcore.last. [mhorne: I tweaked the submission, such that the link will be created as soon as the core.txt.X file is generated; not only after a successful report has been written.] Signed-off-by: Ricardo Branco Reviewed by: mhorne MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2199 (cherry picked from commit 4dfc78e0e3bb096514455e9bb6cf63e46e84db13) --- usr.sbin/crashinfo/crashinfo.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh index 68115f09f9d4..87e5565b98e3 100755 --- a/usr.sbin/crashinfo/crashinfo.sh +++ b/usr.sbin/crashinfo/crashinfo.sh @@ -149,11 +149,13 @@ fi VMCORE=$CRASHDIR/vmcore.$DUMPNR INFO=$CRASHDIR/info.$DUMPNR FILE=$CRASHDIR/core.txt.$DUMPNR +LINK=$CRASHDIR/core.txt.last HOSTNAME=`hostname` if $BATCH; then echo "Writing crash summary to $FILE." exec > $FILE 2>&1 + ln -sf $FILE $LINK fi GDB=/usr/local/bin/gdb @@ -204,6 +206,7 @@ machine=$(gdb_command $KERNEL 'printf "%s", machine') if ! $BATCH; then echo "Writing crash summary to $FILE." exec > $FILE 2>&1 + ln -sf $FILE $LINK fi echo "$HOSTNAME dumped core - see $VMCORE" From nobody Fri Jul 10 15:28:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbMM2rnqz6lJ6S for ; Fri, 10 Jul 2026 15:28: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbMM0jlnz444c for ; Fri, 10 Jul 2026 15:28:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783697311; 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; bh=etJOu99cE7r7eytrLtcZJRSBgOQsszLvAOEmXVRbSV4=; b=BexPx4wyB/TqGPvHITACyJyCGPpScxuAi6bmTN5bFrL8C0h36hgs6qRwYhUZQQABes/98/ NFhrJLbWayLJO/nAR5Rz1XkoXPjxGWId2L12rgPf9loDJsa0ud0UgFWw5KB6k8PNiuM+yN yOv1q4gjRXQ9ldG5SwoDkpuL08ZAl25YNnnnXrMW7RZFN1xATh1hj2bm+m1XWdnYmme8nF WqwkvMb/gc6hhI/wo/x6VD/2STmTPM/fx/D0EgeYn+OdOOLpBJ8JO0VQEl3VYUEKUyWByv LL9G5RKtuZavzpwGnOfTEq3Y6ppFWzBYJHvqIsBzxZXt0TqGucV5bT299rIHqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783697311; a=rsa-sha256; cv=none; b=CKaVdL6k37G/c9NU97o06yvjjc2gMQlnKO8rk5QB/5g9DKviR2BTViSZnxu79fZz3sa+by N2/4m61y1fsApYLKFNOPUCAIKeGo9RvJ2gty8ZB+C/XnioqccA4C1m8jdtiiNJto8l4cOG LlY1n/nUjOUhyu6xtxmctXStmtBsVJcYvCT5Jo1QUc/FKfJtSxaZ0zti8u/WPHcHZABlSV /7sOkWmc/zPNEsVM8AC7mgFWv+2B05toIuV/xCEBZOrj6U4fPJEJqtZCXzEL25EkTh/BwP sjWFFB/aHf+bKzP31ICKDglHNUUOi5llZBMsmn3qI/0A+J7LNnuqiFYQnj9e3Q== 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=1783697311; 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; bh=etJOu99cE7r7eytrLtcZJRSBgOQsszLvAOEmXVRbSV4=; b=v6wTKdA7RFeAaIFpag4pu/y1lh3fvgXW4lr0YFZsrJHvQ5MC9aLDPXDhv8KezfClgphjCA 4IyzopMrDkS+HV9bqMo/IY6bClPhbRbsV6qlxKjaN/tMkN1TAlDqPS5d1D4YmgWmo9LQCC OVg3ygmeWwuMCtVT2fFzAYlZnCk9135eHN5PnVvPbmbjPcQmxOy3jLKnzEDZeKet+QvLGj WKpm34mHY1E6KvFgLULta2gAWNtgPCW+LPM2x94gfDlaiqdq5dQ7RTBwIJnI4YmSAo/omn YSKUGD8uKIFYZ98hisLfwryJtUsxNlr9bhFGLGCFbsUvM1HYmhXwcS8iehE/MA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbML6hPKz10Tq for ; Fri, 10 Jul 2026 15:28:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33b2b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:28:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kyle Crenshaw From: Mitchell Horne Subject: git: f014c3f0d7ed - stable/15 - rk_gpio: implement PIC masking methods and mask unhandled IRQs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f014c3f0d7ed8e4f126acb7455f5d53def9ad2e4 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:28:30 +0000 Message-Id: <6a510f9e.33b2b.191b7103@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f014c3f0d7ed8e4f126acb7455f5d53def9ad2e4 commit f014c3f0d7ed8e4f126acb7455f5d53def9ad2e4 Author: Kyle Crenshaw AuthorDate: 2026-05-14 21:07:42 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:28:09 +0000 rk_gpio: implement PIC masking methods and mask unhandled IRQs The Rockchip GPIO controller implements PIC operations for the INTRNG framework but is missing four masking methods that INTRNG calls during the filter/ithread handoff: pic_disable_intr, pic_enable_intr, pic_pre_ithread, pic_post_ithread. Without them, level-sensitive interrupt sources connected to a Rockchip GPIO pin re-fire continuously while their ithread runs. On a RockPro64 with a FUSB302B Type-C controller (i2c) attached to gpio1 INT_N, the system enters a ~210 kHz interrupt storm the moment the fusb302 driver attaches and INT_N goes low. Two complementary changes: 1. Add the four pic_disable_intr/pic_enable_intr/pic_pre_ithread/ pic_post_ithread method bodies. Each toggles the pin's RK_GPIO_INTMASK bit so the source is masked during the in-flight ithread window and unmasked on return, honouring the generic INTRNG mask/unmask sequence. 2. When the GPIO IRQ filter dispatches a pin and finds no consumer registered, mask the pin at the controller (INTMASK=1, INTEN=0) before continuing. Level-triggered sources keep asserting until acked, so a single stuck pin used to flood the console with thousands of "Interrupt pin=N unhandled" lines per second. The mask survives until something re-attaches and re-enables the IRQ via the standard pic_enable_intr path. Affects all level-triggered IRQs on Rockchip GPIO banks; edge- triggered IRQs were already self-acking and unaffected. Signed-off-by: Kyle Crenshaw Reviewed by: mhorne MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2197 (cherry picked from commit ccda002ca10f9fb88e65d4bc27f0676e6f97d16d) --- sys/arm64/rockchip/rk_gpio.c | 106 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 6 deletions(-) diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c index 8da37d516802..7c2071d2d178 100644 --- a/sys/arm64/rockchip/rk_gpio.c +++ b/sys/arm64/rockchip/rk_gpio.c @@ -227,8 +227,22 @@ rk_gpio_intr(void *arg) status &= ~(1 << pin); if (intr_isrc_dispatch(RK_GPIO_ISRC(sc, pin), tf)) { - device_printf(sc->sc_dev, "Interrupt pin=%d unhandled\n", - pin); + /* + * Pin asserted but no consumer is registered for it + * yet (or anymore). Level-triggered sources keep + * firing on every interrupt cycle, so a single stuck + * pin floods the console with thousands of these + * messages per second. Mask the pin's IRQ at the + * controller and disable further dispatches; if a + * consumer attaches later it will re-enable through + * pic_enable_intr / rk_gpio_pic_enable_intr. + */ + RK_GPIO_LOCK(sc); + rk_gpio_write_bit(sc, RK_GPIO_INTMASK, pin, 1); + rk_gpio_write_bit(sc, RK_GPIO_INTEN, pin, 0); + RK_GPIO_UNLOCK(sc); + device_printf(sc->sc_dev, + "Interrupt pin=%d unhandled — masked\n", pin); continue; } @@ -818,10 +832,14 @@ rk_pic_setup_intr(device_t dev, struct intr_irqsrc *isrc, return (EINVAL); } rk_gpio_write_bit(sc, RK_GPIO_DEBOUNCE, pin, 1); - rk_gpio_write_bit(sc, RK_GPIO_INTMASK, pin, 0); - rk_gpio_write_bit(sc, RK_GPIO_INTEN, pin, 1); RK_GPIO_UNLOCK(sc); + /* + * Leave the interrupt masked + disabled here. INTRNG will call + * pic_enable_intr() next to make it live. That keeps the + * masking responsibility cleanly in enable/disable rather than + * split between setup and disable. + */ return (0); } @@ -837,14 +855,86 @@ rk_pic_teardown_intr(device_t dev, struct intr_irqsrc *isrc, if (isrc->isrc_handlers == 0) { irqsrc->mode = GPIO_INTR_CONFORM; RK_GPIO_LOCK(sc); - rk_gpio_write_bit(sc, RK_GPIO_INTEN, irqsrc->irq, 0); - rk_gpio_write_bit(sc, RK_GPIO_INTMASK, irqsrc->irq, 0); + /* + * INTEN/INTMASK are already cleared by pic_disable_intr, + * which INTRNG calls before teardown of the last handler. + * We only need to undo what setup_intr configured -- here, + * the debounce filter. + */ rk_gpio_write_bit(sc, RK_GPIO_DEBOUNCE, irqsrc->irq, 0); RK_GPIO_UNLOCK(sc); } return (0); } +/* + * INTRNG calls pic_disable_intr() during teardown of the final handler + * for a source, OR when a consumer explicitly wants the source off. + * Clear INTEN so the controller will not raise this pin at all. + * + * The in-flight masking between FILTER_SCHEDULE_THREAD and ithread + * completion is handled by pic_pre_ithread() / pic_post_ithread() + * below, NOT by this method. + */ +static void +rk_pic_disable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct rk_gpio_softc *sc = device_get_softc(dev); + struct rk_pin_irqsrc *rkisrc = (struct rk_pin_irqsrc *)isrc; + + RK_GPIO_LOCK(sc); + rk_gpio_write_bit(sc, RK_GPIO_INTMASK, rkisrc->irq, 1); + rk_gpio_write_bit(sc, RK_GPIO_INTEN, rkisrc->irq, 0); + RK_GPIO_UNLOCK(sc); +} + +/* + * INTRNG calls pic_enable_intr() to make a source live for the first + * time (after setup_intr), or to re-enable after a prior + * pic_disable_intr(). Set INTEN and unmask so the controller starts + * delivering this pin. + */ +static void +rk_pic_enable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct rk_gpio_softc *sc = device_get_softc(dev); + struct rk_pin_irqsrc *rkisrc = (struct rk_pin_irqsrc *)isrc; + + RK_GPIO_LOCK(sc); + rk_gpio_write_bit(sc, RK_GPIO_INTEN, rkisrc->irq, 1); + rk_gpio_write_bit(sc, RK_GPIO_INTMASK, rkisrc->irq, 0); + RK_GPIO_UNLOCK(sc); +} + +/* + * Called by INTRNG before delivering to the ithread. Mask the source + * so it cannot re-fire during the ithread window -- without this, + * level-low IRQs (e.g. FUSB302 INT_N) re-trigger continuously and + * starve the ithread (~210 kHz storm observed via dtrace). + * Re-unmasked in pic_post_ithread() once the ithread acks the source. + */ +static void +rk_pic_pre_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct rk_gpio_softc *sc = device_get_softc(dev); + struct rk_pin_irqsrc *rkisrc = (struct rk_pin_irqsrc *)isrc; + + RK_GPIO_LOCK(sc); + rk_gpio_write_bit(sc, RK_GPIO_INTMASK, rkisrc->irq, 1); + RK_GPIO_UNLOCK(sc); +} + +static void +rk_pic_post_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct rk_gpio_softc *sc = device_get_softc(dev); + struct rk_pin_irqsrc *rkisrc = (struct rk_pin_irqsrc *)isrc; + + RK_GPIO_LOCK(sc); + rk_gpio_write_bit(sc, RK_GPIO_INTMASK, rkisrc->irq, 0); + RK_GPIO_UNLOCK(sc); +} + static device_method_t rk_gpio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, rk_gpio_probe), @@ -873,6 +963,10 @@ static device_method_t rk_gpio_methods[] = { DEVMETHOD(pic_map_intr, rk_pic_map_intr), DEVMETHOD(pic_setup_intr, rk_pic_setup_intr), DEVMETHOD(pic_teardown_intr, rk_pic_teardown_intr), + DEVMETHOD(pic_disable_intr, rk_pic_disable_intr), + DEVMETHOD(pic_enable_intr, rk_pic_enable_intr), + DEVMETHOD(pic_pre_ithread, rk_pic_pre_ithread), + DEVMETHOD(pic_post_ithread, rk_pic_post_ithread), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, rk_gpio_get_node), From nobody Fri Jul 10 15:40:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbdG6QN6z6lJjR for ; Fri, 10 Jul 2026 15:40: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbdG5jwRz46x7 for ; Fri, 10 Jul 2026 15:40:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783698034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KitIeNsRzsZ04oMUSqjleSTc4QuQTSKqFQvqtvvuLNQ=; b=IE7JxQtDKJX0XlPmyOH4jIbvoa1PiDAR2XqUC/ZGeUDFDUJ8Iq/tWxnFgCKrTTuB9fKx9r OpiLxtle5ad3557rzTohjzqa7J8x212/mo9G/BwlZJUf6z69PcWjrozEKyTGXz3rIV81CR SWwvCpigM0MCIGJr1BP/F3cvoZ040XTlshZ4UA3ERyc0Te/yBSo7bTzOJ5MoVrNIyEYFoD jgA7PViN9+oghlHdu585Acm8/UgoJpqI+3XFW8L5RA/89plML5cpCfA6644EEBxMreGPir J5vzirgRDjNgf2b6Yl9YD+aOgDyCcFnlVJ6A5jvQDAssZEwcTLMkxaM8BS+Cag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783698034; a=rsa-sha256; cv=none; b=EP7wruQQ14PF3nDsULpq5xr5wbxSiahKmJmtEf4IO1mU0Sq8VtEebU+EKeudlPdBOo6JB6 H2nPot40t00gZLBXPTbWn1N/RIkkDGBdHeQ7IXlTjHoLVEVmyebsFGQt3e/TnurmD/nRhs mk8+2j2/+lab93UkG2c0lnsgJjF18inFHWPeyNbAd5+GBVJ+ITOEPvVojN8BoWIaSFKXl3 +rH/+iqZxdF1KVZ+AN+4UICHg3m7lDoMAzJjHM23FMwKez2+AP3IFlC8Gnkh6pYYVz5xkS ByBN9NHe6cYF1zJTJ6CrmvrtsquR9lOXuxXa52q9d7/xT1ykrtMRmkzRtAbRWA== 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=1783698034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KitIeNsRzsZ04oMUSqjleSTc4QuQTSKqFQvqtvvuLNQ=; b=fPYjKKtKWYogmZBgJK2PO7JeuvaYTVvrWuBYkR+Z69lUIBbFiqUQR36APIsKuY1kl5j9Z9 JcRuvJqSh6I8JylJfVWS2UedWDwa1XuI2o55rCLNVGSMrdLybm+6LAkUSDncJBOlYHcqdO AzeHJbarViNEJ3+gTN6PGrNnOGpPJEAUIQLY+qwHRfPqz+VGBhj/4Bbes2T9SGf0yk4vCF CPeKU/pToTnGSVrc6t1QaYaL1M6DL4QAANnksH2U8bx+AGmw1qJS9xhtNWLWWhlPRQ6aVx 2hT2RkrNGHtKAxUWoGQAwr+yeDMyqpkwauydrLCPvAVgBiwmL+7M4R9v4mMeHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbdG4V3Xz11YQ for ; Fri, 10 Jul 2026 15:40:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 336fa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:40:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Chuck Tuffli Subject: git: 61c64a84d42f - stable/15 - linux: Add TCP_INFO support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chuck X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 61c64a84d42f0e43dbfb4a10f5a7213e1761142a Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:40:34 +0000 Message-Id: <6a511272.336fa.347344c6@gitrepo.freebsd.org> The branch stable/15 has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=61c64a84d42f0e43dbfb4a10f5a7213e1761142a commit 61c64a84d42f0e43dbfb4a10f5a7213e1761142a Author: Chuck Tuffli AuthorDate: 2026-06-10 00:22:49 +0000 Commit: Chuck Tuffli CommitDate: 2026-07-10 15:29:29 +0000 linux: Add TCP_INFO support Implement the getsockopt for TCP_INFO by mapping FreeBSD's version to what Linux expects. (cherry picked from commit 925ca9b8355d10a0dc85175dc865095c9b3370c4) --- sys/compat/linux/linux_socket.c | 47 +++++++++++++++++++-- sys/compat/linux/linux_socket.h | 92 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 615ef12ec201..56c44039420e 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -589,9 +589,7 @@ linux_to_bsd_tcp_sockopt(int opt) case LINUX_TCP_KEEPCNT: return (TCP_KEEPCNT); case LINUX_TCP_INFO: - LINUX_RATELIMIT_MSG_OPT1( - "unsupported TCP socket option TCP_INFO (%d)", opt); - return (-2); + return (TCP_INFO); case LINUX_TCP_MD5SIG: return (TCP_MD5SIG); } @@ -2259,6 +2257,42 @@ linux_getsockopt_so_linger(struct thread *td, return (linux_sockopt_copyout(td, &ling, len, args)); } +static int +linux_getsockopt_tcp_info(struct thread *td, + struct linux_getsockopt_args *args) +{ + struct tcp_info tinfo; + struct l_tcp_info l_tinfo; + socklen_t len; + int error; + + len = sizeof(tinfo); + error = kern_getsockopt(td, args->s, IPPROTO_TCP, TCP_INFO, &tinfo, + UIO_SYSSPACE, &len); + if (error != 0) + return (error); + memset(&l_tinfo, 0, sizeof(l_tinfo)); + l_tinfo.tcpi_state = tinfo.tcpi_state; + l_tinfo.tcpi_options = tinfo.tcpi_options; + l_tinfo.tcpi_snd_wscale = tinfo.tcpi_snd_wscale; + l_tinfo.tcpi_rcv_wscale = tinfo.tcpi_rcv_wscale; + l_tinfo.tcpi_rto = tinfo.tcpi_rto; + l_tinfo.tcpi_snd_mss = tinfo.tcpi_snd_mss; + l_tinfo.tcpi_rcv_mss = tinfo.tcpi_rcv_mss; + l_tinfo.tcpi_last_data_recv = tinfo.tcpi_last_data_recv; + l_tinfo.tcpi_rtt = tinfo.tcpi_rtt; + l_tinfo.tcpi_rttvar = tinfo.tcpi_rttvar; + l_tinfo.tcpi_snd_ssthresh = tinfo.tcpi_snd_ssthresh; + l_tinfo.tcpi_snd_cwnd = tinfo.tcpi_snd_cwnd; + l_tinfo.tcpi_rcv_space = tinfo.tcpi_rcv_space; + l_tinfo.tcpi_snd_wnd = tinfo.tcpi_snd_wnd; + l_tinfo.tcpi_rcv_ooopack = tinfo.tcpi_rcv_ooopack; + /* Eqivalent */ + l_tinfo.tcpi_total_retrans = tinfo.tcpi_snd_rexmitpack; + + return (linux_sockopt_copyout(td, &l_tinfo, len, args)); +} + int linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args) { @@ -2355,6 +2389,13 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args) name = linux_to_bsd_ip6_sockopt(args->optname); break; case IPPROTO_TCP: + switch (args->optname) { + case LINUX_TCP_INFO: + return (linux_getsockopt_tcp_info(td, args)); + /* NOTREACHED */ + default: + break; + } name = linux_to_bsd_tcp_sockopt(args->optname); break; default: diff --git a/sys/compat/linux/linux_socket.h b/sys/compat/linux/linux_socket.h index 68176c3cc401..f69ed90bd584 100644 --- a/sys/compat/linux/linux_socket.h +++ b/sys/compat/linux/linux_socket.h @@ -356,6 +356,98 @@ struct l_ifreq { } ifr_ifru; }; +/* + * Linux TCP_INFO structure as of v6.19.8 + * + * Comments indicate last field for the given kernel version + */ +struct l_tcp_info { + uint8_t tcpi_state; + uint8_t tcpi_ca_state; + uint8_t tcpi_retransmits; + uint8_t tcpi_probes; + uint8_t tcpi_backoff; + uint8_t tcpi_options; + uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; + uint8_t tcpi_delivery_rate_app_limited:1, tcpi_fastopen_client_fail:2; + + uint32_t tcpi_rto; + uint32_t tcpi_ato; + uint32_t tcpi_snd_mss; + uint32_t tcpi_rcv_mss; + + uint32_t tcpi_unacked; + uint32_t tcpi_sacked; + uint32_t tcpi_lost; + uint32_t tcpi_retrans; + uint32_t tcpi_fackets; + + uint32_t tcpi_last_data_sent; + uint32_t tcpi_last_ack_sent; + uint32_t tcpi_last_data_recv; + uint32_t tcpi_last_ack_recv; + + uint32_t tcpi_pmtu; + uint32_t tcpi_rcv_ssthresh; + uint32_t tcpi_rtt; + uint32_t tcpi_rttvar; + uint32_t tcpi_snd_ssthresh; + uint32_t tcpi_snd_cwnd; + uint32_t tcpi_advmss; + uint32_t tcpi_reordering; + + uint32_t tcpi_rcv_rtt; + uint32_t tcpi_rcv_space; + + uint32_t tcpi_total_retrans; /* v3.6 */ + + uint64_t tcpi_pacing_rate; + uint64_t tcpi_max_pacing_rate; /* v3.14 */ + uint64_t tcpi_bytes_acked; + uint64_t tcpi_bytes_received; + uint32_t tcpi_segs_out; + uint32_t tcpi_segs_in; /* v4.1 */ + + uint32_t tcpi_notsent_bytes; + uint32_t tcpi_min_rtt; + uint32_t tcpi_data_segs_in; + uint32_t tcpi_data_segs_out; /* v4.5 */ + + uint64_t tcpi_delivery_rate; /* v4.8 */ + + uint64_t tcpi_busy_time; + uint64_t tcpi_rwnd_limited; + uint64_t tcpi_sndbuf_limited; /* v4.9 */ + + uint32_t tcpi_delivered; + uint32_t tcpi_delivered_ce; /* v4.16 */ + + uint64_t tcpi_bytes_sent; + uint64_t tcpi_bytes_retrans; + uint32_t tcpi_dsack_dups; + uint32_t tcpi_reord_seen; /* v4.18 */ + + uint32_t tcpi_rcv_ooopack; + + uint32_t tcpi_snd_wnd; /* v5.3 */ + uint32_t tcpi_rcv_wnd; + + uint32_t tcpi_rehash; /* v6.1 */ + + uint16_t tcpi_total_rto; + uint16_t tcpi_total_rto_recoveries; + uint32_t tcpi_total_rto_time; /* v6.6 */ + uint32_t tcpi_received_ce; + uint32_t tcpi_delivered_e1_bytes; + uint32_t tcpi_delivered_e0_bytes; + uint32_t tcpi_delivered_ce_bytes; + uint32_t tcpi_received_e1_bytes; + uint32_t tcpi_received_e0_bytes; + uint32_t tcpi_received_ce_bytes; + uint16_t tcpi_accecn_fail_mode; + uint16_t tcpi_accecn_opt_seen; /* v6.17 */ +}; + /* * Define here members which are not exists in the FreeBSD struct ifreq. */ From nobody Fri Jul 10 15:43:45 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbhy1XH2z6lK0k for ; Fri, 10 Jul 2026 15:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbhy0X5Nz488f for ; Fri, 10 Jul 2026 15:43:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783698226; 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; bh=WqoB8EYYiwqCNd0UKcjerJLx4cGkzx2p9Wznazz6Tb4=; b=JUa2ssaNOaLqK/QqganeBPK4esiO9w86rynZNgfzI16SA2bPhlPDeHbAFhrenB7eWcGFeM dJglrJwvRKxcClsru/8BKDQgzvWUCPozm6jReLl9sUQzxbLUlYxDhqk1cbI3klad7oGSQY vXt7icSVGwzvNzuUaHEyawXWRLi+NldW8z/PnGXmtQTyl3G955IQGdV4Dkt7wfMe8ohyre PwXBSNG4QTGQp6YIwrQI13stFqN04+MrhGMPJO9XFSq0IeOq0gfe9i80DgZdIAVD86I4yD tCP0cqyJMS5X/VnTe/NWQKDPG02c4p9Lbi/n8DHhOqRiaaJa7U07MCOI3iMAlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783698226; a=rsa-sha256; cv=none; b=oXUfzKX4PM2qAqJO5hxbQOZUlUQGeuzHF8bATv6RhvnjCkhGMipI2HEEiuqtiPBXQYxGcf 9VlrLI8Jb3wbBPwhU4BCWmF2AQGHy4lDAcLgUCLOq+N5wkDQrNNoLiH9O1zhF7E03PDzYS SUpb3PKR/BqLUj7ImaQpbFBHNudcndFg8M2EnAdU23l6zDEYCQkei+Hw5wt5R1NwrL/ztq jjAlRyUyqhw+nT1GcAwcB1xAaHVcWezi70wziXe5JKmH2lwZ7XiarPuNKPg13hZKkCy/OI hnEHDjwP4aPRtLHha298a+X85agXdrK8auYMkv3LRt3CVPDRE1mGC9Fx9D4UiQ== 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=1783698226; 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; bh=WqoB8EYYiwqCNd0UKcjerJLx4cGkzx2p9Wznazz6Tb4=; b=Jg9O4U3v6ibP+02JYbmmbpXqlEMiB0G5JfG/58lq17NBaX3mhPsR1NXRBdsjqqyln5HkC4 ESh4hrA2bLSFV7LhzkjyynDeULtexfBnG+RO+0m0X/4s+tVkLPPzeJmWNJyEjVbZyWDxe9 cwQKwN2mj2G1Q8dI6QhTGErq8Z0tfBN93unKm+0rolECPrpWePPcLvrIPIRy3scx9v6vp9 UjUMUIiQmMj1bHmAOnSkxtSkyCR8e3dLRtjfDIV+qnO0KyO4VgMIZGbdsDRiCKRMxpKbVU 9Fx6bv0/d211v2cfJE4uCmmdRuy0Hadz7wJx69MREwZOK25aJjPychQg0bcd+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbhx6YW7z11RG for ; Fri, 10 Jul 2026 15:43:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3611d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:43:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Michal Meloun From: Mitchell Horne Subject: git: 17d7b3d6af94 - stable/15 - arm: Implement kernel ifunc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 17d7b3d6af94d22ac30312b26672fa0fd01dfd1c Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:43:45 +0000 Message-Id: <6a511331.3611d.2fe596c8@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=17d7b3d6af94d22ac30312b26672fa0fd01dfd1c commit 17d7b3d6af94d22ac30312b26672fa0fd01dfd1c Author: Michal Meloun AuthorDate: 2026-01-24 10:41:10 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:43:32 +0000 arm: Implement kernel ifunc Add kernel ifunc support on arm. MFC after : 3 weeks Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D54970 (cherry picked from commit d78cbf483fe73c987573967042f57f15bf590629) --- sys/arm/arm/elf_machdep.c | 8 +++++++- sys/arm/arm/machdep.c | 5 ++--- sys/arm/include/ifunc.h | 24 +++++++++++++++++++++--- sys/conf/kern.pre.mk | 5 ++--- sys/kern/link_elf.c | 2 +- sys/sys/elf_common.h | 1 + 6 files changed, 34 insertions(+), 11 deletions(-) diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index 881c4fcff475..cf2add0c367c 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -150,7 +150,7 @@ bool elf_is_ifunc_reloc(Elf_Size r_info __unused) { - return (false); + return (ELF_R_TYPE(r_info) == R_ARM_IRELATIVE); } /* @@ -253,6 +253,12 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, case R_ARM_RELATIVE: break; + case R_ARM_IRELATIVE: + addr = relocbase + addend; + addr = ((Elf_Addr (*)(void))addr)(); + if (*where != addr) + *where = addr; + break; default: printf("kldload: unexpected relocation type %d, " "symbol index %d\n", rtype, symidx); diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index d51b4f10fe6b..8138de7a0499 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -445,6 +445,8 @@ initarm(struct arm_boot_params *abp) set_cpufuncs(); cpuinfo_init(); + sched_instance_select(); + link_elf_ireloc(); /* * Find the dtb passed in by the boot loader. @@ -521,9 +523,6 @@ initarm(struct arm_boot_params *abp) /* Do basic tuning, hz etc */ init_param1(); - sched_instance_select(); - /* link_elf_ireloc(); */ - /* * Allocate a page for the system page mapped to 0xffff0000 * This page will just contain the system vectors and can be diff --git a/sys/arm/include/ifunc.h b/sys/arm/include/ifunc.h index 6b7cf20c720f..98cc354ae6ca 100644 --- a/sys/arm/include/ifunc.h +++ b/sys/arm/include/ifunc.h @@ -1,10 +1,28 @@ -/* - * This file is in the public domain. +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025, Michal Meloun + * */ #ifndef __ARM_IFUNC_H #define __ARM_IFUNC_H -#define __DO_NOT_HAVE_SYS_IFUNCS 1 +#define DEFINE_IFUNC(qual, ret_type, name, args) \ + static ret_type (*name##_resolver(void))args __used; \ + qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \ + static ret_type (*name##_resolver(void))args + +#ifdef __not_yet__ +#define DEFINE_UIFUNC(qual, ret_type, name, args) \ + static ret_type (*name##_resolver(uint32_t, uint32_t, uint32_t, \ + uint32_t))args __used; \ + qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \ + static ret_type (*name##_resolver( \ + uint32_t elf_hwcap __unused, \ + uint32_t elf_hwcap2 __unused, \ + uint32_t arg3 __unused, \ + uint32_t arg4 __unused))args +#endif #endif diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 5bbd1ec70cd3..455e91f957e7 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -118,11 +118,10 @@ CFLAGS+= ${CONF_CFLAGS} LDFLAGS+= --build-id=sha1 .endif -.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "i386" || ${MACHINE} == "powerpc") && \ +.if ${MACHINE_CPUARCH} != "riscv" && \ defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" && \ !make(install) -.error amd64/arm64/i386/ppc* kernel requires linker ifunc support +.error amd64/arm/arm64/i386/ppc* kernel requires linker ifunc support .endif .if ${MACHINE_CPUARCH} == "amd64" LDFLAGS+= -z max-page-size=2097152 diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 45edd186e6ce..2a9e2a02709d 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -2041,7 +2041,7 @@ link_elf_propagate_vnets(linker_file_t lf) } #endif -#if defined(__i386__) || defined(__amd64__) || defined(__aarch64__) || defined(__powerpc__) +#if !defined(__riscv) /* * Use this lookup routine when performing relocations early during boot. * The generic lookup routine depends on kobj, which is not initialized diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index aa06e4af90f5..66da13005aed 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -1149,6 +1149,7 @@ typedef struct { #define R_ARM_THM_JUMP19 51 #define R_ARM_GNU_VTENTRY 100 #define R_ARM_GNU_VTINHERIT 101 +#define R_ARM_IRELATIVE 160 #define R_ARM_RSBREL32 250 #define R_ARM_THM_RPC22 251 #define R_ARM_RREL32 252 From nobody Fri Jul 10 15:43:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbhz2HYpz6lKDb for ; Fri, 10 Jul 2026 15:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbhz1KyYz47kF for ; Fri, 10 Jul 2026 15:43:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783698227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T0Uza98OfsW67VxjzvvjAY68Yoti8SfUJ4o120I9IaA=; b=N9hiIxgi1dltapfurYhITH82Lb5lKOWIAImpsDPK2BM0XTM/RZA6gczHzNfwY7tUyk7PqA FwdE+lM3++9Rrz/ONFPFyfy68vnLKVT33qXMeO6FaZblgwUK/l1Xcm/PLW3lt/3P7MRf2A VYb7xEBlqT/NoyHEHS1kYbUckRWGiQWBbHSGPkB8nGZ4dyNddIgJ7bjuPrjtLsunV1XefR eiDGJ2WWFZLa2GsXzFXCYcP+j1hxnIUsv7ut58nKyXJdA07tbowcAYUVHvEIh2/wNQrVYE eUEPLmLtM6ohhq5qhPIs1cv1Z0k22sTcw/NjrAxKAivxtELvT1tQuT6Ck2N4mQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783698227; a=rsa-sha256; cv=none; b=rx86kyUl8Bc0yRzjY+G5n7DEJ5rwAFy2M8zcQRCfuW1LGCzP2lwoMxWYWugR2h4PwCp4c7 nfLpJh6ljA80OG3e3M34nX9AjFA5pzCUd6N5eh4PEr7Nr4UOyL8HzHGq2fQ1q4UMDsUIMI Fh5QMp4r0msa3GtWZ5E7cejnjDgd88eStZ7/RpDYxD1JRNDJeirbQ0+tiYyqas5h06DZay x9u/RqMBFtoIHn5eIZ038Hj+T1Kj/tf+VC2ojuuoQfBb1cBH4G48b3ih3iP711OrA9pR87 TjxSUpxI0qaJOZnNIjoy5losA3nxvrw3kwLR0GdOZqVHIZ8mNaEXYFTJuBSXUQ== 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=1783698227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T0Uza98OfsW67VxjzvvjAY68Yoti8SfUJ4o120I9IaA=; b=Pe5lzNffClOsddF9Au/ZtYCuBpG+EjZKEE76WO/0J4y2RAUUHFgOw4BfCBLnQETNtx3xiZ Mj1cZUbWh8K8yBUJQySd9QBoltfcZXs1sHx+iqyT2d/WiYSZdN/5P8vWWF56QDY4r47tfa PwKumEKJQRBCEUbp5nbIbkShfZwA/WZu6BPjBQFnwDgq6Pg9qPzsFag+Lw2rqZ3Q3ok80u ojB5o7xAlUr7i1LxduFESNIEzdSo5hWX/Z61CAS4fL4IRGbQ6Pg2yCrX/YiPC5lNNrObd9 1jQ4JXhbez3bGElc4Z1nkhIkRHohivlgWtSqXme/L11/nxLS9cF1tfFuIvnQqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbhy6xk5z120m for ; Fri, 10 Jul 2026 15:43:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 333ed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:43:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 08b56f2b173f - stable/15 - riscv: implement kernel ifunc resolution List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 08b56f2b173f20b546056165472eaa075a56cd3d Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:43:46 +0000 Message-Id: <6a511332.333ed.70552058@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=08b56f2b173f20b546056165472eaa075a56cd3d commit 08b56f2b173f20b546056165472eaa075a56cd3d Author: Mitchell Horne AuthorDate: 2026-02-05 16:11:25 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:43:32 +0000 riscv: implement kernel ifunc resolution This completes the set of architectures implementing this feature. Move the calls to sched_instance_select() and link_elf_ireloc() later in initriscv(), after identify_cpu(0). There will be more information available to any resolver functions at this time. Reviewed by: imp, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55082 (cherry picked from commit cf41d1113377c44be5aad20c2f7ff2c5324ca89f) --- sys/conf/kern.pre.mk | 5 ++--- sys/kern/link_elf.c | 2 -- sys/riscv/include/ifunc.h | 2 -- sys/riscv/riscv/elf_machdep.c | 11 ++++++++--- sys/riscv/riscv/machdep.c | 6 ++++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 455e91f957e7..9a343e5e338c 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -118,10 +118,9 @@ CFLAGS+= ${CONF_CFLAGS} LDFLAGS+= --build-id=sha1 .endif -.if ${MACHINE_CPUARCH} != "riscv" && \ - defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" && \ +.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" && \ !make(install) -.error amd64/arm/arm64/i386/ppc* kernel requires linker ifunc support +.error kernel requires linker ifunc support .endif .if ${MACHINE_CPUARCH} == "amd64" LDFLAGS+= -z max-page-size=2097152 diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 2a9e2a02709d..4c77f444d961 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -2041,7 +2041,6 @@ link_elf_propagate_vnets(linker_file_t lf) } #endif -#if !defined(__riscv) /* * Use this lookup routine when performing relocations early during boot. * The generic lookup routine depends on kobj, which is not initialized @@ -2104,4 +2103,3 @@ link_elf_late_ireloc(void) relocate_file1(ef, elf_lookup_ifunc, elf_reloc_late, true); } #endif -#endif diff --git a/sys/riscv/include/ifunc.h b/sys/riscv/include/ifunc.h index 0d91014ccce8..0f9747a2aa14 100644 --- a/sys/riscv/include/ifunc.h +++ b/sys/riscv/include/ifunc.h @@ -30,8 +30,6 @@ #ifndef __RISCV_IFUNC_H #define __RISCV_IFUNC_H -#define __DO_NOT_HAVE_SYS_IFUNCS 1 - #define DEFINE_IFUNC(qual, ret_type, name, args) \ static ret_type (*name##_resolver(void))args __used; \ qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \ diff --git a/sys/riscv/riscv/elf_machdep.c b/sys/riscv/riscv/elf_machdep.c index 5bd4af4c15f8..b52050e56a14 100644 --- a/sys/riscv/riscv/elf_machdep.c +++ b/sys/riscv/riscv/elf_machdep.c @@ -271,10 +271,10 @@ reloctype_to_str(int type) } bool -elf_is_ifunc_reloc(Elf_Size r_info __unused) +elf_is_ifunc_reloc(Elf_Size r_info) { - return (false); + return (ELF_R_TYPE(r_info) == R_RISCV_IRELATIVE); } /* @@ -501,7 +501,12 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, (local ? 'l' : 'g'), reloctype_to_str(rtype), before32, *insn32p); break; - + case R_RISCV_IRELATIVE: + addr = relocbase + addend; + val = ((Elf64_Addr (*)(void))addr)(); + if (*where != val) + *where = val; + break; default: printf("kldload: unexpected relocation type %ld, " "symbol index %ld\n", rtype, symidx); diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 366cf1d5703f..3f454bdb1c8f 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -479,8 +479,6 @@ parse_metadata(void) /* Initialize preload_kmdp */ preload_initkmdp(true); - sched_instance_select(); - /* link_elf_ireloc(); */ /* Read the boot metadata */ boothowto = MD_FETCH(preload_kmdp, MODINFOMD_HOWTO, int); @@ -626,6 +624,10 @@ initriscv(struct riscv_bootparams *rvbp) */ identify_cpu(0); + sched_instance_select(); + + link_elf_ireloc(); + /* Do basic tuning, hz etc */ init_param1(); From nobody Fri Jul 10 15:43:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbj04qYzz6lK52 for ; Fri, 10 Jul 2026 15:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbj02Skpz48Gm for ; Fri, 10 Jul 2026 15:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783698228; 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; bh=zL0pidY3wBy7W8Wyvlm6U54mWreqlne6OGJEPd5N5jY=; b=cg6Iv1TSmNJxFvdFIilvedu5mKR+oEYLd7cWkoCG6bWE3QILil0RwJ8lnrjdLjIUal5suf E2GLrCaF6XmUaV4c/vwgJYoUfPFDaMLtbGGgUdCSl+Rx9CmAojOrHQb5RUek7pftTDH/di 81qDw9VPShhXzIaEXfVrrR8iee3sAiL93SP4+ANhvjlSuQIie849h+7FMzWuFh2ecl3Ouc /2fDoYmCRacGpfoE2IBhy7HbrlW5DhELBO+YmAD+OsVVSH4LBkLuATnBnuyjz9oaWD278G a6Aobi9hjTJX9iQOgcQ+0KjkBn8OskppqTkr81daGIOuMQL1N+qYpS2lYv0MoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783698228; a=rsa-sha256; cv=none; b=tK+aDlz605Y9KlWznqMAz7WJjCJn28O1rR9UFTc++jdqdnNKGQJqBXOb8bMo3bYLqHePFA Q88Au0CUOfTCSvpS7DyuZfSYWnWejgtitYQ8EVMiiDc11D7z64H04f6DbhspbYHh51tNxU mC7XyCKrBFwzuofaH5kkm/1gQO8yBbZR5IvTY3pQ20AOP34GmlMxlgvLnxgyTacxXPZR4K lLNqvDYE3udRPgtT1Hrb9Aux+QSv37wbDpLDEM3NCDfRK4Tem1rgqRrxvB4N85H0WsOdNB rW4qUUMFEwr68xywSalPkRN27a1UdLEKWYK8zt0UVKYWAnXCID8Rls0GJKzWkA== 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=1783698228; 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; bh=zL0pidY3wBy7W8Wyvlm6U54mWreqlne6OGJEPd5N5jY=; b=uo88DeHa7xfZG6kb2K3jzIYFOWBIRbvSEFGybFQe6FvGHbmNUAvAOyjemTO4mnkoLHbclp TCodB9rXxYmntj+7y5zKeCd0Q3LJBx6T0e1ol0DNEA51OLoNFMVG7VbTFIfeXsZtVwwdgd XeO+FOA/WdL55iAcb0klEVyWpsAGcTW9eRp0STOFUkPcS2Gj4QpzVD4Vnow3EcSkicEbGM 2StrTUq0ySG8KexFUbBTJKh4FJk30rRELz/oCspVv1aEEdFCOgUzvq4OQCvI0qJ8MI/pEU oi6gntE+J8hQY5sYB+MzIkUbbxZlblSWwyd3c3JIdZ29llH1TOTOiWMT8JY/Rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbj00jQwz120n for ; Fri, 10 Jul 2026 15:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36407 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:43:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ed Maste From: Mitchell Horne Subject: git: 4fde25a4b239 - stable/15 - build: Stop testing LINKER_FEATURES for ifunc and build-id List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4fde25a4b2393858177913fd695778bbb9e94293 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:43:48 +0000 Message-Id: <6a511334.36407.472f66a@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4fde25a4b2393858177913fd695778bbb9e94293 commit 4fde25a4b2393858177913fd695778bbb9e94293 Author: Ed Maste AuthorDate: 2026-03-05 19:09:19 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:43:32 +0000 build: Stop testing LINKER_FEATURES for ifunc and build-id These features are available in all supported linkers, and we can expect that they'll be supported by any GNU-compatible linker that we'd use to link FreeBSD. Reviewed by: imp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55676 (cherry picked from commit 96294c22f7e54a48df44c86a4ee5848e71ac4470) --- lib/libc/Makefile | 6 ------ stand/i386/Makefile.inc | 2 -- sys/conf/kern.pre.mk | 6 ------ sys/conf/kmod.mk | 2 -- 4 files changed, 16 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 56818e07aa96..fd546dfcef61 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -190,12 +190,6 @@ SUBDIR.${MK_TESTS}+= tests .include -.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \ - ${.TARGETS:Mall} == all && \ - defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" -.error ${LIBC_ARCH} libc requires linker ifunc support -.endif - .if !defined(_SKIP_BUILD) # We need libutil.h, get it directly to avoid # recording a build dependency diff --git a/stand/i386/Makefile.inc b/stand/i386/Makefile.inc index 324c211420ae..bd4b893df0ac 100644 --- a/stand/i386/Makefile.inc +++ b/stand/i386/Makefile.inc @@ -23,9 +23,7 @@ CFLAGS+= -I${BTXLIB} LDSCRIPT= ${BOOTSRC}/i386/boot.ldscript LDFLAGS_ORG= -Wl,--defsym,ORG=${ORG},-T,${LDSCRIPT} LDFLAGS_BIN= -e start ${LDFLAGS_ORG} -Wl,-N,-S,--oformat,binary -.if ${LINKER_FEATURES:Mbuild-id} != "" LDFLAGS_BIN+= -Wl,--build-id=none -.endif LD_FLAGS_BIN= -static -N --gc-sections .if ${MACHINE_CPUARCH} == "amd64" diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 9a343e5e338c..73551f56f8b8 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -114,14 +114,8 @@ CFLAGS+= ${GCOV_CFLAGS} # the others. CFLAGS+= ${CONF_CFLAGS} -.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} LDFLAGS+= --build-id=sha1 -.endif -.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" && \ - !make(install) -.error kernel requires linker ifunc support -.endif .if ${MACHINE_CPUARCH} == "amd64" LDFLAGS+= -z max-page-size=2097152 .if ${LINKER_TYPE} != "lld" diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index b466dca4f0e4..4bc69b95a25c 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -158,9 +158,7 @@ LDFLAGS+= -d .endif LDFLAGS+= -warn-common -.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} LDFLAGS+= --build-id=sha1 -.endif CFLAGS+= ${DEBUG_FLAGS} .if ${MACHINE_CPUARCH} == aarch64 || ${MACHINE_CPUARCH} == amd64 || \ From nobody Fri Jul 10 15:43:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbj15sz1z6lKDj for ; Fri, 10 Jul 2026 15:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbj12rR1z48Bn for ; Fri, 10 Jul 2026 15:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783698229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5W9LmeKtJRtYwDCOhnn/lF7VadHybflMuQujWBT3geg=; b=mflv7XG9jx5Xksf10eny9RkFBE47YQLLj+tWV+YEKFnfOSa0O/fyNxfM298IfFCgDFzkrA oAqnkBicDGlyXz/LEMmmyf2q4wtzhzLvKsXZs/vjEICAKhqD+tOmQZihbHahZ5XuUzUK/s 2lbMp6npl6UzLvQEMz0vbBSzsVgGcgERVIPsz35UWL3STnubuwqmiP2QNX+VcSVr2B6f/o 5efWwWaHVrZMHrOPsbZ1jTdDAYJaowxdtBu1kTUyNu7dULXvUaOrmzELsNzgUE3xmhJUuB ZMuIJpFeZvoqFsPKb7zZk40CH6zyI0z+iRqsgxp77aY11TCEYA3eOTn0PPiNgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783698229; a=rsa-sha256; cv=none; b=RVKNv4ehDblc7fMZeA7ZP/C/yJ+5v0V6tOZt6yahYPVVH9RMmGy70NtVejJDToCjAaBzKU EA00dfSaSdxDi234MkagEa/m0VAfs011B+FpBTF0qHXCpucibiR6MnAbz38gHv5TS3kDx7 wG+2DVHJoimlXqsu/ayaSVhCWR5NRfs1MgTdBqbWyIjLYErBDegFEuxw9GDiypu+pL57dv euMZNXKNuNN1q7nLiSx0eQPrcNl2rsqLWadxoCt2DUa9bAFI2ZwV2bMh7And/Ml5LYYQVu degh5gKAO1v/DY87zo7aZ7nxkm9uBsWI63VL823OZVn12Tl7wXS/D1IR/mVe8g== 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=1783698229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5W9LmeKtJRtYwDCOhnn/lF7VadHybflMuQujWBT3geg=; b=DzfOBfZ8a0qL/cEtMmN5lAbjvripparsGBflvI2w9mlCQTfgpwzOecCeVk9UlkWPsLMcev MKr4s9NiyMvcSmPsEGgSckTNShMPz8z7vywfi+xBG3nbUQKtbpqfIRVXQpwUR3cJq/okfy qt6yVvPYNALW1cyDlYM+ULmq+zKI38HCVMjvQvcLULlr/qUKBn0NF97f8u5FJBGvkCFFRY LNxCqnIppnYmrStAFfVAiC7c0EqTmq5OBhIdwwf4j1ApqDoYIVkXekD5djk5rrrGiCNgUb Eg4ntShPojSDgA5UbFcDhDODqnU8hHmSDMAfvArL9P/P0CFX8rasftyeK8BBsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbj11SzMz11r5 for ; Fri, 10 Jul 2026 15:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 333f1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:43:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 7be4e2826bf8 - stable/15 - sched_shim: Drop the no-ifunc case List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7be4e2826bf8c2535daaf58d8e6e5de950f0abe2 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:43:49 +0000 Message-Id: <6a511335.333f1.f1eefb1@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7be4e2826bf8c2535daaf58d8e6e5de950f0abe2 commit 7be4e2826bf8c2535daaf58d8e6e5de950f0abe2 Author: Mitchell Horne AuthorDate: 2026-02-05 16:12:03 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:43:32 +0000 sched_shim: Drop the no-ifunc case Now all architectures support kernel ifunc resolvers. Therefore, the alternate implementation can be removed. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55114 (cherry picked from commit 0d3652f67d246348e2c017205c6782caf4484449) --- sys/kern/sched_shim.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/kern/sched_shim.c b/sys/kern/sched_shim.c index 83e4412494d3..2b1dcecda433 100644 --- a/sys/kern/sched_shim.c +++ b/sys/kern/sched_shim.c @@ -22,20 +22,12 @@ const struct sched_instance *active_sched; -#ifndef __DO_NOT_HAVE_SYS_IFUNCS -#define __DEFINE_SHIM(__m, __r, __n, __p, __a) \ - DEFINE_IFUNC(, __r, __n, __p) \ - { \ - return (active_sched->__m); \ - } -#else #define __DEFINE_SHIM(__m, __r, __n, __p, __a) \ __r \ __n __p \ { \ return (active_sched->__m __a); \ } -#endif #define DEFINE_SHIM0(__m, __r, __n) \ __DEFINE_SHIM(__m, __r, __n, (void), ()) #define DEFINE_SHIM1(__m, __r, __n, __t1, __a1) \ From nobody Fri Jul 10 15:43:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbj31Ry9z6lKDl for ; Fri, 10 Jul 2026 15:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbj23nVdz48R5 for ; Fri, 10 Jul 2026 15:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783698230; 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; bh=FqIN0mnGnuuhab0UBPAFVuiCi/K2c8J0sMJYWlwHDkg=; b=dVh6WfH6P7cA4QtqkMqDkwEraiV5telDKl8BnErdWqa5oGJmSjV6vJw+yJUKWZgbXzxEso erUa/Qo0Zo9eduijC2ZTw3kDv5vEFcfl9oaVsVJyOyapES+ZFzT3mxaypU7cGzUddH0I+g W4cI07Cuf1peyMpnBAkZih0DhGfCmPC9wVrmoEZ1F17PWgB0SZnushzQIgN9AEEFVheLRI GWxMTau0KohOhvx7dF0K2PrD0j6+MODcSRgx0TeimWijrAXShxWtpEnzBD7YyGxNq9qedM HHkZTATWbcYRk5r7zGdtl7uKuRAikzdA2dVkz21hjqlPoFuxFU3scakTAkcs1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783698230; a=rsa-sha256; cv=none; b=vhsBbp9NCNsGN5ArswaA55yaWJ4KDNWQ4wPmzyzWkZRqQQiMdvpZZo1HDsRvfUFKap410P eyWJInjtfhKawygwgIOXeqxAgVvSTvqjZtzvpr7LAdpNCNG2PkjwKRc5Eo7jEmE11f8fK5 H5SRksYvftY/YqP6nlR5Vvw01GYBFMG8dVCi/IAqkXU+wFZO3kKCZR/I5z17LJdk0mXXvW RB5osYwKJZG5zxUZnpGurpR2kKNBlE9/A/2ckSR6hl/QXWtgWmJKIvLP1VUxj7ZJ00YK34 QaPmw4/8LzPtAt/pMZsIM8VDoQs+AIEDySiu0JiNNertntHl6jJvnAMEg1+K3w== 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=1783698230; 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; bh=FqIN0mnGnuuhab0UBPAFVuiCi/K2c8J0sMJYWlwHDkg=; b=Z5vBQJFwl1/N3iuHi7ASqn4V/OJVBEFAb32BRxoiyhdozwE8MlphVlLzezZrqv5gSBzQfv EgH3CLBkyl7nG0Zdk1RHW3BfTyAUhwhwWnJ3JhSJ6gsqmZD7V3HnSqEE1qc3T5WjVCoRNM rVUPaGvrfasofphV8dl08sNLQ6zhloIhauxD3WnkLcrqg4CkrKPIoT6on/FEws6WgzKZey 1q3NGHXsq7boOgWF3dmtMQIbI7FOYiJ8pODjxXPPAUD+KGURJbALDxOojpK3sbrShzFl+5 GcMEBiCg5wXHApSI9F8kLVd9c8ed6+00qqwr4b1J5RBRBlqBiRO9xVIx1m6Wjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbj22Gg1z11jX for ; Fri, 10 Jul 2026 15:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36f17 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:43:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Konstantin Belousov From: Mitchell Horne Subject: git: fb6c19bcba0c - stable/15 - kern/sched_shims.c: back to ifunc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fb6c19bcba0cd1603290a5ac000a35c7bcc28488 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:43:50 +0000 Message-Id: <6a511336.36f17.71925bfb@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=fb6c19bcba0cd1603290a5ac000a35c7bcc28488 commit fb6c19bcba0cd1603290a5ac000a35c7bcc28488 Author: Konstantin Belousov AuthorDate: 2026-02-24 15:36:26 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:43:32 +0000 kern/sched_shims.c: back to ifunc Reported by: kevans Reviewed by: kevans, mhorne Fixes: 0d3652f67d246348e2c017205c6782caf4484449 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differrential revision: https://reviews.freebsd.org/D55490 (cherry picked from commit ef1218add1d3d2baca9d3b8bcfb57e05ef6fc503) --- sys/kern/sched_shim.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/sched_shim.c b/sys/kern/sched_shim.c index 2b1dcecda433..6f0473084704 100644 --- a/sys/kern/sched_shim.c +++ b/sys/kern/sched_shim.c @@ -23,10 +23,9 @@ const struct sched_instance *active_sched; #define __DEFINE_SHIM(__m, __r, __n, __p, __a) \ - __r \ - __n __p \ + DEFINE_IFUNC(, __r, __n, __p) \ { \ - return (active_sched->__m __a); \ + return (active_sched->__m); \ } #define DEFINE_SHIM0(__m, __r, __n) \ __DEFINE_SHIM(__m, __r, __n, (void), ()) From nobody Fri Jul 10 15:43:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxbj41lJWz6lK3b for ; Fri, 10 Jul 2026 15:43: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxbj34Dbnz48Qc for ; Fri, 10 Jul 2026 15:43:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783698231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w4sHIqhB9sLzgApPr2NecihaI+SCQNdDXBlV6A/2q8c=; b=JH7N5dHqsV8cjX2ihPVw/P93vh2gZYJ0a3Yn4lgpbpMygzPKhMybXeLxmkr/IHQ2TiOUYI Dq94ffRy4ZtDY9cOo0v58M7LOM+KdwYNILNOjMiHroStByFGfuYs6dJ5bqGfOM1BTa/dC1 LiZHh41RBGFbYFbGHcDWRArOG6ST7yis79jRSVWYDH9s54SYatuFJY65zt3FnDRpuLAxBz ClukVawO0oS0XRQ2iFe0nCLyn6NnZCvNIPTSqrwBAhi280zwgMNt3bYqiQC70Jq2l64ebL 9lS6BegS9TPPcxYTyN5FlOv2A9uKxBKoAYFxvsxFKn+y/neTXCsgWxpAmBA/NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783698231; a=rsa-sha256; cv=none; b=PUpHXXvjLeCQGYYkAmVWdTkzOT/G6GpESMIvnXiv5C2Tfo1SqQ0HrqBvhjOVYXBzo8hkYI oxN1vKGevHc1/OcywQbZ4rAT6htOkxpMRQiT2TnfTylZRFHr2jzU7yBxjefwcAxnDjRwRJ M80fm5uYaF6ZYQCf9bUGkv+CoxwheVmVwMWwkurzEIcx0LT37lnXEx3kdJEsyGUqmR/WHu si2DdPHDgjgkQiI67Vo1iW44j7T3KkJQMlkvc+b8RaeQqKaj1WYos5cC/zBMSPlCABPRvX lrXsR0OMYtdyYvpZyFA/ZWX1oTRjai6I2Iqfb0ybGO4kCa7kD9kF2JhSpcQBOQ== 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=1783698231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w4sHIqhB9sLzgApPr2NecihaI+SCQNdDXBlV6A/2q8c=; b=tM7/gD/HvEzsRneFwUxldGqWHZMp5NFT4mMVu3ZT7/mlLtuU3MtXP2XJFYsMQ6OqOocxKh nXyP+MHNC+g2XSoPYeO4ZQh46OlcajI1M4ayAf9K5erTLuADG03ETHVq4N95/sM2PZMYZ1 mt5q8snqkyRRPYZAhUTwuwsispnwmu8nV3LV3AEqw/O3qzxbFgccVwcultTcbwdUApBGDO Ex0Fwfm1niD8S2uXCc/qoBmfcKEXh6Q2Y0RgrJrvz7buLVuTnq7U/B/w1CnAkLCH0Q7Kkq OZiWsAutuE2aIzjF9yAA2l3Qp/bzKFn0sVNvB6Pc5c5xWwSiojejgLH9KLEGeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxbj32zTPz11r6 for ; Fri, 10 Jul 2026 15:43:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3674c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 15:43:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 825c14016f8c - stable/15 - DEFINE_IFUNC.9: update NOTES List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 825c14016f8c7b910a10fecbf5d13af1f85001d0 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 15:43:51 +0000 Message-Id: <6a511337.3674c.306013b4@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=825c14016f8c7b910a10fecbf5d13af1f85001d0 commit 825c14016f8c7b910a10fecbf5d13af1f85001d0 Author: Mitchell Horne AuthorDate: 2026-03-12 14:44:46 +0000 Commit: Mitchell Horne CommitDate: 2026-07-10 15:43:32 +0000 DEFINE_IFUNC.9: update NOTES ifuncs are now implemented for all architectures, so drop the caveat statement. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55815 (cherry picked from commit a2b2ce2c15bb73d9f87d5072cf65f1f027e066fb) --- share/man/man9/DEFINE_IFUNC.9 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/share/man/man9/DEFINE_IFUNC.9 b/share/man/man9/DEFINE_IFUNC.9 index 0bb75d1fd4da..8cb216af04d7 100644 --- a/share/man/man9/DEFINE_IFUNC.9 +++ b/share/man/man9/DEFINE_IFUNC.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 18, 2019 +.Dd March 10, 2026 .Dt DEFINE_IFUNC 9 .Os .Sh NAME @@ -134,8 +134,7 @@ function with an optimized implementation for CPUs that advertise support. .Sh SEE ALSO .Xr elf 5 .Sh NOTES -ifuncs are not supported on all architectures. -They require both toolchain support, to emit function symbols of type +ifuncs require both toolchain support, to emit function symbols of type .Dv STT_GNU_IFUNC , -and kernel linker support to invoke ifunc resolvers during boot or +and kernel linker support, to invoke ifunc resolvers during boot or during module load. From nobody Fri Jul 10 16:59:37 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxdNX01VMz6lPvH for ; Fri, 10 Jul 2026 16:59: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxdNT5rRMz3SR7 for ; Fri, 10 Jul 2026 16:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783702777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f+sBrTZoaIUiizHzTKAthwM/psuGPOsciNTlsb9irNo=; b=T/+3SXajP7Nd3Ydz2ActEXiZ+q3ZS4cFmOSuB9NpxHGlbfMGfu8oRbnJ8He8YDHRqlpHJg USWCziN0EU4jaSMH3tOTlo+SK4Ysvh+q+CQL8dH7eWEn5aE+dP+unMQ6E+66KnXgnVFdYL i6+1FNboXhIUEa4WWKaBmLh4fgrUaw9YvY/ChsA0T/LJ4yu/h7TBRDe9G+mko98849x5Dr GYAV5O9iTI7Ih5W3scpYOGfPt7MuQWnxf22hunk7pa+mYRojHRsXdn44SJa2xiiplNCodL 0GNv2rmWQ1XI/BEKFMYwOiA39gmHXsOUNSP5gB1Sk7aOo7yLHWl2SwYb8cdtyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783702777; a=rsa-sha256; cv=none; b=kcSrIIj/3K3vH1Wxs/o1hM3WQfWvkuk5WhOtJR5jRfvg2ixS1hApgcNRQY0silX3/2tCac KR6wjyEItUSfCzMHwlDH09yuERhWMzg77yJYTFcsCSL0hnk8CxgGheFlBsXyLXv5W4vg6b yQuTjXzQ7LDY8DlcCCy80YonNZ7l8FmBFm9nkSzT4NaNncz2tJvJLsxOQ0t8CAWxQFQrAC QdHCX1pnHVAE8e6cjCpbUV2/darj1Q7U245M7PUBQSAxFJXO3zeb6Wd9vnx0Znmt7TdS/y xvXl3LJj0gAhuBPFGT9Pj4oQwmyoUyXOeRcibzyMfIKVdUP7e6pitXWWPDJhLw== 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=1783702777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f+sBrTZoaIUiizHzTKAthwM/psuGPOsciNTlsb9irNo=; b=a4GMKzXMUBFrwADmFZD2JPq6JjgYdtzWRDxW0EzZ4S0B7J8+S9RMM7ukeyz8tfzcmrWEdY Cayn39TP1226PvzLsiHqf2d2DQFcMuLiBcLmtuldH2Y7q6DzTclYxVvHrYU97196eMiLIi il7R+1TEx43Virmw4Y8MYIUry3EkuNrmWMCDccSMBm36/OdRKzBftL8Fy6RBSCvJc4r59A 0a+Vn7Tgq/BGvN508nTg2LYT+Q3SlLheBgW7b0QtxAgPVZvF4CjXvXQJDvO0bIDOHrr6Qb /hyxyT5bzr0XUrVKCJCEJpl7I+Qjty3p3HRQQzzV73M7gS3wvFUjgLSlPlVcuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxdNT3YY5z13Z5 for ; Fri, 10 Jul 2026 16:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c994 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 16:59:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 4f8ff9954819 - stable/14 - usb/quirks: Sort the USB mass storage quirks List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4f8ff9954819f3348c1c6b8a2794694b6fda2ee0 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 16:59:37 +0000 Message-Id: <6a5124f9.3c994.8f81750@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4f8ff9954819f3348c1c6b8a2794694b6fda2ee0 commit 4f8ff9954819f3348c1c6b8a2794694b6fda2ee0 Author: Dag-Erling Smørgrav AuthorDate: 2026-07-02 12:59:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-10 16:59:25 +0000 usb/quirks: Sort the USB mass storage quirks MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57930 (cherry picked from commit 43da0c93ff9da32fda89d58727cd9bbe7beea4c9) usb/quirks: More USB mass storage quirk sorting (cherry picked from commit 0b95429fde2ae83c159ca991458608a97ca6b93a) --- sys/dev/usb/quirk/usb_quirk.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index a339974caffe..4525120d7d9f 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -190,8 +190,6 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(BALTECH, SMARTCARDREADER, 0x0000, 0xffff, UQ_IGNORE_CDC_CM), /* USB Mass Storage Class Quirks */ - USB_QUIRK_VP(USB_VENDOR_ASAHIOPTICAL, 0, UQ_MSC_NO_RS_CLEAR_UA, - UQ_MATCH_VENDOR_ONLY), USB_QUIRK(ADDON, ATTACHE, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(ADDON, A256MB, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -212,6 +210,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(ASAHIOPTICAL, OPTIO330, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), + USB_QUIRK_VP(USB_VENDOR_ASAHIOPTICAL, 0, UQ_MSC_NO_RS_CLEAR_UA, + UQ_MATCH_VENDOR_ONLY), USB_QUIRK(ATP, EUSB, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(BELKIN, USB2SCSI, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), @@ -286,7 +286,6 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { UQ_MSC_FORCE_PROTO_RBC), USB_QUIRK(INSYSTEM, STORAGE_V2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC), - USB_QUIRK(VIALABS, VL701, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), USB_QUIRK(IODATA, IU_CD2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(IODATA, DVR_UEH8, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -318,6 +317,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(LOGITEC, LDR_H443SU2, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(LOGITEC, LDR_H443U2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI,), + USB_QUIRK(MEIZU, M6_SL, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, + UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(MELCO, DUBPXXG, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE), @@ -425,6 +426,10 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { UQ_MSC_NO_START_STOP), USB_QUIRK(PROLIFIC, PL2506, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_PREVENT_ALLOW), + USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, + UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), + USB_QUIRK(RALINK, RT_STOR, 0x0001, 0x0001, UQ_MSC_IGNORE), + USB_QUIRK(REALTEK, RTW8821CU_CD, 0x0001, 0x0001, UQ_MSC_IGNORE), USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), @@ -479,6 +484,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(SKANHEX, SX_520Z, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), + USB_QUIRK(SMART2, G2MEMKEY, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), USB_QUIRK(SONY, HANDYCAM, 0x0500, 0x0500, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC, UQ_MSC_RBC_PAD_TO_12), USB_QUIRK(SONY, CLIE_40_MS, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -513,6 +519,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { UQ_MSC_FORCE_PROTO_UFI), USB_QUIRK(TECLAST, TLC300, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(TOSHIBA, TRANSMEMORY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, + UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK(TREK, MEMKEY, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(TREK, THUMBDRIVE_8MB, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -526,6 +534,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(VERBATIM, STORENGO, 0x0000, 0xffff, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(VIA, USB2IDEBRIDGE, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(VIALABS, USB30SATABRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(VIALABS, VL701, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), USB_QUIRK(VIVITAR, 35XX, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(WESTERN, COMBO, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -578,16 +588,6 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { UQ_MSC_NO_GETMAXLUN), USB_QUIRK(ZORAN, EX20DSC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_ATAPI), - USB_QUIRK(MEIZU, M6_SL, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, - UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(TOSHIBA, TRANSMEMORY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, - UQ_MSC_NO_PREVENT_ALLOW), - USB_QUIRK(VIALABS, USB30SATABRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, - UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), - USB_QUIRK(SMART2, G2MEMKEY, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), - USB_QUIRK(RALINK, RT_STOR, 0x0001, 0x0001, UQ_MSC_IGNORE), - USB_QUIRK(REALTEK, RTW8821CU_CD, 0x0001, 0x0001, UQ_MSC_IGNORE), /* Non-standard USB MIDI devices */ USB_QUIRK(ROLAND, UM1, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SC8850, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), From nobody Fri Jul 10 16:59:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxdNT0WCqz6lQ0p for ; Fri, 10 Jul 2026 16:59: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxdNS4CQkz3STZ for ; Fri, 10 Jul 2026 16:59:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783702776; 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; bh=pYZJQr2gEwhuI3Mtrvlr+roTvCS4gM2sPxUeC6QY4RI=; b=jTLoADhJ66ZEa5qTVI/IjXdSwvJUhAZzNSQqy3ctcbsryD8YLRSUBi0VcbGTrmpcTQtCjG C17GDkjBf5jG4uj3IRDDSTTndT8AnMy86IRddV6gqWxh8ga/WBWDkror0O0AHcK6TfIgeF NQ6Jf6yU3zhE59W4oJG6iPD3R+9cw4adlvGkPudW163XS4OYn/Cm0zCtLBJL9g9EYOhPEN /NoUnebaVQP0W66EhptCvhpDyCcTiEzow0kalSpHuwaNDqKjszO2yKk3nVOd754jathI5Y rDWChVQKwQzGDZlJ4k0E23Ltreaf6PERDaHBOYr+qrheM2UDqAg4wLagiEiirQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783702776; a=rsa-sha256; cv=none; b=Q4FgGt9+jjdjBNM4OoB8f99tppRhLnU5FR06vKgThcn6eWfSJHC4EmygbyHwCPiYqefB46 XGexeQ3qQMZqX7lQdKkALHHMtgozvCsSuH19FpwRLyAkMjX/Krn2g64nZTYy62JNyceFp3 3qoB/Mde6Yo5yB/guKnfFYFm9GgrkGdpiLGr6BM8qCAwkIBPhlfjssWNihadcbGz56qGVW pbJNlPKkxeFjwpY1CGlz4Zk9p9pHr0AN7dx32G7U1OmyH5LKra9b0NhqHr5DQIAyZXWtz4 zs7b/FUYcRbIgxdGmU8C/TFjVGwbftvH47LAiA1GDlynP196muCy0s4qmhWP0A== 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=1783702776; 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; bh=pYZJQr2gEwhuI3Mtrvlr+roTvCS4gM2sPxUeC6QY4RI=; b=PiKQjj0MeaDZCmzb4JYUhZEcpzjX/c8D36G02fyv3PVtuLgXL7qbWm450y0lxKp6c7sDfy AhzN0L6UBmFansuKOrXEOueIlxKtPrGPaLF7lDhu1ndHylRN9Zyzjn1J7PY9e3pqoWtsJT AiJW+U5S8WHQoZnD9YCJCbhUK0eRDFCfDOkYn33MwR9ZNnQZyt6zcEyHvPPw+4EjJGjiRS rJIibxFjcaybcvbFkjCc10njqLWBEMew1sfkeTO87G6fAn61uZTT5HQiZdjq7SXr2sIB0D pAG32Lcio9K19drFSBrfDmax0JJJezycUuGwVtqKblODKfX1YQE0wmbfB1u6EQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxdNS2j6Pz135S for ; Fri, 10 Jul 2026 16:59:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d398 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 16:59:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Damian Weber From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: a97df1387702 - stable/14 - usb/quirks: Add entry for Verbatim Store'n'Go List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: a97df1387702c05f2ae5c4154ada45922b3dcf47 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 16:59:36 +0000 Message-Id: <6a5124f8.3d398.50942f@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a97df1387702c05f2ae5c4154ada45922b3dcf47 commit a97df1387702c05f2ae5c4154ada45922b3dcf47 Author: Damian Weber AuthorDate: 2026-07-02 12:59:36 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-10 16:59:25 +0000 usb/quirks: Add entry for Verbatim Store'n'Go PR: 199101 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57929 (cherry picked from commit e1a0592ccd8141c609b45dfbe2fba13929ee4d51) --- sys/dev/usb/quirk/usb_quirk.c | 1 + sys/dev/usb/usbdevs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index dd319fde130d..a339974caffe 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -523,6 +523,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(TRUMPION, T33520, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(TWINMOS, MDIV, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), + USB_QUIRK(VERBATIM, STORENGO, 0x0000, 0xffff, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(VIA, USB2IDEBRIDGE, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(VIVITAR, 35XX, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 97cd80795e3c..6ffa10ee3ccd 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -714,6 +714,7 @@ vendor DISPLAYLINK 0x17e9 DisplayLink vendor LENOVO 0x17ef Lenovo vendor WAVESENSE 0x17f4 WaveSense vendor VAISALA 0x1843 Vaisala +vendor VERBATIM 0x18a5 Verbatim vendor E3C 0x18b4 E3C Technologies vendor AMIT 0x18c5 AMIT vendor GOOGLE 0x18d1 Google @@ -4938,6 +4939,9 @@ product VIALABS VL701 0x0701 VL701 USB 3.0 SATA Bridge /* Vaisala products */ product VAISALA CABLE 0x0200 USB Interface cable +/* Verbatim products */ +product VERBATIM STORENGO 0x0243 Verbatim Store N Go + /* Vertex products */ product VERTEX VW110L 0x0100 Vertex VW110L modem From nobody Fri Jul 10 16:59:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxdNQ0SBcz6lPv9 for ; Fri, 10 Jul 2026 16:59: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxdNP33WQz3Sns for ; Fri, 10 Jul 2026 16:59:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783702773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RehpWgnwuqLZy7cT5lHEcij8mQd1CtM0qu0YaC4gOes=; b=gSLuuDoHLOQYPpuzrJKl9BmRteCZw0oB+6+3wNoXhyjgrdjpnE/2ZYZc0ZRWs9F9Of/69K B9tCT43TqP5UoR3A+4w+EYajCclLT4mDrHFXok+p3GotEO1V6qtmm74CrSzaDML7BCtg9O WjobHeyV56PX2AJ2XBih6riUfljntAnrSsBiO+9hIMWXizj57R9qFSTmpjJH6yNtVKnJ4u YwLSy8gpXNC+AOQTaZyv27iIJmM0QinF3aQZFxqVgSYI1QerdB3Y6zIfmlbp3yxsd8Gg14 W8Aq3LEsGBmnNLmRKwxysydFBywv48RyVt6aCFVT7QMR9Ol5XbzNNJpWDLCmHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783702773; a=rsa-sha256; cv=none; b=Sff/ro4PAn5vJOQ6mgdQCAb2RDxHYVbuqMO8Frjw1cfdxNUzZOKanhy+AndL3Q7TzmMZEF LGBMWr2X8qxovaYbXcdMZMQGFLvDbP+JU6/bIrciz7E5CAwHFUY/Cxc+Hr9v3LLHEZehPY ePV4XN9XtA7xaiG4CqU5V2+jhBaXi0am9sIyNwrqMjFCTtgM4QuBF1XMSkcvL/Cw54EsSe Hyza00TMXK5+XTp3gV3qIhoBdrXnDO4pD0uPQENEA4UE8yvDrUIdUibZX7ptrIJXW+zR3M hEys/pM9nEcVNAMOMK1TOBP7tyQjyGMc2qbjM9F/l6iJ+VOW509U97j5qLWonw== 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=1783702773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RehpWgnwuqLZy7cT5lHEcij8mQd1CtM0qu0YaC4gOes=; b=jVU27HpwO91ykC0SnB91++OsQS0BY3JyBgmmyvSLtC5Obo7JQMgirjzZ8iYk0F3ukPzOLP k4G2HUsJfIOZMF/Rnd3px8k5RrMUiXD6vRWCYn5Cb0CHH/0eYXDX+jOh0vkQunypNgD8rE 5HA+zzW9oNH+lMeOiaBZ1pItCaASb6corSY8m8bBd6UCUE01sGS3y8Fu+2w7/fBEhU3abQ 91bnuXfJTvaAu5LSOpBi77srxnpelGwtjHW6xm/ocgWJX7Hs2q3MwEyklU9bY4WAk7EvDa gqA5wGB2rNGLu2ktzGrlIM00t356bln3fmn67Hjr0zPszx0siQDZx+wDoDDTDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxdNP1zSnz13Z2 for ; Fri, 10 Jul 2026 16:59:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d7ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 16:59:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: d5142c9c4b2c - stable/15 - usb/quirks: Sort the USB mass storage quirks List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: d5142c9c4b2c2002ac56614e881aff4ec20270c6 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 16:59:33 +0000 Message-Id: <6a5124f5.3d7ae.32d86fa2@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d5142c9c4b2c2002ac56614e881aff4ec20270c6 commit d5142c9c4b2c2002ac56614e881aff4ec20270c6 Author: Dag-Erling Smørgrav AuthorDate: 2026-07-02 12:59:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-10 16:59:17 +0000 usb/quirks: Sort the USB mass storage quirks MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57930 (cherry picked from commit 43da0c93ff9da32fda89d58727cd9bbe7beea4c9) usb/quirks: More USB mass storage quirk sorting (cherry picked from commit 0b95429fde2ae83c159ca991458608a97ca6b93a) --- sys/dev/usb/quirk/usb_quirk.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index 7afe29f4d963..c08a74675a06 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -201,7 +201,6 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(BALTECH, SMARTCARDREADER, UQ_IGNORE_CDC_CM), /* USB Mass Storage Class Quirks */ - USB_QUIRK_VO(ASAHIOPTICAL, UQ_MSC_NO_RS_CLEAR_UA), USB_QUIRK(ADDON, ATTACHE, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(ADDON, A256MB, UQ_MSC_FORCE_WIRE_BBB, @@ -219,6 +218,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(ASAHIOPTICAL, OPTIO330, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), + USB_QUIRK_VO(ASAHIOPTICAL, UQ_MSC_NO_RS_CLEAR_UA), USB_QUIRK(ATP, EUSB, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(BELKIN, USB2SCSI, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(CASIO, QV_DIGICAM, UQ_MSC_FORCE_WIRE_CBI, @@ -277,7 +277,6 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(INSYSTEM, ATAPI, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC), USB_QUIRK(INSYSTEM, STORAGE_V2, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC), - USB_QUIRK(VIALABS, VL701, UQ_MSC_NO_INQUIRY), USB_QUIRK(IODATA, IU_CD2, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(IODATA, DVR_UEH8, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(IOMEGA, ZIP100, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, @@ -305,6 +304,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(LOGITEC, LDR_H443SU2, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(LOGITEC, LDR_H443U2, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), + USB_QUIRK(MEIZU, M6_SL, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, + UQ_MSC_NO_INQUIRY, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(MELCO, DUBPXXG, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(MICROTECH, DPCM, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI, @@ -393,6 +394,10 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(PNY, ATTACHE2, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_START_STOP), USB_QUIRK(PROLIFIC, PL2506, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_PREVENT_ALLOW), + USB_QUIRK(QUALCOMMINC, ZTE_MF730M, UQ_MSC_NO_GETMAXLUN, + UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), + USB_QUIRK_REV(RALINK, RT_STOR, 0x0001, 0x0001, UQ_MSC_IGNORE), + USB_QUIRK(REALTEK, RTW8821CU_CD, UQ_MSC_EJECT_SCSIEJECT), USB_QUIRK(SAMSUNG_TECHWIN, DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(SANDISK, SDDR05A, UQ_MSC_FORCE_WIRE_CBI, @@ -437,6 +442,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(SKANHEX, SX_520Z, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), + USB_QUIRK(SMART2, G2MEMKEY, UQ_MSC_NO_INQUIRY), USB_QUIRK_REV(SONY, HANDYCAM, 0x0500, 0x0500, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_RBC, UQ_MSC_RBC_PAD_TO_12), USB_QUIRK(SONY, CLIE_40_MS, UQ_MSC_FORCE_WIRE_BBB, @@ -465,6 +471,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(TAUGA, CAMERAMATE, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(TEAC, FD05PUB, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_UFI), USB_QUIRK(TECLAST, TLC300, UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(TOSHIBA, TRANSMEMORY, UQ_MSC_NO_SYNC_CACHE, + UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK(TREK, MEMKEY, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(TREK, THUMBDRIVE_8MB, UQ_MSC_FORCE_WIRE_BBB, @@ -476,6 +484,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(VERBATIM, STORENGO, 0x0000, 0xffff, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(VIA, USB2IDEBRIDGE, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(VIALABS, USB30SATABRIDGE, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(VIALABS, VL701, UQ_MSC_NO_INQUIRY), USB_QUIRK(VIVITAR, 35XX, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(WESTERN, COMBO, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, @@ -524,16 +534,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { UQ_MSC_FORCE_WIRE_CBI_I, UQ_MSC_FORCE_PROTO_UFI, UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_FLOPPY_SPEED), USB_QUIRK(ZORAN, EX20DSC, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_ATAPI), - USB_QUIRK(MEIZU, M6_SL, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, - UQ_MSC_NO_INQUIRY, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(TOSHIBA, TRANSMEMORY, UQ_MSC_NO_SYNC_CACHE, - UQ_MSC_NO_PREVENT_ALLOW), - USB_QUIRK(VIALABS, USB30SATABRIDGE, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(QUALCOMMINC, ZTE_MF730M, UQ_MSC_NO_GETMAXLUN, - UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), - USB_QUIRK(SMART2, G2MEMKEY, UQ_MSC_NO_INQUIRY), - USB_QUIRK_REV(RALINK, RT_STOR, 0x0001, 0x0001, UQ_MSC_IGNORE), - USB_QUIRK(REALTEK, RTW8821CU_CD, UQ_MSC_EJECT_SCSIEJECT), + /* Non-standard USB MIDI devices */ USB_QUIRK(ROLAND, UM1, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SC8850, UQ_AU_VENDOR_CLASS), From nobody Fri Jul 10 16:59:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxdNT5bQmz6lQ2v for ; Fri, 10 Jul 2026 16:59: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxdNT2MXVz3Sgk for ; Fri, 10 Jul 2026 16:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783702777; 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; bh=cA9VLdX2QhT3hPnJZnAzfYQDv09EadYS627/SkWHabU=; b=B7mlWD4bRbrjxgvCNbCndTp9yxSJd6MDp3tvTQGtbMdXdcc5ce+bTXjlAGp/NQBAcZhP7f nZ8ZRcEXyBwcLsv+gOVtY+FA4uoCfVhdtaho8EnHW47gcFDiOai49p63uBWCSCpnWCaKB+ XqQhLtz7+E1jQlSVV8/llqgQL1r7rLz10bf2IDwXowHNsquWOfIQqrftFgDs/Pn4TvZvTr cDndsJozcZA92VeXrXGLOc2zbA7fQLNUW33pngb5WHlSA3xyMw0YgVtYPlVuyuoeDM7gxo PnKhvqiI2H89U2AlfHjMnLvJNSnC2bzs8CJGJE7poqf86nEiVHPQ3Lgfx5ypxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783702777; a=rsa-sha256; cv=none; b=egofLRextptF2eAevQZKPKz0mrO2Mg4LlesbBQOCP8IuDREQuH1ieVyS5lsEkVdfczHMbz 1YxcfPJEy/AtMQxwGK1zWJnz/OimnhA6QneOvTYgACZOIe/jXCQPo4LvwRAAYuatmX7+zn sTEuCjpvPeIpQiFdz4oQvCF2OUFrdwdo2De6QnO1c2VAOXfxKhphhALGn2fr1d+jvpQJoi W2M1nhtlaFWfwLRGTVVOEoot1VJ+Kk1TiaFwSzNRH/6HbuteBKIV2nqbMIFhoi0vcaeChL sXuVE7b+OP1if3PC435XQkOkbhg805pvNoqH5OJcUN8Hb37W5rPW4B55YccrWA== 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=1783702777; 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; bh=cA9VLdX2QhT3hPnJZnAzfYQDv09EadYS627/SkWHabU=; b=l8hkxg8HKSnYUrVHdfkViCBiEXGjbNVJ8xrezCOnE15y+EP4blpkeWWbZXDbnbUhu6cZmj f+MdP8tBYBCyjE69fvn0k+Ol2C/hD0j3QoBo2cd757uid8QMYJ301pcmIAlkeRDWuFd1iI +VSAc0sDSGHYBvyJjWLZofK4dfYSoKRm1bIdaz3d0lWOylTLNuIlHdjn7cfe+Slx33Uu3o R4m6TexieKhKcOvxEPNnOCl3Pt0WbsA3RcTlyHdhmZ4UWcA7HeDIqK8UH59IEVBn//wGkw b9dZ+EM23SFp5MPeMimruu52i758fEHbQk+3IL4z/pBPADrCmnd13znK071EIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxdNT1SZ7z13rX for ; Fri, 10 Jul 2026 16:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d287 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 16:59:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Damian Weber From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 5e83b07ad4cd - stable/15 - usb/quirks: Add entry for Verbatim Store'n'Go List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 5e83b07ad4cdd71f427c48b0a66cf1999c72c082 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 16:59:32 +0000 Message-Id: <6a5124f4.3d287.1d410257@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5e83b07ad4cdd71f427c48b0a66cf1999c72c082 commit 5e83b07ad4cdd71f427c48b0a66cf1999c72c082 Author: Damian Weber AuthorDate: 2026-07-02 12:59:36 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-10 16:59:16 +0000 usb/quirks: Add entry for Verbatim Store'n'Go PR: 199101 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D57929 (cherry picked from commit e1a0592ccd8141c609b45dfbe2fba13929ee4d51) --- sys/dev/usb/quirk/usb_quirk.c | 1 + sys/dev/usb/usbdevs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index 6237df4b4fe0..7afe29f4d963 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -473,6 +473,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(TRUMPION, MP3, UQ_MSC_FORCE_PROTO_RBC), USB_QUIRK(TRUMPION, T33520, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(TWINMOS, MDIV, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), + USB_QUIRK(VERBATIM, STORENGO, 0x0000, 0xffff, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(VIA, USB2IDEBRIDGE, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(VIVITAR, 35XX, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 3ea6986d5360..938f59b1ebce 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -714,6 +714,7 @@ vendor DISPLAYLINK 0x17e9 DisplayLink vendor LENOVO 0x17ef Lenovo vendor WAVESENSE 0x17f4 WaveSense vendor VAISALA 0x1843 Vaisala +vendor VERBATIM 0x18a5 Verbatim vendor E3C 0x18b4 E3C Technologies vendor AMIT 0x18c5 AMIT vendor GOOGLE 0x18d1 Google @@ -4937,6 +4938,9 @@ product VIALABS VL701 0x0701 VL701 USB 3.0 SATA Bridge /* Vaisala products */ product VAISALA CABLE 0x0200 USB Interface cable +/* Verbatim products */ +product VERBATIM STORENGO 0x0243 Verbatim Store N Go + /* Vertex products */ product VERTEX VW110L 0x0100 Vertex VW110L modem From nobody Fri Jul 10 17:11:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxdfT0N3Pz6lQbj for ; Fri, 10 Jul 2026 17:11: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxdfS6jJbz3WL1 for ; Fri, 10 Jul 2026 17:11:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783703504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2rIsGbVaivjheRguSrZ1CcX9Ta/MG+yhizwxCpLpt0=; b=pQg/94GC3OLERcDxfDRFC8d3/fuvcv6sMokpqAHIurXD9eRimec7xMu8iHk3cNY9Q1IZEx IkspDRokL58PuIie+NqbicmiW/qqkfH3eZ3KSKAnyA1oWXajsnzeVjLJZp87tG8VVoLgg8 jZdUr0fd9ESAp/3KUORiXyjTn5H/kIrBmuGKWjy42PhXt609j2GXcMwzLC3j+XEg25EHtc +OUyXWYBV7MnNP56WgOaklSx6DQOkiCSX9kUVT4jftqfqae8zfejaQPoIWZ6YA86Q0mpsD Qd97u2YkcCDDPw2BmDg/cSsAxAk8CUKDaqSmduJfennZ6A3WwwifBO94nCLHiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783703504; a=rsa-sha256; cv=none; b=SiWR57QjuPFSuOY3G+ips8VeMBgRrlo3dxayrYod7qIqhHetRA51jNkhQubEYglS0Ol3VZ CISoi+B/VZ9ZXGYDnEJ15xgmcplmbgQlCZLmxuUb3/z32bMjn6RKKUNaGHAhzmwcspm2vn nr5om0FUywHQg5xmdza0akVi/hOzhJVGQNtKupv/CUTGowyPCtzfcJ+2xfSCEvirErsqG8 pMDaafIsfoeWXoW7RE9Nws6zckRcFkrVSi63MKUtm+MurDOoCzMNeci3fmanvtXDNyhH2O LP/xQwClR9OrGUaSnu3f8LaWkpMgSdkdNtKtU6c0fq1/7owjRg/N43Pq0xwvdw== 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=1783703504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2rIsGbVaivjheRguSrZ1CcX9Ta/MG+yhizwxCpLpt0=; b=SaIoWzmzf9vXEl+wRvWIArig+PpNp476TwqDgS2OI4g5fa/xhGSboFi5ixwWc8tnAg1hkW 2mPu+Fx7Pydqrtv7PXp+trhirki1ueIPcNLreCqrJJ+JzFwCu62LcIXz8R90GoVzpuHIrT 11240iVAL1chKlRS2IPkBvd/qeIeqNFUFs5MQyrzTj8HshKT/wcU46EtecmclBT01umHmp C8P4X+YgNLFQc4vqrp7USsFy8bYstUw/qqEdEPEiF/mA+LS0SEnGgsOmZvL4tKdDsHzLkk 0UBrRKaDeBjwcmar158vbd4090qPHljUoDsVnhfCF+4cGqdxSMdN3nCAmYG0ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxdfS5ChMz14Jf for ; Fri, 10 Jul 2026 17:11:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f70b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 17:11:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: e33854e4dd55 - stable/14 - OptionalObsoleteFiles: Add missing headers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/stable/14 X-Git-Reftype: branch X-Git-Commit: e33854e4dd553887ca57e7a32148fa6dda44fd7b Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 17:11:44 +0000 Message-Id: <6a5127d0.3f70b.5bbc744b@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e33854e4dd553887ca57e7a32148fa6dda44fd7b commit e33854e4dd553887ca57e7a32148fa6dda44fd7b Author: Dag-Erling Smørgrav AuthorDate: 2026-06-29 19:17:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-10 17:10:45 +0000 OptionalObsoleteFiles: Add missing headers The header files for dialog, figpar, dpv were never listed. Fixes: bc6c827078b7 ("OptionalObsoleteFiles: Add figpar to dialog section") (cherry picked from commit acf6518a2d6f33fb56c861861cbad0c0cb56817e) --- tools/build/mk/OptionalObsoleteFiles.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index bd7646d2caba..997807d260fc 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1499,6 +1499,13 @@ OLD_FILES+=tests/lib/libc/stdtime/detect_tz_changes_test .if ${MK_DIALOG} == no OLD_FILES+=usr/bin/dialog OLD_FILES+=usr/bin/dpv +OLD_FILES+=usr/include/dialog.h +OLD_FILES+=usr/include/dlg_colors.h +OLD_FILES+=usr/include/dlg_config.h +OLD_FILES+=usr/include/dlg_keys.h +OLD_FILES+=usr/include/dpv.h +OLD_FILES+=usr/include/figpar.h +OLD_FILES+=usr/include/string_m.h OLD_FILES+=usr/lib/libdialog.a OLD_FILES+=usr/lib/libdialog.so OLD_FILES+=usr/lib/libdialog.so.10 From nobody Fri Jul 10 17:19:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxdqS2dNhz6lR3R for ; Fri, 10 Jul 2026 17:19: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxdqS272hz3XBh for ; Fri, 10 Jul 2026 17:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783703972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rG1I3eC5xVemPvv8gFHvtOWZBUBzvCIXNpSylrYmD8E=; b=nWKs/D9ipf/N9LDek58+rPwJh20V9NJBVSvs/Z2u/foozeuGmd1dhcjCHhKOvUwsBGaSY0 2uRy3orSab4NoqVso2o7g/hrqxmYpE95Ps114+AJveh4SqaChCBC0AHcmTSqSFywSSwBcp JsT8smb0WIKTkZG0eApN9WjqWmZjwkVPzI6hlnJReJg7wSdHUsWbpmaMj7BZA65NJR94r3 1pXKf8peo3j2m01neGf/X6hFvEnp+HTvU3hm+VY9VNjiAIjiHe3z9xvgX/wxEy72vrFZLP X7rM9lXg7LXXeF8FI7NNioU+d7qiYwqVGky9nJoOLllNHIpIcjj/FX3LxAAuyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783703972; a=rsa-sha256; cv=none; b=l1KOlqgFG9RbEiG87rOAvkbKR+DCcjq+kEfxiWFU3bT9IV7HuTwnUaiHnekqIuYll1vrr3 KqVMSp51wLcyaHZNYCBtqdNoOCC0Z30eH99+yUu6AUBgxT2DHsjE9TRzJOK/4osr5R+ct9 j3YTmeyDrKa+JvSSAsp1UxTAVbHg2KNTT1oarWs1GO4uYswSwEwsIHpFP5sUvIfYRn2N8j 5gQlU1fdQgzQzblzkZnSDrk56JlytYY5jery4lKcsBoJgsS0vYJS/k3STo8k6lSakfOnUj pdeFvixIaumQ9PH13xagsqTmb78cYz8m8UxdF45ennicNj5tswGoP5OJ8Pu9RA== 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=1783703972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rG1I3eC5xVemPvv8gFHvtOWZBUBzvCIXNpSylrYmD8E=; b=xYrOMorsji8/QkoQTv2HryCYfS01ryeg74WNoS3hfDnSIXnXNqqglrjeSGQUAB8p5a9ODO IOk8yEpItCCYk3gF/6EfHs1hXPFpJ9OfBRdMXrpvzCjKC2dqwYW0UYO31klnNhhuY+9U8f p0wV+10GBvMg2VhHRCm0iJKtezJAaOHenRoHbKBccsxVzx2nkII2Zw44OxyJeafmz+qdXM NMvUvolDmBJu4FHcKHEafcokoGDUrckdq10EB8wOzGWr5rwQzW8ZD21iMgUnzjl7UwxWg2 98GPRzw2coIntt66hkFvykutJietIIHroskoXzfslcLF1eHFVCZqjj8BgFR/kQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxdqS0tXCz14Lh for ; Fri, 10 Jul 2026 17:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f00b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 17:19:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: b1bb3aa65cc9 - stable/15 - tests: Fix build if TIOCSTI is not defined List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: b1bb3aa65cc9d720f54dba009565e0d1d0419323 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 17:19:32 +0000 Message-Id: <6a5129a4.3f00b.359ece79@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b1bb3aa65cc9d720f54dba009565e0d1d0419323 commit b1bb3aa65cc9d720f54dba009565e0d1d0419323 Author: Ed Maste AuthorDate: 2025-05-30 15:58:41 +0000 Commit: Ed Maste CommitDate: 2026-07-10 17:19:23 +0000 tests: Fix build if TIOCSTI is not defined Some downstream projects (e.g. ElectroBSD) have removed the TIOCSTI We already have some components (such as mail and tcsh) that build without TIOCSTI defined. This is (existing portability support in those projects. Simplify things for downstreams by extending this approach to this additional TIOCSTI user. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50614 (cherry picked from commit 52a2b4bc5da21d7a54cb16b9450196244b59b8c0) --- tests/sys/kern/tty/test_sti.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/sys/kern/tty/test_sti.c b/tests/sys/kern/tty/test_sti.c index f792001b4e3f..d6ce05f76d81 100644 --- a/tests/sys/kern/tty/test_sti.c +++ b/tests/sys/kern/tty/test_sti.c @@ -19,6 +19,7 @@ #include #include +#if defined(TIOCSTI) enum stierr { STIERR_CONFIG_FETCH, STIERR_CONFIG, @@ -325,13 +326,18 @@ ATF_TC_BODY(unprivileged_fail_noread, tc) finalize_child(pid, -1); } +#endif /* defined(TIOCSTI) */ ATF_TP_ADD_TCS(tp) { +#if !defined(TIOCSTI) + (void)tp; +#else ATF_TP_ADD_TC(tp, basic); ATF_TP_ADD_TC(tp, root); ATF_TP_ADD_TC(tp, unprivileged_fail_noctty); ATF_TP_ADD_TC(tp, unprivileged_fail_noread); +#endif return (atf_no_error()); } From nobody Fri Jul 10 19:13:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxhM24KcPz6cvnR for ; Fri, 10 Jul 2026 19:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxhM21VCnz3vt7 for ; Fri, 10 Jul 2026 19:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783710814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjoAKQHsBZGGVxta/TlabWinJjqRVT0kd/qr9FA4odE=; b=u/TGgkPELpdNcD6uoxtnNmWYkqmny5rVLI0E2Yn7ldCpwB0AUMszsW2gEAvRnPXQqx2gks FLqgbCihSi+jwzsiZKUg0fYcGuSrjVTvzQyD5I35Thb3NggQ8yYxk9ZnvNsZGiBlJDowv7 CClTFPl1FNeDGQ+PhMnxcLjeLa+JoiIxJJ/TMIrzRAGYyV5aOhUKN8qFtA/PZtr1pka/wn u7YV89k71qsdwEh8aInV/Y0fuvMotdGNzh05wIkmfVt4ytVqTHcXuK4QLBxLDMnSXxeQdG v70gV/a4g3R9ZMmMjOtkz3jQSI6+L05o3FJq1V1fd41YGAEGRRZCTeej5cKzsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783710814; a=rsa-sha256; cv=none; b=jLPZrlMzYVoJjK9F3ztCxIzR8g3Aqrvp9cTovIIbxCi+Ec/BPdmiJP8+WqDR63d8DJi4am qfx2i/zWgel3frHhbq8N93KaUmMoSMrE0f2Pi9h6uEaSHMkQV4OImrI1VyVZTaM6ZoVXvw ZGnF8Fm2lyAPNsAgXbGlw9fDOQzWfhUvs3wvyg1XSF2iApzl87t432UkjQWHbRJYguba7r bd4nFEOXF71yt9MLEHq9XZ41NHhMgUsZn/EM2156+wdWdpzFVjj4+6IzRnRNVnx/54PfsG NlMliol/G5cfQbo09w/r0tJ54ycHOxhxlwUAcuVxLKz8Krx4FxXT206LHcdHDw== 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=1783710814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjoAKQHsBZGGVxta/TlabWinJjqRVT0kd/qr9FA4odE=; b=XB39B+63olX/KOBpeXZPW1LYArrQbFoUpuTEVdq+pJZrHz+0xW/4MQ1KMlm5ltv/FwGKmX Y3wRUuxIgJE/CyZuhCHm+JCVgEg/40DcV5xuVSk3XrbqxCPyranZI9UDVIf1e2wM9TZb3H 2MiWlxWJZ3JTi8YvVxrwAyZOJUgPn0Nu/A4u3UMTXSsMdfDzowZidYII5WAxwZaEcfYwM0 tOylB0l9YqoZsOD648fCUlcXkagcrUE/CUe1z1Nb7J/oubPCTP8pRkstJl/g4zaw0xJogF Tzp7E8F4l9/0Au0KdXuUJlHX/X1nwPI1jEw4dcFPnU3uQ5k+XcC5WCWf0e+hww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxhM204Jyz172H for ; Fri, 10 Jul 2026 19:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a0f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 19:13:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 074ff66d7ac4 - stable/14 - ice(4): Add support for 40G maximal PMD speed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 074ff66d7ac4d631eae3085393d2adefedef4578 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 19:13:33 +0000 Message-Id: <6a51445d.1a0f5.17e8b3e5@gitrepo.freebsd.org> The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=074ff66d7ac4d631eae3085393d2adefedef4578 commit 074ff66d7ac4d631eae3085393d2adefedef4578 Author: Krzysztof Galazka AuthorDate: 2025-12-05 22:02:45 +0000 Commit: Krzysztof Galazka CommitDate: 2026-07-10 19:12:41 +0000 ice(4): Add support for 40G maximal PMD speed E823 backplane devices may support 40G as maximal PMD speed. Extend port topology reading logic to handle this case. While at that fix indentation according to FreeBSD style(9). Signed-off-by: Krzysztof Galazka Tested by: gowtham.kumar.ks_intel.com Approved by: kbowling (mentor), erj (mentor) Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53587 (cherry picked from commit c6212b7da110d82b1d0086ec525deb216993021e) --- sys/dev/ice/ice_adminq_cmd.h | 1 + sys/dev/ice/ice_lib.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index 6225abc0f38b..b2dde986dd23 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -2131,6 +2131,7 @@ struct ice_aqc_get_port_options_elem { #define ICE_AQC_PORT_OPT_MAX_LANE_50G 6 #define ICE_AQC_PORT_OPT_MAX_LANE_100G 7 #define ICE_AQC_PORT_OPT_MAX_LANE_200G 8 +#define ICE_AQC_PORT_OPT_MAX_LANE_40G 9 u8 global_scid[2]; u8 phy_scid[2]; u8 pf2port_cid[2]; diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index d44ae5f37750..fd7189130c25 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -11314,10 +11314,10 @@ ice_get_port_topology(struct ice_hw *hw, u8 lport, return err; if (cage_type == 0x11 || /* SFP */ - cage_type == 0x12) { /* SFP28 */ + cage_type == 0x12) { /* SFP28 */ port_topology->serdes_lane_count = 1; } else if (cage_type == 0x13 || /* QSFP */ - cage_type == 0x14) { /* QSFP28 */ + cage_type == 0x14) { /* QSFP28 */ u8 max_speed = 0; err = ice_get_maxspeed(hw, port_topology->primary_serdes_lane, @@ -11332,7 +11332,8 @@ ice_get_port_topology(struct ice_hw *hw, u8 lport, if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_100G) port_topology->serdes_lane_count = 4; - else if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_50G) + else if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_50G || + max_speed == ICE_AQC_PORT_OPT_MAX_LANE_40G) port_topology->serdes_lane_count = 2; else port_topology->serdes_lane_count = 1; From nobody Fri Jul 10 19:14:40 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxhNJ2ryhz6cvTH for ; Fri, 10 Jul 2026 19:14: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxhNJ1wq4z3w6F for ; Fri, 10 Jul 2026 19:14:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783710880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7YM2Fp0eMWrkUHurJsM8/WtqOAhfxEZZnwNweuhzA4s=; b=B0oaXdJfW+McSdy6RpWphkeo6ukqrti4B+Kc8lndwJRI+sQu5ChglstFIGgossVi/4rnc0 9CvaAThn2qhh8WfC5MvYKmOovVeh4071qS6qC0+ZB41Pws0efoUzUqssyxogrTQKlwfKdZ HOF/z/00FuO/dtbUzReqaU775n40YLMNkCmtQMKzmQmxGlkFcU5UT31py0d8Xw6Pvyk3N6 9DqADX9VIwVS663EWDJp6v4/gB3CxB3Hsyn3X6J6rP+woLsiDyo9OmnHV6h51nQIFzEVp9 j9MXnEv30gupEZfofh665BWhWStLfhq3hqVWVhvnE67b2lF1vJ9TcC5J8Q8piw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783710880; a=rsa-sha256; cv=none; b=k8dz7KpwmebYzRc3c8sB9Apb1kjSsom1SkkyrmDMigm8L1yRnCVfOLxB/zgrvfN6QFjM3s HMHWu3qr/aY4CdRtjFVrrb4c7mRplYmnnzrt+zLmdvuRoK2Nb2/wmVWJDy+OmZs0zP+zUB o7HIh4iij164B1Wr80rq42qY1j5RbyBTn+La1iVj2XQzlvrL2rzFX8eDTIljnjHemG9LpY vK5XOfcgyR7lISPe3u+uD5a5BXgQ9KMKTHMs6HWow3QDa8AoSUEaRD3dgbBW7sz4cEJ9MV gBTBbB0nkBmAKBr4edxVY++HNTLv3Fwy0n8F6lKUmrlmek96zDB3S6Una1gC4w== 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=1783710880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7YM2Fp0eMWrkUHurJsM8/WtqOAhfxEZZnwNweuhzA4s=; b=mDEMVaGBpPSRMBU1x1bi8eLkNr96bunYHjZO9wUvoyjVkQFpqWHUEs6Zv8S9zcXWPNYUnO le/MUs75hmx1R1LNIw16jynadUP5wbBu9NBZfHxtk8rDaDgM8oRs9mAKslh/F09JMSVeV4 dlYUqxMixDZQw2JcdFU9NFyjJNWAzIqbT45LBAJajMAB2Rs8JDM+1LnHOz9yDz0Fj8E6wU PuOgrs+bqQM2YEU+1YBH4l0gmO+E7+wOoxbyZNqIJDXnrur+x8V7Y392nO8znCIo6yR1Nh ew0Lvl8Rq70vaUMDSRQBgf3W2ZZY1A2eANj0NK8reZkgMgOuL+hS58vUMKTSQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxhNJ0mFKz17b9 for ; Fri, 10 Jul 2026 19:14:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c61b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 19:14:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: f2436514b25c - stable/14 - ice(4): Add support for new E810-XXV-2 adapters List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f2436514b25cf883cca4ca70eff31b468109ca04 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 19:14:40 +0000 Message-Id: <6a5144a0.1c61b.1c55512e@gitrepo.freebsd.org> The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=f2436514b25cf883cca4ca70eff31b468109ca04 commit f2436514b25cf883cca4ca70eff31b468109ca04 Author: Krzysztof Galazka AuthorDate: 2026-06-12 11:37:01 +0000 Commit: Krzysztof Galazka CommitDate: 2026-07-10 19:14:04 +0000 ice(4): Add support for new E810-XXV-2 adapters Add two new subdevice IDs for E810-XXV-2 and E810-XXV-2 for OCP 3.0. Signed-off-by: Krzysztof Galazka Reviewed by: kbowling, erj, mateusz.moga_intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D54069 (cherry picked from commit bea6f7d02dfbef8f8209f0ca5f1d76877d549f46) --- sys/dev/ice/ice_drv_info.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/ice/ice_drv_info.h b/sys/dev/ice/ice_drv_info.h index abb11bdb5fd9..572886b4c7ab 100644 --- a/sys/dev/ice/ice_drv_info.h +++ b/sys/dev/ice/ice_drv_info.h @@ -129,6 +129,12 @@ static const pci_vendor_info_t ice_vendor_info_array[] = { PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, ICE_INTEL_VENDOR_ID, 0x0007, 0, "Intel(R) Ethernet Network Adapter E810-XXV-4"), + PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, + ICE_INTEL_VENDOR_ID, 0x0008, 0, + "Intel(R) Ethernet Network Adapter E810-XXV-2"), + PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, + ICE_INTEL_VENDOR_ID, 0x000B, 0, + "Intel(R) Ethernet Network Adapter E810-XXV-2 for OCP 3.0"), PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, ICE_INTEL_VENDOR_ID, 0x000C, 0, "Intel(R) Ethernet Network Adapter E810-XXV-4 for OCP 3.0"), From nobody Fri Jul 10 19:15:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxhPh5r3Qz6cvsN for ; Fri, 10 Jul 2026 19:15: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxhPh2rq7z3wFn for ; Fri, 10 Jul 2026 19:15:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783710952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8Fo2KXzwv5C1kmupVS82FWT1e5JnMdJSnLvqe3JYbc=; b=G3lqEIXjUj7WS7rlG0QVQUrOT01sNWtRWfKu3CqZkqAOf8PC14VY3JiH5iCHz0a+HITgs9 6hI5nV7zCnybTRQLRxeBmLr8uRoXQhUOQITqYHN/oIf6TSJ5b8ArDiepFTlSVMBoFD3cvT uAk8WCWJh6L9HJXb67h4d6Lee05R5Z/VE/SOX8fEoQT9eel7O65Ev/wAw4VPZbNcyrFRS0 JXXSB9bz9oF4HV3S3yeeJrnw0Sb4UjpyaCYq7OtwcQB6W54B9+OyKuxpDOAENPMlVdV82R qQWK6kn49loGRuDRho4/tRyZQbNUTXcpM/EwU0Xr/iCuexgokZEUSc/6jfO1UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783710952; a=rsa-sha256; cv=none; b=lA1vvFG3LSKWRlRY21O8Gy6Qidd3iBndgR3nk9TAVaG932YKISkYdPOB60ZUwZARj1Rkv7 NFpv+8f5mY1z5wjk5JohsH1UH7LYeqeUx8WjbjA9tnqCYRQrS4BnZ5pM+BfUVPIMlxr6f/ kUlOnbtUN3y6To9TSYEm4dlYV9Hx7hzgqXcLPYQgQtxYRLcxO67Nfhh81N1wbQksYDE6dD t5UmPj1b/L0d947dyRBYZureUf/aGL4mgS7uRVm8vP3N+lIZfovyuCJBJj5/hOt1oxEy7f DGfO5qvEkTKTQnqh7uE9VCENoH7rPWuw0nixTtFj1vYf/UgqOyx27pJPbjKNeQ== 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=1783710952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8Fo2KXzwv5C1kmupVS82FWT1e5JnMdJSnLvqe3JYbc=; b=Vh7TkDtd+QIQZtoz02A2PDOxgIT+rUA9Sr0PhoRbtNNdBwgUmIsQjiN04ZVGgWKj4WKxGa sT4GLuT+kpJX6o7L7f/sbg2v6gdPCN6B1cneZJhAaInPj80FLDqdZ+QkGOVba/wxNi80Ft xSpJNf+bSGwDmu/FS3OwmHPBUL17ucJtEqIas+dg2fSYSNlUmcKgbK5SRqLVFtnWrzUHWA 0c11XGnms8U9cert8OvSpw1giFsXAjJfgxheRO7GLeZkpoYLRRRTR8la959admT0bjaTCv k9EXVMk9Zr4eZDUzyrHFTd3dLF31goTZ7AJb+Jce2dYL5Y0s0pf+Kbxgy3UCyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxhPh1tlnz17S2 for ; Fri, 10 Jul 2026 19:15:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1926e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 19:15:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 15ef9ad2f5f4 - stable/14 - ice(4): Fix link speed after changing cable type List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 15ef9ad2f5f46c4172121f22ba9d051c08365814 Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 19:15:52 +0000 Message-Id: <6a5144e8.1926e.35f496ca@gitrepo.freebsd.org> The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=15ef9ad2f5f46c4172121f22ba9d051c08365814 commit 15ef9ad2f5f46c4172121f22ba9d051c08365814 Author: Krzysztof Galazka AuthorDate: 2026-06-12 11:56:15 +0000 Commit: Krzysztof Galazka CommitDate: 2026-07-10 19:15:18 +0000 ice(4): Fix link speed after changing cable type When interface was connected to a link partner with a cable type limitting maximum supported speed, e.g. SFP+ cable in 25G port, driver incorrectly saved a supported speed as the user configured speed. This prevented interface from using all supported speeds after switching cable to SFP28. Link was established at 10G as supported by previously used SFP+ cable. Don't set user requested speed unless actually configured by an user, to allow automatic selection of highest available speed. Only when user sets custom config using advertise_speed sysctl save it and try to apply after cable is changed. Also don't save initial supported speeds if FW supports reporting default PHY config. Signed-off-by: Krzysztof Galazka Reviewed by: kbowling, erj, mateusz.moga_intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53611 (cherry picked from commit 310145642312e1c5fb3d8efa8321cf905d0354c4) --- sys/dev/ice/ice_lib.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index fd7189130c25..54267d25941e 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -9652,8 +9652,7 @@ ice_apply_saved_phy_req_to_cfg(struct ice_softc *sc, finalize_link_speed: - /* Cache new user settings for speeds */ - pi->phy.curr_user_speed_req = phy_data.user_speeds_intr; + /* Update phy types in config */ cfg->phy_type_low = htole64(phy_low); cfg->phy_type_high = htole64(phy_high); @@ -9959,16 +9958,21 @@ ice_init_saved_phy_cfg(struct ice_softc *sc) device_t dev = sc->dev; int status; u64 phy_low, phy_high; - u8 report_mode = ICE_AQC_REPORT_TOPO_CAP_MEDIA; + /* + * If the FW supports Link Management V2 we don't need + * to save initial PHY configuration as it can be always + * read from FW. + */ if (ice_is_bit_set(sc->feat_en, ICE_FEATURE_LINK_MGMT_VER_2)) - report_mode = ICE_AQC_REPORT_DFLT_CFG; - status = ice_aq_get_phy_caps(pi, false, report_mode, &pcaps, NULL); + return; + + status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP_MEDIA, + &pcaps, NULL); if (status) { device_printf(dev, - "%s: ice_aq_get_phy_caps (%s) failed; status %s, aq_err %s\n", + "%s: ice_aq_get_phy_caps failed; status %s, aq_err %s\n", __func__, - report_mode == ICE_AQC_REPORT_DFLT_CFG ? "DFLT" : "w/MEDIA", ice_status_str(status), ice_aq_str(hw->adminq.sq_last_status)); return; From nobody Fri Jul 10 19:30:43 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxhkq2qwMz6cwwJ for ; Fri, 10 Jul 2026 19:30: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxhkq281nz3xbW for ; Fri, 10 Jul 2026 19:30:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783711843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=23VrXdEsYEs3SBDfdxPkfsmSDsqkDwMwcWl2TG7Ou8E=; b=JV5GRNLCK4nirZzygm9iGCUiKKO88MH9coR3sHdWPnVUUMbmLBoSdWLGzfAVp9ZbCDd2/W ESi4StlsIwmtNJJn2fN20lZrjSHLXF/bJG1Ovun4E4MGwrS3HhBCycykUpUhjfbjZISL5n nFuPiU9oRCDPLTFvB+87yRRYDWk6PiDwJFjgc+vDeffDXRzYQ/BPYRMx6QO2Rhh0n7GIiA 5HftyH9FVl9IcJybOaeso4mPGWVfWnBw5dnujNXKh3CUssqGKqlUW1e2aN4AltAR9dEnCt I/oo+pCD03IcXjS+ZIZRnsfNObLu+fkuLv100FX9t62uDXKUwzKFDJNtuj39yQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783711843; a=rsa-sha256; cv=none; b=KFGczoxRrLyQreIpUxK4023LdijuABx0V0guKfBhcqjCQd69fPfuRJ9aatOM0jKYqL8dzL 7zg3Ya2SkSkBEhP3d6fmnm1LGXgUSBjXBOiiCSPKmgmM+G/xi8pS829c36chH6trGQCZR2 nLM5XcdGN2lyvWOobnVC2jq1xPhgoxb4891eBfo6Z5ema4WFEKx4wP2/AVl+2DnDGmv10I cPxHJLodkjUZeQL6E/uW6KBIxJeMqOks7CWMkRJm3U1Xjj0zbtnmMiYiumIg5RLCEf5bj3 O2cU3gb/nKK2ZEDAaXQvHFH0e/BCt59SnBqcEihs5HCuskYZSX6TVl75S18U/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=1783711843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=23VrXdEsYEs3SBDfdxPkfsmSDsqkDwMwcWl2TG7Ou8E=; b=tFHlPVULdefYAwVRM3i8nLRYvyUa5erra0bnFI6yLqeuhlLHdEqBWhA4ocI4pgccFbWUNI trSuWWCCQKmhCVqq44doeQ6v1lV2Fl+rNyXJP8CvMMdZ+m2Mj9uguaPWFfbaM6BmISWUxV 2xcEuWcHTDLTGYBT2p/1V+imHnw3Kn+LtYl7bEMBiOgx84+zY81tH5nmwbEPGM2al+ZpCa fIAmdcp0zqk/eOY1j+Cq6CU5uQY9KFWzViRsKF5pcCQUFzIZvhRTehUnhJsRF5fTeQ0SYf y9ED7RQSiXrGtMFs4u/bQiWG1Ckg+NxyN42goRo+Ghy8ieSnjzFC8Sh4PErCEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxhkq1BwRz172d for ; Fri, 10 Jul 2026 19:30:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1cfae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 19:30:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 6cd16ef19cd2 - stable/15 - ice(4): Add support for 40G maximal PMD speed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6cd16ef19cd2ceef6c57b7e21d399165bb05328e Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 19:30:43 +0000 Message-Id: <6a514863.1cfae.1d62f752@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=6cd16ef19cd2ceef6c57b7e21d399165bb05328e commit 6cd16ef19cd2ceef6c57b7e21d399165bb05328e Author: Krzysztof Galazka AuthorDate: 2025-12-05 22:02:45 +0000 Commit: Krzysztof Galazka CommitDate: 2026-07-10 19:30:21 +0000 ice(4): Add support for 40G maximal PMD speed E823 backplane devices may support 40G as maximal PMD speed. Extend port topology reading logic to handle this case. While at that fix indentation according to FreeBSD style(9). Signed-off-by: Krzysztof Galazka Tested by: gowtham.kumar.ks_intel.com Approved by: kbowling (mentor), erj (mentor) Sponsored by: Intel Corporation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53587 (cherry picked from commit c6212b7da110d82b1d0086ec525deb216993021e) --- sys/dev/ice/ice_adminq_cmd.h | 1 + sys/dev/ice/ice_lib.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index 6225abc0f38b..b2dde986dd23 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -2131,6 +2131,7 @@ struct ice_aqc_get_port_options_elem { #define ICE_AQC_PORT_OPT_MAX_LANE_50G 6 #define ICE_AQC_PORT_OPT_MAX_LANE_100G 7 #define ICE_AQC_PORT_OPT_MAX_LANE_200G 8 +#define ICE_AQC_PORT_OPT_MAX_LANE_40G 9 u8 global_scid[2]; u8 phy_scid[2]; u8 pf2port_cid[2]; diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index cfaa54bc0306..9ae27d7bed87 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -11346,10 +11346,10 @@ ice_get_port_topology(struct ice_hw *hw, u8 lport, return err; if (cage_type == 0x11 || /* SFP */ - cage_type == 0x12) { /* SFP28 */ + cage_type == 0x12) { /* SFP28 */ port_topology->serdes_lane_count = 1; } else if (cage_type == 0x13 || /* QSFP */ - cage_type == 0x14) { /* QSFP28 */ + cage_type == 0x14) { /* QSFP28 */ u8 max_speed = 0; err = ice_get_maxspeed(hw, port_topology->primary_serdes_lane, @@ -11364,7 +11364,8 @@ ice_get_port_topology(struct ice_hw *hw, u8 lport, if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_100G) port_topology->serdes_lane_count = 4; - else if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_50G) + else if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_50G || + max_speed == ICE_AQC_PORT_OPT_MAX_LANE_40G) port_topology->serdes_lane_count = 2; else port_topology->serdes_lane_count = 1; From nobody Sat Jul 11 01:02:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxr5P2k4rz6kbMv for ; Sat, 11 Jul 2026 01:02: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxr5P063Bz3Djc for ; Sat, 11 Jul 2026 01:02:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783731737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HN6elW7BwMINptoorHhV2v9tJl2x6LXqBZZNPOmTldc=; b=OjZEppD3fOvBM53F9XKgrtUEiEm2K79tQMUrskaramkDCZJBmkjrM5orlQbQxnhgXozBkS btPVfBmCATyB6oalIENJDg+VT/NyzfdGOpQd3ZUbYnMqoMKCEcbIeEZRYm+F5F1XVvu5tS q12qxgoF+bbEldJn96UqM4uPnZAsNEUi6TYHZl4XQbdGdg99cSVkdyParBDJ97o0U5t6VE LKGd14y6Yp7/0/OlFu+oyLuBatUzoeKhE67zFy8TmnirvnzqSX/i/6oxpcFVKtZXx1SkNy m6tDdVC0qpdR0hKkIeERpCRb1Df3Ikg0UYN9SmQKCFgBsSwclLD+Lr+4OrggxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783731737; a=rsa-sha256; cv=none; b=w3M58hlzLUdhn+fXkinxtaKhlCo4w1XqXFF8WrWeWrHfTQ6HwnAwHCHNmswuyd9y2NuKY/ p+tzXHGAw8vu62W2naS8X+tho6BkVLEATjUmjGtPHgnkoWR7duxoA3yl6r6teryeDjBPjM 1eHnyjfVj035+LVPDkMWe4cuP6cjoOhOhiubzZvEhOXECqHyHsMD85wUK7wEL17qdGf9yl 4ThoktpG4NkKOUDkEc+g9ceVOX3yZFU9pPgXigukRCy7tGa+xFE0Qu2l1zG+fanu7hGsNO E5nR/56BWaJkN+RBsf7tmcFJ/jzHYNH/sVHpV64q/BnEzV67LDOuSXoMtv7/xQ== 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=1783731737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HN6elW7BwMINptoorHhV2v9tJl2x6LXqBZZNPOmTldc=; b=aLEWOVSvIZu5mUx2wHRL+CU2JqklTCAkq9QuH+ut6AEKeGkEO0gPTrLqA9S3kSgoAm399F YITgvT2SdQjWgdtx4jPeRmzw/jIKERekcJQW8yRIycX6qRhUObLVMddwyuaV24JL5lDk2p XCBbfAb+eBvaH8ev9DnTMXaohM70PEjRWhEG2Cq/4FG6cCg0QFZLWBw9PMFfBbX+8kYHTg NctfuK86/L6m+SmpnpAynPjLQ0QdfNr3MAFKg1fR29wMhpe51VV7npH5261GBGrXoP592a ne3zIAUpLM6dxEPadisV4C1TcHq2BY9ahjufQnztgTb9/a+t9xgaHcN37lbD0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxr5N5RBRz3Yd for ; Sat, 11 Jul 2026 01:02:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20dc6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Jul 2026 01:02:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: d2b2fac918a4 - stable/15 - nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d2b2fac918a447ea04a3321c10ffe1f0efe19261 Auto-Submitted: auto-generated Date: Sat, 11 Jul 2026 01:02:16 +0000 Message-Id: <6a519618.20dc6.102d812@gitrepo.freebsd.org> The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=d2b2fac918a447ea04a3321c10ffe1f0efe19261 commit d2b2fac918a447ea04a3321c10ffe1f0efe19261 Author: Rick Macklem AuthorDate: 2026-06-27 23:35:20 +0000 Commit: Rick Macklem CommitDate: 2026-07-11 01:00:18 +0000 nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2 Recent testing with a modified NFSv4.1/4.2 client that sometimes ignored CB_RECALL callbacks, identified a few problems when handling the unusual case of CB_RECALL not be performed by the client. - The csa_cachethis argument to CB_SEQUENCE was being ignored. - The CB_SEQUENCE operation would reply NFSERR_DELAY after the first CB_RECALL attempt, making retries ineffective. - The code could return NFSERR_RESOURCE, which is a NFSv4.0 specific error code. This patch fixes the above three problems. The patch only affects the NFSv4.1/4.2 client when delegations are being issued and the client somehow fails to handle a CB_RECALL callback of a delegation, which is an unusual case. (cherry picked from commit 9e1bbfb88e986b209709ea765189a3ebb6581bcd) --- sys/fs/nfsclient/nfs_clstate.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index a511c31d5202..93e543197265 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -3585,7 +3585,7 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) mount_t mp; nfsattrbit_t attrbits, rattrbits; nfsv4stateid_t stateid; - uint32_t seqid, slotid = 0, highslot, cachethis __unused; + uint32_t seqid, slotid = 0, highslot, cachethis; uint8_t sessionid[NFSX_V4SESSIONID]; struct mbuf *rep; struct nfscllayout *lyp; @@ -3596,6 +3596,7 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) struct nfsclsession *tsep; gotseq_ok = 0; + cachethis = 0; nfsrvd_rephead(nd); NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); taglen = fxdr_unsigned(int, *tl); @@ -3922,6 +3923,9 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) error = nfsv4_seqsession(seqid, slotid, highslot, tsep->nfsess_cbslots, &rep, tsep->nfsess_backslots); + /* For callbacks, do not reply NFSERR_DELAY. */ + if (error == NFSERR_DELAY) + error = 0; } NFSUNLOCKCLSTATE(); if (error == 0 || error == NFSERR_REPLYFROMCACHE) { @@ -4065,8 +4069,9 @@ nfsmout: } *nd->nd_errp = nfscl_errmap(nd, minorvers); out: - if (gotseq_ok != 0) { + if (gotseq_ok != 0 && cachethis != 0) { rep = m_copym(nd->nd_mreq, 0, M_COPYALL, M_WAITOK); + NFSCL_DEBUG(4, "Got reply for cbcache=%p\n", rep); NFSLOCKCLSTATE(); clp = nfscl_getclntsess(sessionid); if (clp != NULL) { @@ -5283,6 +5288,8 @@ nfscl_errmap(struct nfsrv_descript *nd, u_int32_t minorvers) while (*++errp) if (*errp == (short)nd->nd_repstat) return (txdr_unsigned(nd->nd_repstat)); + if (minorvers > NFSV4_MINORVERSION && *defaulterrp == NFSERR_RESOURCE) + return (txdr_unsigned(NFSERR_SERVERFAULT)); return (txdr_unsigned(*defaulterrp)); } From nobody Sat Jul 11 01:06:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxrBj2LQcz6kbTb for ; Sat, 11 Jul 2026 01:06: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxrBj1jhcz3FYd for ; Sat, 11 Jul 2026 01:06:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783732013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UACY0Hf4YM7XmQQblTwJA/QZiwHou6eP3ZsCyeVuS7o=; b=Zt+nUGAwTlFV16AAaniV/lmB/WYcqjtLUw8N93QtTx0ui14GPr4bcIbLIzWjx4rV51S6Wd 4GFq8Ul2S94N3rKZEyIVWYzazkKzeGNXAJwnUCsR46O8ZmwzR91PIVH23i1F93VN4FOWa9 f5K9N2NDRdbwuakkg5JeeNRHafCHTvqocnEAvUiznsZUeFmNzBSOK3XLd30fKGZxtxk0OD OIOy325OiQIpBwWTW0b/boxGhK/D8u82sQ5rdiMSGj3l5CXpwdvsYo4k6PgPlml9+t9RXJ H/bLNaf828fUzbx1fmlrSLBumJpqQjtGswLr6sHMjU4zO41jOWlPJZHBvf3zzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783732013; a=rsa-sha256; cv=none; b=lJJDNUc1XpBvhPRooiOa3cJeilyZAZIgQl1ldHS9rO34M1W0BaSfyNS/kLFaWIw7S40d7W 98QK8EcTurDpAqAYK7A4mkAmLgE/NwrHPLGI1DtKWBSleo1CUtXrEKGBw7X78U2p41DCNV IQaLa0kfx4VH5/vYOZqX3xDPpFQKra/gZgYi09D332Q8reDSomalYtBTdzlmm3c5cQ7sxo FyBa9LAqs3KB1hHYIZcySMRXAPDFP9rNuwGYPb3U9I5C7qFMtAAbOrSqo8aB5L3I8e2AOF 1txjvK8CQNrXwVWAKJ6qiXOVsg8Zilrbv+wSNLRtPp8VNl08/VLETXpg7uSCeA== 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=1783732013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UACY0Hf4YM7XmQQblTwJA/QZiwHou6eP3ZsCyeVuS7o=; b=gg6i7gvTVGlz/JWZ0qxcH2gdDH6PNqItuum8eMU/ZzuLSviwV5PNwsVH1zZeyiGcb2IEuo 6lbAGcIKd9sRSNTvt6Q4FpC4YFkeG+PTh0hpCDZW5e+Jxk4BEuRukezqjJUZAqoJeGIRG5 7KxsOqxiUaKBeW/07/jhSuKzkrPkEJuMXLhKMZki8aGGYIF77zU8NmzErg96yRwY4SE9j3 CH/axV0oqz3/iVqkpyDBvAKhF8rGd0Z4UBV4nibmsqdaqtjZFfAWVd6kDN3gwp4jXQGjXa atZZioD3CqasrBTJp8tODLKGGDrRV65ASTBnl3u0shDeeyXjjondwbMQbNvCDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxrBj0TkPz4H1 for ; Sat, 11 Jul 2026 01:06:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20e31 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Jul 2026 01:06:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: f28c41843a65 - stable/14 - nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f28c41843a65c8b70024bd650b8eb2c658e7d116 Auto-Submitted: auto-generated Date: Sat, 11 Jul 2026 01:06:53 +0000 Message-Id: <6a51972d.20e31.411fe205@gitrepo.freebsd.org> The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f28c41843a65c8b70024bd650b8eb2c658e7d116 commit f28c41843a65c8b70024bd650b8eb2c658e7d116 Author: Rick Macklem AuthorDate: 2026-06-27 23:35:20 +0000 Commit: Rick Macklem CommitDate: 2026-07-11 01:05:29 +0000 nfs_clstate.c: Fix CB_RECALL handling for NFSv4.1/4.2 Recent testing with a modified NFSv4.1/4.2 client that sometimes ignored CB_RECALL callbacks, identified a few problems when handling the unusual case of CB_RECALL not be performed by the client. - The csa_cachethis argument to CB_SEQUENCE was being ignored. - The CB_SEQUENCE operation would reply NFSERR_DELAY after the first CB_RECALL attempt, making retries ineffective. - The code could return NFSERR_RESOURCE, which is a NFSv4.0 specific error code. This patch fixes the above three problems. The patch only affects the NFSv4.1/4.2 client when delegations are being issued and the client somehow fails to handle a CB_RECALL callback of a delegation, which is an unusual case. (cherry picked from commit 9e1bbfb88e986b209709ea765189a3ebb6581bcd) --- sys/fs/nfsclient/nfs_clstate.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 7d0d5e2120bb..624b782baf6e 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -3573,7 +3573,7 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) mount_t mp; nfsattrbit_t attrbits, rattrbits; nfsv4stateid_t stateid; - uint32_t seqid, slotid = 0, highslot, cachethis __unused; + uint32_t seqid, slotid = 0, highslot, cachethis; uint8_t sessionid[NFSX_V4SESSIONID]; struct mbuf *rep; struct nfscllayout *lyp; @@ -3584,6 +3584,7 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) struct nfsclsession *tsep; gotseq_ok = 0; + cachethis = 0; nfsrvd_rephead(nd); NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); taglen = fxdr_unsigned(int, *tl); @@ -3917,6 +3918,9 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) error = nfsv4_seqsession(seqid, slotid, highslot, tsep->nfsess_cbslots, &rep, tsep->nfsess_backslots); + /* For callbacks, do not reply NFSERR_DELAY. */ + if (error == NFSERR_DELAY) + error = 0; } NFSUNLOCKCLSTATE(); if (error == 0 || error == NFSERR_REPLYFROMCACHE) { @@ -4060,8 +4064,9 @@ nfsmout: } *nd->nd_errp = nfscl_errmap(nd, minorvers); out: - if (gotseq_ok != 0) { + if (gotseq_ok != 0 && cachethis != 0) { rep = m_copym(nd->nd_mreq, 0, M_COPYALL, M_WAITOK); + NFSCL_DEBUG(4, "Got reply for cbcache=%p\n", rep); NFSLOCKCLSTATE(); clp = nfscl_getclntsess(sessionid); if (clp != NULL) { @@ -5278,6 +5283,8 @@ nfscl_errmap(struct nfsrv_descript *nd, u_int32_t minorvers) while (*++errp) if (*errp == (short)nd->nd_repstat) return (txdr_unsigned(nd->nd_repstat)); + if (minorvers > NFSV4_MINORVERSION && *defaulterrp == NFSERR_RESOURCE) + return (txdr_unsigned(NFSERR_SERVERFAULT)); return (txdr_unsigned(*defaulterrp)); } From nobody Sat Jul 11 09:48:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gy3mr588Yz6knBt for ; Sat, 11 Jul 2026 09:48: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gy3mr3lXyz44S2 for ; Sat, 11 Jul 2026 09:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783763324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ur5pV3VYga1aRpjaePwhict8X++lybnswPo8dwVbwyk=; b=rkLjjBxT46MP0mRcysys+CBBXg9cmLHxlWS9knDekPWd6Dplm8WD4JPPW8Cy30Xw27ZI+a 62qg5M5WJlAnXJwpQWAh65meez7pD4CJVq/7+MCQn1IqPP6kSE+hG1mM8G2yQzdy4DQ1yU PUiEEyN8NS6MVaXF0xdwjQC7UJLzK/unnw6ybiIh3rxpwVVZOtmbr6q1kx7y0KFyTygLxX nXNEhOI7QLbyYelVKfu0wcoo+DlVFyBKlDfalMT8+5qD3dU5UNdeeGXmHUPLKXoJD/mocX 1Se1KGzz+4lfYWqRf5GAs7GjPomT++2AICtv7jzl4JfKROyazZ55xFo+2uIozA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783763324; a=rsa-sha256; cv=none; b=o0QG7Hh87ugiKpP0cTRuufrz70wv7JzCDy4MtqlnrBspwlz+yVJFzCscf6h/WMk2Khc5E8 rPvsOBPCphygAaFIUTk8tkI2ONXzVlee7G8s298ELePLhQ+epTtnEkf6Tim1N5eLAV7LB0 49gg2bpZEwfSfiQG6dp1X5+Qq3a7V61QApwud07dXXiuSX+PSNn9nxbZ+0u4jN7CNj4S4m fRkKy2c9yfwvdWdaakyjzPnA1JeQgQSA/ehu1o9tZSKu3jat48iUELesKCa5gtE4J1GOtG 7X680212W7+1shlFb2ZorPxl2jXvYmVWOAd3u8oqex6+7H67CXyILUXBDGxHYA== 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=1783763324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ur5pV3VYga1aRpjaePwhict8X++lybnswPo8dwVbwyk=; b=XVoHNjE/15wltMo+n+GDqVv+XBd/KjT2uaUQs3iF49kxScixpr//3DrEjVygsV+8J70knN UaUE1QHaGdDTI7Ewb6qvSGck892FlpVCW45Z74zZBFwSW9WRswIpPh76xkd6l2pmWXlWM1 qCxhAzX1nkSeYBdKIeCL7juy9DxKNqM5RW5o70Jw1AympdRSuphZ7Hig/LbjPrHv2Rlcs3 B9I/E4pFxA6nmwktXIK6mHW279urRzYjoxrlansVLQwjJygBy8nPAZ4LIFrBUMfCjPiiP+ q2rWEVM372pB5YcY9iAmItEFM6V623oCGmT0PCoPcZ5EypFZoYuTDK8kug+OMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gy3mr2H3qzcYv for ; Sat, 11 Jul 2026 09:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 380fd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Jul 2026 09:48:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 6470095eaa17 - stable/15 - contrib/tzdata: import tzdata 2026c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 6470095eaa17bcce58bb02b11e6fce05b486ba17 Auto-Submitted: auto-generated Date: Sat, 11 Jul 2026 09:48:44 +0000 Message-Id: <6a52117c.380fd.5261d6a3@gitrepo.freebsd.org> The branch stable/15 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=6470095eaa17bcce58bb02b11e6fce05b486ba17 commit 6470095eaa17bcce58bb02b11e6fce05b486ba17 Author: Philip Paeps AuthorDate: 2026-07-08 20:46:28 +0000 Commit: Philip Paeps CommitDate: 2026-07-11 09:48:05 +0000 contrib/tzdata: import tzdata 2026c Changes: https://github.com/eggert/tz/blob/2026c/NEWS (cherry picked from commit 665bb2d9a440d33e2ec2f9151e45b8cda93433ae) --- contrib/tzdata/Makefile | 45 ++++----- contrib/tzdata/NEWS | 79 ++++++++++++++-- contrib/tzdata/africa | 191 +++++++-------------------------------- contrib/tzdata/australasia | 2 +- contrib/tzdata/europe | 21 +++-- contrib/tzdata/leap-seconds.list | 8 +- contrib/tzdata/leapseconds | 8 +- contrib/tzdata/northamerica | 121 ++++++++++++++++++++++--- contrib/tzdata/theory.html | 18 ++-- contrib/tzdata/version | 2 +- contrib/tzdata/ziguard.awk | 8 +- contrib/tzdata/zone.tab | 2 +- contrib/tzdata/zone1970.tab | 2 +- contrib/tzdata/zonenow.tab | 9 +- 14 files changed, 272 insertions(+), 244 deletions(-) diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index 1e0a5903534d..f5a22f1896a4 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -114,7 +114,7 @@ ZDUMPDIR = $(BINDIR) # The "zic" command goes in: ZICDIR = $(TOPDIR)/$(USRDIR)/sbin -# Manual pages go in subdirectories of. . . +# Manual pages go in subdirectories of: MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man # Library functions are put in an archive in LIBDIR. @@ -145,7 +145,7 @@ TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \ # nonnegative TZ_CHANGE_INTERVAL also assumes this, so to be compatible with # these, use "posix_only" or "posix_right". Use POSIX time on systems with # leap smearing; this can work better than unsmeared "right" time with -# applications that are not leap second aware, and is closer to unsmeared +# applications that are not aware of leap seconds, and is closer to unsmeared # "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). REDO= posix_only @@ -295,10 +295,10 @@ LDLIBS= # -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; # not needed by the main-program tz code, which is single-threaded. # Append other compiler flags as needed, e.g., -pthread on GNU/Linux. -# The following options can also be used: +# With -DTHREAD_SAFE the following options can also be used: # -DTHREAD_PREFER_SINGLE to prefer speed in single-threaded apps, # at some cost in CPU time and energy in multi-threaded apps. -# The following options can also be used: +# With -DTHREAD_PREFER_SINGLE the following options can also be used: # -DHAVE___ISTHREADED=1 if there is an extern int __isthreaded # variable, 0 otherwise (default is guessed) # -DHAVE_SYS_SINGLE_THREADED_H=0 if works, @@ -377,12 +377,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ -Wdeclaration-after-statement -Wdouble-promotion \ -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \ -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ - -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \ + -Wfree-labels -Wimplicit-fallthrough=5 -Winit-self \ + -Wkeyword-macro -Wlogical-op \ -Wmissing-declarations -Wmissing-prototypes \ -Wmissing-variable-declarations -Wnested-externs \ -Wnull-dereference \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \ - -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ + -Wshadow -Wshift-overflow=2 \ -Wstrict-prototypes -Wstringop-overflow=4 \ -Wsuggest-attribute=cold \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ @@ -533,7 +534,7 @@ ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' # mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work. # Also, it is better (though not essential) if 'awk' supports UTF-8, # and unfortunately mawk and busybox awk do not support UTF-8. -# Try AWK=gawk or AWK=nawk if your awk has the abovementioned problems. +# Try AWK=gawk or AWK=nawk if your awk has the problems mentioned above. AWK= awk # The full path name of a POSIX-compliant shell, preferably one that supports @@ -913,7 +914,7 @@ tzselect: tzselect.ksh version check: check_mild back.ck now.ck check_mild: check_web check_zishrink \ character-set.ck white-space.ck links.ck mainguard.ck \ - name-lengths.ck slashed-abbrs.ck sorted.ck \ + name-lengths.ck news.ck slashed-abbrs.ck sorted.ck \ tables.ck ziguard.ck tzs.ck # True if UTF8_LOCALE does not work; @@ -1083,6 +1084,12 @@ zishrink-posix.ck zishrink-right.ck: \ rm -fr $@d t-$@d shrunk-$@d touch $@ +# Check that NEWS has data release versions and dates in reverse order. +news.ck: NEWS + grep '^Release [0-9][0-9][0-9][0-9]' NEWS | LC_ALL=C sort -cru + sed -n '/ -0000$$/!s/^Release [^ ]*//p' NEWS|LC_ALL=C sort -cru + touch $@ + clean_misc: rm -fr *.ckd *.dir rm -f *.ck *.core *.o *.out *.t core core.* \ @@ -1139,7 +1146,8 @@ SET_TIMESTAMP_N = sh -c '\ # If DEST depends on A B C ... in this Makefile, callers should use # $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any # downstream 'make' that considers equal timestamps to be out of date. -# POSIX allows this 'make' behavior, and HP-UX 'make' does it. +# POSIX allows this 'make' behavior, although only HP-UX 'make' +# (which is no longer supported) did things that way. # If all that matters is that the timestamp be reproducible # and plausible, use $(SET_TIMESTAMP). SET_TIMESTAMP = $(SET_TIMESTAMP_N) 0 @@ -1399,24 +1407,6 @@ $(ALL_ASC): $(SET_TIMESTAMP) $(@:.t=) $(?:.t=) touch $@ -TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T -typecheck: long-long.ck unsigned.ck -long-long.ck unsigned.ck: $(VERSION_DEPS) - rm -fr $@d - mkdir $@d - ln $(VERSION_DEPS) $@d - cd $@d && \ - case $@ in \ - long-long.*) i="long long";; \ - unsigned.* ) i="unsigned" ;; \ - esac && \ - $(MAKE) \ - CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \ - TOPDIR="$$PWD" \ - install - $@d/zdump -i -c 1970,1971 Europe/Rome - touch $@ - zonenames: tzdata.zi @$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi @@ -1442,6 +1432,5 @@ zic.o: private.h tzdir.h tzfile.h version.h .PHONY: traditional_signatures traditional_signatures_version .PHONY: traditional_tarballs traditional_tarballs_version .PHONY: tailored_tarballs tailored_tarballs_version -.PHONY: typecheck .PHONY: zonenames zones .PHONY: $(ZDS) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index a0042701c687..dd962b54d529 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,6 +1,69 @@ News for the tz database -Release 2026a - 2026-04-22 23:06:43 -0700 +Release 2026c - 2026-07-08 10:23:58 -0700 + + Briefly: + Alberta moved to permanent -06 on 2026-06-18. + Morocco moves to permanent +00 on 2026-09-20. + More integer overflow bugs have been fixed in zic. + + Changes to future timestamps + + Alberta’s 2026-03-08 spring forward was its last foreseeable clock + change, as it moved to permanent -06 thereafter. (Thanks to Roozbeh + Pournader and others.) Model this with its traditional abbreviation + CST. Although the change to permanent -06 legally took place on + 2026-06-18, temporarily model the change to occur on 2026-11-01 at + 02:00 instead, for the same reason we introduced a similarly + temporary hack for British Columbia in 2026b. + + Although another TZDB release will likely be needed soon because + Northwest Territories will likely follow Alberta, the legal + formalities have not yet taken place. + + Morocco plans to move back to permanent UTC, without daylight + saving time transitions, on 2026-09-20 at 02:00. This also + affects Western Sahara. + + Changes to code + + zic no longer overflows integers when processing outlandish input + like ‘Zone Ouch 0 - LMT 9223372036854775807’, ‘Zone Ouch 0 + 2562047788015215 LMT’, ‘Zone Ouch -2562047788015215:30:08 - LMT’, + and ‘Zone Ouch -2562047788015215:30:08 - %%z’. This avoids + undefined behavior in C. (Problems reported by Naveed Khan.) + + On platforms that have EFTYPE, tzalloc now fails with errno set to + EFTYPE, not EINVAL, if it detects that the TZif file has an + invalid format or is not a regular file. Formerly it did this + only on NetBSD, and only when the file was not a regular file. + + Unprivileged programs no longer require TZif files to be regular + files or reject relative names containing ".." components. This + reverts to the more-permissive 2025b behavior, as the stricter + behavior did not catch on in FreeBSD. + + zic now reports any failure to remove a temporary file when + cleaning up after a previous failure. (Problem reported by Tom + Lane.) + + Changes to commentary + + Northwest Territories is expected to move to permanent -06 prior to + 2026-11-01 02:00, when clocks would otherwise fall back. (Thanks to + Tim Parenti and James Bellaire.) Model this with its traditional + abbreviation CST. Unfortunately the change is not yet official, so + it is currently present only as comments that can be uncommented as + needed. + + Changes to build procedure + + The undocumented ‘typecheck’ Makefile check rule has been removed. + It stopped working in 2025a and evidently nobody noticed. + The rule was superseded by ‘check_time_t_alternatives’ in 2013d. + + +Release 2026b - 2026-04-22 23:06:43 -0700 Briefly: British Columbia moved to permanent -07 on 2026-03-09. @@ -13,7 +76,7 @@ Release 2026a - 2026-04-22 23:06:43 -0700 (Thanks to Arthur David Olson.) Although the change to permanent -07 legally took place on 2026-03-09, temporarily model the change to occur on 2026-11-01 at 02:00 instead. This works around a - limitation in CLDR v48.2 (2026-03-17). This temporary hack is + limitation in CLDR 48.1 (2026-01-08). This temporary hack is planned to be removed after CLDR is fixed. Changes to code @@ -99,7 +162,7 @@ Release 2026a - 2026-03-01 22:59:49 -0800 than attempting to override this fallback with the contents of the posixrules file. This removes library support that was declared obsolete in release 2019b, and fixes some undefined behavior. - (Undefined behavior reported by GitHub user Naveed8951.) + (Undefined behavior reported by Naveed Khan.) The posix2time, posix2time_z, time2posix, and time2posix_z functions now set errno=EOVERFLOW and return ((time_t) -1) if the @@ -111,7 +174,7 @@ Release 2026a - 2026-03-01 22:59:49 -0800 Some other undefined behavior, triggered by TZif files containing outlandish but conforming UT offsets or leap second corrections, - has also been fixed. (Some of these bugs reported by Naveed8951.) + has also been fixed. (Some of these bugs reported by Naveed Khan.) localtime.c no longer rejects TZif files that exactly fit in its internal structures, fixing off-by-one typos introduced in 2014g. @@ -221,7 +284,7 @@ Release 2025c - 2025-12-10 14:42:37 -0800 rarely changing and many threads call tzcode simultaneously. It costs more CPU time and energy. - The new CFLAGS option -TTHREAD_TM_MULTI causes localtime to return + The new CFLAGS option -DTHREAD_TM_MULTI causes localtime to return a pointer to thread-specific memory, as FreeBSD does, instead of to the same memory in all threads. This supports nonportable programs that incorrectly use localtime instead of localtime_r. @@ -551,7 +614,7 @@ Release 2024a - 2024-02-01 09:28:56 -0800 The leap-seconds.list file is now copied from the IERS instead of from its downstream counterpart at NIST, as the IERS version is now in the public domain too and tends to be more up-to-date. - (Thanks to Martin Burnicki for liaisoning with the IERS.) + (Thanks to Martin Burnicki for liaising with the IERS.) Changes to documentation @@ -1709,7 +1772,7 @@ Release 2020a - 2020-04-23 16:03:47 -0700 zic -L now supports an Expires line in the leapseconds file, and truncates the TZif output accordingly. This propagates leap second expiration information into the TZif file, and avoids the - abovementioned localtime.c bug as well as similar bugs present in + localtime.c bug mentioned above, as well as similar bugs present in many client implementations. If no Expires line is present, zic -L instead truncates the TZif output based on the #expires comment present in leapseconds files distributed by tzdb 2018f and later; @@ -6666,7 +6729,7 @@ few (e.g., code2012c-data2012d) have tarballs with mixed version numbers. Recent releases also come in an experimental format consisting of a single tarball tzdb-R.tar.lz with extra data. -Release timestamps are taken from the release's commit (for newer, +A release’s timestamp is taken from the release’s commit (for newer, Git-based releases), from the newest file in the tarball (for older releases, where this info is available) or from the email announcing the release (if all else fails; these are marked with a time zone diff --git a/contrib/tzdata/africa b/contrib/tzdata/africa index ec067bee524d..2965736a0b0e 100644 --- a/contrib/tzdata/africa +++ b/contrib/tzdata/africa @@ -597,6 +597,24 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # Morocco # See Africa/Ceuta for Spanish Morocco. +# From Paul Eggert (2026-06-26): +# In “Morocco’s GMT+1, a century of shifting time and a debate far from over” +# https://en.yabiladi.com/articles/details/191310/morocco-s-gmt1-century-shifting-time +# (2026-03-30), Yabiladi’s Latifa Babas reports the following: +# * A 1913-10-26 royal dahir established GMT as legal time in Morocco. +# * A 1918-05-10 dahir instituted DST on 1918-05-16 at 00:00. +# * A September 1939 dahir restarted DST on 1939-09-12. +# * A February 1940 dahir restarted DST as early as 1940-02-25. +# * Standard time resumed in September 1946. +# * A June 1950 decree restarted DST, which ran until as late as October. +# * Royal decree 455-67 (1967-06-02) restarted DST on June 3 at noon. +# * After 1967 Morocco used DST “during several summers, particularly +# throughout the 1970s and 1980s.” +# Babas consulted official records that disagree with and are surely +# more correct than our pre-2008 timestamp data, which came from the +# unreliable Shanks & Pottenger. Unfortunately, Babas did not provide +# enough detail to correct our data. + # From Alex Krivenyshev (2008-05-09): # Here is an article that Morocco plan to introduce Daylight Saving Time between # 1 June, 2008 and 27 September, 2008. @@ -850,33 +868,16 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # The return to legal GMT time will take place this Sunday, March 19 at 3 a.m. # ... the return to GMT+1 will be made on Sunday April 23, 2023 at 2 a.m. # https://www.mmsp.gov.ma/fr/actualites/passage-à-l%E2%80%99heure-gmt-à-partir-du-dimanche-19-mars-2023 -# -# From Paul Eggert (2023-03-14): -# For now, guess that in the future Morocco will fall back at 03:00 -# the last Sunday before Ramadan, and spring forward at 02:00 the -# first Sunday after one day after Ramadan. To implement this, -# transition dates and times for 2019 through 2087 were determined by -# running the following program under GNU Emacs 28.2. (This algorithm -# also produces the correct transition dates for 2016 through 2018, -# though the times differ due to Morocco's time zone change in 2018.) -# (let ((islamic-year 1440)) -# (require 'cal-islam) -# (while (< islamic-year 1511) -# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) -# (b (+ 1 (calendar-islamic-to-absolute (list 10 1 islamic-year)))) -# (sunday 0)) -# (while (/= sunday (mod (setq a (1- a)) 7))) -# (while (/= sunday (mod b 7)) -# (setq b (1+ b))) -# (setq a (calendar-gregorian-from-absolute a)) -# (setq b (calendar-gregorian-from-absolute b)) -# (insert -# (format -# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t-1:00\t-\n" -# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t0\t-\n") -# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) -# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) -# (setq islamic-year (+ 1 islamic-year)))) + +# From Paul Eggert (2026-06-25): +# https://www.moroccoworldnews.com/2026/06/325034/confirmed-morocco-to-restore-gmt-on-september-20-ending-eight-year-gmt1-saga/ +# Today the Moroccan government adopted Decree No. 2.26.530, which abrogates +# the 2018 decree that put it at +01 with daylight saving during Ramadan. +# The plan is to go back to +00 without DST on 2026-09-20 at 02:00. +# From Anass Taghjichte (2026-07-03): +# https://www.sgg.gov.ma/BO/AR/3111/2026/BO_7521_Ar.pdf +# From Afaf EL MAAYATI (2026-07-06): +# https://www.mapexpress.ma/actualite/activite-gouvernementale/conseil-gouvernement-approuve-projet-decret-relatif-au-retour-lheure-legale/ # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Morocco 1939 only - Sep 12 0:00 1:00 - @@ -936,143 +937,14 @@ Rule Morocco 2025 only - Feb 23 3:00 -1:00 - Rule Morocco 2025 only - Apr 6 2:00 0 - Rule Morocco 2026 only - Feb 15 3:00 -1:00 - Rule Morocco 2026 only - Mar 22 2:00 0 - -Rule Morocco 2027 only - Feb 7 3:00 -1:00 - -Rule Morocco 2027 only - Mar 14 2:00 0 - -Rule Morocco 2028 only - Jan 23 3:00 -1:00 - -Rule Morocco 2028 only - Mar 5 2:00 0 - -Rule Morocco 2029 only - Jan 14 3:00 -1:00 - -Rule Morocco 2029 only - Feb 18 2:00 0 - -Rule Morocco 2029 only - Dec 30 3:00 -1:00 - -Rule Morocco 2030 only - Feb 10 2:00 0 - -Rule Morocco 2030 only - Dec 22 3:00 -1:00 - -Rule Morocco 2031 only - Jan 26 2:00 0 - -Rule Morocco 2031 only - Dec 14 3:00 -1:00 - -Rule Morocco 2032 only - Jan 18 2:00 0 - -Rule Morocco 2032 only - Nov 28 3:00 -1:00 - -Rule Morocco 2033 only - Jan 9 2:00 0 - -Rule Morocco 2033 only - Nov 20 3:00 -1:00 - -Rule Morocco 2033 only - Dec 25 2:00 0 - -Rule Morocco 2034 only - Nov 5 3:00 -1:00 - -Rule Morocco 2034 only - Dec 17 2:00 0 - -Rule Morocco 2035 only - Oct 28 3:00 -1:00 - -Rule Morocco 2035 only - Dec 9 2:00 0 - -Rule Morocco 2036 only - Oct 19 3:00 -1:00 - -Rule Morocco 2036 only - Nov 23 2:00 0 - -Rule Morocco 2037 only - Oct 4 3:00 -1:00 - -Rule Morocco 2037 only - Nov 15 2:00 0 - -Rule Morocco 2038 only - Sep 26 3:00 -1:00 - -Rule Morocco 2038 only - Oct 31 2:00 0 - -Rule Morocco 2039 only - Sep 18 3:00 -1:00 - -Rule Morocco 2039 only - Oct 23 2:00 0 - -Rule Morocco 2040 only - Sep 2 3:00 -1:00 - -Rule Morocco 2040 only - Oct 14 2:00 0 - -Rule Morocco 2041 only - Aug 25 3:00 -1:00 - -Rule Morocco 2041 only - Sep 29 2:00 0 - -Rule Morocco 2042 only - Aug 10 3:00 -1:00 - -Rule Morocco 2042 only - Sep 21 2:00 0 - -Rule Morocco 2043 only - Aug 2 3:00 -1:00 - -Rule Morocco 2043 only - Sep 13 2:00 0 - -Rule Morocco 2044 only - Jul 24 3:00 -1:00 - -Rule Morocco 2044 only - Aug 28 2:00 0 - -Rule Morocco 2045 only - Jul 9 3:00 -1:00 - -Rule Morocco 2045 only - Aug 20 2:00 0 - -Rule Morocco 2046 only - Jul 1 3:00 -1:00 - -Rule Morocco 2046 only - Aug 5 2:00 0 - -Rule Morocco 2047 only - Jun 23 3:00 -1:00 - -Rule Morocco 2047 only - Jul 28 2:00 0 - -Rule Morocco 2048 only - Jun 7 3:00 -1:00 - -Rule Morocco 2048 only - Jul 19 2:00 0 - -Rule Morocco 2049 only - May 30 3:00 -1:00 - -Rule Morocco 2049 only - Jul 4 2:00 0 - -Rule Morocco 2050 only - May 15 3:00 -1:00 - -Rule Morocco 2050 only - Jun 26 2:00 0 - -Rule Morocco 2051 only - May 7 3:00 -1:00 - -Rule Morocco 2051 only - Jun 18 2:00 0 - -Rule Morocco 2052 only - Apr 28 3:00 -1:00 - -Rule Morocco 2052 only - Jun 2 2:00 0 - -Rule Morocco 2053 only - Apr 13 3:00 -1:00 - -Rule Morocco 2053 only - May 25 2:00 0 - -Rule Morocco 2054 only - Apr 5 3:00 -1:00 - -Rule Morocco 2054 only - May 10 2:00 0 - -Rule Morocco 2055 only - Mar 28 3:00 -1:00 - -Rule Morocco 2055 only - May 2 2:00 0 - -Rule Morocco 2056 only - Mar 12 3:00 -1:00 - -Rule Morocco 2056 only - Apr 23 2:00 0 - -Rule Morocco 2057 only - Mar 4 3:00 -1:00 - -Rule Morocco 2057 only - Apr 8 2:00 0 - -Rule Morocco 2058 only - Feb 17 3:00 -1:00 - -Rule Morocco 2058 only - Mar 31 2:00 0 - -Rule Morocco 2059 only - Feb 9 3:00 -1:00 - -Rule Morocco 2059 only - Mar 23 2:00 0 - -Rule Morocco 2060 only - Feb 1 3:00 -1:00 - -Rule Morocco 2060 only - Mar 7 2:00 0 - -Rule Morocco 2061 only - Jan 16 3:00 -1:00 - -Rule Morocco 2061 only - Feb 27 2:00 0 - -Rule Morocco 2062 only - Jan 8 3:00 -1:00 - -Rule Morocco 2062 only - Feb 12 2:00 0 - -Rule Morocco 2062 only - Dec 31 3:00 -1:00 - -Rule Morocco 2063 only - Feb 4 2:00 0 - -Rule Morocco 2063 only - Dec 16 3:00 -1:00 - -Rule Morocco 2064 only - Jan 27 2:00 0 - -Rule Morocco 2064 only - Dec 7 3:00 -1:00 - -Rule Morocco 2065 only - Jan 11 2:00 0 - -Rule Morocco 2065 only - Nov 22 3:00 -1:00 - -Rule Morocco 2066 only - Jan 3 2:00 0 - -Rule Morocco 2066 only - Nov 14 3:00 -1:00 - -Rule Morocco 2066 only - Dec 26 2:00 0 - -Rule Morocco 2067 only - Nov 6 3:00 -1:00 - -Rule Morocco 2067 only - Dec 11 2:00 0 - -Rule Morocco 2068 only - Oct 21 3:00 -1:00 - -Rule Morocco 2068 only - Dec 2 2:00 0 - -Rule Morocco 2069 only - Oct 13 3:00 -1:00 - -Rule Morocco 2069 only - Nov 17 2:00 0 - -Rule Morocco 2070 only - Oct 5 3:00 -1:00 - -Rule Morocco 2070 only - Nov 9 2:00 0 - -Rule Morocco 2071 only - Sep 20 3:00 -1:00 - -Rule Morocco 2071 only - Nov 1 2:00 0 - -Rule Morocco 2072 only - Sep 11 3:00 -1:00 - -Rule Morocco 2072 only - Oct 16 2:00 0 - -Rule Morocco 2073 only - Aug 27 3:00 -1:00 - -Rule Morocco 2073 only - Oct 8 2:00 0 - -Rule Morocco 2074 only - Aug 19 3:00 -1:00 - -Rule Morocco 2074 only - Sep 30 2:00 0 - -Rule Morocco 2075 only - Aug 11 3:00 -1:00 - -Rule Morocco 2075 only - Sep 15 2:00 0 - -Rule Morocco 2076 only - Jul 26 3:00 -1:00 - -Rule Morocco 2076 only - Sep 6 2:00 0 - -Rule Morocco 2077 only - Jul 18 3:00 -1:00 - -Rule Morocco 2077 only - Aug 22 2:00 0 - -Rule Morocco 2078 only - Jul 10 3:00 -1:00 - -Rule Morocco 2078 only - Aug 14 2:00 0 - -Rule Morocco 2079 only - Jun 25 3:00 -1:00 - -Rule Morocco 2079 only - Aug 6 2:00 0 - -Rule Morocco 2080 only - Jun 16 3:00 -1:00 - -Rule Morocco 2080 only - Jul 21 2:00 0 - -Rule Morocco 2081 only - Jun 1 3:00 -1:00 - -Rule Morocco 2081 only - Jul 13 2:00 0 - -Rule Morocco 2082 only - May 24 3:00 -1:00 - -Rule Morocco 2082 only - Jun 28 2:00 0 - -Rule Morocco 2083 only - May 16 3:00 -1:00 - -Rule Morocco 2083 only - Jun 20 2:00 0 - -Rule Morocco 2084 only - Apr 30 3:00 -1:00 - -Rule Morocco 2084 only - Jun 11 2:00 0 - -Rule Morocco 2085 only - Apr 22 3:00 -1:00 - -Rule Morocco 2085 only - May 27 2:00 0 - -Rule Morocco 2086 only - Apr 14 3:00 -1:00 - -Rule Morocco 2086 only - May 19 2:00 0 - -Rule Morocco 2087 only - Mar 30 3:00 -1:00 - -Rule Morocco 2087 only - May 11 2:00 0 - -# For dates after the somewhat-arbitrary cutoff of 2087, assume that -# Morocco will no longer observe DST. At some point this table will -# need to be extended, though quite possibly Morocco will change the -# rules first. # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 0:00 Morocco %z 1984 Mar 16 1:00 - %z 1986 0:00 Morocco %z 2018 Oct 28 3:00 - 1:00 Morocco %z + 1:00 Morocco %z 2026 Sep 20 2:00 + 0:00 - %z # Western Sahara # @@ -1088,7 +960,8 @@ Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún -1:00 - %z 1976 Apr 14 0:00 Morocco %z 2018 Oct 28 3:00 - 1:00 Morocco %z + 1:00 Morocco %z 2026 Sep 20 2:00 + 0:00 - %z # Botswana # Burundi diff --git a/contrib/tzdata/australasia b/contrib/tzdata/australasia index e52aab109bca..45ac6460391c 100644 --- a/contrib/tzdata/australasia +++ b/contrib/tzdata/australasia @@ -1721,7 +1721,7 @@ Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila # to Japanese rule was right before 1970, ... per the current tz database # rule, the information doesn't warrant creation of a new timezone for Bonin # Islands itself and is thus as an anecdotal note for interest purpose only. -# ... [The abovementioned link] described some special timekeeping phenomenon +# ... [The link mentioned above] described some special timekeeping phenomenon # regarding Marcus island, another remote island currently owned by Japanese # in the same administrative unit as Bonin Islands. Many reports claim that # the American coastal guard on the American quarter of the island use its own diff --git a/contrib/tzdata/europe b/contrib/tzdata/europe index 4127ec9dcf13..0dc31d9d85e6 100644 --- a/contrib/tzdata/europe +++ b/contrib/tzdata/europe @@ -230,7 +230,7 @@ # https://www.polyomino.org.uk/british-time/bbc-19410418.png # https://www.polyomino.org.uk/british-time/ho-19410421.png -# From Sir Alexander Maxwell in the above-mentioned letter (1941-04-21): +# From Sir Alexander Maxwell (1941-04-21) in the letter mentioned above: # [N]o official designation has as far as I know been adopted for the time # which is to be introduced in May.... # I cannot think of anything better than "Double British Summer Time" @@ -2015,7 +2015,7 @@ Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 # Valletta # From Roman Tudos (2015-07-02): # http://lex.justice.md/index.php?action=view&view=doc&lang=1&id=355077 # From Paul Eggert (2015-07-01): -# The abovementioned official link to IGO1445-868/2014 states that +# The above-mentioned official link to IGO1445-868/2014 states that # 2014-10-26's fallback transition occurred at 03:00 local time. Also, # https://www.trm.md/en/social/la-30-martie-vom-trece-la-ora-de-vara # says the 2014-03-30 spring-forward transition was at 02:00 local time. @@ -2380,10 +2380,17 @@ Zone Europe/Lisbon -0:36:45 - LMT 1884 # https://oal.ul.pt/hora-legal/legislacao/ # working backward through references of revocation and abrogation to # Decreto-Lei 47233 of 1966-10-01, the last time DST was abolished across the -# mainland and its adjacent islands. Because of that reference, it is -# therefore assumed that DST rules in the islands prior to 1966 were like that -# of the mainland, though most legislation of the time didn't explicitly -# specify DST practices for the islands. +# mainland and its adjacent islands. +# +# From Tim Parenti (2026-05-26): +# Observance of DST on the Azores and Madeira was explicitly covered by +# mainland legislation in: +# - Portaria 11767 of 1947-03-28 for 1947, +# - Portaria 12286 of 1948-02-19 for 1948, and +# - Decreto-Lei 37048 of 1948-09-07 through its revocation in 1966. +# (See mainland commentary, above.) However, most legislation prior to 1947 +# didn't explicitly call out these "adjacent islands", so we assume that DST +# rules on the islands prior to 1947 were also like that of the mainland. Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada -1:54:32 - HMT 1912 Jan 1 2:00u # Horta MT # Vanguard section, for zic and other parsers that support %z. @@ -2616,7 +2623,7 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct # http://astro.uni-altai.ru/~orion/blog/2011/11/novyie-granitsyi-chasovyih-poyasov-v-sssr/ # # From Paul Eggert (2018-07-16): -# Perhaps someone could translate the above-mentioned link and use it +# Perhaps someone could translate the link mentioned above, and use it # to correct our data for the ex-Soviet Union. It cites the following: # «Поясное время и новые границы часовых поясов» / сост. П.Н. Долгов, # отв. ред. Г.Д. Бурдун - М: Комитет стандартов, мер и измерительных diff --git a/contrib/tzdata/leap-seconds.list b/contrib/tzdata/leap-seconds.list index 0a111845eae4..0b5b000f8edd 100644 --- a/contrib/tzdata/leap-seconds.list +++ b/contrib/tzdata/leap-seconds.list @@ -60,15 +60,15 @@ # # The following line shows the last update of this file in NTP timestamp: # -#$ 3976686858 +#$ 3992312697 # # 2) Expiration date of the file given on a semi-annual basis: last June or last December # -# File expires on 28 December 2026 +# File expires on 28 June 2027 # # Expire date in NTP timestamp: # -#@ 4007404800 +#@ 4023129600 # # # LIST OF LEAP SECONDS @@ -117,4 +117,4 @@ # please see the readme file in the 'source' directory : # https://hpiers.obspm.fr/iers/bul/bulc/ntp/sources/README # -#h 2e101270 4e6749f8 2f1792b7 14a0c188 36bb19d6 +#h a9bad145 84c31c70 758402aa b37bfd54 5923836a diff --git a/contrib/tzdata/leapseconds b/contrib/tzdata/leapseconds index a796e4b4e22e..1fc7b8e880b3 100644 --- a/contrib/tzdata/leapseconds +++ b/contrib/tzdata/leapseconds @@ -70,7 +70,7 @@ Leap 2016 Dec 31 23:59:60 + S # Any additional leap seconds will come after this. # This Expires line is commented out for now, # so that pre-2020a zic implementations do not reject this file. -#Expires 2026 Dec 28 00:00:00 +#Expires 2027 Jun 28 00:00:00 # Here are POSIX timestamps for the data in this file. # "#updated" gives the last time the leap seconds data changed @@ -79,8 +79,8 @@ Leap 2016 Dec 31 23:59:60 + S # "#expires" gives the first time this file might be wrong; # if this file was derived from the IERS leap-seconds.list, # this is typically a bit less than one year after "updated". -#updated 1767698058 (2026-01-06 11:14:18 UTC) -#expires 1798416000 (2026-12-28 00:00:00 UTC) +#updated 1783323897 (2026-07-06 07:44:57 UTC) +#expires 1814140800 (2027-06-28 00:00:00 UTC) # Updated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) -# File expires on 28 December 2026 +# File expires on 28 June 2027 diff --git a/contrib/tzdata/northamerica b/contrib/tzdata/northamerica index 3e8641e1c20a..3c53eb602ec0 100644 --- a/contrib/tzdata/northamerica +++ b/contrib/tzdata/northamerica @@ -1742,6 +1742,22 @@ Zone America/Toronto -5:17:32 - LMT 1895 # Manitoba +# From Paul Eggert (2026-05-08): +# For 1916 timestamps America/Winnipeg covers only a small region. See: +# Cassidy C. Winnipeg’s 110-year history with daylight time. +# Winnipeg Free Press. 2026-05-06. +# https://www.winnipegfreepress.com/our-communities/correspondents/2026/05/06/winnipegs-110-year-history-with-daylight-time +# Of the 1916 experiment, Cassidy writes: “As rural areas and nearby +# urban centres such as Selkirk and Brandon did not adopt DST, the +# City of Winnipeg essentially had its own time zone.” Cassidy also +# writes that province-wide DST came into effect on 1963-05-12. +# +# Shanks & Pottenger write that Winnipeg did not observe DST in 1964 and 1965. +# Although dubious in the light of Cassidy’s article, we lack a better source. +# Perhaps S&P’s data are for the train stations, not for the city? +# Also, S&P say Manitoba switched at 02:00 (not 02:00s) starting in 1966. +# Since 02:00s is clearly correct for 1967 on, assume 02:00s in 1966 too. + # From Rob Douglas (2006-04-06): # the old Manitoba Time Act - as amended by Bill 2, assented to # March 27, 1987 ... said ... @@ -1756,11 +1772,6 @@ Zone America/Toronto -5:17:32 - LMT 1895 # the 1987 version would apply - the changeover was at 2:00 Central # Standard Time (i.e. not until 3:00 Central Daylight Time). -# From Paul Eggert (2006-04-10): -# Shanks & Pottenger say Manitoba switched at 02:00 (not 02:00s) -# starting 1966. Since 02:00s is clearly correct for 1967 on, assume -# it was also 02:00s in 1966. - # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Winn 1916 only - Apr 23 0:00 1:00 D Rule Winn 1916 only - Sep 17 0:00 0 S @@ -1852,6 +1863,22 @@ Zone America/Winnipeg -6:28:36 - LMT 1887 Jul 16 # long and rather painful to read. # http://www.qp.gov.sk.ca/documents/English/Statutes/Statutes/T14.pdf +# From Heitor David Pinto (2026-05-14): +# In Saskatchewan, a bill was passed to replace the Time Act. It sets UTC-6 all +# year in the whole province, including Lloydminster, but allows the government +# to issue regulations specifying a different time in localities that request +# so: +# https://docs.legassembly.sk.ca/legdocs/Bills/30L2S/Bill30-58.pdf +# The bill ... received royal assent today. +# From Tim Parenti (2026-05-14): +# In light of Alberta joining Saskatchewan on year-round -06, this simplifies +# the prior Act's framework for the many local exceptions to year-round -06 in +# border areas, by extending province-wide the notion of "time option areas" +# which can be prescribed by regulation "if it is in the provincial interest" +# for those areas to observe either "UTC-5, UTC-6 or UTC-7 for all or part of +# the year" on at least 30 days' notice. +# The new Act comes into force by order of the Lieutenant Governor in Council. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Regina 1918 only - Apr 14 2:00 1:00 D Rule Regina 1918 only - Oct 27 2:00 0 S @@ -1902,6 +1929,45 @@ Zone America/Swift_Current -7:11:20 - LMT 1905 Sep # Boyer JP. Forcing Choice: The Risky Reward of Referendums. Dundum. 2017. # ISBN 978-1459739123. +# From Roozbeh Pournader (2026-04-20): +# https://calgaryherald.com/opinion/columnists/bell-alberta-daylight-time-year-round-premier-danielle-smith +# +# From Tim Parenti (2026-04-23): +# Section 3 of Bill 31, the Red Tape Reduction Statutes Amendment Act, 2026 +# https://docs.assembly.ab.ca/LADDAR_files/docs/bills/bill/legislature_31/session_2/20251023_bill-031.pdf +# would repeal the Daylight Saving Time Act in the Revised Statutes of Alberta +# 2000 Chapter D-5: +# https://kings-printer.alberta.ca/documents/Acts/D05.pdf +# ...and substitutes a new chapter with language that closely parallels the +# original. The new title is the Official Time Act and will be numbered +# Chapter O-5.7. The Act establishes a standard time of UTC−6 without +# replacing the language previously used to effectuate DST. +# +# From Tim Parenti (2026-06-19): +# After receiving Royal Assent on 2026-05-14, Order in Council 204/2026 was +# issued on 2026-06-18 proclaiming the relevant section of the bill in force on +# the same date. Order in Council 206/2026, issued the same day, uses the +# regulatory authority within the Act to prescribe the official term "Alberta +# Time"; we use the traditional abbreviation CST for consistency. +# https://kings-printer.alberta.ca/Documents/Orders/Orders_in_Council/2026/2026_204.pdf +# https://kings-printer.alberta.ca/Documents/Orders/Orders_in_Council/2026/2026_206.pdf +# +# Since wall clock times do not diverge from past practice until 2026-11-01, +# use that transition date for now to work around potential CLDR limitations in +# the meantime; see British Columbia, below. +# +# From Paul Eggert (2026-07-02): +# The temporary hack for Alberta is needed for CLDR 48.2 (2026-03-17) +# and earlier, not the CLDR 48.1-and-earlier which drives BC’s temporary hack. +# Only a few platforms track minor CLDR releases, though, so the two +# temporary hacks have roughly the same effect in practice. +# +# The term “Alberta Time” is legally prescribed from yesterday until +# 2031-06-30, when the regulation in OiC 206/2026 expires to ensure that the +# term is reviewed by then for relevancy and need. This plan for possible +# obsolescence affects neither timekeeping nor TZDB’s data, which do +# not contain the string “Alberta Time”. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Edm 1918 1919 - Apr Sun>=8 2:00 1:00 D Rule Edm 1918 only - Oct 27 2:00 0 S @@ -1919,7 +1985,11 @@ Rule Edm 1972 2006 - Oct lastSun 2:00 0 S # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone America/Edmonton -7:33:52 - LMT 1906 Sep -7:00 Edm M%sT 1987 - -7:00 Canada M%sT + -7:00 Canada M%sT 2026 Jun 18 + # Temporary hack; see above. + -7:00 1:00 MDT 2026 Nov 1 2:00 + # End of temporary hack. + -6:00 - CST # British Columbia @@ -1962,7 +2032,7 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # on March 8 will be the last time change, ending twice-yearly clock changes.” # https://news.gov.bc.ca/releases/2026AG0013-000209 # -# From Paul Eggert (2026-03-07): +# From Paul Eggert (2026-07-02): # The law says that 21 hours after the usual 2026-03-08 02:00 switch from # PST to PDT, the next day inaugurates the new standard time Pacific Time, # i.e., just one clock change but two name changes separated by 21 hours. @@ -1971,13 +2041,14 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # I asked the BC government for advice, with no response. For now, do this: # 1. As a temporary hack, pretend that the BC law takes effect # not on 2026-03-09 at 00:00, but on 2026-11-01 at 02:00. -# This pretense works around a limitation in CLDR v48.2 (2026-03-17), +# This pretense works around a limitation in CLDR 48.1 (2026-01-08), # which would otherwise say the interval uses “Pacific Standard Time”. # (Below, this temporary hack is marked “Temporary hack; see above.”) # Strictly speaking this hack is incorrect since the interval uses # standard time, but it does have the right UT offset and it # works around the CLDR limitation. We should be able to remove -# the temporary hack after CLDR is fixed. +# the temporary hack by November when there would be little point +# to keeping it anyway. # 2. After the BC law takes effect, model the time as MST sans DST. # We can change this later if another conforming non-numeric abbreviation # for Pacific Time becomes more popular. Possibilities include: @@ -1988,10 +2059,7 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # PST - straightforward but even more confusing, # and will likely break much software that assumes PST is -08 # -07 - accurate and clear in itself, but makes BC look odd vs neighbors -# CPT, CPST - for Canadian Pacific (Standard) Time, -# by analogy with AEST in Australia -# P-T - conforming approximation to “PT” -# PT+ - like P-T but suggesting one-hour advance over PST +# PacT - straightforward but novel abbreviation for Pacific Time # From Chris Walton (2026-03-15): # The Regional District of East Kootenay is planning to move to year-round @@ -2006,6 +2074,10 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # saying, “Pardon the pun, but this is not a time-sensitive issue.” # For now, merely mention the potential change in these comments. # If it happens it would likely affect clocks starting 2027-03-14 at 02:00. +# From Tim Parenti (2026-05-14): +# RDEK has historically been aligned with neighboring Alberta. With the latter +# now opting to stay on -06 year-round, if RDEK does not follow, it would +# require a new zone for the Cranbrook area. # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Vanc 1918 only - Apr 14 2:00 1:00 D @@ -2022,7 +2094,7 @@ Zone America/Vancouver -8:12:28 - LMT 1884 -8:00 Vanc P%sT 1987 -8:00 Canada P%sT 2026 Mar 9 # Temporary hack; see above. - -8:00 1:00 PDT 2026 Nov 1 02:00 + -8:00 1:00 PDT 2026 Nov 1 2:00 # End of temporary hack. -7:00 - MST Zone America/Dawson_Creek -8:00:56 - LMT 1884 @@ -2350,6 +2422,23 @@ Zone America/Fort_Nelson -8:10:47 - LMT 1884 # about 1970, and uses PST for standard time in Yukon since then. Consistent # with that, use MST for -07, the new standard time in Yukon effective Nov. 1. +# From Tim Parenti (2026-04-21): +# "[Northwest Territories] Premier R.J. Simpson announced Monday that the +# territory will move to end seasonal time changes and will adopt a year-round +# time standard instead. ... Simpson has previously said the territory wouldn't +# end seasonal time changes until Alberta does." +# https://www.cbc.ca/news/canada/north/nwt-ends-daylight-saving-9.7170964 +# +# From Tim Parenti (2026-06-19), per James Bellaire (2026-06-02): +# Much of NWT has, to date, been represented by America/Edmonton, which alias +# America/Yellowknife links to. While Bill 13 (assented to 2021-03-31) would +# enable NWT's proposed change mirroring Alberta's, at time of writing it has +# not yet been formally enacted; if it doesn't move forward as expected, +# America/Yellowknife would need to become its own zone as Alberta has stopped +# changing its clocks. +# If it does go ahead, draft changes to America/Inuvik, which represents the +# remainder of NWT, are commented below. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule NT_YK 1918 only - Apr 14 2:00 1:00 D Rule NT_YK 1918 only - Oct 27 2:00 0 S @@ -2392,6 +2481,10 @@ Zone America/Inuvik 0 - -00 1953 # Inuvik founded -8:00 NT_YK P%sT 1979 Apr lastSun 2:00 -7:00 NT_YK M%sT 1980 -7:00 Canada M%sT +# Assuming Northwest Territories follows Alberta in abolishing seasonal time +# changes, replace the above line with something like: +# -7:00 Canada M%sT 2026 Nov 1 2:00 +# -6:00 - CST Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20 -9:00 NT_YK Y%sT 1965 -9:00 Yukon Y%sT 1966 Feb 27 0:00 diff --git a/contrib/tzdata/theory.html b/contrib/tzdata/theory.html index 12f4f7f4b439..8f76aaf0b3c8 100644 --- a/contrib/tzdata/theory.html +++ b/contrib/tzdata/theory.html @@ -592,10 +592,10 @@ in decreasing order of importance: locations while uninhabited. The leading "-" is a flag that the UT offset is in some sense undefined; this notation is derived - from Internet + from Internet RFC 3339. (The abbreviation Z that - Internet + Internet RFC 9557 uses for this concept would violate the POSIX requirement of at least three characters in an abbreviation.) @@ -632,7 +632,7 @@ Errors in the tz database arise from many sources: timestamps, and current predictions will be incorrect after future governments change the rules. For example, if today someone schedules a meeting for 13:00 next - October 1, Casablanca time, and tomorrow Morocco changes its + October 1, Dublin time, and tomorrow Ireland changes its daylight saving rules, software can mess up after the rule change if it blithely relies on conversions made before the change. @@ -657,7 +657,7 @@ Errors in the tz database arise from many sources: zones at all, often not even a stable landscape of mean times, prior to the middle decades of the twentieth century”. See: Timothy Shenk, Booked: +href="https://dissentmagazine.org/online_articles/booked-a-global-history-of-time-vanessa-ogle/">Booked: A Global History of Time. Dissent 2015-12-17.
  • @@ -938,7 +938,7 @@ with problems that were fixed in later POSIX editions. has a format that is hard to describe and is error-prone in practice. Also, proleptic TZ strings cannot deal with daylight saving time rules not based on the Gregorian calendar (as in - Morocco), or with situations where more than two time zone + Palestine), or with situations where more than two time zone abbreviations or UT offsets are used in an area.

    @@ -1128,7 +1128,7 @@ However POSIX.1-2024, like earlier POSIX editions, has some limitations: the name of a file from which time-related information is read. The file’s format is TZif, a timezone information format that contains binary data; see - Internet + Internet RFC 9636. The daylight saving time rules to be used for a particular timezone are encoded in the @@ -1212,8 +1212,8 @@ The vestigial APIs are:
  • The tm_isdst member is almost never needed and most of - its uses should be discouraged in favor of the abovementioned - APIs. + its uses should be discouraged in favor of the + APIs mentioned above. It was intended as an index into the tzname variable, but as mentioned previously that usage is obsolete. Although it can still be used in arguments to @@ -1558,7 +1558,7 @@ Sources for time on other planets: Michael Allison and Robert Schmunk, “Technical Notes on Mars Solar Time as Adopted by the Mars24 Sunclock” - (2020-03-08). + (2023-05-15).
  • Zara Mirmalek, diff --git a/contrib/tzdata/version b/contrib/tzdata/version index 75d34ee38931..9217a2da674e 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2026b +2026c diff --git a/contrib/tzdata/ziguard.awk b/contrib/tzdata/ziguard.awk index c0acb72a0380..ba3a13405d75 100644 --- a/contrib/tzdata/ziguard.awk +++ b/contrib/tzdata/ziguard.awk @@ -184,7 +184,7 @@ DATAFORM != "main" { dstoff = get_minutes(rules) } else { # The DST offset is normally an hour, but there are special cases. - if (rules == "Morocco" && NF == 3) { + if (rules == "Morocco" && $4 == 2026) { dstoff = -60 } else if (rules == "NBorneo") { dstoff = 20 @@ -286,13 +286,13 @@ DATAFORM != "main" { } } } - if ($1 ~ /^[+0-9-]/ && NF == 3) { + if ($1 ~ /^[+0-9-]/ && $4 == 2026) { if (DATAFORM == "rearguard") { sub(/1:00\tMorocco/, "0:00\tMorocco") - sub(/\t\+01\/\+00$/, "\t+00/+01") + sub(/\t\+01\/\+00/, "\t+00/+01") } else { sub(/0:00\tMorocco/, "1:00\tMorocco") - sub(/\t\+00\/+01$/, "\t+01/+00") + sub(/\t\+00\/+01/, "\t+01/+00") } } } diff --git a/contrib/tzdata/zone.tab b/contrib/tzdata/zone.tab index 2ae8a8c439eb..69d50bd8ae3b 100644 --- a/contrib/tzdata/zone.tab +++ b/contrib/tzdata/zone.tab @@ -121,7 +121,7 @@ CA +744144-0944945 America/Resolute Central - NU (Resolute) CA +624900-0920459 America/Rankin_Inlet Central - NU (central) CA +5024-10439 America/Regina CST - SK (most areas) CA +5017-10750 America/Swift_Current CST - SK (midwest) -CA +5333-11328 America/Edmonton Mountain - AB, BC(E), NT(E), SK(W) +CA +5333-11328 America/Edmonton CST - AB, BC(E), NT(E), SK(W) CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) CA +682059-1334300 America/Inuvik Mountain - NT (west) CA +4916-12307 America/Vancouver MST - BC (most areas) diff --git a/contrib/tzdata/zone1970.tab b/contrib/tzdata/zone1970.tab index 48b9aa978d53..b9a8dd5305c3 100644 --- a/contrib/tzdata/zone1970.tab +++ b/contrib/tzdata/zone1970.tab @@ -113,7 +113,7 @@ CA +744144-0944945 America/Resolute Central - NU (Resolute) CA +624900-0920459 America/Rankin_Inlet Central - NU (central) CA +5024-10439 America/Regina CST - SK (most areas) *** 33 LINES SKIPPED *** From nobody Sat Jul 11 09:52:47 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gy3sd70qxz6knXk for ; Sat, 11 Jul 2026 09:52: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gy3sd42gWz44mG for ; Sat, 11 Jul 2026 09:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783763573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lh99fQ8nlmJtqjHSkYrKBwAVDBRnMko71+EtBRuQUZA=; b=YoPYqIDMsc7A8Fj1+/Hp/Fm9gBBWwHEHqfuzpfc/V6ZdVr78Kmnt+wyIuDArIIJ11j0Qks DDrJ+VSremKzofkxMNWNqwT/anOp8K3HgvyMHspYHovtaH8X3VQDDaU0DxUUac9FgOgcnD 27GlKnTzY++bU7wE6GrYbFOOHiFtAN++EGl9DWPN2foKRxcimmL4ygK5Lt0rZC24Wa0uHC 2LtAMcB/EtvBmGDm+UcC5vJrUiwh+2DBxPLEUclLGnyCDZTMTCHK93recN68h072g5Xxuu VT8w0q2zANLK6sWytAjT0keI8Tkkh5vH3XSXRV1r2aleSQAohm9VUXlg+O1UxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783763573; a=rsa-sha256; cv=none; b=DonHrImOQaVc/vcunxlIvNbK4yLc33BIASPkR5VFsTFUHs3bc0ew58+spdk4MR6Vtqjhcx 3AJNbzNp+ok9ZkfkVbQrTw3ASswrASyLmIh3YCWw08s3Cqx7aavU+WcK+phcIigv9rZ5JW plkunA9QDt58rDqAD+e4kwarac3d82uarJ8PT5YBW8w/zktEBEB7J/HGnSjTYqp4joGHOx hbic4ZxXfGFzd8QY+EkY8jXjy3sx87N4b22LMmiK8BTNV92QR+JdOXMSS9zZ5+05S2IQZB KaY6+DdepKCj/P9g5sRi9Dl0oCkzuw0Zi7H4sulOBAXgHBR8AJnzEtGMqNiRsg== 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=1783763573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lh99fQ8nlmJtqjHSkYrKBwAVDBRnMko71+EtBRuQUZA=; b=S7tvjLKfC4oZDCb0SjsLbaziOxH2A3oGwX3juRW1J12ukvUvn1WuStOac+FOxsauXmFxxi lsYv4w7IFIXzccp+AQM+MiT7MmVw+ZtDkrWteGAZcS+hO8k9MiN2dVM9vlV43wzjCeM2qC FK5xZBnm7EMOYTCcRUj5RiD21cyUUe+VnusQkmb11Bb1V63/gXsxJ0uXasWhclbLbhoIfb kFdziBZp+ovD1d3erk+wI3e9vjn4uNrtL971ITJnXngVBq/hbAJm5vVMPxHfYntNOg07ER mcjrOFlnuPoS9rEj9iY1lgGQH+w4N82qTSBihL3k3gjSeDXtQFHVBz4xgk1ztQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gy3sd1lPNzd05 for ; Sat, 11 Jul 2026 09:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a14b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Jul 2026 09:52:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 819af80de8e8 - stable/14 - contrib/tzdata: import tzdata 2026c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 819af80de8e8854f5767c20d03cb7362624b0085 Auto-Submitted: auto-generated Date: Sat, 11 Jul 2026 09:52:47 +0000 Message-Id: <6a52126f.3a14b.21c5700@gitrepo.freebsd.org> The branch stable/14 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=819af80de8e8854f5767c20d03cb7362624b0085 commit 819af80de8e8854f5767c20d03cb7362624b0085 Author: Philip Paeps AuthorDate: 2026-07-08 20:46:28 +0000 Commit: Philip Paeps CommitDate: 2026-07-11 09:49:21 +0000 contrib/tzdata: import tzdata 2026c Changes: https://github.com/eggert/tz/blob/2026c/NEWS (cherry picked from commit 665bb2d9a440d33e2ec2f9151e45b8cda93433ae) --- contrib/tzdata/Makefile | 45 ++++----- contrib/tzdata/NEWS | 79 ++++++++++++++-- contrib/tzdata/africa | 191 +++++++-------------------------------- contrib/tzdata/australasia | 2 +- contrib/tzdata/europe | 21 +++-- contrib/tzdata/leap-seconds.list | 8 +- contrib/tzdata/leapseconds | 8 +- contrib/tzdata/northamerica | 121 ++++++++++++++++++++++--- contrib/tzdata/theory.html | 18 ++-- contrib/tzdata/version | 2 +- contrib/tzdata/ziguard.awk | 8 +- contrib/tzdata/zone.tab | 2 +- contrib/tzdata/zone1970.tab | 2 +- contrib/tzdata/zonenow.tab | 9 +- 14 files changed, 272 insertions(+), 244 deletions(-) diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index 1e0a5903534d..f5a22f1896a4 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -114,7 +114,7 @@ ZDUMPDIR = $(BINDIR) # The "zic" command goes in: ZICDIR = $(TOPDIR)/$(USRDIR)/sbin -# Manual pages go in subdirectories of. . . +# Manual pages go in subdirectories of: MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man # Library functions are put in an archive in LIBDIR. @@ -145,7 +145,7 @@ TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \ # nonnegative TZ_CHANGE_INTERVAL also assumes this, so to be compatible with # these, use "posix_only" or "posix_right". Use POSIX time on systems with # leap smearing; this can work better than unsmeared "right" time with -# applications that are not leap second aware, and is closer to unsmeared +# applications that are not aware of leap seconds, and is closer to unsmeared # "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). REDO= posix_only @@ -295,10 +295,10 @@ LDLIBS= # -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; # not needed by the main-program tz code, which is single-threaded. # Append other compiler flags as needed, e.g., -pthread on GNU/Linux. -# The following options can also be used: +# With -DTHREAD_SAFE the following options can also be used: # -DTHREAD_PREFER_SINGLE to prefer speed in single-threaded apps, # at some cost in CPU time and energy in multi-threaded apps. -# The following options can also be used: +# With -DTHREAD_PREFER_SINGLE the following options can also be used: # -DHAVE___ISTHREADED=1 if there is an extern int __isthreaded # variable, 0 otherwise (default is guessed) # -DHAVE_SYS_SINGLE_THREADED_H=0 if works, @@ -377,12 +377,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ -Wdeclaration-after-statement -Wdouble-promotion \ -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \ -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ - -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \ + -Wfree-labels -Wimplicit-fallthrough=5 -Winit-self \ + -Wkeyword-macro -Wlogical-op \ -Wmissing-declarations -Wmissing-prototypes \ -Wmissing-variable-declarations -Wnested-externs \ -Wnull-dereference \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \ - -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ + -Wshadow -Wshift-overflow=2 \ -Wstrict-prototypes -Wstringop-overflow=4 \ -Wsuggest-attribute=cold \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ @@ -533,7 +534,7 @@ ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' # mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work. # Also, it is better (though not essential) if 'awk' supports UTF-8, # and unfortunately mawk and busybox awk do not support UTF-8. -# Try AWK=gawk or AWK=nawk if your awk has the abovementioned problems. +# Try AWK=gawk or AWK=nawk if your awk has the problems mentioned above. AWK= awk # The full path name of a POSIX-compliant shell, preferably one that supports @@ -913,7 +914,7 @@ tzselect: tzselect.ksh version check: check_mild back.ck now.ck check_mild: check_web check_zishrink \ character-set.ck white-space.ck links.ck mainguard.ck \ - name-lengths.ck slashed-abbrs.ck sorted.ck \ + name-lengths.ck news.ck slashed-abbrs.ck sorted.ck \ tables.ck ziguard.ck tzs.ck # True if UTF8_LOCALE does not work; @@ -1083,6 +1084,12 @@ zishrink-posix.ck zishrink-right.ck: \ rm -fr $@d t-$@d shrunk-$@d touch $@ +# Check that NEWS has data release versions and dates in reverse order. +news.ck: NEWS + grep '^Release [0-9][0-9][0-9][0-9]' NEWS | LC_ALL=C sort -cru + sed -n '/ -0000$$/!s/^Release [^ ]*//p' NEWS|LC_ALL=C sort -cru + touch $@ + clean_misc: rm -fr *.ckd *.dir rm -f *.ck *.core *.o *.out *.t core core.* \ @@ -1139,7 +1146,8 @@ SET_TIMESTAMP_N = sh -c '\ # If DEST depends on A B C ... in this Makefile, callers should use # $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any # downstream 'make' that considers equal timestamps to be out of date. -# POSIX allows this 'make' behavior, and HP-UX 'make' does it. +# POSIX allows this 'make' behavior, although only HP-UX 'make' +# (which is no longer supported) did things that way. # If all that matters is that the timestamp be reproducible # and plausible, use $(SET_TIMESTAMP). SET_TIMESTAMP = $(SET_TIMESTAMP_N) 0 @@ -1399,24 +1407,6 @@ $(ALL_ASC): $(SET_TIMESTAMP) $(@:.t=) $(?:.t=) touch $@ -TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T -typecheck: long-long.ck unsigned.ck -long-long.ck unsigned.ck: $(VERSION_DEPS) - rm -fr $@d - mkdir $@d - ln $(VERSION_DEPS) $@d - cd $@d && \ - case $@ in \ - long-long.*) i="long long";; \ - unsigned.* ) i="unsigned" ;; \ - esac && \ - $(MAKE) \ - CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \ - TOPDIR="$$PWD" \ - install - $@d/zdump -i -c 1970,1971 Europe/Rome - touch $@ - zonenames: tzdata.zi @$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi @@ -1442,6 +1432,5 @@ zic.o: private.h tzdir.h tzfile.h version.h .PHONY: traditional_signatures traditional_signatures_version .PHONY: traditional_tarballs traditional_tarballs_version .PHONY: tailored_tarballs tailored_tarballs_version -.PHONY: typecheck .PHONY: zonenames zones .PHONY: $(ZDS) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index a0042701c687..dd962b54d529 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,6 +1,69 @@ News for the tz database -Release 2026a - 2026-04-22 23:06:43 -0700 +Release 2026c - 2026-07-08 10:23:58 -0700 + + Briefly: + Alberta moved to permanent -06 on 2026-06-18. + Morocco moves to permanent +00 on 2026-09-20. + More integer overflow bugs have been fixed in zic. + + Changes to future timestamps + + Alberta’s 2026-03-08 spring forward was its last foreseeable clock + change, as it moved to permanent -06 thereafter. (Thanks to Roozbeh + Pournader and others.) Model this with its traditional abbreviation + CST. Although the change to permanent -06 legally took place on + 2026-06-18, temporarily model the change to occur on 2026-11-01 at + 02:00 instead, for the same reason we introduced a similarly + temporary hack for British Columbia in 2026b. + + Although another TZDB release will likely be needed soon because + Northwest Territories will likely follow Alberta, the legal + formalities have not yet taken place. + + Morocco plans to move back to permanent UTC, without daylight + saving time transitions, on 2026-09-20 at 02:00. This also + affects Western Sahara. + + Changes to code + + zic no longer overflows integers when processing outlandish input + like ‘Zone Ouch 0 - LMT 9223372036854775807’, ‘Zone Ouch 0 + 2562047788015215 LMT’, ‘Zone Ouch -2562047788015215:30:08 - LMT’, + and ‘Zone Ouch -2562047788015215:30:08 - %%z’. This avoids + undefined behavior in C. (Problems reported by Naveed Khan.) + + On platforms that have EFTYPE, tzalloc now fails with errno set to + EFTYPE, not EINVAL, if it detects that the TZif file has an + invalid format or is not a regular file. Formerly it did this + only on NetBSD, and only when the file was not a regular file. + + Unprivileged programs no longer require TZif files to be regular + files or reject relative names containing ".." components. This + reverts to the more-permissive 2025b behavior, as the stricter + behavior did not catch on in FreeBSD. + + zic now reports any failure to remove a temporary file when + cleaning up after a previous failure. (Problem reported by Tom + Lane.) + + Changes to commentary + + Northwest Territories is expected to move to permanent -06 prior to + 2026-11-01 02:00, when clocks would otherwise fall back. (Thanks to + Tim Parenti and James Bellaire.) Model this with its traditional + abbreviation CST. Unfortunately the change is not yet official, so + it is currently present only as comments that can be uncommented as + needed. + + Changes to build procedure + + The undocumented ‘typecheck’ Makefile check rule has been removed. + It stopped working in 2025a and evidently nobody noticed. + The rule was superseded by ‘check_time_t_alternatives’ in 2013d. + + +Release 2026b - 2026-04-22 23:06:43 -0700 Briefly: British Columbia moved to permanent -07 on 2026-03-09. @@ -13,7 +76,7 @@ Release 2026a - 2026-04-22 23:06:43 -0700 (Thanks to Arthur David Olson.) Although the change to permanent -07 legally took place on 2026-03-09, temporarily model the change to occur on 2026-11-01 at 02:00 instead. This works around a - limitation in CLDR v48.2 (2026-03-17). This temporary hack is + limitation in CLDR 48.1 (2026-01-08). This temporary hack is planned to be removed after CLDR is fixed. Changes to code @@ -99,7 +162,7 @@ Release 2026a - 2026-03-01 22:59:49 -0800 than attempting to override this fallback with the contents of the posixrules file. This removes library support that was declared obsolete in release 2019b, and fixes some undefined behavior. - (Undefined behavior reported by GitHub user Naveed8951.) + (Undefined behavior reported by Naveed Khan.) The posix2time, posix2time_z, time2posix, and time2posix_z functions now set errno=EOVERFLOW and return ((time_t) -1) if the @@ -111,7 +174,7 @@ Release 2026a - 2026-03-01 22:59:49 -0800 Some other undefined behavior, triggered by TZif files containing outlandish but conforming UT offsets or leap second corrections, - has also been fixed. (Some of these bugs reported by Naveed8951.) + has also been fixed. (Some of these bugs reported by Naveed Khan.) localtime.c no longer rejects TZif files that exactly fit in its internal structures, fixing off-by-one typos introduced in 2014g. @@ -221,7 +284,7 @@ Release 2025c - 2025-12-10 14:42:37 -0800 rarely changing and many threads call tzcode simultaneously. It costs more CPU time and energy. - The new CFLAGS option -TTHREAD_TM_MULTI causes localtime to return + The new CFLAGS option -DTHREAD_TM_MULTI causes localtime to return a pointer to thread-specific memory, as FreeBSD does, instead of to the same memory in all threads. This supports nonportable programs that incorrectly use localtime instead of localtime_r. @@ -551,7 +614,7 @@ Release 2024a - 2024-02-01 09:28:56 -0800 The leap-seconds.list file is now copied from the IERS instead of from its downstream counterpart at NIST, as the IERS version is now in the public domain too and tends to be more up-to-date. - (Thanks to Martin Burnicki for liaisoning with the IERS.) + (Thanks to Martin Burnicki for liaising with the IERS.) Changes to documentation @@ -1709,7 +1772,7 @@ Release 2020a - 2020-04-23 16:03:47 -0700 zic -L now supports an Expires line in the leapseconds file, and truncates the TZif output accordingly. This propagates leap second expiration information into the TZif file, and avoids the - abovementioned localtime.c bug as well as similar bugs present in + localtime.c bug mentioned above, as well as similar bugs present in many client implementations. If no Expires line is present, zic -L instead truncates the TZif output based on the #expires comment present in leapseconds files distributed by tzdb 2018f and later; @@ -6666,7 +6729,7 @@ few (e.g., code2012c-data2012d) have tarballs with mixed version numbers. Recent releases also come in an experimental format consisting of a single tarball tzdb-R.tar.lz with extra data. -Release timestamps are taken from the release's commit (for newer, +A release’s timestamp is taken from the release’s commit (for newer, Git-based releases), from the newest file in the tarball (for older releases, where this info is available) or from the email announcing the release (if all else fails; these are marked with a time zone diff --git a/contrib/tzdata/africa b/contrib/tzdata/africa index ec067bee524d..2965736a0b0e 100644 --- a/contrib/tzdata/africa +++ b/contrib/tzdata/africa @@ -597,6 +597,24 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # Morocco # See Africa/Ceuta for Spanish Morocco. +# From Paul Eggert (2026-06-26): +# In “Morocco’s GMT+1, a century of shifting time and a debate far from over” +# https://en.yabiladi.com/articles/details/191310/morocco-s-gmt1-century-shifting-time +# (2026-03-30), Yabiladi’s Latifa Babas reports the following: +# * A 1913-10-26 royal dahir established GMT as legal time in Morocco. +# * A 1918-05-10 dahir instituted DST on 1918-05-16 at 00:00. +# * A September 1939 dahir restarted DST on 1939-09-12. +# * A February 1940 dahir restarted DST as early as 1940-02-25. +# * Standard time resumed in September 1946. +# * A June 1950 decree restarted DST, which ran until as late as October. +# * Royal decree 455-67 (1967-06-02) restarted DST on June 3 at noon. +# * After 1967 Morocco used DST “during several summers, particularly +# throughout the 1970s and 1980s.” +# Babas consulted official records that disagree with and are surely +# more correct than our pre-2008 timestamp data, which came from the +# unreliable Shanks & Pottenger. Unfortunately, Babas did not provide +# enough detail to correct our data. + # From Alex Krivenyshev (2008-05-09): # Here is an article that Morocco plan to introduce Daylight Saving Time between # 1 June, 2008 and 27 September, 2008. @@ -850,33 +868,16 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # The return to legal GMT time will take place this Sunday, March 19 at 3 a.m. # ... the return to GMT+1 will be made on Sunday April 23, 2023 at 2 a.m. # https://www.mmsp.gov.ma/fr/actualites/passage-à-l%E2%80%99heure-gmt-à-partir-du-dimanche-19-mars-2023 -# -# From Paul Eggert (2023-03-14): -# For now, guess that in the future Morocco will fall back at 03:00 -# the last Sunday before Ramadan, and spring forward at 02:00 the -# first Sunday after one day after Ramadan. To implement this, -# transition dates and times for 2019 through 2087 were determined by -# running the following program under GNU Emacs 28.2. (This algorithm -# also produces the correct transition dates for 2016 through 2018, -# though the times differ due to Morocco's time zone change in 2018.) -# (let ((islamic-year 1440)) -# (require 'cal-islam) -# (while (< islamic-year 1511) -# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) -# (b (+ 1 (calendar-islamic-to-absolute (list 10 1 islamic-year)))) -# (sunday 0)) -# (while (/= sunday (mod (setq a (1- a)) 7))) -# (while (/= sunday (mod b 7)) -# (setq b (1+ b))) -# (setq a (calendar-gregorian-from-absolute a)) -# (setq b (calendar-gregorian-from-absolute b)) -# (insert -# (format -# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t-1:00\t-\n" -# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t0\t-\n") -# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) -# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) -# (setq islamic-year (+ 1 islamic-year)))) + +# From Paul Eggert (2026-06-25): +# https://www.moroccoworldnews.com/2026/06/325034/confirmed-morocco-to-restore-gmt-on-september-20-ending-eight-year-gmt1-saga/ +# Today the Moroccan government adopted Decree No. 2.26.530, which abrogates +# the 2018 decree that put it at +01 with daylight saving during Ramadan. +# The plan is to go back to +00 without DST on 2026-09-20 at 02:00. +# From Anass Taghjichte (2026-07-03): +# https://www.sgg.gov.ma/BO/AR/3111/2026/BO_7521_Ar.pdf +# From Afaf EL MAAYATI (2026-07-06): +# https://www.mapexpress.ma/actualite/activite-gouvernementale/conseil-gouvernement-approuve-projet-decret-relatif-au-retour-lheure-legale/ # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Morocco 1939 only - Sep 12 0:00 1:00 - @@ -936,143 +937,14 @@ Rule Morocco 2025 only - Feb 23 3:00 -1:00 - Rule Morocco 2025 only - Apr 6 2:00 0 - Rule Morocco 2026 only - Feb 15 3:00 -1:00 - Rule Morocco 2026 only - Mar 22 2:00 0 - -Rule Morocco 2027 only - Feb 7 3:00 -1:00 - -Rule Morocco 2027 only - Mar 14 2:00 0 - -Rule Morocco 2028 only - Jan 23 3:00 -1:00 - -Rule Morocco 2028 only - Mar 5 2:00 0 - -Rule Morocco 2029 only - Jan 14 3:00 -1:00 - -Rule Morocco 2029 only - Feb 18 2:00 0 - -Rule Morocco 2029 only - Dec 30 3:00 -1:00 - -Rule Morocco 2030 only - Feb 10 2:00 0 - -Rule Morocco 2030 only - Dec 22 3:00 -1:00 - -Rule Morocco 2031 only - Jan 26 2:00 0 - -Rule Morocco 2031 only - Dec 14 3:00 -1:00 - -Rule Morocco 2032 only - Jan 18 2:00 0 - -Rule Morocco 2032 only - Nov 28 3:00 -1:00 - -Rule Morocco 2033 only - Jan 9 2:00 0 - -Rule Morocco 2033 only - Nov 20 3:00 -1:00 - -Rule Morocco 2033 only - Dec 25 2:00 0 - -Rule Morocco 2034 only - Nov 5 3:00 -1:00 - -Rule Morocco 2034 only - Dec 17 2:00 0 - -Rule Morocco 2035 only - Oct 28 3:00 -1:00 - -Rule Morocco 2035 only - Dec 9 2:00 0 - -Rule Morocco 2036 only - Oct 19 3:00 -1:00 - -Rule Morocco 2036 only - Nov 23 2:00 0 - -Rule Morocco 2037 only - Oct 4 3:00 -1:00 - -Rule Morocco 2037 only - Nov 15 2:00 0 - -Rule Morocco 2038 only - Sep 26 3:00 -1:00 - -Rule Morocco 2038 only - Oct 31 2:00 0 - -Rule Morocco 2039 only - Sep 18 3:00 -1:00 - -Rule Morocco 2039 only - Oct 23 2:00 0 - -Rule Morocco 2040 only - Sep 2 3:00 -1:00 - -Rule Morocco 2040 only - Oct 14 2:00 0 - -Rule Morocco 2041 only - Aug 25 3:00 -1:00 - -Rule Morocco 2041 only - Sep 29 2:00 0 - -Rule Morocco 2042 only - Aug 10 3:00 -1:00 - -Rule Morocco 2042 only - Sep 21 2:00 0 - -Rule Morocco 2043 only - Aug 2 3:00 -1:00 - -Rule Morocco 2043 only - Sep 13 2:00 0 - -Rule Morocco 2044 only - Jul 24 3:00 -1:00 - -Rule Morocco 2044 only - Aug 28 2:00 0 - -Rule Morocco 2045 only - Jul 9 3:00 -1:00 - -Rule Morocco 2045 only - Aug 20 2:00 0 - -Rule Morocco 2046 only - Jul 1 3:00 -1:00 - -Rule Morocco 2046 only - Aug 5 2:00 0 - -Rule Morocco 2047 only - Jun 23 3:00 -1:00 - -Rule Morocco 2047 only - Jul 28 2:00 0 - -Rule Morocco 2048 only - Jun 7 3:00 -1:00 - -Rule Morocco 2048 only - Jul 19 2:00 0 - -Rule Morocco 2049 only - May 30 3:00 -1:00 - -Rule Morocco 2049 only - Jul 4 2:00 0 - -Rule Morocco 2050 only - May 15 3:00 -1:00 - -Rule Morocco 2050 only - Jun 26 2:00 0 - -Rule Morocco 2051 only - May 7 3:00 -1:00 - -Rule Morocco 2051 only - Jun 18 2:00 0 - -Rule Morocco 2052 only - Apr 28 3:00 -1:00 - -Rule Morocco 2052 only - Jun 2 2:00 0 - -Rule Morocco 2053 only - Apr 13 3:00 -1:00 - -Rule Morocco 2053 only - May 25 2:00 0 - -Rule Morocco 2054 only - Apr 5 3:00 -1:00 - -Rule Morocco 2054 only - May 10 2:00 0 - -Rule Morocco 2055 only - Mar 28 3:00 -1:00 - -Rule Morocco 2055 only - May 2 2:00 0 - -Rule Morocco 2056 only - Mar 12 3:00 -1:00 - -Rule Morocco 2056 only - Apr 23 2:00 0 - -Rule Morocco 2057 only - Mar 4 3:00 -1:00 - -Rule Morocco 2057 only - Apr 8 2:00 0 - -Rule Morocco 2058 only - Feb 17 3:00 -1:00 - -Rule Morocco 2058 only - Mar 31 2:00 0 - -Rule Morocco 2059 only - Feb 9 3:00 -1:00 - -Rule Morocco 2059 only - Mar 23 2:00 0 - -Rule Morocco 2060 only - Feb 1 3:00 -1:00 - -Rule Morocco 2060 only - Mar 7 2:00 0 - -Rule Morocco 2061 only - Jan 16 3:00 -1:00 - -Rule Morocco 2061 only - Feb 27 2:00 0 - -Rule Morocco 2062 only - Jan 8 3:00 -1:00 - -Rule Morocco 2062 only - Feb 12 2:00 0 - -Rule Morocco 2062 only - Dec 31 3:00 -1:00 - -Rule Morocco 2063 only - Feb 4 2:00 0 - -Rule Morocco 2063 only - Dec 16 3:00 -1:00 - -Rule Morocco 2064 only - Jan 27 2:00 0 - -Rule Morocco 2064 only - Dec 7 3:00 -1:00 - -Rule Morocco 2065 only - Jan 11 2:00 0 - -Rule Morocco 2065 only - Nov 22 3:00 -1:00 - -Rule Morocco 2066 only - Jan 3 2:00 0 - -Rule Morocco 2066 only - Nov 14 3:00 -1:00 - -Rule Morocco 2066 only - Dec 26 2:00 0 - -Rule Morocco 2067 only - Nov 6 3:00 -1:00 - -Rule Morocco 2067 only - Dec 11 2:00 0 - -Rule Morocco 2068 only - Oct 21 3:00 -1:00 - -Rule Morocco 2068 only - Dec 2 2:00 0 - -Rule Morocco 2069 only - Oct 13 3:00 -1:00 - -Rule Morocco 2069 only - Nov 17 2:00 0 - -Rule Morocco 2070 only - Oct 5 3:00 -1:00 - -Rule Morocco 2070 only - Nov 9 2:00 0 - -Rule Morocco 2071 only - Sep 20 3:00 -1:00 - -Rule Morocco 2071 only - Nov 1 2:00 0 - -Rule Morocco 2072 only - Sep 11 3:00 -1:00 - -Rule Morocco 2072 only - Oct 16 2:00 0 - -Rule Morocco 2073 only - Aug 27 3:00 -1:00 - -Rule Morocco 2073 only - Oct 8 2:00 0 - -Rule Morocco 2074 only - Aug 19 3:00 -1:00 - -Rule Morocco 2074 only - Sep 30 2:00 0 - -Rule Morocco 2075 only - Aug 11 3:00 -1:00 - -Rule Morocco 2075 only - Sep 15 2:00 0 - -Rule Morocco 2076 only - Jul 26 3:00 -1:00 - -Rule Morocco 2076 only - Sep 6 2:00 0 - -Rule Morocco 2077 only - Jul 18 3:00 -1:00 - -Rule Morocco 2077 only - Aug 22 2:00 0 - -Rule Morocco 2078 only - Jul 10 3:00 -1:00 - -Rule Morocco 2078 only - Aug 14 2:00 0 - -Rule Morocco 2079 only - Jun 25 3:00 -1:00 - -Rule Morocco 2079 only - Aug 6 2:00 0 - -Rule Morocco 2080 only - Jun 16 3:00 -1:00 - -Rule Morocco 2080 only - Jul 21 2:00 0 - -Rule Morocco 2081 only - Jun 1 3:00 -1:00 - -Rule Morocco 2081 only - Jul 13 2:00 0 - -Rule Morocco 2082 only - May 24 3:00 -1:00 - -Rule Morocco 2082 only - Jun 28 2:00 0 - -Rule Morocco 2083 only - May 16 3:00 -1:00 - -Rule Morocco 2083 only - Jun 20 2:00 0 - -Rule Morocco 2084 only - Apr 30 3:00 -1:00 - -Rule Morocco 2084 only - Jun 11 2:00 0 - -Rule Morocco 2085 only - Apr 22 3:00 -1:00 - -Rule Morocco 2085 only - May 27 2:00 0 - -Rule Morocco 2086 only - Apr 14 3:00 -1:00 - -Rule Morocco 2086 only - May 19 2:00 0 - -Rule Morocco 2087 only - Mar 30 3:00 -1:00 - -Rule Morocco 2087 only - May 11 2:00 0 - -# For dates after the somewhat-arbitrary cutoff of 2087, assume that -# Morocco will no longer observe DST. At some point this table will -# need to be extended, though quite possibly Morocco will change the -# rules first. # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 0:00 Morocco %z 1984 Mar 16 1:00 - %z 1986 0:00 Morocco %z 2018 Oct 28 3:00 - 1:00 Morocco %z + 1:00 Morocco %z 2026 Sep 20 2:00 + 0:00 - %z # Western Sahara # @@ -1088,7 +960,8 @@ Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún -1:00 - %z 1976 Apr 14 0:00 Morocco %z 2018 Oct 28 3:00 - 1:00 Morocco %z + 1:00 Morocco %z 2026 Sep 20 2:00 + 0:00 - %z # Botswana # Burundi diff --git a/contrib/tzdata/australasia b/contrib/tzdata/australasia index e52aab109bca..45ac6460391c 100644 --- a/contrib/tzdata/australasia +++ b/contrib/tzdata/australasia @@ -1721,7 +1721,7 @@ Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila # to Japanese rule was right before 1970, ... per the current tz database # rule, the information doesn't warrant creation of a new timezone for Bonin # Islands itself and is thus as an anecdotal note for interest purpose only. -# ... [The abovementioned link] described some special timekeeping phenomenon +# ... [The link mentioned above] described some special timekeeping phenomenon # regarding Marcus island, another remote island currently owned by Japanese # in the same administrative unit as Bonin Islands. Many reports claim that # the American coastal guard on the American quarter of the island use its own diff --git a/contrib/tzdata/europe b/contrib/tzdata/europe index 4127ec9dcf13..0dc31d9d85e6 100644 --- a/contrib/tzdata/europe +++ b/contrib/tzdata/europe @@ -230,7 +230,7 @@ # https://www.polyomino.org.uk/british-time/bbc-19410418.png # https://www.polyomino.org.uk/british-time/ho-19410421.png -# From Sir Alexander Maxwell in the above-mentioned letter (1941-04-21): +# From Sir Alexander Maxwell (1941-04-21) in the letter mentioned above: # [N]o official designation has as far as I know been adopted for the time # which is to be introduced in May.... # I cannot think of anything better than "Double British Summer Time" @@ -2015,7 +2015,7 @@ Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 # Valletta # From Roman Tudos (2015-07-02): # http://lex.justice.md/index.php?action=view&view=doc&lang=1&id=355077 # From Paul Eggert (2015-07-01): -# The abovementioned official link to IGO1445-868/2014 states that +# The above-mentioned official link to IGO1445-868/2014 states that # 2014-10-26's fallback transition occurred at 03:00 local time. Also, # https://www.trm.md/en/social/la-30-martie-vom-trece-la-ora-de-vara # says the 2014-03-30 spring-forward transition was at 02:00 local time. @@ -2380,10 +2380,17 @@ Zone Europe/Lisbon -0:36:45 - LMT 1884 # https://oal.ul.pt/hora-legal/legislacao/ # working backward through references of revocation and abrogation to # Decreto-Lei 47233 of 1966-10-01, the last time DST was abolished across the -# mainland and its adjacent islands. Because of that reference, it is -# therefore assumed that DST rules in the islands prior to 1966 were like that -# of the mainland, though most legislation of the time didn't explicitly -# specify DST practices for the islands. +# mainland and its adjacent islands. +# +# From Tim Parenti (2026-05-26): +# Observance of DST on the Azores and Madeira was explicitly covered by +# mainland legislation in: +# - Portaria 11767 of 1947-03-28 for 1947, +# - Portaria 12286 of 1948-02-19 for 1948, and +# - Decreto-Lei 37048 of 1948-09-07 through its revocation in 1966. +# (See mainland commentary, above.) However, most legislation prior to 1947 +# didn't explicitly call out these "adjacent islands", so we assume that DST +# rules on the islands prior to 1947 were also like that of the mainland. Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada -1:54:32 - HMT 1912 Jan 1 2:00u # Horta MT # Vanguard section, for zic and other parsers that support %z. @@ -2616,7 +2623,7 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct # http://astro.uni-altai.ru/~orion/blog/2011/11/novyie-granitsyi-chasovyih-poyasov-v-sssr/ # # From Paul Eggert (2018-07-16): -# Perhaps someone could translate the above-mentioned link and use it +# Perhaps someone could translate the link mentioned above, and use it # to correct our data for the ex-Soviet Union. It cites the following: # «Поясное время и новые границы часовых поясов» / сост. П.Н. Долгов, # отв. ред. Г.Д. Бурдун - М: Комитет стандартов, мер и измерительных diff --git a/contrib/tzdata/leap-seconds.list b/contrib/tzdata/leap-seconds.list index 0a111845eae4..0b5b000f8edd 100644 --- a/contrib/tzdata/leap-seconds.list +++ b/contrib/tzdata/leap-seconds.list @@ -60,15 +60,15 @@ # # The following line shows the last update of this file in NTP timestamp: # -#$ 3976686858 +#$ 3992312697 # # 2) Expiration date of the file given on a semi-annual basis: last June or last December # -# File expires on 28 December 2026 +# File expires on 28 June 2027 # # Expire date in NTP timestamp: # -#@ 4007404800 +#@ 4023129600 # # # LIST OF LEAP SECONDS @@ -117,4 +117,4 @@ # please see the readme file in the 'source' directory : # https://hpiers.obspm.fr/iers/bul/bulc/ntp/sources/README # -#h 2e101270 4e6749f8 2f1792b7 14a0c188 36bb19d6 +#h a9bad145 84c31c70 758402aa b37bfd54 5923836a diff --git a/contrib/tzdata/leapseconds b/contrib/tzdata/leapseconds index a796e4b4e22e..1fc7b8e880b3 100644 --- a/contrib/tzdata/leapseconds +++ b/contrib/tzdata/leapseconds @@ -70,7 +70,7 @@ Leap 2016 Dec 31 23:59:60 + S # Any additional leap seconds will come after this. # This Expires line is commented out for now, # so that pre-2020a zic implementations do not reject this file. -#Expires 2026 Dec 28 00:00:00 +#Expires 2027 Jun 28 00:00:00 # Here are POSIX timestamps for the data in this file. # "#updated" gives the last time the leap seconds data changed @@ -79,8 +79,8 @@ Leap 2016 Dec 31 23:59:60 + S # "#expires" gives the first time this file might be wrong; # if this file was derived from the IERS leap-seconds.list, # this is typically a bit less than one year after "updated". -#updated 1767698058 (2026-01-06 11:14:18 UTC) -#expires 1798416000 (2026-12-28 00:00:00 UTC) +#updated 1783323897 (2026-07-06 07:44:57 UTC) +#expires 1814140800 (2027-06-28 00:00:00 UTC) # Updated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) -# File expires on 28 December 2026 +# File expires on 28 June 2027 diff --git a/contrib/tzdata/northamerica b/contrib/tzdata/northamerica index 3e8641e1c20a..3c53eb602ec0 100644 --- a/contrib/tzdata/northamerica +++ b/contrib/tzdata/northamerica @@ -1742,6 +1742,22 @@ Zone America/Toronto -5:17:32 - LMT 1895 # Manitoba +# From Paul Eggert (2026-05-08): +# For 1916 timestamps America/Winnipeg covers only a small region. See: +# Cassidy C. Winnipeg’s 110-year history with daylight time. +# Winnipeg Free Press. 2026-05-06. +# https://www.winnipegfreepress.com/our-communities/correspondents/2026/05/06/winnipegs-110-year-history-with-daylight-time +# Of the 1916 experiment, Cassidy writes: “As rural areas and nearby +# urban centres such as Selkirk and Brandon did not adopt DST, the +# City of Winnipeg essentially had its own time zone.” Cassidy also +# writes that province-wide DST came into effect on 1963-05-12. +# +# Shanks & Pottenger write that Winnipeg did not observe DST in 1964 and 1965. +# Although dubious in the light of Cassidy’s article, we lack a better source. +# Perhaps S&P’s data are for the train stations, not for the city? +# Also, S&P say Manitoba switched at 02:00 (not 02:00s) starting in 1966. +# Since 02:00s is clearly correct for 1967 on, assume 02:00s in 1966 too. + # From Rob Douglas (2006-04-06): # the old Manitoba Time Act - as amended by Bill 2, assented to # March 27, 1987 ... said ... @@ -1756,11 +1772,6 @@ Zone America/Toronto -5:17:32 - LMT 1895 # the 1987 version would apply - the changeover was at 2:00 Central # Standard Time (i.e. not until 3:00 Central Daylight Time). -# From Paul Eggert (2006-04-10): -# Shanks & Pottenger say Manitoba switched at 02:00 (not 02:00s) -# starting 1966. Since 02:00s is clearly correct for 1967 on, assume -# it was also 02:00s in 1966. - # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Winn 1916 only - Apr 23 0:00 1:00 D Rule Winn 1916 only - Sep 17 0:00 0 S @@ -1852,6 +1863,22 @@ Zone America/Winnipeg -6:28:36 - LMT 1887 Jul 16 # long and rather painful to read. # http://www.qp.gov.sk.ca/documents/English/Statutes/Statutes/T14.pdf +# From Heitor David Pinto (2026-05-14): +# In Saskatchewan, a bill was passed to replace the Time Act. It sets UTC-6 all +# year in the whole province, including Lloydminster, but allows the government +# to issue regulations specifying a different time in localities that request +# so: +# https://docs.legassembly.sk.ca/legdocs/Bills/30L2S/Bill30-58.pdf +# The bill ... received royal assent today. +# From Tim Parenti (2026-05-14): +# In light of Alberta joining Saskatchewan on year-round -06, this simplifies +# the prior Act's framework for the many local exceptions to year-round -06 in +# border areas, by extending province-wide the notion of "time option areas" +# which can be prescribed by regulation "if it is in the provincial interest" +# for those areas to observe either "UTC-5, UTC-6 or UTC-7 for all or part of +# the year" on at least 30 days' notice. +# The new Act comes into force by order of the Lieutenant Governor in Council. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Regina 1918 only - Apr 14 2:00 1:00 D Rule Regina 1918 only - Oct 27 2:00 0 S @@ -1902,6 +1929,45 @@ Zone America/Swift_Current -7:11:20 - LMT 1905 Sep # Boyer JP. Forcing Choice: The Risky Reward of Referendums. Dundum. 2017. # ISBN 978-1459739123. +# From Roozbeh Pournader (2026-04-20): +# https://calgaryherald.com/opinion/columnists/bell-alberta-daylight-time-year-round-premier-danielle-smith +# +# From Tim Parenti (2026-04-23): +# Section 3 of Bill 31, the Red Tape Reduction Statutes Amendment Act, 2026 +# https://docs.assembly.ab.ca/LADDAR_files/docs/bills/bill/legislature_31/session_2/20251023_bill-031.pdf +# would repeal the Daylight Saving Time Act in the Revised Statutes of Alberta +# 2000 Chapter D-5: +# https://kings-printer.alberta.ca/documents/Acts/D05.pdf +# ...and substitutes a new chapter with language that closely parallels the +# original. The new title is the Official Time Act and will be numbered +# Chapter O-5.7. The Act establishes a standard time of UTC−6 without +# replacing the language previously used to effectuate DST. +# +# From Tim Parenti (2026-06-19): +# After receiving Royal Assent on 2026-05-14, Order in Council 204/2026 was +# issued on 2026-06-18 proclaiming the relevant section of the bill in force on +# the same date. Order in Council 206/2026, issued the same day, uses the +# regulatory authority within the Act to prescribe the official term "Alberta +# Time"; we use the traditional abbreviation CST for consistency. +# https://kings-printer.alberta.ca/Documents/Orders/Orders_in_Council/2026/2026_204.pdf +# https://kings-printer.alberta.ca/Documents/Orders/Orders_in_Council/2026/2026_206.pdf +# +# Since wall clock times do not diverge from past practice until 2026-11-01, +# use that transition date for now to work around potential CLDR limitations in +# the meantime; see British Columbia, below. +# +# From Paul Eggert (2026-07-02): +# The temporary hack for Alberta is needed for CLDR 48.2 (2026-03-17) +# and earlier, not the CLDR 48.1-and-earlier which drives BC’s temporary hack. +# Only a few platforms track minor CLDR releases, though, so the two +# temporary hacks have roughly the same effect in practice. +# +# The term “Alberta Time” is legally prescribed from yesterday until +# 2031-06-30, when the regulation in OiC 206/2026 expires to ensure that the +# term is reviewed by then for relevancy and need. This plan for possible +# obsolescence affects neither timekeeping nor TZDB’s data, which do +# not contain the string “Alberta Time”. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Edm 1918 1919 - Apr Sun>=8 2:00 1:00 D Rule Edm 1918 only - Oct 27 2:00 0 S @@ -1919,7 +1985,11 @@ Rule Edm 1972 2006 - Oct lastSun 2:00 0 S # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone America/Edmonton -7:33:52 - LMT 1906 Sep -7:00 Edm M%sT 1987 - -7:00 Canada M%sT + -7:00 Canada M%sT 2026 Jun 18 + # Temporary hack; see above. + -7:00 1:00 MDT 2026 Nov 1 2:00 + # End of temporary hack. + -6:00 - CST # British Columbia @@ -1962,7 +2032,7 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # on March 8 will be the last time change, ending twice-yearly clock changes.” # https://news.gov.bc.ca/releases/2026AG0013-000209 # -# From Paul Eggert (2026-03-07): +# From Paul Eggert (2026-07-02): # The law says that 21 hours after the usual 2026-03-08 02:00 switch from # PST to PDT, the next day inaugurates the new standard time Pacific Time, # i.e., just one clock change but two name changes separated by 21 hours. @@ -1971,13 +2041,14 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # I asked the BC government for advice, with no response. For now, do this: # 1. As a temporary hack, pretend that the BC law takes effect # not on 2026-03-09 at 00:00, but on 2026-11-01 at 02:00. -# This pretense works around a limitation in CLDR v48.2 (2026-03-17), +# This pretense works around a limitation in CLDR 48.1 (2026-01-08), # which would otherwise say the interval uses “Pacific Standard Time”. # (Below, this temporary hack is marked “Temporary hack; see above.”) # Strictly speaking this hack is incorrect since the interval uses # standard time, but it does have the right UT offset and it # works around the CLDR limitation. We should be able to remove -# the temporary hack after CLDR is fixed. +# the temporary hack by November when there would be little point +# to keeping it anyway. # 2. After the BC law takes effect, model the time as MST sans DST. # We can change this later if another conforming non-numeric abbreviation # for Pacific Time becomes more popular. Possibilities include: @@ -1988,10 +2059,7 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # PST - straightforward but even more confusing, # and will likely break much software that assumes PST is -08 # -07 - accurate and clear in itself, but makes BC look odd vs neighbors -# CPT, CPST - for Canadian Pacific (Standard) Time, -# by analogy with AEST in Australia -# P-T - conforming approximation to “PT” -# PT+ - like P-T but suggesting one-hour advance over PST +# PacT - straightforward but novel abbreviation for Pacific Time # From Chris Walton (2026-03-15): # The Regional District of East Kootenay is planning to move to year-round @@ -2006,6 +2074,10 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # saying, “Pardon the pun, but this is not a time-sensitive issue.” # For now, merely mention the potential change in these comments. # If it happens it would likely affect clocks starting 2027-03-14 at 02:00. +# From Tim Parenti (2026-05-14): +# RDEK has historically been aligned with neighboring Alberta. With the latter +# now opting to stay on -06 year-round, if RDEK does not follow, it would +# require a new zone for the Cranbrook area. # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Vanc 1918 only - Apr 14 2:00 1:00 D @@ -2022,7 +2094,7 @@ Zone America/Vancouver -8:12:28 - LMT 1884 -8:00 Vanc P%sT 1987 -8:00 Canada P%sT 2026 Mar 9 # Temporary hack; see above. - -8:00 1:00 PDT 2026 Nov 1 02:00 + -8:00 1:00 PDT 2026 Nov 1 2:00 # End of temporary hack. -7:00 - MST Zone America/Dawson_Creek -8:00:56 - LMT 1884 @@ -2350,6 +2422,23 @@ Zone America/Fort_Nelson -8:10:47 - LMT 1884 # about 1970, and uses PST for standard time in Yukon since then. Consistent # with that, use MST for -07, the new standard time in Yukon effective Nov. 1. +# From Tim Parenti (2026-04-21): +# "[Northwest Territories] Premier R.J. Simpson announced Monday that the +# territory will move to end seasonal time changes and will adopt a year-round +# time standard instead. ... Simpson has previously said the territory wouldn't +# end seasonal time changes until Alberta does." +# https://www.cbc.ca/news/canada/north/nwt-ends-daylight-saving-9.7170964 +# +# From Tim Parenti (2026-06-19), per James Bellaire (2026-06-02): +# Much of NWT has, to date, been represented by America/Edmonton, which alias +# America/Yellowknife links to. While Bill 13 (assented to 2021-03-31) would +# enable NWT's proposed change mirroring Alberta's, at time of writing it has +# not yet been formally enacted; if it doesn't move forward as expected, +# America/Yellowknife would need to become its own zone as Alberta has stopped +# changing its clocks. +# If it does go ahead, draft changes to America/Inuvik, which represents the +# remainder of NWT, are commented below. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule NT_YK 1918 only - Apr 14 2:00 1:00 D Rule NT_YK 1918 only - Oct 27 2:00 0 S @@ -2392,6 +2481,10 @@ Zone America/Inuvik 0 - -00 1953 # Inuvik founded -8:00 NT_YK P%sT 1979 Apr lastSun 2:00 -7:00 NT_YK M%sT 1980 -7:00 Canada M%sT +# Assuming Northwest Territories follows Alberta in abolishing seasonal time +# changes, replace the above line with something like: +# -7:00 Canada M%sT 2026 Nov 1 2:00 +# -6:00 - CST Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20 -9:00 NT_YK Y%sT 1965 -9:00 Yukon Y%sT 1966 Feb 27 0:00 diff --git a/contrib/tzdata/theory.html b/contrib/tzdata/theory.html index 12f4f7f4b439..8f76aaf0b3c8 100644 --- a/contrib/tzdata/theory.html +++ b/contrib/tzdata/theory.html @@ -592,10 +592,10 @@ in decreasing order of importance: locations while uninhabited. The leading "-" is a flag that the UT offset is in some sense undefined; this notation is derived - from Internet + from Internet RFC 3339. (The abbreviation Z that - Internet + Internet RFC 9557 uses for this concept would violate the POSIX requirement of at least three characters in an abbreviation.) @@ -632,7 +632,7 @@ Errors in the tz database arise from many sources: timestamps, and current predictions will be incorrect after future governments change the rules. For example, if today someone schedules a meeting for 13:00 next - October 1, Casablanca time, and tomorrow Morocco changes its + October 1, Dublin time, and tomorrow Ireland changes its daylight saving rules, software can mess up after the rule change if it blithely relies on conversions made before the change.
  • @@ -657,7 +657,7 @@ Errors in the tz database arise from many sources: zones at all, often not even a stable landscape of mean times, prior to the middle decades of the twentieth century”. See: Timothy Shenk, Booked: +href="https://dissentmagazine.org/online_articles/booked-a-global-history-of-time-vanessa-ogle/">Booked: A Global History of Time. Dissent 2015-12-17.
  • @@ -938,7 +938,7 @@ with problems that were fixed in later POSIX editions. has a format that is hard to describe and is error-prone in practice. Also, proleptic TZ strings cannot deal with daylight saving time rules not based on the Gregorian calendar (as in - Morocco), or with situations where more than two time zone + Palestine), or with situations where more than two time zone abbreviations or UT offsets are used in an area.

    @@ -1128,7 +1128,7 @@ However POSIX.1-2024, like earlier POSIX editions, has some limitations: the name of a file from which time-related information is read. The file’s format is TZif, a timezone information format that contains binary data; see - Internet + Internet RFC 9636. The daylight saving time rules to be used for a particular timezone are encoded in the @@ -1212,8 +1212,8 @@ The vestigial APIs are:
  • The tm_isdst member is almost never needed and most of - its uses should be discouraged in favor of the abovementioned - APIs. + its uses should be discouraged in favor of the + APIs mentioned above. It was intended as an index into the tzname variable, but as mentioned previously that usage is obsolete. Although it can still be used in arguments to @@ -1558,7 +1558,7 @@ Sources for time on other planets: Michael Allison and Robert Schmunk, “Technical Notes on Mars Solar Time as Adopted by the Mars24 Sunclock” - (2020-03-08). + (2023-05-15).
  • Zara Mirmalek, diff --git a/contrib/tzdata/version b/contrib/tzdata/version index 75d34ee38931..9217a2da674e 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2026b +2026c diff --git a/contrib/tzdata/ziguard.awk b/contrib/tzdata/ziguard.awk index c0acb72a0380..ba3a13405d75 100644 --- a/contrib/tzdata/ziguard.awk +++ b/contrib/tzdata/ziguard.awk @@ -184,7 +184,7 @@ DATAFORM != "main" { dstoff = get_minutes(rules) } else { # The DST offset is normally an hour, but there are special cases. - if (rules == "Morocco" && NF == 3) { + if (rules == "Morocco" && $4 == 2026) { dstoff = -60 } else if (rules == "NBorneo") { dstoff = 20 @@ -286,13 +286,13 @@ DATAFORM != "main" { } } } - if ($1 ~ /^[+0-9-]/ && NF == 3) { + if ($1 ~ /^[+0-9-]/ && $4 == 2026) { if (DATAFORM == "rearguard") { sub(/1:00\tMorocco/, "0:00\tMorocco") - sub(/\t\+01\/\+00$/, "\t+00/+01") + sub(/\t\+01\/\+00/, "\t+00/+01") } else { sub(/0:00\tMorocco/, "1:00\tMorocco") - sub(/\t\+00\/+01$/, "\t+01/+00") + sub(/\t\+00\/+01/, "\t+01/+00") } } } diff --git a/contrib/tzdata/zone.tab b/contrib/tzdata/zone.tab index 2ae8a8c439eb..69d50bd8ae3b 100644 --- a/contrib/tzdata/zone.tab +++ b/contrib/tzdata/zone.tab @@ -121,7 +121,7 @@ CA +744144-0944945 America/Resolute Central - NU (Resolute) CA +624900-0920459 America/Rankin_Inlet Central - NU (central) CA +5024-10439 America/Regina CST - SK (most areas) CA +5017-10750 America/Swift_Current CST - SK (midwest) -CA +5333-11328 America/Edmonton Mountain - AB, BC(E), NT(E), SK(W) +CA +5333-11328 America/Edmonton CST - AB, BC(E), NT(E), SK(W) CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) CA +682059-1334300 America/Inuvik Mountain - NT (west) CA +4916-12307 America/Vancouver MST - BC (most areas) diff --git a/contrib/tzdata/zone1970.tab b/contrib/tzdata/zone1970.tab index 48b9aa978d53..b9a8dd5305c3 100644 --- a/contrib/tzdata/zone1970.tab +++ b/contrib/tzdata/zone1970.tab @@ -113,7 +113,7 @@ CA +744144-0944945 America/Resolute Central - NU (Resolute) CA +624900-0920459 America/Rankin_Inlet Central - NU (central) CA +5024-10439 America/Regina CST - SK (most areas) *** 33 LINES SKIPPED *** From nobody Sun Jul 12 08:35:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gyf6B4B98z6l3xy for ; Sun, 12 Jul 2026 08:35: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gyf6B3Lckz3FYy for ; Sun, 12 Jul 2026 08:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783845346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fzzsRQRqw5myLHZhRvncmeVUBx8pqqGRIyy0yjMY1V0=; b=BhHaF+9OPjIAXQyf7vnZ1WHoT4dRdROH4qXf1PGCAcQuSkAah7CnW+d8WzXHwKauLDMY1J eL2azV83v+kK8xKnZWuJAkFRsv2u0uIorQTDniuCnwFsPhZ543Tih87D19zL83Ss2N6IU0 DJTkQ4qp49oMQu2JamkzrAS8gfBpxp4LFIEHbySA+sIjlipdzXxWnWQrPzNUx4r1Kad+1N Y2usSMbSHTrxhMGy5cEk/X4LbSZMdknEfO99FyOfdFJ1SEN1D+XeaKyD2pI7uR3k39lvVB a0YL8luBnVWi/UPaAfgv6Vi5cXEkmrf4gXEK24yLIcKZIjn+nxdhx+QT0z2l/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783845346; a=rsa-sha256; cv=none; b=pr6wwJ7danvZxjQVZEJWFR/TTFFVpZxL9mr/wg8yi2gGU0wz2ywEA2H/oGrvdgg+brXjVk Rx9qzOfebHnX+e+E6buWH/+cTV4ZLkHhZkrY9OZR6rw2UQsUrdef+mNICIOKzQUg/Zy+Pq AruzCtaQ7vX9rHOg5knZpYN989I+xR6aZ74p7FXM62RjoXBc/dTxenRYhpzqlq5kT1QTNk aQqyca1Ek/6MZjv9tZI8BsAYu26/vgKimGAM9A0hXDoOASjZ+v6njjPF25NjRVSdXK27z2 fJZ2i/c4ZvRYy/3hONxA08HbLReyttRgt/ePToDpxhy5ReaFwaJ5t/s/5SLC7A== 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=1783845346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fzzsRQRqw5myLHZhRvncmeVUBx8pqqGRIyy0yjMY1V0=; b=Mo3QYwFHTAoZdkyLGV7YHPB4ET9wWTMn89r2+5ZE1gfCcWAHW6TkaAGhUgyU7mcqHxlOEZ C8USp5XL+RSwkd4jxW5lJ3GBrXeWIh0Z+2wZXwQc8tVRPHp1ywgjFTrWUddcz9FFNmO7+P dtlr+HyBr3E35wBzACQUX/t76c9tXWlrtDcqC6D5iBIkHPs5g1hGXw+i5kj2AMFdJ7Yydh NYWdCk12n4faOGhPdTStmF4xuP4FyVbRHCm2mPo+sRtDaV09apA3tS7Q3TN9ZORHcnWoe/ dT/oMH3f6LBPyDmNuYLBFHXSVmUK7Qjf318UB1SKH4pjf3YPJoKaR7mmgL4A1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gyf6B2KJ9z1K84 for ; Sun, 12 Jul 2026 08:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31bf8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Jul 2026 08:35:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b34fd6017a57 - stable/15 - libc locale/localeconv.c: use release semantic when clearing locale_changed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: b34fd6017a572b3f62885cc8976df7c2449834cf Auto-Submitted: auto-generated Date: Sun, 12 Jul 2026 08:35:46 +0000 Message-Id: <6a5351e2.31bf8.344b911f@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b34fd6017a572b3f62885cc8976df7c2449834cf commit b34fd6017a572b3f62885cc8976df7c2449834cf Author: Konstantin Belousov AuthorDate: 2026-07-05 02:50:27 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-12 08:34:45 +0000 libc locale/localeconv.c: use release semantic when clearing locale_changed PR: 296410 (cherry picked from commit 4efbcf36a0d49ab142023a767871532f515f1381) --- lib/libc/locale/localeconv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/locale/localeconv.c b/lib/libc/locale/localeconv.c index 2cd629e8210d..3efd95fc5452 100644 --- a/lib/libc/locale/localeconv.c +++ b/lib/libc/locale/localeconv.c @@ -88,7 +88,7 @@ localeconv_l(locale_t loc) M_ASSIGN_CHAR(int_n_sep_by_space); M_ASSIGN_CHAR(int_p_sign_posn); M_ASSIGN_CHAR(int_n_sign_posn); - atomic_store_int(&loc->monetary_locale_changed, 0); + atomic_store_rel_int(&loc->monetary_locale_changed, 0); } if (atomic_load_acq_int(&loc->numeric_locale_changed) != 0) { @@ -101,7 +101,7 @@ localeconv_l(locale_t loc) N_ASSIGN_STR(decimal_point); N_ASSIGN_STR(thousands_sep); N_ASSIGN_STR(grouping); - atomic_store_int(&loc->numeric_locale_changed, 0); + atomic_store_rel_int(&loc->numeric_locale_changed, 0); } return ret;