From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:03:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA65D4D5912; Fri, 1 Jan 2021 00:03: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QH35qVSz4ZTd; Fri, 1 Jan 2021 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB5311935F; Fri, 1 Jan 2021 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10103x5I093714; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10103xVT093713; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:03:59 GMT Message-Id: <202101010003.10103xVT093713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3e06c7da020f - main - Use kdb_thr_* to iterate over threads consistently in DDB. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e06c7da020fadb8ffbfc26d634ccb321e7e22f7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:03:59 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3e06c7da020fadb8ffbfc26d634ccb321e7e22f7 commit 3e06c7da020fadb8ffbfc26d634ccb321e7e22f7 Author: John Baldwin AuthorDate: 2021-01-01 00:01:35 +0000 Commit: John Baldwin CommitDate: 2021-01-01 00:01:35 +0000 Use kdb_thr_* to iterate over threads consistently in DDB. The "findstack", "show all trace", and "show active trace" commands were iterating over allproc to enumerate threads. This missed threads executing in exit1() after being removed from allproc. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27829 --- sys/ddb/db_command.c | 37 ++++++++++++++++++------------------- sys/ddb/db_ps.c | 11 ++++------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 1fa1cd1b7bb9..21ff75f78e6a 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -847,32 +847,31 @@ db_stack_trace(db_expr_t tid, bool hastid, db_expr_t count, char *modif) static void _db_stack_trace_all(bool active_only) { - struct proc *p; struct thread *td; jmp_buf jb; void *prev_jb; - FOREACH_PROC_IN_SYSTEM(p) { + for (td = kdb_thr_first(); td != NULL; td = kdb_thr_next(td)) { prev_jb = kdb_jmpbuf(jb); if (setjmp(jb) == 0) { - FOREACH_THREAD_IN_PROC(p, td) { - if (td->td_state == TDS_RUNNING) - db_printf("\nTracing command %s pid %d" - " tid %ld td %p (CPU %d)\n", - p->p_comm, p->p_pid, - (long)td->td_tid, td, - td->td_oncpu); - else if (active_only) - continue; - else - db_printf("\nTracing command %s pid %d" - " tid %ld td %p\n", p->p_comm, - p->p_pid, (long)td->td_tid, td); + if (td->td_state == TDS_RUNNING) + db_printf("\nTracing command %s pid %d" + " tid %ld td %p (CPU %d)\n", + td->td_proc->p_comm, td->td_proc->p_pid, + (long)td->td_tid, td, td->td_oncpu); + else if (active_only) + continue; + else + db_printf("\nTracing command %s pid %d" + " tid %ld td %p\n", td->td_proc->p_comm, + td->td_proc->p_pid, (long)td->td_tid, td); + if (td->td_proc->p_flag & P_INMEM) db_trace_thread(td, -1); - if (db_pager_quit) { - kdb_jmpbuf(prev_jb); - return; - } + else + db_printf("--- swapped out\n"); + if (db_pager_quit) { + kdb_jmpbuf(prev_jb); + return; } } kdb_jmpbuf(prev_jb); diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c index da655d11da02..2e5e6332d6e8 100644 --- a/sys/ddb/db_ps.c +++ b/sys/ddb/db_ps.c @@ -512,7 +512,6 @@ void db_findstack_cmd(db_expr_t addr, bool have_addr, db_expr_t dummy3 __unused, char *dummy4 __unused) { - struct proc *p; struct thread *td; vm_offset_t saddr; @@ -523,12 +522,10 @@ db_findstack_cmd(db_expr_t addr, bool have_addr, db_expr_t dummy3 __unused, return; } - FOREACH_PROC_IN_SYSTEM(p) { - FOREACH_THREAD_IN_PROC(p, td) { - if (kstack_contains(td, saddr, 1)) { - db_printf("Thread %p\n", td); - return; - } + for (td = kdb_thr_first(); td != NULL; td = kdb_thr_next(td)) { + if (kstack_contains(td, saddr, 1)) { + db_printf("Thread %p\n", td); + return; } } } From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:04:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BF594D57D6; Fri, 1 Jan 2021 00:04: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QH36w8pz4ZNy; Fri, 1 Jan 2021 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF8EE190FE; Fri, 1 Jan 2021 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10103xX8093748; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10103xp7093747; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:03:59 GMT Message-Id: <202101010003.10103xp7093747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 825d234144c5 - main - Don't check P_INMEM in kdb_thr_*(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 825d234144c5006e81c752bda7b9bcc2f822707e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:04:00 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=825d234144c5006e81c752bda7b9bcc2f822707e commit 825d234144c5006e81c752bda7b9bcc2f822707e Author: John Baldwin AuthorDate: 2021-01-01 00:01:12 +0000 Commit: John Baldwin CommitDate: 2021-01-01 00:01:12 +0000 Don't check P_INMEM in kdb_thr_*(). Not all debugger operations that enumerate threads require thread stacks to be resident in memory to be useful. Instead, push P_INMEM checks (if needed) into callers. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27827 --- sys/ddb/db_command.c | 5 ++++- sys/ddb/db_thread.c | 7 +++++-- sys/kern/subr_kdb.c | 15 +++++++-------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 1a836be335bf..1fa1cd1b7bb9 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -838,7 +838,10 @@ db_stack_trace(db_expr_t tid, bool hastid, db_expr_t count, char *modif) else pid = -1; db_printf("Tracing pid %d tid %ld td %p\n", pid, (long)td->td_tid, td); - db_trace_thread(td, count); + if (td->td_proc != NULL && (td->td_proc->p_flag & P_INMEM) == 0) + db_printf("--- swapped out\n"); + else + db_trace_thread(td, count); } static void diff --git a/sys/ddb/db_thread.c b/sys/ddb/db_thread.c index 780301a22106..e7619dc368fe 100644 --- a/sys/ddb/db_thread.c +++ b/sys/ddb/db_thread.c @@ -90,8 +90,11 @@ db_show_threads(db_expr_t addr, bool hasaddr, db_expr_t cnt, char *mod) (void *)thr->td_kstack); prev_jb = kdb_jmpbuf(jb); if (setjmp(jb) == 0) { - if (db_trace_thread(thr, 1) != 0) - db_printf("***\n"); + if (thr->td_proc->p_flag & P_INMEM) { + if (db_trace_thread(thr, 1) != 0) + db_printf("***\n"); + } else + db_printf("*** swapped out\n"); } kdb_jmpbuf(prev_jb); thr = kdb_thr_next(thr); diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index 04b9b5a838df..576635e4a8dc 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -590,11 +590,9 @@ kdb_thr_first(void) for (i = 0; i <= pidhash; i++) { LIST_FOREACH(p, &pidhashtbl[i], p_hash) { - if (p->p_flag & P_INMEM) { - thr = FIRST_THREAD_IN_PROC(p); - if (thr != NULL) - return (thr); - } + thr = FIRST_THREAD_IN_PROC(p); + if (thr != NULL) + return (thr); } } return (NULL); @@ -606,7 +604,7 @@ kdb_thr_from_pid(pid_t pid) struct proc *p; LIST_FOREACH(p, PIDHASH(pid), p_hash) { - if (p->p_flag & P_INMEM && p->p_pid == pid) + if (p->p_pid == pid) return (FIRST_THREAD_IN_PROC(p)); } return (NULL); @@ -641,8 +639,9 @@ kdb_thr_next(struct thread *thr) return (NULL); p = LIST_FIRST(&pidhashtbl[hash]); } - if (p->p_flag & P_INMEM) - return (FIRST_THREAD_IN_PROC(p)); + thr = FIRST_THREAD_IN_PROC(p); + if (thr != NULL) + return (thr); } } From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:04:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 214634D5884; Fri, 1 Jan 2021 00:04: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QH40LZlz4ZRk; Fri, 1 Jan 2021 00:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F13BE1988A; Fri, 1 Jan 2021 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10103xe8093765; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10103xBn093764; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:03:59 GMT Message-Id: <202101010003.10103xBn093764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9acce1c99299 - main - Enumerate processes via the pid hash table in kdb_thr_*(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9acce1c99299b5b59998e2d0c461bcf01d959374 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:04:00 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9acce1c99299b5b59998e2d0c461bcf01d959374 commit 9acce1c99299b5b59998e2d0c461bcf01d959374 Author: John Baldwin AuthorDate: 2021-01-01 00:00:54 +0000 Commit: John Baldwin CommitDate: 2021-01-01 00:00:54 +0000 Enumerate processes via the pid hash table in kdb_thr_*(). Processes part way through exit1() are not included in allproc. Using allproc to enumerate processes prevented getting the stack trace of a thread in this part of exit1() via ddb. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27826 --- sys/kern/subr_kdb.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index 4fa35064cb54..04b9b5a838df 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -586,12 +586,15 @@ kdb_thr_first(void) { struct proc *p; struct thread *thr; - - FOREACH_PROC_IN_SYSTEM(p) { - if (p->p_flag & P_INMEM) { - thr = FIRST_THREAD_IN_PROC(p); - if (thr != NULL) - return (thr); + u_int i; + + for (i = 0; i <= pidhash; i++) { + LIST_FOREACH(p, &pidhashtbl[i], p_hash) { + if (p->p_flag & P_INMEM) { + thr = FIRST_THREAD_IN_PROC(p); + if (thr != NULL) + return (thr); + } } } return (NULL); @@ -602,7 +605,7 @@ kdb_thr_from_pid(pid_t pid) { struct proc *p; - FOREACH_PROC_IN_SYSTEM(p) { + LIST_FOREACH(p, PIDHASH(pid), p_hash) { if (p->p_flag & P_INMEM && p->p_pid == pid) return (FIRST_THREAD_IN_PROC(p)); } @@ -624,17 +627,23 @@ struct thread * kdb_thr_next(struct thread *thr) { struct proc *p; + u_int hash; p = thr->td_proc; thr = TAILQ_NEXT(thr, td_plist); - do { - if (thr != NULL) - return (thr); - p = LIST_NEXT(p, p_list); - if (p != NULL && (p->p_flag & P_INMEM)) - thr = FIRST_THREAD_IN_PROC(p); - } while (p != NULL); - return (NULL); + if (thr != NULL) + return (thr); + hash = p->p_pid & pidhash; + for (;;) { + p = LIST_NEXT(p, p_hash); + while (p == NULL) { + if (++hash > pidhash) + return (NULL); + p = LIST_FIRST(&pidhashtbl[hash]); + } + if (p->p_flag & P_INMEM) + return (FIRST_THREAD_IN_PROC(p)); + } } int From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:03:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAA3B4D5981; Fri, 1 Jan 2021 00:03: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QH35LPpz4ZGR; Fri, 1 Jan 2021 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AACF7190FD; Fri, 1 Jan 2021 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10103x6L093697; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10103xxD093696; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:03:59 GMT Message-Id: <202101010003.10103xxD093696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b4247e0cdfdd - main - ddb: Display process flags (p_flag and p_flag2) in 'show proc'. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4247e0cdfdd047ea855eac1f75644081ac242ef Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:03:59 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b4247e0cdfdd047ea855eac1f75644081ac242ef commit b4247e0cdfdd047ea855eac1f75644081ac242ef Author: John Baldwin AuthorDate: 2021-01-01 00:01:52 +0000 Commit: John Baldwin CommitDate: 2021-01-01 00:01:52 +0000 ddb: Display process flags (p_flag and p_flag2) in 'show proc'. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27872 --- sys/ddb/db_ps.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c index 2e5e6332d6e8..44b803299ee9 100644 --- a/sys/ddb/db_ps.c +++ b/sys/ddb/db_ps.c @@ -485,6 +485,8 @@ DB_SHOW_COMMAND(proc, db_show_proc) p->p_leader); if (p->p_sysent != NULL) db_printf(" ABI: %s\n", p->p_sysent->sv_name); + db_printf(" flag: %#x ", p->p_flag); + db_printf(" flag2: %#x\n", p->p_flag2); if (p->p_args != NULL) { db_printf(" arguments: "); dump_args(p); From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:04:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AF7E4D5913; Fri, 1 Jan 2021 00:04: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QH40xtPz4ZP1; Fri, 1 Jan 2021 00:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0CF7219361; Fri, 1 Jan 2021 00:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10103xtd093782; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10103xbL093781; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:03:59 GMT Message-Id: <202101010003.10103xbL093781@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4e7d1b527c1e - main - Add a proc_off_p_hash helper variable. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e7d1b527c1ef77851b15f65e2d78b8017b669aa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:04:00 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4e7d1b527c1ef77851b15f65e2d78b8017b669aa commit 4e7d1b527c1ef77851b15f65e2d78b8017b669aa Author: John Baldwin AuthorDate: 2021-01-01 00:00:33 +0000 Commit: John Baldwin CommitDate: 2021-01-01 00:00:33 +0000 Add a proc_off_p_hash helper variable. This is used by kernel debuggers to enumerate processes via the pid hash table. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27825 --- sys/kern/kern_proc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 83c668eaece3..abc3206c5a26 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -142,6 +142,7 @@ uma_zone_t proc_zone; const int proc_off_p_pid = offsetof(struct proc, p_pid); const int proc_off_p_comm = offsetof(struct proc, p_comm); const int proc_off_p_list = offsetof(struct proc, p_list); +const int proc_off_p_hash = offsetof(struct proc, p_hash); const int proc_off_p_threads = offsetof(struct proc, p_threads); const int thread_off_td_tid = offsetof(struct thread, td_tid); const int thread_off_td_name = offsetof(struct thread, td_name); From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:04:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 639A34D5914; Fri, 1 Jan 2021 00:04: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QH427ymz4Z7b; Fri, 1 Jan 2021 00:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20878196D4; Fri, 1 Jan 2021 00:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101040v7093799; Fri, 1 Jan 2021 00:04:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101040HO093798; Fri, 1 Jan 2021 00:04:00 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:04:00 GMT Message-Id: <202101010004.101040HO093798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 47877889f2b8 - main - ddb ps: Use the pidhash to enumerate processes not in allproc. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47877889f2b823f4c2fa135f5f3955ce0b3bdca1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:04:00 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=47877889f2b823f4c2fa135f5f3955ce0b3bdca1 commit 47877889f2b823f4c2fa135f5f3955ce0b3bdca1 Author: John Baldwin AuthorDate: 2021-01-01 00:00:05 +0000 Commit: John Baldwin CommitDate: 2021-01-01 00:00:05 +0000 ddb ps: Use the pidhash to enumerate processes not in allproc. Exiting processes that have been removed from allproc but are still executing are not yet marked PRS_ZOMBIE, so they were not listed (for example, if a thread panics during exit1()). To detect these processes, clear p_list.le_prev to NULL explicitly after removing a process from the allproc list and check for this sentinel rather than PRS_ZOMBIE when walking the pidhash. While here, simplify the pidhash walk to use a single outer loop. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27824 --- sys/ddb/db_ps.c | 14 ++++++-------- sys/kern/kern_exit.c | 9 +++++++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c index df2db88e97a1..da655d11da02 100644 --- a/sys/ddb/db_ps.c +++ b/sys/ddb/db_ps.c @@ -107,7 +107,7 @@ void db_ps(db_expr_t addr, bool hasaddr, db_expr_t count, char *modif) { struct proc *p; - int i, j; + int i; ps_mode = modif[0] == 'a' ? PRINT_ARGS : PRINT_NONE; @@ -125,14 +125,12 @@ db_ps(db_expr_t addr, bool hasaddr, db_expr_t count, char *modif) db_ps_proc(p); /* - * Do zombies. + * Processes such as zombies not in allproc. */ - for (i = 0; i < pidhashlock + 1 && !db_pager_quit; i++) { - for (j = i; j <= pidhash && !db_pager_quit; j += pidhashlock + 1) { - LIST_FOREACH(p, &pidhashtbl[j], p_hash) { - if (p->p_state == PRS_ZOMBIE) - db_ps_proc(p); - } + for (i = 0; i <= pidhash && !db_pager_quit; i++) { + LIST_FOREACH(p, &pidhashtbl[i], p_hash) { + if (p->p_list.le_prev == NULL) + db_ps_proc(p); } } } diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 0e748751d019..e1b40a171345 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -39,6 +39,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ddb.h" #include "opt_ktrace.h" #include @@ -436,6 +437,14 @@ exit1(struct thread *td, int rval, int signo) */ sx_xlock(&allproc_lock); LIST_REMOVE(p, p_list); + +#ifdef DDB + /* + * Used by ddb's 'ps' command to find this process via the + * pidhash. + */ + p->p_list.le_prev = NULL; +#endif sx_xunlock(&allproc_lock); sx_xlock(&proctree_lock); From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:03:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFA854D53FB; Fri, 1 Jan 2021 00:03: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QH36TMgz4Z7Z; Fri, 1 Jan 2021 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE0A319360; Fri, 1 Jan 2021 00:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10103xVD093731; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10103xdw093730; Fri, 1 Jan 2021 00:03:59 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:03:59 GMT Message-Id: <202101010003.10103xdw093730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ae450907c639 - main - Use kdb_thr_from_pid() in db_lookup_thread(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae450907c6394332063566b0009f7aa0c296133e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:04:00 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ae450907c6394332063566b0009f7aa0c296133e commit ae450907c6394332063566b0009f7aa0c296133e Author: John Baldwin AuthorDate: 2021-01-01 00:01:27 +0000 Commit: John Baldwin CommitDate: 2021-01-01 00:01:27 +0000 Use kdb_thr_from_pid() in db_lookup_thread(). The code is identical, so this should be a no-op. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27828 --- sys/ddb/db_thread.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/ddb/db_thread.c b/sys/ddb/db_thread.c index e7619dc368fe..17b74c989ede 100644 --- a/sys/ddb/db_thread.c +++ b/sys/ddb/db_thread.c @@ -114,7 +114,6 @@ db_lookup_thread(db_expr_t addr, bool check_pid) { struct thread *td; db_expr_t decaddr; - struct proc *p; /* * If the parsed address was not a valid decimal expression, @@ -128,10 +127,9 @@ db_lookup_thread(db_expr_t addr, bool check_pid) if (td != NULL) return (td); if (check_pid) { - LIST_FOREACH(p, PIDHASH(decaddr), p_hash) { - if (p->p_pid == decaddr) - return (FIRST_THREAD_IN_PROC(p)); - } + td = kdb_thr_from_pid(decaddr); + if (td != NULL) + return (td); } return ((struct thread *)addr); } From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:11:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 040B04D5E55; Fri, 1 Jan 2021 00:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QS86gFkz4bpf; Fri, 1 Jan 2021 00:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D68281999F; Fri, 1 Jan 2021 00:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010Bq68005773; Fri, 1 Jan 2021 00:11:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010BqUi005772; Fri, 1 Jan 2021 00:11:52 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:11:52 GMT Message-Id: <202101010011.1010BqUi005772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: d7c62d98c9f9 - main - cache: call cache_fplookup_modifying in neg MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7c62d98c9f92f6be48562add1400f209b5bcac7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:11:53 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d7c62d98c9f92f6be48562add1400f209b5bcac7 commit d7c62d98c9f92f6be48562add1400f209b5bcac7 Author: Mateusz Guzik AuthorDate: 2020-12-28 11:22:35 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 00:10:43 +0000 cache: call cache_fplookup_modifying in neg Tested by: pho --- sys/kern/vfs_cache.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 49fabc47884d..40cd174e1022 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4501,12 +4501,8 @@ cache_fplookup_neg(struct cache_fpl *fpl, struct namecache *ncp, uint32_t hash) * If they want to create an entry we need to replace this one. */ if (__predict_false(fpl->cnp->cn_nameiop != LOOKUP)) { - /* - * TODO - * This should call something similar to - * cache_fplookup_final_modifying. - */ - return (cache_fpl_partial(fpl)); + fpl->tvp = NULL; + return (cache_fplookup_modifying(fpl)); } neg_promote = cache_neg_hit_prep(ncp); if (!cache_ncp_canuse(ncp)) { From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:11:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A1704D5F4F; Fri, 1 Jan 2021 00:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QS904KJz4bYJ; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E81DE19912; Fri, 1 Jan 2021 00:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010Bqgb005790; Fri, 1 Jan 2021 00:11:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010BqMx005789; Fri, 1 Jan 2021 00:11:52 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:11:52 GMT Message-Id: <202101010011.1010BqMx005789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 6fe7de1a250b - main - cache: refactor cache_fpl_handle_root to fit the rest of the code better MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fe7de1a250bb497ca1a3e1d979ae21c2149c2ea Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:11:53 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6fe7de1a250bb497ca1a3e1d979ae21c2149c2ea commit 6fe7de1a250bb497ca1a3e1d979ae21c2149c2ea Author: Mateusz Guzik AuthorDate: 2020-12-28 09:25:01 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 00:10:43 +0000 cache: refactor cache_fpl_handle_root to fit the rest of the code better Tested by: pho --- sys/kern/vfs_cache.c | 55 +++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 22a5b54b2805..49fabc47884d 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3562,31 +3562,6 @@ SYSCTL_BOOL(_vfs, OID_AUTO, cache_fast_lookup, CTLFLAG_RW, #define CACHE_FPL_FAILED -2020 -static void -cache_fpl_cleanup_cnp(struct componentname *cnp) -{ - - uma_zfree(namei_zone, cnp->cn_pnbuf); -#ifdef DIAGNOSTIC - cnp->cn_pnbuf = NULL; - cnp->cn_nameptr = NULL; -#endif -} - -static void -cache_fpl_handle_root(struct nameidata *ndp, struct vnode **dpp) -{ - struct componentname *cnp; - - cnp = &ndp->ni_cnd; - while (*(cnp->cn_nameptr) == '/') { - cnp->cn_nameptr++; - ndp->ni_pathlen--; - } - - *dpp = ndp->ni_rootdir; -} - /* * Components of nameidata (or objects it can point to) which may * need restoring in case fast path lookup fails. @@ -3613,6 +3588,34 @@ struct cache_fpl { bool fsearch; }; +static void +cache_fpl_cleanup_cnp(struct componentname *cnp) +{ + + uma_zfree(namei_zone, cnp->cn_pnbuf); +#ifdef DIAGNOSTIC + cnp->cn_pnbuf = NULL; + cnp->cn_nameptr = NULL; +#endif +} + +static struct vnode * +cache_fpl_handle_root(struct cache_fpl *fpl) +{ + struct nameidata *ndp; + struct componentname *cnp; + + ndp = fpl->ndp; + cnp = fpl->cnp; + + while (*(cnp->cn_nameptr) == '/') { + cnp->cn_nameptr++; + ndp->ni_pathlen--; + } + + return (ndp->ni_rootdir); +} + static void cache_fpl_checkpoint(struct cache_fpl *fpl, struct nameidata_saved *snd) { @@ -5174,7 +5177,7 @@ cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, cnp = fpl.cnp; cnp->cn_nameptr = cnp->cn_pnbuf; if (cnp->cn_pnbuf[0] == '/') { - cache_fpl_handle_root(ndp, &dvp); + dvp = cache_fpl_handle_root(&fpl); ndp->ni_resflags |= NIRES_ABS; } else { if (ndp->ni_dirfd == AT_FDCWD) { From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:11:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 413774D6288; Fri, 1 Jan 2021 00:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QS91Q3pz4bgm; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 227F81937C; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010Brrb005824; Fri, 1 Jan 2021 00:11:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010Br7p005823; Fri, 1 Jan 2021 00:11:53 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:11:53 GMT Message-Id: <202101010011.1010Br7p005823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 4651db56c7d7 - main - cache: remove a branch from mount point checking MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4651db56c7d785a08f3ffdb384f88a77af209ac9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:11:53 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4651db56c7d785a08f3ffdb384f88a77af209ac9 commit 4651db56c7d785a08f3ffdb384f88a77af209ac9 Author: Mateusz Guzik AuthorDate: 2020-12-28 07:34:29 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 00:10:42 +0000 cache: remove a branch from mount point checking Tested by: pho --- sys/kern/vfs_cache.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index cde2fde8a9ec..d5e5e6e3d018 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4569,8 +4569,7 @@ static bool cache_fplookup_mp_supported(struct mount *mp) { - if (mp == NULL) - return (false); + MPASS(mp != NULL); if ((mp->mnt_kern_flag & MNTK_FPLOOKUP) == 0) return (false); return (true); @@ -4947,8 +4946,8 @@ cache_fplookup_impl(struct vnode *dvp, struct cache_fpl *fpl) cache_fpl_aborted(fpl); goto out; } - mp = atomic_load_ptr(&fpl->dvp->v_mount); - if (!cache_fplookup_mp_supported(mp)) { + mp = atomic_load_ptr(&dvp->v_mount); + if (__predict_false(mp == NULL || !cache_fplookup_mp_supported(mp))) { cache_fpl_aborted(fpl); goto out; } From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:11:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F27B94D6285; Fri, 1 Jan 2021 00:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QS86SqDz4bkC; Fri, 1 Jan 2021 00:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF7D219911; Fri, 1 Jan 2021 00:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010BqJQ005756; Fri, 1 Jan 2021 00:11:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010Bq95005755; Fri, 1 Jan 2021 00:11:52 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:11:52 GMT Message-Id: <202101010011.1010Bq95005755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 1365b5f86f63 - main - cache: fold NCF_WHITE check into the rest MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1365b5f86f631ab6b30fd5f71685e39aa8887474 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:11:53 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1365b5f86f631ab6b30fd5f71685e39aa8887474 commit 1365b5f86f631ab6b30fd5f71685e39aa8887474 Author: Mateusz Guzik AuthorDate: 2020-12-28 11:24:48 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 00:10:43 +0000 cache: fold NCF_WHITE check into the rest Tested by: pho --- sys/kern/vfs_cache.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 40cd174e1022..4b8940b7511c 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -263,6 +263,18 @@ cache_ncp_invalidate(struct namecache *ncp) __predict_true((_nc_flag & (NCF_INVALID | NCF_WIP)) == 0); \ }) +/* + * Like the above but also checks NCF_WHITE. + */ +#define cache_fpl_neg_ncp_canuse(ncp) ({ \ + struct namecache *_ncp = (ncp); \ + u_char _nc_flag; \ + \ + atomic_thread_fence_acq(); \ + _nc_flag = atomic_load_char(&_ncp->nc_flag); \ + __predict_true((_nc_flag & (NCF_INVALID | NCF_WIP | NCF_WHITE)) == 0); \ +}) + /* * Name caching works as follows: * @@ -4505,11 +4517,7 @@ cache_fplookup_neg(struct cache_fpl *fpl, struct namecache *ncp, uint32_t hash) return (cache_fplookup_modifying(fpl)); } neg_promote = cache_neg_hit_prep(ncp); - if (!cache_ncp_canuse(ncp)) { - cache_neg_hit_abort(ncp); - return (cache_fpl_partial(fpl)); - } - if (__predict_false((nc_flag & NCF_WHITE) != 0)) { + if (!cache_fpl_neg_ncp_canuse(ncp)) { cache_neg_hit_abort(ncp); return (cache_fpl_partial(fpl)); } From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:11:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 259724D6115; Fri, 1 Jan 2021 00:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QS90bl8z4bYK; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05BE9193F9; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010Bqjf005807; Fri, 1 Jan 2021 00:11:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010BqJX005806; Fri, 1 Jan 2021 00:11:52 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:11:52 GMT Message-Id: <202101010011.1010BqJX005806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: e17e01bd0e4a - main - cache: refactor dot handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e17e01bd0e4a528fff69bff8faf7045d4d619aae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:11:53 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e17e01bd0e4a528fff69bff8faf7045d4d619aae commit e17e01bd0e4a528fff69bff8faf7045d4d619aae Author: Mateusz Guzik AuthorDate: 2020-12-28 07:46:02 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 00:10:43 +0000 cache: refactor dot handling Tested by: pho --- sys/kern/vfs_cache.c | 51 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index d5e5e6e3d018..22a5b54b2805 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3746,6 +3746,7 @@ _Static_assert((CACHE_FPL_SUPPORTED_CN_FLAGS & CACHE_FPL_INTERNAL_CN_FLAGS) == 0 "supported and internal flags overlap"); static bool cache_fplookup_is_mp(struct cache_fpl *fpl); +static int cache_fplookup_cross_mount(struct cache_fpl *fpl); static bool cache_fpl_islastcn(struct nameidata *ndp) @@ -4392,6 +4393,7 @@ cache_fplookup_noentry(struct cache_fpl *fpl) static int __noinline cache_fplookup_dot(struct cache_fpl *fpl) { + int error; MPASS(!seqc_in_modify(fpl->dvp_seqc)); /* @@ -4401,6 +4403,12 @@ cache_fplookup_dot(struct cache_fpl *fpl) */ fpl->tvp = fpl->dvp; fpl->tvp_seqc = fpl->dvp_seqc; + if (cache_fplookup_is_mp(fpl)) { + error = cache_fplookup_cross_mount(fpl); + if (__predict_false(error != 0)) { + return (error); + } + } counter_u64_add(dothits, 1); SDT_PROBE3(vfs, namecache, lookup, hit, fpl->dvp, ".", fpl->dvp); @@ -4421,6 +4429,8 @@ cache_fplookup_dotdot(struct cache_fpl *fpl) cnp = fpl->cnp; dvp = fpl->dvp; + MPASS(cache_fpl_isdotdot(cnp)); + /* * XXX this is racy the same way regular lookup is */ @@ -4520,14 +4530,22 @@ cache_fplookup_next(struct cache_fpl *fpl) struct vnode *dvp, *tvp; u_char nc_flag; uint32_t hash; + int error; cnp = fpl->cnp; dvp = fpl->dvp; - if (__predict_false(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.')) { - return (cache_fplookup_dot(fpl)); + if (__predict_false(cnp->cn_nameptr[0] == '.')) { + if (cnp->cn_namelen == 1) { + return (cache_fplookup_dot(fpl)); + } + if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { + return (cache_fplookup_dotdot(fpl)); + } } + MPASS(!cache_fpl_isdotdot(cnp)); + hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); CK_SLIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { @@ -4560,6 +4578,13 @@ cache_fplookup_next(struct cache_fpl *fpl) return (cache_fpl_partial(fpl)); } + if (cache_fplookup_is_mp(fpl)) { + error = cache_fplookup_cross_mount(fpl); + if (__predict_false(error != 0)) { + return (error); + } + } + counter_u64_add(numposhits, 1); SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name, tvp); return (0); @@ -4973,25 +4998,9 @@ cache_fplookup_impl(struct vnode *dvp, struct cache_fpl *fpl) break; } - if (__predict_false(cache_fpl_isdotdot(cnp))) { - error = cache_fplookup_dotdot(fpl); - if (__predict_false(cache_fpl_terminated(fpl))) { - break; - } - } else { - error = cache_fplookup_next(fpl); - if (__predict_false(cache_fpl_terminated(fpl))) { - break; - } - - VNPASS(!seqc_in_modify(fpl->tvp_seqc), fpl->tvp); - - if (cache_fplookup_is_mp(fpl)) { - error = cache_fplookup_cross_mount(fpl); - if (__predict_false(error != 0)) { - break; - } - } + error = cache_fplookup_next(fpl); + if (__predict_false(cache_fpl_terminated(fpl))) { + break; } VNPASS(!seqc_in_modify(fpl->tvp_seqc), fpl->tvp); From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:11:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1FD54D5DD7; Fri, 1 Jan 2021 00:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QS93FcHz4bgp; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E79719913; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010BraD005875; Fri, 1 Jan 2021 00:11:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010Brrq005874; Fri, 1 Jan 2021 00:11:53 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:11:53 GMT Message-Id: <202101010011.1010Brrq005874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 67297766b5f1 - main - cache: hoist trailing slash and degenerate path handling out of the loop MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67297766b5f1bb875090dd50a0da4e006c9bf85b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:11:53 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=67297766b5f1bb875090dd50a0da4e006c9bf85b commit 67297766b5f1bb875090dd50a0da4e006c9bf85b Author: Mateusz Guzik AuthorDate: 2020-12-28 04:24:15 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 00:10:42 +0000 cache: hoist trailing slash and degenerate path handling out of the loop Tested by: pho --- sys/kern/vfs_cache.c | 91 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 30 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 94d622867425..7f9339d2ed56 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4685,6 +4685,51 @@ cache_fplookup_is_mp(struct cache_fpl *fpl) * must take into account that in case off fallback the resulting * nameidata state has to be compatible with the original. */ +static int +cache_fplookup_preparse(struct cache_fpl *fpl) +{ + struct nameidata *ndp; + struct componentname *cnp; + + ndp = fpl->ndp; + cnp = fpl->cnp; + + /* + * TODO + * Original comment: + * Check for degenerate name (e.g. / or "") + * which is a way of talking about a directory, + * e.g. like "/." or ".". + */ + if (__predict_false(cnp->cn_nameptr[0] == '\0')) { + return (cache_fpl_aborted(fpl)); + } + + /* + * By this point the shortest possible pathname is one character + nul + * terminator, hence 2. + */ + KASSERT(ndp->ni_pathlen >= 2, ("%s: ni_pathlen %zu\n", __func__, + ndp->ni_pathlen)); + + if (__predict_false(cnp->cn_nameptr[ndp->ni_pathlen - 2] == '/')) { + /* + * TODO + * Regular lookup performs the following: + * *ndp->ni_next = '\0'; + * cnp->cn_flags |= TRAILINGSLASH; + * + * Which is problematic since it modifies data read + * from userspace. Then if fast path lookup was to + * abort we would have to either restore it or convey + * the flag. Since this is a corner case just ignore + * it for simplicity. + */ + return (cache_fpl_aborted(fpl)); + } + return (0); +} + static int cache_fplookup_parse(struct cache_fpl *fpl) { @@ -4715,45 +4760,26 @@ cache_fplookup_parse(struct cache_fpl *fpl) ("%s: ni_pathlen underflow to %zd\n", __func__, ndp->ni_pathlen)); ndp->ni_next = cp; +#ifdef INVARIANTS /* - * Replace multiple slashes by a single slash and trailing slashes - * by a null. This must be done before VOP_LOOKUP() because some - * fs's don't know about trailing slashes. Remember if there were - * trailing slashes to handle symlinks, existing non-directories - * and non-existing files that won't be directories specially later. + * Code below is only here to assure compatibility with regular lookup. + * It covers handling of trailing slashles and names like "/", both of + * which of can be taken care of upfront which lockless lookup does + * in cache_fplookup_preparse. Regular lookup performs these for each + * path component. */ while (*cp == '/' && (cp[1] == '/' || cp[1] == '\0')) { cp++; - ndp->ni_pathlen--; if (*cp == '\0') { - /* - * TODO - * Regular lookup performs the following: - * *ndp->ni_next = '\0'; - * cnp->cn_flags |= TRAILINGSLASH; - * - * Which is problematic since it modifies data read - * from userspace. Then if fast path lookup was to - * abort we would have to either restore it or convey - * the flag. Since this is a corner case just ignore - * it for simplicity. - */ - return (cache_fpl_partial(fpl)); + panic("%s: ran into TRAILINGSLASH handling from [%s]\n", + __func__, cnp->cn_pnbuf); } } - ndp->ni_next = cp; - /* - * Check for degenerate name (e.g. / or "") - * which is a way of talking about a directory, - * e.g. like "/." or ".". - * - * TODO - * Another corner case handled by the regular lookup - */ - if (__predict_false(cnp->cn_nameptr[0] == '\0')) { - return (cache_fpl_partial(fpl)); + if (cnp->cn_nameptr[0] == '\0') { + panic("%s: ran into degenerate name from [%s]\n", __func__, cnp->cn_pnbuf); } +#endif return (0); } @@ -4877,6 +4903,11 @@ cache_fplookup_impl(struct vnode *dvp, struct cache_fpl *fpl) VNPASS(cache_fplookup_vnode_supported(fpl->dvp), fpl->dvp); + error = cache_fplookup_preparse(fpl); + if (__predict_false(error != 0)) { + goto out; + } + for (;;) { error = cache_fplookup_parse(fpl); if (__predict_false(error != 0)) { From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:11:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C82A04D5DDB; Fri, 1 Jan 2021 00:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QS93vvwz4bkK; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 70F46198B4; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010BrwV005892; Fri, 1 Jan 2021 00:11:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010Brs9005891; Fri, 1 Jan 2021 00:11:53 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:11:53 GMT Message-Id: <202101010011.1010Brs9005891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: bb3a12f0e553 - main - fd: inline pwd_get_smr MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb3a12f0e55382b668066d8f8816f8073f5533d3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:11:54 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=bb3a12f0e55382b668066d8f8816f8073f5533d3 commit bb3a12f0e55382b668066d8f8816f8073f5533d3 Author: Mateusz Guzik AuthorDate: 2020-12-28 09:29:57 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 00:10:42 +0000 fd: inline pwd_get_smr Tested by: pho --- sys/kern/kern_descrip.c | 10 ---------- sys/sys/filedesc.h | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index a510ad90a618..ff11ae4f1a61 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -3672,16 +3672,6 @@ pwd_hold(struct thread *td) return (pwd); } -struct pwd * -pwd_get_smr(void) -{ - struct pwd *pwd; - - pwd = vfs_smr_entered_load(&curproc->p_pd->pd_pwd); - MPASS(pwd != NULL); - return (pwd); -} - static struct pwd * pwd_alloc(void) { diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 53d289366580..ae2232814136 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -329,7 +329,7 @@ pwd_set(struct pwddesc *pdp, struct pwd *newpwd) smr_serialized_store(&pdp->pd_pwd, newpwd, (PWDDESC_ASSERT_XLOCKED(pdp), true)); } -struct pwd *pwd_get_smr(void); +#define pwd_get_smr() vfs_smr_entered_load(&curproc->p_pd->pd_pwd) #endif /* _KERNEL */ From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:11:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E8084D5FAC; Fri, 1 Jan 2021 00:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QS91dYVz4bpg; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2922519751; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010BrFq005841; Fri, 1 Jan 2021 00:11:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010Br1b005840; Fri, 1 Jan 2021 00:11:53 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:11:53 GMT Message-Id: <202101010011.1010Br1b005840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 0b5bd1afd89f - main - cache: support lockless lookup of degenerate paths MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b5bd1afd89fa42629a28dc01eae5e39c8e5fecd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:11:53 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0b5bd1afd89fa42629a28dc01eae5e39c8e5fecd commit 0b5bd1afd89fa42629a28dc01eae5e39c8e5fecd Author: Mateusz Guzik AuthorDate: 2020-12-28 06:53:17 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 00:10:42 +0000 cache: support lockless lookup of degenerate paths Tested by: pho --- sys/kern/vfs_cache.c | 61 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index c9b0010020f8..cde2fde8a9ec 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4224,6 +4224,56 @@ cache_fplookup_final(struct cache_fpl *fpl) return (cache_fplookup_final_child(fpl, tvs)); } +/* + * Comment from locked lookup: + * Check for degenerate name (e.g. / or "") which is a way of talking about a + * directory, e.g. like "/." or ".". + */ +static int __noinline +cache_fplookup_degenerate(struct cache_fpl *fpl) +{ + struct componentname *cnp; + struct vnode *dvp; + enum vgetstate dvs; + int error, lkflags; + + fpl->tvp = fpl->dvp; + fpl->tvp_seqc = fpl->dvp_seqc; + + cnp = fpl->cnp; + dvp = fpl->dvp; + + if (__predict_false(cnp->cn_nameiop != LOOKUP)) { + cache_fpl_smr_exit(fpl); + return (cache_fpl_handled(fpl, EISDIR)); + } + + MPASS((cnp->cn_flags & SAVESTART) == 0); + + if ((cnp->cn_flags & (LOCKPARENT|WANTPARENT)) != 0) { + return (cache_fplookup_final_withparent(fpl)); + } + + dvs = vget_prep_smr(dvp); + cache_fpl_smr_exit(fpl); + if (__predict_false(dvs == VGET_NONE)) { + return (cache_fpl_aborted(fpl)); + } + + if ((cnp->cn_flags & LOCKLEAF) != 0) { + lkflags = LK_SHARED; + if ((cnp->cn_flags & LOCKSHARED) == 0) + lkflags = LK_EXCLUSIVE; + error = vget_finish(dvp, lkflags, dvs); + if (__predict_false(error != 0)) { + return (cache_fpl_aborted(fpl)); + } + } else { + vget_finish_ref(dvp, dvs); + } + return (cache_fpl_handled(fpl, 0)); +} + static int __noinline cache_fplookup_noentry(struct cache_fpl *fpl) { @@ -4694,15 +4744,8 @@ cache_fplookup_preparse(struct cache_fpl *fpl) ndp = fpl->ndp; cnp = fpl->cnp; - /* - * TODO - * Original comment: - * Check for degenerate name (e.g. / or "") - * which is a way of talking about a directory, - * e.g. like "/." or ".". - */ if (__predict_false(cnp->cn_nameptr[0] == '\0')) { - return (cache_fpl_aborted(fpl)); + return (cache_fplookup_degenerate(fpl)); } /* @@ -4913,7 +4956,7 @@ cache_fplookup_impl(struct vnode *dvp, struct cache_fpl *fpl) VNPASS(cache_fplookup_vnode_supported(fpl->dvp), fpl->dvp); error = cache_fplookup_preparse(fpl); - if (__predict_false(error != 0)) { + if (__predict_false(cache_fpl_terminated(fpl))) { goto out; } From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:11:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 894E04D5E57; Fri, 1 Jan 2021 00:11: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6QS929Qxz4bYL; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BCEE193FA; Fri, 1 Jan 2021 00:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010BrCO005858; Fri, 1 Jan 2021 00:11:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010BrGn005857; Fri, 1 Jan 2021 00:11:53 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:11:53 GMT Message-Id: <202101010011.1010BrGn005857@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 1d6eb976774a - main - cache: save on branching when parsing the path by inserting a sentinel MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d6eb976774af6a84414a6785217b305021ce841 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:11:53 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1d6eb976774af6a84414a6785217b305021ce841 commit 1d6eb976774af6a84414a6785217b305021ce841 Author: Mateusz Guzik AuthorDate: 2020-12-28 06:33:12 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 00:10:42 +0000 cache: save on branching when parsing the path by inserting a sentinel Tested by: pho --- sys/kern/vfs_cache.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 7f9339d2ed56..c9b0010020f8 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4741,15 +4741,24 @@ cache_fplookup_parse(struct cache_fpl *fpl) cnp = fpl->cnp; /* - * Search a new directory. + * Find the end of this path component, it is either / or nul. * - * The last component of the filename is left accessible via - * cnp->cn_nameptr for callers that need the name. Callers needing - * the name set the SAVENAME flag. When done, they assume - * responsibility for freeing the pathname buffer. + * Store / as a temporary sentinel so that we only have one character + * to test for. Pathnames tend to be short so this should not be + * resulting in cache misses. */ - for (cp = cnp->cn_nameptr; *cp != 0 && *cp != '/'; cp++) + KASSERT(cnp->cn_nameptr[ndp->ni_pathlen - 1] == '\0', + ("%s: expected nul at %p + %zu; string [%s]\n", __func__, + cnp->cn_nameptr, ndp->ni_pathlen - 1, cnp->cn_nameptr)); + cnp->cn_nameptr[ndp->ni_pathlen - 1] = '/'; + for (cp = cnp->cn_nameptr; *cp != '/'; cp++) { + KASSERT(*cp != '\0', + ("%s: encountered unexpected nul; string [%s]\n", __func__, + cnp->cn_nameptr)); continue; + } + cnp->cn_nameptr[ndp->ni_pathlen - 1] = '\0'; + cnp->cn_namelen = cp - cnp->cn_nameptr; if (__predict_false(cnp->cn_namelen > NAME_MAX)) { cache_fpl_smr_exit(fpl); From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:40:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FFC94D7833; Fri, 1 Jan 2021 00:40: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6R4w0dNhz4fRk; Fri, 1 Jan 2021 00:40:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0172819E39; Fri, 1 Jan 2021 00:40:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010eFN1036839; Fri, 1 Jan 2021 00:40:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010eFTZ036831; Fri, 1 Jan 2021 00:40:15 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:40:15 GMT Message-Id: <202101010040.1010eFTZ036831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Pedro F. Giffuni" Subject: git: 302c387cd604 - main - services: fiz bug introduced in r361898 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pfg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 302c387cd604450cf62d4e3e29bb615a9f257867 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:40:16 -0000 The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=302c387cd604450cf62d4e3e29bb615a9f257867 commit 302c387cd604450cf62d4e3e29bb615a9f257867 Author: Pedro F. Giffuni AuthorDate: 2021-01-01 00:38:29 +0000 Commit: Pedro F. Giffuni CommitDate: 2021-01-01 00:38:29 +0000 services: fiz bug introduced in r361898 Reported by: deischen@ --- usr.sbin/services_mkdb/services | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/services_mkdb/services b/usr.sbin/services_mkdb/services index d35511ea99b7..c46a710b82f0 100644 --- a/usr.sbin/services_mkdb/services +++ b/usr.sbin/services_mkdb/services @@ -1788,7 +1788,7 @@ iscsi-target 3260/tcp # iSCSI port iscsi-target 3260/udp # iSCSI port mysql 3306/tcp #MySQL mysql 3306/udp #MySQL -ms-wbt-server 3389/tdp rdp #MS WBT Server +ms-wbt-server 3389/tcp rdp #MS WBT Server ms-wbt-server 3389/udp #MS WBT Server efi-lm 3392/tcp #EFI License Management efi-lm 3392/udp #EFI License Management From owner-dev-commits-src-all@freebsd.org Fri Jan 1 00:53:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E3314B8A84; Fri, 1 Jan 2021 00:53: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6RN13YCwz4gdH; Fri, 1 Jan 2021 00:53:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CAE81A0AE; Fri, 1 Jan 2021 00:53:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1010rLq8055036; Fri, 1 Jan 2021 00:53:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1010rL6F055035; Fri, 1 Jan 2021 00:53:21 GMT (envelope-from git) Date: Fri, 1 Jan 2021 00:53:21 GMT Message-Id: <202101010053.1010rL6F055035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan Eßer Subject: git: f1031f07fb8b - stable/11 - MFC: Fix calendar -a processing of files included in the user's home directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: f1031f07fb8b3994ffe14b5d780304e4de1f32fb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 00:53:21 -0000 The branch stable/11 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=f1031f07fb8b3994ffe14b5d780304e4de1f32fb commit f1031f07fb8b3994ffe14b5d780304e4de1f32fb Author: Stefan Eßer AuthorDate: 2020-10-29 08:26:38 +0000 Commit: Stefan Eßer CommitDate: 2021-01-01 00:46:48 +0000 MFC: Fix calendar -a processing of files included in the user's home directory The existing code performed a chdir() into the home directory, but the parser fell back to using the invoking user's home directory as the base directory for the search for an include file. Since use of the -a option is limited to UID==0, the directory searched was typically ~root/.calendar, not the .calendar directory of the user whose file is being processed. PR: 205580 Reported by: greg.bal4@gmail.com (Greg Balfour) MFC after: 3 days (cherry picked from commit 3fa2a149d68d22fa32ba7b6c09773388ac490fd1) The code in -CURRENT is quite different (forks sub-processes tp process the files for each user) but this change should provide the same functionality as the referenced commit to -CURRENT. --- usr.bin/calendar/calendar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c index 84d188071ea9..222cd57cfd1b 100644 --- a/usr.bin/calendar/calendar.c +++ b/usr.bin/calendar/calendar.c @@ -209,8 +209,10 @@ main(int argc, char *argv[]) (void)setegid(pw->pw_gid); (void)initgroups(pw->pw_name, pw->pw_gid); (void)seteuid(pw->pw_uid); - if (!chdir(pw->pw_dir)) + if (!chdir(pw->pw_dir)) { + setenv("HOME", pw->pw_dir, 1); cal(); + } (void)seteuid(0); } else From owner-dev-commits-src-all@freebsd.org Fri Jan 1 01:49:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 856C24B9EF2; Fri, 1 Jan 2021 01: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6Scs3Lfnz4knb; Fri, 1 Jan 2021 01:49:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65A0C1A7D1; Fri, 1 Jan 2021 01:49:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1011nX4d016851; Fri, 1 Jan 2021 01:49:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1011nXtY016850; Fri, 1 Jan 2021 01:49:33 GMT (envelope-from git) Date: Fri, 1 Jan 2021 01:49:33 GMT Message-Id: <202101010149.1011nXtY016850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Pedro F. Giffuni" Subject: git: 978b10d8ef0f - main - services: reinstate CouchDB and bring amqps MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pfg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 978b10d8ef0f44741fd39e3bcb1fb8a28779668f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 01:49:33 -0000 The branch main has been updated by pfg: URL: https://cgit.FreeBSD.org/src/commit/?id=978b10d8ef0f44741fd39e3bcb1fb8a28779668f commit 978b10d8ef0f44741fd39e3bcb1fb8a28779668f Author: Pedro F. Giffuni AuthorDate: 2021-01-01 01:49:03 +0000 Commit: Pedro F. Giffuni CommitDate: 2021-01-01 01:49:03 +0000 services: reinstate CouchDB and bring amqps CouchDB was mistakenly removed in r368712 amqps is used by net/rabbitmp Both are registered in IANA Reported by: dch Differential Revision: https://reviews.freebsd.org/D27691 --- usr.sbin/services_mkdb/services | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/services_mkdb/services b/usr.sbin/services_mkdb/services index c46a710b82f0..d1f0596c958c 100644 --- a/usr.sbin/services_mkdb/services +++ b/usr.sbin/services_mkdb/services @@ -1898,6 +1898,8 @@ vami 5480/udp #VMware Appliance Management Interface, HTTPS-like personal-agent 5555/tcp #Personal Agent rplay 5555/udp # PROBLEM ======================================================== +amqps 5671/tcp #AMQP protocol over TLS/SSL +amqps 5671/udp #AMQP protocol over TLS/SSL amqp 5672/tcp #AMQP amqp 5672/udp #AMQP amqp 5672/sctp #AMQP @@ -1910,6 +1912,8 @@ auriga-router 5680/udp #Auriga Router Service # PROBLEM ======================================================== vnc-server 5900/tcp #VNC Server vnc-server 5900/udp #VNC Server +couchdb 5984/tcp #CouchDB +couchdb 5984/udp #CouchDB cvsup 5999/tcp #CVSup file transfer/John Polstra/FreeBSD x11 6000/tcp #6000-6063 are assigned to X Window System x11 6000/udp #X Window System From owner-dev-commits-src-all@freebsd.org Fri Jan 1 03:16:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05AD14BBF19; Fri, 1 Jan 2021 03:16: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6VYQ6pldz4pbn; Fri, 1 Jan 2021 03:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC6D21BF10; Fri, 1 Jan 2021 03:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1013Ggx2026994; Fri, 1 Jan 2021 03:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1013GgTA026993; Fri, 1 Jan 2021 03:16:42 GMT (envelope-from git) Date: Fri, 1 Jan 2021 03:16:42 GMT Message-Id: <202101010316.1013GgTA026993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 9997aedb8f2f - main - ufs: use VNPASS when asserting on a vnode in ufs_read_pgcache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9997aedb8f2fc9e2460a577431b4861ff6d06fc6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 03:16:43 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9997aedb8f2fc9e2460a577431b4861ff6d06fc6 commit 9997aedb8f2fc9e2460a577431b4861ff6d06fc6 Author: Mateusz Guzik AuthorDate: 2021-01-01 03:14:11 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 03:14:11 +0000 ufs: use VNPASS when asserting on a vnode in ufs_read_pgcache --- sys/ufs/ufs/ufs_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 135786312d49..3280e29f43a1 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2947,7 +2947,7 @@ ufs_read_pgcache(struct vop_read_pgcache_args *ap) uio = ap->a_uio; vp = ap->a_vp; - MPASS((vp->v_irflag & VIRF_PGREAD) != 0); + VNPASS((vp->v_irflag & VIRF_PGREAD) != 0, vp); if (uio->uio_resid > ptoa(io_hold_cnt) || uio->uio_offset < 0 || (ap->a_ioflag & IO_DIRECT) != 0) From owner-dev-commits-src-all@freebsd.org Fri Jan 1 03:18:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A9C94BC18D; Fri, 1 Jan 2021 03:18:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6VbP7245z4ps3; Fri, 1 Jan 2021 03:18:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0AAD1BC68; Fri, 1 Jan 2021 03:18:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1013IPQ8027388; Fri, 1 Jan 2021 03:18:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1013IPCv027387; Fri, 1 Jan 2021 03:18:25 GMT (envelope-from git) Date: Fri, 1 Jan 2021 03:18:25 GMT Message-Id: <202101010318.1013IPCv027387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benjamin Kaduk Subject: git: 43d0803c4545 - main - Soften caveat about fractional seconds for sleep(1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bjk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43d0803c4545861e8f2411aec0987968b2e4a299 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 03:18:26 -0000 The branch main has been updated by bjk (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=43d0803c4545861e8f2411aec0987968b2e4a299 commit 43d0803c4545861e8f2411aec0987968b2e4a299 Author: Benjamin Kaduk AuthorDate: 2021-01-01 03:17:40 +0000 Commit: Benjamin Kaduk CommitDate: 2021-01-01 03:18:20 +0000 Soften caveat about fractional seconds for sleep(1) Support for fractional seconds has become much more widespread since this text was originally written. Reported by: Mark Eichin Reviewed by: gbe, jilles Differential Revision: https://reviews.freebsd.org/D26208 --- bin/sleep/sleep.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/sleep/sleep.1 b/bin/sleep/sleep.1 index 937c78abdb15..924bc732a0d0 100644 --- a/bin/sleep/sleep.1 +++ b/bin/sleep/sleep.1 @@ -32,7 +32,7 @@ .\" @(#)sleep.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd April 18, 1994 +.Dd December 31, 2020 .Dt SLEEP 1 .Os .Sh NAME @@ -65,8 +65,8 @@ The command allows and honors a non-integer number of seconds to sleep in any form acceptable by .Xr strtod 3 . -This is a non-portable extension, and its use will nearly guarantee that -a shell script will not execute properly on another system. +This is a non-portable extension, but is also implemented in GNU sh-utils +since version 2.0a (released in 2002). .Sh EXIT STATUS .Ex -std .Sh EXAMPLES From owner-dev-commits-src-all@freebsd.org Fri Jan 1 03:23:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6F794BC03D; Fri, 1 Jan 2021 03:23: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6Vht5lcBz4qCN; Fri, 1 Jan 2021 03:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B839F1C10A; Fri, 1 Jan 2021 03:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1013NAqd038754; Fri, 1 Jan 2021 03:23:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1013NAp9038753; Fri, 1 Jan 2021 03:23:10 GMT (envelope-from git) Date: Fri, 1 Jan 2021 03:23:10 GMT Message-Id: <202101010323.1013NAp9038753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: d71965127fb8 - main - tmpfs: use VNPASS when asserting on a vnode in tmpfs_read_pgcache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d71965127fb8cf4032d35719760ef431a654bde8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 03:23:10 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d71965127fb8cf4032d35719760ef431a654bde8 commit d71965127fb8cf4032d35719760ef431a654bde8 Author: Mateusz Guzik AuthorDate: 2021-01-01 03:19:13 +0000 Commit: Mateusz Guzik CommitDate: 2021-01-01 03:23:01 +0000 tmpfs: use VNPASS when asserting on a vnode in tmpfs_read_pgcache --- sys/fs/tmpfs/tmpfs_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 9c0eba42d317..6782d71d9207 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -600,7 +600,7 @@ tmpfs_read_pgcache(struct vop_read_pgcache_args *v) int error; vp = v->a_vp; - MPASS((vp->v_irflag & VIRF_PGREAD) != 0); + VNPASS((vp->v_irflag & VIRF_PGREAD) != 0, vp); if (v->a_uio->uio_offset < 0) return (EINVAL); From owner-dev-commits-src-all@freebsd.org Fri Jan 1 03:56:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D35514BCBCF; Fri, 1 Jan 2021 03:56: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6WQs5bmSz4rlw; Fri, 1 Jan 2021 03:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B35051C810; Fri, 1 Jan 2021 03:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1013u5PT076068; Fri, 1 Jan 2021 03:56:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1013u5o5076067; Fri, 1 Jan 2021 03:56:05 GMT (envelope-from git) Date: Fri, 1 Jan 2021 03:56:05 GMT Message-Id: <202101010356.1013u5o5076067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: b58a46347c8d - main - jail: revert the attachment part of b4e87a632955 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b58a46347c8dd81137ef164fba1ab6b60c5b94c4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 03:56:05 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=b58a46347c8dd81137ef164fba1ab6b60c5b94c4 commit b58a46347c8dd81137ef164fba1ab6b60c5b94c4 Author: Jamie Gritton AuthorDate: 2021-01-01 03:55:49 +0000 Commit: Jamie Gritton CommitDate: 2021-01-01 03:55:49 +0000 jail: revert the attachment part of b4e87a632955 The change to kern_jail_set that was supposed to "also properly clean up when attachment fails" didn't fix a memory leak but actually caused a double free. Back that part out, and leave the part that manages allprison_lock state. --- sys/kern/kern_jail.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 1ecb023717bd..55006939a5ff 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -1835,14 +1835,8 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) slocked = 0; if (error) { vfs_opterror(opts, "attach failed"); - if (born) { - sx_slock(&allprison_lock); - slocked = PD_LIST_SLOCKED; - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); - } - prison_deref(pr, created - ? slocked - : PD_DEREF | slocked); + if (!created) + prison_deref(pr, PD_DEREF); goto done_errmsg; } } From owner-dev-commits-src-all@freebsd.org Fri Jan 1 06:24:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B04F4C0382; Fri, 1 Jan 2021 06:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6ZkH2HlTz4Vlk; Fri, 1 Jan 2021 06:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 419F51E34C; Fri, 1 Jan 2021 06:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1016Od4O058925; Fri, 1 Jan 2021 06:24:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1016OdCb058924; Fri, 1 Jan 2021 06:24:39 GMT (envelope-from git) Date: Fri, 1 Jan 2021 06:24:39 GMT Message-Id: <202101010624.1016OdCb058924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 8b4c3a03f933 - main - stand: fix WITHOUT_FORTH/WITHOUT_LOADER_LUA build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b4c3a03f933b77b65c78fdef976831d27942d9d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 06:24:39 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8b4c3a03f933b77b65c78fdef976831d27942d9d commit 8b4c3a03f933b77b65c78fdef976831d27942d9d Author: Kyle Evans AuthorDate: 2021-01-01 06:22:48 +0000 Commit: Kyle Evans CommitDate: 2021-01-01 06:22:48 +0000 stand: fix WITHOUT_FORTH/WITHOUT_LOADER_LUA build Previously having ficl/liblua in LIB32LIST with their respective option turned OFF would be relatively harmless, as we wouldn't act on it unless we were building the non-32 variant. As of ac5f382a9d0a, however, these are now used for dependencies in some cases and must reflect what's actually going to be built. --- stand/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stand/Makefile b/stand/Makefile index d7bcb4bfbca2..46e0856e45fd 100644 --- a/stand/Makefile +++ b/stand/Makefile @@ -6,7 +6,13 @@ # others we don't. LIB32LIST is a list of libraries, which if # included, need to be built 32-bit as well. .if ${MACHINE_ARCH} == "amd64" -LIB32LIST=libsa ficl liblua +LIB32LIST=libsa +.if ${MK_FORTH} != "no" +LIB32LIST+= ficl +.endif +.if ${MK_LOADER_LUA} != "no" +LIB32LIST+= liblua +.endif .endif S.yes+= libsa From owner-dev-commits-src-all@freebsd.org Fri Jan 1 07:58:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1825C4C1A45; Fri, 1 Jan 2021 07:58: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6cpN07v8z4Yxm; Fri, 1 Jan 2021 07:58:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E74B91F37C; Fri, 1 Jan 2021 07:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1017wJJm069871; Fri, 1 Jan 2021 07:58:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1017wJIq069870; Fri, 1 Jan 2021 07:58:19 GMT (envelope-from git) Date: Fri, 1 Jan 2021 07:58:19 GMT Message-Id: <202101010758.1017wJIq069870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 41cf333f9b2a - stable/12 - MFC: Correct and add some comments. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 41cf333f9b2a494e7bb54f42a3790b6df99d09c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 07:58:20 -0000 The branch stable/12 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=41cf333f9b2a494e7bb54f42a3790b6df99d09c9 commit 41cf333f9b2a494e7bb54f42a3790b6df99d09c9 Author: Kirk McKusick AuthorDate: 2020-12-31 23:15:44 +0000 Commit: Kirk McKusick CommitDate: 2021-01-01 07:49:58 +0000 MFC: Correct and add some comments. Sponsored by: Netflix (cherry picked from commit 68dc94c7d314b02ef80fe972f524a2b3c6e68a1c) --- sbin/fsck_ffs/fsck.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index b05bc5f7a3c2..3394949189b5 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -137,11 +137,11 @@ extern struct inostatlist { */ struct bufarea { TAILQ_ENTRY(bufarea) b_list; /* buffer list */ - ufs2_daddr_t b_bno; - int b_size; - int b_errs; - int b_flags; - int b_type; + ufs2_daddr_t b_bno; /* disk block number */ + int b_size; /* size of I/O */ + int b_errs; /* I/O error */ + int b_flags; /* B_ flags below */ + int b_type; /* BT_ type below */ union { char *b_buf; /* buffer space */ ufs1_daddr_t *b_indir1; /* UFS1 indirect block */ @@ -172,14 +172,14 @@ struct bufarea { /* * Type of data in buffer */ -#define BT_UNKNOWN 0 /* Buffer holds a superblock */ +#define BT_UNKNOWN 0 /* Buffer type is unknown */ #define BT_SUPERBLK 1 /* Buffer holds a superblock */ #define BT_CYLGRP 2 /* Buffer holds a cylinder group map */ #define BT_LEVEL1 3 /* Buffer holds single level indirect */ #define BT_LEVEL2 4 /* Buffer holds double level indirect */ #define BT_LEVEL3 5 /* Buffer holds triple level indirect */ #define BT_EXTATTR 6 /* Buffer holds external attribute data */ -#define BT_INODES 7 /* Buffer holds external attribute data */ +#define BT_INODES 7 /* Buffer holds inodes */ #define BT_DIRDATA 8 /* Buffer holds directory data */ #define BT_DATA 9 /* Buffer holds user data */ #define BT_NUMBUFTYPES 10 From owner-dev-commits-src-all@freebsd.org Fri Jan 1 13:46:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC2314C8B9D; Fri, 1 Jan 2021 13:46:14 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6mWp3bQPz4qPL; Fri, 1 Jan 2021 13:46:14 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: by mail-wm1-x32c.google.com with SMTP id a6so9023630wmc.2; Fri, 01 Jan 2021 05:46:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BVmFxyrP+HfEjrKL1qWOGKB7m4Cjzc0oCKK21Pq9RnE=; b=MCLNwK/Yv6rRgtpmzJ87UQViuiXrGZZcXyth1Czm4QKDIvq2Tck5C2B3atGKaY9ljw Die2VfNQu8ceEHM61nEXSefdTzDN6oztNZuvEi15WJ89VeJ11nR7ohsbBEEX557eNt9T 9i0L1vGHauFlfQUtAAwxOmGzvYZgVlslreklfsS65czgirhOl7IeOLDbPiimsbWZ1jm3 pgwh/LT+YhaFVmhFI+QkwehTYnDUZK5hKB2MoO4/jPgX85lRKqFjYh1l83zaL45CoNlU 6zhD3xzAozpNP3PKvPOipPahevqZxBAQciJ2kqqCoDgSx4YkpO4Oz869cN7uCVu4wriF GV2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=BVmFxyrP+HfEjrKL1qWOGKB7m4Cjzc0oCKK21Pq9RnE=; b=odbyNQjMH908+eoEyRc0nstXVQQO+EPgHjqpTUuMc+4NJMxt4DkcYVcchqA7n/EltF zaMumhLcYSq7EetLjQXe5ktIvgUtllGhVUkWEJKCk7d9QMD/ScO2loNmspuSnlRwaKRu wRzJJNJsYqBF9xHyZRKxoVI1I9FV8VxFv8qvwRoHmHkgMP46KpKjXGe8jFp6Sytadqw9 6AbIXtvQ4btAdj9Hes7vcCaYoHsaNXav1ksVact0MiuD9NFBeu2DZ2U0YG0ZMk4Qq8Iw FQHZKWzVKSmVkMGhdE5Jp6Jsa1ylWBfMB4UrEaXTeoFXeqs3j6XKhOr9mBPkpZk6RzXx HEqg== X-Gm-Message-State: AOAM531iDt0YgRvydsu1TgL+AxC53qYu+VSaAPJaBXeI8Y73ZEK3mNJ7 5Ux64pNn0SpOY+vUD9PA4xs9PDi4WdaCzg== X-Google-Smtp-Source: ABdhPJz7J2C/EyVMVz+MG1PVmVyuHpqAGSN7Aj8j7Q82NhMQgoLRMRbQWwCLon9tOLzaNeMxcWfiiQ== X-Received: by 2002:a1c:a583:: with SMTP id o125mr15629058wme.91.1609508772043; Fri, 01 Jan 2021 05:46:12 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id k6sm17935217wmf.25.2021.01.01.05.46.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Jan 2021 05:46:11 -0800 (PST) Sender: Michal Meloun Reply-To: meloun.michal@gmail.com Subject: Re: git: 942951ba46ec - main - uma dbg: catch more corruption with atomics To: Ryan Libby , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202012312103.0BVL3dGu073808@gitrepo.freebsd.org> From: Michal Meloun Message-ID: Date: Fri, 1 Jan 2021 14:46:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <202012312103.0BVL3dGu073808@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4D6mWp3bQPz4qPL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 13:46:14 -0000 On 31.12.2020 22:03, Ryan Libby wrote: > The branch main has been updated by rlibby: > > URL: https://cgit.FreeBSD.org/src/commit/?id=942951ba46ecd5ebab18de006a24dc52e2d3f745 > > commit 942951ba46ecd5ebab18de006a24dc52e2d3f745 > Author: Ryan Libby > AuthorDate: 2020-12-31 21:02:45 +0000 > Commit: Ryan Libby > CommitDate: 2020-12-31 21:02:45 +0000 > > uma dbg: catch more corruption with atomics > > Use atomic testandset and testandclear to catch concurrent double free, > and to reduce the number of atomic operations. > > Submitted by: jeff > Reviewed by: cem, kib, markj (all previous version) > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D22703 Unfortunately, this broke arm and arm64 kernel with random 'duplicate alloc'/'duplicate free' panics. Michal > --- > sys/vm/uma_core.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c > index a0192642205d..39c846effac8 100644 > --- a/sys/vm/uma_core.c > +++ b/sys/vm/uma_core.c > @@ -5392,10 +5392,10 @@ uma_dbg_alloc(uma_zone_t zone, uma_slab_t slab, void *item) > keg = zone->uz_keg; > freei = slab_item_index(slab, keg, item); > > - if (BIT_ISSET(keg->uk_ipers, freei, slab_dbg_bits(slab, keg))) > + if (BIT_TEST_SET_ATOMIC(keg->uk_ipers, freei, > + slab_dbg_bits(slab, keg))) > panic("Duplicate alloc of %p from zone %p(%s) slab %p(%d)", > item, zone, zone->uz_name, slab, freei); > - BIT_SET_ATOMIC(keg->uk_ipers, freei, slab_dbg_bits(slab, keg)); > } > > /* > @@ -5426,11 +5426,10 @@ uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *item) > panic("Unaligned free of %p from zone %p(%s) slab %p(%d)", > item, zone, zone->uz_name, slab, freei); > > - if (!BIT_ISSET(keg->uk_ipers, freei, slab_dbg_bits(slab, keg))) > + if (!BIT_TEST_CLR_ATOMIC(keg->uk_ipers, freei, > + slab_dbg_bits(slab, keg))) > panic("Duplicate free of %p from zone %p(%s) slab %p(%d)", > item, zone, zone->uz_name, slab, freei); > - > - BIT_CLR_ATOMIC(keg->uk_ipers, freei, slab_dbg_bits(slab, keg)); > } > #endif /* INVARIANTS */ > > From owner-dev-commits-src-all@freebsd.org Fri Jan 1 14:35:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AD6C4CA038; Fri, 1 Jan 2021 14:35: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6ncf1h9Wz4sZL; Fri, 1 Jan 2021 14:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DCEF2426E; Fri, 1 Jan 2021 14:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101EZT6G081169; Fri, 1 Jan 2021 14:35:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101EZT1E081168; Fri, 1 Jan 2021 14:35:29 GMT (envelope-from git) Date: Fri, 1 Jan 2021 14:35:29 GMT Message-Id: <202101011435.101EZT1E081168@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 543478be758f - main - Merge commit 4f568fbd2 from llvm git (by Nemanja Ivanovic): MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 543478be758fdfbf050eca5b58b7c74ba51b9175 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 14:35:30 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=543478be758fdfbf050eca5b58b7c74ba51b9175 commit 543478be758fdfbf050eca5b58b7c74ba51b9175 Author: Dimitry Andric AuthorDate: 2021-01-01 14:35:13 +0000 Commit: Dimitry Andric CommitDate: 2021-01-01 14:35:13 +0000 Merge commit 4f568fbd2 from llvm git (by Nemanja Ivanovic): [PowerPC] Do not emit HW loop when TLS var accessed in PHI of loop exit If any PHI nodes in loop exit blocks have incoming values from the loop that are accesses of TLS variables with local dynamic or general dynamic TLS model, the address will be computed inside the loop. Since this includes a call to __tls_get_addr, this will in turn cause the CTR loops verifier to complain. Disable CTR loops in such cases. Fixes: https://bugs.llvm.org/show_bug.cgi?id=48527 This should fix building ceph 12.2.12 on powerpc64, powerpc, powerpcspe and powerpc64le. Requested by: pkubaj MFC after: 3 days --- .../lib/Target/PowerPC/PPCTargetTransformInfo.cpp | 68 +++++++++++++--------- 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp index 53556ffc267d..dc10dd80c8fa 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp @@ -226,6 +226,29 @@ PPCTTIImpl::getUserCost(const User *U, ArrayRef Operands, return BaseT::getUserCost(U, Operands, CostKind); } +// Determining the address of a TLS variable results in a function call in +// certain TLS models. +static bool memAddrUsesCTR(const Value *MemAddr, const PPCTargetMachine &TM, + SmallPtrSetImpl &Visited) { + // No need to traverse again if we already checked this operand. + if (!Visited.insert(MemAddr).second) + return false; + const auto *GV = dyn_cast(MemAddr); + if (!GV) { + // Recurse to check for constants that refer to TLS global variables. + if (const auto *CV = dyn_cast(MemAddr)) + for (const auto &CO : CV->operands()) + if (memAddrUsesCTR(CO, TM, Visited)) + return true; + return false; + } + + if (!GV->isThreadLocal()) + return false; + TLSModel::Model Model = TM.getTLSModel(GV); + return Model == TLSModel::GeneralDynamic || Model == TLSModel::LocalDynamic; +} + bool PPCTTIImpl::mightUseCTR(BasicBlock *BB, TargetLibraryInfo *LibInfo, SmallPtrSetImpl &Visited) { const PPCTargetMachine &TM = ST->getTargetMachine(); @@ -244,31 +267,6 @@ bool PPCTTIImpl::mightUseCTR(BasicBlock *BB, TargetLibraryInfo *LibInfo, return false; }; - // Determining the address of a TLS variable results in a function call in - // certain TLS models. - std::function memAddrUsesCTR = - [&memAddrUsesCTR, &TM, &Visited](const Value *MemAddr) -> bool { - // No need to traverse again if we already checked this operand. - if (!Visited.insert(MemAddr).second) - return false; - const auto *GV = dyn_cast(MemAddr); - if (!GV) { - // Recurse to check for constants that refer to TLS global variables. - if (const auto *CV = dyn_cast(MemAddr)) - for (const auto &CO : CV->operands()) - if (memAddrUsesCTR(CO)) - return true; - - return false; - } - - if (!GV->isThreadLocal()) - return false; - TLSModel::Model Model = TM.getTLSModel(GV); - return Model == TLSModel::GeneralDynamic || - Model == TLSModel::LocalDynamic; - }; - auto isLargeIntegerTy = [](bool Is32Bit, Type *Ty) { if (IntegerType *ITy = dyn_cast(Ty)) return ITy->getBitWidth() > (Is32Bit ? 32U : 64U); @@ -486,7 +484,7 @@ bool PPCTTIImpl::mightUseCTR(BasicBlock *BB, TargetLibraryInfo *LibInfo, } for (Value *Operand : J->operands()) - if (memAddrUsesCTR(Operand)) + if (memAddrUsesCTR(Operand, TM, Visited)) return true; } @@ -546,6 +544,24 @@ bool PPCTTIImpl::isHardwareLoopProfitable(Loop *L, ScalarEvolution &SE, } } + // If an exit block has a PHI that accesses a TLS variable as one of the + // incoming values from the loop, we cannot produce a CTR loop because the + // address for that value will be computed in the loop. + SmallVector ExitBlocks; + L->getExitBlocks(ExitBlocks); + for (auto &BB : ExitBlocks) { + for (auto &PHI : BB->phis()) { + for (int Idx = 0, EndIdx = PHI.getNumIncomingValues(); Idx < EndIdx; + Idx++) { + const BasicBlock *IncomingBB = PHI.getIncomingBlock(Idx); + const Value *IncomingValue = PHI.getIncomingValue(Idx); + if (L->contains(IncomingBB) && + memAddrUsesCTR(IncomingValue, TM, Visited)) + return false; + } + } + } + LLVMContext &C = L->getHeader()->getContext(); HWLoopInfo.CountType = TM.isPPC64() ? Type::getInt64Ty(C) : Type::getInt32Ty(C); From owner-dev-commits-src-all@freebsd.org Fri Jan 1 15:44:04 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E18074CB57C; Fri, 1 Jan 2021 15:44: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6q7m5kXBz3Dfj; Fri, 1 Jan 2021 15:44:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B701425689; Fri, 1 Jan 2021 15:44:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101Fi4I6071470; Fri, 1 Jan 2021 15:44:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101Fi4AO071469; Fri, 1 Jan 2021 15:44:04 GMT (envelope-from git) Date: Fri, 1 Jan 2021 15:44:04 GMT Message-Id: <202101011544.101Fi4AO071469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: a7aa5eea4fff - main - sctp: improve handling of aborted associations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7aa5eea4fff4eeab278e36af34fd8554e63dc20 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 15:44:04 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a7aa5eea4fff4eeab278e36af34fd8554e63dc20 commit a7aa5eea4fff4eeab278e36af34fd8554e63dc20 Author: Michael Tuexen AuthorDate: 2021-01-01 14:59:10 +0000 Commit: Michael Tuexen CommitDate: 2021-01-01 14:59:10 +0000 sctp: improve handling of aborted associations Don't clear a flag, when the structure already has been freed. Reported by: syzbot+07667d16c96779c737b4@syzkaller.appspotmail.com --- sys/netinet/sctp_output.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index dcd59719b6e1..d8cf063c6b53 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -13160,7 +13160,9 @@ skip_preblock: sctp_m_freem(mm); } SCTP_TCB_SEND_LOCK(stcb); - if (sp != NULL) { + if (((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) && + ((stcb->asoc.state & SCTP_STATE_WAS_ABORTED) == 0) && + (sp != NULL)) { sp->processing = 0; } SCTP_TCB_SEND_UNLOCK(stcb); @@ -13179,9 +13181,6 @@ skip_preblock: SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ECONNRESET); error = ECONNRESET; } - if (sp != NULL) { - sp->processing = 0; - } SCTP_TCB_SEND_UNLOCK(stcb); goto out; } @@ -13372,7 +13371,9 @@ skip_preblock: } SOCKBUF_UNLOCK(&so->so_snd); SCTP_TCB_SEND_LOCK(stcb); - if (sp != NULL) { + if (((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) && + ((stcb->asoc.state & SCTP_STATE_WAS_ABORTED) == 0) && + (sp != NULL)) { sp->processing = 0; } SCTP_TCB_SEND_UNLOCK(stcb); @@ -13386,10 +13387,8 @@ skip_preblock: } SOCKBUF_UNLOCK(&so->so_snd); SCTP_TCB_SEND_LOCK(stcb); - if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { - if (sp != NULL) { - sp->processing = 0; - } + if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) || + (stcb->asoc.state & SCTP_STATE_WAS_ABORTED)) { SCTP_TCB_SEND_UNLOCK(stcb); goto out_unlocked; } From owner-dev-commits-src-all@freebsd.org Fri Jan 1 16:49:11 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B4824CD6A3; Fri, 1 Jan 2021 16:49: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6rZt6tbdz3Jmd; Fri, 1 Jan 2021 16:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF49626306; Fri, 1 Jan 2021 16:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101GnAto050107; Fri, 1 Jan 2021 16:49:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101GnAiX050106; Fri, 1 Jan 2021 16:49:10 GMT (envelope-from git) Date: Fri, 1 Jan 2021 16:49:10 GMT Message-Id: <202101011649.101GnAiX050106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 1d010cd31cdf - main - Fix i386 build following 37df9d3bba8577fcdd63382ff5a4a5cbb4aa55b4. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d010cd31cdfa0b786900ed6a41fb93859bd0ed7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 16:49:11 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=1d010cd31cdfa0b786900ed6a41fb93859bd0ed7 commit 1d010cd31cdfa0b786900ed6a41fb93859bd0ed7 Author: Cy Schubert AuthorDate: 2021-01-01 16:46:58 +0000 Commit: Cy Schubert CommitDate: 2021-01-01 16:48:14 +0000 Fix i386 build following 37df9d3bba8577fcdd63382ff5a4a5cbb4aa55b4. MFC after: 2 weeks X-MFC with: 37df9d3bba8577fcdd63382ff5a4a5cbb4aa55b4 --- tests/sys/fs/fusefs/mockfs.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 32d8fc7f6129..0124d8765eb1 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -221,15 +221,15 @@ void MockFS::debug_request(const mockfs_buf_in &in, ssize_t buflen) case FUSE_LSEEK: switch (in.body.lseek.whence) { case SEEK_HOLE: - printf(" SEEK_HOLE offset=%ld", + printf(" SEEK_HOLE offset=%jd", in.body.lseek.offset); break; case SEEK_DATA: - printf(" SEEK_DATA offset=%ld", + printf(" SEEK_DATA offset=%jd", in.body.lseek.offset); break; default: - printf(" whence=%u offset=%ld", + printf(" whence=%u offset=%jd", in.body.lseek.whence, in.body.lseek.offset); break; } From owner-dev-commits-src-all@freebsd.org Fri Jan 1 17:20:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA2A84CE829; Fri, 1 Jan 2021 17:20: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6sGT6DZvz3MD2; Fri, 1 Jan 2021 17:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8693262E5; Fri, 1 Jan 2021 17:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101HK1Hm090068; Fri, 1 Jan 2021 17:20:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101HK1d8090063; Fri, 1 Jan 2021 17:20:01 GMT (envelope-from git) Date: Fri, 1 Jan 2021 17:20:01 GMT Message-Id: <202101011720.101HK1d8090063@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 92bbfe1f0d1f - main - fusefs: implement FUSE_COPY_FILE_RANGE. 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/main X-Git-Reftype: branch X-Git-Commit: 92bbfe1f0d1f1c4436d1f064a16e5aaf682526ba Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 17:20:02 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=92bbfe1f0d1f1c4436d1f064a16e5aaf682526ba commit 92bbfe1f0d1f1c4436d1f064a16e5aaf682526ba Author: Alan Somers AuthorDate: 2020-12-29 01:25:21 +0000 Commit: Alan Somers CommitDate: 2021-01-01 17:18:23 +0000 fusefs: implement FUSE_COPY_FILE_RANGE. This updates the FUSE protocol to 7.28, though most of the new features are optional and are not yet implemented. MFC after: 2 weeks Relnotes: yes Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D27818 --- sys/fs/fuse/fuse_internal.c | 48 ++++ sys/fs/fuse/fuse_internal.h | 4 + sys/fs/fuse/fuse_io.c | 42 +-- sys/fs/fuse/fuse_ipc.c | 4 + sys/fs/fuse/fuse_kernel.h | 141 ++++++---- sys/fs/fuse/fuse_vnops.c | 122 +++++++++ tests/sys/fs/fusefs/Makefile | 1 + tests/sys/fs/fusefs/copy_file_range.cc | 401 +++++++++++++++++++++++++++++ tests/sys/fs/fusefs/default_permissions.cc | 110 +++++++- tests/sys/fs/fusefs/mockfs.cc | 20 ++ tests/sys/fs/fusefs/mockfs.hh | 1 + tests/sys/fs/fusefs/write.cc | 1 - 12 files changed, 803 insertions(+), 92 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index 2faad7cd8651..60f9a7319e00 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -1054,6 +1054,9 @@ fuse_internal_init_callback(struct fuse_ticket *tick, struct uio *uio) if (!fuse_libabi_geq(data, 7, 24)) fsess_set_notimpl(data->mp, FUSE_LSEEK); + if (!fuse_libabi_geq(data, 7, 28)) + fsess_set_notimpl(data->mp, FUSE_COPY_FILE_RANGE); + out: if (err) { fdata_set_dead(data); @@ -1098,6 +1101,12 @@ fuse_internal_send_init(struct fuse_data *data, struct thread *td) * FUSE_READDIRPLUS_AUTO: not yet implemented * FUSE_ASYNC_DIO: not yet implemented * FUSE_NO_OPEN_SUPPORT: not yet implemented + * FUSE_PARALLEL_DIROPS: not yet implemented + * FUSE_HANDLE_KILLPRIV: not yet implemented + * FUSE_POSIX_ACL: not yet implemented + * FUSE_ABORT_ERROR: not yet implemented + * FUSE_CACHE_SYMLINKS: not yet implemented + * FUSE_MAX_PAGES: not yet implemented */ fiii->flags = FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_EXPORT_SUPPORT | FUSE_BIG_WRITES | FUSE_WRITEBACK_CACHE; @@ -1228,6 +1237,45 @@ out: return err; } +/* + * FreeBSD clears the SUID and SGID bits on any write by a non-root user. + */ +void +fuse_internal_clear_suid_on_write(struct vnode *vp, struct ucred *cred, + struct thread *td) +{ + struct fuse_data *data; + struct mount *mp; + struct vattr va; + int dataflags; + + mp = vnode_mount(vp); + data = fuse_get_mpdata(mp); + dataflags = data->dataflags; + + ASSERT_VOP_LOCKED(vp, __func__); + + if (dataflags & FSESS_DEFAULT_PERMISSIONS) { + if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID)) { + fuse_internal_getattr(vp, &va, cred, td); + if (va.va_mode & (S_ISUID | S_ISGID)) { + mode_t mode = va.va_mode & ~(S_ISUID | S_ISGID); + /* Clear all vattr fields except mode */ + vattr_null(&va); + va.va_mode = mode; + + /* + * Ignore fuse_internal_setattr's return value, + * because at this point the write operation has + * already succeeded and we don't want to return + * failing status for that. + */ + (void)fuse_internal_setattr(vp, &va, td, NULL); + } + } + } +} + #ifdef ZERO_PAD_INCOMPLETE_BUFS static int isbzero(void *buf, size_t len) diff --git a/sys/fs/fuse/fuse_internal.h b/sys/fs/fuse/fuse_internal.h index de68861beae2..20a10d7dfda0 100644 --- a/sys/fs/fuse/fuse_internal.h +++ b/sys/fs/fuse/fuse_internal.h @@ -274,6 +274,10 @@ void fuse_internal_vnode_disappear(struct vnode *vp); int fuse_internal_setattr(struct vnode *vp, struct vattr *va, struct thread *td, struct ucred *cred); +/* write */ +void fuse_internal_clear_suid_on_write(struct vnode *vp, struct ucred *cred, + struct thread *td); + /* strategy */ /* entity creation */ diff --git a/sys/fs/fuse/fuse_io.c b/sys/fs/fuse/fuse_io.c index 4e178bb5340a..3f23a35a8626 100644 --- a/sys/fs/fuse/fuse_io.c +++ b/sys/fs/fuse/fuse_io.c @@ -121,9 +121,6 @@ SDT_PROBE_DEFINE2(fusefs, , io, trace, "int", "char*"); static int fuse_inval_buf_range(struct vnode *vp, off_t filesize, off_t start, off_t end); -static void -fuse_io_clear_suid_on_write(struct vnode *vp, struct ucred *cred, - struct thread *td); static int fuse_read_directbackend(struct vnode *vp, struct uio *uio, struct ucred *cred, struct fuse_filehandle *fufh); @@ -190,43 +187,6 @@ fuse_inval_buf_range(struct vnode *vp, off_t filesize, off_t start, off_t end) return (0); } -/* - * FreeBSD clears the SUID and SGID bits on any write by a non-root user. - */ -static void -fuse_io_clear_suid_on_write(struct vnode *vp, struct ucred *cred, - struct thread *td) -{ - struct fuse_data *data; - struct mount *mp; - struct vattr va; - int dataflags; - - mp = vnode_mount(vp); - data = fuse_get_mpdata(mp); - dataflags = data->dataflags; - - if (dataflags & FSESS_DEFAULT_PERMISSIONS) { - if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID)) { - fuse_internal_getattr(vp, &va, cred, td); - if (va.va_mode & (S_ISUID | S_ISGID)) { - mode_t mode = va.va_mode & ~(S_ISUID | S_ISGID); - /* Clear all vattr fields except mode */ - vattr_null(&va); - va.va_mode = mode; - - /* - * Ignore fuse_internal_setattr's return value, - * because at this point the write operation has - * already succeeded and we don't want to return - * failing status for that. - */ - (void)fuse_internal_setattr(vp, &va, td, NULL); - } - } - } -} - SDT_PROBE_DEFINE5(fusefs, , io, io_dispatch, "struct vnode*", "struct uio*", "int", "struct ucred*", "struct fuse_filehandle*"); SDT_PROBE_DEFINE4(fusefs, , io, io_dispatch_filehandles_closed, "struct vnode*", @@ -318,7 +278,7 @@ fuse_io_dispatch(struct vnode *vp, struct uio *uio, int ioflag, err = fuse_write_biobackend(vp, uio, cred, fufh, ioflag, pid); } - fuse_io_clear_suid_on_write(vp, cred, uio->uio_td); + fuse_internal_clear_suid_on_write(vp, cred, uio->uio_td); break; default: panic("uninterpreted mode passed to fuse_io_dispatch"); diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index d3738da26b34..791ee9f38444 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -855,6 +855,10 @@ fuse_body_audit(struct fuse_ticket *ftick, size_t blen) err = (blen == sizeof(struct fuse_lseek_out)) ? 0 : EINVAL; break; + case FUSE_COPY_FILE_RANGE: + err = (blen == sizeof(struct fuse_write_out)) ? 0 : EINVAL; + break; + default: panic("FUSE: opcodes out of sync (%d)\n", opcode); } diff --git a/sys/fs/fuse/fuse_kernel.h b/sys/fs/fuse/fuse_kernel.h index 6e97b04a733f..14cf4fabac14 100644 --- a/sys/fs/fuse/fuse_kernel.h +++ b/sys/fs/fuse/fuse_kernel.h @@ -1,4 +1,6 @@ -/*-- +/*- + * SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) + * * This file defines the kernel interface of FUSE * Copyright (C) 2001-2008 Miklos Szeredi * @@ -105,6 +107,22 @@ * * 7.24 * - add FUSE_LSEEK for SEEK_HOLE and SEEK_DATA support + * + * 7.25 + * - add FUSE_PARALLEL_DIROPS + * + * 7.26 + * - add FUSE_HANDLE_KILLPRIV + * - add FUSE_POSIX_ACL + * + * 7.27 + * - add FUSE_ABORT_ERROR + * + * 7.28 + * - add FUSE_COPY_FILE_RANGE + * - add FOPEN_CACHE_DIR + * - add FUSE_MAX_PAGES, add max_pages to init_out + * - add FUSE_CACHE_SYMLINKS */ #ifndef _FUSE_FUSE_KERNEL_H @@ -120,7 +138,7 @@ #define FUSE_KERNEL_VERSION 7 /** Minor version number of this interface */ -#define FUSE_KERNEL_MINOR_VERSION 24 +#define FUSE_KERNEL_MINOR_VERSION 28 /** The node ID of the root inode */ #define FUSE_ROOT_ID 1 @@ -188,10 +206,12 @@ struct fuse_file_lock { * FOPEN_DIRECT_IO: bypass page cache for this open file * FOPEN_KEEP_CACHE: don't invalidate the data cache on open * FOPEN_NONSEEKABLE: the file is not seekable + * FOPEN_CACHE_DIR: allow caching this directory */ #define FOPEN_DIRECT_IO (1 << 0) #define FOPEN_KEEP_CACHE (1 << 1) #define FOPEN_NONSEEKABLE (1 << 2) +#define FOPEN_CACHE_DIR (1 << 3) /** * INIT request/reply flags @@ -214,6 +234,12 @@ struct fuse_file_lock { * FUSE_ASYNC_DIO: asynchronous direct I/O submission * FUSE_WRITEBACK_CACHE: use writeback cache for buffered writes * FUSE_NO_OPEN_SUPPORT: kernel supports zero-message opens + * FUSE_PARALLEL_DIROPS: allow parallel lookups and readdir + * FUSE_HANDLE_KILLPRIV: fs handles killing suid/sgid/cap on write/chown/trunc + * FUSE_POSIX_ACL: filesystem supports posix acls + * FUSE_ABORT_ERROR: reading the device after abort returns ECONNABORTED + * FUSE_MAX_PAGES: init_out.max_pages contains the max number of req pages + * FUSE_CACHE_SYMLINKS: cache READLINK responses */ #define FUSE_ASYNC_READ (1 << 0) #define FUSE_POSIX_LOCKS (1 << 1) @@ -233,6 +259,12 @@ struct fuse_file_lock { #define FUSE_ASYNC_DIO (1 << 15) #define FUSE_WRITEBACK_CACHE (1 << 16) #define FUSE_NO_OPEN_SUPPORT (1 << 17) +#define FUSE_PARALLEL_DIROPS (1 << 18) +#define FUSE_HANDLE_KILLPRIV (1 << 19) +#define FUSE_POSIX_ACL (1 << 20) +#define FUSE_ABORT_ERROR (1 << 21) +#define FUSE_MAX_PAGES (1 << 22) +#define FUSE_CACHE_SYMLINKS (1 << 23) #ifdef linux /** @@ -300,54 +332,55 @@ struct fuse_file_lock { #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) enum fuse_opcode { - FUSE_LOOKUP = 1, - FUSE_FORGET = 2, /* no reply */ - FUSE_GETATTR = 3, - FUSE_SETATTR = 4, - FUSE_READLINK = 5, - FUSE_SYMLINK = 6, - FUSE_MKNOD = 8, - FUSE_MKDIR = 9, - FUSE_UNLINK = 10, - FUSE_RMDIR = 11, - FUSE_RENAME = 12, - FUSE_LINK = 13, - FUSE_OPEN = 14, - FUSE_READ = 15, - FUSE_WRITE = 16, - FUSE_STATFS = 17, - FUSE_RELEASE = 18, - FUSE_FSYNC = 20, - FUSE_SETXATTR = 21, - FUSE_GETXATTR = 22, - FUSE_LISTXATTR = 23, - FUSE_REMOVEXATTR = 24, - FUSE_FLUSH = 25, - FUSE_INIT = 26, - FUSE_OPENDIR = 27, - FUSE_READDIR = 28, - FUSE_RELEASEDIR = 29, - FUSE_FSYNCDIR = 30, - FUSE_GETLK = 31, - FUSE_SETLK = 32, - FUSE_SETLKW = 33, - FUSE_ACCESS = 34, - FUSE_CREATE = 35, - FUSE_INTERRUPT = 36, - FUSE_BMAP = 37, - FUSE_DESTROY = 38, - FUSE_IOCTL = 39, - FUSE_POLL = 40, - FUSE_NOTIFY_REPLY = 41, - FUSE_BATCH_FORGET = 42, - FUSE_FALLOCATE = 43, - FUSE_READDIRPLUS = 44, - FUSE_RENAME2 = 45, - FUSE_LSEEK = 46, + FUSE_LOOKUP = 1, + FUSE_FORGET = 2, /* no reply */ + FUSE_GETATTR = 3, + FUSE_SETATTR = 4, + FUSE_READLINK = 5, + FUSE_SYMLINK = 6, + FUSE_MKNOD = 8, + FUSE_MKDIR = 9, + FUSE_UNLINK = 10, + FUSE_RMDIR = 11, + FUSE_RENAME = 12, + FUSE_LINK = 13, + FUSE_OPEN = 14, + FUSE_READ = 15, + FUSE_WRITE = 16, + FUSE_STATFS = 17, + FUSE_RELEASE = 18, + FUSE_FSYNC = 20, + FUSE_SETXATTR = 21, + FUSE_GETXATTR = 22, + FUSE_LISTXATTR = 23, + FUSE_REMOVEXATTR = 24, + FUSE_FLUSH = 25, + FUSE_INIT = 26, + FUSE_OPENDIR = 27, + FUSE_READDIR = 28, + FUSE_RELEASEDIR = 29, + FUSE_FSYNCDIR = 30, + FUSE_GETLK = 31, + FUSE_SETLK = 32, + FUSE_SETLKW = 33, + FUSE_ACCESS = 34, + FUSE_CREATE = 35, + FUSE_INTERRUPT = 36, + FUSE_BMAP = 37, + FUSE_DESTROY = 38, + FUSE_IOCTL = 39, + FUSE_POLL = 40, + FUSE_NOTIFY_REPLY = 41, + FUSE_BATCH_FORGET = 42, + FUSE_FALLOCATE = 43, + FUSE_READDIRPLUS = 44, + FUSE_RENAME2 = 45, + FUSE_LSEEK = 46, + FUSE_COPY_FILE_RANGE = 47, #ifdef linux /* CUSE specific operations */ - CUSE_INIT = 4096, + CUSE_INIT = 4096, #endif /* linux */ }; @@ -585,7 +618,9 @@ struct fuse_init_out { uint16_t congestion_threshold; uint32_t max_write; uint32_t time_gran; - uint32_t unused[9]; + uint16_t max_pages; + uint16_t padding; + uint32_t unused[8]; }; #ifdef linux @@ -766,4 +801,14 @@ struct fuse_lseek_out { uint64_t offset; }; +struct fuse_copy_file_range_in { + uint64_t fh_in; + uint64_t off_in; + uint64_t nodeid_out; + uint64_t fh_out; + uint64_t off_out; + uint64_t len; + uint64_t flags; +}; + #endif /* _FUSE_FUSE_KERNEL_H */ diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index efac7e041cf6..1e9434f9403d 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -130,6 +130,7 @@ static vop_advlock_t fuse_vnop_advlock; static vop_bmap_t fuse_vnop_bmap; static vop_close_t fuse_fifo_close; static vop_close_t fuse_vnop_close; +static vop_copy_file_range_t fuse_vnop_copy_file_range; static vop_create_t fuse_vnop_create; static vop_deleteextattr_t fuse_vnop_deleteextattr; static vop_fdatasync_t fuse_vnop_fdatasync; @@ -185,6 +186,7 @@ struct vop_vector fuse_vnops = { .vop_advlock = fuse_vnop_advlock, .vop_bmap = fuse_vnop_bmap, .vop_close = fuse_vnop_close, + .vop_copy_file_range = fuse_vnop_copy_file_range, .vop_create = fuse_vnop_create, .vop_deleteextattr = fuse_vnop_deleteextattr, .vop_fsync = fuse_vnop_fsync, @@ -609,6 +611,126 @@ fuse_vnop_close(struct vop_close_args *ap) return err; } +/* + struct vop_copy_file_range_args { + struct vop_generic_args a_gen; + struct vnode *a_invp; + off_t *a_inoffp; + struct vnode *a_outvp; + off_t *a_outoffp; + size_t *a_lenp; + unsigned int a_flags; + struct ucred *a_incred; + struct ucred *a_outcred; + struct thread *a_fsizetd; +} + */ +static int +fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap) +{ + struct vnode *invp = ap->a_invp; + struct vnode *outvp = ap->a_outvp; + struct mount *mp = vnode_mount(invp); + struct fuse_dispatcher fdi; + struct fuse_filehandle *infufh, *outfufh; + struct fuse_copy_file_range_in *fcfri; + struct ucred *incred = ap->a_incred; + struct ucred *outcred = ap->a_outcred; + struct fuse_write_out *fwo; + struct thread *td; + struct uio io; + pid_t pid; + int err; + + if (mp != vnode_mount(outvp)) + goto fallback; + + if (incred->cr_uid != outcred->cr_uid) + goto fallback; + + if (incred->cr_groups[0] != outcred->cr_groups[0]) + goto fallback; + + if (fsess_not_impl(mp, FUSE_COPY_FILE_RANGE)) + goto fallback; + + if (ap->a_fsizetd == NULL) + td = curthread; + else + td = ap->a_fsizetd; + pid = td->td_proc->p_pid; + + err = fuse_filehandle_getrw(invp, FREAD, &infufh, incred, pid); + if (err) + return (err); + + err = fuse_filehandle_getrw(outvp, FWRITE, &outfufh, outcred, pid); + if (err) + return (err); + + /* Lock both vnodes, avoiding risk of deadlock. */ + do { + err = vn_lock(outvp, LK_EXCLUSIVE); + if (invp == outvp) + break; + if (err == 0) { + err = vn_lock(invp, LK_SHARED | LK_NOWAIT); + if (err == 0) + break; + VOP_UNLOCK(outvp); + err = vn_lock(invp, LK_SHARED); + if (err == 0) + VOP_UNLOCK(invp); + } + } while (err == 0); + if (err != 0) + return (err); + + if (ap->a_fsizetd) { + io.uio_offset = *ap->a_outoffp; + io.uio_resid = *ap->a_lenp; + err = vn_rlimit_fsize(outvp, &io, ap->a_fsizetd); + if (err) + goto unlock; + } + + fdisp_init(&fdi, sizeof(*fcfri)); + fdisp_make_vp(&fdi, FUSE_COPY_FILE_RANGE, invp, td, incred); + fcfri = fdi.indata; + fcfri->fh_in = infufh->fh_id; + fcfri->off_in = *ap->a_inoffp; + fcfri->nodeid_out = VTOI(outvp); + fcfri->fh_out = outfufh->fh_id; + fcfri->off_out = *ap->a_outoffp; + fcfri->len = *ap->a_lenp; + fcfri->flags = 0; + + err = fdisp_wait_answ(&fdi); + if (err == 0) { + fwo = fdi.answ; + *ap->a_lenp = fwo->size; + *ap->a_inoffp += fwo->size; + *ap->a_outoffp += fwo->size; + fuse_internal_clear_suid_on_write(outvp, outcred, td); + } + fdisp_destroy(&fdi); + +unlock: + if (invp != outvp) + VOP_UNLOCK(invp); + VOP_UNLOCK(outvp); + + if (err == ENOSYS) { + fsess_set_notimpl(mp, FUSE_COPY_FILE_RANGE); +fallback: + err = vn_generic_copy_file_range(ap->a_invp, ap->a_inoffp, + ap->a_outvp, ap->a_outoffp, ap->a_lenp, ap->a_flags, + ap->a_incred, ap->a_outcred, ap->a_fsizetd); + } + + return (err); +} + static void fdisp_make_mknod_for_fallback( struct fuse_dispatcher *fdip, diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index 8d199a53c074..2c858ff42dd1 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -13,6 +13,7 @@ GTESTS+= access GTESTS+= allow_other GTESTS+= bmap GTESTS+= cache +GTESTS+= copy_file_range GTESTS+= create GTESTS+= default_permissions GTESTS+= default_permissions_privileged diff --git a/tests/sys/fs/fusefs/copy_file_range.cc b/tests/sys/fs/fusefs/copy_file_range.cc new file mode 100644 index 000000000000..bb8eecf8b862 --- /dev/null +++ b/tests/sys/fs/fusefs/copy_file_range.cc @@ -0,0 +1,401 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Alan Somers + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +extern "C" { +#include +#include +#include + +#include +#include +#include +} + +#include "mockfs.hh" +#include "utils.hh" + +using namespace testing; + +class CopyFileRange: public FuseTest { +public: +static sig_atomic_t s_sigxfsz; + +void SetUp() { + s_sigxfsz = 0; + FuseTest::SetUp(); +} + +void TearDown() { + struct sigaction sa; + + bzero(&sa, sizeof(sa)); + sa.sa_handler = SIG_DFL; + sigaction(SIGXFSZ, &sa, NULL); + + FuseTest::TearDown(); +} + +void expect_maybe_lseek(uint64_t ino) +{ + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_LSEEK && + in.header.nodeid == ino); + }, Eq(true)), + _) + ).Times(AtMost(1)) + .WillRepeatedly(Invoke(ReturnErrno(ENOSYS))); +} + +void expect_open(uint64_t ino, uint32_t flags, int times, uint64_t fh) +{ + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_OPEN && + in.header.nodeid == ino); + }, Eq(true)), + _) + ).Times(times) + .WillRepeatedly(Invoke( + ReturnImmediate([=](auto in __unused, auto& out) { + out.header.len = sizeof(out.header); + SET_OUT_HEADER_LEN(out, open); + out.body.open.fh = fh; + out.body.open.open_flags = flags; + }))); +} + +void expect_write(uint64_t ino, uint64_t offset, uint64_t isize, + uint64_t osize, const void *contents) +{ + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + const char *buf = (const char*)in.body.bytes + + sizeof(struct fuse_write_in); + + return (in.header.opcode == FUSE_WRITE && + in.header.nodeid == ino && + in.body.write.offset == offset && + in.body.write.size == isize && + 0 == bcmp(buf, contents, isize)); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, write); + out.body.write.size = osize; + }))); +} + +}; + +sig_atomic_t CopyFileRange::s_sigxfsz = 0; + +void sigxfsz_handler(int __unused sig) { + CopyFileRange::s_sigxfsz = 1; +} + + +class CopyFileRange_7_27: public CopyFileRange { +public: +virtual void SetUp() { + m_kernel_minor_version = 27; + CopyFileRange::SetUp(); +} +}; + +TEST_F(CopyFileRange, eio) +{ + const char FULLPATH1[] = "mountpoint/src.txt"; + const char RELPATH1[] = "src.txt"; + const char FULLPATH2[] = "mountpoint/dst.txt"; + const char RELPATH2[] = "dst.txt"; + const uint64_t ino1 = 42; + const uint64_t ino2 = 43; + const uint64_t fh1 = 0xdeadbeef1a7ebabe; + const uint64_t fh2 = 0xdeadc0de88c0ffee; + off_t fsize1 = 1 << 20; /* 1 MiB */ + off_t fsize2 = 1 << 19; /* 512 KiB */ + off_t start1 = 1 << 18; + off_t start2 = 3 << 17; + ssize_t len = 65536; + int fd1, fd2; + + expect_lookup(RELPATH1, ino1, S_IFREG | 0644, fsize1, 1); + expect_lookup(RELPATH2, ino2, S_IFREG | 0644, fsize2, 1); + expect_open(ino1, 0, 1, fh1); + expect_open(ino2, 0, 1, fh2); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_COPY_FILE_RANGE && + in.header.nodeid == ino1 && + in.body.copy_file_range.fh_in == fh1 && + (off_t)in.body.copy_file_range.off_in == start1 && + in.body.copy_file_range.nodeid_out == ino2 && + in.body.copy_file_range.fh_out == fh2 && + (off_t)in.body.copy_file_range.off_out == start2 && + in.body.copy_file_range.len == (size_t)len && + in.body.copy_file_range.flags == 0); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(EIO))); + + fd1 = open(FULLPATH1, O_RDONLY); + fd2 = open(FULLPATH2, O_WRONLY); + ASSERT_EQ(-1, copy_file_range(fd1, &start1, fd2, &start2, len, 0)); + EXPECT_EQ(EIO, errno); +} + +/* + * If the server doesn't support FUSE_COPY_FILE_RANGE, the kernel should + * fallback to a read/write based implementation. + */ +TEST_F(CopyFileRange, fallback) +{ + const char FULLPATH1[] = "mountpoint/src.txt"; + const char RELPATH1[] = "src.txt"; + const char FULLPATH2[] = "mountpoint/dst.txt"; + const char RELPATH2[] = "dst.txt"; + const uint64_t ino1 = 42; + const uint64_t ino2 = 43; + const uint64_t fh1 = 0xdeadbeef1a7ebabe; + const uint64_t fh2 = 0xdeadc0de88c0ffee; + off_t fsize2 = 0; + off_t start1 = 0; + off_t start2 = 0; + const char *contents = "Hello, world!"; + ssize_t len; + int fd1, fd2; + + len = strlen(contents); + + /* + * Ensure that we read to EOF, just so the buffer cache's read size is + * predictable. + */ + expect_lookup(RELPATH1, ino1, S_IFREG | 0644, start1 + len, 1); + expect_lookup(RELPATH2, ino2, S_IFREG | 0644, fsize2, 1); + expect_open(ino1, 0, 1, fh1); + expect_open(ino2, 0, 1, fh2); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_COPY_FILE_RANGE && + in.header.nodeid == ino1 && + in.body.copy_file_range.fh_in == fh1 && + (off_t)in.body.copy_file_range.off_in == start1 && + in.body.copy_file_range.nodeid_out == ino2 && + in.body.copy_file_range.fh_out == fh2 && + (off_t)in.body.copy_file_range.off_out == start2 && + in.body.copy_file_range.len == (size_t)len && + in.body.copy_file_range.flags == 0); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnErrno(ENOSYS))); + expect_maybe_lseek(ino1); + expect_read(ino1, start1, len, len, contents, 0); + expect_write(ino2, start2, len, len, contents); + + fd1 = open(FULLPATH1, O_RDONLY); + ASSERT_GE(fd1, 0); + fd2 = open(FULLPATH2, O_WRONLY); + ASSERT_GE(fd2, 0); + ASSERT_EQ(len, copy_file_range(fd1, &start1, fd2, &start2, len, 0)); +} + +/* fusefs should respect RLIMIT_FSIZE */ +TEST_F(CopyFileRange, rlimit_fsize) +{ + const char FULLPATH1[] = "mountpoint/src.txt"; + const char RELPATH1[] = "src.txt"; + const char FULLPATH2[] = "mountpoint/dst.txt"; + const char RELPATH2[] = "dst.txt"; + struct rlimit rl; + const uint64_t ino1 = 42; + const uint64_t ino2 = 43; + const uint64_t fh1 = 0xdeadbeef1a7ebabe; + const uint64_t fh2 = 0xdeadc0de88c0ffee; + off_t fsize1 = 1 << 20; /* 1 MiB */ + off_t fsize2 = 1 << 19; /* 512 KiB */ + off_t start1 = 1 << 18; + off_t start2 = fsize2; + ssize_t len = 65536; + int fd1, fd2; + + expect_lookup(RELPATH1, ino1, S_IFREG | 0644, fsize1, 1); + expect_lookup(RELPATH2, ino2, S_IFREG | 0644, fsize2, 1); + expect_open(ino1, 0, 1, fh1); + expect_open(ino2, 0, 1, fh2); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_COPY_FILE_RANGE); + }, Eq(true)), + _) + ).Times(0); + + rl.rlim_cur = fsize2; + rl.rlim_max = 10 * fsize2; + ASSERT_EQ(0, setrlimit(RLIMIT_FSIZE, &rl)) << strerror(errno); + ASSERT_NE(SIG_ERR, signal(SIGXFSZ, sigxfsz_handler)) << strerror(errno); + + fd1 = open(FULLPATH1, O_RDONLY); + fd2 = open(FULLPATH2, O_WRONLY); + ASSERT_EQ(-1, copy_file_range(fd1, &start1, fd2, &start2, len, 0)); + EXPECT_EQ(EFBIG, errno); + EXPECT_EQ(1, s_sigxfsz); +} + +TEST_F(CopyFileRange, ok) +{ + const char FULLPATH1[] = "mountpoint/src.txt"; + const char RELPATH1[] = "src.txt"; + const char FULLPATH2[] = "mountpoint/dst.txt"; + const char RELPATH2[] = "dst.txt"; + const uint64_t ino1 = 42; + const uint64_t ino2 = 43; + const uint64_t fh1 = 0xdeadbeef1a7ebabe; + const uint64_t fh2 = 0xdeadc0de88c0ffee; + off_t fsize1 = 1 << 20; /* 1 MiB */ + off_t fsize2 = 1 << 19; /* 512 KiB */ + off_t start1 = 1 << 18; + off_t start2 = 3 << 17; + ssize_t len = 65536; + int fd1, fd2; + + expect_lookup(RELPATH1, ino1, S_IFREG | 0644, fsize1, 1); + expect_lookup(RELPATH2, ino2, S_IFREG | 0644, fsize2, 1); + expect_open(ino1, 0, 1, fh1); + expect_open(ino2, 0, 1, fh2); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_COPY_FILE_RANGE && + in.header.nodeid == ino1 && + in.body.copy_file_range.fh_in == fh1 && + (off_t)in.body.copy_file_range.off_in == start1 && + in.body.copy_file_range.nodeid_out == ino2 && + in.body.copy_file_range.fh_out == fh2 && + (off_t)in.body.copy_file_range.off_out == start2 && + in.body.copy_file_range.len == (size_t)len && + in.body.copy_file_range.flags == 0); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, write); + out.body.write.size = len; + }))); + + fd1 = open(FULLPATH1, O_RDONLY); + fd2 = open(FULLPATH2, O_WRONLY); + ASSERT_EQ(len, copy_file_range(fd1, &start1, fd2, &start2, len, 0)); +} + +/* + * copy_file_range can make copies within a single file, as long as the ranges + * don't overlap. + * */ +TEST_F(CopyFileRange, same_file) +{ + const char FULLPATH[] = "mountpoint/src.txt"; + const char RELPATH[] = "src.txt"; + const uint64_t ino = 4; + const uint64_t fh = 0xdeadbeefa7ebabe; + off_t fsize = 1 << 20; /* 1 MiB */ + off_t off_in = 1 << 18; + off_t off_out = 3 << 17; + ssize_t len = 65536; + int fd; + + expect_lookup(RELPATH, ino, S_IFREG | 0644, fsize, 1); + expect_open(ino, 0, 1, fh); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_COPY_FILE_RANGE && + in.header.nodeid == ino && + in.body.copy_file_range.fh_in == fh && + (off_t)in.body.copy_file_range.off_in == off_in && + in.body.copy_file_range.nodeid_out == ino && + in.body.copy_file_range.fh_out == fh && + (off_t)in.body.copy_file_range.off_out == off_out && + in.body.copy_file_range.len == (size_t)len && + in.body.copy_file_range.flags == 0); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, write); + out.body.write.size = len; + }))); + + fd = open(FULLPATH, O_RDWR); + ASSERT_EQ(len, copy_file_range(fd, &off_in, fd, &off_out, len, 0)); +} + +/* With older protocol versions, no FUSE_COPY_FILE_RANGE should be attempted */ +TEST_F(CopyFileRange_7_27, fallback) +{ + const char FULLPATH1[] = "mountpoint/src.txt"; + const char RELPATH1[] = "src.txt"; + const char FULLPATH2[] = "mountpoint/dst.txt"; + const char RELPATH2[] = "dst.txt"; + const uint64_t ino1 = 42; + const uint64_t ino2 = 43; + const uint64_t fh1 = 0xdeadbeef1a7ebabe; + const uint64_t fh2 = 0xdeadc0de88c0ffee; + off_t fsize2 = 0; + off_t start1 = 0; + off_t start2 = 0; + const char *contents = "Hello, world!"; + ssize_t len; + int fd1, fd2; + + len = strlen(contents); + + /* + * Ensure that we read to EOF, just so the buffer cache's read size is + * predictable. + */ + expect_lookup(RELPATH1, ino1, S_IFREG | 0644, start1 + len, 1); + expect_lookup(RELPATH2, ino2, S_IFREG | 0644, fsize2, 1); + expect_open(ino1, 0, 1, fh1); + expect_open(ino2, 0, 1, fh2); + EXPECT_CALL(*m_mock, process( + ResultOf([=](auto in) { + return (in.header.opcode == FUSE_COPY_FILE_RANGE); + }, Eq(true)), + _) + ).Times(0); + expect_maybe_lseek(ino1); + expect_read(ino1, start1, len, len, contents, 0); + expect_write(ino2, start2, len, len, contents); + + fd1 = open(FULLPATH1, O_RDONLY); + ASSERT_GE(fd1, 0); + fd2 = open(FULLPATH2, O_WRONLY); + ASSERT_GE(fd2, 0); + ASSERT_EQ(len, copy_file_range(fd1, &start1, fd2, &start2, len, 0)); +} + + diff --git a/tests/sys/fs/fusefs/default_permissions.cc b/tests/sys/fs/fusefs/default_permissions.cc index 368c28bbcb3f..6401f926bb49 100644 --- a/tests/sys/fs/fusefs/default_permissions.cc +++ b/tests/sys/fs/fusefs/default_permissions.cc @@ -109,6 +109,25 @@ void expect_create(const char *relpath, uint64_t ino) }))); } *** 201 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Fri Jan 1 17:20:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07F554CE983; Fri, 1 Jan 2021 17:20: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6sGT6sTZz3MJ8; Fri, 1 Jan 2021 17:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA24D264DE; Fri, 1 Jan 2021 17:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101HK1dJ090089; Fri, 1 Jan 2021 17:20:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101HK10L090087; Fri, 1 Jan 2021 17:20:01 GMT (envelope-from git) Date: Fri, 1 Jan 2021 17:20:01 GMT Message-Id: <202101011720.101HK10L090087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: ae39db74066a - main - fusefs: fix an expectation in one of the tests 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/main X-Git-Reftype: branch X-Git-Commit: ae39db74066a0ff1682c1c841be030099d9d4557 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 17:20:02 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=ae39db74066a0ff1682c1c841be030099d9d4557 commit ae39db74066a0ff1682c1c841be030099d9d4557 Author: Alan Somers AuthorDate: 2020-12-29 17:48:34 +0000 Commit: Alan Somers CommitDate: 2021-01-01 17:18:22 +0000 fusefs: fix an expectation in one of the tests An order-of-operations problem caused an expectation intended for FUSE_READ to instead match FUSE_ACCESS. Surprisingly, only one test case was affected. MFC after: 2 weeks Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D27818 --- tests/sys/fs/fusefs/utils.cc | 4 ++-- tests/sys/fs/fusefs/write.cc | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/sys/fs/fusefs/utils.cc b/tests/sys/fs/fusefs/utils.cc index 7e9b97c2f228..4b59f6e26e12 100644 --- a/tests/sys/fs/fusefs/utils.cc +++ b/tests/sys/fs/fusefs/utils.cc @@ -376,10 +376,10 @@ void FuseTest::expect_read(uint64_t ino, uint64_t offset, uint64_t isize, in.body.read.fh == FH && in.body.read.offset == offset && in.body.read.size == isize && - flags == -1 ? + (flags == -1 ? (in.body.read.flags == O_RDONLY || in.body.read.flags == O_RDWR) - : in.body.read.flags == (uint32_t)flags); + : in.body.read.flags == (uint32_t)flags)); }, Eq(true)), _) ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index 78d82805470f..7529b76847d7 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -508,7 +508,7 @@ TEST_F(Write, eof_during_rmw) const char *INITIAL = "XXXXXXXXXX"; uint64_t ino = 42; uint64_t offset = 1; - ssize_t bufsize = strlen(CONTENTS); + ssize_t bufsize = strlen(CONTENTS) + 1; off_t orig_fsize = 10; off_t truncated_fsize = 5; off_t final_fsize = bufsize; @@ -517,8 +517,6 @@ TEST_F(Write, eof_during_rmw) FuseTest::expect_lookup(RELPATH, ino, S_IFREG | 0644, orig_fsize, 1); expect_open(ino, 0, 1); expect_read(ino, 0, orig_fsize, truncated_fsize, INITIAL, O_RDWR); - expect_getattr(ino, truncated_fsize); - expect_read(ino, 0, final_fsize, final_fsize, INITIAL, O_RDWR); maybe_expect_write(ino, offset, bufsize, CONTENTS); fd = open(FULLPATH, O_RDWR); From owner-dev-commits-src-all@freebsd.org Fri Jan 1 17:27:48 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C07E04CEA99; Fri, 1 Jan 2021 17:27: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6sRS514Bz3N4H; Fri, 1 Jan 2021 17:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AF01262FF; Fri, 1 Jan 2021 17:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101HRmw4001691; Fri, 1 Jan 2021 17:27:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101HRmUm001690; Fri, 1 Jan 2021 17:27:48 GMT (envelope-from git) Date: Fri, 1 Jan 2021 17:27:48 GMT Message-Id: <202101011727.101HRmUm001690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: b586c66baf48 - main - ping: fix ping when the kernel was built without INET6 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/main X-Git-Reftype: branch X-Git-Commit: b586c66baf4824d175d051b3f5b06588c9aa2bc8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 17:27:48 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=b586c66baf4824d175d051b3f5b06588c9aa2bc8 commit b586c66baf4824d175d051b3f5b06588c9aa2bc8 Author: Alan Somers AuthorDate: 2021-01-01 17:25:49 +0000 Commit: Alan Somers CommitDate: 2021-01-01 17:25:49 +0000 ping: fix ping when the kernel was built without INET6 If the kernel was built without INET6, default to ICMP. Or, if it was built without INET, default to ICMPv6. PR: 251725 Reported by: jbeich Reviewed by: jbeich Tested by: jbeich MFC with: 368045 --- sbin/ping/main.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/sbin/ping/main.c b/sbin/ping/main.c index 5d28a2b4a5cd..01442679efff 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -126,15 +126,21 @@ main(int argc, char *argv[]) else if (ipv4) hints.ai_family = AF_INET; else { - struct addrinfo *res; - - memset(&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_RAW; - hints.ai_family = AF_UNSPEC; - getaddrinfo(argv[argc - 1], NULL, &hints, &res); - if (res != NULL) { - hints.ai_family = res[0].ai_family; - freeaddrinfo(res); + if (!feature_present("inet6")) + hints.ai_family = AF_INET; + else if (!feature_present("inet")) + hints.ai_family = AF_INET6; + else { + struct addrinfo *res; + + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_RAW; + hints.ai_family = AF_UNSPEC; + getaddrinfo(argv[argc - 1], NULL, &hints, &res); + if (res != NULL) { + hints.ai_family = res[0].ai_family; + freeaddrinfo(res); + } } } #elif defined(INET) From owner-dev-commits-src-all@freebsd.org Fri Jan 1 17:38:48 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF56B4CEC6B; Fri, 1 Jan 2021 17: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6sh85Thmz3NC5; Fri, 1 Jan 2021 17:38:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF13D26A27; Fri, 1 Jan 2021 17:38:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101HcmII014756; Fri, 1 Jan 2021 17:38:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101HcmCt014755; Fri, 1 Jan 2021 17:38:48 GMT (envelope-from git) Date: Fri, 1 Jan 2021 17:38:48 GMT Message-Id: <202101011738.101HcmCt014755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 670d2ad820c7 - main - efi loader: fix typos in a comment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 670d2ad820c7584e6592d2a6d748dda0758d2ec5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 17:38:48 -0000 The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=670d2ad820c7584e6592d2a6d748dda0758d2ec5 commit 670d2ad820c7584e6592d2a6d748dda0758d2ec5 Author: Eric van Gyzen AuthorDate: 2021-01-01 17:38:39 +0000 Commit: Eric van Gyzen CommitDate: 2021-01-01 17:38:39 +0000 efi loader: fix typos in a comment ...mostly because it's a harmless way to try the shiny new git repo. Sponsored by: Dell EMC Isilon --- stand/efi/loader/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index ad81b784cb66..aad285f59092 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -356,9 +356,9 @@ match_boot_info(char *boot_info, size_t bisz) CHAR16 *text; /* - * FreeBSD encodes it's boot loading path into the boot loader + * FreeBSD encodes its boot loading path into the boot loader * BootXXXX variable. We look for the last one in the path - * and use that to load the kernel. However, if we only fine + * and use that to load the kernel. However, if we only find * one DEVICE_PATH, then there's nothing specific and we should * fall back. * @@ -369,8 +369,8 @@ match_boot_info(char *boot_info, size_t bisz) * boot loader to get to the next boot loader. However, that * doesn't work. We rarely have the path to the image booted * (just the device) so we can't count on that. So, we do the - * enxt best thing, we look through the device path(s) passed - * in the BootXXXX varaible. If there's only one, we return + * next best thing: we look through the device path(s) passed + * in the BootXXXX variable. If there's only one, we return * NOT_SPECIFIC. Otherwise, we look at the last one and try to * load that. If we can, we return BOOT_INFO_OK. Otherwise we * return BAD_CHOICE for the caller to sort out. From owner-dev-commits-src-all@freebsd.org Fri Jan 1 17:57:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 626744CF786; Fri, 1 Jan 2021 17: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6t6H2KhJz3Pb0; Fri, 1 Jan 2021 17:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DE0E26F2A; Fri, 1 Jan 2021 17:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101HvxjI040745; Fri, 1 Jan 2021 17:57:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101HvxvG040744; Fri, 1 Jan 2021 17:57:59 GMT (envelope-from git) Date: Fri, 1 Jan 2021 17:57:59 GMT Message-Id: <202101011757.101HvxvG040744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: fb6bc290fb34 - main - syscons: scrnmaps: appease -Wmissing-variable-declarations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb6bc290fb342864f5362ab9cef7dd214df05cf3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 17:57:59 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=fb6bc290fb342864f5362ab9cef7dd214df05cf3 commit fb6bc290fb342864f5362ab9cef7dd214df05cf3 Author: Kyle Evans AuthorDate: 2021-01-01 17:53:47 +0000 Commit: Kyle Evans CommitDate: 2021-01-01 17:53:47 +0000 syscons: scrnmaps: appease -Wmissing-variable-declarations scrmap is only used in the one compilation unit in all cases, make it static rather than extern'ing it. There's little benefit, but it's easy to do. It's unclear how this hasn't failed many builds before now, since it should have cropped up sometime around deeper hierarchies getting a default WARNS. MFC after: 3 days --- share/syscons/scrnmaps/armscii8-2haik8 | 2 +- share/syscons/scrnmaps/iso-8859-1_to_cp437 | 2 +- share/syscons/scrnmaps/iso-8859-4_for_vga9 | 2 +- share/syscons/scrnmaps/iso-8859-7_to_cp437 | 2 +- share/syscons/scrnmaps/koi8-r2cp866 | 2 +- share/syscons/scrnmaps/koi8-u2cp866u | 2 +- share/syscons/scrnmaps/us-ascii_to_cp437 | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/share/syscons/scrnmaps/armscii8-2haik8 b/share/syscons/scrnmaps/armscii8-2haik8 index f6bc35d74701..0546204b9164 100644 --- a/share/syscons/scrnmaps/armscii8-2haik8 +++ b/share/syscons/scrnmaps/armscii8-2haik8 @@ -27,7 +27,7 @@ * $FreeBSD$ */ -scrmap_t scrmap = { +static scrmap_t scrmap = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/share/syscons/scrnmaps/iso-8859-1_to_cp437 b/share/syscons/scrnmaps/iso-8859-1_to_cp437 index c18e62f04667..80522c4315e2 100644 --- a/share/syscons/scrnmaps/iso-8859-1_to_cp437 +++ b/share/syscons/scrnmaps/iso-8859-1_to_cp437 @@ -25,7 +25,7 @@ * $FreeBSD$ */ -scrmap_t scrmap = { +static scrmap_t scrmap = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/share/syscons/scrnmaps/iso-8859-4_for_vga9 b/share/syscons/scrnmaps/iso-8859-4_for_vga9 index e096bdcd771e..5afbe36ee397 100644 --- a/share/syscons/scrnmaps/iso-8859-4_for_vga9 +++ b/share/syscons/scrnmaps/iso-8859-4_for_vga9 @@ -31,7 +31,7 @@ * only at 0xC0-0xDF area. */ -scrmap_t scrmap = { +static scrmap_t scrmap = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, diff --git a/share/syscons/scrnmaps/iso-8859-7_to_cp437 b/share/syscons/scrnmaps/iso-8859-7_to_cp437 index 12c467a360f2..7c1b49dba2da 100644 --- a/share/syscons/scrnmaps/iso-8859-7_to_cp437 +++ b/share/syscons/scrnmaps/iso-8859-7_to_cp437 @@ -2,7 +2,7 @@ * $FreeBSD$ */ -scrmap_t scrmap = { +static scrmap_t scrmap = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/share/syscons/scrnmaps/koi8-r2cp866 b/share/syscons/scrnmaps/koi8-r2cp866 index 15f2847fa9b3..d8d86f28e3e8 100644 --- a/share/syscons/scrnmaps/koi8-r2cp866 +++ b/share/syscons/scrnmaps/koi8-r2cp866 @@ -26,7 +26,7 @@ * $FreeBSD$ */ -scrmap_t scrmap = { +static scrmap_t scrmap = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/share/syscons/scrnmaps/koi8-u2cp866u b/share/syscons/scrnmaps/koi8-u2cp866u index 7fd86ad51bb7..a4e583da44a8 100644 --- a/share/syscons/scrnmaps/koi8-u2cp866u +++ b/share/syscons/scrnmaps/koi8-u2cp866u @@ -28,7 +28,7 @@ * $FreeBSD$ */ -scrmap_t scrmap = { +static scrmap_t scrmap = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/share/syscons/scrnmaps/us-ascii_to_cp437 b/share/syscons/scrnmaps/us-ascii_to_cp437 index e1155aa137c4..5e7d631237b3 100644 --- a/share/syscons/scrnmaps/us-ascii_to_cp437 +++ b/share/syscons/scrnmaps/us-ascii_to_cp437 @@ -2,7 +2,7 @@ * $FreeBSD$ */ -scrmap_t scrmap = { +static scrmap_t scrmap = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, From owner-dev-commits-src-all@freebsd.org Fri Jan 1 18:52:36 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCDFE4D0E5C; Fri, 1 Jan 2021 18:52:36 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6vKJ131Tz3hpc; Fri, 1 Jan 2021 18:52:35 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f181.google.com with SMTP id y15so14646471qtv.5; Fri, 01 Jan 2021 10:52:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UmukHAZpllE1wTZ7WG6M/JOUT+Zg1HUfg0PavS3zVe8=; b=G0291ZXCrklO8cJFHqw0MkjCLL1WZTulR0XvRhB/+GcruRZr1tilLmY4ekezTwtcm3 vHEEJy7R1HS1ieQRnzaOo3ZincDfWcUp9EYRtcgwImS4E9CpEA7rvD1obxYeDoFy2gga 1NkUJ/hBVOPmUAS2UjeIlR96Y40vR3+0igIzYct+/UkuYqbTt/I15gK6tBVbrUbRtyzZ W3Y6A7rT3mCp1RS4gN4IbPVEYWpKPgb9XiLOvWmUiXQj043FMKNFOa7XHGWpip8jMiW7 D34LG0UXhEa5svuPiveOd2BdS79NHIM8nwWWDtnLWSs2Vlk6BuKen1yWYPFtLsk0q3ZY qTJA== X-Gm-Message-State: AOAM531stTglPCikU5e4x74QDNs1m2lQ+zTWCgtd3x8Z5KcbqvBDPJi+ 9C78XpHWLKFgtNqlYKlWM3CzxLHLBsg= X-Google-Smtp-Source: ABdhPJw//ZpfT1t9XGDp1454byyP3OQEuPsgNTTLVRqjAzc+aT4n4Xfa/h1uUdpNdVrRLozL7RnVYQ== X-Received: by 2002:ac8:5c93:: with SMTP id r19mr61868331qta.107.1609527154967; Fri, 01 Jan 2021 10:52:34 -0800 (PST) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com. [209.85.160.175]) by smtp.gmail.com with ESMTPSA id o29sm32776175qtl.7.2021.01.01.10.52.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Jan 2021 10:52:34 -0800 (PST) Received: by mail-qt1-f175.google.com with SMTP id h19so14622982qtq.13; Fri, 01 Jan 2021 10:52:34 -0800 (PST) X-Received: by 2002:aed:2088:: with SMTP id 8mr48003996qtb.174.1609527154155; Fri, 01 Jan 2021 10:52:34 -0800 (PST) MIME-Version: 1.0 References: <202012312103.0BVL3dGu073808@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Fri, 1 Jan 2021 10:52:23 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 942951ba46ec - main - uma dbg: catch more corruption with atomics To: meloun.michal@gmail.com Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/mixed; boundary="00000000000047bf4105b7db3eab" X-Rspamd-Queue-Id: 4D6vKJ131Tz3hpc X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 209.85.160.181 as permitted sender) smtp.mailfrom=rlibby@gmail.com X-Spamd-Result: default: False [-0.83 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; HAS_ATTACHMENT(0.00)[]; MIME_BASE64_TEXT_BOGUS(1.00)[]; RCVD_COUNT_THREE(0.00)[4]; RWL_MAILSPIKE_GOOD(0.00)[209.85.160.181:from]; MIME_BASE64_TEXT(0.10)[]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[rlibby@freebsd.org,rlibby@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[rlibby@freebsd.org,rlibby@gmail.com]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.160.181:from]; FREEFALL_USER(0.00)[rlibby]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain,text/x-patch]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_SHORT(0.07)[0.075]; SPAMHAUS_ZRD(0.00)[209.85.160.181:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.181:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 18:52:36 -0000 --00000000000047bf4105b7db3eab Content-Type: text/plain; charset="UTF-8" On Fri, Jan 1, 2021 at 5:46 AM Michal Meloun wrote: > > > > On 31.12.2020 22:03, Ryan Libby wrote: > > The branch main has been updated by rlibby: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=942951ba46ecd5ebab18de006a24dc52e2d3f745 > > > > commit 942951ba46ecd5ebab18de006a24dc52e2d3f745 > > Author: Ryan Libby > > AuthorDate: 2020-12-31 21:02:45 +0000 > > Commit: Ryan Libby > > CommitDate: 2020-12-31 21:02:45 +0000 > > > > uma dbg: catch more corruption with atomics > > > > Use atomic testandset and testandclear to catch concurrent double free, > > and to reduce the number of atomic operations. > > > > Submitted by: jeff > > Reviewed by: cem, kib, markj (all previous version) > > Sponsored by: Dell EMC Isilon > > Differential Revision: https://reviews.freebsd.org/D22703 > Unfortunately, this broke arm and arm64 kernel with random > 'duplicate alloc'/'duplicate free' panics. > > Michal > Thanks for the report. It's probably going to be several hours before I can dig into this properly. A GENERIC-NODEBUG kernel should avoid the problem. >From a quick scan of source, it looks to me like arm64's atomic_testand{set,clear}_64 are broken because of a wrong mask value under _ATOMIC_TEST_OP_IMPL(64, ...). If you would like to test a patch, you could try the one attached (only compile tested on my end). Ryan > > --- > > sys/vm/uma_core.c | 9 ++++----- > > 1 file changed, 4 insertions(+), 5 deletions(-) > > > > diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c > > index a0192642205d..39c846effac8 100644 > > --- a/sys/vm/uma_core.c > > +++ b/sys/vm/uma_core.c > > @@ -5392,10 +5392,10 @@ uma_dbg_alloc(uma_zone_t zone, uma_slab_t slab, void *item) > > keg = zone->uz_keg; > > freei = slab_item_index(slab, keg, item); > > > > - if (BIT_ISSET(keg->uk_ipers, freei, slab_dbg_bits(slab, keg))) > > + if (BIT_TEST_SET_ATOMIC(keg->uk_ipers, freei, > > + slab_dbg_bits(slab, keg))) > > panic("Duplicate alloc of %p from zone %p(%s) slab %p(%d)", > > item, zone, zone->uz_name, slab, freei); > > - BIT_SET_ATOMIC(keg->uk_ipers, freei, slab_dbg_bits(slab, keg)); > > } > > > > /* > > @@ -5426,11 +5426,10 @@ uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *item) > > panic("Unaligned free of %p from zone %p(%s) slab %p(%d)", > > item, zone, zone->uz_name, slab, freei); > > > > - if (!BIT_ISSET(keg->uk_ipers, freei, slab_dbg_bits(slab, keg))) > > + if (!BIT_TEST_CLR_ATOMIC(keg->uk_ipers, freei, > > + slab_dbg_bits(slab, keg))) > > panic("Duplicate free of %p from zone %p(%s) slab %p(%d)", > > item, zone, zone->uz_name, slab, freei); > > - > > - BIT_CLR_ATOMIC(keg->uk_ipers, freei, slab_dbg_bits(slab, keg)); > > } > > #endif /* INVARIANTS */ > > > > --00000000000047bf4105b7db3eab Content-Type: text/x-patch; charset="US-ASCII"; name="0001-arm64-fix-mask-in-atomic_test-64-ops.patch" Content-Disposition: attachment; filename="0001-arm64-fix-mask-in-atomic_test-64-ops.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kjemqbwc0 RnJvbSA0ZmIxZDQxMjYzNmJmNmZlNTlkMDQ1N2U3ZGQxN2RhNWU1OWNlNTVmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBSeWFuIExpYmJ5IDxybGliYnlARnJlZUJTRC5vcmc+CkRhdGU6 IEZyaSwgMSBKYW4gMjAyMSAxMDo0MzowMyAtMDgwMApTdWJqZWN0OiBbUEFUQ0hdIGFybTY0OiBm aXggbWFzayBpbiBhdG9taWNfdGVzdCA2NCBvcHMKClRoZXNlIG1hY3JvcyBnZW5lcmF0ZSBib3Ro IHRoZSAzMiBhbmQgNjQtYml0IG9wcyBidXQgdGhlIG1hc2sgd2FzIGhhcmQKY29kZWQgZm9yIDMy LWJpdCBvcHMuCi0tLQogc3lzL2FybTY0L2luY2x1ZGUvYXRvbWljLmggfCA0ICsrLS0KIDEgZmls ZSBjaGFuZ2VkLCAyIGluc2VydGlvbnMoKyksIDIgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEv c3lzL2FybTY0L2luY2x1ZGUvYXRvbWljLmggYi9zeXMvYXJtNjQvaW5jbHVkZS9hdG9taWMuaApp bmRleCA5OWRkNzNkNGY4NWYuLjljNWQ2MjI0ZjNlMiAxMDA2NDQKLS0tIGEvc3lzL2FybTY0L2lu Y2x1ZGUvYXRvbWljLmgKKysrIGIvc3lzL2FybTY0L2luY2x1ZGUvYXRvbWljLmgKQEAgLTQwOSw3 ICs0MDksNyBAQCBfQVRPTUlDX1RFU1RfT1BfUFJPVE8odCwgb3AsIF9sbHNjKQkJCQkJXAogCXVp bnQjI3QjI190IG1hc2ssIG9sZCwgdG1wOwkJCQkJXAogCWludCByZXM7CQkJCQkJCVwKIAkJCQkJ CQkJCVwKLQltYXNrID0gMXUgPDwgKHZhbCAmIDB4MWYpOwkJCQkJXAorCW1hc2sgPSAoKHVpbnQj I3QjI190KTEpIDw8ICh2YWwgJiAodCAtIDEpKTsJCQlcCiAJX19hc20gX192b2xhdGlsZSgJCQkJ CQlcCiAJICAgICIxOiBsZHhyCQklIiN3IjIsIFslM11cbiIJCQkJXAogCSAgICAiICAiI2xsc2Nf YXNtX29wIgklIiN3IjAsICUiI3ciMiwgJSIjdyI0XG4iCQlcCkBAIC00MjcsNyArNDI3LDcgQEAg X0FUT01JQ19URVNUX09QX1BST1RPKHQsIG9wLCBfbHNlKQkJCQkJXAogewkJCQkJCQkJCVwKIAl1 aW50IyN0IyNfdCBtYXNrLCBvbGQ7CQkJCQkJXAogCQkJCQkJCQkJXAotCW1hc2sgPSAxdSA8PCAo dmFsICYgMHgxZik7CQkJCQlcCisJbWFzayA9ICgodWludCMjdCMjX3QpMSkgPDwgKHZhbCAmICh0 IC0gMSkpOwkJCVwKIAlfX2FzbSBfX3ZvbGF0aWxlKAkJCQkJCVwKIAkgICAgIi5hcmNoX2V4dGVu c2lvbiBsc2VcbiIJCQkJCVwKIAkgICAgImxkIiNsc2VfYXNtX29wIgklIiN3IjIsICUiI3ciMCwg WyUxXVxuIgkJCVwKLS0gCjIuMzAuMAoK --00000000000047bf4105b7db3eab-- From owner-dev-commits-src-all@freebsd.org Fri Jan 1 22:00:36 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 156E04D5347; Fri, 1 Jan 2021 22:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6zVD08ggz3tyg; Fri, 1 Jan 2021 22:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC785197E; Fri, 1 Jan 2021 22:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101M0Z4i059056; Fri, 1 Jan 2021 22:00:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101M0ZEE059055; Fri, 1 Jan 2021 22:00:35 GMT (envelope-from git) Date: Fri, 1 Jan 2021 22:00:35 GMT Message-Id: <202101012200.101M0ZEE059055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 774a36851e0e - main - nfsd: fix NFS server for ERELOOKUP 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/main X-Git-Reftype: branch X-Git-Commit: 774a36851e0e562a6428e5ac45fbfb2b23f3f58c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 22:00:36 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=774a36851e0e562a6428e5ac45fbfb2b23f3f58c commit 774a36851e0e562a6428e5ac45fbfb2b23f3f58c Author: Rick Macklem AuthorDate: 2021-01-01 21:55:51 +0000 Commit: Rick Macklem CommitDate: 2021-01-01 21:55:51 +0000 nfsd: fix NFS server for ERELOOKUP r367672 modified UFS such that certain VOPs, such as VOP_CREATE() will intermittently return ERELOOKUP. When this happens, the entire system call, or NFS operation in the case of the NFS server, must be redone. This patch adds that support to the NFS server by rolling back the state of the NFS request arguments and NFS reply arguments mbuf lists to the condition they were in before the operation and then redoing the operation. Tested by: pho Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D27875 --- sys/fs/nfs/nfs_var.h | 2 ++ sys/fs/nfsserver/nfs_nfsdport.c | 4 +-- sys/fs/nfsserver/nfs_nfsdsocket.c | 63 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 65 insertions(+), 4 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index a3c53e80ace3..0a1fe3ce053d 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -753,6 +753,8 @@ int nfsvno_rmxattr(struct nfsrv_descript *, struct vnode *, char *, struct ucred *, struct thread *); int nfsvno_listxattr(struct vnode *, uint64_t, struct ucred *, struct thread *, u_char **, uint32_t *, bool *); +void nfsm_trimtrailing(struct nfsrv_descript *, struct mbuf *, char *, int, + int); /* nfs_commonkrpc.c */ int newnfs_nmcancelreqs(struct nfsmount *); diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index e867ecc350b4..e9a9443dc08c 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -146,8 +146,6 @@ static int nfsrv_dsremove(struct vnode *, char *, struct ucred *, NFSPROC_T *); static int nfsrv_dssetacl(struct vnode *, struct acl *, struct ucred *, NFSPROC_T *); static int nfsrv_pnfsstatfs(struct statfs *, struct mount *); -static void nfsm_trimtrailing(struct nfsrv_descript *, struct mbuf *, - char *, int, int); int nfs_pnfsio(task_fn_t *, void *); @@ -6564,7 +6562,7 @@ out: /* * Trim trailing data off the mbuf list being built. */ -static void +void nfsm_trimtrailing(struct nfsrv_descript *nd, struct mbuf *mb, char *bpos, int bextpg, int bextpgsiz) { diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c index a9fdc7fa8be3..1a54914fc9dc 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -534,9 +534,21 @@ nfsrvd_dorpc(struct nfsrv_descript *nd, int isdgram, u_char *tag, int taglen, { int error = 0, lktype; vnode_t vp; - mount_t mp = NULL; + mount_t mp; struct nfsrvfh fh; struct nfsexstuff nes; + struct mbuf *md; + char *dpos; + + /* + * Save the current position in the request mbuf list so + * that a rollback to this location can be done upon an + * ERELOOKUP error return from an RPC function. + */ + md = nd->nd_md; + dpos = nd->nd_dpos; +tryagain: + mp = NULL; /* * Get a locked vnode for the first file handle @@ -634,6 +646,21 @@ nfsrvd_dorpc(struct nfsrv_descript *nd, int isdgram, u_char *tag, int taglen, if (mp != NULL && nfsrv_writerpc[nd->nd_procnum] != 0) vn_finished_write(mp); + if (error == 0 && nd->nd_repstat == ERELOOKUP) { + /* + * Roll back to the beginning of the RPC request + * arguments. + */ + nd->nd_md = md; + nd->nd_dpos = dpos; + + /* Free the junk RPC reply and redo the RPC. */ + m_freem(nd->nd_mreq); + nd->nd_mreq = nd->nd_mb = NULL; + nd->nd_repstat = 0; + goto tryagain; + } + nfsrvd_statend(nfsv3to4op[nd->nd_procnum], /*bytes*/ 0, /*now*/ NULL, /*then*/ &start_time); } @@ -691,6 +718,9 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, static u_int64_t compref = 0; struct bintime start_time; struct thread *p; + struct mbuf *mb, *md; + char *bpos, *dpos; + int bextpg, bextpgsiz; p = curthread; @@ -1045,6 +1075,20 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, break; } } + + /* + * Save the current positions in the mbuf lists so + * that a rollback to this location can be done upon a + * redo due to a ERELOOKUP return for a operation. + */ + mb = nd->nd_mb; + bpos = nd->nd_bpos; + bextpg = nd->nd_bextpg; + bextpgsiz = nd->nd_bextpgsiz; + md = nd->nd_md; + dpos = nd->nd_dpos; +tryagain: + if (nfsv4_opflag[op].retfh == 1) { if (!vp) { nd->nd_repstat = NFSERR_NOFILEHANDLE; @@ -1154,6 +1198,23 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, error = 0; } + if (nd->nd_repstat == ERELOOKUP) { + /* + * Roll back to the beginning of the operation + * arguments. + */ + nd->nd_md = md; + nd->nd_dpos = dpos; + + /* + * Trim off the bogus reply for this operation + * and redo the operation. + */ + nfsm_trimtrailing(nd, mb, bpos, bextpg, bextpgsiz); + nd->nd_repstat = 0; + goto tryagain; + } + if (statsinprog != 0) { nfsrvd_statend(op, /*bytes*/ 0, /*now*/ NULL, /*then*/ &start_time); From owner-dev-commits-src-all@freebsd.org Fri Jan 1 22:24:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 713E74D603A; Fri, 1 Jan 2021 22:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D701S2lpPz4R1l; Fri, 1 Jan 2021 22:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50C5820F4; Fri, 1 Jan 2021 22:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 101MOCJo089724; Fri, 1 Jan 2021 22:24:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 101MOCWf089723; Fri, 1 Jan 2021 22:24:12 GMT (envelope-from git) Date: Fri, 1 Jan 2021 22:24:12 GMT Message-Id: <202101012224.101MOCWf089723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: dc78533a5204 - main - nfsd: fix NFSv4.0 seqid handling for ERELOOKUP 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/main X-Git-Reftype: branch X-Git-Commit: dc78533a5204ae487bf9b27badb134ffa40733ab Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 22:24:12 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=dc78533a5204ae487bf9b27badb134ffa40733ab commit dc78533a5204ae487bf9b27badb134ffa40733ab Author: Rick Macklem AuthorDate: 2021-01-01 22:21:51 +0000 Commit: Rick Macklem CommitDate: 2021-01-01 22:21:51 +0000 nfsd: fix NFSv4.0 seqid handling for ERELOOKUP Commit 774a36851e0e fixed the NFS server so that it could handle ERELOOKUP returns from VOP calls by redoing the operation/RPC. However, for NFSv4.0, redoing an Open would increment the open_owner's seqid multiple times, breaking the protocol. This patch sets a new flag called ND_ERELOOKUP on the RPC when a redo is in progress. Then the code that increments the seqid avoids the seqid increment/check when the flag is set, since it indicates this has already been done for the Open. --- sys/fs/nfs/nfs.h | 1 + sys/fs/nfsserver/nfs_nfsdsocket.c | 2 ++ sys/fs/nfsserver/nfs_nfsdstate.c | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/sys/fs/nfs/nfs.h b/sys/fs/nfs/nfs.h index f6acb807fc6e..44b6042a2ce7 100644 --- a/sys/fs/nfs/nfs.h +++ b/sys/fs/nfs/nfs.h @@ -721,6 +721,7 @@ struct nfsrv_descript { #define ND_EXTLS 0x8000000000 #define ND_EXTLSCERT 0x10000000000 #define ND_EXTLSCERTUSER 0x20000000000 +#define ND_ERELOOKUP 0x40000000000 /* * ND_GSS should be the "or" of all GSS type authentications. diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c index 1a54914fc9dc..530ebb8a8cc8 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -1212,8 +1212,10 @@ tryagain: */ nfsm_trimtrailing(nd, mb, bpos, bextpg, bextpgsiz); nd->nd_repstat = 0; + nd->nd_flag |= ND_ERELOOKUP; goto tryagain; } + nd->nd_flag &= ~ND_ERELOOKUP; if (statsinprog != 0) { nfsrvd_statend(op, /*bytes*/ 0, /*now*/ NULL, diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index f80b386ae839..1f6e8b7ef526 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -4016,6 +4016,11 @@ nfsrv_checkseqid(struct nfsrv_descript *nd, u_int32_t seqid, printf("refcnt=%d\n", stp->ls_op->rc_refcnt); panic("nfsrvstate op refcnt"); } + + /* If ND_ERELOOKUP is set, the seqid has already been handled. */ + if ((nd->nd_flag & ND_ERELOOKUP) != 0) + goto out; + if ((stp->ls_seq + 1) == seqid) { if (stp->ls_op) nfsrvd_derefcache(stp->ls_op); From owner-dev-commits-src-all@freebsd.org Fri Jan 1 23:42:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C508E4B8288; Fri, 1 Jan 2021 23:42:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D71lG5Cd2z4Wdh; Fri, 1 Jan 2021 23:42:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (c-98-207-126-143.hsd1.ca.comcast.net [98.207.126.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 150312F5E8; Fri, 1 Jan 2021 23:42:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.44.20121301 Date: Fri, 01 Jan 2021 15:41:58 -0800 Subject: Re: d021434a7960 - main - openzfs: fix gcc kernel module builds From: Ravi Pokala To: Ryan Libby , , , Message-ID: Thread-Topic: d021434a7960 - main - openzfs: fix gcc kernel module builds References: <202012272303.0BRN3egB008714@gitrepo.freebsd.org> In-Reply-To: <202012272303.0BRN3egB008714@gitrepo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 23:42:02 -0000 -----Original Message----- From: on behalf of Ryan Libby Date: 2020-12-27, Sunday at 15:03 To: , , Subject: git: d021434a7960 - main - openzfs: fix gcc kernel module builds The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=d021434a796008efbb93616f5297ed2f55a1a230 commit d021434a796008efbb93616f5297ed2f55a1a230 Author: Ryan Libby AuthorDate: 2020-12-27 22:33:13 +0000 Commit: Ryan Libby CommitDate: 2020-12-27 22:33:13 +0000 openzfs: fix gcc kernel module builds Hi Ryan, This is listed as "openzfs", but the vast majority of it is in dtrace...? -Ravi (rpokala@) - Suppress -Wredundant-decls. Ultimately this warning is harmless in any case, and it does not look like there is a simple way to avoid redundant declarations in this case without a lot of header pollution (e.g. having openzfs's shim param.h pulling in sys/kernel.h for hz). - Suppress -Wnested-externs, which is useless anyway. Unfortunately it was not sufficient just to modify OPENZFS_CFLAGS, because the warning suppressions need to appear on the command line after they are explicitly enabled by CWARNFLAGS from sys/conf/kern.mk, but OPENZFS_CFLAGS get added before due to use of -I for the shims. Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27685 --- sys/conf/kmod.mk | 4 +++- sys/modules/dtrace/dtaudit/Makefile | 1 + sys/modules/dtrace/dtmalloc/Makefile | 1 + sys/modules/dtrace/dtnfscl/Makefile | 1 + sys/modules/dtrace/dtrace/Makefile | 1 + sys/modules/dtrace/fasttrap/Makefile | 1 + sys/modules/dtrace/fbt/Makefile | 1 + sys/modules/dtrace/profile/Makefile | 1 + sys/modules/dtrace/prototype/Makefile | 1 + sys/modules/dtrace/sdt/Makefile | 1 + sys/modules/dtrace/systrace/Makefile | 1 + sys/modules/dtrace/systrace_freebsd32/Makefile | 1 + sys/modules/dtrace/systrace_linux/Makefile | 1 + sys/modules/dtrace/systrace_linux32/Makefile | 1 + sys/modules/opensolaris/Makefile | 1 + sys/modules/zfs/Makefile | 1 + 16 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 54ecbdf69c88..dcc00829b831 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -540,7 +540,9 @@ OPENZFS_CFLAGS= \ -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h - +OPENZFS_CWARNFLAGS= \ + -Wno-nested-externs \ + -Wno-redundant-decls .include .include diff --git a/sys/modules/dtrace/dtaudit/Makefile b/sys/modules/dtrace/dtaudit/Makefile index 72cdf03f4bc3..3571bcbb7ea2 100644 --- a/sys/modules/dtrace/dtaudit/Makefile +++ b/sys/modules/dtrace/dtaudit/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/dtmalloc/Makefile b/sys/modules/dtrace/dtmalloc/Makefile index 910f8f360e80..ffde4f811ee8 100644 --- a/sys/modules/dtrace/dtmalloc/Makefile +++ b/sys/modules/dtrace/dtmalloc/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/dtnfscl/Makefile b/sys/modules/dtrace/dtnfscl/Makefile index 6184ad183fc6..d28641e51ec8 100644 --- a/sys/modules/dtrace/dtnfscl/Makefile +++ b/sys/modules/dtrace/dtnfscl/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile index 0bedcaa12fe7..80278fc83a32 100644 --- a/sys/modules/dtrace/dtrace/Makefile +++ b/sys/modules/dtrace/dtrace/Makefile @@ -59,6 +59,7 @@ dtrace_asm.o: assym.inc CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h CFLAGS.dtrace_asm.S+= -D_SYS_ERRNO_H_ -D_SYS_PARAM_H_ -DLOCORE +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} CWARNFLAGS+= -Wno-parentheses CWARNFLAGS+= -Wno-uninitialized CWARNFLAGS+= -Wno-cast-qual diff --git a/sys/modules/dtrace/fasttrap/Makefile b/sys/modules/dtrace/fasttrap/Makefile index 1be1b97736ea..0eecfcb11aab 100644 --- a/sys/modules/dtrace/fasttrap/Makefile +++ b/sys/modules/dtrace/fasttrap/Makefile @@ -26,5 +26,6 @@ SRCS+= u8_textprep.c CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} CWARNFLAGS+= -Wno-cast-qual CWARNFLAGS+= -Wno-unused diff --git a/sys/modules/dtrace/fbt/Makefile b/sys/modules/dtrace/fbt/Makefile index 288c8cafa817..360d92000776 100644 --- a/sys/modules/dtrace/fbt/Makefile +++ b/sys/modules/dtrace/fbt/Makefile @@ -23,3 +23,4 @@ CFLAGS+= -I${SYSDIR}/cddl/dev/fbt .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/profile/Makefile b/sys/modules/dtrace/profile/Makefile index aa36f9a2dfba..b3eec9a19f23 100644 --- a/sys/modules/dtrace/profile/Makefile +++ b/sys/modules/dtrace/profile/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/prototype/Makefile b/sys/modules/dtrace/prototype/Makefile index 476c567a4dc0..189d6c2df2a2 100644 --- a/sys/modules/dtrace/prototype/Makefile +++ b/sys/modules/dtrace/prototype/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/sdt/Makefile b/sys/modules/dtrace/sdt/Makefile index 2f6432e4a71f..a025848e3a60 100644 --- a/sys/modules/dtrace/sdt/Makefile +++ b/sys/modules/dtrace/sdt/Makefile @@ -12,3 +12,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace/Makefile b/sys/modules/dtrace/systrace/Makefile index 3e122f70da25..2250a7418193 100644 --- a/sys/modules/dtrace/systrace/Makefile +++ b/sys/modules/dtrace/systrace/Makefile @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace_freebsd32/Makefile b/sys/modules/dtrace/systrace_freebsd32/Makefile index 4661633f9a62..3b77bc4c6d0e 100644 --- a/sys/modules/dtrace/systrace_freebsd32/Makefile +++ b/sys/modules/dtrace/systrace_freebsd32/Makefile @@ -14,3 +14,4 @@ CFLAGS+= -DFREEBSD32_SYSTRACE .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace_linux/Makefile b/sys/modules/dtrace/systrace_linux/Makefile index 7dbd88ffb5f0..56f422dfb9e5 100644 --- a/sys/modules/dtrace/systrace_linux/Makefile +++ b/sys/modules/dtrace/systrace_linux/Makefile @@ -15,3 +15,4 @@ CFLAGS+= -DLINUX_SYSTRACE .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace_linux32/Makefile b/sys/modules/dtrace/systrace_linux32/Makefile index 81aa1b7de9df..febd4a0c1bab 100644 --- a/sys/modules/dtrace/systrace_linux32/Makefile +++ b/sys/modules/dtrace/systrace_linux32/Makefile @@ -15,3 +15,4 @@ CFLAGS+= -DLINUX32_SYSTRACE .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/opensolaris/Makefile b/sys/modules/opensolaris/Makefile index 1b5dd6dffcfb..536b9637cd3c 100644 --- a/sys/modules/opensolaris/Makefile +++ b/sys/modules/opensolaris/Makefile @@ -34,3 +34,4 @@ IGNORE_PRAGMA= 1 .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 2318b9b155d3..d2617dc6bdc6 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -279,6 +279,7 @@ SRCS+= zfs_zstd.c \ .include +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} CFLAGS.gcc+= -Wno-pointer-to-int-cast From owner-dev-commits-src-all@freebsd.org Sat Jan 2 00:06:32 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D03F84B856D; Sat, 2 Jan 2021 00:06: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D72HX5KnQz4XqG; Sat, 2 Jan 2021 00:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A526733E1; Sat, 2 Jan 2021 00:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10206WhR019626; Sat, 2 Jan 2021 00:06:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10206Wfe019625; Sat, 2 Jan 2021 00:06:32 GMT (envelope-from git) Date: Sat, 2 Jan 2021 00:06:32 GMT Message-Id: <202101020006.10206Wfe019625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: bfe90bb336cc - main - usr.sbin/rtadvctl: Remove support for FreeBSD 9.x. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bfe90bb336ccccded5ce51d72ed01ebfbb447337 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 00:06:32 -0000 The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=bfe90bb336ccccded5ce51d72ed01ebfbb447337 commit bfe90bb336ccccded5ce51d72ed01ebfbb447337 Author: Xin LI AuthorDate: 2021-01-02 00:04:55 +0000 Commit: Xin LI CommitDate: 2021-01-02 00:06:08 +0000 usr.sbin/rtadvctl: Remove support for FreeBSD 9.x. --- usr.sbin/rtadvctl/rtadvctl.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/usr.sbin/rtadvctl/rtadvctl.c b/usr.sbin/rtadvctl/rtadvctl.c index 556f9ac7ebbf..8bbd7afb6dd5 100644 --- a/usr.sbin/rtadvctl/rtadvctl.c +++ b/usr.sbin/rtadvctl/rtadvctl.c @@ -514,19 +514,6 @@ action_show(int argc, char **argv) if ((ifi_s->ifi_flags & IFF_UP) && ((ifi_s->ifi_state == IFI_STATE_CONFIGURED) || (ifi_s->ifi_state == IFI_STATE_TRANSITIVE))) { -#if (__FreeBSD_version < 900000) - /* - * RA_RECV: !ip6.forwarding && ip6.accept_rtadv - * RA_SEND: ip6.forwarding - */ - if (getinet6sysctl(IPV6CTL_FORWARDING) == 0) { - if (getinet6sysctl(IPV6CTL_ACCEPT_RTADV)) - ra_ifstatus = RA_IFSTATUS_RA_RECV; - else - ra_ifstatus = RA_IFSTATUS_INACTIVE; - } else - ra_ifstatus = RA_IFSTATUS_RA_SEND; -#else /* * RA_RECV: ND6_IFF_ACCEPT_RTADV * RA_SEND: ip6.forwarding @@ -537,7 +524,6 @@ action_show(int argc, char **argv) ra_ifstatus = RA_IFSTATUS_RA_SEND; else ra_ifstatus = RA_IFSTATUS_INACTIVE; -#endif } c = 0; From owner-dev-commits-src-all@freebsd.org Sat Jan 2 01:08:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF1B54BAA8B; Sat, 2 Jan 2021 01:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D73ff6R2zz4cZT; Sat, 2 Jan 2021 01:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D00CD4266; Sat, 2 Jan 2021 01:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10218As1097713; Sat, 2 Jan 2021 01:08:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10218A9I097712; Sat, 2 Jan 2021 01:08:10 GMT (envelope-from git) Date: Sat, 2 Jan 2021 01:08:10 GMT Message-Id: <202101020108.10218A9I097712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: 14dff150ef9a - stable/12 - Update leap-seconds to leap-seconds.3676924800. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 14dff150ef9ac64d47810833c309759e4f5d9642 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 01:08:11 -0000 The branch stable/12 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=14dff150ef9ac64d47810833c309759e4f5d9642 commit 14dff150ef9ac64d47810833c309759e4f5d9642 Author: Xin LI AuthorDate: 2020-12-30 06:01:46 +0000 Commit: Xin LI CommitDate: 2021-01-02 01:07:34 +0000 Update leap-seconds to leap-seconds.3676924800. Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800 MFC after: 3 days (cherry picked from commit 2edcc10cb123ea845e00127f3241155dd98dac3b) --- usr.sbin/ntp/ntpd/leap-seconds | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/ntp/ntpd/leap-seconds b/usr.sbin/ntp/ntpd/leap-seconds index ac153daebf86..e897a867e164 100644 --- a/usr.sbin/ntp/ntpd/leap-seconds +++ b/usr.sbin/ntp/ntpd/leap-seconds @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C59 -# File expires on: 28 December 2020 +# Updated through IERS Bulletin C60 +# File expires on: 28 June 2021 # -#@ 3818102400 +#@ 3833827200 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h a1c168ae 27c79a7d 9dddcfc3 bcfe616b 2e2c44ea +#h 064356a8 39268b92 76e4d5ef 3e22fae1 0cca529c From owner-dev-commits-src-all@freebsd.org Sat Jan 2 01:10:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B6504BAE48; Sat, 2 Jan 2021 01:10: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D73jm41zxz4dBV; Sat, 2 Jan 2021 01:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D43E47C6; Sat, 2 Jan 2021 01:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1021AqOI008052; Sat, 2 Jan 2021 01:10:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1021AqVO008051; Sat, 2 Jan 2021 01:10:52 GMT (envelope-from git) Date: Sat, 2 Jan 2021 01:10:52 GMT Message-Id: <202101020110.1021AqVO008051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: 72492c6d5385 - stable/11 - Update leap-seconds to leap-seconds.3676924800. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 72492c6d5385acba86425bf7244c3563426e2ac7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 01:10:52 -0000 The branch stable/11 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=72492c6d5385acba86425bf7244c3563426e2ac7 commit 72492c6d5385acba86425bf7244c3563426e2ac7 Author: Xin LI AuthorDate: 2020-12-30 06:01:46 +0000 Commit: Xin LI CommitDate: 2021-01-02 01:10:35 +0000 Update leap-seconds to leap-seconds.3676924800. Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800 MFC after: 3 days (cherry picked from commit 2edcc10cb123ea845e00127f3241155dd98dac3b) --- etc/ntp/leap-seconds | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/ntp/leap-seconds b/etc/ntp/leap-seconds index ac153daebf86..e897a867e164 100644 --- a/etc/ntp/leap-seconds +++ b/etc/ntp/leap-seconds @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C59 -# File expires on: 28 December 2020 +# Updated through IERS Bulletin C60 +# File expires on: 28 June 2021 # -#@ 3818102400 +#@ 3833827200 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h a1c168ae 27c79a7d 9dddcfc3 bcfe616b 2e2c44ea +#h 064356a8 39268b92 76e4d5ef 3e22fae1 0cca529c From owner-dev-commits-src-all@freebsd.org Sat Jan 2 01:10:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 524224BAF74; Sat, 2 Jan 2021 01:10:57 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D73jr22kJz4d5m; Sat, 2 Jan 2021 01:10:56 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f181.google.com with SMTP id b9so15023140qtr.2; Fri, 01 Jan 2021 17:10:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ndi9m3kUX/fx4gDnh7Q4VSnDdGPG6d7qRI0WPtWm0P4=; b=IGrv4Kiyx3F/V+abaKxgW1GeGJGhmI1rTbzTAepyr7zqZV8DXV7WADeK6Q6tmZYqiY zYVeN/HNngAgvSSqDbmicVHBnvjpuB9x5XwM4NJ6jMP189v8Q43/0T0L+OdtjrSzBpXU 4C01Ecs02jt3o4+mFPXfxXqEVy8WoaZvPl5aMfJqIguAl6rd0UTWhY4HFf6/nIEe2Mqd aeh9nWtKFD/V1CpqZPge+FTLwCFYNPT/Dv9hfLdJVw3BQXE3rmEbvcjqDmaSD2GS8LlN VdPjCMlRPQHu7gBJAEIjjxTrJsi/Zd4xq+rRRBQLB89w4QlOhwRRx+hKt/V0BMwjFsg9 8qVA== X-Gm-Message-State: AOAM530Ltn1abc89tZQVbWEcf/KsEp8tYAY/OdwgD+mSIC2++XUXq3GC FXas+BNWMQQRXpah4Z54Sy77atZ7B2o= X-Google-Smtp-Source: ABdhPJwh2gCqLMuXI9NfvN+Ur7o+JcpHNlmAP2F4DyhXOAd7jQP6ewTJikK5FwtDPnFBLOVCSns57g== X-Received: by 2002:ac8:59c3:: with SMTP id f3mr62493386qtf.214.1609549854996; Fri, 01 Jan 2021 17:10:54 -0800 (PST) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com. [209.85.222.173]) by smtp.gmail.com with ESMTPSA id e10sm32106655qtr.92.2021.01.01.17.10.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Jan 2021 17:10:54 -0800 (PST) Received: by mail-qk1-f173.google.com with SMTP id h4so19138413qkk.4; Fri, 01 Jan 2021 17:10:54 -0800 (PST) X-Received: by 2002:a37:6189:: with SMTP id v131mr61369478qkb.337.1609549854414; Fri, 01 Jan 2021 17:10:54 -0800 (PST) MIME-Version: 1.0 References: <202012272303.0BRN3egB008714@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Fri, 1 Jan 2021 17:10:43 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: d021434a7960 - main - openzfs: fix gcc kernel module builds To: Ravi Pokala Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D73jr22kJz4d5m X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 01:10:59 -0000 On Fri, Jan 1, 2021 at 3:42 PM Ravi Pokala wrote: > > -----Original Message----- > From: on behalf of Ryan Libby > Date: 2020-12-27, Sunday at 15:03 > To: , , > Subject: git: d021434a7960 - main - openzfs: fix gcc kernel module builds > > The branch main has been updated by rlibby: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d021434a796008efbb93616f5297ed2f55a1a230 > > commit d021434a796008efbb93616f5297ed2f55a1a230 > Author: Ryan Libby > AuthorDate: 2020-12-27 22:33:13 +0000 > Commit: Ryan Libby > CommitDate: 2020-12-27 22:33:13 +0000 > > openzfs: fix gcc kernel module builds > > Hi Ryan, > > This is listed as "openzfs", but the vast majority of it is in dtrace...? > > -Ravi (rpokala@) Yes... This is solving a problem that comes from the openzfs headers (sys/contrib/openzfs/include) as seen by code that uses OPENZFS_CFLAGS, note especially -I${ZINCDIR}/os/freebsd/spl . The problem was introduced in the recent openzfs merge (r364746 / 9e5787d2284e), which similarly touched all these dtrace makefiles. Ryan > > - Suppress -Wredundant-decls. Ultimately this warning is harmless in > any case, and it does not look like there is a simple way to avoid > redundant declarations in this case without a lot of header pollution > (e.g. having openzfs's shim param.h pulling in sys/kernel.h for hz). > - Suppress -Wnested-externs, which is useless anyway. > > Unfortunately it was not sufficient just to modify OPENZFS_CFLAGS, > because the warning suppressions need to appear on the command line > after they are explicitly enabled by CWARNFLAGS from sys/conf/kern.mk, > but OPENZFS_CFLAGS get added before due to use of -I for the shims. > > Reviewed by: markj > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D27685 > --- > sys/conf/kmod.mk | 4 +++- > sys/modules/dtrace/dtaudit/Makefile | 1 + > sys/modules/dtrace/dtmalloc/Makefile | 1 + > sys/modules/dtrace/dtnfscl/Makefile | 1 + > sys/modules/dtrace/dtrace/Makefile | 1 + > sys/modules/dtrace/fasttrap/Makefile | 1 + > sys/modules/dtrace/fbt/Makefile | 1 + > sys/modules/dtrace/profile/Makefile | 1 + > sys/modules/dtrace/prototype/Makefile | 1 + > sys/modules/dtrace/sdt/Makefile | 1 + > sys/modules/dtrace/systrace/Makefile | 1 + > sys/modules/dtrace/systrace_freebsd32/Makefile | 1 + > sys/modules/dtrace/systrace_linux/Makefile | 1 + > sys/modules/dtrace/systrace_linux32/Makefile | 1 + > sys/modules/opensolaris/Makefile | 1 + > sys/modules/zfs/Makefile | 1 + > 16 files changed, 18 insertions(+), 1 deletion(-) > > diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk > index 54ecbdf69c88..dcc00829b831 100644 > --- a/sys/conf/kmod.mk > +++ b/sys/conf/kmod.mk > @@ -540,7 +540,9 @@ OPENZFS_CFLAGS= \ > -I${SYSDIR}/cddl/compat/opensolaris \ > -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ > -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h > - > +OPENZFS_CWARNFLAGS= \ > + -Wno-nested-externs \ > + -Wno-redundant-decls > > .include > .include > diff --git a/sys/modules/dtrace/dtaudit/Makefile b/sys/modules/dtrace/dtaudit/Makefile > index 72cdf03f4bc3..3571bcbb7ea2 100644 > --- a/sys/modules/dtrace/dtaudit/Makefile > +++ b/sys/modules/dtrace/dtaudit/Makefile > @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/dtrace/dtmalloc/Makefile b/sys/modules/dtrace/dtmalloc/Makefile > index 910f8f360e80..ffde4f811ee8 100644 > --- a/sys/modules/dtrace/dtmalloc/Makefile > +++ b/sys/modules/dtrace/dtmalloc/Makefile > @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/dtrace/dtnfscl/Makefile b/sys/modules/dtrace/dtnfscl/Makefile > index 6184ad183fc6..d28641e51ec8 100644 > --- a/sys/modules/dtrace/dtnfscl/Makefile > +++ b/sys/modules/dtrace/dtnfscl/Makefile > @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile > index 0bedcaa12fe7..80278fc83a32 100644 > --- a/sys/modules/dtrace/dtrace/Makefile > +++ b/sys/modules/dtrace/dtrace/Makefile > @@ -59,6 +59,7 @@ dtrace_asm.o: assym.inc > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > CFLAGS.dtrace_asm.S+= -D_SYS_ERRNO_H_ -D_SYS_PARAM_H_ -DLOCORE > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > CWARNFLAGS+= -Wno-parentheses > CWARNFLAGS+= -Wno-uninitialized > CWARNFLAGS+= -Wno-cast-qual > diff --git a/sys/modules/dtrace/fasttrap/Makefile b/sys/modules/dtrace/fasttrap/Makefile > index 1be1b97736ea..0eecfcb11aab 100644 > --- a/sys/modules/dtrace/fasttrap/Makefile > +++ b/sys/modules/dtrace/fasttrap/Makefile > @@ -26,5 +26,6 @@ SRCS+= u8_textprep.c > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > CWARNFLAGS+= -Wno-cast-qual > CWARNFLAGS+= -Wno-unused > diff --git a/sys/modules/dtrace/fbt/Makefile b/sys/modules/dtrace/fbt/Makefile > index 288c8cafa817..360d92000776 100644 > --- a/sys/modules/dtrace/fbt/Makefile > +++ b/sys/modules/dtrace/fbt/Makefile > @@ -23,3 +23,4 @@ CFLAGS+= -I${SYSDIR}/cddl/dev/fbt > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/dtrace/profile/Makefile b/sys/modules/dtrace/profile/Makefile > index aa36f9a2dfba..b3eec9a19f23 100644 > --- a/sys/modules/dtrace/profile/Makefile > +++ b/sys/modules/dtrace/profile/Makefile > @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/dtrace/prototype/Makefile b/sys/modules/dtrace/prototype/Makefile > index 476c567a4dc0..189d6c2df2a2 100644 > --- a/sys/modules/dtrace/prototype/Makefile > +++ b/sys/modules/dtrace/prototype/Makefile > @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/dtrace/sdt/Makefile b/sys/modules/dtrace/sdt/Makefile > index 2f6432e4a71f..a025848e3a60 100644 > --- a/sys/modules/dtrace/sdt/Makefile > +++ b/sys/modules/dtrace/sdt/Makefile > @@ -12,3 +12,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} > > .include > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/dtrace/systrace/Makefile b/sys/modules/dtrace/systrace/Makefile > index 3e122f70da25..2250a7418193 100644 > --- a/sys/modules/dtrace/systrace/Makefile > +++ b/sys/modules/dtrace/systrace/Makefile > @@ -13,3 +13,4 @@ CFLAGS+= ${OPENZFS_CFLAGS} > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/dtrace/systrace_freebsd32/Makefile b/sys/modules/dtrace/systrace_freebsd32/Makefile > index 4661633f9a62..3b77bc4c6d0e 100644 > --- a/sys/modules/dtrace/systrace_freebsd32/Makefile > +++ b/sys/modules/dtrace/systrace_freebsd32/Makefile > @@ -14,3 +14,4 @@ CFLAGS+= -DFREEBSD32_SYSTRACE > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/dtrace/systrace_linux/Makefile b/sys/modules/dtrace/systrace_linux/Makefile > index 7dbd88ffb5f0..56f422dfb9e5 100644 > --- a/sys/modules/dtrace/systrace_linux/Makefile > +++ b/sys/modules/dtrace/systrace_linux/Makefile > @@ -15,3 +15,4 @@ CFLAGS+= -DLINUX_SYSTRACE > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/dtrace/systrace_linux32/Makefile b/sys/modules/dtrace/systrace_linux32/Makefile > index 81aa1b7de9df..febd4a0c1bab 100644 > --- a/sys/modules/dtrace/systrace_linux32/Makefile > +++ b/sys/modules/dtrace/systrace_linux32/Makefile > @@ -15,3 +15,4 @@ CFLAGS+= -DLINUX32_SYSTRACE > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/opensolaris/Makefile b/sys/modules/opensolaris/Makefile > index 1b5dd6dffcfb..536b9637cd3c 100644 > --- a/sys/modules/opensolaris/Makefile > +++ b/sys/modules/opensolaris/Makefile > @@ -34,3 +34,4 @@ IGNORE_PRAGMA= 1 > .include > > CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile > index 2318b9b155d3..d2617dc6bdc6 100644 > --- a/sys/modules/zfs/Makefile > +++ b/sys/modules/zfs/Makefile > @@ -279,6 +279,7 @@ SRCS+= zfs_zstd.c \ > > .include > > +CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} > > CFLAGS.gcc+= -Wno-pointer-to-int-cast > > > From owner-dev-commits-src-all@freebsd.org Sat Jan 2 01:51:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E1A74BD476; Sat, 2 Jan 2021 01:51: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D74cj1r15z4gdd; Sat, 2 Jan 2021 01:51:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31FBB4FCE; Sat, 2 Jan 2021 01:51:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1021pXNv060503; Sat, 2 Jan 2021 01:51:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1021pXOY060502; Sat, 2 Jan 2021 01:51:33 GMT (envelope-from git) Date: Sat, 2 Jan 2021 01:51:33 GMT Message-Id: <202101020151.1021pXOY060502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: 0cdfa4956424 - main - unzip: Sync with NetBSD upstream. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0cdfa4956424dc816944a84568a4d9900b68f5e3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 01:51:33 -0000 The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=0cdfa4956424dc816944a84568a4d9900b68f5e3 commit 0cdfa4956424dc816944a84568a4d9900b68f5e3 Author: Yoshihiro Takahashi AuthorDate: 2021-01-02 01:50:08 +0000 Commit: Yoshihiro Takahashi CommitDate: 2021-01-02 01:50:08 +0000 unzip: Sync with NetBSD upstream. - Ignore malformed directory entries as created by Dropbox ("/"). (rev 1.24) - Use libarchive 3.x interface: check result for archive_read_free() and don't call archive_read_close manually. (rev 1.23) - Always overwrite symlinks on extraction, ever if they're newer than entries in archive. - Use getline() rather than getdelim(). PR: 231827 Submitted by: ak Reviewed by: mm Obtained from: NetBSD MFC after: 2 weeks --- usr.bin/unzip/unzip.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index c9e53f27ed74..937176111a02 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -385,6 +385,13 @@ extract_dir(struct archive *a, struct archive_entry *e, const char *path) { int mode; + /* + * Dropbox likes to create '/' directory entries, just ignore + * such junk. + */ + if (*path == '\0') + return; + mode = archive_entry_mode(e) & 0777; if (mode == 0) mode = 0755; @@ -451,7 +458,7 @@ handle_existing_file(char **path) free(*path); *path = NULL; alen = 0; - len = getdelim(path, &alen, '\n', stdin); + len = getline(path, &alen, stdin); if ((*path)[len - 1] == '\n') (*path)[len - 1] = '\0'; return 0; @@ -601,7 +608,7 @@ recheck: if (lstat(*path, &sb) == 0) { if (u_opt || f_opt) { /* check if up-to-date */ - if ((S_ISREG(sb.st_mode) || S_ISLNK(sb.st_mode)) && + if (S_ISREG(sb.st_mode) && (sb.st_mtim.tv_sec > mtime.tv_sec || (sb.st_mtim.tv_sec == mtime.tv_sec && sb.st_mtim.tv_nsec >= mtime.tv_nsec))) @@ -916,8 +923,7 @@ unzip(const char *fn) } } - ac(archive_read_close(a)); - (void)archive_read_free(a); + ac(archive_read_free(a)); if (t_opt) { if (error_count > 0) { From owner-dev-commits-src-all@freebsd.org Sat Jan 2 02:44:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D2EE4BF345; Sat, 2 Jan 2021 02:44: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D75nl0pXxz4kPD; Sat, 2 Jan 2021 02:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E8875955; Sat, 2 Jan 2021 02:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1022iQEk026343; Sat, 2 Jan 2021 02:44:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1022iQqO026342; Sat, 2 Jan 2021 02:44:26 GMT (envelope-from git) Date: Sat, 2 Jan 2021 02:44:26 GMT Message-Id: <202101020244.1022iQqO026342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 4e0c81c5fafb - main - tcgetwinsize(3): provide man page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e0c81c5fafb5b72cabc342f640aff6cac445853 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 02:44:27 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4e0c81c5fafb5b72cabc342f640aff6cac445853 commit 4e0c81c5fafb5b72cabc342f640aff6cac445853 Author: Konstantin Belousov AuthorDate: 2021-01-01 22:28:42 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-02 02:43:32 +0000 tcgetwinsize(3): provide man page The current POSIX.1-202x draft (1.1) was used as source material. Submitted by: Soumendra Ganguly MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27787 --- lib/libc/gen/Makefile.inc | 2 + lib/libc/gen/tcgetwinsize.3 | 164 ++++++++++++++++++++++++++++++++++++++++++++ share/man/man4/termios.4 | 1 + 3 files changed, 167 insertions(+) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 76a21975f1ac..0ab717600e56 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -302,6 +302,7 @@ MAN+= alarm.3 \ syslog.3 \ tcgetpgrp.3 \ tcgetsid.3 \ + tcgetwinsize.3 \ tcsendbreak.3 \ tcsetattr.3 \ tcsetpgrp.3 \ @@ -517,6 +518,7 @@ MLINKS+=syslog.3 closelog.3 \ syslog.3 openlog.3 \ syslog.3 setlogmask.3 \ syslog.3 vsyslog.3 +MLINKS+=tcgetwinsize.3 tcsetwinsize.3 MLINKS+=tcsendbreak.3 tcdrain.3 \ tcsendbreak.3 tcflow.3 \ tcsendbreak.3 tcflush.3 diff --git a/lib/libc/gen/tcgetwinsize.3 b/lib/libc/gen/tcgetwinsize.3 new file mode 100644 index 000000000000..1bc96689c792 --- /dev/null +++ b/lib/libc/gen/tcgetwinsize.3 @@ -0,0 +1,164 @@ +.\"- +.\" Copyright (c) 2020 Soumendra Ganguly +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``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 HOLDER(S) 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. +.\" +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from P1003.1-202x, Draft 1.1, Draft Standard for Information Technology -- +.\" Portable Operating System Interface (POSIX), The Open Group Base +.\" Specifications Issue 8, Copyright (C) 2020 by the Institute of +.\" Electrical and Electronics Engineers, Inc and The Open Group. In the +.\" event of any discrepancy between this version and the original IEEE and +.\" The Open Group Standard, the original IEEE and The Open Group Standard is +.\" the referee document. The original Standard can be obtained online at +.\" http://www.opengroup.org/unix/online.html. +.\" +.\" $FreeBSD$ +.\" +.Dd December 28, 2020 +.Dt TCGETWINSIZE 3 +.Os +.Sh NAME +.Nm tcgetwinsize , +.Nm tcsetwinsize +.Nd get, set the size of a terminal window +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In termios.h +.Bd -literal +struct winsize { + unsigned short ws_row; /* number of rows, in characters */ + unsigned short ws_col; /* number of columns, in characters */ + unsigned short ws_xpixel; /* horizontal size, in pixels */ + unsigned short ws_ypixel; /* vertical size, in pixels */ +}; +.Ed +.Pp +.Ft int +.Fn tcgetwinsize "int fd" "struct winsize *w" +.Ft int +.Fn tcsetwinsize "int fd" "const struct winsize *w" +.Sh DESCRIPTION +The +.Fn tcgetwinsize +function gets the terminal window size of the terminal of which +.Fa fd +is an open file descriptor and stores it in the +.Vt winsize +structure of which +.Fa w +is a pointer. +.Pp +The +.Fn tcsetwinsize +function sets the terminal window size of the terminal of which +.Fa fd +is an open file descriptor from the +.Vt winsize +structure referenced by +.Fa w . +The change occurs immediately. +If the terminal window size of the terminal +is changed successfully to have a value that is different from the value that +it had before the +.Fn tcsetwinsize +call, then the +.Dv SIGWINCH +signal is sent to all those members of the foreground process group of the +terminal that have the terminal as their controlling terminal. +.Pp +The above declaration of +.Vt "struct winsize" +may not be literal. +It is provided only to list the accessible members. +Therefore, before calling +.Fn tcsetwinsize , +the members of the +.Vt winsize +structure must be initialized by calling +.Fn tcgetwinsize . +The information in a +.Vt winsize +structure is stored by the kernel in order to provide a consistent interface, +but it is not used by the kernel. +.Sh RETURN VALUE +.Rv -std tcgetwinsize tcsetwinsize +The terminal window size remains unchanged if +.Fn tcsetwinsize +fails. +.Pp +.Sh ERRORS +The following are the possible failure conditions: +.Bl -tag -width Er +.It Bq Er EBADF +The +.Fa fd +argument to +.Fn tcgetwinsize +or to +.Fn tcsetwinsize +is not a valid file descriptor. +.It Bq Er ENOTTY +The +.Fa fd +argument to +.Fn tcgetwinsize +or to +.Fn tcsetwinsize +is not associated with a character special device. +.It Bq Er EINVAL +The +.Fa w +argument to +.Fn tcsetwinsize +is not valid. +.It Bq Er EFAULT +The +.Fa w +argument to +.Fn tcgetwinsize +or to +.Fn tcsetwinsize +points outside the process's allocated address space. +.El +.Sh SEE ALSO +.Xr stty 1 , +.Xr ioctl 2 , +.Xr sigaction 2 , +.Xr termios 4 , +.Xr tty 4 +.Sh STANDARDS +The +.Fn tcgetwinsize +and +.Fn tcsetwinsize +functions are expected to conform to +.St -p1003.1 +Base Specifications, Issue 8. +The +.Fa ws_xpixel +and +.Fa ws_ypixel +members of +.Vt "struct winsize" +are FreeBSD extensions. diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4 index c611354aa5d1..555e944367e0 100644 --- a/share/man/man4/termios.4 +++ b/share/man/man4/termios.4 @@ -1590,6 +1590,7 @@ the values in the header .Sh SEE ALSO .Xr stty 1 , .Xr tcgetsid 3 , +.Xr tcgetwinsize 3, .Xr tcsendbreak 3 , .Xr tcsetattr 3 , .Xr tcsetsid 3 , From owner-dev-commits-src-all@freebsd.org Sat Jan 2 02:44:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3301B4BF1B8; Sat, 2 Jan 2021 02:44: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D75nl112nz4kZ5; Sat, 2 Jan 2021 02:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 158515956; Sat, 2 Jan 2021 02:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1022iRhF026360; Sat, 2 Jan 2021 02:44:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1022iRUi026359; Sat, 2 Jan 2021 02:44:27 GMT (envelope-from git) Date: Sat, 2 Jan 2021 02:44:27 GMT Message-Id: <202101020244.1022iRUi026359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 741d78126b55 - main - rtld: call close(2) after errno is saved MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 741d78126b5584e860811c78f87f51597e375592 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 02:44:27 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=741d78126b5584e860811c78f87f51597e375592 commit 741d78126b5584e860811c78f87f51597e375592 Author: Konstantin Belousov AuthorDate: 2021-01-01 22:24:46 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-02 02:43:32 +0000 rtld: call close(2) after errno is saved to prevent obliteration of error value from the original syscall. Also improve error message for short read. Submitted by: Konrad Sewiłło-Jopek MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27864 --- libexec/rtld-elf/libmap.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/libexec/rtld-elf/libmap.c b/libexec/rtld-elf/libmap.c index 8057a0ccf43d..499d2cd2a1d9 100644 --- a/libexec/rtld-elf/libmap.c +++ b/libexec/rtld-elf/libmap.c @@ -103,7 +103,7 @@ lmc_parse_file(const char *path) char *lm_map; struct stat st; ssize_t retval; - int fd; + int fd, saved_errno; TAILQ_FOREACH(p, &lmc_head, next) { if (strcmp(p->path, path) == 0) @@ -117,9 +117,9 @@ lmc_parse_file(const char *path) return; } if (fstat(fd, &st) == -1) { - close(fd); dbg("lm_parse_file: fstat(\"%s\") failed, %s", path, rtld_strerror(errno)); + close(fd); return; } @@ -132,14 +132,19 @@ lmc_parse_file(const char *path) lm_map = xmalloc(st.st_size); retval = read(fd, lm_map, st.st_size); + saved_errno = errno; + close(fd); if (retval != st.st_size) { - close(fd); + if (retval == -1) { + dbg("lm_parse_file: read(\"%s\") failed, %s", path, + rtld_strerror(saved_errno)); + } else { + dbg("lm_parse_file: short read(\"%s\"), %zd vs %jd", + path, retval, (uintmax_t)st.st_size); + } free(lm_map); - dbg("lm_parse_file: read(\"%s\") failed, %s", path, - rtld_strerror(errno)); return; } - close(fd); p = xmalloc(sizeof(struct lmc)); p->path = xstrdup(path); p->dev = st.st_dev; From owner-dev-commits-src-all@freebsd.org Sat Jan 2 03:07:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B08E84BFFA8; Sat, 2 Jan 2021 03:07:09 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D76Hx4VQ1z4lpc; Sat, 2 Jan 2021 03:07:09 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f173.google.com with SMTP id q25so25930773oij.10; Fri, 01 Jan 2021 19:07:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=EbqF2ez9x14BYqyy3HvmwyGKgelU8bHsx0ErBEcPWA0=; b=A4OT4tvWQFW2jfDdeLqPhCP1z2LdhXBbV62CY3h47XvqntJMmsCE13xqrXmD8LNuGV V31EalnipXb5FI+houdoBAWh7CxvK88xgpUL0o1FQMquD7OOpsrZAu7pxtGl2NEW+pBC xhBvsKUa6NWWNB3E6yG6lsujxvpXZie+42uuWyuhaVSD5jjXRWu+t3n0vqrBfIDwlsNW QY03W4garslalkLuLFcdBpVCnuN1jpt+UBvhTvU8gIwTly61UuGRIrIe0TXwQvKlwPs8 9UDyjkieONaHEviHInuLlRs4q8bLrtBpEx5NBMasiXFHtllMdpf+eeaPTnyCx2fO/mWm zoOA== X-Gm-Message-State: AOAM531vyV09+FTKgPgPdHI2VXVOYu5yPYEOUVxi/A450vyvFaB+mQUD HBqv71rItW0ql7NC8s1/pAZcDwHOZGE= X-Google-Smtp-Source: ABdhPJyTkp7ngIkCwfswK6454of9jJTrA3acKfOqqNlTkgK39zhP7Ex3z3SGWeBzdx1ecJUkreQF1Q== X-Received: by 2002:a05:6808:563:: with SMTP id j3mr12783466oig.48.1609556828268; Fri, 01 Jan 2021 19:07:08 -0800 (PST) Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com. [209.85.167.172]) by smtp.gmail.com with ESMTPSA id l6sm12129862otf.34.2021.01.01.19.07.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Jan 2021 19:07:08 -0800 (PST) Received: by mail-oi1-f172.google.com with SMTP id l207so25937031oib.4; Fri, 01 Jan 2021 19:07:07 -0800 (PST) X-Received: by 2002:aca:e007:: with SMTP id x7mr11911540oig.8.1609556827688; Fri, 01 Jan 2021 19:07:07 -0800 (PST) MIME-Version: 1.0 References: <202101011720.101HK10L090087@gitrepo.freebsd.org> In-Reply-To: <202101011720.101HK10L090087@gitrepo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Fri, 1 Jan 2021 19:06:56 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: ae39db74066a - main - fusefs: fix an expectation in one of the tests To: Alan Somers Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D76Hx4VQ1z4lpc X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 03:07:09 -0000 On Fri, Jan 1, 2021 at 9:20 AM Alan Somers wrote: > > The branch main has been updated by asomers: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ae39db74066a0ff1682c1c841be030099d9d4557 > > commit ae39db74066a0ff1682c1c841be030099d9d4557 > Author: Alan Somers > AuthorDate: 2020-12-29 17:48:34 +0000 > Commit: Alan Somers > CommitDate: 2021-01-01 17:18:22 +0000 > > fusefs: fix an expectation in one of the tests > > An order-of-operations problem caused an expectation intended for > FUSE_READ to instead match FUSE_ACCESS. Surprisingly, only one test > case was affected. > > MFC after: 2 weeks > Reviewed by: cem > Differential Revision: https://reviews.freebsd.org/D27818 I did not review any of the changes in this commit. Conrad From owner-dev-commits-src-all@freebsd.org Sat Jan 2 03:14:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9A764C0414; Sat, 2 Jan 2021 03:14:02 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D76Rt4Dd2z4mhv; Sat, 2 Jan 2021 03:14:02 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f52.google.com with SMTP id w3so21192001otp.13; Fri, 01 Jan 2021 19:14:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UviXSvSBvbRdYCLX6egHfKASGSxOGUNoQgM052fp4v8=; b=a7+zKAtvsLv2pfIjG72m9cgZkT9EOZd1p18GvEHpV3OdvQCtfuiKss6/SqnBmXTJ13 Cp3HbwaLmiErnXHZlu4sFg38h6BoKBKUK6u7XMkrdviatmC0ZhIu9I4mmv4kLy8ofY4V 5S8axQ9VVcmXQn9o/s6D7j7qML+Zm+mgACdgHGBOZ/WV2mfyaknMa5Rn8m9Ej+6Jlv8w vjCDItQKserFF4SomUuaccrpxfMhSVI5T+kR/l5fY57K4/4ZTdxoCDT4H3+Pz989nU6Q n10OVFcD139qTWyIdIXm+GztDo2GBxaBwSu9XcQBntoGWVfyWqg9EsfLVDjm1wLhB1eb ghHg== X-Gm-Message-State: AOAM533fl+M44oKUOnW6LdbuisM4W2vh2JjyYBgpr7byKHfedIlEIJvs Wm6p1oYq74ONR9q3B8luvv12M7qrIoNBn9rKUvGvjX8nypw= X-Google-Smtp-Source: ABdhPJxwCThWojqwRTrLsN/46PajqLn6wlz7IocdqqjmCpSOEFOl0LLg7Djt2aHZFntHB9pQ1Op/gPaVdlCm66Era7g= X-Received: by 2002:a9d:a61:: with SMTP id 88mr44470350otg.18.1609557241011; Fri, 01 Jan 2021 19:14:01 -0800 (PST) MIME-Version: 1.0 References: <202101011720.101HK10L090087@gitrepo.freebsd.org> In-Reply-To: From: Alan Somers Date: Fri, 1 Jan 2021 20:13:50 -0700 Message-ID: Subject: Re: git: ae39db74066a - main - fusefs: fix an expectation in one of the tests To: "Conrad E. Meyer" Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4D76Rt4Dd2z4mhv X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 03:14:02 -0000 On Fri, Jan 1, 2021 at 8:07 PM Conrad Meyer wrote: > On Fri, Jan 1, 2021 at 9:20 AM Alan Somers wrote: > > > > The branch main has been updated by asomers: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=ae39db74066a0ff1682c1c841be030099d9d4557 > > > > commit ae39db74066a0ff1682c1c841be030099d9d4557 > > Author: Alan Somers > > AuthorDate: 2020-12-29 17:48:34 +0000 > > Commit: Alan Somers > > CommitDate: 2021-01-01 17:18:22 +0000 > > > > fusefs: fix an expectation in one of the tests > > > > An order-of-operations problem caused an expectation intended for > > FUSE_READ to instead match FUSE_ACCESS. Surprisingly, only one test > > case was affected. > > > > MFC after: 2 weeks > > Reviewed by: cem > > Differential Revision: https://reviews.freebsd.org/D27818 > > I did not review any of the changes in this commit. > > Conrad > They're in there. But they're in a separate commit from the one that made up the bulk of the review. Now that we're using git, I think Phabricator has some kind of commit filter, independent of the history filter. I haven't quite figured it out myself. -Alan From owner-dev-commits-src-all@freebsd.org Sat Jan 2 03:37:24 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D53264C0CC0; Sat, 2 Jan 2021 03:37: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D76yr3r6Hz4qWv; Sat, 2 Jan 2021 03:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 551B266B9; Sat, 2 Jan 2021 03:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1023bOLX092579; Sat, 2 Jan 2021 03:37:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1023bO0L092578; Sat, 2 Jan 2021 03:37:24 GMT (envelope-from git) Date: Sat, 2 Jan 2021 03:37:24 GMT Message-Id: <202101020337.1023bO0L092578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: e03764d931d8 - main - bootparamd: Fix several warnings and increase warn level to 6. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e03764d931d820185a019334259b18df2e3f6b6c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 03:37:25 -0000 The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=e03764d931d820185a019334259b18df2e3f6b6c commit e03764d931d820185a019334259b18df2e3f6b6c Author: Yoshihiro Takahashi AuthorDate: 2021-01-02 03:36:09 +0000 Commit: Yoshihiro Takahashi CommitDate: 2021-01-02 03:36:09 +0000 bootparamd: Fix several warnings and increase warn level to 6. - Increase WARNS to 6. - Except -Wcast-align and -Wincompatible-pointer-types-discards-qualifiers checks. - Use ANSI C prototype. - Statically variables and functions. - Add extern declaration for global variables. - Rename local variables to resolve shadow warnings. PR: 71667 MFC after: 2 weeks --- usr.sbin/bootparamd/Makefile.inc | 4 +- usr.sbin/bootparamd/bootparamd/bootparamd.c | 83 +++++++++++++---------------- usr.sbin/bootparamd/bootparamd/main.c | 15 +++--- usr.sbin/bootparamd/callbootd/callbootd.c | 26 ++++----- 4 files changed, 59 insertions(+), 69 deletions(-) diff --git a/usr.sbin/bootparamd/Makefile.inc b/usr.sbin/bootparamd/Makefile.inc index 5c01215dd550..de7ed1c2f55c 100644 --- a/usr.sbin/bootparamd/Makefile.inc +++ b/usr.sbin/bootparamd/Makefile.inc @@ -3,4 +3,6 @@ BINDIR?= /usr/sbin -WARNS?= 2 +NO_WCAST_ALIGN= +CWARNFLAGS.clang+= -Wno-incompatible-pointer-types-discards-qualifiers +CWARNFLAGS.gcc+= -Wno-error=discarded-qualifiers diff --git a/usr.sbin/bootparamd/bootparamd/bootparamd.c b/usr.sbin/bootparamd/bootparamd/bootparamd.c index 9c45cf8d0f38..7cc57d2427a4 100644 --- a/usr.sbin/bootparamd/bootparamd/bootparamd.c +++ b/usr.sbin/bootparamd/bootparamd/bootparamd.c @@ -7,10 +7,8 @@ use and modify. Please send modifications and/or suggestions + bug fixes to */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); #ifdef YP #include @@ -27,26 +25,25 @@ static const char rcsid[] = #include #include #include + extern int debug, dolog; extern in_addr_t route_addr; -extern char *bootpfile; +extern const char *bootpfile; #define MAXLEN 800 -struct hostent *he; +static struct hostent *he; static char buffer[MAXLEN]; static char hostname[MAX_MACHINE_NAME]; static char askname[MAX_MACHINE_NAME]; static char path[MAX_PATH_LEN]; static char domain_name[MAX_MACHINE_NAME]; -int getthefile(char *, char *, char *, int); -int checkhost(char *, char *, int); +static int getthefile(char *, char *, char *, int); +static int checkhost(char *, char *, int); bp_whoami_res * -bootparamproc_whoami_1_svc(whoami, req) -bp_whoami_arg *whoami; -struct svc_req *req; +bootparamproc_whoami_1_svc(bp_whoami_arg *whoami, struct svc_req *req __unused) { in_addr_t haddr; static bp_whoami_res res; @@ -110,9 +107,7 @@ struct svc_req *req; bp_getfile_res * - bootparamproc_getfile_1_svc(getfile, req) -bp_getfile_arg *getfile; -struct svc_req *req; +bootparamproc_getfile_1_svc(bp_getfile_arg *getfile, struct svc_req *req __unused) { char *where; static bp_getfile_res res; @@ -177,17 +172,14 @@ struct svc_req *req; return(NULL); } -/* getthefile return 1 and fills the buffer with the information +/* getthefile return 1 and fills the buf with the information of the file, e g "host:/export/root/client" if it can be found. - If the host is in the database, but the file is not, the buffer + If the host is in the database, but the file is not, the buf will be empty. (This makes it possible to give the special empty answer for the file "dump") */ -int -getthefile(askname,fileid,buffer,blen) -char *askname; -char *fileid, *buffer; -int blen; +static int +getthefile(char *l_askname, char *fileid, char *buf, int blen) { FILE *bpf; char *where; @@ -211,11 +203,11 @@ int blen; /* XXX see comment below */ while ( fscanf(bpf, "%255s", hostname) > 0 && !match ) { if ( *hostname != '#' ) { /* comment */ - if ( ! strcmp(hostname, askname) ) { + if ( ! strcmp(hostname, l_askname) ) { match = 1; } else { he = gethostbyname(hostname); - if (he && !strcmp(he->h_name, askname)) match = 1; + if (he && !strcmp(he->h_name, l_askname)) match = 1; } } if (*hostname == '+' ) { /* NIS */ @@ -224,16 +216,16 @@ int blen; if (debug) warn("NIS"); return(0); } - if (yp_match(yp_domain, "bootparams", askname, strlen(askname), + if (yp_match(yp_domain, "bootparams", l_askname, strlen(l_askname), &result, &resultlen)) return (0); if (strstr(result, fileid) == NULL) { - buffer[0] = '\0'; + buf[0] = '\0'; } else { - snprintf(buffer, blen, + snprintf(buf, blen, "%s",strchr(strstr(result,fileid), '=') + 1); - if (strchr(buffer, ' ') != NULL) - *(char *)(strchr(buffer, ' ')) = '\0'; + if (strchr(buf, ' ') != NULL) + *(char *)(strchr(buf, ' ')) = '\0'; } if (fclose(bpf)) warnx("could not close %s", bootpfile); @@ -265,7 +257,7 @@ int blen; if (! strncmp(info, fileid, fid_len) && *(info + fid_len) == '=') { where = info + fid_len + 1; if ( isprint( *where )) { - strcpy(buffer, where); /* found file */ + strcpy(buf, where); /* found file */ res = 1; break; } } else { @@ -284,19 +276,16 @@ int blen; } } if (fclose(bpf)) { warnx("could not close %s", bootpfile); } - if ( res == -1) buffer[0] = '\0'; /* host found, file not */ + if ( res == -1) buf[0] = '\0'; /* host found, file not */ return(match); } /* checkhost puts the hostname found in the database file in - the hostname-variable and returns 1, if askname is a valid + the l_hostname-variable and returns 1, if l_askname is a valid name for a host in the database */ -int -checkhost(askname, hostname, len) -char *askname; -char *hostname; -int len; +static int +checkhost(char *l_askname, char *l_hostname, int len) { int ch, pch; FILE *bpf; @@ -315,36 +304,36 @@ int len; /* XXX there is no way in ISO C to specify the maximal length for a conversion in a variable way */ - while ( fscanf(bpf, "%254s", hostname) > 0 ) { - if ( *hostname != '#' ) { /* comment */ - if ( ! strcmp(hostname, askname) ) { - /* return true for match of hostname */ + while ( fscanf(bpf, "%254s", l_hostname) > 0 ) { + if ( *l_hostname != '#' ) { /* comment */ + if ( ! strcmp(l_hostname, l_askname) ) { + /* return true for match of l_hostname */ res = 1; break; } else { /* check the alias list */ he = NULL; - he = gethostbyname(hostname); - if (he && !strcmp(askname, he->h_name)) { + he = gethostbyname(l_hostname); + if (he && !strcmp(l_askname, he->h_name)) { res = 1; break; } } } - if (*hostname == '+' ) { /* NIS */ + if (*l_hostname == '+' ) { /* NIS */ #ifdef YP if (yp_get_default_domain(&yp_domain)) { if (debug) warn("NIS"); return(0); } - if (!yp_match(yp_domain, "bootparams", askname, strlen(askname), + if (!yp_match(yp_domain, "bootparams", l_askname, strlen(l_askname), &result, &resultlen)) { /* return true for match of hostname */ he = NULL; - he = gethostbyname(askname); - if (he && !strcmp(askname, he->h_name)) { + he = gethostbyname(l_askname); + if (he && !strcmp(l_askname, he->h_name)) { res = 1; - snprintf(hostname, len, "%s", he->h_name); + snprintf(l_hostname, len, "%s", he->h_name); } } if (fclose(bpf)) diff --git a/usr.sbin/bootparamd/bootparamd/main.c b/usr.sbin/bootparamd/bootparamd/main.c index 04f5ceffe36c..95b49f8f39a0 100644 --- a/usr.sbin/bootparamd/bootparamd/main.c +++ b/usr.sbin/bootparamd/bootparamd/main.c @@ -7,10 +7,8 @@ use and modify. Please send modifications and/or suggestions + bug fixes to */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); #include #include @@ -30,11 +28,16 @@ static const char rcsid[] = #include #include "bootparam_prot.h" +extern int debug, dolog; +extern in_addr_t route_addr; +extern const char *bootpfile; + int debug = 0; int dolog = 0; in_addr_t route_addr = -1; -struct sockaddr_in my_addr; -char *bootpfile = "/etc/bootparams"; +const char *bootpfile = "/etc/bootparams"; + +static struct sockaddr_in my_addr; static void usage(void); diff --git a/usr.sbin/bootparamd/callbootd/callbootd.c b/usr.sbin/bootparamd/callbootd/callbootd.c index fe875093c5aa..ea1432c3140a 100644 --- a/usr.sbin/bootparamd/callbootd/callbootd.c +++ b/usr.sbin/bootparamd/callbootd/callbootd.c @@ -7,10 +7,8 @@ use and modify. Please send modifications and/or suggestions + bug fixes to */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); #include "bootparam_prot.h" #include @@ -27,11 +25,11 @@ static const char rcsid[] = #include #include -int broadcast; +static int broadcast; +static char cln[MAX_MACHINE_NAME+1]; +static char dmn[MAX_MACHINE_NAME+1]; +static char path[MAX_PATH_LEN+1]; -char cln[MAX_MACHINE_NAME+1]; -char dmn[MAX_MACHINE_NAME+1]; -char path[MAX_PATH_LEN+1]; static void usage(void); int printgetfile(bp_getfile_res *); int printwhoami(bp_whoami_res *); @@ -72,8 +70,8 @@ main(int argc, char **argv) bp_getfile_res *getfile_res, stat_getfile_res; - long the_inet_addr; - CLIENT *clnt; + in_addr_t the_inet_addr; + CLIENT *clnt = NULL; /* Silence warnings */ stat_whoami_res.client_name = cln; stat_whoami_res.domain_name = dmn; @@ -151,7 +149,7 @@ main(int argc, char **argv) static void -usage() +usage(void) { fprintf(stderr, "usage: callbootd server procnum (IP-addr | host fileid)\n"); @@ -159,8 +157,7 @@ usage() } int -printwhoami(res) -bp_whoami_res *res; +printwhoami(bp_whoami_res *res) { if ( res) { printf("client_name:\t%s\ndomain_name:\t%s\n", @@ -181,8 +178,7 @@ bp_whoami_res *res; int -printgetfile(res) -bp_getfile_res *res; +printgetfile(bp_getfile_res *res) { if (res) { printf("server_name:\t%s\nserver_address:\t%s\npath:\t%s\n", From owner-dev-commits-src-all@freebsd.org Sat Jan 2 04:53:11 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E89E04C278B; Sat, 2 Jan 2021 04:53: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D78fH5gM0z4v4k; Sat, 2 Jan 2021 04:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B58517654; Sat, 2 Jan 2021 04:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1024rBcG095782; Sat, 2 Jan 2021 04:53:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1024rBOI095781; Sat, 2 Jan 2021 04:53:11 GMT (envelope-from git) Date: Sat, 2 Jan 2021 04:53:11 GMT Message-Id: <202101020453.1024rBOI095781@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 8372f2f679e0 - stable/12 - Apply C SKEIN_LOOP setting only to skein_block.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8372f2f679e0f7a74c14810cdf93af52a783e68c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 04:53:12 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8372f2f679e0f7a74c14810cdf93af52a783e68c commit 8372f2f679e0f7a74c14810cdf93af52a783e68c Author: Ed Maste AuthorDate: 2020-06-05 17:00:38 +0000 Commit: Kyle Evans CommitDate: 2021-01-02 04:52:23 +0000 Apply C SKEIN_LOOP setting only to skein_block.c Otherwise if assembling skein_block_asm.s with Clang's integrated assembler we can pass conflicting SKEIN_LOOP settings (via CFLAGS and ACFLAGS). (cherry picked from commit 310e81aede569411ad005f6d6e7259ae0cdafd82) --- lib/libmd/Makefile | 2 +- sys/modules/crypto/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile index edeb308c82d6..2cb0e75f1d27 100644 --- a/lib/libmd/Makefile +++ b/lib/libmd/Makefile @@ -97,7 +97,7 @@ CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys/crypto/sha2 CFLAGS+= -I${SRCTOP}/sys/crypto/skein CFLAGS+= -DWEAK_REFS # unroll the 256 and 512 loops, half unroll the 1024 -CFLAGS+= -DSKEIN_LOOP=995 +CFLAGS.skein_block.c+= -DSKEIN_LOOP=995 .PATH: ${.CURDIR}/${MACHINE_ARCH} ${SRCTOP}/sys/crypto/sha2 .PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} diff --git a/sys/modules/crypto/Makefile b/sys/modules/crypto/Makefile index 09c5d710e985..7c34717597fd 100644 --- a/sys/modules/crypto/Makefile +++ b/sys/modules/crypto/Makefile @@ -29,7 +29,7 @@ SRCS += des_ecb.c des_enc.c des_setkey.c SRCS += sha1.c sha256c.c sha512c.c SRCS += skein.c skein_block.c # unroll the 256 and 512 loops, half unroll the 1024 -CFLAGS+= -DSKEIN_LOOP=995 +CFLAGS.skein_block.c += -DSKEIN_LOOP=995 .if exists(${MACHINE_ARCH}/skein_block_asm.s) .PATH: ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} SRCS += skein_block_asm.s From owner-dev-commits-src-all@freebsd.org Sat Jan 2 04:53:11 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E82B34C2176; Sat, 2 Jan 2021 04:53: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D78fH4rh6z4trG; Sat, 2 Jan 2021 04:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99B73791A; Sat, 2 Jan 2021 04:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1024rBwv095765; Sat, 2 Jan 2021 04:53:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1024rBfw095764; Sat, 2 Jan 2021 04:53:11 GMT (envelope-from git) Date: Sat, 2 Jan 2021 04:53:11 GMT Message-Id: <202101020453.1024rBfw095764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 25a6b709b6b6 - stable/12 - Also pass SKEIN_USE_ASM to the assembler, via AFLAGS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 25a6b709b6b66800481249b5d27d3351636543ac Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 04:53:12 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=25a6b709b6b66800481249b5d27d3351636543ac commit 25a6b709b6b66800481249b5d27d3351636543ac Author: Ed Maste AuthorDate: 2020-06-05 18:56:43 +0000 Commit: Kyle Evans CommitDate: 2021-01-02 04:52:23 +0000 Also pass SKEIN_USE_ASM to the assembler, via AFLAGS (cherry picked from commit f2b86886645fc3fa331543565268808b80d5abdb) --- lib/libmd/Makefile | 2 +- sys/modules/crypto/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile index 2cb0e75f1d27..2381d6da9e93 100644 --- a/lib/libmd/Makefile +++ b/lib/libmd/Makefile @@ -120,7 +120,7 @@ CFLAGS+= -DRMD160_ASM .if defined(XAS) || ${MK_BINUTILS_BOOTSTRAP} != "no" AFLAGS += --strip-local-absolute # Fully unroll all loops in the assembly optimized version -AFLAGS+= --defsym SKEIN_LOOP=0 +AFLAGS+= --defsym SKEIN_LOOP=0 --defsym SKEIN_USE_ASM=1792 SRCS+= skein_block_asm.s CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792 .else diff --git a/sys/modules/crypto/Makefile b/sys/modules/crypto/Makefile index 7c34717597fd..4762b9250e9c 100644 --- a/sys/modules/crypto/Makefile +++ b/sys/modules/crypto/Makefile @@ -36,7 +36,7 @@ SRCS += skein_block_asm.s CFLAGS += -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792 ACFLAGS += -DELF -Wa,--noexecstack # Fully unroll all loops in the assembly optimized version -AFLAGS+= --defsym SKEIN_LOOP=0 +AFLAGS+= --defsym SKEIN_LOOP=0 --defsym SKEIN_USE_ASM=1792 .endif SRCS += siphash.c SRCS += gmac.c gfmult.c From owner-dev-commits-src-all@freebsd.org Sat Jan 2 05:27:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F62D4C284E; Sat, 2 Jan 2021 05:27: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D79Q421jxz3Cc4; Sat, 2 Jan 2021 05:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DE5510100; Sat, 2 Jan 2021 05:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1025RdU6035513; Sat, 2 Jan 2021 05:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1025RdQ7035512; Sat, 2 Jan 2021 05:27:39 GMT (envelope-from git) Date: Sat, 2 Jan 2021 05:27:39 GMT Message-Id: <202101020527.1025RdQ7035512@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 1e6afe0f7d23 - stable/12 - Fix bad libbxo format strings in jls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1e6afe0f7d2346ac5b864b6b01bb9458f5349347 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 05:27:40 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1e6afe0f7d2346ac5b864b6b01bb9458f5349347 commit 1e6afe0f7d2346ac5b864b6b01bb9458f5349347 Author: Alex Richardson AuthorDate: 2020-11-04 14:31:52 +0000 Commit: Kyle Evans CommitDate: 2021-01-02 05:27:10 +0000 Fix bad libbxo format strings in jls The existing format string for the empty case was trying to read varargs values that weren't passed to xo_emit. This appears to work on x86 (since the next argument is probably a pointer an empty string), but for CHERI we can bound variadic arguments and detect a read past the end. While touching these lines also use the libxo 'a' modifier to avoid having to construct the libxo format string using asprintf. Found by: CHERI Reviewed By: allanjude Differential Revision: https://reviews.freebsd.org/D26885 (cherry picked from commit d24f17df969107b47af60e5ccc1ed0f1a467fc6f) --- usr.sbin/jls/jls.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c index 46c5a5c8b15e..374ee14bf080 100644 --- a/usr.sbin/jls/jls.c +++ b/usr.sbin/jls/jls.c @@ -505,17 +505,13 @@ quoted_print(int pflags, char *name, char *value) { int qc; char *p = value; - char *param_name_value; /* An empty string needs quoting. */ if (!*p) { - asprintf(¶m_name_value, "{k:%s}{d:%s/\"\"}", name, name); - xo_emit(param_name_value); - free(param_name_value); + xo_emit("{ea:/%s}{da:/\"\"}", name, value, name); return; } - asprintf(¶m_name_value, "{:%s/%%s}", name); /* * The value will be surrounded by quotes if it contains spaces * or quotes. @@ -528,9 +524,7 @@ quoted_print(int pflags, char *name, char *value) if (qc && pflags & PRINT_QUOTED) xo_emit("{P:/%c}", qc); - xo_emit(param_name_value, value); - - free(param_name_value); + xo_emit("{a:/%s}", name, value); if (qc && pflags & PRINT_QUOTED) xo_emit("{P:/%c}", qc); From owner-dev-commits-src-all@freebsd.org Sat Jan 2 05:40:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F07634C3950; Sat, 2 Jan 2021 05:40:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D79hb6KS0z3DL3; Sat, 2 Jan 2021 05:40:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3D487EE9; Sat, 2 Jan 2021 05:40:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1025eF7u053568; Sat, 2 Jan 2021 05:40:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1025eFPr053544; Sat, 2 Jan 2021 05:40:15 GMT (envelope-from git) Date: Sat, 2 Jan 2021 05:40:15 GMT Message-Id: <202101020540.1025eFPr053544@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: f182d0c7e87a - stable/12 - caroot: drop $FreeBSD$ expansion from root bundle MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f182d0c7e87a5164c3b4f4940c0882dc58481de5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 05:40:16 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f182d0c7e87a5164c3b4f4940c0882dc58481de5 commit f182d0c7e87a5164c3b4f4940c0882dc58481de5 Author: Kyle Evans AuthorDate: 2020-12-28 03:47:41 +0000 Commit: Kyle Evans CommitDate: 2021-01-02 05:40:03 +0000 caroot: drop $FreeBSD$ expansion from root bundle This debatably could have waited until the next update would have taken place, but it's easier to see what changes if we get it out of the way now. (cherry picked from commit f20c0e3319524d51ab474608851bc705d57a7482) --- secure/caroot/trusted/ACCVRAIZ1.pem | 2 +- secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem | 2 +- secure/caroot/trusted/Actalis_Authentication_Root_CA.pem | 2 +- secure/caroot/trusted/AffirmTrust_Commercial.pem | 2 +- secure/caroot/trusted/AffirmTrust_Networking.pem | 2 +- secure/caroot/trusted/AffirmTrust_Premium.pem | 2 +- secure/caroot/trusted/AffirmTrust_Premium_ECC.pem | 2 +- secure/caroot/trusted/Amazon_Root_CA_1.pem | 2 +- secure/caroot/trusted/Amazon_Root_CA_2.pem | 2 +- secure/caroot/trusted/Amazon_Root_CA_3.pem | 2 +- secure/caroot/trusted/Amazon_Root_CA_4.pem | 2 +- secure/caroot/trusted/Atos_TrustedRoot_2011.pem | 2 +- .../Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem | 2 +- secure/caroot/trusted/Baltimore_CyberTrust_Root.pem | 2 +- secure/caroot/trusted/Buypass_Class_2_Root_CA.pem | 2 +- secure/caroot/trusted/Buypass_Class_3_Root_CA.pem | 2 +- secure/caroot/trusted/CA_Disig_Root_R2.pem | 2 +- secure/caroot/trusted/CFCA_EV_ROOT.pem | 2 +- secure/caroot/trusted/COMODO_Certification_Authority.pem | 2 +- secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem | 2 +- secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem | 2 +- secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem | 2 +- secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem | 2 +- secure/caroot/trusted/Certigna.pem | 2 +- secure/caroot/trusted/Certigna_Root_CA.pem | 2 +- secure/caroot/trusted/Certum_Root_CA.pem | 2 +- secure/caroot/trusted/Certum_Trusted_Network_CA.pem | 2 +- secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem | 2 +- secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem | 2 +- secure/caroot/trusted/Comodo_AAA_Services_root.pem | 2 +- secure/caroot/trusted/Cybertrust_Global_Root.pem | 2 +- secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem | 2 +- secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_2009.pem | 2 +- secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem | 2 +- secure/caroot/trusted/DST_Root_CA_X3.pem | 2 +- secure/caroot/trusted/DigiCert_Assured_ID_Root_CA.pem | 2 +- secure/caroot/trusted/DigiCert_Assured_ID_Root_G2.pem | 2 +- secure/caroot/trusted/DigiCert_Assured_ID_Root_G3.pem | 2 +- secure/caroot/trusted/DigiCert_Global_Root_CA.pem | 2 +- secure/caroot/trusted/DigiCert_Global_Root_G2.pem | 2 +- secure/caroot/trusted/DigiCert_Global_Root_G3.pem | 2 +- secure/caroot/trusted/DigiCert_High_Assurance_EV_Root_CA.pem | 2 +- secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem | 2 +- secure/caroot/trusted/E-Tugra_Certification_Authority.pem | 2 +- secure/caroot/trusted/EC-ACC.pem | 2 +- secure/caroot/trusted/Entrust_Root_Certification_Authority.pem | 2 +- secure/caroot/trusted/Entrust_Root_Certification_Authority_-_EC1.pem | 2 +- secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G2.pem | 2 +- secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G4.pem | 2 +- secure/caroot/trusted/Entrust_net_Premium_2048_Secure_Server_CA.pem | 2 +- secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem | 2 +- secure/caroot/trusted/GTS_Root_R1.pem | 2 +- secure/caroot/trusted/GTS_Root_R2.pem | 2 +- secure/caroot/trusted/GTS_Root_R3.pem | 2 +- secure/caroot/trusted/GTS_Root_R4.pem | 2 +- secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem | 2 +- secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem | 2 +- secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem | 2 +- secure/caroot/trusted/GlobalSign_Root_CA.pem | 2 +- secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem | 2 +- secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem | 2 +- secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem | 2 +- secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem | 2 +- secure/caroot/trusted/Go_Daddy_Class_2_CA.pem | 2 +- secure/caroot/trusted/Go_Daddy_Root_Certificate_Authority_-_G2.pem | 2 +- .../Hellenic_Academic_and_Research_Institutions_ECC_RootCA_2015.pem | 2 +- .../trusted/Hellenic_Academic_and_Research_Institutions_RootCA_2011.pem | 2 +- .../trusted/Hellenic_Academic_and_Research_Institutions_RootCA_2015.pem | 2 +- secure/caroot/trusted/Hongkong_Post_Root_CA_1.pem | 2 +- secure/caroot/trusted/Hongkong_Post_Root_CA_3.pem | 2 +- secure/caroot/trusted/ISRG_Root_X1.pem | 2 +- secure/caroot/trusted/IdenTrust_Commercial_Root_CA_1.pem | 2 +- secure/caroot/trusted/IdenTrust_Public_Sector_Root_CA_1.pem | 2 +- secure/caroot/trusted/Izenpe_com.pem | 2 +- secure/caroot/trusted/Microsec_e-Szigno_Root_CA_2009.pem | 2 +- secure/caroot/trusted/Microsoft_ECC_Root_Certificate_Authority_2017.pem | 2 +- secure/caroot/trusted/Microsoft_RSA_Root_Certificate_Authority_2017.pem | 2 +- secure/caroot/trusted/NAVER_Global_Root_Certification_Authority.pem | 2 +- secure/caroot/trusted/NetLock_Arany__Class_Gold__F__tan__s__tv__ny.pem | 2 +- secure/caroot/trusted/Network_Solutions_Certificate_Authority.pem | 2 +- secure/caroot/trusted/OISTE_WISeKey_Global_Root_GA_CA.pem | 2 +- secure/caroot/trusted/OISTE_WISeKey_Global_Root_GB_CA.pem | 2 +- secure/caroot/trusted/OISTE_WISeKey_Global_Root_GC_CA.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA_1_G3.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA_2.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA_2_G3.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA_3.pem | 2 +- secure/caroot/trusted/QuoVadis_Root_CA_3_G3.pem | 2 +- secure/caroot/trusted/SSL_com_EV_Root_Certification_Authority_ECC.pem | 2 +- .../caroot/trusted/SSL_com_EV_Root_Certification_Authority_RSA_R2.pem | 2 +- secure/caroot/trusted/SSL_com_Root_Certification_Authority_ECC.pem | 2 +- secure/caroot/trusted/SSL_com_Root_Certification_Authority_RSA.pem | 2 +- secure/caroot/trusted/SZAFIR_ROOT_CA2.pem | 2 +- secure/caroot/trusted/SecureSign_RootCA11.pem | 2 +- secure/caroot/trusted/SecureTrust_CA.pem | 2 +- secure/caroot/trusted/Secure_Global_CA.pem | 2 +- secure/caroot/trusted/Security_Communication_RootCA2.pem | 2 +- secure/caroot/trusted/Security_Communication_Root_CA.pem | 2 +- secure/caroot/trusted/Sonera_Class_2_Root_CA.pem | 2 +- secure/caroot/trusted/Staat_der_Nederlanden_EV_Root_CA.pem | 2 +- secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G3.pem | 2 +- secure/caroot/trusted/Starfield_Class_2_CA.pem | 2 +- secure/caroot/trusted/Starfield_Root_Certificate_Authority_-_G2.pem | 2 +- .../trusted/Starfield_Services_Root_Certificate_Authority_-_G2.pem | 2 +- secure/caroot/trusted/SwissSign_Gold_CA_-_G2.pem | 2 +- secure/caroot/trusted/SwissSign_Platinum_CA_-_G2.pem | 2 +- secure/caroot/trusted/SwissSign_Silver_CA_-_G2.pem | 2 +- .../Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem | 2 +- .../Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem | 2 +- secure/caroot/trusted/T-TeleSec_GlobalRoot_Class_2.pem | 2 +- secure/caroot/trusted/T-TeleSec_GlobalRoot_Class_3.pem | 2 +- secure/caroot/trusted/TUBITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem | 2 +- secure/caroot/trusted/TWCA_Global_Root_CA.pem | 2 +- secure/caroot/trusted/TWCA_Root_Certification_Authority.pem | 2 +- secure/caroot/trusted/TeliaSonera_Root_CA_v1.pem | 2 +- secure/caroot/trusted/TrustCor_ECA-1.pem | 2 +- secure/caroot/trusted/TrustCor_RootCert_CA-1.pem | 2 +- secure/caroot/trusted/TrustCor_RootCert_CA-2.pem | 2 +- secure/caroot/trusted/Trustis_FPS_Root_CA.pem | 2 +- secure/caroot/trusted/Trustwave_Global_Certification_Authority.pem | 2 +- .../trusted/Trustwave_Global_ECC_P256_Certification_Authority.pem | 2 +- .../trusted/Trustwave_Global_ECC_P384_Certification_Authority.pem | 2 +- secure/caroot/trusted/UCA_Extended_Validation_Root.pem | 2 +- secure/caroot/trusted/UCA_Global_G2_Root.pem | 2 +- secure/caroot/trusted/USERTrust_ECC_Certification_Authority.pem | 2 +- secure/caroot/trusted/USERTrust_RSA_Certification_Authority.pem | 2 +- .../caroot/trusted/VeriSign_Universal_Root_Certification_Authority.pem | 2 +- .../Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem | 2 +- .../Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem | 2 +- secure/caroot/trusted/XRamp_Global_CA_Root.pem | 2 +- secure/caroot/trusted/certSIGN_ROOT_CA.pem | 2 +- secure/caroot/trusted/certSIGN_Root_CA_G2.pem | 2 +- secure/caroot/trusted/e-Szigno_Root_CA_2017.pem | 2 +- secure/caroot/trusted/ePKI_Root_Certification_Authority.pem | 2 +- secure/caroot/trusted/emSign_ECC_Root_CA_-_C3.pem | 2 +- secure/caroot/trusted/emSign_ECC_Root_CA_-_G3.pem | 2 +- secure/caroot/trusted/emSign_Root_CA_-_C1.pem | 2 +- secure/caroot/trusted/emSign_Root_CA_-_G1.pem | 2 +- 139 files changed, 139 insertions(+), 139 deletions(-) diff --git a/secure/caroot/trusted/ACCVRAIZ1.pem b/secure/caroot/trusted/ACCVRAIZ1.pem index 136f7bddb6f3..0c7c7c41b57d 100644 --- a/secure/caroot/trusted/ACCVRAIZ1.pem +++ b/secure/caroot/trusted/ACCVRAIZ1.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem index d327b3ecf2cb..579f50d8d730 100644 --- a/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem +++ b/secure/caroot/trusted/AC_RAIZ_FNMT-RCM.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem b/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem index 6e7823d4b81f..7248545350e2 100644 --- a/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem +++ b/secure/caroot/trusted/Actalis_Authentication_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/AffirmTrust_Commercial.pem b/secure/caroot/trusted/AffirmTrust_Commercial.pem index e0a8ebdf12e1..1d85c32853c8 100644 --- a/secure/caroot/trusted/AffirmTrust_Commercial.pem +++ b/secure/caroot/trusted/AffirmTrust_Commercial.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/AffirmTrust_Networking.pem b/secure/caroot/trusted/AffirmTrust_Networking.pem index a96b036f4153..222bde26c934 100644 --- a/secure/caroot/trusted/AffirmTrust_Networking.pem +++ b/secure/caroot/trusted/AffirmTrust_Networking.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/AffirmTrust_Premium.pem b/secure/caroot/trusted/AffirmTrust_Premium.pem index ee259e197476..dc1447429465 100644 --- a/secure/caroot/trusted/AffirmTrust_Premium.pem +++ b/secure/caroot/trusted/AffirmTrust_Premium.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem b/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem index 5f600162a941..a6f01409a2ef 100644 --- a/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem +++ b/secure/caroot/trusted/AffirmTrust_Premium_ECC.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_1.pem b/secure/caroot/trusted/Amazon_Root_CA_1.pem index 9221de0cea44..6bf1acafd4c7 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_1.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_1.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_2.pem b/secure/caroot/trusted/Amazon_Root_CA_2.pem index 418ffc0b8de0..80a1eb66bee2 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_2.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_3.pem b/secure/caroot/trusted/Amazon_Root_CA_3.pem index 36ff13dc4708..6b61b3e18fa0 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_3.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Amazon_Root_CA_4.pem b/secure/caroot/trusted/Amazon_Root_CA_4.pem index c1f88d6bc8a3..df7aa6f1c165 100644 --- a/secure/caroot/trusted/Amazon_Root_CA_4.pem +++ b/secure/caroot/trusted/Amazon_Root_CA_4.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Atos_TrustedRoot_2011.pem b/secure/caroot/trusted/Atos_TrustedRoot_2011.pem index 3f038d3c239c..21b229561733 100644 --- a/secure/caroot/trusted/Atos_TrustedRoot_2011.pem +++ b/secure/caroot/trusted/Atos_TrustedRoot_2011.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem index da12de780be6..4d2eaa61962f 100644 --- a/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem +++ b/secure/caroot/trusted/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem b/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem index cc5d711bc08d..3dc1de849346 100644 --- a/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem +++ b/secure/caroot/trusted/Baltimore_CyberTrust_Root.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem b/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem index 5ebb2edfcf84..dc2c86edbed1 100644 --- a/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem +++ b/secure/caroot/trusted/Buypass_Class_2_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem b/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem index 1aab9dec0adc..fda39f8731d1 100644 --- a/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem +++ b/secure/caroot/trusted/Buypass_Class_3_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/CA_Disig_Root_R2.pem b/secure/caroot/trusted/CA_Disig_Root_R2.pem index a6db02606c5d..0ecc9d1ee08d 100644 --- a/secure/caroot/trusted/CA_Disig_Root_R2.pem +++ b/secure/caroot/trusted/CA_Disig_Root_R2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/CFCA_EV_ROOT.pem b/secure/caroot/trusted/CFCA_EV_ROOT.pem index 460785cc21e6..7eb37baa3bed 100644 --- a/secure/caroot/trusted/CFCA_EV_ROOT.pem +++ b/secure/caroot/trusted/CFCA_EV_ROOT.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/COMODO_Certification_Authority.pem b/secure/caroot/trusted/COMODO_Certification_Authority.pem index f6c1cb232ac6..7aa1237bb8e1 100644 --- a/secure/caroot/trusted/COMODO_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_Certification_Authority.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem b/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem index 322154206039..215581b14fdf 100644 --- a/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_ECC_Certification_Authority.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem b/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem index 53c540ff2146..38e275f1365e 100644 --- a/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem +++ b/secure/caroot/trusted/COMODO_RSA_Certification_Authority.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem b/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem index 601df8f89e10..cf7de6cc122b 100644 --- a/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem +++ b/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem b/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem index 203fb13108c8..b1fa96bc405e 100644 --- a/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem +++ b/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Certigna.pem b/secure/caroot/trusted/Certigna.pem index 3a25f25160ea..bbcd413be511 100644 --- a/secure/caroot/trusted/Certigna.pem +++ b/secure/caroot/trusted/Certigna.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Certigna_Root_CA.pem b/secure/caroot/trusted/Certigna_Root_CA.pem index 564d3fe8f50d..c1a0286ab2a0 100644 --- a/secure/caroot/trusted/Certigna_Root_CA.pem +++ b/secure/caroot/trusted/Certigna_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Certum_Root_CA.pem b/secure/caroot/trusted/Certum_Root_CA.pem index ec03a0f913de..f815c49ddae0 100644 --- a/secure/caroot/trusted/Certum_Root_CA.pem +++ b/secure/caroot/trusted/Certum_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Certum_Trusted_Network_CA.pem b/secure/caroot/trusted/Certum_Trusted_Network_CA.pem index 5ced43da18d8..a321445a502c 100644 --- a/secure/caroot/trusted/Certum_Trusted_Network_CA.pem +++ b/secure/caroot/trusted/Certum_Trusted_Network_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem b/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem index 0493c488801c..62cee7fc2058 100644 --- a/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem +++ b/secure/caroot/trusted/Certum_Trusted_Network_CA_2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem b/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem index b705886574c8..1e3864180a66 100644 --- a/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem +++ b/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Comodo_AAA_Services_root.pem b/secure/caroot/trusted/Comodo_AAA_Services_root.pem index 5e2506239c66..3ab5ce74bc37 100644 --- a/secure/caroot/trusted/Comodo_AAA_Services_root.pem +++ b/secure/caroot/trusted/Comodo_AAA_Services_root.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Cybertrust_Global_Root.pem b/secure/caroot/trusted/Cybertrust_Global_Root.pem index 54647522233b..b6261df7f2df 100644 --- a/secure/caroot/trusted/Cybertrust_Global_Root.pem +++ b/secure/caroot/trusted/Cybertrust_Global_Root.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem b/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem index ab9d138bd3e1..debf7b30c2ef 100644 --- a/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem +++ b/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_2009.pem b/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_2009.pem index a460f18db523..37b0f004ef94 100644 --- a/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_2009.pem +++ b/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_2009.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem b/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem index f270c37caa80..71d0f7fc323f 100644 --- a/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem +++ b/secure/caroot/trusted/D-TRUST_Root_Class_3_CA_2_EV_2009.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DST_Root_CA_X3.pem b/secure/caroot/trusted/DST_Root_CA_X3.pem index 47f5f3212169..aeaa167d590c 100644 --- a/secure/caroot/trusted/DST_Root_CA_X3.pem +++ b/secure/caroot/trusted/DST_Root_CA_X3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Assured_ID_Root_CA.pem b/secure/caroot/trusted/DigiCert_Assured_ID_Root_CA.pem index f768b06d12db..12ce54725012 100644 --- a/secure/caroot/trusted/DigiCert_Assured_ID_Root_CA.pem +++ b/secure/caroot/trusted/DigiCert_Assured_ID_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Assured_ID_Root_G2.pem b/secure/caroot/trusted/DigiCert_Assured_ID_Root_G2.pem index 0135f133c7ac..7c5d96a053e4 100644 --- a/secure/caroot/trusted/DigiCert_Assured_ID_Root_G2.pem +++ b/secure/caroot/trusted/DigiCert_Assured_ID_Root_G2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Assured_ID_Root_G3.pem b/secure/caroot/trusted/DigiCert_Assured_ID_Root_G3.pem index cdd8f0be47f5..901c33448725 100644 --- a/secure/caroot/trusted/DigiCert_Assured_ID_Root_G3.pem +++ b/secure/caroot/trusted/DigiCert_Assured_ID_Root_G3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Global_Root_CA.pem b/secure/caroot/trusted/DigiCert_Global_Root_CA.pem index 3a273557ab67..75c9fd45ebab 100644 --- a/secure/caroot/trusted/DigiCert_Global_Root_CA.pem +++ b/secure/caroot/trusted/DigiCert_Global_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Global_Root_G2.pem b/secure/caroot/trusted/DigiCert_Global_Root_G2.pem index 7b80ce72c72e..363d93b2c9ac 100644 --- a/secure/caroot/trusted/DigiCert_Global_Root_G2.pem +++ b/secure/caroot/trusted/DigiCert_Global_Root_G2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Global_Root_G3.pem b/secure/caroot/trusted/DigiCert_Global_Root_G3.pem index 6538535dd73b..45776f544654 100644 --- a/secure/caroot/trusted/DigiCert_Global_Root_G3.pem +++ b/secure/caroot/trusted/DigiCert_Global_Root_G3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_High_Assurance_EV_Root_CA.pem b/secure/caroot/trusted/DigiCert_High_Assurance_EV_Root_CA.pem index dcb88fb3d1b4..d76acb3c3896 100644 --- a/secure/caroot/trusted/DigiCert_High_Assurance_EV_Root_CA.pem +++ b/secure/caroot/trusted/DigiCert_High_Assurance_EV_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem b/secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem index 92295c4ec38e..7ebb30081d81 100644 --- a/secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem +++ b/secure/caroot/trusted/DigiCert_Trusted_Root_G4.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/E-Tugra_Certification_Authority.pem b/secure/caroot/trusted/E-Tugra_Certification_Authority.pem index 256c0b3e524b..04d1e630a816 100644 --- a/secure/caroot/trusted/E-Tugra_Certification_Authority.pem +++ b/secure/caroot/trusted/E-Tugra_Certification_Authority.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/EC-ACC.pem b/secure/caroot/trusted/EC-ACC.pem index 7fca8890028f..a4b43b39414b 100644 --- a/secure/caroot/trusted/EC-ACC.pem +++ b/secure/caroot/trusted/EC-ACC.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Entrust_Root_Certification_Authority.pem b/secure/caroot/trusted/Entrust_Root_Certification_Authority.pem index 2ed6ff3e94a2..50b0d2ed5c94 100644 --- a/secure/caroot/trusted/Entrust_Root_Certification_Authority.pem +++ b/secure/caroot/trusted/Entrust_Root_Certification_Authority.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_EC1.pem b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_EC1.pem index ae0d6859b1d6..eb15c3801be6 100644 --- a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_EC1.pem +++ b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_EC1.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G2.pem b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G2.pem index d82aaf71ecae..b92fd4aef90f 100644 --- a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G2.pem +++ b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G4.pem b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G4.pem index a84b6ca03d42..8443ae5ca195 100644 --- a/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G4.pem +++ b/secure/caroot/trusted/Entrust_Root_Certification_Authority_-_G4.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Entrust_net_Premium_2048_Secure_Server_CA.pem b/secure/caroot/trusted/Entrust_net_Premium_2048_Secure_Server_CA.pem index 1d18cb8d6a4b..b429d96786ea 100644 --- a/secure/caroot/trusted/Entrust_net_Premium_2048_Secure_Server_CA.pem +++ b/secure/caroot/trusted/Entrust_net_Premium_2048_Secure_Server_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem b/secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem index 59b80e1f45ce..f9db5d422b8e 100644 --- a/secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem +++ b/secure/caroot/trusted/GDCA_TrustAUTH_R5_ROOT.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GTS_Root_R1.pem b/secure/caroot/trusted/GTS_Root_R1.pem index 422977ba0649..9abe191b9bb9 100644 --- a/secure/caroot/trusted/GTS_Root_R1.pem +++ b/secure/caroot/trusted/GTS_Root_R1.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GTS_Root_R2.pem b/secure/caroot/trusted/GTS_Root_R2.pem index 06abfca8ccbb..8c5f92d1e610 100644 --- a/secure/caroot/trusted/GTS_Root_R2.pem +++ b/secure/caroot/trusted/GTS_Root_R2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GTS_Root_R3.pem b/secure/caroot/trusted/GTS_Root_R3.pem index 04d8829f66aa..d621d3053df1 100644 --- a/secure/caroot/trusted/GTS_Root_R3.pem +++ b/secure/caroot/trusted/GTS_Root_R3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GTS_Root_R4.pem b/secure/caroot/trusted/GTS_Root_R4.pem index c423a356f791..5a7a71764294 100644 --- a/secure/caroot/trusted/GTS_Root_R4.pem +++ b/secure/caroot/trusted/GTS_Root_R4.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem b/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem index 65a90850db69..b03758a63c98 100644 --- a/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem +++ b/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem b/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem index 7566a58a862b..c63f8d8c441a 100644 --- a/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem +++ b/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R4.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem b/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem index 9d273a384295..7a989c4577d8 100644 --- a/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem +++ b/secure/caroot/trusted/GlobalSign_ECC_Root_CA_-_R5.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_Root_CA.pem b/secure/caroot/trusted/GlobalSign_Root_CA.pem index 71a5de48edad..0e2348e6c4f1 100644 --- a/secure/caroot/trusted/GlobalSign_Root_CA.pem +++ b/secure/caroot/trusted/GlobalSign_Root_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem b/secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem index 810db4a2984b..616fe024937a 100644 --- a/secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem +++ b/secure/caroot/trusted/GlobalSign_Root_CA_-_R2.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem b/secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem index 0835e56cd757..aedb37900191 100644 --- a/secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem +++ b/secure/caroot/trusted/GlobalSign_Root_CA_-_R3.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem b/secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem index 5d792a7da0e5..112aaf7fde17 100644 --- a/secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem +++ b/secure/caroot/trusted/GlobalSign_Root_CA_-_R6.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem b/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem index cceb29ac1bfd..cd9bebaf8c0f 100644 --- a/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem +++ b/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## with $FreeBSD$ ## ## @generated ## diff --git a/secure/caroot/trusted/Go_Daddy_Class_2_CA.pem b/secure/caroot/trusted/Go_Daddy_Class_2_CA.pem index cb38b1b1c417..5083a0fcf21d 100644 --- a/secure/caroot/trusted/Go_Daddy_Class_2_CA.pem +++ b/secure/caroot/trusted/Go_Daddy_Class_2_CA.pem @@ -6,7 +6,7 @@ ## root CA list (the file `certdata.txt' in security/nss). ## ## Extracted from nss -## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ *** 979 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Sat Jan 2 06:01:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D27CD4C4177; Sat, 2 Jan 2021 06:01: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7B8b5dm3z3F6Z; Sat, 2 Jan 2021 06:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B483310668; Sat, 2 Jan 2021 06:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 102613uw081842; Sat, 2 Jan 2021 06:01:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1026131n081839; Sat, 2 Jan 2021 06:01:03 GMT (envelope-from git) Date: Sat, 2 Jan 2021 06:01:03 GMT Message-Id: <202101020601.1026131n081839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 8929690a6359 - main - contrib: remove libgnuregex MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8929690a6359dfba4ed398ef66a4c13e071f10bf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 06:01:03 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8929690a6359dfba4ed398ef66a4c13e071f10bf commit 8929690a6359dfba4ed398ef66a4c13e071f10bf Author: Kyle Evans AuthorDate: 2021-01-02 05:59:21 +0000 Commit: Kyle Evans CommitDate: 2021-01-02 06:00:58 +0000 contrib: remove libgnuregex This should have been a part of 47d1ad2413da, but it was overlooked. All of the build bits have been previously removed, and nothing references this anymore. --- contrib/libgnuregex/regcomp.c | 3856 ------------------------------ contrib/libgnuregex/regex.c | 76 - contrib/libgnuregex/regex.h | 582 ----- contrib/libgnuregex/regex_internal.c | 1732 -------------- contrib/libgnuregex/regex_internal.h | 769 ------ contrib/libgnuregex/regexec.c | 4380 ---------------------------------- 6 files changed, 11395 deletions(-) diff --git a/contrib/libgnuregex/regcomp.c b/contrib/libgnuregex/regcomp.c deleted file mode 100644 index 82b50ad1dd3b..000000000000 --- a/contrib/libgnuregex/regcomp.c +++ /dev/null @@ -1,3856 +0,0 @@ -/* Extended regular expression matching and search library. - Copyright (C) 2002-2007,2009,2010,2011,2012 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, - size_t length, reg_syntax_t syntax); -static void re_compile_fastmap_iter (regex_t *bufp, - const re_dfastate_t *init_state, - char *fastmap); -static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); -#ifdef RE_ENABLE_I18N -static void free_charset (re_charset_t *cset); -#endif /* RE_ENABLE_I18N */ -static void free_workarea_compile (regex_t *preg); -static reg_errcode_t create_initial_state (re_dfa_t *dfa); -#ifdef RE_ENABLE_I18N -static void optimize_utf8 (re_dfa_t *dfa); -#endif -static reg_errcode_t analyze (regex_t *preg); -static reg_errcode_t preorder (bin_tree_t *root, - reg_errcode_t (fn (void *, bin_tree_t *)), - void *extra); -static reg_errcode_t postorder (bin_tree_t *root, - reg_errcode_t (fn (void *, bin_tree_t *)), - void *extra); -static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); -static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); -static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, - bin_tree_t *node); -static reg_errcode_t calc_first (void *extra, bin_tree_t *node); -static reg_errcode_t calc_next (void *extra, bin_tree_t *node); -static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); -static int duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint); -static int search_duplicated_node (const re_dfa_t *dfa, int org_node, - unsigned int constraint); -static reg_errcode_t calc_eclosure (re_dfa_t *dfa); -static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, - int node, int root); -static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); -static int fetch_number (re_string_t *input, re_token_t *token, - reg_syntax_t syntax); -static int peek_token (re_token_t *token, re_string_t *input, - reg_syntax_t syntax) internal_function; -static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, - reg_syntax_t syntax, reg_errcode_t *err); -static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - int nest, reg_errcode_t *err); -static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - int nest, reg_errcode_t *err); -static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - int nest, reg_errcode_t *err); -static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - int nest, reg_errcode_t *err); -static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, - re_dfa_t *dfa, re_token_t *token, - reg_syntax_t syntax, reg_errcode_t *err); -static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, - re_token_t *token, reg_syntax_t syntax, - reg_errcode_t *err); -static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, - re_string_t *regexp, - re_token_t *token, int token_len, - re_dfa_t *dfa, - reg_syntax_t syntax, - int accept_hyphen); -static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, - re_string_t *regexp, - re_token_t *token); -#ifdef RE_ENABLE_I18N -static reg_errcode_t build_equiv_class (bitset_t sbcset, - re_charset_t *mbcset, - int *equiv_class_alloc, - const unsigned char *name); -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, - bitset_t sbcset, - re_charset_t *mbcset, - int *char_class_alloc, - const unsigned char *class_name, - reg_syntax_t syntax); -#else /* not RE_ENABLE_I18N */ -static reg_errcode_t build_equiv_class (bitset_t sbcset, - const unsigned char *name); -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, - bitset_t sbcset, - const unsigned char *class_name, - reg_syntax_t syntax); -#endif /* not RE_ENABLE_I18N */ -static bin_tree_t *build_charclass_op (re_dfa_t *dfa, - RE_TRANSLATE_TYPE trans, - const unsigned char *class_name, - const unsigned char *extra, - int non_match, reg_errcode_t *err); -static bin_tree_t *create_tree (re_dfa_t *dfa, - bin_tree_t *left, bin_tree_t *right, - re_token_type_t type); -static bin_tree_t *create_token_tree (re_dfa_t *dfa, - bin_tree_t *left, bin_tree_t *right, - const re_token_t *token); -static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); -static void free_token (re_token_t *node); -static reg_errcode_t free_tree (void *extra, bin_tree_t *node); -static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); - -/* This table gives an error message for each of the error codes listed - in regex.h. Obviously the order here has to be same as there. - POSIX doesn't require that we do anything for REG_NOERROR, - but why not be nice? */ - -const char __re_error_msgid[] attribute_hidden = - { -#define REG_NOERROR_IDX 0 - gettext_noop ("Success") /* REG_NOERROR */ - "\0" -#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") - gettext_noop ("No match") /* REG_NOMATCH */ - "\0" -#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") - gettext_noop ("Invalid regular expression") /* REG_BADPAT */ - "\0" -#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") - gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ - "\0" -#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") - gettext_noop ("Invalid character class name") /* REG_ECTYPE */ - "\0" -#define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") - gettext_noop ("Trailing backslash") /* REG_EESCAPE */ - "\0" -#define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") - gettext_noop ("Invalid back reference") /* REG_ESUBREG */ - "\0" -#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") - gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ - "\0" -#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") - gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ - "\0" -#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") - gettext_noop ("Unmatched \\{") /* REG_EBRACE */ - "\0" -#define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") - gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ - "\0" -#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") - gettext_noop ("Invalid range end") /* REG_ERANGE */ - "\0" -#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") - gettext_noop ("Memory exhausted") /* REG_ESPACE */ - "\0" -#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") - gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ - "\0" -#define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") - gettext_noop ("Premature end of regular expression") /* REG_EEND */ - "\0" -#define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") - gettext_noop ("Regular expression too big") /* REG_ESIZE */ - "\0" -#define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") - gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ - }; - -const size_t __re_error_msgid_idx[] attribute_hidden = - { - REG_NOERROR_IDX, - REG_NOMATCH_IDX, - REG_BADPAT_IDX, - REG_ECOLLATE_IDX, - REG_ECTYPE_IDX, - REG_EESCAPE_IDX, - REG_ESUBREG_IDX, - REG_EBRACK_IDX, - REG_EPAREN_IDX, - REG_EBRACE_IDX, - REG_BADBR_IDX, - REG_ERANGE_IDX, - REG_ESPACE_IDX, - REG_BADRPT_IDX, - REG_EEND_IDX, - REG_ESIZE_IDX, - REG_ERPAREN_IDX - }; - -/* Entry points for GNU code. */ - -/* re_compile_pattern is the GNU regular expression compiler: it - compiles PATTERN (of length LENGTH) and puts the result in BUFP. - Returns 0 if the pattern was valid, otherwise an error string. - - Assumes the `allocated' (and perhaps `buffer') and `translate' fields - are set in BUFP on entry. */ - -const char * -re_compile_pattern (pattern, length, bufp) - const char *pattern; - size_t length; - struct re_pattern_buffer *bufp; -{ - reg_errcode_t ret; - - /* And GNU code determines whether or not to get register information - by passing null for the REGS argument to re_match, etc., not by - setting no_sub, unless RE_NO_SUB is set. */ - bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); - - /* Match anchors at newline. */ - bufp->newline_anchor = 1; - - ret = re_compile_internal (bufp, pattern, length, re_syntax_options); - - if (!ret) - return NULL; - return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); -} -#ifdef _LIBC -weak_alias (__re_compile_pattern, re_compile_pattern) -#endif - -/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can - also be assigned to arbitrarily: each pattern buffer stores its own - syntax, so it can be changed between regex compilations. */ -/* This has no initializer because initialized variables in Emacs - become read-only after dumping. */ -reg_syntax_t re_syntax_options; - - -/* Specify the precise syntax of regexps for compilation. This provides - for compatibility for various utilities which historically have - different, incompatible syntaxes. - - The argument SYNTAX is a bit mask comprised of the various bits - defined in regex.h. We return the old syntax. */ - -reg_syntax_t -re_set_syntax (syntax) - reg_syntax_t syntax; -{ - reg_syntax_t ret = re_syntax_options; - - re_syntax_options = syntax; - return ret; -} -#ifdef _LIBC -weak_alias (__re_set_syntax, re_set_syntax) -#endif - -int -re_compile_fastmap (bufp) - struct re_pattern_buffer *bufp; -{ - re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; - char *fastmap = bufp->fastmap; - - memset (fastmap, '\0', sizeof (char) * SBC_MAX); - re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); - if (dfa->init_state != dfa->init_state_word) - re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); - if (dfa->init_state != dfa->init_state_nl) - re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); - if (dfa->init_state != dfa->init_state_begbuf) - re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); - bufp->fastmap_accurate = 1; - return 0; -} -#ifdef _LIBC -weak_alias (__re_compile_fastmap, re_compile_fastmap) -#endif - -static inline void -__attribute ((always_inline)) -re_set_fastmap (char *fastmap, int icase, int ch) -{ - fastmap[ch] = 1; - if (icase) - fastmap[tolower (ch)] = 1; -} - -/* Helper function for re_compile_fastmap. - Compile fastmap for the initial_state INIT_STATE. */ - -static void -re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, - char *fastmap) -{ - re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; - int node_cnt; - int icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); - for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) - { - int node = init_state->nodes.elems[node_cnt]; - re_token_type_t type = dfa->nodes[node].type; - - if (type == CHARACTER) - { - re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); -#ifdef RE_ENABLE_I18N - if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) - { - unsigned char *buf = alloca (dfa->mb_cur_max), *p; - wchar_t wc; - mbstate_t state; - - p = buf; - *p++ = dfa->nodes[node].opr.c; - while (++node < dfa->nodes_len - && dfa->nodes[node].type == CHARACTER - && dfa->nodes[node].mb_partial) - *p++ = dfa->nodes[node].opr.c; - memset (&state, '\0', sizeof (state)); - if (__mbrtowc (&wc, (const char *) buf, p - buf, - &state) == p - buf - && (__wcrtomb ((char *) buf, towlower (wc), &state) - != (size_t) -1)) - re_set_fastmap (fastmap, 0, buf[0]); - } -#endif - } - else if (type == SIMPLE_BRACKET) - { - int i, ch; - for (i = 0, ch = 0; i < BITSET_WORDS; ++i) - { - int j; - bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; - for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) - if (w & ((bitset_word_t) 1 << j)) - re_set_fastmap (fastmap, icase, ch); - } - } -#ifdef RE_ENABLE_I18N - else if (type == COMPLEX_BRACKET) - { - re_charset_t *cset = dfa->nodes[node].opr.mbcset; - int i; - -# ifdef _LIBC - /* See if we have to try all bytes which start multiple collation - elements. - e.g. In da_DK, we want to catch 'a' since "aa" is a valid - collation element, and don't catch 'b' since 'b' is - the only collation element which starts from 'b' (and - it is caught by SIMPLE_BRACKET). */ - if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0 - && (cset->ncoll_syms || cset->nranges)) - { - const int32_t *table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - for (i = 0; i < SBC_MAX; ++i) - if (table[i] < 0) - re_set_fastmap (fastmap, icase, i); - } -# endif /* _LIBC */ - - /* See if we have to start the match at all multibyte characters, - i.e. where we would not find an invalid sequence. This only - applies to multibyte character sets; for single byte character - sets, the SIMPLE_BRACKET again suffices. */ - if (dfa->mb_cur_max > 1 - && (cset->nchar_classes || cset->non_match || cset->nranges -# ifdef _LIBC - || cset->nequiv_classes -# endif /* _LIBC */ - )) - { - unsigned char c = 0; - do - { - mbstate_t mbs; - memset (&mbs, 0, sizeof (mbs)); - if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2) - re_set_fastmap (fastmap, false, (int) c); - } - while (++c != 0); - } - - else - { - /* ... Else catch all bytes which can start the mbchars. */ - for (i = 0; i < cset->nmbchars; ++i) - { - char buf[256]; - mbstate_t state; - memset (&state, '\0', sizeof (state)); - if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) - re_set_fastmap (fastmap, icase, *(unsigned char *) buf); - if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) - { - if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) - != (size_t) -1) - re_set_fastmap (fastmap, false, *(unsigned char *) buf); - } - } - } - } -#endif /* RE_ENABLE_I18N */ - else if (type == OP_PERIOD -#ifdef RE_ENABLE_I18N - || type == OP_UTF8_PERIOD -#endif /* RE_ENABLE_I18N */ - || type == END_OF_RE) - { - memset (fastmap, '\1', sizeof (char) * SBC_MAX); - if (type == END_OF_RE) - bufp->can_be_null = 1; - return; - } - } -} - -/* Entry point for POSIX code. */ -/* regcomp takes a regular expression as a string and compiles it. - - PREG is a regex_t *. We do not expect any fields to be initialized, - since POSIX says we shouldn't. Thus, we set - - `buffer' to the compiled pattern; - `used' to the length of the compiled pattern; - `syntax' to RE_SYNTAX_POSIX_EXTENDED if the - REG_EXTENDED bit in CFLAGS is set; otherwise, to - RE_SYNTAX_POSIX_BASIC; - `newline_anchor' to REG_NEWLINE being set in CFLAGS; - `fastmap' to an allocated space for the fastmap; - `fastmap_accurate' to zero; - `re_nsub' to the number of subexpressions in PATTERN. - - PATTERN is the address of the pattern string. - - CFLAGS is a series of bits which affect compilation. - - If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we - use POSIX basic syntax. - - If REG_NEWLINE is set, then . and [^...] don't match newline. - Also, regexec will try a match beginning after every newline. - - If REG_ICASE is set, then we considers upper- and lowercase - versions of letters to be equivalent when matching. - - If REG_NOSUB is set, then when PREG is passed to regexec, that - routine will report only success or failure, and nothing about the - registers. - - It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for - the return codes and their meanings.) */ - -int -regcomp (preg, pattern, cflags) - regex_t *__restrict preg; - const char *__restrict pattern; - int cflags; -{ - reg_errcode_t ret; - reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED - : RE_SYNTAX_POSIX_BASIC); - - preg->buffer = NULL; - preg->allocated = 0; - preg->used = 0; - - /* Try to allocate space for the fastmap. */ - preg->fastmap = re_malloc (char, SBC_MAX); - if (BE (preg->fastmap == NULL, 0)) - return REG_ESPACE; - - syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; - - /* If REG_NEWLINE is set, newlines are treated differently. */ - if (cflags & REG_NEWLINE) - { /* REG_NEWLINE implies neither . nor [^...] match newline. */ - syntax &= ~RE_DOT_NEWLINE; - syntax |= RE_HAT_LISTS_NOT_NEWLINE; - /* It also changes the matching behavior. */ - preg->newline_anchor = 1; - } - else - preg->newline_anchor = 0; - preg->no_sub = !!(cflags & REG_NOSUB); - preg->translate = NULL; - - ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); - - /* POSIX doesn't distinguish between an unmatched open-group and an - unmatched close-group: both are REG_EPAREN. */ - if (ret == REG_ERPAREN) - ret = REG_EPAREN; - - /* We have already checked preg->fastmap != NULL. */ - if (BE (ret == REG_NOERROR, 1)) - /* Compute the fastmap now, since regexec cannot modify the pattern - buffer. This function never fails in this implementation. */ - (void) re_compile_fastmap (preg); - else - { - /* Some error occurred while compiling the expression. */ - re_free (preg->fastmap); - preg->fastmap = NULL; - } - - return (int) ret; -} -#ifdef _LIBC -weak_alias (__regcomp, regcomp) -#endif - -/* Returns a message corresponding to an error code, ERRCODE, returned - from either regcomp or regexec. We don't use PREG here. */ - -size_t -regerror (errcode, preg, errbuf, errbuf_size) - int errcode; - const regex_t *__restrict preg; - char *__restrict errbuf; - size_t errbuf_size; -{ - const char *msg; - size_t msg_size; - - if (BE (errcode < 0 - || errcode >= (int) (sizeof (__re_error_msgid_idx) - / sizeof (__re_error_msgid_idx[0])), 0)) - /* Only error codes returned by the rest of the code should be passed - to this routine. If we are given anything else, or if other regex - code generates an invalid error code, then the program has a bug. - Dump core so we can fix it. */ - abort (); - - msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); - - msg_size = strlen (msg) + 1; /* Includes the null. */ - - if (BE (errbuf_size != 0, 1)) - { - if (BE (msg_size > errbuf_size, 0)) - { -#if defined HAVE_MEMPCPY || defined _LIBC - *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; -#else - memcpy (errbuf, msg, errbuf_size - 1); - errbuf[errbuf_size - 1] = 0; -#endif - } - else - memcpy (errbuf, msg, msg_size); - } - - return msg_size; -} -#ifdef _LIBC -weak_alias (__regerror, regerror) -#endif - - -#ifdef RE_ENABLE_I18N -/* This static array is used for the map to single-byte characters when - UTF-8 is used. Otherwise we would allocate memory just to initialize - it the same all the time. UTF-8 is the preferred encoding so this is - a worthwhile optimization. */ -static const bitset_t utf8_sb_map = -{ - /* Set the first 128 bits. */ - [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX -}; -#endif - - -static void -free_dfa_content (re_dfa_t *dfa) -{ - int i, j; - - if (dfa->nodes) - for (i = 0; i < dfa->nodes_len; ++i) - free_token (dfa->nodes + i); - re_free (dfa->nexts); - for (i = 0; i < dfa->nodes_len; ++i) - { - if (dfa->eclosures != NULL) - re_node_set_free (dfa->eclosures + i); - if (dfa->inveclosures != NULL) - re_node_set_free (dfa->inveclosures + i); - if (dfa->edests != NULL) - re_node_set_free (dfa->edests + i); - } - re_free (dfa->edests); - re_free (dfa->eclosures); - re_free (dfa->inveclosures); - re_free (dfa->nodes); - - if (dfa->state_table) - for (i = 0; i <= dfa->state_hash_mask; ++i) - { - struct re_state_table_entry *entry = dfa->state_table + i; - for (j = 0; j < entry->num; ++j) - { - re_dfastate_t *state = entry->array[j]; - free_state (state); - } - re_free (entry->array); - } - re_free (dfa->state_table); -#ifdef RE_ENABLE_I18N - if (dfa->sb_char != utf8_sb_map) - re_free (dfa->sb_char); -#endif - re_free (dfa->subexp_map); -#ifdef DEBUG - re_free (dfa->re_str); -#endif - - re_free (dfa); -} - - -/* Free dynamically allocated space used by PREG. */ - -void -regfree (preg) - regex_t *preg; -{ - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - if (BE (dfa != NULL, 1)) - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - - re_free (preg->fastmap); - preg->fastmap = NULL; - - re_free (preg->translate); - preg->translate = NULL; -} -#ifdef _LIBC -weak_alias (__regfree, regfree) -#endif - -/* Entry points compatible with 4.2 BSD regex library. We don't define - them unless specifically requested. */ - -#if defined _REGEX_RE_COMP || defined _LIBC - -/* BSD has one and only one pattern buffer. */ -static struct re_pattern_buffer re_comp_buf; - -char * -# ifdef _LIBC -/* Make these definitions weak in libc, so POSIX programs can redefine - these names if they don't use our functions, and still use - regcomp/regexec above without link errors. */ -weak_function -# endif -re_comp (s) - const char *s; -{ - reg_errcode_t ret; - char *fastmap; - - if (!s) - { - if (!re_comp_buf.buffer) - return gettext ("No previous regular expression"); - return 0; - } - - if (re_comp_buf.buffer) - { - fastmap = re_comp_buf.fastmap; - re_comp_buf.fastmap = NULL; - __regfree (&re_comp_buf); - memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); - re_comp_buf.fastmap = fastmap; - } - - if (re_comp_buf.fastmap == NULL) - { - re_comp_buf.fastmap = (char *) malloc (SBC_MAX); - if (re_comp_buf.fastmap == NULL) - return (char *) gettext (__re_error_msgid - + __re_error_msgid_idx[(int) REG_ESPACE]); - } - - /* Since `re_exec' always passes NULL for the `regs' argument, we - don't need to initialize the pattern buffer fields which affect it. */ - - /* Match anchors at newlines. */ - re_comp_buf.newline_anchor = 1; - - ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); - - if (!ret) - return NULL; - - /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */ - return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); -} - -#ifdef _LIBC -libc_freeres_fn (free_mem) -{ - __regfree (&re_comp_buf); -} -#endif - -#endif /* _REGEX_RE_COMP */ - -/* Internal entry point. - Compile the regular expression PATTERN, whose length is LENGTH. - SYNTAX indicate regular expression's syntax. */ - -static reg_errcode_t -re_compile_internal (regex_t *preg, const char * pattern, size_t length, - reg_syntax_t syntax) -{ - reg_errcode_t err = REG_NOERROR; - re_dfa_t *dfa; - re_string_t regexp; - - /* Initialize the pattern buffer. */ - preg->fastmap_accurate = 0; - preg->syntax = syntax; - preg->not_bol = preg->not_eol = 0; - preg->used = 0; - preg->re_nsub = 0; - preg->can_be_null = 0; - preg->regs_allocated = REGS_UNALLOCATED; - - /* Initialize the dfa. */ - dfa = (re_dfa_t *) preg->buffer; - if (BE (preg->allocated < sizeof (re_dfa_t), 0)) - { - /* If zero allocated, but buffer is non-null, try to realloc - enough space. This loses if buffer's address is bogus, but - that is the user's responsibility. If ->buffer is NULL this - is a simple allocation. */ - dfa = re_realloc (preg->buffer, re_dfa_t, 1); - if (dfa == NULL) - return REG_ESPACE; - preg->allocated = sizeof (re_dfa_t); - preg->buffer = (unsigned char *) dfa; - } - preg->used = sizeof (re_dfa_t); - - err = init_dfa (dfa, length); - if (BE (err != REG_NOERROR, 0)) - { - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - return err; - } -#ifdef DEBUG - /* Note: length+1 will not overflow since it is checked in init_dfa. */ - dfa->re_str = re_malloc (char, length + 1); - strncpy (dfa->re_str, pattern, length + 1); -#endif - - __libc_lock_init (dfa->lock); - - err = re_string_construct (®exp, pattern, length, preg->translate, - syntax & RE_ICASE, dfa); - if (BE (err != REG_NOERROR, 0)) - { - re_compile_internal_free_return: - free_workarea_compile (preg); - re_string_destruct (®exp); - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - return err; - } - - /* Parse the regular expression, and build a structure tree. */ - preg->re_nsub = 0; - dfa->str_tree = parse (®exp, preg, syntax, &err); - if (BE (dfa->str_tree == NULL, 0)) - goto re_compile_internal_free_return; - - /* Analyze the tree and create the nfa. */ - err = analyze (preg); - if (BE (err != REG_NOERROR, 0)) - goto re_compile_internal_free_return; - -#ifdef RE_ENABLE_I18N - /* If possible, do searching in single byte encoding to speed things up. */ - if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) - optimize_utf8 (dfa); -#endif - - /* Then create the initial state of the dfa. */ - err = create_initial_state (dfa); - - /* Release work areas. */ - free_workarea_compile (preg); - re_string_destruct (®exp); - - if (BE (err != REG_NOERROR, 0)) - { - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - } - - return err; -} - -/* Initialize DFA. We use the length of the regular expression PAT_LEN - as the initial length of some arrays. */ - -static reg_errcode_t -init_dfa (re_dfa_t *dfa, size_t pat_len) -{ - unsigned int table_size; -#ifndef _LIBC - char *codeset_name; -#endif - - memset (dfa, '\0', sizeof (re_dfa_t)); - - /* Force allocation of str_tree_storage the first time. */ - dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; - - /* Avoid overflows. */ - if (pat_len == SIZE_MAX) - return REG_ESPACE; - - dfa->nodes_alloc = pat_len + 1; - dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); - - /* table_size = 2 ^ ceil(log pat_len) */ - for (table_size = 1; ; table_size <<= 1) - if (table_size > pat_len) - break; - - dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); - dfa->state_hash_mask = table_size - 1; - - dfa->mb_cur_max = MB_CUR_MAX; -#ifdef _LIBC - if (dfa->mb_cur_max == 6 - && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) - dfa->is_utf8 = 1; - dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) - != 0); -#else -# ifdef HAVE_LANGINFO_CODESET - codeset_name = nl_langinfo (CODESET); -# else - codeset_name = getenv ("LC_ALL"); - if (codeset_name == NULL || codeset_name[0] == '\0') - codeset_name = getenv ("LC_CTYPE"); - if (codeset_name == NULL || codeset_name[0] == '\0') - codeset_name = getenv ("LANG"); - if (codeset_name == NULL) - codeset_name = ""; - else if (strchr (codeset_name, '.') != NULL) - codeset_name = strchr (codeset_name, '.') + 1; -# endif - - if (strcasecmp (codeset_name, "UTF-8") == 0 - || strcasecmp (codeset_name, "UTF8") == 0) - dfa->is_utf8 = 1; - - /* We check exhaustively in the loop below if this charset is a - superset of ASCII. */ - dfa->map_notascii = 0; -#endif - -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - { - if (dfa->is_utf8) - dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; - else - { - int i, j, ch; - - dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); - if (BE (dfa->sb_char == NULL, 0)) - return REG_ESPACE; - - /* Set the bits corresponding to single byte chars. */ - for (i = 0, ch = 0; i < BITSET_WORDS; ++i) - for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) - { - wint_t wch = __btowc (ch); - if (wch != WEOF) - dfa->sb_char[i] |= (bitset_word_t) 1 << j; -# ifndef _LIBC - if (isascii (ch) && wch != ch) - dfa->map_notascii = 1; -# endif - } - } - } -#endif - - if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) - return REG_ESPACE; - return REG_NOERROR; -} - -/* Initialize WORD_CHAR table, which indicate which character is - "word". In this case "word" means that it is the word construction - character used by some operators like "\<", "\>", etc. */ - -static void -internal_function -init_word_char (re_dfa_t *dfa) -{ - dfa->word_ops_used = 1; - int i = 0; - int ch = 0; - if (BE (dfa->map_notascii == 0, 1)) - { - /* Avoid uint32_t and uint64_t as some non-GCC platforms lack - them, an issue when this code is used in Gnulib. */ - bitset_word_t bits0 = 0x00000000; - bitset_word_t bits1 = 0x03ff0000; - bitset_word_t bits2 = 0x87fffffe; - bitset_word_t bits3 = 0x07fffffe; - - if (BITSET_WORD_BITS == 64) - { - /* Pacify gcc -Woverflow on 32-bit platformns. */ - dfa->word_char[0] = bits1 << 31 << 1 | bits0; - dfa->word_char[1] = bits3 << 31 << 1 | bits2; - i = 2; - } - else if (BITSET_WORD_BITS == 32) - { - dfa->word_char[0] = bits0; - dfa->word_char[1] = bits1; - dfa->word_char[2] = bits2; - dfa->word_char[3] = bits3; - i = 4; - } - else - goto general_case; - ch = 128; *** 10468 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Sat Jan 2 15:49:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB2754D43FA; Sat, 2 Jan 2021 15:49: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7RCg6KTSz4Y4F; Sat, 2 Jan 2021 15:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC24417C43; Sat, 2 Jan 2021 15:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 102FnZ3R038506; Sat, 2 Jan 2021 15:49:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 102FnZQU038505; Sat, 2 Jan 2021 15:49:35 GMT (envelope-from git) Date: Sat, 2 Jan 2021 15:49:35 GMT Message-Id: <202101021549.102FnZQU038505@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: 8c45fe5d8ecd - main - bootparamd: Add missing __unused mark. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c45fe5d8ecda4be7564aadaa50712790c6c0a6f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 15:49:36 -0000 The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=8c45fe5d8ecda4be7564aadaa50712790c6c0a6f commit 8c45fe5d8ecda4be7564aadaa50712790c6c0a6f Author: Yoshihiro Takahashi AuthorDate: 2021-01-02 15:40:34 +0000 Commit: Yoshihiro Takahashi CommitDate: 2021-01-02 15:40:34 +0000 bootparamd: Add missing __unused mark. e03764d931d820185a019334259b18df2e3f6b6c did not catch all unused variables. Submitted by: otis MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27894 --- usr.sbin/bootparamd/bootparamd/bootparamd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bootparamd/bootparamd/bootparamd.c b/usr.sbin/bootparamd/bootparamd/bootparamd.c index 7cc57d2427a4..be885de62f55 100644 --- a/usr.sbin/bootparamd/bootparamd/bootparamd.c +++ b/usr.sbin/bootparamd/bootparamd/bootparamd.c @@ -179,7 +179,7 @@ bootparamproc_getfile_1_svc(bp_getfile_arg *getfile, struct svc_req *req __unuse empty answer for the file "dump") */ static int -getthefile(char *l_askname, char *fileid, char *buf, int blen) +getthefile(char *l_askname, char *fileid, char *buf, int blen __unused) { FILE *bpf; char *where; @@ -285,7 +285,7 @@ getthefile(char *l_askname, char *fileid, char *buf, int blen) name for a host in the database */ static int -checkhost(char *l_askname, char *l_hostname, int len) +checkhost(char *l_askname, char *l_hostname, int len __unused) { int ch, pch; FILE *bpf; From owner-dev-commits-src-all@freebsd.org Sat Jan 2 18:18:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85EF74D97B0; Sat, 2 Jan 2021 18:18: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7VWJ3MWHz4kKd; Sat, 2 Jan 2021 18:18:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66A3919C3A; Sat, 2 Jan 2021 18:18:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 102IIKel032105; Sat, 2 Jan 2021 18:18:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 102IIK6C032104; Sat, 2 Jan 2021 18:18:20 GMT (envelope-from git) Date: Sat, 2 Jan 2021 18:18:20 GMT Message-Id: <202101021818.102IIK6C032104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 51a9b978e750 - main - nfs server: improve use of the VFS KPI MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51a9b978e75021415fdced616b4e4bc373a20a8a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 18:18:20 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=51a9b978e75021415fdced616b4e4bc373a20a8a commit 51a9b978e75021415fdced616b4e4bc373a20a8a Author: Konstantin Belousov AuthorDate: 2021-01-01 15:35:44 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-02 18:17:12 +0000 nfs server: improve use of the VFS KPI In particular, do not assume that vn_start_write() returns the same mp as it was passed in, or never returns error. Also be more accurate to return NULL vp and mp when error occured, to catch wrong control flow easier. Stop checking for NULL mp before calling vn_finished_write(), NULL mp is handled transparently by the function. Reviewed by: rmacklem Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27881 --- sys/fs/nfsserver/nfs_nfsdport.c | 33 ++++++++++++++++++++------------- sys/fs/nfsserver/nfs_nfsdsocket.c | 6 ++---- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index e9a9443dc08c..727a83005fa0 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3243,28 +3243,35 @@ nfsd_fhtovp(struct nfsrv_descript *nd, struct nfsrvfh *nfp, int lktype, struct vnode **vpp, struct nfsexstuff *exp, struct mount **mpp, int startwrite) { - struct mount *mp; + struct mount *mp, *mpw; struct ucred *credanon; fhandle_t *fhp; + int error; + if (mpp != NULL) + *mpp = NULL; + *vpp = NULL; fhp = (fhandle_t *)nfp->nfsrvfh_data; - /* - * Check for the special case of the nfsv4root_fh. - */ mp = vfs_busyfs(&fhp->fh_fsid); - if (mpp != NULL) - *mpp = mp; if (mp == NULL) { - *vpp = NULL; nd->nd_repstat = ESTALE; goto out; } if (startwrite) { - vn_start_write(NULL, mpp, V_WAIT); + mpw = mp; + error = vn_start_write(NULL, &mpw, V_WAIT); + if (error != 0) { + mpw = NULL; + vfs_unbusy(mp); + nd->nd_repstat = ESTALE; + goto out; + } if (lktype == LK_SHARED && !(MNT_SHARED_WRITES(mp))) lktype = LK_EXCLUSIVE; - } + } else + mpw = NULL; + nd->nd_repstat = nfsvno_fhtovp(mp, fhp, nd->nd_nam, lktype, vpp, exp, &credanon); vfs_unbusy(mp); @@ -3276,6 +3283,7 @@ nfsd_fhtovp(struct nfsrv_descript *nd, struct nfsrvfh *nfp, int lktype, if (!nd->nd_repstat && exp->nes_exflag == 0 && !(nd->nd_flag & ND_NFSV4)) { vput(*vpp); + *vpp = NULL; nd->nd_repstat = EACCES; } @@ -3336,11 +3344,10 @@ nfsd_fhtovp(struct nfsrv_descript *nd, struct nfsrvfh *nfp, int lktype, if (credanon != NULL) crfree(credanon); if (nd->nd_repstat) { - if (startwrite) - vn_finished_write(mp); + vn_finished_write(mpw); *vpp = NULL; - if (mpp != NULL) - *mpp = NULL; + } else if (mpp != NULL) { + *mpp = mpw; } out: diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c index 530ebb8a8cc8..e9602c352420 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -612,8 +612,7 @@ tryagain: nfsrvd_statstart(nfsv3to4op[nd->nd_procnum], /*now*/ NULL); nfsrvd_statend(nfsv3to4op[nd->nd_procnum], /*bytes*/ 0, /*now*/ NULL, /*then*/ NULL); - if (mp != NULL && nfsrv_writerpc[nd->nd_procnum] != 0) - vn_finished_write(mp); + vn_finished_write(mp); goto out; } @@ -643,8 +642,7 @@ tryagain: error = (*(nfsrv3_procs0[nd->nd_procnum]))(nd, isdgram, vp, &nes); } - if (mp != NULL && nfsrv_writerpc[nd->nd_procnum] != 0) - vn_finished_write(mp); + vn_finished_write(mp); if (error == 0 && nd->nd_repstat == ERELOOKUP) { /* From owner-dev-commits-src-all@freebsd.org Sat Jan 2 18:24:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B9A14D99C9; Sat, 2 Jan 2021 18:24:09 +0000 (UTC) (envelope-from mark@markict.nl) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060d.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1b::60d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7Vdz4qBrz4ksZ; Sat, 2 Jan 2021 18:24:06 +0000 (UTC) (envelope-from mark@markict.nl) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TMah0g6Ud1Avvc5pC+49zMxFko0Y9N7xdy6s7ucaZmznzxLnKbGPf7x6Tav0e+0uzqB6jo/E9zhdEIK90Wkov/No6GyVP5GUbfSeatUiGxisItbmUUsVJOqbFjEkqYUaNiBHUPF21+blTixWR6EpLV3udGq3kzNOJqFCvoeI7JWA1/A09kzlJagy1LjFTOmgIti3gTKJwnb3J40rjcinUgECLGX1udEn9SMqaG+YVKk+x1TuLJ2Mr9YDdaXzDn9YdNdZYcor5wkNoA6JfaTJOFWzh4rvYhCGel8c40s+pgrS1SXqZWkOuZDrSgEOUNXjpKOFOuHMYdsHVE0fY4dLlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/RjjWkeKgLJWmv+ej3TAoR4QZilQBqHlYAwSYx0QelE=; b=YdxXUQb0XUvOEm+ECvXeXaiSsz2Rn9Ut9l5fyZmowxOF4VCy4deRprIfEkUYGZc3VyqB65cfYnlZeTVL4Cb77BCftT+PhgVH6p57WdvHldel7U3IOzlkzeYRyhAfGKiy6bZq/PB9QIz/Znwz1Ob+EU9KHFZcm51OXydBJzKQA+3XVmEtM/3hyLcUOrE0Dz7d5hcfyTRcYmuAzLEBz+YUxWoDUhhinvi3vYn1jg9ILH9mqtgUsbdR2liR9YAjKbuBIfz2WUCepqR3+xxpJmy6/y0PSh+la1S4605kmhDshfTwIQy/P4z6ol0nUf/3VtAL9Dfx6BxwKU6uaXglad+19A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=markict.nl; dmarc=pass action=none header.from=markict.nl; dkim=pass header.d=markict.nl; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=markict.onmicrosoft.com; s=selector2-markict-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/RjjWkeKgLJWmv+ej3TAoR4QZilQBqHlYAwSYx0QelE=; b=Sd0egimdGEB8ugDkbUGHtioUc7npYhs9NmLP6SJRA3umXaWxtsNadhJpvkylVvqIacoX29P3IS30bnIF3qhWNSiFEEYKgmT95uxgxZuok9k5kwIvz54lqEpa4zIstI/gHKv2e7ihCx7fI41lX1AtERkmV2lsXrfk/SLyuoRHNKA= Received: from AM0PR08MB3363.eurprd08.prod.outlook.com (2603:10a6:208:e1::10) by AM0PR08MB3841.eurprd08.prod.outlook.com (2603:10a6:208:106::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20; Sat, 2 Jan 2021 18:24:04 +0000 Received: from AM0PR08MB3363.eurprd08.prod.outlook.com ([fe80::c41d:98df:1cc0:936d]) by AM0PR08MB3363.eurprd08.prod.outlook.com ([fe80::c41d:98df:1cc0:936d%7]) with mapi id 15.20.3721.022; Sat, 2 Jan 2021 18:24:03 +0000 From: Mark de Groot To: "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" Subject: Re: git: 51a9b978e750 - main - nfs server: improve use of the VFS KPI Thread-Topic: git: 51a9b978e750 - main - nfs server: improve use of the VFS KPI Thread-Index: AQHW4TO0nm+xtDwQ5kOsVpcqt3Ohz6oUpmvJ Date: Sat, 2 Jan 2021 18:24:03 +0000 Message-ID: References: <202101021818.102IIK6C032104@gitrepo.freebsd.org> In-Reply-To: <202101021818.102IIK6C032104@gitrepo.freebsd.org> Accept-Language: nl-NL, en-US Content-Language: nl-NL X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [195.64.83.246] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d5fd804c-1aa7-4287-0480-08d8af4b9598 x-ms-traffictypediagnostic: AM0PR08MB3841: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1332; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: t17kdgdvXKrVcVYVzYtJbeM+LWHVnAPccQsk+ZPlhrz4PyPJ0fQQ/UIyaHiA6KRj28sgWBUTK8itzDuZq+pfyXMY5K/o/wQz0+fltg1DspscEDFVRHE1vwuFpVe5IAIqWzUB7qJs948FSFRuYRPIB5YFefJzebc9RkDAALvBy4y260dozIeN1z9N6yJ+Mz48K+8Kv1hf1LqRK3a0fDMNUOnEr0en+/bvbZBMAANLmHY8Qaxk8i3QPc8UUircpwCZhBmCpzplgDGgDONYr4nT0wrDFXaSSEBvWKQge2y48zQysfgTZl+SEcSpWRyhhJbmTCDK6b9lwrNojkbQM3ygRaiQL9qXAFnRbxyouEclelKvzSUlHSz3kLAAs7zavgjKOx3fGNbLLd0iz0VQYyftXdN3v6ED+A6Ee9jqzF8G3HMUsNN+qbX1AQIA18WT5Z0cUIYt6FAZS8F4Zs7xyKPBMw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR08MB3363.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(396003)(39830400003)(376002)(346002)(136003)(66446008)(64756008)(52536014)(186003)(66946007)(478600001)(966005)(76116006)(19627405001)(5660300002)(7696005)(66476007)(66556008)(6506007)(83380400001)(110136005)(166002)(71200400001)(2906002)(8676002)(33656002)(8936002)(86362001)(316002)(26005)(55016002)(9686003)(450100002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?uTZK9Yv2g/4GmDoAMEGXC9ujseoHi+jEyKnxSndH2imrHPomWm5fsrOiwAde?= =?us-ascii?Q?dZp8eyBkSJfAPmpmoi3X0eG7dO1wDlelz5r+R8XTSvxakSbwvAN73ycs3ZHm?= =?us-ascii?Q?UWIXNqbnlR4aG7+1yw1a37SJUrcG6/wabesCgpQIghrJGfDIkI5ii3mDp57i?= =?us-ascii?Q?M+doHr2dbZORNHpKHpu8NsML/oP2JmQghtWJXWcC79qg5W/AEtCmFcolF5hp?= =?us-ascii?Q?gpe/PGi0sxPgfciEZiK4kE3ftl/kx9subWaoZigClbckqvv/i4jbA0hLxyXy?= =?us-ascii?Q?B1sEpqzZduO/hM55zAAQFLPR2utWSHmeA7vY76f2JbMBpWb6jN3427INx/hc?= =?us-ascii?Q?Sug3alBv0xHpL8AAY8R66Ucqqh2IMVIj5breKihvUP8qeJIV6InUlMQQ5Qj8?= =?us-ascii?Q?BcuARZhDMjSSqHctvV9KVXGPXNf9at3LJnmujXyzcjAaFaTFxnbiwe2w3B9/?= =?us-ascii?Q?JyvwHD/byMiqgmG3IKK293vzd38/eaazkC49w9w9NWztC+Ojdx6jPdelwh+T?= =?us-ascii?Q?DzqQYpDGbJqO3Mb3tKcsYViY4iYXSY5hXjAFutns2YEyHlPb0cI1GZc29i/5?= =?us-ascii?Q?0mUpmcCPOPwIuGJZBi+5yVtJ6iKLac5dFLfbybqvRLQMpvU0VfRl36m4Rxcz?= =?us-ascii?Q?7lm+m4mlKHE9c5NPXdNFLpCV2D9j4Il0yZuvNYeSeNkeuOGedQwg2QSTiXsV?= =?us-ascii?Q?l6x68Y0tO8GGp7MRWZlxnSfHynyrcT38HNDNb5hwIuTwUsBJXnoF7Qiu8GLS?= =?us-ascii?Q?uKJ/BGrrpMT71IL308iCkoCIMuYCUSxxp51NoWSzWngdhJ62A1Ru3fqfBsI/?= =?us-ascii?Q?fdjaYnN/kSyMx4VOfTIN6Ad/Q4JaAa0QLdu2XV2AZGsbhnAqdy9hNPZuDpVT?= =?us-ascii?Q?6O2ZAP+UyBFtCqifdkQW/NswVOgZ86A5NAmf90Kg6SxtDnuj/zH7scDx+j7x?= =?us-ascii?Q?mM4L8Vy+NIx2GgqN4BMU+Fkkn1ikgWvZjvDHuru8nsY=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: markict.nl X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR08MB3363.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d5fd804c-1aa7-4287-0480-08d8af4b9598 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jan 2021 18:24:03.8601 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 6f779486-6c93-41bc-a032-73d9e107a037 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: r7Lar2odP7WP3nFOem08ezZJMMUtF3dy4CsWvCoQjHAR2nE72vAROvhPaeu3F3yh X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3841 X-Rspamd-Queue-Id: 4D7Vdz4qBrz4ksZ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=markict.onmicrosoft.com header.s=selector2-markict-onmicrosoft-com header.b=Sd0egimd; arc=pass (microsoft.com:s=arcselector9901:i=1); dmarc=none; spf=pass (mx1.freebsd.org: domain of mark@markict.nl designates 2a01:111:f400:7e1b::60d as permitted sender) smtp.mailfrom=mark@markict.nl X-Spamd-Result: default: False [-4.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:111:f400:7e1b::60d:from]; R_DKIM_ALLOW(-0.20)[markict.onmicrosoft.com:s=selector2-markict-onmicrosoft-com]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEFALL_USER(0.00)[mark]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2a01:111:f400::/48]; DMARC_NA(0.00)[markict.nl]; SPAMHAUS_ZRD(0.00)[2a01:111:f400:7e1b::60d:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[markict.onmicrosoft.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2a01:111:f400:7e1b::60d:from]; TO_DN_EQ_ADDR_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 18:24:09 -0000 unsubscribe ________________________________ Van: owner-dev-commits-src-all@freebsd.org namens Konstantin Belousov Verzonden: zaterdag 2 januari 2021 19:18 Aan: src-committers@FreeBSD.org ; dev-commits-s= rc-all@FreeBSD.org ; dev-commits-src-main@= FreeBSD.org Onderwerp: git: 51a9b978e750 - main - nfs server: improve use of the VFS KP= I The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3D51a9b978e75021415fdced616b4e= 4bc373a20a8a commit 51a9b978e75021415fdced616b4e4bc373a20a8a Author: Konstantin Belousov AuthorDate: 2021-01-01 15:35:44 +0000 Commit: Konstantin Belousov CommitDate: 2021-01-02 18:17:12 +0000 nfs server: improve use of the VFS KPI In particular, do not assume that vn_start_write() returns the same mp as it was passed in, or never returns error. Also be more accurate to return NULL vp and mp when error occured, to catch wrong control flow easier. Stop checking for NULL mp before calling vn_finished_write(), NULL mp is handled transparently by the function. Reviewed by: rmacklem Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27881 --- sys/fs/nfsserver/nfs_nfsdport.c | 33 ++++++++++++++++++++------------- sys/fs/nfsserver/nfs_nfsdsocket.c | 6 ++---- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdpor= t.c index e9a9443dc08c..727a83005fa0 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3243,28 +3243,35 @@ nfsd_fhtovp(struct nfsrv_descript *nd, struct nfsrv= fh *nfp, int lktype, struct vnode **vpp, struct nfsexstuff *exp, struct mount **mpp, int startwrite) { - struct mount *mp; + struct mount *mp, *mpw; struct ucred *credanon; fhandle_t *fhp; + int error; + if (mpp !=3D NULL) + *mpp =3D NULL; + *vpp =3D NULL; fhp =3D (fhandle_t *)nfp->nfsrvfh_data; - /* - * Check for the special case of the nfsv4root_fh. - */ mp =3D vfs_busyfs(&fhp->fh_fsid); - if (mpp !=3D NULL) - *mpp =3D mp; if (mp =3D=3D NULL) { - *vpp =3D NULL; nd->nd_repstat =3D ESTALE; goto out; } if (startwrite) { - vn_start_write(NULL, mpp, V_WAIT); + mpw =3D mp; + error =3D vn_start_write(NULL, &mpw, V_WAIT); + if (error !=3D 0) { + mpw =3D NULL; + vfs_unbusy(mp); + nd->nd_repstat =3D ESTALE; + goto out; + } if (lktype =3D=3D LK_SHARED && !(MNT_SHARED_WRITES(mp))) lktype =3D LK_EXCLUSIVE; - } + } else + mpw =3D NULL; + nd->nd_repstat =3D nfsvno_fhtovp(mp, fhp, nd->nd_nam, lktype, vpp,= exp, &credanon); vfs_unbusy(mp); @@ -3276,6 +3283,7 @@ nfsd_fhtovp(struct nfsrv_descript *nd, struct nfsrvfh= *nfp, int lktype, if (!nd->nd_repstat && exp->nes_exflag =3D=3D 0 && !(nd->nd_flag & ND_NFSV4)) { vput(*vpp); + *vpp =3D NULL; nd->nd_repstat =3D EACCES; } @@ -3336,11 +3344,10 @@ nfsd_fhtovp(struct nfsrv_descript *nd, struct nfsrv= fh *nfp, int lktype, if (credanon !=3D NULL) crfree(credanon); if (nd->nd_repstat) { - if (startwrite) - vn_finished_write(mp); + vn_finished_write(mpw); *vpp =3D NULL; - if (mpp !=3D NULL) - *mpp =3D NULL; + } else if (mpp !=3D NULL) { + *mpp =3D mpw; } out: diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsds= ocket.c index 530ebb8a8cc8..e9602c352420 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -612,8 +612,7 @@ tryagain: nfsrvd_statstart(nfsv3to4op[nd->nd_procnum], /*now*/ NULL)= ; nfsrvd_statend(nfsv3to4op[nd->nd_procnum], /*bytes*/ 0, /*now*/ NULL, /*then*/ NULL); - if (mp !=3D NULL && nfsrv_writerpc[nd->nd_procnum] !=3D 0) - vn_finished_write(mp); + vn_finished_write(mp); goto out; } @@ -643,8 +642,7 @@ tryagain: error =3D (*(nfsrv3_procs0[nd->nd_procnum]))(nd, i= sdgram, vp, &nes); } - if (mp !=3D NULL && nfsrv_writerpc[nd->nd_procnum] !=3D 0) - vn_finished_write(mp); + vn_finished_write(mp); if (error =3D=3D 0 && nd->nd_repstat =3D=3D ERELOOKUP) { /* _______________________________________________ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscribe@freebsd.o= rg" From owner-dev-commits-src-all@freebsd.org Sat Jan 2 19:16:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 189344DBA5D for ; Sat, 2 Jan 2021 19:16: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7WpY0ChMz4pdf; Sat, 2 Jan 2021 19:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE5E81AA0F; Sat, 2 Jan 2021 19:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 102JGadj009643; Sat, 2 Jan 2021 19:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 102JGaLa009642; Sat, 2 Jan 2021 19:16:36 GMT (envelope-from git) Date: Sat, 2 Jan 2021 19:16:36 GMT Message-Id: <202101021916.102JGaLa009642@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Toomas Soome Subject: git: 4211fdfe397c - Create tag vendor/terminus/terminus-font-4.48 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/tags/vendor/terminus/terminus-font-4.48 X-Git-Reftype: annotated tag X-Git-Commit: 4211fdfe397c1264b2d717d1fc72c72ff85cb324 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 19:16:37 -0000 The annotated tag vendor/terminus/terminus-font-4.48 has been created by tsoome: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/terminus/terminus-font-4.48 tag vendor/terminus/terminus-font-4.48 Tagger: Toomas Soome TaggerDate: 2021-01-02 18:52:05 +0000 impoert terminus-font-4.48 commit cee3932f8c02a220d70e48949c7c5ca6e98dfef4 Author: Toomas Soome AuthorDate: 2021-01-02 18:17:37 +0000 Commit: Toomas Soome CommitDate: 2021-01-02 18:51:22 +0000 import terminus-font-4.48 From owner-dev-commits-src-all@freebsd.org Sat Jan 2 19:26:36 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23D374DC4A3; Sat, 2 Jan 2021 19:26: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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7X240Sssz4qg2; Sat, 2 Jan 2021 19:26:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02DC61A4EB; Sat, 2 Jan 2021 19:26:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 102JQZ1H022518; Sat, 2 Jan 2021 19:26:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 102JQZeh022517; Sat, 2 Jan 2021 19:26:35 GMT (envelope-from git) Date: Sat, 2 Jan 2021 19:26:35 GMT Message-Id: <202101021926.102JQZeh022517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 5bcd0b860c7d - main - contrib: setup terminus MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bcd0b860c7d4935db5b290cf932357fc22adf3a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 19:26:36 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=5bcd0b860c7d4935db5b290cf932357fc22adf3a commit 5bcd0b860c7d4935db5b290cf932357fc22adf3a Author: Toomas Soome AuthorDate: 2021-01-02 19:03:28 +0000 Commit: Toomas Soome CommitDate: 2021-01-02 19:03:28 +0000 contrib: setup terminus --- contrib/terminus/75-yes-terminus.conf | 12 - contrib/terminus/CHANGES | 104 - contrib/terminus/COPYING | 1 - contrib/terminus/INSTALL | 1 - contrib/terminus/Makefile | 296 - contrib/terminus/NEWS | 1 - contrib/terminus/README | 356 - contrib/terminus/README-BG | 356 - contrib/terminus/alt/ao2.diff | 3304 -- contrib/terminus/alt/br1.diff | 96349 -------------------------------- contrib/terminus/alt/dv1.diff | 860 - contrib/terminus/alt/ge2.diff | 992 - contrib/terminus/alt/gq2.diff | 304 - contrib/terminus/alt/hi2-dv1.diff | 860 - contrib/terminus/alt/hi2-ka2.diff | 945 - contrib/terminus/alt/hi2.diff | 3199 -- contrib/terminus/alt/ij1.diff | 1360 - contrib/terminus/alt/ka2.diff | 937 - contrib/terminus/alt/ll2.diff | 2983 - contrib/terminus/alt/td1.diff | 236 - contrib/terminus/bin/.eslintrc.js | 135 - contrib/terminus/bin/.pylintrc | 425 - contrib/terminus/bin/bdf.js | 374 - contrib/terminus/bin/bdf.py | 355 - contrib/terminus/bin/bdftofnt.js | 263 - contrib/terminus/bin/bdftofnt.py | 228 - contrib/terminus/bin/bdftopsf.js | 296 - contrib/terminus/bin/bdftopsf.py | 254 - contrib/terminus/bin/bmpf.js | 159 - contrib/terminus/bin/bmpf.py | 147 - contrib/terminus/bin/fncli.js | 173 - contrib/terminus/bin/fncli.py | 154 - contrib/terminus/bin/fnio.js | 213 - contrib/terminus/bin/fnio.py | 141 - contrib/terminus/bin/fnutil.js | 120 - contrib/terminus/bin/fnutil.py | 92 - contrib/terminus/bin/ucstoany.js | 242 - contrib/terminus/bin/ucstoany.py | 204 - contrib/terminus/configure | 66 - contrib/terminus/configure.help | 13 - contrib/terminus/dup/ascii-h.dup | 2 - contrib/terminus/dup/cntrl.dup | 5 - contrib/terminus/dup/ibm-437.dup | 7 - contrib/terminus/dup/ka1.dup | 1 - contrib/terminus/dup/ka2.dup | 1 - contrib/terminus/dup/koi8.dup | 1 - contrib/terminus/dup/vgagr.dup | 8 - contrib/terminus/dup/xos4-2.dup | 107 - contrib/terminus/uni/10646-1.uni | 1353 - contrib/terminus/uni/8859-13.uni | 96 - contrib/terminus/uni/8859-15.uni | 96 - contrib/terminus/uni/8859-16.uni | 96 - contrib/terminus/uni/8859-2.uni | 96 - contrib/terminus/uni/8859-5.uni | 96 - contrib/terminus/uni/8859-7.uni | 96 - contrib/terminus/uni/ascii-h.uni | 96 - contrib/terminus/uni/bg-mik.uni | 128 - contrib/terminus/uni/char0.uni | 32 - contrib/terminus/uni/cntrl.uni | 32 - contrib/terminus/uni/empty.uni | 32 - contrib/terminus/uni/ibm-437.uni | 128 - contrib/terminus/uni/koi8-r.uni | 128 - contrib/terminus/uni/koi8-u.uni | 128 - contrib/terminus/uni/koibm8-r.uni | 128 - contrib/terminus/uni/koibm8-u.uni | 128 - contrib/terminus/uni/nls-1250.uni | 32 - contrib/terminus/uni/pt-154.uni | 128 - contrib/terminus/uni/pt-254.uni | 128 - contrib/terminus/uni/vga-1250.uni | 32 - contrib/terminus/uni/vga-1251.uni | 32 - contrib/terminus/uni/vga-1253.uni | 32 - contrib/terminus/uni/vga-1257.uni | 32 - contrib/terminus/uni/vgagr.uni | 32 - contrib/terminus/uni/win-1250.uni | 128 - contrib/terminus/uni/win-1251.uni | 96 - contrib/terminus/uni/win-1252.uni | 128 - contrib/terminus/uni/win-1253.uni | 128 - contrib/terminus/uni/win-1254.uni | 128 - contrib/terminus/uni/win-1255.uni | 128 - contrib/terminus/uni/win-1257.uni | 96 - contrib/terminus/uni/x11-1251.uni | 32 - contrib/terminus/uni/x11-1257.uni | 32 - contrib/terminus/uni/x11gr.uni | 32 - contrib/terminus/uni/xos4-2.uni | 512 - contrib/terminus/win32/Makefile | 91 - contrib/terminus/win32/build.cmd | 41 - contrib/terminus/win32/fcp.c | 167 - contrib/terminus/win32/make-clean.cmd | 5 - contrib/terminus/win32/ter-font.rc | 132 - contrib/terminus/win32/ter-main.c | 9 - contrib/terminus/win32/terminus.nsi | 307 - 91 files changed, 123171 deletions(-) diff --git a/contrib/terminus/75-yes-terminus.conf b/contrib/terminus/75-yes-terminus.conf deleted file mode 100644 index 5028215fdc48..000000000000 --- a/contrib/terminus/75-yes-terminus.conf +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - Terminus - - - - diff --git a/contrib/terminus/CHANGES b/contrib/terminus/CHANGES deleted file mode 100644 index 4f0f438db566..000000000000 --- a/contrib/terminus/CHANGES +++ /dev/null @@ -1,104 +0,0 @@ -Version 4.48: - - * Added the basic 27 hebrew letters and sheqel, with uppercase height. - * Some improvements in the font build scripts. - -Version 4.47: - - * Added 35 new characters (33 glyphs). - * Replaced ao2-variant "ae" with ao1 "ae", it was too similar to "oe". - * Some fixes and improvements (17 characters in various sizes/styles). - * Significantly improved the font conversion tools. Python 3.5.0 or - Node 6.9.0 are now required to build the font. - -Version 4.46: - - * The X11 8-bit code pages are not installed by default. - * Added IBM-437 8-bit code page for X11. - * The CRT VGA weight for Linux console is not installed by default. - * Removed the Linux console mapping files. - They should be provided by the console packages. - * Removed the BSD console installation. - The recent BSD-s have a new console subsystem. - * Added 50 new characters. Mostly math, but also Buglarian yat and yus. - * Rewritten the font conversion tools in python and javascript. - The full unicode range (17x64K) is now supported. - * The Windows installer can be built from sources. - * Small fixes and improvements (7 characters in various sizes). - * Renamed (un)install-ref to (un)install-psf-ref. - -Version 4.40: - - * Added 6 combining accents as separate characters. - * Added 14 letters with dot above / dot below. - * Added partial subscript and superscript: all digits and 11 letters. - * Added 30+ math characters, notably large braces, brackets and parens. - * Added unicode range 2800-28FF in two variants (br1 and br2). - * A few small character fixes. - * Altered configure to be a bit more POSIX compliant. - * Replaced some obscure (un)install Makefile targets with variables. - -Version 4.39: - - * Added ballot, checkmark, heavy ballot and heavy checkmark. - * Changed HT, LF etc. in sizes 14 and 18-hi2 to be proportional to the - letter height, not the matrix height. - * Added the powerline characters E0A0..E0A2 and E0B0..E0B3. - * Added diameter (2300) - same gluph as empty set (2205). - * Small improvements in size 32. - -Version 4.38: - - * Added 23 pseudographic characters, most notably rounded frames. - * Added new td1 variant with centered ascii tidle. - * Fixed Y acute in sizes 22 and 28, internal optimizations (invisible). - -Version 4.36: - - * Removed the rarely used cm2 variant. - * Added new ll2 variant with more distinctive l. - * Added quotereversed (201B), quotedblreversed (201F), I/i/U/u dotbelow - (1ECA, 1ECB, 1EE4, 1EE5). - * Moved all quotes and alike in size 32 one line down. - * Small fixes and improvements (t commaaccent, quotes alignment etc. in - some sizes). - * Windows installation: creates the relevant registry key. - -Version 4.35: - - * Added hi2 variant for size 18. - * Fixes in size 18: normal V, normal W, bold X, H stroke, some - pseudographic characters and the *NIX installation. - -Version 4.34: - - * Added size 10x18. - * Small fixes and improvements in section, multiply, Eng/eng, Dje, - dje, house, male, zeta and various characters in the different sizes. - * The default cyrillic ghe is now ge1, with ge2 available as an option. - -Version 4.32: - - * Slightly more distintive normal M and W. - * Rounded 28-bold, 32-normal, 32-bold. - Also removed the 32-normal kx2 style. - * Small changes: Che/che stroke, phi, Zhe/zhe etc. - * Linux console: the default bold is now framebuffer. - * Smaller Makefile, GNU make required. - * Changed the font license to SIL OFL 1.1. - It's FSF approved, no need to worry. - * And, as you can see, Terminus Font is now on sourceforge. - -Version 4.30: - - * Added size 22 (not very good). - * Added another 25 characters. - * Various small fixes and improvements. - * Changed the default prefix and x11dir. - -Version 4.28: - - * Heavy frames (written mostly by Tim Allen) and a few more letters. - * Altered trianges and arrows, small bugfixes. - * Reorganized the 512-character console font to include more letters - instead of the IBM-437 specific pseudographics. diff --git a/contrib/terminus/COPYING b/contrib/terminus/COPYING deleted file mode 100644 index 560ba7c967fd..000000000000 --- a/contrib/terminus/COPYING +++ /dev/null @@ -1 +0,0 @@ -See OFL.TXT diff --git a/contrib/terminus/INSTALL b/contrib/terminus/INSTALL deleted file mode 100644 index 3083f1afd50c..000000000000 --- a/contrib/terminus/INSTALL +++ /dev/null @@ -1 +0,0 @@ -See README diff --git a/contrib/terminus/Makefile b/contrib/terminus/Makefile deleted file mode 100644 index d3b1d12d5e1a..000000000000 --- a/contrib/terminus/Makefile +++ /dev/null @@ -1,296 +0,0 @@ -INT = python3 -EXT = py -BIN = ./bin - -UCS2ANY = $(INT) $(BIN)/ucstoany.$(EXT) -BDF2PSF = $(INT) $(BIN)/bdftopsf.$(EXT) -UCS2X11 = $(INT) $(BIN)/ucstoany.$(EXT) -f -BDF2PCF = bdftopcf - -REG_8859_1 = ISO8859 1 -REG_8859_2 = ISO8859 2 -REG_8859_5 = ISO8859 5 -REG_8859_7 = ISO8859 7 -REG_8859_9 = ISO8859 9 -REG_MS_1251 = Microsoft CP1251 -REG_8859_13 = ISO8859 13 -REG_8859_15 = ISO8859 15 -REG_8859_16 = ISO8859 16 -REG_MS_1255 = Microsoft CP1255 -REG_IBM_437 = IBM CP437 -REG_KOI8_R = KOI8 R -REG_KOI8_U = KOI8 U -REG_BG_MIK = Bulgarian MIK -REG_PT_154 = Paratype PT154 -REG_XOS4_2 = XOS4 2 -REG_10646_1 = ISO10646 1 - -PSF_8859_1 = ter-112n.psf ter-114n.psf ter-114b.psf ter-116n.psf ter-116b.psf ter-118n.psf ter-118b.psf ter-120n.psf ter-120b.psf ter-122n.psf ter-122b.psf ter-124n.psf ter-124b.psf ter-128n.psf ter-128b.psf ter-132n.psf ter-132b.psf -PSF_8859_2 = ter-212n.psf ter-214n.psf ter-214b.psf ter-216n.psf ter-216b.psf ter-218n.psf ter-218b.psf ter-220n.psf ter-220b.psf ter-222n.psf ter-222b.psf ter-224n.psf ter-224b.psf ter-228n.psf ter-228b.psf ter-232n.psf ter-232b.psf -PSF_8859_7 = ter-712n.psf ter-714n.psf ter-714b.psf ter-716n.psf ter-716b.psf ter-718n.psf ter-718b.psf ter-720n.psf ter-720b.psf ter-722n.psf ter-722b.psf ter-724n.psf ter-724b.psf ter-728n.psf ter-728b.psf ter-732n.psf ter-732b.psf -PSF_8859_9 = ter-912n.psf ter-914n.psf ter-914b.psf ter-916n.psf ter-916b.psf ter-918n.psf ter-918b.psf ter-920n.psf ter-920b.psf ter-922n.psf ter-922b.psf ter-924n.psf ter-924b.psf ter-928n.psf ter-928b.psf ter-932n.psf ter-932b.psf -PSF_MS_1251 = ter-c12n.psf ter-c14n.psf ter-c14b.psf ter-c16n.psf ter-c16b.psf ter-c18n.psf ter-c18b.psf ter-c20n.psf ter-c20b.psf ter-c22n.psf ter-c22b.psf ter-c24n.psf ter-c24b.psf ter-c28n.psf ter-c28b.psf ter-c32n.psf ter-c32b.psf -PSF_8859_13 = ter-d12n.psf ter-d14n.psf ter-d14b.psf ter-d16n.psf ter-d16b.psf ter-d18n.psf ter-d18b.psf ter-d20n.psf ter-d20b.psf ter-d22n.psf ter-d22b.psf ter-d24n.psf ter-d24b.psf ter-d28n.psf ter-d28b.psf ter-d32n.psf ter-d32b.psf -PSF_8859_16 = ter-g12n.psf ter-g14n.psf ter-g14b.psf ter-g16n.psf ter-g16b.psf ter-g18n.psf ter-g18b.psf ter-g20n.psf ter-g20b.psf ter-g22n.psf ter-g22b.psf ter-g24n.psf ter-g24b.psf ter-g28n.psf ter-g28b.psf ter-g32n.psf ter-g32b.psf -PSF_MS_1255 = ter-h12n.psf ter-h14n.psf ter-h14b.psf ter-h16n.psf ter-h16b.psf ter-h18n.psf ter-h18b.psf ter-h20n.psf ter-h20b.psf ter-h22n.psf ter-h22b.psf ter-h24n.psf ter-h24b.psf ter-h28n.psf ter-h28b.psf ter-h32n.psf ter-h32b.psf -PSF_IBM_437 = ter-i12n.psf ter-i14n.psf ter-i14b.psf ter-i16n.psf ter-i16b.psf ter-i18n.psf ter-i18b.psf ter-i20n.psf ter-i20b.psf ter-i22n.psf ter-i22b.psf ter-i24n.psf ter-i24b.psf ter-i28n.psf ter-i28b.psf ter-i32n.psf ter-i32b.psf -PSF_KOI8_RV = ter-k14n.psf ter-k14b.psf ter-k16n.psf ter-k16b.psf -PSF_KOI8_R = ter-k12n.psf ter-k18n.psf ter-k18b.psf ter-k20n.psf ter-k20b.psf ter-k22n.psf ter-k22b.psf ter-k24n.psf ter-k24b.psf ter-k28n.psf ter-k28b.psf ter-k32n.psf ter-k32b.psf -PSF_BG_MIK = ter-m12n.psf ter-m14n.psf ter-m14b.psf ter-m16n.psf ter-m16b.psf ter-m18n.psf ter-m18b.psf ter-m20n.psf ter-m20b.psf ter-m22n.psf ter-m22b.psf ter-m24n.psf ter-m24b.psf ter-m28n.psf ter-m28b.psf ter-m32n.psf ter-m32b.psf -PSF_PT_154 = ter-p12n.psf ter-p14n.psf ter-p14b.psf ter-p16n.psf ter-p16b.psf ter-p18n.psf ter-p18b.psf ter-p20n.psf ter-p20b.psf ter-p22n.psf ter-p22b.psf ter-p24n.psf ter-p24b.psf ter-p28n.psf ter-p28b.psf ter-p32n.psf ter-p32b.psf -PSF_KOI8_UV = ter-u14n.psf ter-u14b.psf ter-u16n.psf ter-u16b.psf -PSF_KOI8_U = ter-u12n.psf ter-u18n.psf ter-u18b.psf ter-u20n.psf ter-u20b.psf ter-u22n.psf ter-u22b.psf ter-u24n.psf ter-u24b.psf ter-u28n.psf ter-u28b.psf ter-u32n.psf ter-u32b.psf -PSF_XOS4_2 = ter-v12n.psf ter-v14n.psf ter-v14b.psf ter-v16n.psf ter-v16b.psf ter-v18n.psf ter-v18b.psf ter-v20n.psf ter-v20b.psf ter-v22n.psf ter-v22b.psf ter-v24n.psf ter-v24b.psf ter-v28n.psf ter-v28b.psf ter-v32n.psf ter-v32b.psf -PSF = $(PSF_8859_1) $(PSF_8859_2) $(PSF_8859_7) $(PSF_8859_9) $(PSF_MS_1251) $(PSF_8859_13) $(PSF_8859_16) $(PSF_MS_1255) $(PSF_IBM_437) $(PSF_KOI8_RV) $(PSF_KOI8_R) $(PSF_BG_MIK) $(PSF_PT_154) $(PSF_KOI8_UV) $(PSF_KOI8_U) $(PSF_XOS4_2) - -PSF_VGAW_8859_1 = ter-114v.psf ter-116v.psf -PSF_VGAW_8859_2 = ter-214v.psf ter-216v.psf -PSF_VGAW_8859_7 = ter-714v.psf ter-716v.psf -PSF_VGAW_8859_9 = ter-914v.psf ter-916v.psf -PSF_VGAW_MS_1251 = ter-c14v.psf ter-c16v.psf -PSF_VGAW_8859_13 = ter-d14v.psf ter-d16v.psf -PSF_VGAW_8859_16 = ter-g14v.psf ter-g16v.psf -PSF_VGAW_MS_1255 = ter-h14v.psf ter-h16v.psf -PSF_VGAW_IBM_437 = ter-i14v.psf ter-i16v.psf -PSF_VGAW_KOI8_RV = ter-k14v.psf ter-k16v.psf -PSF_VGAW_BG_MIK = ter-m14v.psf ter-m16v.psf -PSF_VGAW_PT_154 = ter-p14v.psf ter-p16v.psf -PSF_VGAW_KOI8_UV = ter-u14v.psf ter-u16v.psf -PSF_VGAW_XOS4_2 = ter-v14v.psf ter-v16v.psf -PSF_VGAW = $(PSF_VGAW_8859_1) $(PSF_VGAW_8859_2) $(PSF_VGAW_8859_7) $(PSF_VGAW_8859_9) $(PSF_VGAW_MS_1251) $(PSF_VGAW_8859_13) $(PSF_VGAW_8859_16) $(PSF_VGAW_MS_1255) $(PSF_VGAW_IBM_437) $(PSF_VGAW_KOI8_RV) $(PSF_VGAW_BG_MIK) $(PSF_VGAW_PT_154) $(PSF_VGAW_KOI8_UV) $(PSF_VGAW_XOS4_2) - -PCF_8859_1 = ter-112n.pcf ter-112b.pcf ter-114n.pcf ter-114b.pcf ter-116n.pcf ter-116b.pcf ter-118n.pcf ter-118b.pcf ter-120n.pcf ter-120b.pcf ter-122n.pcf ter-122b.pcf ter-124n.pcf ter-124b.pcf ter-128n.pcf ter-128b.pcf ter-132n.pcf ter-132b.pcf -PCF_8859_2 = ter-212n.pcf ter-212b.pcf ter-214n.pcf ter-214b.pcf ter-216n.pcf ter-216b.pcf ter-218n.pcf ter-218b.pcf ter-220n.pcf ter-220b.pcf ter-222n.pcf ter-222b.pcf ter-224n.pcf ter-224b.pcf ter-228n.pcf ter-228b.pcf ter-232n.pcf ter-232b.pcf -PCF_8859_5 = ter-512n.pcf ter-512b.pcf ter-514n.pcf ter-514b.pcf ter-516n.pcf ter-516b.pcf ter-518n.pcf ter-518b.pcf ter-520n.pcf ter-520b.pcf ter-522n.pcf ter-522b.pcf ter-524n.pcf ter-524b.pcf ter-528n.pcf ter-528b.pcf ter-532n.pcf ter-532b.pcf -PCF_8859_7 = ter-712n.pcf ter-712b.pcf ter-714n.pcf ter-714b.pcf ter-716n.pcf ter-716b.pcf ter-718n.pcf ter-718b.pcf ter-720n.pcf ter-720b.pcf ter-722n.pcf ter-722b.pcf ter-724n.pcf ter-724b.pcf ter-728n.pcf ter-728b.pcf ter-732n.pcf ter-732b.pcf -PCF_8859_9 = ter-912n.pcf ter-912b.pcf ter-914n.pcf ter-914b.pcf ter-916n.pcf ter-916b.pcf ter-918n.pcf ter-918b.pcf ter-920n.pcf ter-920b.pcf ter-922n.pcf ter-922b.pcf ter-924n.pcf ter-924b.pcf ter-928n.pcf ter-928b.pcf ter-932n.pcf ter-932b.pcf -PCF_MS_1251 = ter-c12n.pcf ter-c12b.pcf ter-c14n.pcf ter-c14b.pcf ter-c16n.pcf ter-c16b.pcf ter-c18n.pcf ter-c18b.pcf ter-c20n.pcf ter-c20b.pcf ter-c22n.pcf ter-c22b.pcf ter-c24n.pcf ter-c24b.pcf ter-c28n.pcf ter-c28b.pcf ter-c32n.pcf ter-c32b.pcf -PCF_8859_13 = ter-d12n.pcf ter-d12b.pcf ter-d14n.pcf ter-d14b.pcf ter-d16n.pcf ter-d16b.pcf ter-d18n.pcf ter-d18b.pcf ter-d20n.pcf ter-d20b.pcf ter-d22n.pcf ter-d22b.pcf ter-d24n.pcf ter-d24b.pcf ter-d28n.pcf ter-d28b.pcf ter-d32n.pcf ter-d32b.pcf -PCF_8859_15 = ter-f12n.pcf ter-f12b.pcf ter-f14n.pcf ter-f14b.pcf ter-f16n.pcf ter-f16b.pcf ter-f18n.pcf ter-f18b.pcf ter-f20n.pcf ter-f20b.pcf ter-f22n.pcf ter-f22b.pcf ter-f24n.pcf ter-f24b.pcf ter-f28n.pcf ter-f28b.pcf ter-f32n.pcf ter-f32b.pcf -PCF_8859_16 = ter-g12n.pcf ter-g12b.pcf ter-g14n.pcf ter-g14b.pcf ter-g16n.pcf ter-g16b.pcf ter-g18n.pcf ter-g18b.pcf ter-g20n.pcf ter-g20b.pcf ter-g22n.pcf ter-g22b.pcf ter-g24n.pcf ter-g24b.pcf ter-g28n.pcf ter-g28b.pcf ter-g32n.pcf ter-g32b.pcf -PCF_IBM_437 = ter-i12n.pcf ter-i12b.pcf ter-i14n.pcf ter-i14b.pcf ter-i16n.pcf ter-i16b.pcf ter-i18n.pcf ter-i18b.pcf ter-i20n.pcf ter-i20b.pcf ter-i22n.pcf ter-i22b.pcf ter-i24n.pcf ter-i24b.pcf ter-i28n.pcf ter-i28b.pcf ter-i32n.pcf ter-i32b.pcf -PCF_KOI8_R = ter-k12n.pcf ter-k12b.pcf ter-k14n.pcf ter-k14b.pcf ter-k16n.pcf ter-k16b.pcf ter-k18n.pcf ter-k18b.pcf ter-k20n.pcf ter-k20b.pcf ter-k22n.pcf ter-k22b.pcf ter-k24n.pcf ter-k24b.pcf ter-k28n.pcf ter-k28b.pcf ter-k32n.pcf ter-k32b.pcf -PCF_PT_154 = ter-p12n.pcf ter-p12b.pcf ter-p14n.pcf ter-p14b.pcf ter-p16n.pcf ter-p16b.pcf ter-p18n.pcf ter-p18b.pcf ter-p20n.pcf ter-p20b.pcf ter-p22n.pcf ter-p22b.pcf ter-p24n.pcf ter-p24b.pcf ter-p28n.pcf ter-p28b.pcf ter-p32n.pcf ter-p32b.pcf -PCF_KOI8_U = ter-u12n.pcf ter-u12b.pcf ter-u14n.pcf ter-u14b.pcf ter-u16n.pcf ter-u16b.pcf ter-u18n.pcf ter-u18b.pcf ter-u20n.pcf ter-u20b.pcf ter-u22n.pcf ter-u22b.pcf ter-u24n.pcf ter-u24b.pcf ter-u28n.pcf ter-u28b.pcf ter-u32n.pcf ter-u32b.pcf -PCF_10646_1 = ter-x12n.pcf ter-x12b.pcf ter-x14n.pcf ter-x14b.pcf ter-x16n.pcf ter-x16b.pcf ter-x18n.pcf ter-x18b.pcf ter-x20n.pcf ter-x20b.pcf ter-x22n.pcf ter-x22b.pcf ter-x24n.pcf ter-x24b.pcf ter-x28n.pcf ter-x28b.pcf ter-x32n.pcf ter-x32b.pcf -PCF_8BIT = $(PCF_8859_1) $(PCF_8859_2) $(PCF_8859_5) $(PCF_8859_7) $(PCF_8859_9) $(PCF_MS_1251) $(PCF_8859_13) $(PCF_8859_15) $(PCF_8859_16) $(PCF_IBM_437) $(PCF_KOI8_R) $(PCF_PT_154) $(PCF_KOI8_U) -PCF = $(PCF_10646_1) - -# Default - -all: $(PSF) $(PCF) - -DESTDIR = -prefix = /usr/local -psfdir = $(prefix)/share/consolefonts -x11dir = $(prefix)/share/fonts/terminus - -install: $(PSF) $(PCF) - mkdir -p $(DESTDIR)$(psfdir) - for i in $(PSF) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done - mkdir -p $(DESTDIR)$(x11dir) - for i in $(PCF) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done - -uninstall: - for i in $(PSF) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done - for i in $(PCF) ; do rm -f $(DESTDIR)$(x11dir)/$$i.gz ; done - -fontdir: - mkfontscale $(DESTDIR)$(x11dir) - mkfontdir $(DESTDIR)$(x11dir) - fc-cache -f $(DESTDIR)$(x11dir) - -# Linux Console - -VGA_8859_1 = uni/vgagr.uni uni/ascii-h.uni uni/win-1252.uni -VGA_8859_2 = uni/vgagr.uni uni/ascii-h.uni uni/vga-1250.uni uni/8859-2.uni -VGA_8859_7 = uni/vgagr.uni uni/ascii-h.uni uni/vga-1253.uni uni/8859-7.uni -VGA_8859_9 = uni/vgagr.uni uni/ascii-h.uni uni/win-1254.uni -VGA_MS_1251 = uni/vgagr.uni uni/ascii-h.uni uni/vga-1251.uni uni/win-1251.uni -VGA_8859_13 = uni/vgagr.uni uni/ascii-h.uni uni/vga-1257.uni uni/8859-13.uni -VGA_8859_16 = uni/vgagr.uni uni/ascii-h.uni uni/nls-1250.uni uni/8859-16.uni -VGA_MS_1255 = uni/vgagr.uni uni/ascii-h.uni uni/win-1255.uni -VGA_IBM_437 = uni/cntrl.uni uni/ascii-h.uni uni/ibm-437.uni -VGA_KOI8_RV = uni/cntrl.uni uni/ascii-h.uni uni/koibm8-r.uni -VGA_KOI8_R = uni/cntrl.uni uni/ascii-h.uni uni/koi8-r.uni -VGA_BG_MIK = uni/cntrl.uni uni/ascii-h.uni uni/bg-mik.uni -VGA_PT_154 = uni/vgagr.uni uni/ascii-h.uni uni/pt-154.uni -VGA_KOI8_UV = uni/cntrl.uni uni/ascii-h.uni uni/koibm8-u.uni -VGA_KOI8_U = uni/cntrl.uni uni/ascii-h.uni uni/koi8-u.uni -VGA_XOS4_2 = uni/xos4-2.uni - -DUP_8859_1 = dup/vgagr.dup dup/ascii-h.dup -DUP_8859_2 = dup/vgagr.dup dup/ascii-h.dup -DUP_8859_7 = dup/vgagr.dup dup/ascii-h.dup -DUP_8859_9 = dup/vgagr.dup dup/ascii-h.dup -DUP_MS_1251 = dup/vgagr.dup dup/ascii-h.dup -DUP_8859_13 = dup/vgagr.dup dup/ascii-h.dup -DUP_8859_16 = dup/vgagr.dup dup/ascii-h.dup -DUP_MS_1255 = dup/vgagr.dup dup/ascii-h.dup -DUP_IBM_437 = dup/cntrl.dup dup/ascii-h.dup dup/ibm-437.dup -DUP_KOI8_RV = dup/cntrl.dup dup/ascii-h.dup dup/koi8.dup -DUP_KOI8_R = dup/cntrl.dup dup/ascii-h.dup dup/koi8.dup -DUP_BG_MIK = dup/cntrl.dup dup/ascii-h.dup dup/ibm-437.dup -DUP_PT_154 = dup/vgagr.dup dup/ascii-h.dup -DUP_KOI8_UV = dup/cntrl.dup dup/ascii-h.dup dup/koi8.dup -DUP_KOI8_U = dup/cntrl.dup dup/ascii-h.dup dup/koi8.dup -DUP_XOS4_2 = dup/vgagr.dup dup/xos4-2.dup - -$(PSF_8859_1) $(PSF_VGAW_8859_1): ter-1%.psf : ter-u%.bdf $(VGA_8859_1) $(DUP_8859_1) - $(UCS2ANY) $< $(REG_8859_1) $(VGA_8859_1) | $(BDF2PSF) -o $@ $(DUP_8859_1) - -$(PSF_8859_2) $(PSF_VGAW_8859_2): ter-2%.psf : ter-u%.bdf $(VGA_8859_2) $(DUP_8859_2) - $(UCS2ANY) $< $(REG_8859_2) $(VGA_8859_2) | $(BDF2PSF) -o $@ $(DUP_8859_2) - -$(PSF_8859_7) $(PSF_VGAW_8859_7): ter-7%.psf : ter-u%.bdf $(VGA_8859_7) $(DUP_8859_7) - $(UCS2ANY) $< $(REG_8859_7) $(VGA_8859_7) | $(BDF2PSF) -o $@ $(DUP_8859_7) - -$(PSF_8859_9) $(PSF_VGAW_8859_9): ter-9%.psf : ter-u%.bdf $(VGA_8859_9) $(DUP_8859_9) - $(UCS2ANY) $< $(REG_8859_9) $(VGA_8859_9) | $(BDF2PSF) -o $@ $(DUP_8859_9) - -$(PSF_MS_1251) $(PSF_VGAW_MS_1251): ter-c%.psf : ter-u%.bdf $(VGA_MS_1251) $(DUP_MS_1251) - $(UCS2ANY) $< $(REG_MS_1251) $(VGA_MS_1251) | $(BDF2PSF) -o $@ $(DUP_MS_1251) - -$(PSF_8859_13) $(PSF_VGAW_8859_13): ter-d%.psf : ter-u%.bdf $(VGA_8859_13) $(DUP_8859_13) - $(UCS2ANY) $< $(REG_8859_13) $(VGA_8859_13) | $(BDF2PSF) -o $@ $(DUP_8859_13) - -$(PSF_8859_16) $(PSF_VGAW_8859_16): ter-g%.psf : ter-u%.bdf $(VGA_8859_16) $(DUP_8859_16) - $(UCS2ANY) $< $(REG_8859_16) $(VGA_8859_16) | $(BDF2PSF) -o $@ $(DUP_8859_16) - -$(PSF_MS_1255) $(PSF_VGAW_MS_1255): ter-h%.psf : ter-u%.bdf $(VGA_MS_1255) $(DUP_MS_1255) - $(UCS2ANY) $< $(REG_MS_1255) $(VGA_MS_1255) | $(BDF2PSF) -o $@ $(DUP_MS_1255) - -$(PSF_IBM_437) $(PSF_VGAW_IBM_437): ter-i%.psf : ter-u%.bdf $(VGA_IBM_437) $(DUP_IBM_437) - $(UCS2ANY) $< $(REG_IBM_437) $(VGA_IBM_437) | $(BDF2PSF) -o $@ $(DUP_IBM_437) - -$(PSF_KOI8_RV) $(PSF_VGAW_KOI8_RV): ter-k%.psf : ter-u%.bdf $(VGA_KOI8_RV) $(DUP_KOI8_RV) - $(UCS2ANY) $< $(REG_KOI8_R) $(VGA_KOI8_RV) | $(BDF2PSF) -o $@ $(DUP_KOI8_RV) - -$(PSF_KOI8_R): ter-k%.psf : ter-u%.bdf $(VGA_KOI8_R) $(DUP_KOI8_R) - $(UCS2ANY) $< $(REG_KOI8_R) $(VGA_KOI8_R) | $(BDF2PSF) -o $@ $(DUP_KOI8_R) - -$(PSF_BG_MIK) $(PSF_VGAW_BG_MIK): ter-m%.psf : ter-u%.bdf $(VGA_BG_MIK) $(DUP_BG_MIK) - $(UCS2ANY) $< $(REG_BG_MIK) $(VGA_BG_MIK) | $(BDF2PSF) -o $@ $(DUP_BG_MIK) - -$(PSF_PT_154) $(PSF_VGAW_PT_154): ter-p%.psf : ter-u%.bdf $(VGA_PT_154) $(DUP_PT_154) - $(UCS2ANY) $< $(REG_PT_154) $(VGA_PT_154) | $(BDF2PSF) -o $@ $(DUP_PT_154) - -$(PSF_KOI8_UV) $(PSF_VGAW_KOI8_UV): ter-u%.psf : ter-u%.bdf $(VGA_KOI8_UV) $(DUP_KOI8_UV) - $(UCS2ANY) $< $(REG_KOI8_R) $(VGA_KOI8_UV) | $(BDF2PSF) -o $@ $(DUP_KOI8_UV) - -$(PSF_KOI8_U): ter-u%.psf : ter-u%.bdf $(VGA_KOI8_U) $(DUP_KOI8_U) - $(UCS2ANY) $< $(REG_KOI8_U) $(VGA_KOI8_U) | $(BDF2PSF) -o $@ $(DUP_KOI8_U) - -$(PSF_XOS4_2) $(PSF_VGAW_XOS4_2): ter-v%.psf : ter-u%.bdf $(VGA_XOS4_2) $(DUP_XOS4_2) - $(UCS2ANY) $< $(REG_XOS4_2) $(VGA_XOS4_2) | $(BDF2PSF) -o $@ $(DUP_XOS4_2) - -psf: $(PSF) - -install-psf: $(PSF) - mkdir -p $(DESTDIR)$(psfdir) - for i in $(PSF) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done - -uninstall-psf: - for i in $(PSF) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done - -psf-vgaw: $(PSF_VGAW) - -install-psf-vgaw: $(PSF_VGAW) - mkdir -p $(DESTDIR)$(psfdir) - for i in $(PSF_VGAW) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done - -uninstall-psf-vgaw: - for i in $(PSF_VGAW) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done - -psfref = $(psfdir)/README.terminus - -install-psf-ref: README - mkdir -p $(DESTDIR)$(psfdir) - sed -e"/^2\.4/,/^2\.5/p" -n README | grep -v "^2\." > $(DESTDIR)$(psfref) - -uninstall-psf-ref: - rm -f $(DESTDIR)$(psfref) - -# X11 Window System - -X11_8859_1 = uni/x11gr.uni uni/ascii-h.uni uni/win-1252.uni -X11_8859_2 = uni/x11gr.uni uni/ascii-h.uni uni/empty.uni uni/8859-2.uni -X11_8859_5 = uni/x11gr.uni uni/ascii-h.uni uni/empty.uni uni/8859-5.uni -X11_8859_7 = uni/x11gr.uni uni/ascii-h.uni uni/empty.uni uni/8859-7.uni -X11_8859_9 = uni/x11gr.uni uni/ascii-h.uni uni/win-1254.uni -X11_MS_1251 = uni/x11gr.uni uni/ascii-h.uni uni/x11-1251.uni uni/win-1251.uni -X11_8859_13 = uni/x11gr.uni uni/ascii-h.uni uni/x11-1257.uni uni/8859-13.uni -X11_8859_15 = uni/x11gr.uni uni/ascii-h.uni uni/empty.uni uni/8859-15.uni -X11_8859_16 = uni/x11gr.uni uni/ascii-h.uni uni/empty.uni uni/8859-16.uni -X11_IBM_437 = uni/cntrl.uni uni/ascii-h.uni uni/ibm-437.uni -X11_KOI8_R = uni/x11gr.uni uni/ascii-h.uni uni/koi8-r.uni -X11_PT_154 = uni/x11gr.uni uni/ascii-h.uni uni/pt-154.uni -X11_KOI8_U = uni/x11gr.uni uni/ascii-h.uni uni/koi8-u.uni -X11_10646_1 = uni/x11gr.uni uni/10646-1.uni - -$(PCF_8859_1): ter-1%.pcf : ter-u%.bdf $(X11_8859_1) - $(UCS2X11) $< $(REG_8859_1) $(X11_8859_1) | $(BDF2PCF) -o $@ - -$(PCF_8859_2): ter-2%.pcf : ter-u%.bdf $(X11_8859_2) - $(UCS2X11) $< $(REG_8859_2) $(X11_8859_2) | $(BDF2PCF) -o $@ - -$(PCF_8859_5): ter-5%.pcf : ter-u%.bdf $(X11_8859_5) - $(UCS2X11) $< $(REG_8859_5) $(X11_8859_5) | $(BDF2PCF) -o $@ - -$(PCF_8859_7): ter-7%.pcf : ter-u%.bdf $(X11_8859_7) - $(UCS2X11) $< $(REG_8859_7) $(X11_8859_7) | $(BDF2PCF) -o $@ - -$(PCF_8859_9): ter-9%.pcf : ter-u%.bdf $(X11_8859_9) - $(UCS2X11) $< $(REG_8859_9) $(X11_8859_9) | $(BDF2PCF) -o $@ - -$(PCF_MS_1251): ter-c%.pcf : ter-u%.bdf $(X11_MS_1251) - $(UCS2X11) $< $(REG_MS_1251) $(X11_MS_1251) | $(BDF2PCF) -o $@ - -$(PCF_8859_13): ter-d%.pcf : ter-u%.bdf $(X11_8859_13) - $(UCS2X11) $< $(REG_8859_13) $(X11_8859_13) | $(BDF2PCF) -o $@ - -$(PCF_8859_15): ter-f%.pcf : ter-u%.bdf $(X11_8859_15) - $(UCS2X11) $< $(REG_8859_15) $(X11_8859_15) | $(BDF2PCF) -o $@ - -$(PCF_8859_16): ter-g%.pcf : ter-u%.bdf $(X11_8859_16) - $(UCS2X11) $< $(REG_8859_16) $(X11_8859_16) | $(BDF2PCF) -o $@ - -$(PCF_IBM_437): ter-i%.pcf : ter-u%.bdf $(X11_IBM_437) - $(UCS2X11) $< $(REG_IBM_437) $(X11_IBM_437) | $(BDF2PCF) -o $@ - -$(PCF_KOI8_R): ter-k%.pcf : ter-u%.bdf $(X11_KOI8_R) - $(UCS2X11) $< $(REG_KOI8_R) $(X11_KOI8_R) | $(BDF2PCF) -o $@ - -$(PCF_PT_154): ter-p%.pcf : ter-u%.bdf $(X11_PT_154) - $(UCS2X11) $< $(REG_PT_154) $(X11_PT_154) | $(BDF2PCF) -o $@ - -$(PCF_KOI8_U): ter-u%.pcf : ter-u%.bdf $(X11_KOI8_U) - $(UCS2X11) $< $(REG_KOI8_U) $(X11_KOI8_U) | $(BDF2PCF) -o $@ - -$(PCF_10646_1): ter-x%.pcf : ter-u%.bdf $(X11_10646_1) - $(UCS2X11) $< $(REG_10646_1) $(X11_10646_1) | $(BDF2PCF) -o $@ - -pcf: $(PCF) - -install-pcf: $(PCF) - mkdir -p $(DESTDIR)$(x11dir) - for i in $(PCF) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done - -uninstall-pcf: - for i in $(PCF) ; do rm -f $(DESTDIR)$(x11dir)/$$i.gz ; done - -pcf-8bit: $(PCF_8BIT) - -install-pcf-8bit: $(PCF_8BIT) - mkdir -p $(DESTDIR)$(x11dir) - for i in $(PCF_8BIT) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done - -uninstall-pcf-8bit: - for i in $(PCF_8BIT) ; do rm -f $(DESTDIR)$(x11dir)/$$i.gz ; done - -# Cleanup - -clean: - rm -f $(PSF) $(PSF_VGAW) $(PCF) $(PCF_8BIT) $(FNT) - -.PHONY: all install uninstall fontdir psf install-psf uninstall-psf psf-vgaw install-psf-vgaw uninstall-psf-vgaw install-psf-ref uninstall-psf-ref pcf install-pcf uninstall-pcf pcf-8bit install-pcf-8bit uninstall-pcf-8bit clean diff --git a/contrib/terminus/NEWS b/contrib/terminus/NEWS deleted file mode 100644 index b985538af842..000000000000 --- a/contrib/terminus/NEWS +++ /dev/null @@ -1 +0,0 @@ -See CHANGES diff --git a/contrib/terminus/README b/contrib/terminus/README deleted file mode 100644 index 9192aac61eb0..000000000000 --- a/contrib/terminus/README +++ /dev/null @@ -1,356 +0,0 @@ -Contents: - -1. About. -1.1. Build requitements. -1.2. Quick installation. -1.3. Legend. -1.4. Variants. -1.5. Notes. -1.6. Alternative tools. - -2. Linux console. -2.1. Installation. -2.2. Usage. -2.3. Quick reference. -2.4. Legend. -2.5. Notes. - -3. X11 Window System. -3.1. Installation. -3.2. Notes. - -4. Microsoft Windows. -4.1. Installation package. -4.2. Font file only. -4.3. Notes. - -5. Frequently Asked Questions. - -6. Legal information. -6.1. Licenses. -6.2. Copyright. - --- - -1. About. - -This archive contains source code for generating and installing Terminus -Font for Linux console, X11 Window System and Microsoft Windows. - -- version 4.48 -- sizes 6x12, 8x14, 8x16, 10x18, 10x20, 11x22, 12x24, 14x28, 16x32 -- weights normal, bold, CRT VGA bold -- characters 1354 -- format Bitmap Distribution Format (BDF) version 2.1 - -The character set covers about 120 language sets and supports ISO8859-1/2/5/ -7/9/13/15/16, Paratype-PT154/PT254, KOI8-R/U/E/F, Esperanto and many IBM, -Windows and Macintosh code pages, as well as the IBM VGA, vt100 and xterm -pseudographic characters. - - -1.1. Build requirements. - -- GNU make -- Python 3.5.0+ (or node.js 6.9.0+ as an alternative) -- for X11 only: bdftopcf -- for the Windows installer only: GCC for Win32/i686, NSIS and patch. - - -1.2. Quick installation. - -The commands: - -$ ./configure [--prefix=PREFIX] -$ make -j8 -# make install fontdir - -compile and install the Linux console and X11 Window System fonts. -The default PREFIX is /usr/local. - - -1.3. Legend. - -The file names are structured as follows: - -ter-u